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

Unified Diff: src/compiler/bytecode-graph-builder.cc

Issue 2336203002: [Interpreter] Add an unsigned immediate operand type (Closed)
Patch Set: Address comments Created 4 years, 3 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/bytecode-array-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 3722c04e794ebb6dd1b1919e0688343c668c17f3..4fb2f4956007cee452e5c75d146b1e2856e463ed 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -844,9 +844,9 @@ Node* BytecodeGraphBuilder::BuildLoadContextSlot() {
// TODO(mythria): immutable flag is also set to false. This information is not
// available in bytecode array. update this code when the implementation
// changes.
- const Operator* op =
- javascript()->LoadContext(bytecode_iterator().GetIndexOperand(2),
- bytecode_iterator().GetIndexOperand(1), false);
+ const Operator* op = javascript()->LoadContext(
+ bytecode_iterator().GetUnsignedImmediateOperand(2),
+ bytecode_iterator().GetIndexOperand(1), false);
Node* context =
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
return NewNode(op, context);
@@ -863,9 +863,9 @@ void BytecodeGraphBuilder::VisitLdrContextSlot() {
}
void BytecodeGraphBuilder::VisitStaContextSlot() {
- const Operator* op =
- javascript()->StoreContext(bytecode_iterator().GetIndexOperand(2),
- bytecode_iterator().GetIndexOperand(1));
+ const Operator* op = javascript()->StoreContext(
+ bytecode_iterator().GetUnsignedImmediateOperand(2),
+ bytecode_iterator().GetIndexOperand(1));
Node* context =
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
Node* value = environment()->LookupAccumulator();
@@ -1043,7 +1043,7 @@ void BytecodeGraphBuilder::VisitCreateBlockContext() {
}
void BytecodeGraphBuilder::VisitCreateFunctionContext() {
- uint32_t slots = bytecode_iterator().GetIndexOperand(0);
+ uint32_t slots = bytecode_iterator().GetUnsignedImmediateOperand(0);
const Operator* op = javascript()->CreateFunctionContext(slots);
Node* context = NewNode(op, GetFunctionClosure());
environment()->BindAccumulator(context);
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698