Index: src/code-stub-assembler.h |
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h |
index 4d090b83f1823c87cbd18bbb4430dc73c861ca46..da5f5b72c96225ed304be6b1f17d0b4478c347d5 100644 |
--- a/src/code-stub-assembler.h |
+++ b/src/code-stub-assembler.h |
@@ -99,6 +99,11 @@ class CodeStubAssembler : public compiler::CodeAssembler { |
// Check that the value is a positive smi. |
compiler::Node* WordIsPositiveSmi(compiler::Node* a); |
+ void BranchIfSmiEqual(compiler::Node* a, compiler::Node* b, Label* if_true, |
+ Label* if_false) { |
+ BranchIf(SmiEqual(a, b), if_true, if_false); |
+ } |
+ |
void BranchIfSmiLessThan(compiler::Node* a, compiler::Node* b, Label* if_true, |
Label* if_false) { |
BranchIf(SmiLessThan(a, b), if_true, if_false); |
@@ -114,6 +119,11 @@ class CodeStubAssembler : public compiler::CodeAssembler { |
BranchIfFloat64Equal(value, value, if_false, if_true); |
} |
+ // Branches to {if_true} if ToBoolean applied to {value} yields true, |
+ // otherwise goes to {if_false}. |
+ void BranchIfToBooleanIsTrue(compiler::Node* value, Label* if_true, |
+ Label* if_false); |
+ |
// Load value from current frame by given offset in bytes. |
compiler::Node* LoadFromFrame(int offset, |
MachineType rep = MachineType::AnyTagged()); |