| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 CompileType* Type(); | 254 CompileType* Type(); |
| 255 | 255 |
| 256 void SetReachingType(CompileType* type) { | 256 void SetReachingType(CompileType* type) { |
| 257 reaching_type_ = type; | 257 reaching_type_ = type; |
| 258 } | 258 } |
| 259 | 259 |
| 260 void PrintTo(BufferFormatter* f) const; | 260 void PrintTo(BufferFormatter* f) const; |
| 261 | 261 |
| 262 const char* DebugName() const { return "Value"; } | 262 const char* DebugName() const { return "Value"; } |
| 263 | 263 |
| 264 bool IsSmiValue() { return Type()->ToCid() == kSmiCid; } |
| 265 |
| 264 // Return true if the value represents a constant. | 266 // Return true if the value represents a constant. |
| 265 bool BindsToConstant() const; | 267 bool BindsToConstant() const; |
| 266 | 268 |
| 267 // Return true if the value represents the constant null. | 269 // Return true if the value represents the constant null. |
| 268 bool BindsToConstantNull() const; | 270 bool BindsToConstantNull() const; |
| 269 | 271 |
| 270 // Assert if BindsToConstant() is false, otherwise returns the constant value. | 272 // Assert if BindsToConstant() is false, otherwise returns the constant value. |
| 271 const Object& BoundConstant() const; | 273 const Object& BoundConstant() const; |
| 272 | 274 |
| 273 // Compile time constants, Bool, Smi and Nulls do not need to update | 275 // Compile time constants, Bool, Smi and Nulls do not need to update |
| (...skipping 4181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4455 ForwardInstructionIterator* current_iterator_; | 4457 ForwardInstructionIterator* current_iterator_; |
| 4456 | 4458 |
| 4457 private: | 4459 private: |
| 4458 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 4460 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 4459 }; | 4461 }; |
| 4460 | 4462 |
| 4461 | 4463 |
| 4462 } // namespace dart | 4464 } // namespace dart |
| 4463 | 4465 |
| 4464 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 4466 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |