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/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 3199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3210 __ JumpIfSmi(eax, &null); | 3210 __ JumpIfSmi(eax, &null); |
3211 | 3211 |
3212 // Check that the object is a JS object but take special care of JS | 3212 // Check that the object is a JS object but take special care of JS |
3213 // functions to make sure they have 'Function' as their class. | 3213 // functions to make sure they have 'Function' as their class. |
3214 // Assume that there are only two callable types, and one of them is at | 3214 // Assume that there are only two callable types, and one of them is at |
3215 // either end of the type range for JS object types. Saves extra comparisons. | 3215 // either end of the type range for JS object types. Saves extra comparisons. |
3216 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); | 3216 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); |
3217 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, eax); | 3217 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, eax); |
3218 // Map is now in eax. | 3218 // Map is now in eax. |
3219 __ j(below, &null); | 3219 __ j(below, &null); |
3220 STATIC_ASSERT(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE == | |
3221 FIRST_JS_RECEIVER_TYPE + 1); | |
3222 __ j(equal, &function); | |
3223 | 3220 |
3224 __ CmpInstanceType(eax, LAST_JS_RECEIVER_TYPE); | 3221 __ CmpInstanceType(eax, LAST_JS_RECEIVER_TYPE); |
3225 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == | 3222 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == |
3226 LAST_JS_RECEIVER_TYPE - 1); | 3223 LAST_JS_RECEIVER_TYPE - 1); |
3227 __ j(equal, &function); | 3224 __ j(equal, &function); |
3228 // Assume that there is no larger type. | 3225 // Assume that there is no larger type. |
3229 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); | 3226 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); |
3230 | 3227 |
3231 // Check if the constructor in the map is a JS function. | 3228 // Check if the constructor in the map is a JS function. |
3232 __ GetMapConstructor(eax, eax, ebx); | 3229 __ GetMapConstructor(eax, eax, ebx); |
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4817 Assembler::target_address_at(call_target_address, | 4814 Assembler::target_address_at(call_target_address, |
4818 unoptimized_code)); | 4815 unoptimized_code)); |
4819 return OSR_AFTER_STACK_CHECK; | 4816 return OSR_AFTER_STACK_CHECK; |
4820 } | 4817 } |
4821 | 4818 |
4822 | 4819 |
4823 } // namespace internal | 4820 } // namespace internal |
4824 } // namespace v8 | 4821 } // namespace v8 |
4825 | 4822 |
4826 #endif // V8_TARGET_ARCH_X87 | 4823 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |