File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
compiler/src/dotty/tools/dotc/core/tasty Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,15 @@ package dotty.tools.dotc
2
2
package core .tasty
3
3
4
4
import scala .language .unsafeNulls
5
+ import scala .collection .immutable .BitSet
5
6
6
7
import dotty .tools .tasty .{TastyFormat , TastyReader , TastyBuffer }
7
8
8
9
class AttributeUnpickler (reader : TastyReader ):
9
10
import reader ._
10
11
11
12
lazy val attributes : Attributes = {
12
- val booleanTags = List .newBuilder[ Int ]
13
+ val booleanTags = BitSet .newBuilder
13
14
14
15
while ! isAtEnd do
15
16
booleanTags += readByte()
Original file line number Diff line number Diff line change @@ -2,8 +2,10 @@ package dotty.tools.dotc.core.tasty
2
2
3
3
import dotty .tools .tasty .TastyFormat
4
4
5
+ import scala .collection .immutable .BitSet
6
+
5
7
class Attributes (
6
- val booleanTags : List [ Int ] ,
8
+ val booleanTags : BitSet ,
7
9
) {
8
10
def scala2StandardLibrary : Boolean =
9
11
booleanTags.contains(TastyFormat .SCALA2STANDARDLIBRARYattr )
@@ -16,7 +18,7 @@ object Attributes:
16
18
scala2StandardLibrary : Boolean ,
17
19
explicitNulls : Boolean ,
18
20
): Attributes =
19
- val booleanTags = List .newBuilder[ Int ]
21
+ val booleanTags = BitSet .newBuilder
20
22
if scala2StandardLibrary then booleanTags += TastyFormat .SCALA2STANDARDLIBRARYattr
21
23
if explicitNulls then booleanTags += TastyFormat .EXPLICITNULLSattr
22
24
new Attributes (booleanTags.result())
You can’t perform that action at this time.
0 commit comments