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

Unified Diff: src/interpreter/interpreter.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 | « src/interpreter/bytecodes.h ('k') | src/interpreter/interpreter-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 89c92abadb055515978e281df82f2939d23ece2b..5eb59060756195fa24c7eebc007242eef5df2158 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -520,7 +520,7 @@ compiler::Node* Interpreter::BuildLoadContextSlot(
Node* reg_index = __ BytecodeOperandReg(0);
Node* context = __ LoadRegister(reg_index);
Node* slot_index = __ BytecodeOperandIdx(1);
- Node* depth = __ BytecodeOperandIdx(2);
+ Node* depth = __ BytecodeOperandUImm(2);
Node* slot_context = __ GetContextAtDepth(context, depth);
return __ LoadContextSlot(slot_context, slot_index);
}
@@ -555,7 +555,7 @@ void Interpreter::DoStaContextSlot(InterpreterAssembler* assembler) {
Node* reg_index = __ BytecodeOperandReg(0);
Node* context = __ LoadRegister(reg_index);
Node* slot_index = __ BytecodeOperandIdx(1);
- Node* depth = __ BytecodeOperandIdx(2);
+ Node* depth = __ BytecodeOperandUImm(2);
Node* slot_context = __ GetContextAtDepth(context, depth);
__ StoreContextSlot(slot_context, slot_index, value);
__ Dispatch();
@@ -2010,7 +2010,7 @@ void Interpreter::DoCreateCatchContext(InterpreterAssembler* assembler) {
// Creates a new context with number of |slots| for the function closure.
void Interpreter::DoCreateFunctionContext(InterpreterAssembler* assembler) {
Node* closure = __ LoadRegister(Register::function_closure());
- Node* slots = __ BytecodeOperandIdx(0);
+ Node* slots = __ BytecodeOperandUImm(0);
Node* context = __ GetContext();
__ SetAccumulator(
FastNewFunctionContextStub::Generate(assembler, closure, slots, context));
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/interpreter/interpreter-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698