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

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

Issue 1634553002: Fix bug where generators got closed prematurely. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. 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 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 1884
1885 __ Pop(result_register()); 1885 __ Pop(result_register());
1886 EmitReturnSequence(); 1886 EmitReturnSequence();
1887 1887
1888 __ bind(&resume); 1888 __ bind(&resume);
1889 context()->Plug(result_register()); 1889 context()->Plug(result_register());
1890 break; 1890 break;
1891 } 1891 }
1892 1892
1893 case Yield::kFinal: { 1893 case Yield::kFinal: {
1894 VisitForAccumulatorValue(expr->generator_object());
1895 __ Move(FieldOperand(result_register(),
1896 JSGeneratorObject::kContinuationOffset),
1897 Smi::FromInt(JSGeneratorObject::kGeneratorClosed));
1898 // Pop value from top-of-stack slot, box result into result register. 1894 // Pop value from top-of-stack slot, box result into result register.
1899 EmitCreateIteratorResult(true); 1895 EmitCreateIteratorResult(true);
1900 EmitUnwindBeforeReturn(); 1896 EmitUnwindBeforeReturn();
1901 EmitReturnSequence(); 1897 EmitReturnSequence();
1902 break; 1898 break;
1903 } 1899 }
1904 1900
1905 case Yield::kDelegating: { 1901 case Yield::kDelegating: {
1906 VisitForStackValue(expr->generator_object()); 1902 VisitForStackValue(expr->generator_object());
1907 1903
(...skipping 2812 matching lines...) Expand 10 before | Expand all | Expand 10 after
4720 Assembler::target_address_at(call_target_address, 4716 Assembler::target_address_at(call_target_address,
4721 unoptimized_code)); 4717 unoptimized_code));
4722 return OSR_AFTER_STACK_CHECK; 4718 return OSR_AFTER_STACK_CHECK;
4723 } 4719 }
4724 4720
4725 4721
4726 } // namespace internal 4722 } // namespace internal
4727 } // namespace v8 4723 } // namespace v8
4728 4724
4729 #endif // V8_TARGET_ARCH_X64 4725 #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