| Index: src/ia32/code-stubs-ia32.cc
|
| diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
|
| index ac0b64525ac1a7cac410ada0bb2415eeed05f8ca..27ba99149bc4c7b9fae3870c3d91efdeffe0490c 100644
|
| --- a/src/ia32/code-stubs-ia32.cc
|
| +++ b/src/ia32/code-stubs-ia32.cc
|
| @@ -276,7 +276,7 @@ void ToBooleanStub::Generate(MacroAssembler* masm) {
|
| __ j(not_zero, &false_result, Label::kNear);
|
|
|
| // JavaScript object => true.
|
| - __ CmpInstanceType(edx, FIRST_JS_OBJECT_TYPE);
|
| + __ CmpInstanceType(edx, FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE);
|
| __ j(above_equal, &true_result, Label::kNear);
|
|
|
| // String value => false iff empty.
|
| @@ -3655,7 +3655,7 @@ void CompareStub::Generate(MacroAssembler* masm) {
|
| __ j(equal, &heap_number, Label::kNear);
|
| if (cc_ != equal) {
|
| // Call runtime on identical JSObjects. Otherwise return equal.
|
| - __ CmpObjectType(eax, FIRST_JS_OBJECT_TYPE, ecx);
|
| + __ CmpObjectType(eax, FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE, ecx);
|
| __ j(above_equal, ¬_identical);
|
| }
|
| __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
|
| @@ -3743,8 +3743,8 @@ void CompareStub::Generate(MacroAssembler* masm) {
|
| // Get the type of the first operand.
|
| // If the first object is a JS object, we have done pointer comparison.
|
| Label first_non_object;
|
| - STATIC_ASSERT(LAST_TYPE == JS_FUNCTION_TYPE);
|
| - __ CmpObjectType(eax, FIRST_JS_OBJECT_TYPE, ecx);
|
| + STATIC_ASSERT(LAST_TYPE == LAST_OBJECT_OR_FUNCTION_CLASS_TYPE);
|
| + __ CmpObjectType(eax, FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE, ecx);
|
| __ j(below, &first_non_object, Label::kNear);
|
|
|
| // Return non-zero (eax is not zero)
|
| @@ -3758,7 +3758,7 @@ void CompareStub::Generate(MacroAssembler* masm) {
|
| __ CmpInstanceType(ecx, ODDBALL_TYPE);
|
| __ j(equal, &return_not_equal);
|
|
|
| - __ CmpObjectType(edx, FIRST_JS_OBJECT_TYPE, ecx);
|
| + __ CmpObjectType(edx, FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE, ecx);
|
| __ j(above_equal, &return_not_equal);
|
|
|
| // Check for oddballs: true, false, null, undefined.
|
| @@ -3882,9 +3882,9 @@ void CompareStub::Generate(MacroAssembler* masm) {
|
| __ lea(ecx, Operand(eax, edx, times_1, 0));
|
| __ test(ecx, Immediate(kSmiTagMask));
|
| __ j(not_zero, ¬_both_objects, Label::kNear);
|
| - __ CmpObjectType(eax, FIRST_JS_OBJECT_TYPE, ecx);
|
| + __ CmpObjectType(eax, FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE, ecx);
|
| __ j(below, ¬_both_objects, Label::kNear);
|
| - __ CmpObjectType(edx, FIRST_JS_OBJECT_TYPE, ebx);
|
| + __ CmpObjectType(edx, FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE, ebx);
|
| __ j(below, ¬_both_objects, Label::kNear);
|
| // We do not bail out after this point. Both are JSObjects, and
|
| // they are equal if and only if both are undetectable.
|
| @@ -3963,7 +3963,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| __ j(zero, &receiver_is_value);
|
|
|
| // Check if the receiver is a valid JS object.
|
| - __ CmpObjectType(eax, FIRST_JS_OBJECT_TYPE, edi);
|
| + __ CmpObjectType(eax, FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE, edi);
|
| __ j(above_equal, &receiver_is_js_object);
|
|
|
| // Call the runtime to box the value.
|
|
|