Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index 7a8954ffe63caba1e5ae9f6cd60b6642c5f6f031..b6880af6aab38cb08b8b434b4309a77bcc55ef19 100644 |
--- a/src/interpreter/bytecode-array-builder.cc |
+++ b/src/interpreter/bytecode-array-builder.cc |
@@ -254,8 +254,8 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StoreAccumulatorInRegister( |
BytecodeArrayBuilder& BytecodeArrayBuilder::LoadGlobal(int slot_index) { |
DCHECK(slot_index >= 0); |
- if (FitsInIdx8Operand(slot_index)) { |
- Output(Bytecode::kLdaGlobal, static_cast<uint8_t>(slot_index)); |
+ if (FitsInIdx16Operand(slot_index)) { |
+ Output(Bytecode::kLdaGlobal, static_cast<uint16_t>(slot_index)); |
} else { |
UNIMPLEMENTED(); |
} |
@@ -267,7 +267,7 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StoreGlobal( |
int slot_index, LanguageMode language_mode) { |
DCHECK(slot_index >= 0); |
Bytecode bytecode = BytecodeForStoreGlobal(language_mode); |
- if (FitsInIdx8Operand(slot_index)) { |
+ if (FitsInIdx16Operand(slot_index)) { |
Output(bytecode, static_cast<uint8_t>(slot_index)); |
} else { |
UNIMPLEMENTED(); |