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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" | 7 #include "src/crankshaft/x87/lithium-codegen-x87.h" |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 2502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2513 Label* is_false, | 2513 Label* is_false, |
2514 Handle<String>class_name, | 2514 Handle<String>class_name, |
2515 Register input, | 2515 Register input, |
2516 Register temp, | 2516 Register temp, |
2517 Register temp2) { | 2517 Register temp2) { |
2518 DCHECK(!input.is(temp)); | 2518 DCHECK(!input.is(temp)); |
2519 DCHECK(!input.is(temp2)); | 2519 DCHECK(!input.is(temp2)); |
2520 DCHECK(!temp.is(temp2)); | 2520 DCHECK(!temp.is(temp2)); |
2521 __ JumpIfSmi(input, is_false); | 2521 __ JumpIfSmi(input, is_false); |
2522 | 2522 |
2523 __ CmpObjectType(input, JS_FUNCTION_TYPE, temp); | 2523 __ CmpObjectType(input, FIRST_FUNCTION_TYPE, temp); |
| 2524 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
2524 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { | 2525 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { |
2525 __ j(equal, is_true); | 2526 __ j(above_equal, is_true); |
2526 } else { | 2527 } else { |
2527 __ j(equal, is_false); | 2528 __ j(above_equal, is_false); |
2528 } | 2529 } |
2529 | 2530 |
2530 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. | 2531 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. |
2531 // Check if the constructor in the map is a function. | 2532 // Check if the constructor in the map is a function. |
2532 __ GetMapConstructor(temp, temp, temp2); | 2533 __ GetMapConstructor(temp, temp, temp2); |
2533 // Objects with a non-function constructor have class 'Object'. | 2534 // Objects with a non-function constructor have class 'Object'. |
2534 __ CmpInstanceType(temp2, JS_FUNCTION_TYPE); | 2535 __ CmpInstanceType(temp2, JS_FUNCTION_TYPE); |
2535 if (String::Equals(class_name, isolate()->factory()->Object_string())) { | 2536 if (String::Equals(class_name, isolate()->factory()->Object_string())) { |
2536 __ j(not_equal, is_true); | 2537 __ j(not_equal, is_true); |
2537 } else { | 2538 } else { |
(...skipping 3333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5871 __ bind(deferred->exit()); | 5872 __ bind(deferred->exit()); |
5872 __ bind(&done); | 5873 __ bind(&done); |
5873 } | 5874 } |
5874 | 5875 |
5875 #undef __ | 5876 #undef __ |
5876 | 5877 |
5877 } // namespace internal | 5878 } // namespace internal |
5878 } // namespace v8 | 5879 } // namespace v8 |
5879 | 5880 |
5880 #endif // V8_TARGET_ARCH_X87 | 5881 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |