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/mips/full-codegen-mips.cc

Issue 1235603002: Debugger: make debug code on-stack replacement more robust. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix arm64 Created 5 years, 5 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 2134 matching lines...) Expand 10 before | Expand all | Expand 10 after
2145 switch (expr->yield_kind()) { 2145 switch (expr->yield_kind()) {
2146 case Yield::kSuspend: 2146 case Yield::kSuspend:
2147 // Pop value from top-of-stack slot; box result into result register. 2147 // Pop value from top-of-stack slot; box result into result register.
2148 EmitCreateIteratorResult(false); 2148 EmitCreateIteratorResult(false);
2149 __ push(result_register()); 2149 __ push(result_register());
2150 // Fall through. 2150 // Fall through.
2151 case Yield::kInitial: { 2151 case Yield::kInitial: {
2152 Label suspend, continuation, post_runtime, resume; 2152 Label suspend, continuation, post_runtime, resume;
2153 2153
2154 __ jmp(&suspend); 2154 __ jmp(&suspend);
2155
2156 __ bind(&continuation); 2155 __ bind(&continuation);
2156 __ RecordGeneratorContinuation();
2157 __ jmp(&resume); 2157 __ jmp(&resume);
2158 2158
2159 __ bind(&suspend); 2159 __ bind(&suspend);
2160 VisitForAccumulatorValue(expr->generator_object()); 2160 VisitForAccumulatorValue(expr->generator_object());
2161 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos())); 2161 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos()));
2162 __ li(a1, Operand(Smi::FromInt(continuation.pos()))); 2162 __ li(a1, Operand(Smi::FromInt(continuation.pos())));
2163 __ sw(a1, FieldMemOperand(v0, JSGeneratorObject::kContinuationOffset)); 2163 __ sw(a1, FieldMemOperand(v0, JSGeneratorObject::kContinuationOffset));
2164 __ sw(cp, FieldMemOperand(v0, JSGeneratorObject::kContextOffset)); 2164 __ sw(cp, FieldMemOperand(v0, JSGeneratorObject::kContextOffset));
2165 __ mov(a1, cp); 2165 __ mov(a1, cp);
2166 __ RecordWriteField(v0, JSGeneratorObject::kContextOffset, a1, a2, 2166 __ RecordWriteField(v0, JSGeneratorObject::kContextOffset, a1, a2,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 2217
2218 // try { received = %yield result } 2218 // try { received = %yield result }
2219 // Shuffle the received result above a try handler and yield it without 2219 // Shuffle the received result above a try handler and yield it without
2220 // re-boxing. 2220 // re-boxing.
2221 __ bind(&l_try); 2221 __ bind(&l_try);
2222 __ pop(a0); // result 2222 __ pop(a0); // result
2223 int handler_index = NewHandlerTableEntry(); 2223 int handler_index = NewHandlerTableEntry();
2224 EnterTryBlock(handler_index, &l_catch); 2224 EnterTryBlock(handler_index, &l_catch);
2225 const int try_block_size = TryCatch::kElementCount * kPointerSize; 2225 const int try_block_size = TryCatch::kElementCount * kPointerSize;
2226 __ push(a0); // result 2226 __ push(a0); // result
2227
2227 __ jmp(&l_suspend); 2228 __ jmp(&l_suspend);
2228 __ bind(&l_continuation); 2229 __ bind(&l_continuation);
2230 __ RecordGeneratorContinuation();
2229 __ mov(a0, v0); 2231 __ mov(a0, v0);
2230 __ jmp(&l_resume); 2232 __ jmp(&l_resume);
2233
2231 __ bind(&l_suspend); 2234 __ bind(&l_suspend);
2232 const int generator_object_depth = kPointerSize + try_block_size; 2235 const int generator_object_depth = kPointerSize + try_block_size;
2233 __ lw(a0, MemOperand(sp, generator_object_depth)); 2236 __ lw(a0, MemOperand(sp, generator_object_depth));
2234 __ push(a0); // g 2237 __ push(a0); // g
2235 __ Push(Smi::FromInt(handler_index)); // handler-index 2238 __ Push(Smi::FromInt(handler_index)); // handler-index
2236 DCHECK(l_continuation.pos() > 0 && Smi::IsValid(l_continuation.pos())); 2239 DCHECK(l_continuation.pos() > 0 && Smi::IsValid(l_continuation.pos()));
2237 __ li(a1, Operand(Smi::FromInt(l_continuation.pos()))); 2240 __ li(a1, Operand(Smi::FromInt(l_continuation.pos())));
2238 __ sw(a1, FieldMemOperand(a0, JSGeneratorObject::kContinuationOffset)); 2241 __ sw(a1, FieldMemOperand(a0, JSGeneratorObject::kContinuationOffset));
2239 __ sw(cp, FieldMemOperand(a0, JSGeneratorObject::kContextOffset)); 2242 __ sw(cp, FieldMemOperand(a0, JSGeneratorObject::kContextOffset));
2240 __ mov(a1, cp); 2243 __ mov(a1, cp);
(...skipping 3310 matching lines...) Expand 10 before | Expand all | Expand 10 after
5551 reinterpret_cast<uint32_t>( 5554 reinterpret_cast<uint32_t>(
5552 isolate->builtins()->OsrAfterStackCheck()->entry())); 5555 isolate->builtins()->OsrAfterStackCheck()->entry()));
5553 return OSR_AFTER_STACK_CHECK; 5556 return OSR_AFTER_STACK_CHECK;
5554 } 5557 }
5555 5558
5556 5559
5557 } // namespace internal 5560 } // namespace internal
5558 } // namespace v8 5561 } // namespace v8
5559 5562
5560 #endif // V8_TARGET_ARCH_MIPS 5563 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« src/debug.cc ('K') | « src/mips/assembler-mips.h ('k') | src/mips64/assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698