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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 5334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5345 | 5345 |
5346 // Store result register while executing finally block. | 5346 // Store result register while executing finally block. |
5347 __ push(r1); | 5347 __ push(r1); |
5348 | 5348 |
5349 // Store pending message while executing finally block. | 5349 // Store pending message while executing finally block. |
5350 ExternalReference pending_message_obj = | 5350 ExternalReference pending_message_obj = |
5351 ExternalReference::address_of_pending_message_obj(isolate()); | 5351 ExternalReference::address_of_pending_message_obj(isolate()); |
5352 __ mov(ip, Operand(pending_message_obj)); | 5352 __ mov(ip, Operand(pending_message_obj)); |
5353 __ ldr(r1, MemOperand(ip)); | 5353 __ ldr(r1, MemOperand(ip)); |
5354 __ push(r1); | 5354 __ push(r1); |
| 5355 |
| 5356 ClearPendingMessage(); |
5355 } | 5357 } |
5356 | 5358 |
5357 | 5359 |
5358 void FullCodeGenerator::ExitFinallyBlock() { | 5360 void FullCodeGenerator::ExitFinallyBlock() { |
5359 DCHECK(!result_register().is(r1)); | 5361 DCHECK(!result_register().is(r1)); |
5360 // Restore pending message from stack. | 5362 // Restore pending message from stack. |
5361 __ pop(r1); | 5363 __ pop(r1); |
5362 ExternalReference pending_message_obj = | 5364 ExternalReference pending_message_obj = |
5363 ExternalReference::address_of_pending_message_obj(isolate()); | 5365 ExternalReference::address_of_pending_message_obj(isolate()); |
5364 __ mov(ip, Operand(pending_message_obj)); | 5366 __ mov(ip, Operand(pending_message_obj)); |
5365 __ str(r1, MemOperand(ip)); | 5367 __ str(r1, MemOperand(ip)); |
5366 | 5368 |
5367 // Restore result register from stack. | 5369 // Restore result register from stack. |
5368 __ pop(r1); | 5370 __ pop(r1); |
5369 | 5371 |
5370 // Uncook return address and return. | 5372 // Uncook return address and return. |
5371 __ pop(result_register()); | 5373 __ pop(result_register()); |
5372 __ SmiUntag(r1); | 5374 __ SmiUntag(r1); |
5373 __ add(pc, r1, Operand(masm_->CodeObject())); | 5375 __ add(pc, r1, Operand(masm_->CodeObject())); |
5374 } | 5376 } |
5375 | 5377 |
5376 | 5378 |
| 5379 void FullCodeGenerator::ClearPendingMessage() { |
| 5380 DCHECK(!result_register().is(r1)); |
| 5381 ExternalReference pending_message_obj = |
| 5382 ExternalReference::address_of_pending_message_obj(isolate()); |
| 5383 __ LoadRoot(r1, Heap::kTheHoleValueRootIndex); |
| 5384 __ mov(ip, Operand(pending_message_obj)); |
| 5385 __ str(r1, MemOperand(ip)); |
| 5386 } |
| 5387 |
| 5388 |
5377 #undef __ | 5389 #undef __ |
5378 | 5390 |
5379 | 5391 |
5380 static Address GetInterruptImmediateLoadAddress(Address pc) { | 5392 static Address GetInterruptImmediateLoadAddress(Address pc) { |
5381 Address load_address = pc - 2 * Assembler::kInstrSize; | 5393 Address load_address = pc - 2 * Assembler::kInstrSize; |
5382 if (!FLAG_enable_ool_constant_pool) { | 5394 if (!FLAG_enable_ool_constant_pool) { |
5383 DCHECK(Assembler::IsLdrPcImmediateOffset(Memory::int32_at(load_address))); | 5395 DCHECK(Assembler::IsLdrPcImmediateOffset(Memory::int32_at(load_address))); |
5384 } else if (Assembler::IsLdrPpRegOffset(Memory::int32_at(load_address))) { | 5396 } else if (Assembler::IsLdrPpRegOffset(Memory::int32_at(load_address))) { |
5385 // This is an extended constant pool lookup. | 5397 // This is an extended constant pool lookup. |
5386 if (CpuFeatures::IsSupported(ARMv7)) { | 5398 if (CpuFeatures::IsSupported(ARMv7)) { |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5512 | 5524 |
5513 DCHECK(interrupt_address == | 5525 DCHECK(interrupt_address == |
5514 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5526 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5515 return OSR_AFTER_STACK_CHECK; | 5527 return OSR_AFTER_STACK_CHECK; |
5516 } | 5528 } |
5517 | 5529 |
5518 | 5530 |
5519 } } // namespace v8::internal | 5531 } } // namespace v8::internal |
5520 | 5532 |
5521 #endif // V8_TARGET_ARCH_ARM | 5533 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |