OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.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/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 3320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3331 __ JumpIfSmi(r3, &null); | 3331 __ JumpIfSmi(r3, &null); |
3332 | 3332 |
3333 // Check that the object is a JS object but take special care of JS | 3333 // Check that the object is a JS object but take special care of JS |
3334 // functions to make sure they have 'Function' as their class. | 3334 // functions to make sure they have 'Function' as their class. |
3335 // Assume that there are only two callable types, and one of them is at | 3335 // Assume that there are only two callable types, and one of them is at |
3336 // either end of the type range for JS object types. Saves extra comparisons. | 3336 // either end of the type range for JS object types. Saves extra comparisons. |
3337 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); | 3337 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); |
3338 __ CompareObjectType(r3, r3, r4, FIRST_JS_RECEIVER_TYPE); | 3338 __ CompareObjectType(r3, r3, r4, FIRST_JS_RECEIVER_TYPE); |
3339 // Map is now in r3. | 3339 // Map is now in r3. |
3340 __ blt(&null); | 3340 __ blt(&null); |
3341 STATIC_ASSERT(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE == | |
3342 FIRST_JS_RECEIVER_TYPE + 1); | |
3343 __ beq(&function); | |
3344 | 3341 |
3345 __ cmpi(r4, Operand(LAST_JS_RECEIVER_TYPE)); | 3342 __ cmpi(r4, Operand(LAST_JS_RECEIVER_TYPE)); |
3346 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_JS_RECEIVER_TYPE - 1); | 3343 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_JS_RECEIVER_TYPE - 1); |
3347 __ beq(&function); | 3344 __ beq(&function); |
3348 // Assume that there is no larger type. | 3345 // Assume that there is no larger type. |
3349 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); | 3346 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); |
3350 | 3347 |
3351 // Check if the constructor in the map is a JS function. | 3348 // Check if the constructor in the map is a JS function. |
3352 Register instance_type = r5; | 3349 Register instance_type = r5; |
3353 __ GetMapConstructor(r3, r3, r4, instance_type); | 3350 __ GetMapConstructor(r3, r3, r4, instance_type); |
(...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4899 return ON_STACK_REPLACEMENT; | 4896 return ON_STACK_REPLACEMENT; |
4900 } | 4897 } |
4901 | 4898 |
4902 DCHECK(interrupt_address == | 4899 DCHECK(interrupt_address == |
4903 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4900 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4904 return OSR_AFTER_STACK_CHECK; | 4901 return OSR_AFTER_STACK_CHECK; |
4905 } | 4902 } |
4906 } // namespace internal | 4903 } // namespace internal |
4907 } // namespace v8 | 4904 } // namespace v8 |
4908 #endif // V8_TARGET_ARCH_PPC | 4905 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |