| 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 3014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3025 // TODO(srdjan): Modify ComparisonInstr to allow 1 or 2 arguments, since | 3025 // TODO(srdjan): Modify ComparisonInstr to allow 1 or 2 arguments, since |
| 3026 // TestCidInstr needs only one argument | 3026 // TestCidInstr needs only one argument |
| 3027 class TestCidsInstr : public ComparisonInstr { | 3027 class TestCidsInstr : public ComparisonInstr { |
| 3028 public: | 3028 public: |
| 3029 TestCidsInstr(TokenPosition token_pos, | 3029 TestCidsInstr(TokenPosition token_pos, |
| 3030 Token::Kind kind, | 3030 Token::Kind kind, |
| 3031 Value* value, | 3031 Value* value, |
| 3032 const ZoneGrowableArray<intptr_t>& cid_results, | 3032 const ZoneGrowableArray<intptr_t>& cid_results, |
| 3033 intptr_t deopt_id) | 3033 intptr_t deopt_id) |
| 3034 : ComparisonInstr(token_pos, kind, value, NULL, deopt_id), | 3034 : ComparisonInstr(token_pos, kind, value, NULL, deopt_id), |
| 3035 cid_results_(cid_results) { | 3035 cid_results_(cid_results), |
| 3036 licm_hoisted_(false) { |
| 3036 ASSERT((kind == Token::kIS) || (kind == Token::kISNOT)); | 3037 ASSERT((kind == Token::kIS) || (kind == Token::kISNOT)); |
| 3037 set_operation_cid(kObjectCid); | 3038 set_operation_cid(kObjectCid); |
| 3038 } | 3039 } |
| 3039 | 3040 |
| 3040 virtual intptr_t InputCount() const { return 1; } | 3041 virtual intptr_t InputCount() const { return 1; } |
| 3041 | 3042 |
| 3042 const ZoneGrowableArray<intptr_t>& cid_results() const { | 3043 const ZoneGrowableArray<intptr_t>& cid_results() const { |
| 3043 return cid_results_; | 3044 return cid_results_; |
| 3044 } | 3045 } |
| 3045 | 3046 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3060 } | 3061 } |
| 3061 | 3062 |
| 3062 virtual bool AttributesEqual(Instruction* other) const; | 3063 virtual bool AttributesEqual(Instruction* other) const; |
| 3063 | 3064 |
| 3064 virtual void EmitBranchCode(FlowGraphCompiler* compiler, | 3065 virtual void EmitBranchCode(FlowGraphCompiler* compiler, |
| 3065 BranchInstr* branch); | 3066 BranchInstr* branch); |
| 3066 | 3067 |
| 3067 virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler, | 3068 virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler, |
| 3068 BranchLabels labels); | 3069 BranchLabels labels); |
| 3069 | 3070 |
| 3071 void set_licm_hoisted(bool value) { licm_hoisted_ = value; } |
| 3072 |
| 3070 PRINT_OPERANDS_TO_SUPPORT | 3073 PRINT_OPERANDS_TO_SUPPORT |
| 3071 | 3074 |
| 3072 private: | 3075 private: |
| 3073 const ZoneGrowableArray<intptr_t>& cid_results_; | 3076 const ZoneGrowableArray<intptr_t>& cid_results_; |
| 3077 bool licm_hoisted_; |
| 3074 DISALLOW_COPY_AND_ASSIGN(TestCidsInstr); | 3078 DISALLOW_COPY_AND_ASSIGN(TestCidsInstr); |
| 3075 }; | 3079 }; |
| 3076 | 3080 |
| 3077 | 3081 |
| 3078 class EqualityCompareInstr : public ComparisonInstr { | 3082 class EqualityCompareInstr : public ComparisonInstr { |
| 3079 public: | 3083 public: |
| 3080 EqualityCompareInstr(TokenPosition token_pos, | 3084 EqualityCompareInstr(TokenPosition token_pos, |
| 3081 Token::Kind kind, | 3085 Token::Kind kind, |
| 3082 Value* left, | 3086 Value* left, |
| 3083 Value* right, | 3087 Value* right, |
| (...skipping 5171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8255 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8259 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
| 8256 UNIMPLEMENTED(); \ | 8260 UNIMPLEMENTED(); \ |
| 8257 return NULL; \ | 8261 return NULL; \ |
| 8258 } \ | 8262 } \ |
| 8259 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8263 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 8260 | 8264 |
| 8261 | 8265 |
| 8262 } // namespace dart | 8266 } // namespace dart |
| 8263 | 8267 |
| 8264 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8268 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |