Commit aa58053d authored by Hao Xu's avatar Hao Xu Committed by V8 LUCI CQ

[CSA] Load jump offset on the branch it is used in JumpIf Handler

Some of the JumpIf Bytecode Handlers will load the jump offset from
bytecode array or constant pool before checking whether the condition is
matched, and this jump offset is unused if the jump not actually happens.

This CL move the Load operations to the branch on which the condition is
matched.

Bug: v8:12431
Change-Id: I3cb2fa7447ee2a9cb514148efb605617f95b1b68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3300994
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78088}
parent ae6eb0e2
...@@ -1108,18 +1108,67 @@ void InterpreterAssembler::JumpConditional(TNode<BoolT> condition, ...@@ -1108,18 +1108,67 @@ void InterpreterAssembler::JumpConditional(TNode<BoolT> condition,
Dispatch(); Dispatch();
} }
void InterpreterAssembler::JumpConditionalByImmediateOperand(
TNode<BoolT> condition, int operand_index) {
Label match(this), no_match(this);
Branch(condition, &match, &no_match);
BIND(&match);
TNode<IntPtrT> jump_offset = Signed(BytecodeOperandUImmWord(operand_index));
Jump(jump_offset);
BIND(&no_match);
Dispatch();
}
void InterpreterAssembler::JumpConditionalByConstantOperand(
TNode<BoolT> condition, int operand_index) {
Label match(this), no_match(this);
Branch(condition, &match, &no_match);
BIND(&match);
TNode<IntPtrT> jump_offset =
LoadAndUntagConstantPoolEntryAtOperandIndex(operand_index);
Jump(jump_offset);
BIND(&no_match);
Dispatch();
}
void InterpreterAssembler::JumpIfTaggedEqual(TNode<Object> lhs, void InterpreterAssembler::JumpIfTaggedEqual(TNode<Object> lhs,
TNode<Object> rhs, TNode<Object> rhs,
TNode<IntPtrT> jump_offset) { TNode<IntPtrT> jump_offset) {
JumpConditional(TaggedEqual(lhs, rhs), jump_offset); JumpConditional(TaggedEqual(lhs, rhs), jump_offset);
} }
void InterpreterAssembler::JumpIfTaggedEqual(TNode<Object> lhs,
TNode<Object> rhs,
int operand_index) {
JumpConditionalByImmediateOperand(TaggedEqual(lhs, rhs), operand_index);
}
void InterpreterAssembler::JumpIfTaggedEqualConstant(TNode<Object> lhs,
TNode<Object> rhs,
int operand_index) {
JumpConditionalByConstantOperand(TaggedEqual(lhs, rhs), operand_index);
}
void InterpreterAssembler::JumpIfTaggedNotEqual(TNode<Object> lhs, void InterpreterAssembler::JumpIfTaggedNotEqual(TNode<Object> lhs,
TNode<Object> rhs, TNode<Object> rhs,
TNode<IntPtrT> jump_offset) { TNode<IntPtrT> jump_offset) {
JumpConditional(TaggedNotEqual(lhs, rhs), jump_offset); JumpConditional(TaggedNotEqual(lhs, rhs), jump_offset);
} }
void InterpreterAssembler::JumpIfTaggedNotEqual(TNode<Object> lhs,
TNode<Object> rhs,
int operand_index) {
JumpConditionalByImmediateOperand(TaggedNotEqual(lhs, rhs), operand_index);
}
void InterpreterAssembler::JumpIfTaggedNotEqualConstant(TNode<Object> lhs,
TNode<Object> rhs,
int operand_index) {
JumpConditionalByConstantOperand(TaggedNotEqual(lhs, rhs), operand_index);
}
TNode<WordT> InterpreterAssembler::LoadBytecode( TNode<WordT> InterpreterAssembler::LoadBytecode(
TNode<IntPtrT> bytecode_offset) { TNode<IntPtrT> bytecode_offset) {
TNode<Uint8T> bytecode = TNode<Uint8T> bytecode =
......
...@@ -204,11 +204,33 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler { ...@@ -204,11 +204,33 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
void JumpIfTaggedEqual(TNode<Object> lhs, TNode<Object> rhs, void JumpIfTaggedEqual(TNode<Object> lhs, TNode<Object> rhs,
TNode<IntPtrT> jump_offset); TNode<IntPtrT> jump_offset);
// Jump forward relative to the current bytecode by offest specified in
// operand |operand_index| if the word values |lhs| and |rhs| are equal.
void JumpIfTaggedEqual(TNode<Object> lhs, TNode<Object> rhs,
int operand_index);
// Jump forward relative to the current bytecode by offest specified from the
// constant pool if the word values |lhs| and |rhs| are equal.
// The constant's index is specified in operand |operand_index|.
void JumpIfTaggedEqualConstant(TNode<Object> lhs, TNode<Object> rhs,
int operand_index);
// Jump forward 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. // word values |lhs| and |rhs| are not equal.
void JumpIfTaggedNotEqual(TNode<Object> lhs, TNode<Object> rhs, void JumpIfTaggedNotEqual(TNode<Object> lhs, TNode<Object> rhs,
TNode<IntPtrT> jump_offset); TNode<IntPtrT> jump_offset);
// Jump forward relative to the current bytecode by offest specified in
// operand |operand_index| if the word values |lhs| and |rhs| are not equal.
void JumpIfTaggedNotEqual(TNode<Object> lhs, TNode<Object> rhs,
int operand_index);
// Jump forward relative to the current bytecode by offest specified from the
// constant pool if the word values |lhs| and |rhs| are not equal.
// The constant's index is specified in operand |operand_index|.
void JumpIfTaggedNotEqualConstant(TNode<Object> lhs, TNode<Object> rhs,
int operand_index);
// Updates the profiler interrupt budget for a return. // Updates the profiler interrupt budget for a return.
void UpdateInterruptBudgetOnReturn(); void UpdateInterruptBudgetOnReturn();
...@@ -345,6 +367,19 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler { ...@@ -345,6 +367,19 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
// JumpIfTaggedNotEqual. // JumpIfTaggedNotEqual.
void JumpConditional(TNode<BoolT> condition, TNode<IntPtrT> jump_offset); void JumpConditional(TNode<BoolT> condition, TNode<IntPtrT> jump_offset);
// Jump forward relative to the current bytecode by offest specified in
// operand |operand_index| if the |condition| is true. Helper function for
// JumpIfTaggedEqual and JumpIfTaggedNotEqual.
void JumpConditionalByImmediateOperand(TNode<BoolT> condition,
int operand_index);
// Jump forward relative to the current bytecode by offest specified from the
// constant pool if the |condition| is true. The constant's index is specified
// in operand |operand_index|. Helper function for JumpIfTaggedEqualConstant
// and JumpIfTaggedNotEqualConstant.
void JumpConditionalByConstantOperand(TNode<BoolT> condition,
int operand_index);
// Save the bytecode offset to the interpreter frame. // Save the bytecode offset to the interpreter frame.
void SaveBytecodeOffset(); void SaveBytecodeOffset();
// Reload the bytecode offset from the interpreter frame. // Reload the bytecode offset from the interpreter frame.
......
...@@ -1919,9 +1919,8 @@ IGNITION_HANDLER(JumpConstant, InterpreterAssembler) { ...@@ -1919,9 +1919,8 @@ IGNITION_HANDLER(JumpConstant, InterpreterAssembler) {
// will misbehave if passed arbitrary input values. // will misbehave if passed arbitrary input values.
IGNITION_HANDLER(JumpIfTrue, InterpreterAssembler) { IGNITION_HANDLER(JumpIfTrue, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); TNode<Object> accumulator = GetAccumulator();
TNode<IntPtrT> relative_jump = Signed(BytecodeOperandUImmWord(0));
CSA_DCHECK(this, IsBoolean(CAST(accumulator))); CSA_DCHECK(this, IsBoolean(CAST(accumulator)));
JumpIfTaggedEqual(accumulator, TrueConstant(), relative_jump); JumpIfTaggedEqual(accumulator, TrueConstant(), 0);
} }
// JumpIfTrueConstant <idx> // JumpIfTrueConstant <idx>
...@@ -1931,9 +1930,8 @@ IGNITION_HANDLER(JumpIfTrue, InterpreterAssembler) { ...@@ -1931,9 +1930,8 @@ IGNITION_HANDLER(JumpIfTrue, InterpreterAssembler) {
// and will misbehave if passed arbitrary input values. // and will misbehave if passed arbitrary input values.
IGNITION_HANDLER(JumpIfTrueConstant, InterpreterAssembler) { IGNITION_HANDLER(JumpIfTrueConstant, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); TNode<Object> accumulator = GetAccumulator();
TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
CSA_DCHECK(this, IsBoolean(CAST(accumulator))); CSA_DCHECK(this, IsBoolean(CAST(accumulator)));
JumpIfTaggedEqual(accumulator, TrueConstant(), relative_jump); JumpIfTaggedEqualConstant(accumulator, TrueConstant(), 0);
} }
// JumpIfFalse <imm> // JumpIfFalse <imm>
...@@ -1943,9 +1941,8 @@ IGNITION_HANDLER(JumpIfTrueConstant, InterpreterAssembler) { ...@@ -1943,9 +1941,8 @@ IGNITION_HANDLER(JumpIfTrueConstant, InterpreterAssembler) {
// will misbehave if passed arbitrary input values. // will misbehave if passed arbitrary input values.
IGNITION_HANDLER(JumpIfFalse, InterpreterAssembler) { IGNITION_HANDLER(JumpIfFalse, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); TNode<Object> accumulator = GetAccumulator();
TNode<IntPtrT> relative_jump = Signed(BytecodeOperandUImmWord(0));
CSA_DCHECK(this, IsBoolean(CAST(accumulator))); CSA_DCHECK(this, IsBoolean(CAST(accumulator)));
JumpIfTaggedEqual(accumulator, FalseConstant(), relative_jump); JumpIfTaggedEqual(accumulator, FalseConstant(), 0);
} }
// JumpIfFalseConstant <idx> // JumpIfFalseConstant <idx>
...@@ -1955,9 +1952,8 @@ IGNITION_HANDLER(JumpIfFalse, InterpreterAssembler) { ...@@ -1955,9 +1952,8 @@ IGNITION_HANDLER(JumpIfFalse, InterpreterAssembler) {
// and will misbehave if passed arbitrary input values. // and will misbehave if passed arbitrary input values.
IGNITION_HANDLER(JumpIfFalseConstant, InterpreterAssembler) { IGNITION_HANDLER(JumpIfFalseConstant, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); TNode<Object> accumulator = GetAccumulator();
TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
CSA_DCHECK(this, IsBoolean(CAST(accumulator))); CSA_DCHECK(this, IsBoolean(CAST(accumulator)));
JumpIfTaggedEqual(accumulator, FalseConstant(), relative_jump); JumpIfTaggedEqualConstant(accumulator, FalseConstant(), 0);
} }
// JumpIfToBooleanTrue <imm> // JumpIfToBooleanTrue <imm>
...@@ -1966,10 +1962,10 @@ IGNITION_HANDLER(JumpIfFalseConstant, InterpreterAssembler) { ...@@ -1966,10 +1962,10 @@ IGNITION_HANDLER(JumpIfFalseConstant, InterpreterAssembler) {
// referenced by the accumulator is true when the object is cast to boolean. // referenced by the accumulator is true when the object is cast to boolean.
IGNITION_HANDLER(JumpIfToBooleanTrue, InterpreterAssembler) { IGNITION_HANDLER(JumpIfToBooleanTrue, InterpreterAssembler) {
TNode<Object> value = GetAccumulator(); TNode<Object> value = GetAccumulator();
TNode<IntPtrT> relative_jump = Signed(BytecodeOperandUImmWord(0));
Label if_true(this), if_false(this); Label if_true(this), if_false(this);
BranchIfToBooleanIsTrue(value, &if_true, &if_false); BranchIfToBooleanIsTrue(value, &if_true, &if_false);
BIND(&if_true); BIND(&if_true);
TNode<IntPtrT> relative_jump = Signed(BytecodeOperandUImmWord(0));
Jump(relative_jump); Jump(relative_jump);
BIND(&if_false); BIND(&if_false);
Dispatch(); Dispatch();
...@@ -1982,10 +1978,10 @@ IGNITION_HANDLER(JumpIfToBooleanTrue, InterpreterAssembler) { ...@@ -1982,10 +1978,10 @@ IGNITION_HANDLER(JumpIfToBooleanTrue, InterpreterAssembler) {
// cast to boolean. // cast to boolean.
IGNITION_HANDLER(JumpIfToBooleanTrueConstant, InterpreterAssembler) { IGNITION_HANDLER(JumpIfToBooleanTrueConstant, InterpreterAssembler) {
TNode<Object> value = GetAccumulator(); TNode<Object> value = GetAccumulator();
TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
Label if_true(this), if_false(this); Label if_true(this), if_false(this);
BranchIfToBooleanIsTrue(value, &if_true, &if_false); BranchIfToBooleanIsTrue(value, &if_true, &if_false);
BIND(&if_true); BIND(&if_true);
TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
Jump(relative_jump); Jump(relative_jump);
BIND(&if_false); BIND(&if_false);
Dispatch(); Dispatch();
...@@ -1997,12 +1993,12 @@ IGNITION_HANDLER(JumpIfToBooleanTrueConstant, InterpreterAssembler) { ...@@ -1997,12 +1993,12 @@ IGNITION_HANDLER(JumpIfToBooleanTrueConstant, InterpreterAssembler) {
// referenced by the accumulator is false when the object is cast to boolean. // referenced by the accumulator is false when the object is cast to boolean.
IGNITION_HANDLER(JumpIfToBooleanFalse, InterpreterAssembler) { IGNITION_HANDLER(JumpIfToBooleanFalse, InterpreterAssembler) {
TNode<Object> value = GetAccumulator(); TNode<Object> value = GetAccumulator();
TNode<IntPtrT> relative_jump = Signed(BytecodeOperandUImmWord(0));
Label if_true(this), if_false(this); Label if_true(this), if_false(this);
BranchIfToBooleanIsTrue(value, &if_true, &if_false); BranchIfToBooleanIsTrue(value, &if_true, &if_false);
BIND(&if_true); BIND(&if_true);
Dispatch(); Dispatch();
BIND(&if_false); BIND(&if_false);
TNode<IntPtrT> relative_jump = Signed(BytecodeOperandUImmWord(0));
Jump(relative_jump); Jump(relative_jump);
} }
...@@ -2013,12 +2009,12 @@ IGNITION_HANDLER(JumpIfToBooleanFalse, InterpreterAssembler) { ...@@ -2013,12 +2009,12 @@ IGNITION_HANDLER(JumpIfToBooleanFalse, InterpreterAssembler) {
// cast to boolean. // cast to boolean.
IGNITION_HANDLER(JumpIfToBooleanFalseConstant, InterpreterAssembler) { IGNITION_HANDLER(JumpIfToBooleanFalseConstant, InterpreterAssembler) {
TNode<Object> value = GetAccumulator(); TNode<Object> value = GetAccumulator();
TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
Label if_true(this), if_false(this); Label if_true(this), if_false(this);
BranchIfToBooleanIsTrue(value, &if_true, &if_false); BranchIfToBooleanIsTrue(value, &if_true, &if_false);
BIND(&if_true); BIND(&if_true);
Dispatch(); Dispatch();
BIND(&if_false); BIND(&if_false);
TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
Jump(relative_jump); Jump(relative_jump);
} }
...@@ -2028,8 +2024,7 @@ IGNITION_HANDLER(JumpIfToBooleanFalseConstant, InterpreterAssembler) { ...@@ -2028,8 +2024,7 @@ IGNITION_HANDLER(JumpIfToBooleanFalseConstant, InterpreterAssembler) {
// referenced by the accumulator is the null constant. // referenced by the accumulator is the null constant.
IGNITION_HANDLER(JumpIfNull, InterpreterAssembler) { IGNITION_HANDLER(JumpIfNull, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); TNode<Object> accumulator = GetAccumulator();
TNode<IntPtrT> relative_jump = Signed(BytecodeOperandUImmWord(0)); JumpIfTaggedEqual(accumulator, NullConstant(), 0);
JumpIfTaggedEqual(accumulator, NullConstant(), relative_jump);
} }
// JumpIfNullConstant <idx> // JumpIfNullConstant <idx>
...@@ -2038,8 +2033,7 @@ IGNITION_HANDLER(JumpIfNull, InterpreterAssembler) { ...@@ -2038,8 +2033,7 @@ IGNITION_HANDLER(JumpIfNull, InterpreterAssembler) {
// pool if the object referenced by the accumulator is the null constant. // pool if the object referenced by the accumulator is the null constant.
IGNITION_HANDLER(JumpIfNullConstant, InterpreterAssembler) { IGNITION_HANDLER(JumpIfNullConstant, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); TNode<Object> accumulator = GetAccumulator();
TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0); JumpIfTaggedEqualConstant(accumulator, NullConstant(), 0);
JumpIfTaggedEqual(accumulator, NullConstant(), relative_jump);
} }
// JumpIfNotNull <imm> // JumpIfNotNull <imm>
...@@ -2048,8 +2042,7 @@ IGNITION_HANDLER(JumpIfNullConstant, InterpreterAssembler) { ...@@ -2048,8 +2042,7 @@ IGNITION_HANDLER(JumpIfNullConstant, InterpreterAssembler) {
// referenced by the accumulator is not the null constant. // referenced by the accumulator is not the null constant.
IGNITION_HANDLER(JumpIfNotNull, InterpreterAssembler) { IGNITION_HANDLER(JumpIfNotNull, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); TNode<Object> accumulator = GetAccumulator();
TNode<IntPtrT> relative_jump = Signed(BytecodeOperandUImmWord(0)); JumpIfTaggedNotEqual(accumulator, NullConstant(), 0);
JumpIfTaggedNotEqual(accumulator, NullConstant(), relative_jump);
} }
// JumpIfNotNullConstant <idx> // JumpIfNotNullConstant <idx>
...@@ -2058,8 +2051,7 @@ IGNITION_HANDLER(JumpIfNotNull, InterpreterAssembler) { ...@@ -2058,8 +2051,7 @@ IGNITION_HANDLER(JumpIfNotNull, InterpreterAssembler) {
// pool if the object referenced by the accumulator is not the null constant. // pool if the object referenced by the accumulator is not the null constant.
IGNITION_HANDLER(JumpIfNotNullConstant, InterpreterAssembler) { IGNITION_HANDLER(JumpIfNotNullConstant, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); TNode<Object> accumulator = GetAccumulator();
TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0); JumpIfTaggedNotEqualConstant(accumulator, NullConstant(), 0);
JumpIfTaggedNotEqual(accumulator, NullConstant(), relative_jump);
} }
// JumpIfUndefined <imm> // JumpIfUndefined <imm>
...@@ -2068,8 +2060,7 @@ IGNITION_HANDLER(JumpIfNotNullConstant, InterpreterAssembler) { ...@@ -2068,8 +2060,7 @@ IGNITION_HANDLER(JumpIfNotNullConstant, InterpreterAssembler) {
// referenced by the accumulator is the undefined constant. // referenced by the accumulator is the undefined constant.
IGNITION_HANDLER(JumpIfUndefined, InterpreterAssembler) { IGNITION_HANDLER(JumpIfUndefined, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); TNode<Object> accumulator = GetAccumulator();
TNode<IntPtrT> relative_jump = Signed(BytecodeOperandUImmWord(0)); JumpIfTaggedEqual(accumulator, UndefinedConstant(), 0);
JumpIfTaggedEqual(accumulator, UndefinedConstant(), relative_jump);
} }
// JumpIfUndefinedConstant <idx> // JumpIfUndefinedConstant <idx>
...@@ -2078,8 +2069,7 @@ IGNITION_HANDLER(JumpIfUndefined, InterpreterAssembler) { ...@@ -2078,8 +2069,7 @@ IGNITION_HANDLER(JumpIfUndefined, InterpreterAssembler) {
// pool if the object referenced by the accumulator is the undefined constant. // pool if the object referenced by the accumulator is the undefined constant.
IGNITION_HANDLER(JumpIfUndefinedConstant, InterpreterAssembler) { IGNITION_HANDLER(JumpIfUndefinedConstant, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); TNode<Object> accumulator = GetAccumulator();
TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0); JumpIfTaggedEqualConstant(accumulator, UndefinedConstant(), 0);
JumpIfTaggedEqual(accumulator, UndefinedConstant(), relative_jump);
} }
// JumpIfNotUndefined <imm> // JumpIfNotUndefined <imm>
...@@ -2088,8 +2078,7 @@ IGNITION_HANDLER(JumpIfUndefinedConstant, InterpreterAssembler) { ...@@ -2088,8 +2078,7 @@ IGNITION_HANDLER(JumpIfUndefinedConstant, InterpreterAssembler) {
// referenced by the accumulator is not the undefined constant. // referenced by the accumulator is not the undefined constant.
IGNITION_HANDLER(JumpIfNotUndefined, InterpreterAssembler) { IGNITION_HANDLER(JumpIfNotUndefined, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); TNode<Object> accumulator = GetAccumulator();
TNode<IntPtrT> relative_jump = Signed(BytecodeOperandUImmWord(0)); JumpIfTaggedNotEqual(accumulator, UndefinedConstant(), 0);
JumpIfTaggedNotEqual(accumulator, UndefinedConstant(), relative_jump);
} }
// JumpIfNotUndefinedConstant <idx> // JumpIfNotUndefinedConstant <idx>
...@@ -2099,8 +2088,7 @@ IGNITION_HANDLER(JumpIfNotUndefined, InterpreterAssembler) { ...@@ -2099,8 +2088,7 @@ IGNITION_HANDLER(JumpIfNotUndefined, InterpreterAssembler) {
// constant. // constant.
IGNITION_HANDLER(JumpIfNotUndefinedConstant, InterpreterAssembler) { IGNITION_HANDLER(JumpIfNotUndefinedConstant, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); TNode<Object> accumulator = GetAccumulator();
TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0); JumpIfTaggedNotEqualConstant(accumulator, UndefinedConstant(), 0);
JumpIfTaggedNotEqual(accumulator, UndefinedConstant(), relative_jump);
} }
// JumpIfUndefinedOrNull <imm> // JumpIfUndefinedOrNull <imm>
...@@ -2144,7 +2132,6 @@ IGNITION_HANDLER(JumpIfUndefinedOrNullConstant, InterpreterAssembler) { ...@@ -2144,7 +2132,6 @@ IGNITION_HANDLER(JumpIfUndefinedOrNullConstant, InterpreterAssembler) {
// referenced by the accumulator is a JSReceiver. // referenced by the accumulator is a JSReceiver.
IGNITION_HANDLER(JumpIfJSReceiver, InterpreterAssembler) { IGNITION_HANDLER(JumpIfJSReceiver, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); TNode<Object> accumulator = GetAccumulator();
TNode<IntPtrT> relative_jump = Signed(BytecodeOperandUImmWord(0));
Label if_object(this), if_notobject(this, Label::kDeferred), if_notsmi(this); Label if_object(this), if_notobject(this, Label::kDeferred), if_notsmi(this);
Branch(TaggedIsSmi(accumulator), &if_notobject, &if_notsmi); Branch(TaggedIsSmi(accumulator), &if_notobject, &if_notsmi);
...@@ -2152,6 +2139,7 @@ IGNITION_HANDLER(JumpIfJSReceiver, InterpreterAssembler) { ...@@ -2152,6 +2139,7 @@ IGNITION_HANDLER(JumpIfJSReceiver, InterpreterAssembler) {
BIND(&if_notsmi); BIND(&if_notsmi);
Branch(IsJSReceiver(CAST(accumulator)), &if_object, &if_notobject); Branch(IsJSReceiver(CAST(accumulator)), &if_object, &if_notobject);
BIND(&if_object); BIND(&if_object);
TNode<IntPtrT> relative_jump = Signed(BytecodeOperandUImmWord(0));
Jump(relative_jump); Jump(relative_jump);
BIND(&if_notobject); BIND(&if_notobject);
...@@ -2164,7 +2152,6 @@ IGNITION_HANDLER(JumpIfJSReceiver, InterpreterAssembler) { ...@@ -2164,7 +2152,6 @@ IGNITION_HANDLER(JumpIfJSReceiver, InterpreterAssembler) {
// pool if the object referenced by the accumulator is a JSReceiver. // pool if the object referenced by the accumulator is a JSReceiver.
IGNITION_HANDLER(JumpIfJSReceiverConstant, InterpreterAssembler) { IGNITION_HANDLER(JumpIfJSReceiverConstant, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); TNode<Object> accumulator = GetAccumulator();
TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
Label if_object(this), if_notobject(this), if_notsmi(this); Label if_object(this), if_notobject(this), if_notsmi(this);
Branch(TaggedIsSmi(accumulator), &if_notobject, &if_notsmi); Branch(TaggedIsSmi(accumulator), &if_notobject, &if_notsmi);
...@@ -2173,6 +2160,7 @@ IGNITION_HANDLER(JumpIfJSReceiverConstant, InterpreterAssembler) { ...@@ -2173,6 +2160,7 @@ IGNITION_HANDLER(JumpIfJSReceiverConstant, InterpreterAssembler) {
Branch(IsJSReceiver(CAST(accumulator)), &if_object, &if_notobject); Branch(IsJSReceiver(CAST(accumulator)), &if_object, &if_notobject);
BIND(&if_object); BIND(&if_object);
TNode<IntPtrT> relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
Jump(relative_jump); Jump(relative_jump);
BIND(&if_notobject); BIND(&if_notobject);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment