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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.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/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 __ bind(&post_runtime); 1949 __ bind(&post_runtime);
1950 __ pop(result_register()); 1950 __ pop(result_register());
1951 EmitReturnSequence(); 1951 EmitReturnSequence();
1952 1952
1953 __ bind(&resume); 1953 __ bind(&resume);
1954 context()->Plug(result_register()); 1954 context()->Plug(result_register());
1955 break; 1955 break;
1956 } 1956 }
1957 1957
1958 case Yield::kFinal: { 1958 case Yield::kFinal: {
1959 VisitForAccumulatorValue(expr->generator_object());
1960 __ li(a1, Operand(Smi::FromInt(JSGeneratorObject::kGeneratorClosed)));
1961 __ sd(a1, FieldMemOperand(result_register(),
1962 JSGeneratorObject::kContinuationOffset));
1963 // Pop value from top-of-stack slot, box result into result register. 1959 // Pop value from top-of-stack slot, box result into result register.
1964 EmitCreateIteratorResult(true); 1960 EmitCreateIteratorResult(true);
1965 EmitUnwindBeforeReturn(); 1961 EmitUnwindBeforeReturn();
1966 EmitReturnSequence(); 1962 EmitReturnSequence();
1967 break; 1963 break;
1968 } 1964 }
1969 1965
1970 case Yield::kDelegating: { 1966 case Yield::kDelegating: {
1971 VisitForStackValue(expr->generator_object()); 1967 VisitForStackValue(expr->generator_object());
1972 1968
(...skipping 2845 matching lines...) Expand 10 before | Expand all | Expand 10 after
4818 reinterpret_cast<uint64_t>( 4814 reinterpret_cast<uint64_t>(
4819 isolate->builtins()->OsrAfterStackCheck()->entry())); 4815 isolate->builtins()->OsrAfterStackCheck()->entry()));
4820 return OSR_AFTER_STACK_CHECK; 4816 return OSR_AFTER_STACK_CHECK;
4821 } 4817 }
4822 4818
4823 4819
4824 } // namespace internal 4820 } // namespace internal
4825 } // namespace v8 4821 } // namespace v8
4826 4822
4827 #endif // V8_TARGET_ARCH_MIPS64 4823 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698