| OLD | NEW |
| 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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
| 9 #include "src/full-codegen/full-codegen.h" | 9 #include "src/full-codegen/full-codegen.h" |
| 10 #include "src/ia32/frames-ia32.h" | 10 #include "src/ia32/frames-ia32.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 // Get the address of the location in the code object | 219 // Get the address of the location in the code object |
| 220 // and compute the fp-to-sp delta in register edx. | 220 // and compute the fp-to-sp delta in register edx. |
| 221 __ mov(ecx, Operand(esp, kSavedRegistersAreaSize + 1 * kPointerSize)); | 221 __ mov(ecx, Operand(esp, kSavedRegistersAreaSize + 1 * kPointerSize)); |
| 222 __ lea(edx, Operand(esp, kSavedRegistersAreaSize + 2 * kPointerSize)); | 222 __ lea(edx, Operand(esp, kSavedRegistersAreaSize + 2 * kPointerSize)); |
| 223 | 223 |
| 224 __ sub(edx, ebp); | 224 __ sub(edx, ebp); |
| 225 __ neg(edx); | 225 __ neg(edx); |
| 226 | 226 |
| 227 // Allocate a new deoptimizer object. | 227 // Allocate a new deoptimizer object. |
| 228 __ PrepareCallCFunction(6, eax); | 228 __ PrepareCallCFunction(6, eax); |
| 229 __ mov(eax, Immediate(0)); |
| 230 Label context_check; |
| 231 __ mov(edi, Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset)); |
| 232 __ JumpIfSmi(edi, &context_check); |
| 229 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 233 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
| 234 __ bind(&context_check); |
| 230 __ mov(Operand(esp, 0 * kPointerSize), eax); // Function. | 235 __ mov(Operand(esp, 0 * kPointerSize), eax); // Function. |
| 231 __ mov(Operand(esp, 1 * kPointerSize), Immediate(type())); // Bailout type. | 236 __ mov(Operand(esp, 1 * kPointerSize), Immediate(type())); // Bailout type. |
| 232 __ mov(Operand(esp, 2 * kPointerSize), ebx); // Bailout id. | 237 __ mov(Operand(esp, 2 * kPointerSize), ebx); // Bailout id. |
| 233 __ mov(Operand(esp, 3 * kPointerSize), ecx); // Code address or 0. | 238 __ mov(Operand(esp, 3 * kPointerSize), ecx); // Code address or 0. |
| 234 __ mov(Operand(esp, 4 * kPointerSize), edx); // Fp-to-sp delta. | 239 __ mov(Operand(esp, 4 * kPointerSize), edx); // Fp-to-sp delta. |
| 235 __ mov(Operand(esp, 5 * kPointerSize), | 240 __ mov(Operand(esp, 5 * kPointerSize), |
| 236 Immediate(ExternalReference::isolate_address(isolate()))); | 241 Immediate(ExternalReference::isolate_address(isolate()))); |
| 237 { | 242 { |
| 238 AllowExternalCallThatCantCauseGC scope(masm()); | 243 AllowExternalCallThatCantCauseGC scope(masm()); |
| 239 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate()), 6); | 244 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate()), 6); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 } | 385 } |
| 381 | 386 |
| 382 | 387 |
| 383 #undef __ | 388 #undef __ |
| 384 | 389 |
| 385 | 390 |
| 386 } // namespace internal | 391 } // namespace internal |
| 387 } // namespace v8 | 392 } // namespace v8 |
| 388 | 393 |
| 389 #endif // V8_TARGET_ARCH_IA32 | 394 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |