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

Side by Side Diff: src/mips64/full-codegen-mips64.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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 2131 matching lines...) Expand 10 before | Expand all | Expand 10 after
2142 switch (expr->yield_kind()) { 2142 switch (expr->yield_kind()) {
2143 case Yield::kSuspend: 2143 case Yield::kSuspend:
2144 // Pop value from top-of-stack slot; box result into result register. 2144 // Pop value from top-of-stack slot; box result into result register.
2145 EmitCreateIteratorResult(false); 2145 EmitCreateIteratorResult(false);
2146 __ push(result_register()); 2146 __ push(result_register());
2147 // Fall through. 2147 // Fall through.
2148 case Yield::kInitial: { 2148 case Yield::kInitial: {
2149 Label suspend, continuation, post_runtime, resume; 2149 Label suspend, continuation, post_runtime, resume;
2150 2150
2151 __ jmp(&suspend); 2151 __ jmp(&suspend);
2152
2153 __ bind(&continuation); 2152 __ bind(&continuation);
2153 __ RecordGeneratorContinuation();
2154 __ jmp(&resume); 2154 __ jmp(&resume);
2155 2155
2156 __ bind(&suspend); 2156 __ bind(&suspend);
2157 VisitForAccumulatorValue(expr->generator_object()); 2157 VisitForAccumulatorValue(expr->generator_object());
2158 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos())); 2158 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos()));
2159 __ li(a1, Operand(Smi::FromInt(continuation.pos()))); 2159 __ li(a1, Operand(Smi::FromInt(continuation.pos())));
2160 __ sd(a1, FieldMemOperand(v0, JSGeneratorObject::kContinuationOffset)); 2160 __ sd(a1, FieldMemOperand(v0, JSGeneratorObject::kContinuationOffset));
2161 __ sd(cp, FieldMemOperand(v0, JSGeneratorObject::kContextOffset)); 2161 __ sd(cp, FieldMemOperand(v0, JSGeneratorObject::kContextOffset));
2162 __ mov(a1, cp); 2162 __ mov(a1, cp);
2163 __ RecordWriteField(v0, JSGeneratorObject::kContextOffset, a1, a2, 2163 __ RecordWriteField(v0, JSGeneratorObject::kContextOffset, a1, a2,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
2213 2213
2214 // try { received = %yield result } 2214 // try { received = %yield result }
2215 // Shuffle the received result above a try handler and yield it without 2215 // Shuffle the received result above a try handler and yield it without
2216 // re-boxing. 2216 // re-boxing.
2217 __ bind(&l_try); 2217 __ bind(&l_try);
2218 __ pop(a0); // result 2218 __ pop(a0); // result
2219 int handler_index = NewHandlerTableEntry(); 2219 int handler_index = NewHandlerTableEntry();
2220 EnterTryBlock(handler_index, &l_catch); 2220 EnterTryBlock(handler_index, &l_catch);
2221 const int try_block_size = TryCatch::kElementCount * kPointerSize; 2221 const int try_block_size = TryCatch::kElementCount * kPointerSize;
2222 __ push(a0); // result 2222 __ push(a0); // result
2223
2223 __ jmp(&l_suspend); 2224 __ jmp(&l_suspend);
2224 __ bind(&l_continuation); 2225 __ bind(&l_continuation);
2226 __ RecordGeneratorContinuation();
2225 __ mov(a0, v0); 2227 __ mov(a0, v0);
2226 __ jmp(&l_resume); 2228 __ jmp(&l_resume);
2229
2227 __ bind(&l_suspend); 2230 __ bind(&l_suspend);
2228 const int generator_object_depth = kPointerSize + try_block_size; 2231 const int generator_object_depth = kPointerSize + try_block_size;
2229 __ ld(a0, MemOperand(sp, generator_object_depth)); 2232 __ ld(a0, MemOperand(sp, generator_object_depth));
2230 __ push(a0); // g 2233 __ push(a0); // g
2231 __ Push(Smi::FromInt(handler_index)); // handler-index 2234 __ Push(Smi::FromInt(handler_index)); // handler-index
2232 DCHECK(l_continuation.pos() > 0 && Smi::IsValid(l_continuation.pos())); 2235 DCHECK(l_continuation.pos() > 0 && Smi::IsValid(l_continuation.pos()));
2233 __ li(a1, Operand(Smi::FromInt(l_continuation.pos()))); 2236 __ li(a1, Operand(Smi::FromInt(l_continuation.pos())));
2234 __ sd(a1, FieldMemOperand(a0, JSGeneratorObject::kContinuationOffset)); 2237 __ sd(a1, FieldMemOperand(a0, JSGeneratorObject::kContinuationOffset));
2235 __ sd(cp, FieldMemOperand(a0, JSGeneratorObject::kContextOffset)); 2238 __ sd(cp, FieldMemOperand(a0, JSGeneratorObject::kContextOffset));
2236 __ mov(a1, cp); 2239 __ mov(a1, cp);
(...skipping 3320 matching lines...) Expand 10 before | Expand all | Expand 10 after
5557 reinterpret_cast<uint64_t>( 5560 reinterpret_cast<uint64_t>(
5558 isolate->builtins()->OsrAfterStackCheck()->entry())); 5561 isolate->builtins()->OsrAfterStackCheck()->entry()));
5559 return OSR_AFTER_STACK_CHECK; 5562 return OSR_AFTER_STACK_CHECK;
5560 } 5563 }
5561 5564
5562 5565
5563 } // namespace internal 5566 } // namespace internal
5564 } // namespace v8 5567 } // namespace v8
5565 5568
5566 #endif // V8_TARGET_ARCH_MIPS64 5569 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« src/debug.cc ('K') | « src/mips64/assembler-mips64.h ('k') | src/ppc/assembler-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698