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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 kLRHasBeenSaved, kDontSaveFPRegs); 1863 kLRHasBeenSaved, kDontSaveFPRegs);
1864 1864
1865 // Load suspended function and context. 1865 // Load suspended function and context.
1866 __ LoadP(cp, FieldMemOperand(r4, JSGeneratorObject::kContextOffset)); 1866 __ LoadP(cp, FieldMemOperand(r4, JSGeneratorObject::kContextOffset));
1867 __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset)); 1867 __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset));
1868 1868
1869 // Load receiver and store as the first argument. 1869 // Load receiver and store as the first argument.
1870 __ LoadP(r5, FieldMemOperand(r4, JSGeneratorObject::kReceiverOffset)); 1870 __ LoadP(r5, FieldMemOperand(r4, JSGeneratorObject::kReceiverOffset));
1871 __ push(r5); 1871 __ push(r5);
1872 1872
1873 // Push holes for the rest of the arguments to the generator function. 1873 // Push holes for arguments to generator function. Since the parser forced
1874 // context allocation for any variables in generators, the actual argument
1875 // values have already been copied into the context and these dummy values
1876 // will never be used.
1874 __ LoadP(r6, FieldMemOperand(r7, JSFunction::kSharedFunctionInfoOffset)); 1877 __ LoadP(r6, FieldMemOperand(r7, JSFunction::kSharedFunctionInfoOffset));
1875 __ LoadWordArith( 1878 __ LoadWordArith(
1876 r6, FieldMemOperand(r6, SharedFunctionInfo::kFormalParameterCountOffset)); 1879 r6, FieldMemOperand(r6, SharedFunctionInfo::kFormalParameterCountOffset));
1877 __ LoadRoot(r5, Heap::kTheHoleValueRootIndex); 1880 __ LoadRoot(r5, Heap::kTheHoleValueRootIndex);
1878 Label argument_loop, push_frame; 1881 Label argument_loop, push_frame;
1879 #if V8_TARGET_ARCH_PPC64 1882 #if V8_TARGET_ARCH_PPC64
1880 __ cmpi(r6, Operand::Zero()); 1883 __ cmpi(r6, Operand::Zero());
1881 __ beq(&push_frame); 1884 __ beq(&push_frame);
1882 #else 1885 #else
1883 __ SmiUntag(r6, SetRC); 1886 __ SmiUntag(r6, SetRC);
(...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after
4088 4091
4089 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); 4092 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address)));
4090 4093
4091 DCHECK(interrupt_address == 4094 DCHECK(interrupt_address ==
4092 isolate->builtins()->OnStackReplacement()->entry()); 4095 isolate->builtins()->OnStackReplacement()->entry());
4093 return ON_STACK_REPLACEMENT; 4096 return ON_STACK_REPLACEMENT;
4094 } 4097 }
4095 } // namespace internal 4098 } // namespace internal
4096 } // namespace v8 4099 } // namespace v8
4097 #endif // V8_TARGET_ARCH_PPC 4100 #endif // V8_TARGET_ARCH_PPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698