Chromium Code Reviews| 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 4572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4583 const intptr_t token_pos_; | 4583 const intptr_t token_pos_; |
| 4584 | 4584 |
| 4585 DISALLOW_COPY_AND_ASSIGN(CloneContextInstr); | 4585 DISALLOW_COPY_AND_ASSIGN(CloneContextInstr); |
| 4586 }; | 4586 }; |
| 4587 | 4587 |
| 4588 | 4588 |
| 4589 class CheckEitherNonSmiInstr : public TemplateInstruction<2> { | 4589 class CheckEitherNonSmiInstr : public TemplateInstruction<2> { |
| 4590 public: | 4590 public: |
| 4591 CheckEitherNonSmiInstr(Value* left, | 4591 CheckEitherNonSmiInstr(Value* left, |
| 4592 Value* right, | 4592 Value* right, |
| 4593 intptr_t deopt_id) { | 4593 intptr_t deopt_id) { |
|
srdjan
2014/10/15 12:56:45
initialize licm_hoisted_ to false
Florian Schneider
2014/10/15 13:07:34
Done. Good catch.
| |
| 4594 SetInputAt(0, left); | 4594 SetInputAt(0, left); |
| 4595 SetInputAt(1, right); | 4595 SetInputAt(1, right); |
| 4596 // Override generated deopt-id. | 4596 // Override generated deopt-id. |
| 4597 deopt_id_ = deopt_id; | 4597 deopt_id_ = deopt_id; |
| 4598 } | 4598 } |
| 4599 | 4599 |
| 4600 Value* left() const { return inputs_[0]; } | 4600 Value* left() const { return inputs_[0]; } |
| 4601 Value* right() const { return inputs_[1]; } | 4601 Value* right() const { return inputs_[1]; } |
| 4602 | 4602 |
| 4603 DECLARE_INSTRUCTION(CheckEitherNonSmi) | 4603 DECLARE_INSTRUCTION(CheckEitherNonSmi) |
| 4604 | 4604 |
| 4605 virtual intptr_t ArgumentCount() const { return 0; } | 4605 virtual intptr_t ArgumentCount() const { return 0; } |
| 4606 | 4606 |
| 4607 virtual bool CanDeoptimize() const { return true; } | 4607 virtual bool CanDeoptimize() const { return true; } |
| 4608 | 4608 |
| 4609 virtual Instruction* Canonicalize(FlowGraph* flow_graph); | 4609 virtual Instruction* Canonicalize(FlowGraph* flow_graph); |
| 4610 | 4610 |
| 4611 virtual bool AllowsCSE() const { return true; } | 4611 virtual bool AllowsCSE() const { return true; } |
| 4612 virtual EffectSet Effects() const { return EffectSet::None(); } | 4612 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 4613 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 4613 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 4614 virtual bool AttributesEqual(Instruction* other) const { return true; } | 4614 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 4615 | 4615 |
| 4616 virtual bool MayThrow() const { return false; } | 4616 virtual bool MayThrow() const { return false; } |
| 4617 | 4617 |
| 4618 void set_licm_hoisted(bool value) { licm_hoisted_ = value; } | |
| 4619 | |
| 4618 private: | 4620 private: |
| 4621 bool licm_hoisted_; | |
| 4622 | |
| 4619 DISALLOW_COPY_AND_ASSIGN(CheckEitherNonSmiInstr); | 4623 DISALLOW_COPY_AND_ASSIGN(CheckEitherNonSmiInstr); |
| 4620 }; | 4624 }; |
| 4621 | 4625 |
| 4622 | 4626 |
| 4623 class BoxDoubleInstr : public TemplateDefinition<1> { | 4627 class BoxDoubleInstr : public TemplateDefinition<1> { |
| 4624 public: | 4628 public: |
| 4625 explicit BoxDoubleInstr(Value* value) { | 4629 explicit BoxDoubleInstr(Value* value) { |
| 4626 SetInputAt(0, value); | 4630 SetInputAt(0, value); |
| 4627 } | 4631 } |
| 4628 | 4632 |
| (...skipping 3226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7855 bool licm_hoisted_; | 7859 bool licm_hoisted_; |
| 7856 const intptr_t token_pos_; | 7860 const intptr_t token_pos_; |
| 7857 | 7861 |
| 7858 DISALLOW_COPY_AND_ASSIGN(CheckClassInstr); | 7862 DISALLOW_COPY_AND_ASSIGN(CheckClassInstr); |
| 7859 }; | 7863 }; |
| 7860 | 7864 |
| 7861 | 7865 |
| 7862 class CheckSmiInstr : public TemplateInstruction<1> { | 7866 class CheckSmiInstr : public TemplateInstruction<1> { |
| 7863 public: | 7867 public: |
| 7864 CheckSmiInstr(Value* value, intptr_t original_deopt_id, intptr_t token_pos) | 7868 CheckSmiInstr(Value* value, intptr_t original_deopt_id, intptr_t token_pos) |
| 7865 : token_pos_(token_pos) { | 7869 : token_pos_(token_pos) { |
|
srdjan
2014/10/15 12:56:45
ditto
Florian Schneider
2014/10/15 13:07:34
Done.
| |
| 7866 SetInputAt(0, value); | 7870 SetInputAt(0, value); |
| 7867 deopt_id_ = original_deopt_id; | 7871 deopt_id_ = original_deopt_id; |
| 7868 } | 7872 } |
| 7869 | 7873 |
| 7870 Value* value() const { return inputs_[0]; } | 7874 Value* value() const { return inputs_[0]; } |
| 7871 virtual intptr_t token_pos() const { return token_pos_; } | 7875 virtual intptr_t token_pos() const { return token_pos_; } |
| 7872 | 7876 |
| 7873 DECLARE_INSTRUCTION(CheckSmi) | 7877 DECLARE_INSTRUCTION(CheckSmi) |
| 7874 | 7878 |
| 7875 virtual intptr_t ArgumentCount() const { return 0; } | 7879 virtual intptr_t ArgumentCount() const { return 0; } |
| 7876 | 7880 |
| 7877 virtual bool CanDeoptimize() const { return true; } | 7881 virtual bool CanDeoptimize() const { return true; } |
| 7878 | 7882 |
| 7879 virtual Instruction* Canonicalize(FlowGraph* flow_graph); | 7883 virtual Instruction* Canonicalize(FlowGraph* flow_graph); |
| 7880 | 7884 |
| 7881 virtual bool AllowsCSE() const { return true; } | 7885 virtual bool AllowsCSE() const { return true; } |
| 7882 virtual EffectSet Effects() const { return EffectSet::None(); } | 7886 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 7883 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 7887 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 7884 virtual bool AttributesEqual(Instruction* other) const { return true; } | 7888 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 7885 | 7889 |
| 7886 virtual bool MayThrow() const { return false; } | 7890 virtual bool MayThrow() const { return false; } |
| 7887 | 7891 |
| 7892 void set_licm_hoisted(bool value) { licm_hoisted_ = value; } | |
| 7893 | |
| 7888 private: | 7894 private: |
| 7889 const intptr_t token_pos_; | 7895 const intptr_t token_pos_; |
| 7896 bool licm_hoisted_; | |
| 7890 | 7897 |
| 7891 DISALLOW_COPY_AND_ASSIGN(CheckSmiInstr); | 7898 DISALLOW_COPY_AND_ASSIGN(CheckSmiInstr); |
| 7892 }; | 7899 }; |
| 7893 | 7900 |
| 7894 | 7901 |
| 7895 class CheckClassIdInstr : public TemplateInstruction<1> { | 7902 class CheckClassIdInstr : public TemplateInstruction<1> { |
| 7896 public: | 7903 public: |
| 7897 CheckClassIdInstr(Value* value, intptr_t cid, intptr_t deopt_id) : cid_(cid) { | 7904 CheckClassIdInstr(Value* value, intptr_t cid, intptr_t deopt_id) : cid_(cid) { |
| 7898 SetInputAt(0, value); | 7905 SetInputAt(0, value); |
| 7899 // Override generated deopt-id. | 7906 // Override generated deopt-id. |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8440 Isolate* isolate, bool opt) const { \ | 8447 Isolate* isolate, bool opt) const { \ |
| 8441 UNIMPLEMENTED(); \ | 8448 UNIMPLEMENTED(); \ |
| 8442 return NULL; \ | 8449 return NULL; \ |
| 8443 } \ | 8450 } \ |
| 8444 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8451 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 8445 | 8452 |
| 8446 | 8453 |
| 8447 } // namespace dart | 8454 } // namespace dart |
| 8448 | 8455 |
| 8449 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8456 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |