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

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

Issue 1555063002: [Interpreter] Adds support for wide variant of load/store lookup slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Updated tests to address review comments. Created 4 years, 11 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 | « src/compiler/bytecode-graph-builder.cc ('k') | 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 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);
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698