@@ -27,8 +27,6 @@ internal object ShortLengthPrefixedListOpcodeHandler : OpcodeToBytecodeHandler {
2727 macroIndices : IntArray ,
2828 symbolTable : Array <String ?>
2929 ): Int {
30- assert (opcode in 0xb0 .. 0xbf ) { " Handler cannot compile opcode ${opcode.toHexString()} " }
31-
3230 val length = opcode and 0xF
3331 BytecodeEmitter .emitList(destination) {
3432 var p = position
@@ -66,8 +64,6 @@ internal object LongLengthPrefixedListOpcodeHandler : OpcodeToBytecodeHandler {
6664 macroIndices : IntArray ,
6765 symbolTable : Array <String ?>
6866 ): Int {
69- assert (opcode == 0xfa ) { " Handler cannot compile opcode ${opcode.toHexString()} " }
70-
7167 val containerSizeUIntValueAndLength = PrimitiveDecoder .readFlexUIntValueAndLength(source, position)
7268 val containerLength = containerSizeUIntValueAndLength.toInt()
7369 val prefixLength = containerSizeUIntValueAndLength.shr(Int .SIZE_BITS ).toInt()
@@ -107,8 +103,6 @@ internal object DelimitedListOpcodeHandler : OpcodeToBytecodeHandler {
107103 macroIndices : IntArray ,
108104 symbolTable : Array <String ?>
109105 ): Int {
110- assert (opcode == 0xf0 ) { " Handler cannot compile opcode ${opcode.toHexString()} " }
111-
112106 var p = position
113107 BytecodeEmitter .emitList(destination) {
114108 while (true ) {
@@ -148,16 +142,14 @@ internal object TaglessElementListOpcodeHandler : OpcodeToBytecodeHandler {
148142 macroIndices : IntArray ,
149143 symbolTable : Array <String ?>
150144 ): Int {
151- assert (opcode == 0x5b ) { " Handler cannot compile opcode ${opcode.toHexString()} " }
152-
153145 var p = position
154146 val childOpcode = source[p++ ].unsignedToInt()
155147 val macroAddress = when (childOpcode) {
156148 in 0x00 .. 0x47 -> childOpcode
157149 in 0x48 .. 0x4f -> {
158150 val flexUIntValueAndLength = PrimitiveDecoder .readFlexUIntValueAndLength(source, p)
159151 val addressLength = flexUIntValueAndLength.shr(Int .SIZE_BITS ).toInt()
160- p + = flexUIntValueAndLength
152+ p + = addressLength
161153 val lsb = childOpcode - 0x48
162154 val msb = flexUIntValueAndLength.toInt() * 8
163155 msb + lsb + 72
@@ -183,7 +175,7 @@ internal object TaglessElementListOpcodeHandler : OpcodeToBytecodeHandler {
183175 if (macroAddress < 0 ) {
184176 val handler = TaglessOpcodeHandlerTable .handler(childOpcode)
185177 BytecodeEmitter .emitList(destination) {
186- for (i in 0 until containerLength ) {
178+ for (i in 0 until childCount ) {
187179 p + = handler.convertOpcodeToBytecode(
188180 childOpcode,
189181 source,
0 commit comments