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

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

Issue 2435283002: [stubs] Add IsCallableMap predicate to CSA (Closed)
Patch Set: Remove unused variable Created 4 years, 2 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/builtins/builtins-object.cc ('k') | src/code-stub-assembler.h » ('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 dcf45d5177b5b68017da747c33314bfbed407fb0..d87255111d4b268fb9e5a347a620adb66d70f465 100644
--- a/src/builtins/builtins-regexp.cc
+++ b/src/builtins/builtins-regexp.cc
@@ -1605,11 +1605,8 @@ void Builtins::Generate_RegExpPrototypeReplace(CodeStubAssembler* a) {
a->GotoIf(a->TaggedIsSmi(replace_value), &checkreplacestring);
Node* const replace_value_map = a->LoadMap(replace_value);
- a->Branch(
- a->Word32Equal(a->Word32And(a->LoadMapBitField(replace_value_map),
- a->Int32Constant(1 << Map::kIsCallable)),
- a->Int32Constant(0)),
- &checkreplacestring, &if_iscallable);
+ a->Branch(a->IsCallableMap(replace_value_map), &if_iscallable,
+ &checkreplacestring);
// 3. Does ToString({replace_value}) contain '$'?
a->Bind(&checkreplacestring);
« no previous file with comments | « src/builtins/builtins-object.cc ('k') | src/code-stub-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698