Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index 4ec2d1264b30f9b04e3c5a7ab40d44d42ca12819..52e0cc4e61b5035996dcd0adb83af9e61fcf4347 100644 |
--- a/src/interpreter/bytecode-array-builder.cc |
+++ b/src/interpreter/bytecode-array-builder.cc |
@@ -452,6 +452,9 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::LoadLookupSlot( |
size_t name_index = GetConstantPoolEntry(name); |
if (FitsInIdx8Operand(name_index)) { |
Output(bytecode, static_cast<uint8_t>(name_index)); |
+ } else if (FitsInIdx16Operand(name_index)) { |
+ Output(BytecodeForWideOperands(bytecode), |
+ static_cast<uint16_t>(name_index)); |
} else { |
UNIMPLEMENTED(); |
} |
@@ -465,6 +468,9 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StoreLookupSlot( |
size_t name_index = GetConstantPoolEntry(name); |
if (FitsInIdx8Operand(name_index)) { |
Output(bytecode, static_cast<uint8_t>(name_index)); |
+ } else if (FitsInIdx16Operand(name_index)) { |
+ Output(BytecodeForWideOperands(bytecode), |
+ static_cast<uint16_t>(name_index)); |
} else { |
UNIMPLEMENTED(); |
} |
@@ -1295,6 +1301,14 @@ Bytecode BytecodeArrayBuilder::BytecodeForWideOperands(Bytecode bytecode) { |
return Bytecode::kStaGlobalSloppyWide; |
case Bytecode::kStaGlobalStrict: |
return Bytecode::kStaGlobalStrictWide; |
+ case Bytecode::kLdaLookupSlot: |
+ return Bytecode::kLdaLookupSlotWide; |
+ case Bytecode::kLdaLookupSlotInsideTypeof: |
+ return Bytecode::kLdaLookupSlotInsideTypeofWide; |
+ case Bytecode::kStaLookupSlotStrict: |
+ return Bytecode::kStaLookupSlotStrictWide; |
+ case Bytecode::kStaLookupSlotSloppy: |
+ return Bytecode::kStaLookupSlotSloppyWide; |
default: |
UNREACHABLE(); |
return static_cast<Bytecode>(-1); |