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

Unified Diff: src/compiler/code-stub-assembler.cc

Issue 1808733002: Introduces a BranchIf helper in the CodeStubAssembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 4 years, 9 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/compiler/code-stub-assembler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-stub-assembler.cc
diff --git a/src/compiler/code-stub-assembler.cc b/src/compiler/code-stub-assembler.cc
index 23029613378c827951d0ed944840aa416e4fd6d2..c09cfa61a395f09b63065d21fe5556f51e129e36 100644
--- a/src/compiler/code-stub-assembler.cc
+++ b/src/compiler/code-stub-assembler.cc
@@ -466,108 +466,11 @@ Node* CodeStubAssembler::BitFieldDecode(Node* word32, uint32_t shift,
void CodeStubAssembler::BranchIf(Node* condition, Label* if_true,
Label* if_false) {
- Label if_condition_true(this), if_condition_false(this);
- Branch(condition, &if_condition_true, &if_condition_false);
- Bind(&if_condition_true);
+ Label if_condition_is_true(this), if_condition_is_false(this);
+ Branch(condition, &if_condition_is_true, &if_condition_is_false);
+ Bind(&if_condition_is_true);
Goto(if_true);
- Bind(&if_condition_false);
- Goto(if_false);
-}
-
-void CodeStubAssembler::BranchIfInt32LessThan(Node* a, Node* b, Label* if_true,
- Label* if_false) {
- Label if_lessthan(this), if_notlessthan(this);
- Branch(Int32LessThan(a, b), &if_lessthan, &if_notlessthan);
- Bind(&if_lessthan);
- Goto(if_true);
- Bind(&if_notlessthan);
- Goto(if_false);
-}
-
-void CodeStubAssembler::BranchIfSmiLessThan(Node* a, Node* b, Label* if_true,
- Label* if_false) {
- Label if_lessthan(this), if_notlessthan(this);
- Branch(SmiLessThan(a, b), &if_lessthan, &if_notlessthan);
- Bind(&if_lessthan);
- Goto(if_true);
- Bind(&if_notlessthan);
- Goto(if_false);
-}
-
-void CodeStubAssembler::BranchIfSmiLessThanOrEqual(Node* a, Node* b,
- Label* if_true,
- Label* if_false) {
- Label if_lessthanorequal(this), if_notlessthanorequal(this);
- Branch(SmiLessThanOrEqual(a, b), &if_lessthanorequal, &if_notlessthanorequal);
- Bind(&if_lessthanorequal);
- Goto(if_true);
- Bind(&if_notlessthanorequal);
- Goto(if_false);
-}
-
-void CodeStubAssembler::BranchIfFloat64Equal(Node* a, Node* b, Label* if_true,
- Label* if_false) {
- Label if_equal(this), if_notequal(this);
- Branch(Float64Equal(a, b), &if_equal, &if_notequal);
- Bind(&if_equal);
- Goto(if_true);
- Bind(&if_notequal);
- Goto(if_false);
-}
-
-void CodeStubAssembler::BranchIfFloat64LessThan(Node* a, Node* b,
- Label* if_true,
- Label* if_false) {
- Label if_lessthan(this), if_notlessthan(this);
- Branch(Float64LessThan(a, b), &if_lessthan, &if_notlessthan);
- Bind(&if_lessthan);
- Goto(if_true);
- Bind(&if_notlessthan);
- Goto(if_false);
-}
-
-void CodeStubAssembler::BranchIfFloat64LessThanOrEqual(Node* a, Node* b,
- Label* if_true,
- Label* if_false) {
- Label if_lessthanorequal(this), if_notlessthanorequal(this);
- Branch(Float64LessThanOrEqual(a, b), &if_lessthanorequal,
- &if_notlessthanorequal);
- Bind(&if_lessthanorequal);
- Goto(if_true);
- Bind(&if_notlessthanorequal);
- Goto(if_false);
-}
-
-void CodeStubAssembler::BranchIfFloat64GreaterThan(Node* a, Node* b,
- Label* if_true,
- Label* if_false) {
- Label if_greaterthan(this), if_notgreaterthan(this);
- Branch(Float64GreaterThan(a, b), &if_greaterthan, &if_notgreaterthan);
- Bind(&if_greaterthan);
- Goto(if_true);
- Bind(&if_notgreaterthan);
- Goto(if_false);
-}
-
-void CodeStubAssembler::BranchIfFloat64GreaterThanOrEqual(Node* a, Node* b,
- Label* if_true,
- Label* if_false) {
- Label if_greaterthanorequal(this), if_notgreaterthanorequal(this);
- Branch(Float64GreaterThanOrEqual(a, b), &if_greaterthanorequal,
- &if_notgreaterthanorequal);
- Bind(&if_greaterthanorequal);
- Goto(if_true);
- Bind(&if_notgreaterthanorequal);
- Goto(if_false);
-}
-
-void CodeStubAssembler::BranchIfWord32Equal(Node* a, Node* b, Label* if_true,
- Label* if_false) {
- Label if_equal(this), if_notequal(this);
- Branch(Word32Equal(a, b), &if_equal, &if_notequal);
- Bind(&if_equal);
- Goto(if_true);
- Bind(&if_notequal);
+ Bind(&if_condition_is_false);
Goto(if_false);
}
« no previous file with comments | « src/compiler/code-stub-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698