| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
| 6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
| 7 | 7 |
| 8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
| 9 #include "src/compiler/graph-builder.h" | 9 #include "src/compiler/graph-builder.h" |
| 10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 bool bound_; | 40 bool bound_; |
| 41 friend class RawMachineAssembler; | 41 friend class RawMachineAssembler; |
| 42 DISALLOW_COPY_AND_ASSIGN(Label); | 42 DISALLOW_COPY_AND_ASSIGN(Label); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 RawMachineAssembler(Isolate* isolate, Graph* graph, | 45 RawMachineAssembler(Isolate* isolate, Graph* graph, |
| 46 const MachineSignature* machine_sig, | 46 const MachineSignature* machine_sig, |
| 47 MachineType word = kMachPtr, | 47 MachineType word = kMachPtr, |
| 48 MachineOperatorBuilder::Flags flags = | 48 MachineOperatorBuilder::Flags flags = |
| 49 MachineOperatorBuilder::Flag::kNoFlags); | 49 MachineOperatorBuilder::Flag::kNoFlags); |
| 50 ~RawMachineAssembler() OVERRIDE {} | 50 ~RawMachineAssembler() override {} |
| 51 | 51 |
| 52 Zone* zone() const { return graph()->zone(); } | 52 Zone* zone() const { return graph()->zone(); } |
| 53 MachineOperatorBuilder* machine() { return &machine_; } | 53 MachineOperatorBuilder* machine() { return &machine_; } |
| 54 CommonOperatorBuilder* common() { return &common_; } | 54 CommonOperatorBuilder* common() { return &common_; } |
| 55 CallDescriptor* call_descriptor() const { return call_descriptor_; } | 55 CallDescriptor* call_descriptor() const { return call_descriptor_; } |
| 56 size_t parameter_count() const { return machine_sig_->parameter_count(); } | 56 size_t parameter_count() const { return machine_sig_->parameter_count(); } |
| 57 const MachineSignature* machine_sig() const { return machine_sig_; } | 57 const MachineSignature* machine_sig() const { return machine_sig_; } |
| 58 | 58 |
| 59 Node* UndefinedConstant() { | 59 Node* UndefinedConstant() { |
| 60 Unique<HeapObject> unique = Unique<HeapObject>::CreateImmovable( | 60 Unique<HeapObject> unique = Unique<HeapObject>::CreateImmovable( |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 } | 482 } |
| 483 Node* Phi(MachineType type, Node* n1, Node* n2, Node* n3, Node* n4) { | 483 Node* Phi(MachineType type, Node* n1, Node* n2, Node* n3, Node* n4) { |
| 484 return NewNode(common()->Phi(type, 4), n1, n2, n3, n4); | 484 return NewNode(common()->Phi(type, 4), n1, n2, n3, n4); |
| 485 } | 485 } |
| 486 | 486 |
| 487 // MachineAssembler is invalid after export. | 487 // MachineAssembler is invalid after export. |
| 488 Schedule* Export(); | 488 Schedule* Export(); |
| 489 | 489 |
| 490 protected: | 490 protected: |
| 491 Node* MakeNode(const Operator* op, int input_count, Node** inputs, | 491 Node* MakeNode(const Operator* op, int input_count, Node** inputs, |
| 492 bool incomplete) FINAL; | 492 bool incomplete) final; |
| 493 | 493 |
| 494 bool ScheduleValid() { return schedule_ != NULL; } | 494 bool ScheduleValid() { return schedule_ != NULL; } |
| 495 | 495 |
| 496 Schedule* schedule() { | 496 Schedule* schedule() { |
| 497 DCHECK(ScheduleValid()); | 497 DCHECK(ScheduleValid()); |
| 498 return schedule_; | 498 return schedule_; |
| 499 } | 499 } |
| 500 | 500 |
| 501 private: | 501 private: |
| 502 BasicBlock* Use(Label* label); | 502 BasicBlock* Use(Label* label); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 513 BasicBlock* current_block_; | 513 BasicBlock* current_block_; |
| 514 | 514 |
| 515 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); | 515 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); |
| 516 }; | 516 }; |
| 517 | 517 |
| 518 } // namespace compiler | 518 } // namespace compiler |
| 519 } // namespace internal | 519 } // namespace internal |
| 520 } // namespace v8 | 520 } // namespace v8 |
| 521 | 521 |
| 522 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 522 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
| OLD | NEW |