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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 1806293002: [generators] Add some explanation on forcing context allocation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 3826 matching lines...) Expand 10 before | Expand all | Expand 10 after
3837 __ Ldr(cp, FieldMemOperand(generator_object, 3837 __ Ldr(cp, FieldMemOperand(generator_object,
3838 JSGeneratorObject::kContextOffset)); 3838 JSGeneratorObject::kContextOffset));
3839 __ Ldr(function, FieldMemOperand(generator_object, 3839 __ Ldr(function, FieldMemOperand(generator_object,
3840 JSGeneratorObject::kFunctionOffset)); 3840 JSGeneratorObject::kFunctionOffset));
3841 3841
3842 // Load receiver and store as the first argument. 3842 // Load receiver and store as the first argument.
3843 __ Ldr(x10, FieldMemOperand(generator_object, 3843 __ Ldr(x10, FieldMemOperand(generator_object,
3844 JSGeneratorObject::kReceiverOffset)); 3844 JSGeneratorObject::kReceiverOffset));
3845 __ Push(x10); 3845 __ Push(x10);
3846 3846
3847 // Push holes for the rest of the arguments to the generator function. 3847 // Push holes for arguments to generator function. Since the parser forced
3848 // context allocation for any variables in generators, the actual argument
3849 // values have already been copied into the context and these dummy values
3850 // will never be used.
3848 __ Ldr(x10, FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset)); 3851 __ Ldr(x10, FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset));
3849 3852
3850 // The number of arguments is stored as an int32_t, and -1 is a marker 3853 // The number of arguments is stored as an int32_t, and -1 is a marker
3851 // (SharedFunctionInfo::kDontAdaptArgumentsSentinel), so we need sign 3854 // (SharedFunctionInfo::kDontAdaptArgumentsSentinel), so we need sign
3852 // extension to correctly handle it. However, in this case, we operate on 3855 // extension to correctly handle it. However, in this case, we operate on
3853 // 32-bit W registers, so extension isn't required. 3856 // 32-bit W registers, so extension isn't required.
3854 __ Ldr(w10, FieldMemOperand(x10, 3857 __ Ldr(w10, FieldMemOperand(x10,
3855 SharedFunctionInfo::kFormalParameterCountOffset)); 3858 SharedFunctionInfo::kFormalParameterCountOffset));
3856 __ LoadRoot(the_hole, Heap::kTheHoleValueRootIndex); 3859 __ LoadRoot(the_hole, Heap::kTheHoleValueRootIndex);
3857 __ PushMultipleTimes(the_hole, w10); 3860 __ PushMultipleTimes(the_hole, w10);
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
4168 } 4171 }
4169 4172
4170 return INTERRUPT; 4173 return INTERRUPT;
4171 } 4174 }
4172 4175
4173 4176
4174 } // namespace internal 4177 } // namespace internal
4175 } // namespace v8 4178 } // namespace v8
4176 4179
4177 #endif // V8_TARGET_ARCH_ARM64 4180 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698