| 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 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 3648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3659 __ j(equal, &function); | 3659 __ j(equal, &function); |
| 3660 | 3660 |
| 3661 __ CmpInstanceType(rax, LAST_SPEC_OBJECT_TYPE); | 3661 __ CmpInstanceType(rax, LAST_SPEC_OBJECT_TYPE); |
| 3662 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == | 3662 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == |
| 3663 LAST_SPEC_OBJECT_TYPE - 1); | 3663 LAST_SPEC_OBJECT_TYPE - 1); |
| 3664 __ j(equal, &function); | 3664 __ j(equal, &function); |
| 3665 // Assume that there is no larger type. | 3665 // Assume that there is no larger type. |
| 3666 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); | 3666 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); |
| 3667 | 3667 |
| 3668 // Check if the constructor in the map is a JS function. | 3668 // Check if the constructor in the map is a JS function. |
| 3669 __ movp(rax, FieldOperand(rax, Map::kConstructorOffset)); | 3669 __ GetMapConstructor(rax, rax, rbx); |
| 3670 __ CmpObjectType(rax, JS_FUNCTION_TYPE, rbx); | 3670 __ CmpInstanceType(rbx, JS_FUNCTION_TYPE); |
| 3671 __ j(not_equal, &non_function_constructor); | 3671 __ j(not_equal, &non_function_constructor); |
| 3672 | 3672 |
| 3673 // rax now contains the constructor function. Grab the | 3673 // rax now contains the constructor function. Grab the |
| 3674 // instance class name from there. | 3674 // instance class name from there. |
| 3675 __ movp(rax, FieldOperand(rax, JSFunction::kSharedFunctionInfoOffset)); | 3675 __ movp(rax, FieldOperand(rax, JSFunction::kSharedFunctionInfoOffset)); |
| 3676 __ movp(rax, FieldOperand(rax, SharedFunctionInfo::kInstanceClassNameOffset)); | 3676 __ movp(rax, FieldOperand(rax, SharedFunctionInfo::kInstanceClassNameOffset)); |
| 3677 __ jmp(&done); | 3677 __ jmp(&done); |
| 3678 | 3678 |
| 3679 // Functions have class 'Function'. | 3679 // Functions have class 'Function'. |
| 3680 __ bind(&function); | 3680 __ bind(&function); |
| (...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5387 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5387 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5388 Assembler::target_address_at(call_target_address, | 5388 Assembler::target_address_at(call_target_address, |
| 5389 unoptimized_code)); | 5389 unoptimized_code)); |
| 5390 return OSR_AFTER_STACK_CHECK; | 5390 return OSR_AFTER_STACK_CHECK; |
| 5391 } | 5391 } |
| 5392 | 5392 |
| 5393 | 5393 |
| 5394 } } // namespace v8::internal | 5394 } } // namespace v8::internal |
| 5395 | 5395 |
| 5396 #endif // V8_TARGET_ARCH_X64 | 5396 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |