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

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

Issue 1620253003: Implement the function.sent proposal. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add TODO Created 4 years, 11 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 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 Expression* generator, Expression* value, 2034 Expression* generator, Expression* value,
2035 JSGeneratorObject::ResumeMode resume_mode) { 2035 JSGeneratorObject::ResumeMode resume_mode) {
2036 // The value stays in r3, and is ultimately read by the resumed generator, as 2036 // The value stays in r3, and is ultimately read by the resumed generator, as
2037 // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it 2037 // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it
2038 // is read to throw the value when the resumed generator is already closed. 2038 // is read to throw the value when the resumed generator is already closed.
2039 // r4 will hold the generator object until the activation has been resumed. 2039 // r4 will hold the generator object until the activation has been resumed.
2040 VisitForStackValue(generator); 2040 VisitForStackValue(generator);
2041 VisitForAccumulatorValue(value); 2041 VisitForAccumulatorValue(value);
2042 __ pop(r4); 2042 __ pop(r4);
2043 2043
2044 // Store input value into generator object.
2045 __ StoreP(result_register(),
2046 FieldMemOperand(r4, JSGeneratorObject::kInputOffset));
2047 __ mr(r5, result_register());
2048 __ RecordWriteField(r4, JSGeneratorObject::kInputOffset, r5, r6,
2049 kLRHasBeenSaved, kDontSaveFPRegs);
2050
2044 // Load suspended function and context. 2051 // Load suspended function and context.
2045 __ LoadP(cp, FieldMemOperand(r4, JSGeneratorObject::kContextOffset)); 2052 __ LoadP(cp, FieldMemOperand(r4, JSGeneratorObject::kContextOffset));
2046 __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset)); 2053 __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset));
2047 2054
2048 // Load receiver and store as the first argument. 2055 // Load receiver and store as the first argument.
2049 __ LoadP(r5, FieldMemOperand(r4, JSGeneratorObject::kReceiverOffset)); 2056 __ LoadP(r5, FieldMemOperand(r4, JSGeneratorObject::kReceiverOffset));
2050 __ push(r5); 2057 __ push(r5);
2051 2058
2052 // Push holes for the rest of the arguments to the generator function. 2059 // Push holes for the rest of the arguments to the generator function.
2053 __ LoadP(r6, FieldMemOperand(r7, JSFunction::kSharedFunctionInfoOffset)); 2060 __ LoadP(r6, FieldMemOperand(r7, JSFunction::kSharedFunctionInfoOffset));
(...skipping 2732 matching lines...) Expand 10 before | Expand all | Expand 10 after
4786 return ON_STACK_REPLACEMENT; 4793 return ON_STACK_REPLACEMENT;
4787 } 4794 }
4788 4795
4789 DCHECK(interrupt_address == 4796 DCHECK(interrupt_address ==
4790 isolate->builtins()->OsrAfterStackCheck()->entry()); 4797 isolate->builtins()->OsrAfterStackCheck()->entry());
4791 return OSR_AFTER_STACK_CHECK; 4798 return OSR_AFTER_STACK_CHECK;
4792 } 4799 }
4793 } // namespace internal 4800 } // namespace internal
4794 } // namespace v8 4801 } // namespace v8
4795 #endif // V8_TARGET_ARCH_PPC 4802 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698