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 RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ |
6 #define RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define RUNTIME_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 4537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4548 | 4548 |
4549 DECLARE_INSTRUCTION(LoadField) | 4549 DECLARE_INSTRUCTION(LoadField) |
4550 virtual CompileType ComputeType() const; | 4550 virtual CompileType ComputeType() const; |
4551 | 4551 |
4552 virtual bool ComputeCanDeoptimize() const { return false; } | 4552 virtual bool ComputeCanDeoptimize() const { return false; } |
4553 | 4553 |
4554 virtual void InferRange(RangeAnalysis* analysis, Range* range); | 4554 virtual void InferRange(RangeAnalysis* analysis, Range* range); |
4555 | 4555 |
4556 bool IsImmutableLengthLoad() const; | 4556 bool IsImmutableLengthLoad() const; |
4557 | 4557 |
| 4558 // Try evaluating this load against the given constant value of |
| 4559 // the instance. Returns true if evaluation succeeded and |
| 4560 // puts result into result. |
| 4561 // Note: we only evaluate loads when we can ensure that |
| 4562 // instance has the field. |
| 4563 bool Evaluate(const Object& instance_value, Object* result); |
| 4564 |
4558 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 4565 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
4559 | 4566 |
4560 static MethodRecognizer::Kind RecognizedKindFromArrayCid(intptr_t cid); | 4567 static MethodRecognizer::Kind RecognizedKindFromArrayCid(intptr_t cid); |
4561 | 4568 |
4562 static bool IsFixedLengthArrayCid(intptr_t cid); | 4569 static bool IsFixedLengthArrayCid(intptr_t cid); |
4563 | 4570 |
4564 virtual bool AllowsCSE() const { return immutable_; } | 4571 virtual bool AllowsCSE() const { return immutable_; } |
4565 virtual EffectSet Effects() const { return EffectSet::None(); } | 4572 virtual EffectSet Effects() const { return EffectSet::None(); } |
4566 virtual EffectSet Dependencies() const; | 4573 virtual EffectSet Dependencies() const; |
4567 virtual bool AttributesEqual(Instruction* other) const; | 4574 virtual bool AttributesEqual(Instruction* other) const; |
(...skipping 3646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8214 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8221 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
8215 UNIMPLEMENTED(); \ | 8222 UNIMPLEMENTED(); \ |
8216 return NULL; \ | 8223 return NULL; \ |
8217 } \ | 8224 } \ |
8218 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8225 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
8219 | 8226 |
8220 | 8227 |
8221 } // namespace dart | 8228 } // namespace dart |
8222 | 8229 |
8223 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 8230 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |