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 6fcd9943432d3ad07edaf3a6d227df0b2bfbd2fe..28fbe85bbe6d53b6e7b79380bbf9139b3d2aca2f 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -980,9 +980,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
// Check for proxies. |
Label call_runtime, use_cache, fixed_array; |
- STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); |
- __ CmpObjectType(eax, LAST_JS_PROXY_TYPE, ecx); |
- __ j(below_equal, &call_runtime); |
+ __ CmpObjectType(eax, JS_PROXY_TYPE, ecx); |
+ __ j(equal, &call_runtime); |
// Check cache validity in generated code. This is a fast case for |
// the JSObject::IsSimpleEnum cache validity checks. If we cannot |
@@ -1038,8 +1037,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
__ mov(ebx, Immediate(Smi::FromInt(1))); // Smi indicates slow check |
__ mov(ecx, Operand(esp, 0 * kPointerSize)); // Get enumerated object |
- STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); |
- __ CmpObjectType(ecx, LAST_JS_PROXY_TYPE, ecx); |
+ STATIC_ASSERT(JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); |
+ __ CmpObjectType(ecx, JS_PROXY_TYPE, ecx); |
__ j(above, &non_proxy); |
__ Move(ebx, Immediate(Smi::FromInt(0))); // Zero indicates proxy |
__ bind(&non_proxy); |
@@ -3137,13 +3136,9 @@ void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
&if_false, &fall_through); |
__ JumpIfSmi(eax, if_false); |
- Register map = ebx; |
- __ mov(map, FieldOperand(eax, HeapObject::kMapOffset)); |
- __ CmpInstanceType(map, FIRST_JS_PROXY_TYPE); |
- __ j(less, if_false); |
- __ CmpInstanceType(map, LAST_JS_PROXY_TYPE); |
+ __ CmpObjectType(eax, JS_PROXY_TYPE, ebx); |
PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
- Split(less_equal, if_true, if_false, fall_through); |
+ Split(equal, if_true, if_false, fall_through); |
context()->Plug(if_true, if_false); |
} |