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

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

Issue 2079613003: [generators] Implement %GeneratorGetSourcePosition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rename again, and move subtraction to runtime Created 4 years, 6 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 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after
1816 // this. It stays on the stack while we update the iterator. 1816 // this. It stays on the stack while we update the iterator.
1817 VisitForStackValue(expr->expression()); 1817 VisitForStackValue(expr->expression());
1818 1818
1819 Label suspend, continuation, post_runtime, resume, exception; 1819 Label suspend, continuation, post_runtime, resume, exception;
1820 1820
1821 __ jmp(&suspend); 1821 __ jmp(&suspend);
1822 __ bind(&continuation); 1822 __ bind(&continuation);
1823 // When we arrive here, v0 holds the generator object. 1823 // When we arrive here, v0 holds the generator object.
1824 __ RecordGeneratorContinuation(); 1824 __ RecordGeneratorContinuation();
1825 __ lw(a1, FieldMemOperand(v0, JSGeneratorObject::kResumeModeOffset)); 1825 __ lw(a1, FieldMemOperand(v0, JSGeneratorObject::kResumeModeOffset));
1826 __ lw(v0, FieldMemOperand(v0, JSGeneratorObject::kInputOffset)); 1826 __ lw(v0, FieldMemOperand(v0, JSGeneratorObject::kInputOrDebugPosOffset));
1827 __ Branch(&resume, eq, a1, Operand(Smi::FromInt(JSGeneratorObject::kNext))); 1827 __ Branch(&resume, eq, a1, Operand(Smi::FromInt(JSGeneratorObject::kNext)));
1828 __ Push(result_register()); 1828 __ Push(result_register());
1829 __ Branch(&exception, eq, a1, 1829 __ Branch(&exception, eq, a1,
1830 Operand(Smi::FromInt(JSGeneratorObject::kThrow))); 1830 Operand(Smi::FromInt(JSGeneratorObject::kThrow)));
1831 EmitCreateIteratorResult(true); 1831 EmitCreateIteratorResult(true);
1832 EmitUnwindAndReturn(); 1832 EmitUnwindAndReturn();
1833 1833
1834 __ bind(&exception); 1834 __ bind(&exception);
1835 __ CallRuntime(Runtime::kThrow); 1835 __ CallRuntime(Runtime::kThrow);
1836 1836
(...skipping 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after
3804 reinterpret_cast<uint32_t>( 3804 reinterpret_cast<uint32_t>(
3805 isolate->builtins()->OnStackReplacement()->entry())); 3805 isolate->builtins()->OnStackReplacement()->entry()));
3806 return ON_STACK_REPLACEMENT; 3806 return ON_STACK_REPLACEMENT;
3807 } 3807 }
3808 3808
3809 3809
3810 } // namespace internal 3810 } // namespace internal
3811 } // namespace v8 3811 } // namespace v8
3812 3812
3813 #endif // V8_TARGET_ARCH_MIPS 3813 #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