| OLD | NEW |
| 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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 | 541 |
| 542 Node* InterpreterAssembler::Advance(Node* delta) { | 542 Node* InterpreterAssembler::Advance(Node* delta) { |
| 543 return raw_assembler_->IntPtrAdd(BytecodeOffset(), delta); | 543 return raw_assembler_->IntPtrAdd(BytecodeOffset(), delta); |
| 544 } | 544 } |
| 545 | 545 |
| 546 | 546 |
| 547 void InterpreterAssembler::Jump(Node* delta) { DispatchTo(Advance(delta)); } | 547 void InterpreterAssembler::Jump(Node* delta) { DispatchTo(Advance(delta)); } |
| 548 | 548 |
| 549 | 549 |
| 550 void InterpreterAssembler::JumpIfWordEqual(Node* lhs, Node* rhs, Node* delta) { | 550 void InterpreterAssembler::JumpIfWordEqual(Node* lhs, Node* rhs, Node* delta) { |
| 551 RawMachineAssembler::Label match, no_match; | 551 RawMachineLabel match, no_match; |
| 552 Node* condition = raw_assembler_->WordEqual(lhs, rhs); | 552 Node* condition = raw_assembler_->WordEqual(lhs, rhs); |
| 553 raw_assembler_->Branch(condition, &match, &no_match); | 553 raw_assembler_->Branch(condition, &match, &no_match); |
| 554 raw_assembler_->Bind(&match); | 554 raw_assembler_->Bind(&match); |
| 555 DispatchTo(Advance(delta)); | 555 DispatchTo(Advance(delta)); |
| 556 raw_assembler_->Bind(&no_match); | 556 raw_assembler_->Bind(&no_match); |
| 557 Dispatch(); | 557 Dispatch(); |
| 558 } | 558 } |
| 559 | 559 |
| 560 | 560 |
| 561 void InterpreterAssembler::Dispatch() { | 561 void InterpreterAssembler::Dispatch() { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 | 596 |
| 597 void InterpreterAssembler::Abort(BailoutReason bailout_reason) { | 597 void InterpreterAssembler::Abort(BailoutReason bailout_reason) { |
| 598 Node* abort_id = SmiTag(Int32Constant(bailout_reason)); | 598 Node* abort_id = SmiTag(Int32Constant(bailout_reason)); |
| 599 CallRuntime(Runtime::kAbort, abort_id); | 599 CallRuntime(Runtime::kAbort, abort_id); |
| 600 Return(); | 600 Return(); |
| 601 } | 601 } |
| 602 | 602 |
| 603 | 603 |
| 604 void InterpreterAssembler::AbortIfWordNotEqual(Node* lhs, Node* rhs, | 604 void InterpreterAssembler::AbortIfWordNotEqual(Node* lhs, Node* rhs, |
| 605 BailoutReason bailout_reason) { | 605 BailoutReason bailout_reason) { |
| 606 RawMachineAssembler::Label match, no_match; | 606 RawMachineLabel match, no_match; |
| 607 Node* condition = raw_assembler_->WordEqual(lhs, rhs); | 607 Node* condition = raw_assembler_->WordEqual(lhs, rhs); |
| 608 raw_assembler_->Branch(condition, &match, &no_match); | 608 raw_assembler_->Branch(condition, &match, &no_match); |
| 609 raw_assembler_->Bind(&no_match); | 609 raw_assembler_->Bind(&no_match); |
| 610 Abort(bailout_reason); | 610 Abort(bailout_reason); |
| 611 raw_assembler_->Bind(&match); | 611 raw_assembler_->Bind(&match); |
| 612 } | 612 } |
| 613 | 613 |
| 614 | 614 |
| 615 void InterpreterAssembler::AddEndInput(Node* input) { | 615 void InterpreterAssembler::AddEndInput(Node* input) { |
| 616 DCHECK_NOT_NULL(input); | 616 DCHECK_NOT_NULL(input); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 return raw_assembler_->call_descriptor(); | 652 return raw_assembler_->call_descriptor(); |
| 653 } | 653 } |
| 654 | 654 |
| 655 | 655 |
| 656 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } | 656 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } |
| 657 | 657 |
| 658 | 658 |
| 659 } // namespace compiler | 659 } // namespace compiler |
| 660 } // namespace internal | 660 } // namespace internal |
| 661 } // namespace v8 | 661 } // namespace v8 |
| OLD | NEW |