| 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 3087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3098 Value* if_true, | 3098 Value* if_true, |
| 3099 Value* if_false) | 3099 Value* if_false) |
| 3100 : kind_(kind), | 3100 : kind_(kind), |
| 3101 if_true_(Smi::Cast(if_true->BoundConstant()).Value()), | 3101 if_true_(Smi::Cast(if_true->BoundConstant()).Value()), |
| 3102 if_false_(Smi::Cast(if_false->BoundConstant()).Value()) { | 3102 if_false_(Smi::Cast(if_false->BoundConstant()).Value()) { |
| 3103 ASSERT(Token::IsEqualityOperator(kind)); | 3103 ASSERT(Token::IsEqualityOperator(kind)); |
| 3104 SetInputAt(0, left); | 3104 SetInputAt(0, left); |
| 3105 SetInputAt(1, right); | 3105 SetInputAt(1, right); |
| 3106 } | 3106 } |
| 3107 | 3107 |
| 3108 // Returns true if this instruction is supported on the current platform. | |
| 3109 static bool IsSupported(); | |
| 3110 | |
| 3111 // Returns true if this combination of comparison and values flowing on | 3108 // Returns true if this combination of comparison and values flowing on |
| 3112 // the true and false paths is supported on the current platform. | 3109 // the true and false paths is supported on the current platform. |
| 3113 static bool Supports(ComparisonInstr* comparison, Value* v1, Value* v2); | 3110 static bool Supports(ComparisonInstr* comparison, Value* v1, Value* v2); |
| 3114 | 3111 |
| 3115 DECLARE_INSTRUCTION(IfThenElse) | 3112 DECLARE_INSTRUCTION(IfThenElse) |
| 3116 | 3113 |
| 3117 virtual void PrintOperandsTo(BufferFormatter* f) const; | 3114 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 3118 | 3115 |
| 3119 virtual CompileType ComputeType() const; | 3116 virtual CompileType ComputeType() const; |
| 3120 | 3117 |
| (...skipping 3783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6904 ForwardInstructionIterator* current_iterator_; | 6901 ForwardInstructionIterator* current_iterator_; |
| 6905 | 6902 |
| 6906 private: | 6903 private: |
| 6907 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 6904 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 6908 }; | 6905 }; |
| 6909 | 6906 |
| 6910 | 6907 |
| 6911 } // namespace dart | 6908 } // namespace dart |
| 6912 | 6909 |
| 6913 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 6910 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |