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

Unified Diff: src/builtins/builtins-regexp.cc

Issue 2550683003: [stubs] Cleanup usages of CSA::Select(). (Closed)
Patch Set: Created 4 years 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 | « no previous file | src/builtins/builtins-string.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-regexp.cc
diff --git a/src/builtins/builtins-regexp.cc b/src/builtins/builtins-regexp.cc
index 356cd4b9ff2ca0d838563ad819b27606c256320b..7edf93b19d124ca28f70758800585c679d259703 100644
--- a/src/builtins/builtins-regexp.cc
+++ b/src/builtins/builtins-regexp.cc
@@ -914,7 +914,7 @@ void Generate_FlagGetter(CodeStubAssembler* a, JSRegExp::Flag flag,
{
// Refer to JSRegExp's flag property on the fast-path.
Node* const is_flag_set = FastFlagGetter(a, receiver, flag);
- a->Return(a->Select(is_flag_set, a->TrueConstant(), a->FalseConstant()));
+ a->Return(a->SelectBooleanConstant(is_flag_set));
}
a->Bind(&if_isnotunmodifiedjsregexp);
@@ -1192,8 +1192,8 @@ void Builtins::Generate_RegExpPrototypeTest(CodeAssemblerState* state) {
Node* const match_indices = RegExpExec(&a, context, receiver, string);
// Return true iff exec matched successfully.
- Node* const result = a.Select(a.WordEqual(match_indices, a.NullConstant()),
- a.FalseConstant(), a.TrueConstant());
+ Node* const result = a.SelectBooleanConstant(
+ a.WordNotEqual(match_indices, a.NullConstant()));
Igor Sheludko 2016/12/05 08:48:49 Note: negated condition.
a.Return(result);
}
}
« no previous file with comments | « no previous file | src/builtins/builtins-string.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698