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

Unified Diff: src/interpreter/interpreter-assembler.h

Issue 2641443002: [ignition] Use absolute values for jump offsets (Closed)
Patch Set: Fix build Created 3 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
Index: src/interpreter/interpreter-assembler.h
diff --git a/src/interpreter/interpreter-assembler.h b/src/interpreter/interpreter-assembler.h
index 5183f3efedfb4673bbfddec625873cb5f2bd7f33..54ae54cf7ebde8c7aeb129d47065e2b73bec4fc0 100644
--- a/src/interpreter/interpreter-assembler.h
+++ b/src/interpreter/interpreter-assembler.h
@@ -39,6 +39,9 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
// Returns the 32-bit unsigned immediate for bytecode operand |operand_index|
// in the current bytecode.
compiler::Node* BytecodeOperandUImm(int operand_index);
+ // Returns the word-size unsigned immediate for bytecode operand
+ // |operand_index| in the current bytecode.
+ compiler::Node* BytecodeOperandUImmWord(int operand_index);
// Returns the 32-bit signed immediate for bytecode operand |operand_index|
// in the current bytecode.
compiler::Node* BytecodeOperandImm(int operand_index);
@@ -149,15 +152,16 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
compiler::Node* first_arg,
compiler::Node* arg_count, int return_size = 1);
- // Jump relative to the current bytecode by |jump_offset|.
- compiler::Node* Jump(compiler::Node* jump_offset);
+ // Jump relative to the current bytecode by the unsigned |jump_offset|. If
+ // |backwards|, then jump backwards, otherwise jump forwards.
+ compiler::Node* Jump(compiler::Node* jump_offset, bool backwards = false);
rmcilroy 2017/01/19 09:22:38 Nit, could you just make this a seperate JumpBackw
Leszek Swirski 2017/01/19 10:52:59 Done, though this function still exists (private)
- // Jump relative to the current bytecode by |jump_offset| if the
+ // Jump forward relative to the current bytecode by |jump_offset| if the
// word values |lhs| and |rhs| are equal.
void JumpIfWordEqual(compiler::Node* lhs, compiler::Node* rhs,
compiler::Node* jump_offset);
- // Jump relative to the current bytecode by |jump_offset| if the
+ // Jump forward relative to the current bytecode by |jump_offset| if the
// word values |lhs| and |rhs| are not equal.
void JumpIfWordNotEqual(compiler::Node* lhs, compiler::Node* rhs,
compiler::Node* jump_offset);
@@ -227,9 +231,10 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
// Traces the current bytecode by calling |function_id|.
void TraceBytecode(Runtime::FunctionId function_id);
- // Updates the bytecode array's interrupt budget by a 32-bit signed |weight|
- // and calls Runtime::kInterrupt if counter reaches zero.
- void UpdateInterruptBudget(compiler::Node* weight);
+ // Updates the bytecode array's interrupt budget by a 32-bit unsigned |weight|
+ // and calls Runtime::kInterrupt if counter reaches zero. If |backwards|, then
+ // the interrupt budget is decremented, otherwise it is incremented.
+ void UpdateInterruptBudget(compiler::Node* weight, bool backwards);
// Returns the offset of register |index| relative to RegisterFilePointer().
compiler::Node* RegisterFrameOffset(compiler::Node* index);
@@ -260,7 +265,7 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
compiler::Node* BytecodeUnsignedOperand(int operand_index,
OperandSize operand_size);
- // Jump relative to the current bytecode by |jump_offset| if the
+ // Jump forward relative to the current bytecode by |jump_offset| if the
// |condition| is true. Helper function for JumpIfWordEqual and
// JumpIfWordNotEqual.
void JumpConditional(compiler::Node* condition, compiler::Node* jump_offset);
@@ -272,7 +277,7 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
// Updates and returns BytecodeOffset() advanced by delta bytecodes.
// Traces the exit of the current bytecode.
compiler::Node* Advance(int delta);
- compiler::Node* Advance(compiler::Node* delta);
+ compiler::Node* Advance(compiler::Node* delta, bool backwards = false);
// Load the bytecode at |bytecode_offset|.
compiler::Node* LoadBytecode(compiler::Node* bytecode_offset);

Powered by Google App Engine
This is Rietveld 408576698