| Index: src/full-codegen/mips/full-codegen-mips.cc
|
| diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc
|
| index 0d5cc7c9ec18ca46c38f58d6b0d46031c387041a..9bf1805d80f8a2b246c35740f507f0143237b20a 100644
|
| --- a/src/full-codegen/mips/full-codegen-mips.cc
|
| +++ b/src/full-codegen/mips/full-codegen-mips.cc
|
| @@ -3316,22 +3316,14 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) {
|
|
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| - // If the object is a smi, we return null.
|
| + // If the object is not a JSReceiver, we return null.
|
| __ JumpIfSmi(v0, &null);
|
| -
|
| - // Check that the object is a JS object but take special care of JS
|
| - // functions to make sure they have 'Function' as their class.
|
| - // Assume that there are only two callable types, and one of them is at
|
| - // either end of the type range for JS object types. Saves extra comparisons.
|
| - STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2);
|
| + STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
|
| __ GetObjectType(v0, v0, a1); // Map is now in v0.
|
| __ Branch(&null, lt, a1, Operand(FIRST_JS_RECEIVER_TYPE));
|
|
|
| - STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE ==
|
| - LAST_JS_RECEIVER_TYPE - 1);
|
| - __ Branch(&function, eq, a1, Operand(LAST_JS_RECEIVER_TYPE));
|
| - // Assume that there is no larger type.
|
| - STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1);
|
| + // Return 'Function' for JSFunction objects.
|
| + __ Branch(&function, eq, a1, Operand(JS_FUNCTION_TYPE));
|
|
|
| // Check if the constructor in the map is a JS function.
|
| Register instance_type = a2;
|
|
|