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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 2521233002: [fullcodegen] Remove exception handling support. (Closed)
Patch Set: Rebased. Created 4 years 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/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.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 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 3483 matching lines...) Expand 10 before | Expand all | Expand 10 after
3494 // code. Fetch it from the context. 3494 // code. Fetch it from the context.
3495 __ Ldr(x10, ContextMemOperand(cp, Context::CLOSURE_INDEX)); 3495 __ Ldr(x10, ContextMemOperand(cp, Context::CLOSURE_INDEX));
3496 } else { 3496 } else {
3497 DCHECK(closure_scope->is_function_scope()); 3497 DCHECK(closure_scope->is_function_scope());
3498 __ Ldr(x10, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 3498 __ Ldr(x10, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
3499 } 3499 }
3500 PushOperand(x10); 3500 PushOperand(x10);
3501 } 3501 }
3502 3502
3503 3503
3504 void FullCodeGenerator::EnterFinallyBlock() {
3505 ASM_LOCATION("FullCodeGenerator::EnterFinallyBlock");
3506 DCHECK(!result_register().is(x10));
3507 // Store pending message while executing finally block.
3508 ExternalReference pending_message_obj =
3509 ExternalReference::address_of_pending_message_obj(isolate());
3510 __ Mov(x10, pending_message_obj);
3511 __ Ldr(x10, MemOperand(x10));
3512 PushOperand(x10);
3513
3514 ClearPendingMessage();
3515 }
3516
3517
3518 void FullCodeGenerator::ExitFinallyBlock() {
3519 ASM_LOCATION("FullCodeGenerator::ExitFinallyBlock");
3520 DCHECK(!result_register().is(x10));
3521
3522 // Restore pending message from stack.
3523 PopOperand(x10);
3524 ExternalReference pending_message_obj =
3525 ExternalReference::address_of_pending_message_obj(isolate());
3526 __ Mov(x13, pending_message_obj);
3527 __ Str(x10, MemOperand(x13));
3528 }
3529
3530
3531 void FullCodeGenerator::ClearPendingMessage() {
3532 DCHECK(!result_register().is(x10));
3533 ExternalReference pending_message_obj =
3534 ExternalReference::address_of_pending_message_obj(isolate());
3535 __ LoadRoot(x10, Heap::kTheHoleValueRootIndex);
3536 __ Mov(x13, pending_message_obj);
3537 __ Str(x10, MemOperand(x13));
3538 }
3539
3540
3541 void FullCodeGenerator::DeferredCommands::EmitCommands() {
3542 __ Pop(result_register(), x1); // Restore the accumulator and get the token.
3543 for (DeferredCommand cmd : commands_) {
3544 Label skip;
3545 __ Cmp(x1, Operand(Smi::FromInt(cmd.token)));
3546 __ B(ne, &skip);
3547 switch (cmd.command) {
3548 case kReturn:
3549 codegen_->EmitUnwindAndReturn();
3550 break;
3551 case kThrow:
3552 __ Push(result_register());
3553 __ CallRuntime(Runtime::kReThrow);
3554 break;
3555 case kContinue:
3556 codegen_->EmitContinue(cmd.target);
3557 break;
3558 case kBreak:
3559 codegen_->EmitBreak(cmd.target);
3560 break;
3561 }
3562 __ bind(&skip);
3563 }
3564 }
3565
3566 #undef __ 3504 #undef __
3567 3505
3568 3506
3569 void BackEdgeTable::PatchAt(Code* unoptimized_code, 3507 void BackEdgeTable::PatchAt(Code* unoptimized_code,
3570 Address pc, 3508 Address pc,
3571 BackEdgeState target_state, 3509 BackEdgeState target_state,
3572 Code* replacement_code) { 3510 Code* replacement_code) {
3573 // Turn the jump into a nop. 3511 // Turn the jump into a nop.
3574 Address branch_address = pc - 3 * kInstructionSize; 3512 Address branch_address = pc - 3 * kInstructionSize;
3575 Isolate* isolate = unoptimized_code->GetIsolate(); 3513 Isolate* isolate = unoptimized_code->GetIsolate();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
3644 } 3582 }
3645 3583
3646 return INTERRUPT; 3584 return INTERRUPT;
3647 } 3585 }
3648 3586
3649 3587
3650 } // namespace internal 3588 } // namespace internal
3651 } // namespace v8 3589 } // namespace v8
3652 3590
3653 #endif // V8_TARGET_ARCH_ARM64 3591 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698