| 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 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 3634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3645 __ j(equal, &function); | 3645 __ j(equal, &function); |
| 3646 | 3646 |
| 3647 __ CmpInstanceType(eax, LAST_SPEC_OBJECT_TYPE); | 3647 __ CmpInstanceType(eax, LAST_SPEC_OBJECT_TYPE); |
| 3648 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == | 3648 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == |
| 3649 LAST_SPEC_OBJECT_TYPE - 1); | 3649 LAST_SPEC_OBJECT_TYPE - 1); |
| 3650 __ j(equal, &function); | 3650 __ j(equal, &function); |
| 3651 // Assume that there is no larger type. | 3651 // Assume that there is no larger type. |
| 3652 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); | 3652 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); |
| 3653 | 3653 |
| 3654 // Check if the constructor in the map is a JS function. | 3654 // Check if the constructor in the map is a JS function. |
| 3655 __ mov(eax, FieldOperand(eax, Map::kConstructorOffset)); | 3655 __ GetMapConstructor(eax, eax, ebx); |
| 3656 __ CmpObjectType(eax, JS_FUNCTION_TYPE, ebx); | 3656 __ CmpInstanceType(ebx, JS_FUNCTION_TYPE); |
| 3657 __ j(not_equal, &non_function_constructor); | 3657 __ j(not_equal, &non_function_constructor); |
| 3658 | 3658 |
| 3659 // eax now contains the constructor function. Grab the | 3659 // eax now contains the constructor function. Grab the |
| 3660 // instance class name from there. | 3660 // instance class name from there. |
| 3661 __ mov(eax, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset)); | 3661 __ mov(eax, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset)); |
| 3662 __ mov(eax, FieldOperand(eax, SharedFunctionInfo::kInstanceClassNameOffset)); | 3662 __ mov(eax, FieldOperand(eax, SharedFunctionInfo::kInstanceClassNameOffset)); |
| 3663 __ jmp(&done); | 3663 __ jmp(&done); |
| 3664 | 3664 |
| 3665 // Functions have class 'Function'. | 3665 // Functions have class 'Function'. |
| 3666 __ bind(&function); | 3666 __ bind(&function); |
| (...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5350 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5350 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5351 Assembler::target_address_at(call_target_address, | 5351 Assembler::target_address_at(call_target_address, |
| 5352 unoptimized_code)); | 5352 unoptimized_code)); |
| 5353 return OSR_AFTER_STACK_CHECK; | 5353 return OSR_AFTER_STACK_CHECK; |
| 5354 } | 5354 } |
| 5355 | 5355 |
| 5356 | 5356 |
| 5357 } } // namespace v8::internal | 5357 } } // namespace v8::internal |
| 5358 | 5358 |
| 5359 #endif // V8_TARGET_ARCH_X87 | 5359 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |