| Index: src/x64/builtins-x64.cc
|
| diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
|
| index 57cde6520612c2cae306dc7b20ef7af63daf5ef7..3b7046b7aef0634726eb7c8e45691dc0c159d716 100644
|
| --- a/src/x64/builtins-x64.cc
|
| +++ b/src/x64/builtins-x64.cc
|
| @@ -360,8 +360,9 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
|
| __ JumpIfSmi(rax, &use_receiver);
|
|
|
| // If the type of the result (stored in its map) is less than
|
| - // FIRST_JS_OBJECT_TYPE, it is not an object in the ECMA sense.
|
| - __ CmpObjectType(rax, FIRST_JS_OBJECT_TYPE, rcx);
|
| + // FIRST_SPEC_OBJECT_TYPE, it is not an object in the ECMA sense.
|
| + STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE);
|
| + __ CmpObjectType(rax, FIRST_SPEC_OBJECT_TYPE, rcx);
|
| __ j(above_equal, &exit);
|
|
|
| // Throw away the result of the constructor invocation and use the
|
| @@ -673,9 +674,9 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
|
| __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex);
|
| __ j(equal, &use_global_receiver);
|
|
|
| - __ CmpObjectType(rbx, FIRST_JS_OBJECT_TYPE, rcx);
|
| + __ CmpObjectType(rbx, FIRST_SPEC_OBJECT_TYPE, rcx);
|
| __ j(below, &convert_to_object);
|
| - __ CmpInstanceType(rcx, LAST_JS_OBJECT_TYPE);
|
| + __ CmpInstanceType(rcx, LAST_SPEC_OBJECT_TYPE);
|
| __ j(below_equal, &shift_arguments);
|
|
|
| __ bind(&convert_to_object);
|
| @@ -842,9 +843,9 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
|
|
|
| // If given receiver is already a JavaScript object then there's no
|
| // reason for converting it.
|
| - __ CmpObjectType(rbx, FIRST_JS_OBJECT_TYPE, rcx);
|
| + __ CmpObjectType(rbx, FIRST_SPEC_OBJECT_TYPE, rcx);
|
| __ j(below, &call_to_object);
|
| - __ CmpInstanceType(rcx, LAST_JS_OBJECT_TYPE);
|
| + __ CmpInstanceType(rcx, LAST_SPEC_OBJECT_TYPE);
|
| __ j(below_equal, &push_receiver);
|
|
|
| // Convert the receiver to an object.
|
|
|