Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(684)

Unified Diff: src/interpreter/bytecode-array-builder.cc

Issue 1403353002: [Interpreter] Move globals to use idx16 operand for slot id. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/interpreter/bytecodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698