OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" | 7 #include "src/crankshaft/x64/lithium-codegen-x64.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 2366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2377 Handle<String> class_name, | 2377 Handle<String> class_name, |
2378 Register input, | 2378 Register input, |
2379 Register temp, | 2379 Register temp, |
2380 Register temp2) { | 2380 Register temp2) { |
2381 DCHECK(!input.is(temp)); | 2381 DCHECK(!input.is(temp)); |
2382 DCHECK(!input.is(temp2)); | 2382 DCHECK(!input.is(temp2)); |
2383 DCHECK(!temp.is(temp2)); | 2383 DCHECK(!temp.is(temp2)); |
2384 | 2384 |
2385 __ JumpIfSmi(input, is_false); | 2385 __ JumpIfSmi(input, is_false); |
2386 | 2386 |
2387 __ CmpObjectType(input, JS_FUNCTION_TYPE, temp); | 2387 __ CmpObjectType(input, FIRST_FUNCTION_TYPE, temp); |
| 2388 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
2388 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { | 2389 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { |
2389 __ j(equal, is_true); | 2390 __ j(above_equal, is_true); |
2390 } else { | 2391 } else { |
2391 __ j(equal, is_false); | 2392 __ j(above_equal, is_false); |
2392 } | 2393 } |
2393 | 2394 |
2394 // Check if the constructor in the map is a function. | 2395 // Check if the constructor in the map is a function. |
2395 __ GetMapConstructor(temp, temp, kScratchRegister); | 2396 __ GetMapConstructor(temp, temp, kScratchRegister); |
2396 | 2397 |
2397 // Objects with a non-function constructor have class 'Object'. | 2398 // Objects with a non-function constructor have class 'Object'. |
2398 __ CmpInstanceType(kScratchRegister, JS_FUNCTION_TYPE); | 2399 __ CmpInstanceType(kScratchRegister, JS_FUNCTION_TYPE); |
2399 if (String::Equals(class_name, isolate()->factory()->Object_string())) { | 2400 if (String::Equals(class_name, isolate()->factory()->Object_string())) { |
2400 __ j(not_equal, is_true); | 2401 __ j(not_equal, is_true); |
2401 } else { | 2402 } else { |
(...skipping 3190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5592 __ bind(deferred->exit()); | 5593 __ bind(deferred->exit()); |
5593 __ bind(&done); | 5594 __ bind(&done); |
5594 } | 5595 } |
5595 | 5596 |
5596 #undef __ | 5597 #undef __ |
5597 | 5598 |
5598 } // namespace internal | 5599 } // namespace internal |
5599 } // namespace v8 | 5600 } // namespace v8 |
5600 | 5601 |
5601 #endif // V8_TARGET_ARCH_X64 | 5602 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |