Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/api-arguments.h" | 7 #include "src/api-arguments.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 2822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2833 // isolate | 2833 // isolate |
| 2834 __ Move(scratch, ExternalReference::isolate_address(masm->isolate())); | 2834 __ Move(scratch, ExternalReference::isolate_address(masm->isolate())); |
| 2835 __ Push(scratch); | 2835 __ Push(scratch); |
| 2836 // holder | 2836 // holder |
| 2837 __ Push(holder); | 2837 __ Push(holder); |
| 2838 | 2838 |
| 2839 __ movp(scratch, rsp); | 2839 __ movp(scratch, rsp); |
| 2840 // Push return address back on stack. | 2840 // Push return address back on stack. |
| 2841 __ PushReturnAddressFrom(return_address); | 2841 __ PushReturnAddressFrom(return_address); |
| 2842 | 2842 |
| 2843 if (!this->is_lazy()) { | 2843 if (this->is_lazy()) { |
|
jochen (gone - plz use gerrit)
2017/03/24 15:10:15
you could move this entire block before like 2839,
Yuki
2017/03/28 14:16:58
Done.
| |
| 2844 // load context from holder | |
| 2845 Register temp = rax; | |
| 2846 __ movp(temp, FieldOperand(holder, HeapObject::kMapOffset)); | |
| 2847 __ GetMapConstructor(temp, temp, context); | |
| 2848 __ movp(context, FieldOperand(temp, JSFunction::kContextOffset)); | |
| 2849 } else { | |
| 2844 // load context from callee | 2850 // load context from callee |
| 2845 __ movp(context, FieldOperand(callee, JSFunction::kContextOffset)); | 2851 __ movp(context, FieldOperand(callee, JSFunction::kContextOffset)); |
| 2846 } | 2852 } |
| 2847 | 2853 |
| 2848 // Allocate the v8::Arguments structure in the arguments' space since | 2854 // Allocate the v8::Arguments structure in the arguments' space since |
| 2849 // it's not controlled by GC. | 2855 // it's not controlled by GC. |
| 2850 const int kApiStackSpace = 3; | 2856 const int kApiStackSpace = 3; |
| 2851 | 2857 |
| 2852 PrepareCallApiFunction(masm, kApiStackSpace); | 2858 PrepareCallApiFunction(masm, kApiStackSpace); |
| 2853 | 2859 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2975 kStackUnwindSpace, nullptr, return_value_operand, | 2981 kStackUnwindSpace, nullptr, return_value_operand, |
| 2976 NULL); | 2982 NULL); |
| 2977 } | 2983 } |
| 2978 | 2984 |
| 2979 #undef __ | 2985 #undef __ |
| 2980 | 2986 |
| 2981 } // namespace internal | 2987 } // namespace internal |
| 2982 } // namespace v8 | 2988 } // namespace v8 |
| 2983 | 2989 |
| 2984 #endif // V8_TARGET_ARCH_X64 | 2990 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |