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

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

Issue 2079613003: [generators] Implement %GeneratorGetSourcePosition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rename again, and move subtraction to runtime Created 4 years, 6 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/s390/full-codegen-s390.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 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 // this. It stays on the stack while we update the iterator. 1761 // this. It stays on the stack while we update the iterator.
1762 VisitForStackValue(expr->expression()); 1762 VisitForStackValue(expr->expression());
1763 1763
1764 Label suspend, continuation, post_runtime, resume, exception; 1764 Label suspend, continuation, post_runtime, resume, exception;
1765 1765
1766 __ jmp(&suspend); 1766 __ jmp(&suspend);
1767 __ bind(&continuation); 1767 __ bind(&continuation);
1768 // When we arrive here, rax holds the generator object. 1768 // When we arrive here, rax holds the generator object.
1769 __ RecordGeneratorContinuation(); 1769 __ RecordGeneratorContinuation();
1770 __ movp(rbx, FieldOperand(rax, JSGeneratorObject::kResumeModeOffset)); 1770 __ movp(rbx, FieldOperand(rax, JSGeneratorObject::kResumeModeOffset));
1771 __ movp(rax, FieldOperand(rax, JSGeneratorObject::kInputOffset)); 1771 __ movp(rax, FieldOperand(rax, JSGeneratorObject::kInputOrDebugPosOffset));
1772 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); 1772 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn);
1773 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); 1773 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn);
1774 __ SmiCompare(rbx, Smi::FromInt(JSGeneratorObject::kReturn)); 1774 __ SmiCompare(rbx, Smi::FromInt(JSGeneratorObject::kReturn));
1775 __ j(less, &resume); 1775 __ j(less, &resume);
1776 __ Push(result_register()); 1776 __ Push(result_register());
1777 __ j(greater, &exception); 1777 __ j(greater, &exception);
1778 EmitCreateIteratorResult(true); 1778 EmitCreateIteratorResult(true);
1779 EmitUnwindAndReturn(); 1779 EmitUnwindAndReturn();
1780 1780
1781 __ bind(&exception); 1781 __ bind(&exception);
(...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after
3681 DCHECK_EQ( 3681 DCHECK_EQ(
3682 isolate->builtins()->OnStackReplacement()->entry(), 3682 isolate->builtins()->OnStackReplacement()->entry(),
3683 Assembler::target_address_at(call_target_address, unoptimized_code)); 3683 Assembler::target_address_at(call_target_address, unoptimized_code));
3684 return ON_STACK_REPLACEMENT; 3684 return ON_STACK_REPLACEMENT;
3685 } 3685 }
3686 3686
3687 } // namespace internal 3687 } // namespace internal
3688 } // namespace v8 3688 } // namespace v8
3689 3689
3690 #endif // V8_TARGET_ARCH_X64 3690 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/s390/full-codegen-s390.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