Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index 1e52c5ef7d5bd04757c067e70de8012e3ee24034..7ba9d0e3a9d398046a0099477725a4bda6045e9f 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -1940,6 +1940,28 @@ |
} |
+void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK(args->length() == 1); |
+ |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ Label materialize_true, materialize_false; |
+ Label* if_true = NULL; |
+ Label* if_false = NULL; |
+ Label* fall_through = NULL; |
+ context()->PrepareTest(&materialize_true, &materialize_false, |
+ &if_true, &if_false, &fall_through); |
+ |
+ __ JumpIfSmi(eax, if_false); |
+ __ CmpObjectType(eax, JS_REGEXP_TYPE, ebx); |
+ PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
+ Split(equal, if_true, if_false, fall_through); |
+ |
+ context()->Plug(if_true, if_false); |
+} |
+ |
+ |
void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK(args->length() == 1); |