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

Side by Side Diff: src/arm64/full-codegen-arm64.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: rebase 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
« no previous file with comments | « src/arm64/assembler-arm64.cc ('k') | src/assembler.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 5081 matching lines...) Expand 10 before | Expand all | Expand 10 after
5092 switch (expr->yield_kind()) { 5092 switch (expr->yield_kind()) {
5093 case Yield::kSuspend: 5093 case Yield::kSuspend:
5094 // Pop value from top-of-stack slot; box result into result register. 5094 // Pop value from top-of-stack slot; box result into result register.
5095 EmitCreateIteratorResult(false); 5095 EmitCreateIteratorResult(false);
5096 __ Push(result_register()); 5096 __ Push(result_register());
5097 // Fall through. 5097 // Fall through.
5098 case Yield::kInitial: { 5098 case Yield::kInitial: {
5099 Label suspend, continuation, post_runtime, resume; 5099 Label suspend, continuation, post_runtime, resume;
5100 5100
5101 __ B(&suspend); 5101 __ B(&suspend);
5102
5103 // TODO(jbramley): This label is bound here because the following code 5102 // TODO(jbramley): This label is bound here because the following code
5104 // looks at its pos(). Is it possible to do something more efficient here, 5103 // looks at its pos(). Is it possible to do something more efficient here,
5105 // perhaps using Adr? 5104 // perhaps using Adr?
5106 __ Bind(&continuation); 5105 __ Bind(&continuation);
5106 __ RecordGeneratorContinuation();
5107 __ B(&resume); 5107 __ B(&resume);
5108 5108
5109 __ Bind(&suspend); 5109 __ Bind(&suspend);
5110 VisitForAccumulatorValue(expr->generator_object()); 5110 VisitForAccumulatorValue(expr->generator_object());
5111 DCHECK((continuation.pos() > 0) && Smi::IsValid(continuation.pos())); 5111 DCHECK((continuation.pos() > 0) && Smi::IsValid(continuation.pos()));
5112 __ Mov(x1, Smi::FromInt(continuation.pos())); 5112 __ Mov(x1, Smi::FromInt(continuation.pos()));
5113 __ Str(x1, FieldMemOperand(x0, JSGeneratorObject::kContinuationOffset)); 5113 __ Str(x1, FieldMemOperand(x0, JSGeneratorObject::kContinuationOffset));
5114 __ Str(cp, FieldMemOperand(x0, JSGeneratorObject::kContextOffset)); 5114 __ Str(cp, FieldMemOperand(x0, JSGeneratorObject::kContextOffset));
5115 __ Mov(x1, cp); 5115 __ Mov(x1, cp);
5116 __ RecordWriteField(x0, JSGeneratorObject::kContextOffset, x1, x2, 5116 __ RecordWriteField(x0, JSGeneratorObject::kContextOffset, x1, x2,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
5167 5167
5168 // try { received = %yield result } 5168 // try { received = %yield result }
5169 // Shuffle the received result above a try handler and yield it without 5169 // Shuffle the received result above a try handler and yield it without
5170 // re-boxing. 5170 // re-boxing.
5171 __ Bind(&l_try); 5171 __ Bind(&l_try);
5172 __ Pop(x0); // result 5172 __ Pop(x0); // result
5173 int handler_index = NewHandlerTableEntry(); 5173 int handler_index = NewHandlerTableEntry();
5174 EnterTryBlock(handler_index, &l_catch); 5174 EnterTryBlock(handler_index, &l_catch);
5175 const int try_block_size = TryCatch::kElementCount * kPointerSize; 5175 const int try_block_size = TryCatch::kElementCount * kPointerSize;
5176 __ Push(x0); // result 5176 __ Push(x0); // result
5177
5177 __ B(&l_suspend); 5178 __ B(&l_suspend);
5178
5179 // TODO(jbramley): This label is bound here because the following code 5179 // TODO(jbramley): This label is bound here because the following code
5180 // looks at its pos(). Is it possible to do something more efficient here, 5180 // looks at its pos(). Is it possible to do something more efficient here,
5181 // perhaps using Adr? 5181 // perhaps using Adr?
5182 __ Bind(&l_continuation); 5182 __ Bind(&l_continuation);
5183 __ RecordGeneratorContinuation();
5183 __ B(&l_resume); 5184 __ B(&l_resume);
5184 5185
5185 __ Bind(&l_suspend); 5186 __ Bind(&l_suspend);
5186 const int generator_object_depth = kPointerSize + try_block_size; 5187 const int generator_object_depth = kPointerSize + try_block_size;
5187 __ Peek(x0, generator_object_depth); 5188 __ Peek(x0, generator_object_depth);
5188 __ Push(x0); // g 5189 __ Push(x0); // g
5189 __ Push(Smi::FromInt(handler_index)); // handler-index 5190 __ Push(Smi::FromInt(handler_index)); // handler-index
5190 DCHECK((l_continuation.pos() > 0) && Smi::IsValid(l_continuation.pos())); 5191 DCHECK((l_continuation.pos() > 0) && Smi::IsValid(l_continuation.pos()));
5191 __ Mov(x1, Smi::FromInt(l_continuation.pos())); 5192 __ Mov(x1, Smi::FromInt(l_continuation.pos()));
5192 __ Str(x1, FieldMemOperand(x0, JSGeneratorObject::kContinuationOffset)); 5193 __ Str(x1, FieldMemOperand(x0, JSGeneratorObject::kContinuationOffset));
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
5602 } 5603 }
5603 5604
5604 return INTERRUPT; 5605 return INTERRUPT;
5605 } 5606 }
5606 5607
5607 5608
5608 } // namespace internal 5609 } // namespace internal
5609 } // namespace v8 5610 } // namespace v8
5610 5611
5611 #endif // V8_TARGET_ARCH_ARM64 5612 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/assembler-arm64.cc ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698