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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 3206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3217 __ JumpIfSmi(eax, &null); | 3217 __ JumpIfSmi(eax, &null); |
3218 | 3218 |
3219 // Check that the object is a JS object but take special care of JS | 3219 // Check that the object is a JS object but take special care of JS |
3220 // functions to make sure they have 'Function' as their class. | 3220 // functions to make sure they have 'Function' as their class. |
3221 // Assume that there are only two callable types, and one of them is at | 3221 // Assume that there are only two callable types, and one of them is at |
3222 // either end of the type range for JS object types. Saves extra comparisons. | 3222 // either end of the type range for JS object types. Saves extra comparisons. |
3223 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); | 3223 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); |
3224 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, eax); | 3224 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, eax); |
3225 // Map is now in eax. | 3225 // Map is now in eax. |
3226 __ j(below, &null); | 3226 __ j(below, &null); |
3227 STATIC_ASSERT(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE == | |
3228 FIRST_JS_RECEIVER_TYPE + 1); | |
3229 __ j(equal, &function); | |
3230 | 3227 |
3231 __ CmpInstanceType(eax, LAST_JS_RECEIVER_TYPE); | 3228 __ CmpInstanceType(eax, LAST_JS_RECEIVER_TYPE); |
3232 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == | 3229 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == |
3233 LAST_JS_RECEIVER_TYPE - 1); | 3230 LAST_JS_RECEIVER_TYPE - 1); |
3234 __ j(equal, &function); | 3231 __ j(equal, &function); |
3235 // Assume that there is no larger type. | 3232 // Assume that there is no larger type. |
3236 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); | 3233 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); |
3237 | 3234 |
3238 // Check if the constructor in the map is a JS function. | 3235 // Check if the constructor in the map is a JS function. |
3239 __ GetMapConstructor(eax, eax, ebx); | 3236 __ GetMapConstructor(eax, eax, ebx); |
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4824 Assembler::target_address_at(call_target_address, | 4821 Assembler::target_address_at(call_target_address, |
4825 unoptimized_code)); | 4822 unoptimized_code)); |
4826 return OSR_AFTER_STACK_CHECK; | 4823 return OSR_AFTER_STACK_CHECK; |
4827 } | 4824 } |
4828 | 4825 |
4829 | 4826 |
4830 } // namespace internal | 4827 } // namespace internal |
4831 } // namespace v8 | 4828 } // namespace v8 |
4832 | 4829 |
4833 #endif // V8_TARGET_ARCH_IA32 | 4830 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |