Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 2770003002: Set the current context to the function's context when entering to LAP. (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | test/unittests/api/v8-object-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2818 matching lines...) Expand 10 before | Expand all | Expand 10 after
2829 // return value 2829 // return value
2830 __ Push(scratch); 2830 __ Push(scratch);
2831 // return value default 2831 // return value default
2832 __ Push(scratch); 2832 __ Push(scratch);
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 if (this->is_lazy()) {
2840 // load context from holder
2841 __ movp(scratch, FieldOperand(holder, HeapObject::kMapOffset));
Yuki 2017/03/28 14:16:58 |holder| seems pointing to the receiver object ins
jochen (gone - plz use gerrit) 2017/03/28 14:43:39 is that only the case for your test? In that case,
Yuki 2017/03/29 14:19:41 I only tested with the new unittest. I installed
2842 __ GetMapConstructor(scratch, scratch, context);
2843 __ movp(context, FieldOperand(scratch, JSFunction::kContextOffset));
2844 } else {
2845 // load context from callee
2846 __ movp(context, FieldOperand(callee, JSFunction::kContextOffset));
2847 }
2848
2839 __ movp(scratch, rsp); 2849 __ movp(scratch, rsp);
2840 // Push return address back on stack. 2850 // Push return address back on stack.
2841 __ PushReturnAddressFrom(return_address); 2851 __ PushReturnAddressFrom(return_address);
2842 2852
2843 if (!this->is_lazy()) {
2844 // load context from callee
2845 __ movp(context, FieldOperand(callee, JSFunction::kContextOffset));
2846 }
2847
2848 // Allocate the v8::Arguments structure in the arguments' space since 2853 // Allocate the v8::Arguments structure in the arguments' space since
2849 // it's not controlled by GC. 2854 // it's not controlled by GC.
2850 const int kApiStackSpace = 3; 2855 const int kApiStackSpace = 3;
2851 2856
2852 PrepareCallApiFunction(masm, kApiStackSpace); 2857 PrepareCallApiFunction(masm, kApiStackSpace);
2853 2858
2854 // FunctionCallbackInfo::implicit_args_. 2859 // FunctionCallbackInfo::implicit_args_.
2855 int argc = this->argc(); 2860 int argc = this->argc();
2856 __ movp(StackSpaceOperand(0), scratch); 2861 __ movp(StackSpaceOperand(0), scratch);
2857 __ addp(scratch, Immediate((argc + FCA::kArgsLength - 1) * kPointerSize)); 2862 __ addp(scratch, Immediate((argc + FCA::kArgsLength - 1) * kPointerSize));
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2975 kStackUnwindSpace, nullptr, return_value_operand, 2980 kStackUnwindSpace, nullptr, return_value_operand,
2976 NULL); 2981 NULL);
2977 } 2982 }
2978 2983
2979 #undef __ 2984 #undef __
2980 2985
2981 } // namespace internal 2986 } // namespace internal
2982 } // namespace v8 2987 } // namespace v8
2983 2988
2984 #endif // V8_TARGET_ARCH_X64 2989 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/unittests/api/v8-object-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698