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/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
(...skipping 2421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2432 Handle<String>class_name, | 2432 Handle<String>class_name, |
2433 Register input, | 2433 Register input, |
2434 Register temp, | 2434 Register temp, |
2435 Register temp2) { | 2435 Register temp2) { |
2436 DCHECK(!input.is(temp)); | 2436 DCHECK(!input.is(temp)); |
2437 DCHECK(!input.is(temp2)); | 2437 DCHECK(!input.is(temp2)); |
2438 DCHECK(!temp.is(temp2)); | 2438 DCHECK(!temp.is(temp2)); |
2439 | 2439 |
2440 __ JumpIfSmi(input, is_false); | 2440 __ JumpIfSmi(input, is_false); |
2441 | 2441 |
2442 __ CompareObjectType(input, temp, temp2, JS_FUNCTION_TYPE); | 2442 __ CompareObjectType(input, temp, temp2, FIRST_FUNCTION_TYPE); |
| 2443 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
2443 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { | 2444 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { |
2444 __ b(eq, is_true); | 2445 __ b(hs, is_true); |
2445 } else { | 2446 } else { |
2446 __ b(eq, is_false); | 2447 __ b(hs, is_false); |
2447 } | 2448 } |
2448 | 2449 |
2449 // Check if the constructor in the map is a function. | 2450 // Check if the constructor in the map is a function. |
2450 Register instance_type = ip; | 2451 Register instance_type = ip; |
2451 __ GetMapConstructor(temp, temp, temp2, instance_type); | 2452 __ GetMapConstructor(temp, temp, temp2, instance_type); |
2452 | 2453 |
2453 // Objects with a non-function constructor have class 'Object'. | 2454 // Objects with a non-function constructor have class 'Object'. |
2454 __ cmp(instance_type, Operand(JS_FUNCTION_TYPE)); | 2455 __ cmp(instance_type, Operand(JS_FUNCTION_TYPE)); |
2455 if (String::Equals(isolate()->factory()->Object_string(), class_name)) { | 2456 if (String::Equals(isolate()->factory()->Object_string(), class_name)) { |
2456 __ b(ne, is_true); | 2457 __ b(ne, is_true); |
(...skipping 3081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5538 __ ldr(result, FieldMemOperand(scratch, | 5539 __ ldr(result, FieldMemOperand(scratch, |
5539 FixedArray::kHeaderSize - kPointerSize)); | 5540 FixedArray::kHeaderSize - kPointerSize)); |
5540 __ bind(deferred->exit()); | 5541 __ bind(deferred->exit()); |
5541 __ bind(&done); | 5542 __ bind(&done); |
5542 } | 5543 } |
5543 | 5544 |
5544 #undef __ | 5545 #undef __ |
5545 | 5546 |
5546 } // namespace internal | 5547 } // namespace internal |
5547 } // namespace v8 | 5548 } // namespace v8 |
OLD | NEW |