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

Side by Side Diff: src/full-codegen/mips/full-codegen-mips.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
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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 1937 matching lines...) Expand 10 before | Expand all | Expand 10 after
1948 __ bind(&post_runtime); 1948 __ bind(&post_runtime);
1949 __ pop(result_register()); 1949 __ pop(result_register());
1950 EmitReturnSequence(); 1950 EmitReturnSequence();
1951 1951
1952 __ bind(&resume); 1952 __ bind(&resume);
1953 context()->Plug(result_register()); 1953 context()->Plug(result_register());
1954 break; 1954 break;
1955 } 1955 }
1956 1956
1957 case Yield::kFinal: { 1957 case Yield::kFinal: {
1958 VisitForAccumulatorValue(expr->generator_object());
1959 __ li(a1, Operand(Smi::FromInt(JSGeneratorObject::kGeneratorClosed)));
1960 __ sw(a1, FieldMemOperand(result_register(),
1961 JSGeneratorObject::kContinuationOffset));
1962 // Pop value from top-of-stack slot, box result into result register. 1958 // Pop value from top-of-stack slot, box result into result register.
1963 EmitCreateIteratorResult(true); 1959 EmitCreateIteratorResult(true);
1964 EmitUnwindBeforeReturn(); 1960 EmitUnwindBeforeReturn();
1965 EmitReturnSequence(); 1961 EmitReturnSequence();
1966 break; 1962 break;
1967 } 1963 }
1968 1964
1969 case Yield::kDelegating: { 1965 case Yield::kDelegating: {
1970 VisitForStackValue(expr->generator_object()); 1966 VisitForStackValue(expr->generator_object());
1971 1967
(...skipping 2831 matching lines...) Expand 10 before | Expand all | Expand 10 after
4803 reinterpret_cast<uint32_t>( 4799 reinterpret_cast<uint32_t>(
4804 isolate->builtins()->OsrAfterStackCheck()->entry())); 4800 isolate->builtins()->OsrAfterStackCheck()->entry()));
4805 return OSR_AFTER_STACK_CHECK; 4801 return OSR_AFTER_STACK_CHECK;
4806 } 4802 }
4807 4803
4808 4804
4809 } // namespace internal 4805 } // namespace internal
4810 } // namespace v8 4806 } // namespace v8
4811 4807
4812 #endif // V8_TARGET_ARCH_MIPS 4808 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698