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/ia32/full-codegen-ia32.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, 10 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 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_IA32 5 #if V8_TARGET_ARCH_IA32
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 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after
1861 __ bind(&post_runtime); 1861 __ bind(&post_runtime);
1862 __ pop(result_register()); 1862 __ pop(result_register());
1863 EmitReturnSequence(); 1863 EmitReturnSequence();
1864 1864
1865 __ bind(&resume); 1865 __ bind(&resume);
1866 context()->Plug(result_register()); 1866 context()->Plug(result_register());
1867 break; 1867 break;
1868 } 1868 }
1869 1869
1870 case Yield::kFinal: { 1870 case Yield::kFinal: {
1871 VisitForAccumulatorValue(expr->generator_object());
1872 __ mov(FieldOperand(result_register(),
1873 JSGeneratorObject::kContinuationOffset),
1874 Immediate(Smi::FromInt(JSGeneratorObject::kGeneratorClosed)));
1875 // Pop value from top-of-stack slot, box result into result register. 1871 // Pop value from top-of-stack slot, box result into result register.
1876 EmitCreateIteratorResult(true); 1872 EmitCreateIteratorResult(true);
1877 EmitUnwindBeforeReturn(); 1873 EmitUnwindBeforeReturn();
1878 EmitReturnSequence(); 1874 EmitReturnSequence();
1879 break; 1875 break;
1880 } 1876 }
1881 1877
1882 case Yield::kDelegating: { 1878 case Yield::kDelegating: {
1883 VisitForStackValue(expr->generator_object()); 1879 VisitForStackValue(expr->generator_object());
1884 1880
(...skipping 2833 matching lines...) Expand 10 before | Expand all | Expand 10 after
4718 Assembler::target_address_at(call_target_address, 4714 Assembler::target_address_at(call_target_address,
4719 unoptimized_code)); 4715 unoptimized_code));
4720 return OSR_AFTER_STACK_CHECK; 4716 return OSR_AFTER_STACK_CHECK;
4721 } 4717 }
4722 4718
4723 4719
4724 } // namespace internal 4720 } // namespace internal
4725 } // namespace v8 4721 } // namespace v8
4726 4722
4727 #endif // V8_TARGET_ARCH_IA32 4723 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698