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); |