Index: src/full-codegen/ppc/full-codegen-ppc.cc |
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc |
index e8014c0d9f132a1c24791006001221bea9b665be..0bbe1870a9d27603eae2c471e4fc2a9aad173d36 100644 |
--- a/src/full-codegen/ppc/full-codegen-ppc.cc |
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc |
@@ -1003,9 +1003,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
// Check for proxies. |
Label call_runtime; |
- STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); |
- __ CompareObjectType(r3, r4, r4, LAST_JS_PROXY_TYPE); |
- __ ble(&call_runtime); |
+ __ CompareObjectType(r3, r4, r4, JS_PROXY_TYPE); |
+ __ beq(&call_runtime); |
// Check cache validity in generated code. This is a fast case for |
// the JSObject::IsSimpleEnum cache validity checks. If we cannot |
@@ -1070,8 +1069,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
__ LoadSmiLiteral(r4, Smi::FromInt(1)); // Smi indicates slow check |
__ LoadP(r5, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object |
- STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); |
- __ CompareObjectType(r5, r6, r6, LAST_JS_PROXY_TYPE); |
+ STATIC_ASSERT(JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); |
+ __ CompareObjectType(r5, r6, r6, JS_PROXY_TYPE); |
__ bgt(&non_proxy); |
__ LoadSmiLiteral(r4, Smi::FromInt(0)); // Zero indicates proxy |
__ bind(&non_proxy); |
@@ -3253,14 +3252,9 @@ void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
&if_false, &fall_through); |
__ JumpIfSmi(r3, if_false); |
- Register map = r4; |
- Register type_reg = r5; |
- __ LoadP(map, FieldMemOperand(r3, HeapObject::kMapOffset)); |
- __ lbz(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
- __ subi(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); |
- __ cmpli(type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE)); |
+ __ CompareObjectType(r3, r4, r4, JS_PROXY_TYPE); |
PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
- Split(le, if_true, if_false, fall_through); |
+ Split(eq, if_true, if_false, fall_through); |
context()->Plug(if_true, if_false); |
} |