Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index de7d627aa1c3ee1537bb2b80a2635b750bbad045..bcec2bbf599cda82861ea3a2f1672232a50268e0 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -3440,6 +3440,32 @@ void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { |
} |
+void FullCodeGenerator::EmitIsJSProxy(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(r0, if_false); |
+ Register map = r1; |
+ Register type_reg = r2; |
+ __ ldr(map, FieldMemOperand(r0, HeapObject::kMapOffset)); |
+ __ ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
+ __ sub(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); |
+ __ cmp(type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE)); |
+ PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
+ Split(ls, if_true, if_false, fall_through); |
+ |
+ context()->Plug(if_true, if_false); |
+} |
+ |
void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { |
DCHECK(expr->arguments()->length() == 0); |