| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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/codegen.h" | 5 #include "src/codegen.h" |
| 6 #include "src/deoptimizer.h" | 6 #include "src/deoptimizer.h" |
| 7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
| 8 #include "src/register-configuration.h" | 8 #include "src/register-configuration.h" |
| 9 #include "src/safepoint-table.h" | 9 #include "src/safepoint-table.h" |
| 10 | 10 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // Get the address of the location in the code object (a3) (return | 153 // Get the address of the location in the code object (a3) (return |
| 154 // address for lazy deoptimization) and compute the fp-to-sp delta in | 154 // address for lazy deoptimization) and compute the fp-to-sp delta in |
| 155 // register t0. | 155 // register t0. |
| 156 __ mov(a3, ra); | 156 __ mov(a3, ra); |
| 157 // Correct one word for bailout id. | 157 // Correct one word for bailout id. |
| 158 __ Addu(t0, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize))); | 158 __ Addu(t0, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize))); |
| 159 | 159 |
| 160 __ Subu(t0, fp, t0); | 160 __ Subu(t0, fp, t0); |
| 161 | 161 |
| 162 // Allocate a new deoptimizer object. | 162 // Allocate a new deoptimizer object. |
| 163 __ PrepareCallCFunction(6, t1); |
| 163 // Pass four arguments in a0 to a3 and fifth & sixth arguments on stack. | 164 // Pass four arguments in a0 to a3 and fifth & sixth arguments on stack. |
| 164 __ PrepareCallCFunction(6, t1); | 165 __ mov(a0, zero_reg); |
| 166 Label context_check; |
| 167 __ lw(a1, MemOperand(fp, CommonFrameConstants::kContextOrFrameTypeOffset)); |
| 168 __ JumpIfSmi(a1, &context_check); |
| 165 __ lw(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 169 __ lw(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 166 __ li(a1, Operand(type())); // bailout type, | 170 __ bind(&context_check); |
| 171 __ li(a1, Operand(type())); // Bailout type. |
| 167 // a2: bailout id already loaded. | 172 // a2: bailout id already loaded. |
| 168 // a3: code address or 0 already loaded. | 173 // a3: code address or 0 already loaded. |
| 169 __ sw(t0, CFunctionArgumentOperand(5)); // Fp-to-sp delta. | 174 __ sw(t0, CFunctionArgumentOperand(5)); // Fp-to-sp delta. |
| 170 __ li(t1, Operand(ExternalReference::isolate_address(isolate()))); | 175 __ li(t1, Operand(ExternalReference::isolate_address(isolate()))); |
| 171 __ sw(t1, CFunctionArgumentOperand(6)); // Isolate. | 176 __ sw(t1, CFunctionArgumentOperand(6)); // Isolate. |
| 172 // Call Deoptimizer::New(). | 177 // Call Deoptimizer::New(). |
| 173 { | 178 { |
| 174 AllowExternalCallThatCantCauseGC scope(masm()); | 179 AllowExternalCallThatCantCauseGC scope(masm()); |
| 175 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate()), 6); | 180 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate()), 6); |
| 176 } | 181 } |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 // No embedded constant pool support. | 387 // No embedded constant pool support. |
| 383 UNREACHABLE(); | 388 UNREACHABLE(); |
| 384 } | 389 } |
| 385 | 390 |
| 386 | 391 |
| 387 #undef __ | 392 #undef __ |
| 388 | 393 |
| 389 | 394 |
| 390 } // namespace internal | 395 } // namespace internal |
| 391 } // namespace v8 | 396 } // namespace v8 |
| OLD | NEW |