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 2418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2429 Handle<String>class_name, | 2429 Handle<String>class_name, |
2430 Register input, | 2430 Register input, |
2431 Register temp, | 2431 Register temp, |
2432 Register temp2) { | 2432 Register temp2) { |
2433 DCHECK(!input.is(temp)); | 2433 DCHECK(!input.is(temp)); |
2434 DCHECK(!input.is(temp2)); | 2434 DCHECK(!input.is(temp2)); |
2435 DCHECK(!temp.is(temp2)); | 2435 DCHECK(!temp.is(temp2)); |
2436 | 2436 |
2437 __ JumpIfSmi(input, is_false); | 2437 __ JumpIfSmi(input, is_false); |
2438 | 2438 |
2439 __ CompareObjectType(input, temp, temp2, JS_FUNCTION_TYPE); | 2439 __ CompareObjectType(input, temp, temp2, FIRST_FUNCTION_TYPE); |
| 2440 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
2440 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { | 2441 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { |
2441 __ b(eq, is_true); | 2442 __ b(hs, is_true); |
2442 } else { | 2443 } else { |
2443 __ b(eq, is_false); | 2444 __ b(hs, is_false); |
2444 } | 2445 } |
2445 | 2446 |
2446 // Check if the constructor in the map is a function. | 2447 // Check if the constructor in the map is a function. |
2447 Register instance_type = ip; | 2448 Register instance_type = ip; |
2448 __ GetMapConstructor(temp, temp, temp2, instance_type); | 2449 __ GetMapConstructor(temp, temp, temp2, instance_type); |
2449 | 2450 |
2450 // Objects with a non-function constructor have class 'Object'. | 2451 // Objects with a non-function constructor have class 'Object'. |
2451 __ cmp(instance_type, Operand(JS_FUNCTION_TYPE)); | 2452 __ cmp(instance_type, Operand(JS_FUNCTION_TYPE)); |
2452 if (String::Equals(isolate()->factory()->Object_string(), class_name)) { | 2453 if (String::Equals(isolate()->factory()->Object_string(), class_name)) { |
2453 __ b(ne, is_true); | 2454 __ b(ne, is_true); |
(...skipping 3125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5579 __ ldr(result, FieldMemOperand(scratch, | 5580 __ ldr(result, FieldMemOperand(scratch, |
5580 FixedArray::kHeaderSize - kPointerSize)); | 5581 FixedArray::kHeaderSize - kPointerSize)); |
5581 __ bind(deferred->exit()); | 5582 __ bind(deferred->exit()); |
5582 __ bind(&done); | 5583 __ bind(&done); |
5583 } | 5584 } |
5584 | 5585 |
5585 #undef __ | 5586 #undef __ |
5586 | 5587 |
5587 } // namespace internal | 5588 } // namespace internal |
5588 } // namespace v8 | 5589 } // namespace v8 |
OLD | NEW |