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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.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/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 4366 matching lines...) Expand 10 before | Expand all | Expand 10 after
4377 __ Bind(&post_runtime); 4377 __ Bind(&post_runtime);
4378 __ Pop(result_register()); 4378 __ Pop(result_register());
4379 EmitReturnSequence(); 4379 EmitReturnSequence();
4380 4380
4381 __ Bind(&resume); 4381 __ Bind(&resume);
4382 context()->Plug(result_register()); 4382 context()->Plug(result_register());
4383 break; 4383 break;
4384 } 4384 }
4385 4385
4386 case Yield::kFinal: { 4386 case Yield::kFinal: {
4387 VisitForAccumulatorValue(expr->generator_object());
4388 __ Mov(x1, Smi::FromInt(JSGeneratorObject::kGeneratorClosed));
4389 __ Str(x1, FieldMemOperand(result_register(),
4390 JSGeneratorObject::kContinuationOffset));
4391 // Pop value from top-of-stack slot, box result into result register. 4387 // Pop value from top-of-stack slot, box result into result register.
4392 EmitCreateIteratorResult(true); 4388 EmitCreateIteratorResult(true);
4393 EmitUnwindBeforeReturn(); 4389 EmitUnwindBeforeReturn();
4394 EmitReturnSequence(); 4390 EmitReturnSequence();
4395 break; 4391 break;
4396 } 4392 }
4397 4393
4398 case Yield::kDelegating: { 4394 case Yield::kDelegating: {
4399 VisitForStackValue(expr->generator_object()); 4395 VisitForStackValue(expr->generator_object());
4400 4396
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
4836 } 4832 }
4837 4833
4838 return INTERRUPT; 4834 return INTERRUPT;
4839 } 4835 }
4840 4836
4841 4837
4842 } // namespace internal 4838 } // namespace internal
4843 } // namespace v8 4839 } // namespace v8
4844 4840
4845 #endif // V8_TARGET_ARCH_ARM64 4841 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698