OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ |
6 #define VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define VM_INTERMEDIATE_LANGUAGE_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/ast.h" | 9 #include "vm/ast.h" |
10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
(...skipping 4489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4500 SetInputAt(0, value); | 4500 SetInputAt(0, value); |
4501 } | 4501 } |
4502 | 4502 |
4503 Value* value() const { return inputs_[0]; } | 4503 Value* value() const { return inputs_[0]; } |
4504 | 4504 |
4505 DECLARE_INSTRUCTION(BoxDouble) | 4505 DECLARE_INSTRUCTION(BoxDouble) |
4506 virtual CompileType ComputeType() const; | 4506 virtual CompileType ComputeType() const; |
4507 | 4507 |
4508 virtual bool CanDeoptimize() const { return false; } | 4508 virtual bool CanDeoptimize() const { return false; } |
4509 | 4509 |
| 4510 virtual intptr_t DeoptimizationTarget() const { |
| 4511 return Isolate::kNoDeoptId; |
| 4512 } |
| 4513 |
4510 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 4514 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
4511 ASSERT(idx == 0); | 4515 ASSERT(idx == 0); |
4512 return kUnboxedDouble; | 4516 return kUnboxedDouble; |
4513 } | 4517 } |
4514 | 4518 |
4515 virtual bool AllowsCSE() const { return true; } | 4519 virtual bool AllowsCSE() const { return true; } |
4516 virtual EffectSet Effects() const { return EffectSet::None(); } | 4520 virtual EffectSet Effects() const { return EffectSet::None(); } |
4517 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 4521 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
4518 virtual bool AttributesEqual(Instruction* other) const { return true; } | 4522 virtual bool AttributesEqual(Instruction* other) const { return true; } |
4519 | 4523 |
4520 virtual bool MayThrow() const { return false; } | 4524 virtual bool MayThrow() const { return false; } |
4521 | 4525 |
4522 Definition* Canonicalize(FlowGraph* flow_graph); | 4526 Definition* Canonicalize(FlowGraph* flow_graph); |
4523 | 4527 |
4524 private: | 4528 private: |
4525 DISALLOW_COPY_AND_ASSIGN(BoxDoubleInstr); | 4529 DISALLOW_COPY_AND_ASSIGN(BoxDoubleInstr); |
4526 }; | 4530 }; |
4527 | 4531 |
4528 | 4532 |
4529 class BoxFloat32x4Instr : public TemplateDefinition<1> { | 4533 class BoxFloat32x4Instr : public TemplateDefinition<1> { |
4530 public: | 4534 public: |
4531 explicit BoxFloat32x4Instr(Value* value) { | 4535 explicit BoxFloat32x4Instr(Value* value) { |
4532 SetInputAt(0, value); | 4536 SetInputAt(0, value); |
4533 } | 4537 } |
4534 | 4538 |
4535 Value* value() const { return inputs_[0]; } | 4539 Value* value() const { return inputs_[0]; } |
4536 | 4540 |
4537 virtual bool CanDeoptimize() const { return false; } | 4541 virtual bool CanDeoptimize() const { return false; } |
4538 | 4542 |
| 4543 virtual intptr_t DeoptimizationTarget() const { |
| 4544 return Isolate::kNoDeoptId; |
| 4545 } |
| 4546 |
4539 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 4547 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
4540 ASSERT(idx == 0); | 4548 ASSERT(idx == 0); |
4541 return kUnboxedFloat32x4; | 4549 return kUnboxedFloat32x4; |
4542 } | 4550 } |
4543 | 4551 |
4544 DECLARE_INSTRUCTION(BoxFloat32x4) | 4552 DECLARE_INSTRUCTION(BoxFloat32x4) |
4545 virtual CompileType ComputeType() const; | 4553 virtual CompileType ComputeType() const; |
4546 | 4554 |
4547 virtual bool AllowsCSE() const { return true; } | 4555 virtual bool AllowsCSE() const { return true; } |
4548 virtual EffectSet Effects() const { return EffectSet::None(); } | 4556 virtual EffectSet Effects() const { return EffectSet::None(); } |
(...skipping 12 matching lines...) Expand all Loading... |
4561 class BoxInt32x4Instr : public TemplateDefinition<1> { | 4569 class BoxInt32x4Instr : public TemplateDefinition<1> { |
4562 public: | 4570 public: |
4563 explicit BoxInt32x4Instr(Value* value) { | 4571 explicit BoxInt32x4Instr(Value* value) { |
4564 SetInputAt(0, value); | 4572 SetInputAt(0, value); |
4565 } | 4573 } |
4566 | 4574 |
4567 Value* value() const { return inputs_[0]; } | 4575 Value* value() const { return inputs_[0]; } |
4568 | 4576 |
4569 virtual bool CanDeoptimize() const { return false; } | 4577 virtual bool CanDeoptimize() const { return false; } |
4570 | 4578 |
| 4579 virtual intptr_t DeoptimizationTarget() const { |
| 4580 return Isolate::kNoDeoptId; |
| 4581 } |
| 4582 |
4571 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 4583 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
4572 ASSERT(idx == 0); | 4584 ASSERT(idx == 0); |
4573 return kUnboxedInt32x4; | 4585 return kUnboxedInt32x4; |
4574 } | 4586 } |
4575 | 4587 |
4576 DECLARE_INSTRUCTION(BoxInt32x4) | 4588 DECLARE_INSTRUCTION(BoxInt32x4) |
4577 virtual CompileType ComputeType() const; | 4589 virtual CompileType ComputeType() const; |
4578 | 4590 |
4579 virtual bool AllowsCSE() const { return true; } | 4591 virtual bool AllowsCSE() const { return true; } |
4580 virtual EffectSet Effects() const { return EffectSet::None(); } | 4592 virtual EffectSet Effects() const { return EffectSet::None(); } |
(...skipping 12 matching lines...) Expand all Loading... |
4593 class BoxIntegerInstr : public TemplateDefinition<1> { | 4605 class BoxIntegerInstr : public TemplateDefinition<1> { |
4594 public: | 4606 public: |
4595 explicit BoxIntegerInstr(Value* value) { | 4607 explicit BoxIntegerInstr(Value* value) { |
4596 SetInputAt(0, value); | 4608 SetInputAt(0, value); |
4597 } | 4609 } |
4598 | 4610 |
4599 Value* value() const { return inputs_[0]; } | 4611 Value* value() const { return inputs_[0]; } |
4600 | 4612 |
4601 virtual bool CanDeoptimize() const { return false; } | 4613 virtual bool CanDeoptimize() const { return false; } |
4602 | 4614 |
| 4615 virtual intptr_t DeoptimizationTarget() const { |
| 4616 return Isolate::kNoDeoptId; |
| 4617 } |
| 4618 |
4603 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 4619 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
4604 ASSERT(idx == 0); | 4620 ASSERT(idx == 0); |
4605 return kUnboxedMint; | 4621 return kUnboxedMint; |
4606 } | 4622 } |
4607 | 4623 |
4608 DECLARE_INSTRUCTION(BoxInteger) | 4624 DECLARE_INSTRUCTION(BoxInteger) |
4609 virtual CompileType ComputeType() const; | 4625 virtual CompileType ComputeType() const; |
4610 | 4626 |
4611 virtual bool AllowsCSE() const { return true; } | 4627 virtual bool AllowsCSE() const { return true; } |
4612 virtual EffectSet Effects() const { return EffectSet::None(); } | 4628 virtual EffectSet Effects() const { return EffectSet::None(); } |
(...skipping 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6915 ForwardInstructionIterator* current_iterator_; | 6931 ForwardInstructionIterator* current_iterator_; |
6916 | 6932 |
6917 private: | 6933 private: |
6918 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 6934 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
6919 }; | 6935 }; |
6920 | 6936 |
6921 | 6937 |
6922 } // namespace dart | 6938 } // namespace dart |
6923 | 6939 |
6924 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 6940 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |