OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
(...skipping 2425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2436 Register input, | 2436 Register input, |
2437 Register temp, | 2437 Register temp, |
2438 Register temp2) { | 2438 Register temp2) { |
2439 DCHECK(!input.is(temp)); | 2439 DCHECK(!input.is(temp)); |
2440 DCHECK(!input.is(temp2)); | 2440 DCHECK(!input.is(temp2)); |
2441 DCHECK(!temp.is(temp2)); | 2441 DCHECK(!temp.is(temp2)); |
2442 | 2442 |
2443 __ JumpIfSmi(input, is_false); | 2443 __ JumpIfSmi(input, is_false); |
2444 | 2444 |
2445 __ GetObjectType(input, temp, temp2); | 2445 __ GetObjectType(input, temp, temp2); |
| 2446 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
2446 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { | 2447 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { |
2447 __ Branch(is_true, eq, temp2, Operand(JS_FUNCTION_TYPE)); | 2448 __ Branch(is_true, hs, temp2, Operand(FIRST_FUNCTION_TYPE)); |
2448 } else { | 2449 } else { |
2449 __ Branch(is_false, eq, temp2, Operand(JS_FUNCTION_TYPE)); | 2450 __ Branch(is_false, hs, temp2, Operand(FIRST_FUNCTION_TYPE)); |
2450 } | 2451 } |
2451 | 2452 |
2452 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. | 2453 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. |
2453 // Check if the constructor in the map is a function. | 2454 // Check if the constructor in the map is a function. |
2454 Register instance_type = scratch1(); | 2455 Register instance_type = scratch1(); |
2455 DCHECK(!instance_type.is(temp)); | 2456 DCHECK(!instance_type.is(temp)); |
2456 __ GetMapConstructor(temp, temp, temp2, instance_type); | 2457 __ GetMapConstructor(temp, temp, temp2, instance_type); |
2457 | 2458 |
2458 // Objects with a non-function constructor have class 'Object'. | 2459 // Objects with a non-function constructor have class 'Object'. |
2459 if (String::Equals(class_name, isolate()->factory()->Object_string())) { | 2460 if (String::Equals(class_name, isolate()->factory()->Object_string())) { |
(...skipping 3322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5782 __ ld(result, FieldMemOperand(scratch, | 5783 __ ld(result, FieldMemOperand(scratch, |
5783 FixedArray::kHeaderSize - kPointerSize)); | 5784 FixedArray::kHeaderSize - kPointerSize)); |
5784 __ bind(deferred->exit()); | 5785 __ bind(deferred->exit()); |
5785 __ bind(&done); | 5786 __ bind(&done); |
5786 } | 5787 } |
5787 | 5788 |
5788 #undef __ | 5789 #undef __ |
5789 | 5790 |
5790 } // namespace internal | 5791 } // namespace internal |
5791 } // namespace v8 | 5792 } // namespace v8 |
OLD | NEW |