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

Side by Side Diff: src/compiler/interpreter-assembler.cc

Issue 1410863002: [Interpreter] Add support for Throw. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/compiler/interpreter-assembler.h ('k') | src/interpreter/bytecode-array-builder.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/compiler/interpreter-assembler.h" 5 #include "src/compiler/interpreter-assembler.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 BytecodeArrayTaggedPointer(), 550 BytecodeArrayTaggedPointer(),
551 DispatchTableRawPointer(), 551 DispatchTableRawPointer(),
552 GetContext() }; 552 GetContext() };
553 Node* tail_call = 553 Node* tail_call =
554 raw_assembler_->TailCallN(call_descriptor(), target_code_object, args); 554 raw_assembler_->TailCallN(call_descriptor(), target_code_object, args);
555 // This should always be the end node. 555 // This should always be the end node.
556 AddEndInput(tail_call); 556 AddEndInput(tail_call);
557 } 557 }
558 558
559 559
560 void InterpreterAssembler::Abort(BailoutReason bailout_reason) {
561 Node* abort_id = SmiTag(Int32Constant(bailout_reason));
562 CallRuntime(Runtime::kAbort, abort_id);
563 Return();
564 }
565
566
560 void InterpreterAssembler::AbortIfWordNotEqual(Node* lhs, Node* rhs, 567 void InterpreterAssembler::AbortIfWordNotEqual(Node* lhs, Node* rhs,
561 BailoutReason bailout_reason) { 568 BailoutReason bailout_reason) {
562 RawMachineAssembler::Label match, no_match; 569 RawMachineAssembler::Label match, no_match;
563 Node* condition = raw_assembler_->WordEqual(lhs, rhs); 570 Node* condition = raw_assembler_->WordEqual(lhs, rhs);
564 raw_assembler_->Branch(condition, &match, &no_match); 571 raw_assembler_->Branch(condition, &match, &no_match);
565 raw_assembler_->Bind(&no_match); 572 raw_assembler_->Bind(&no_match);
566 Node* abort_id = SmiTag(Int32Constant(bailout_reason)); 573 Abort(bailout_reason);
567 CallRuntime(Runtime::kAbort, abort_id);
568 Return();
569 raw_assembler_->Bind(&match); 574 raw_assembler_->Bind(&match);
570 } 575 }
571 576
572 577
573 void InterpreterAssembler::AddEndInput(Node* input) { 578 void InterpreterAssembler::AddEndInput(Node* input) {
574 DCHECK_NOT_NULL(input); 579 DCHECK_NOT_NULL(input);
575 end_nodes_.push_back(input); 580 end_nodes_.push_back(input);
576 } 581 }
577 582
578 583
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 return raw_assembler_->schedule(); 620 return raw_assembler_->schedule();
616 } 621 }
617 622
618 623
619 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } 624 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); }
620 625
621 626
622 } // namespace compiler 627 } // namespace compiler
623 } // namespace internal 628 } // namespace internal
624 } // namespace v8 629 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/interpreter-assembler.h ('k') | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698