Skip to content

Commit 5207e51

Browse files
committed
[asm-cherry-pick] expose Label.flags
And widen it to an int, as it was in previous versions of ASM. In order to efficiently implement removal of unreachable code: https://github.com/scala/scala/blob/d8f5f34ca7461f38bc2466208bf2a87a4644aace/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala#L495-L546 We stashed the reachablity boolean in a flag on Label, rather than maintainig a `Map[Label, Boolean]` We made that change in scala/scala@6e3c5fc ASM 6.2 changed this field to a short. This commit restores it to an int to be conservative (we know that our extra flags in the high bits can't conflict with ASMs use of the field).
1 parent d2f33ce commit 5207e51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/scala/tools/asm/Label.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public class Label {
142142
* #FLAG_REACHABLE}, {@link #FLAG_SUBROUTINE_CALLER}, {@link #FLAG_SUBROUTINE_START}, {@link
143143
* #FLAG_SUBROUTINE_END}.
144144
*/
145-
short flags;
145+
public int flags;
146146

147147
/**
148148
* The source line number corresponding to this label, or 0. If there are several source line

0 commit comments

Comments
 (0)