Index: src/full-codegen/s390/full-codegen-s390.cc |
diff --git a/src/full-codegen/s390/full-codegen-s390.cc b/src/full-codegen/s390/full-codegen-s390.cc |
index 771ff60c5140d812c6c4c8f993b027f1befaff38..92f5891330dcb171108df6eaa0b9c19e36dd9fc3 100644 |
--- a/src/full-codegen/s390/full-codegen-s390.cc |
+++ b/src/full-codegen/s390/full-codegen-s390.cc |
@@ -1980,6 +1980,27 @@ void FullCodeGenerator::EmitIsTypedArray(CallRuntime* expr) { |
context()->Plug(if_true, if_false); |
} |
+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(r2, if_false); |
+ __ CompareObjectType(r2, r3, r3, JS_REGEXP_TYPE); |
+ PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
+ Split(eq, 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); |