| 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 39a826c4091609127f4aaf874f297fed488a241f..93d61a03c6188992a4049ca4932fdcb5016a457a 100644
|
| --- a/src/full-codegen/x64/full-codegen-x64.cc
|
| +++ b/src/full-codegen/x64/full-codegen-x64.cc
|
| @@ -1007,9 +1007,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
|
| @@ -1072,8 +1071,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);
|
| @@ -3132,14 +3131,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);
|
| }
|
|
|