Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index c156fcc80cad6c17bcd170df24a40937e050c239..961cefa4f52404982174e120bc40ede50f7e1538 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -994,9 +994,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
// Check for proxies. |
Label call_runtime; |
- STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); |
- __ CmpObjectType(rax, LAST_JS_PROXY_TYPE, rcx); |
- __ j(below_equal, &call_runtime); |
+ __ CmpObjectType(rax, JS_PROXY_TYPE, rcx); |
+ __ 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 |
@@ -1059,8 +1058,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
TypeFeedbackVector::MegamorphicSentinel(isolate())); |
__ Move(rbx, Smi::FromInt(1)); // Smi indicates slow check |
__ movp(rcx, Operand(rsp, 0 * kPointerSize)); // Get enumerated object |
- STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); |
- __ CmpObjectType(rcx, LAST_JS_PROXY_TYPE, rcx); |
+ STATIC_ASSERT(JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); |
+ __ CmpObjectType(rcx, JS_PROXY_TYPE, rcx); |
__ j(above, &non_proxy); |
__ Move(rbx, Smi::FromInt(0)); // Zero indicates proxy |
__ bind(&non_proxy); |
@@ -3119,14 +3118,11 @@ void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
&if_false, &fall_through); |
+ |
__ JumpIfSmi(rax, if_false); |
- Register map = rbx; |
- __ movp(map, FieldOperand(rax, HeapObject::kMapOffset)); |
- __ CmpInstanceType(map, FIRST_JS_PROXY_TYPE); |
- __ j(less, if_false); |
- __ CmpInstanceType(map, LAST_JS_PROXY_TYPE); |
+ __ CmpObjectType(rax, JS_PROXY_TYPE, rbx); |
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); |
} |