| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 3649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3660 __ j(equal, &function); | 3660 __ j(equal, &function); |
| 3661 | 3661 |
| 3662 __ CmpInstanceType(eax, LAST_SPEC_OBJECT_TYPE); | 3662 __ CmpInstanceType(eax, LAST_SPEC_OBJECT_TYPE); |
| 3663 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == | 3663 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == |
| 3664 LAST_SPEC_OBJECT_TYPE - 1); | 3664 LAST_SPEC_OBJECT_TYPE - 1); |
| 3665 __ j(equal, &function); | 3665 __ j(equal, &function); |
| 3666 // Assume that there is no larger type. | 3666 // Assume that there is no larger type. |
| 3667 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); | 3667 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); |
| 3668 | 3668 |
| 3669 // Check if the constructor in the map is a JS function. | 3669 // Check if the constructor in the map is a JS function. |
| 3670 __ mov(eax, FieldOperand(eax, Map::kConstructorOffset)); | 3670 __ GetMapConstructor(eax, eax, ebx); |
| 3671 __ CmpObjectType(eax, JS_FUNCTION_TYPE, ebx); | 3671 __ CmpInstanceType(ebx, JS_FUNCTION_TYPE); |
| 3672 __ j(not_equal, &non_function_constructor); | 3672 __ j(not_equal, &non_function_constructor); |
| 3673 | 3673 |
| 3674 // eax now contains the constructor function. Grab the | 3674 // eax now contains the constructor function. Grab the |
| 3675 // instance class name from there. | 3675 // instance class name from there. |
| 3676 __ mov(eax, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset)); | 3676 __ mov(eax, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset)); |
| 3677 __ mov(eax, FieldOperand(eax, SharedFunctionInfo::kInstanceClassNameOffset)); | 3677 __ mov(eax, FieldOperand(eax, SharedFunctionInfo::kInstanceClassNameOffset)); |
| 3678 __ jmp(&done); | 3678 __ jmp(&done); |
| 3679 | 3679 |
| 3680 // Functions have class 'Function'. | 3680 // Functions have class 'Function'. |
| 3681 __ bind(&function); | 3681 __ bind(&function); |
| (...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5366 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5366 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5367 Assembler::target_address_at(call_target_address, | 5367 Assembler::target_address_at(call_target_address, |
| 5368 unoptimized_code)); | 5368 unoptimized_code)); |
| 5369 return OSR_AFTER_STACK_CHECK; | 5369 return OSR_AFTER_STACK_CHECK; |
| 5370 } | 5370 } |
| 5371 | 5371 |
| 5372 | 5372 |
| 5373 } } // namespace v8::internal | 5373 } } // namespace v8::internal |
| 5374 | 5374 |
| 5375 #endif // V8_TARGET_ARCH_IA32 | 5375 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |