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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.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
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/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 2003 matching lines...) Expand 10 before | Expand all | Expand 10 after
2014 Expression *value, 2014 Expression *value,
2015 JSGeneratorObject::ResumeMode resume_mode) { 2015 JSGeneratorObject::ResumeMode resume_mode) {
2016 // The value stays in rax, and is ultimately read by the resumed generator, as 2016 // The value stays in rax, and is ultimately read by the resumed generator, as
2017 // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it 2017 // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it
2018 // is read to throw the value when the resumed generator is already closed. 2018 // is read to throw the value when the resumed generator is already closed.
2019 // rbx will hold the generator object until the activation has been resumed. 2019 // rbx will hold the generator object until the activation has been resumed.
2020 VisitForStackValue(generator); 2020 VisitForStackValue(generator);
2021 VisitForAccumulatorValue(value); 2021 VisitForAccumulatorValue(value);
2022 __ Pop(rbx); 2022 __ Pop(rbx);
2023 2023
2024 // Store input value into generator object.
2025 __ movp(FieldOperand(rbx, JSGeneratorObject::kInputOffset),
2026 result_register());
2027 __ movp(rcx, result_register());
2028 __ RecordWriteField(rbx, JSGeneratorObject::kInputOffset, rcx, rdx,
2029 kDontSaveFPRegs);
2030
2024 // Load suspended function and context. 2031 // Load suspended function and context.
2025 __ movp(rsi, FieldOperand(rbx, JSGeneratorObject::kContextOffset)); 2032 __ movp(rsi, FieldOperand(rbx, JSGeneratorObject::kContextOffset));
2026 __ movp(rdi, FieldOperand(rbx, JSGeneratorObject::kFunctionOffset)); 2033 __ movp(rdi, FieldOperand(rbx, JSGeneratorObject::kFunctionOffset));
2027 2034
2028 // Push receiver. 2035 // Push receiver.
2029 __ Push(FieldOperand(rbx, JSGeneratorObject::kReceiverOffset)); 2036 __ Push(FieldOperand(rbx, JSGeneratorObject::kReceiverOffset));
2030 2037
2031 // Push holes for arguments to generator function. 2038 // Push holes for arguments to generator function.
2032 __ movp(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); 2039 __ movp(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
2033 __ LoadSharedFunctionInfoSpecialField(rdx, rdx, 2040 __ LoadSharedFunctionInfoSpecialField(rdx, rdx,
(...skipping 2684 matching lines...) Expand 10 before | Expand all | Expand 10 after
4718 Assembler::target_address_at(call_target_address, 4725 Assembler::target_address_at(call_target_address,
4719 unoptimized_code)); 4726 unoptimized_code));
4720 return OSR_AFTER_STACK_CHECK; 4727 return OSR_AFTER_STACK_CHECK;
4721 } 4728 }
4722 4729
4723 4730
4724 } // namespace internal 4731 } // namespace internal
4725 } // namespace v8 4732 } // namespace v8
4726 4733
4727 #endif // V8_TARGET_ARCH_X64 4734 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698