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

Side by Side Diff: src/full-codegen/s390/full-codegen-s390.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_S390 5 #if V8_TARGET_ARCH_S390
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 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1818 kLRHasBeenSaved, kDontSaveFPRegs); 1818 kLRHasBeenSaved, kDontSaveFPRegs);
1819 1819
1820 // Load suspended function and context. 1820 // Load suspended function and context.
1821 __ LoadP(cp, FieldMemOperand(r3, JSGeneratorObject::kContextOffset)); 1821 __ LoadP(cp, FieldMemOperand(r3, JSGeneratorObject::kContextOffset));
1822 __ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset)); 1822 __ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset));
1823 1823
1824 // Load receiver and store as the first argument. 1824 // Load receiver and store as the first argument.
1825 __ LoadP(r4, FieldMemOperand(r3, JSGeneratorObject::kReceiverOffset)); 1825 __ LoadP(r4, FieldMemOperand(r3, JSGeneratorObject::kReceiverOffset));
1826 __ push(r4); 1826 __ push(r4);
1827 1827
1828 // Push holes for the rest of the arguments to the generator function. 1828 // Push holes for arguments to generator function. Since the parser forced
1829 // context allocation for any variables in generators, the actual argument
1830 // values have already been copied into the context and these dummy values
1831 // will never be used.
1829 __ LoadP(r5, FieldMemOperand(r6, JSFunction::kSharedFunctionInfoOffset)); 1832 __ LoadP(r5, FieldMemOperand(r6, JSFunction::kSharedFunctionInfoOffset));
1830 __ LoadW( 1833 __ LoadW(
1831 r5, FieldMemOperand(r5, SharedFunctionInfo::kFormalParameterCountOffset)); 1834 r5, FieldMemOperand(r5, SharedFunctionInfo::kFormalParameterCountOffset));
1832 __ LoadRoot(r4, Heap::kTheHoleValueRootIndex); 1835 __ LoadRoot(r4, Heap::kTheHoleValueRootIndex);
1833 Label argument_loop, push_frame; 1836 Label argument_loop, push_frame;
1834 #if V8_TARGET_ARCH_S390X 1837 #if V8_TARGET_ARCH_S390X
1835 __ CmpP(r5, Operand::Zero()); 1838 __ CmpP(r5, Operand::Zero());
1836 __ beq(&push_frame, Label::kNear); 1839 __ beq(&push_frame, Label::kNear);
1837 #else 1840 #else
1838 __ SmiUntag(r5); 1841 __ SmiUntag(r5);
(...skipping 2145 matching lines...) Expand 10 before | Expand all | Expand 10 after
3984 DCHECK(kOSRBranchInstruction == br_instr); 3987 DCHECK(kOSRBranchInstruction == br_instr);
3985 3988
3986 DCHECK(interrupt_address == 3989 DCHECK(interrupt_address ==
3987 isolate->builtins()->OnStackReplacement()->entry()); 3990 isolate->builtins()->OnStackReplacement()->entry());
3988 return ON_STACK_REPLACEMENT; 3991 return ON_STACK_REPLACEMENT;
3989 } 3992 }
3990 3993
3991 } // namespace internal 3994 } // namespace internal
3992 } // namespace v8 3995 } // namespace v8
3993 #endif // V8_TARGET_ARCH_S390 3996 #endif // V8_TARGET_ARCH_S390
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698