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 2452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2463 Register input, | 2463 Register input, |
2464 Register temp, | 2464 Register temp, |
2465 Register temp2) { | 2465 Register temp2) { |
2466 DCHECK(!input.is(temp)); | 2466 DCHECK(!input.is(temp)); |
2467 DCHECK(!input.is(temp2)); | 2467 DCHECK(!input.is(temp2)); |
2468 DCHECK(!temp.is(temp2)); | 2468 DCHECK(!temp.is(temp2)); |
2469 | 2469 |
2470 __ JumpIfSmi(input, is_false); | 2470 __ JumpIfSmi(input, is_false); |
2471 | 2471 |
2472 __ GetObjectType(input, temp, temp2); | 2472 __ GetObjectType(input, temp, temp2); |
| 2473 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
2473 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { | 2474 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { |
2474 __ Branch(is_true, eq, temp2, Operand(JS_FUNCTION_TYPE)); | 2475 __ Branch(is_true, hs, temp2, Operand(FIRST_FUNCTION_TYPE)); |
2475 } else { | 2476 } else { |
2476 __ Branch(is_false, eq, temp2, Operand(JS_FUNCTION_TYPE)); | 2477 __ Branch(is_false, hs, temp2, Operand(FIRST_FUNCTION_TYPE)); |
2477 } | 2478 } |
2478 | 2479 |
2479 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. | 2480 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. |
2480 // Check if the constructor in the map is a function. | 2481 // Check if the constructor in the map is a function. |
2481 Register instance_type = scratch1(); | 2482 Register instance_type = scratch1(); |
2482 DCHECK(!instance_type.is(temp)); | 2483 DCHECK(!instance_type.is(temp)); |
2483 __ GetMapConstructor(temp, temp, temp2, instance_type); | 2484 __ GetMapConstructor(temp, temp, temp2, instance_type); |
2484 | 2485 |
2485 // Objects with a non-function constructor have class 'Object'. | 2486 // Objects with a non-function constructor have class 'Object'. |
2486 if (String::Equals(class_name, isolate()->factory()->Object_string())) { | 2487 if (String::Equals(class_name, isolate()->factory()->Object_string())) { |
(...skipping 3269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5756 __ ld(result, FieldMemOperand(scratch, | 5757 __ ld(result, FieldMemOperand(scratch, |
5757 FixedArray::kHeaderSize - kPointerSize)); | 5758 FixedArray::kHeaderSize - kPointerSize)); |
5758 __ bind(deferred->exit()); | 5759 __ bind(deferred->exit()); |
5759 __ bind(&done); | 5760 __ bind(&done); |
5760 } | 5761 } |
5761 | 5762 |
5762 #undef __ | 5763 #undef __ |
5763 | 5764 |
5764 } // namespace internal | 5765 } // namespace internal |
5765 } // namespace v8 | 5766 } // namespace v8 |
OLD | NEW |