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 3677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3688 LoadCodeUnitsInstr(Value* str, | 3688 LoadCodeUnitsInstr(Value* str, |
3689 Value* index, | 3689 Value* index, |
3690 intptr_t element_count, | 3690 intptr_t element_count, |
3691 intptr_t class_id, | 3691 intptr_t class_id, |
3692 intptr_t token_pos) | 3692 intptr_t token_pos) |
3693 : class_id_(class_id), | 3693 : class_id_(class_id), |
3694 token_pos_(token_pos), | 3694 token_pos_(token_pos), |
3695 element_count_(element_count), | 3695 element_count_(element_count), |
3696 representation_(kTagged) { | 3696 representation_(kTagged) { |
3697 ASSERT(element_count == 1 || element_count == 2 || element_count == 4); | 3697 ASSERT(element_count == 1 || element_count == 2 || element_count == 4); |
3698 ASSERT(class_id == kOneByteStringCid || class_id == kTwoByteStringCid); | 3698 ASSERT(RawObject::IsStringClassId(class_id)); |
3699 SetInputAt(0, str); | 3699 SetInputAt(0, str); |
3700 SetInputAt(1, index); | 3700 SetInputAt(1, index); |
3701 } | 3701 } |
3702 | 3702 |
3703 intptr_t token_pos() const { return token_pos_; } | 3703 intptr_t token_pos() const { return token_pos_; } |
3704 | 3704 |
3705 DECLARE_INSTRUCTION(LoadCodeUnits) | 3705 DECLARE_INSTRUCTION(LoadCodeUnits) |
3706 virtual CompileType ComputeType() const; | 3706 virtual CompileType ComputeType() const; |
3707 | 3707 |
3708 bool IsExternal() const { | 3708 bool IsExternal() const { |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4206 LoadUntaggedInstr(Value* object, intptr_t offset) : offset_(offset) { | 4206 LoadUntaggedInstr(Value* object, intptr_t offset) : offset_(offset) { |
4207 SetInputAt(0, object); | 4207 SetInputAt(0, object); |
4208 } | 4208 } |
4209 | 4209 |
4210 virtual Representation representation() const { | 4210 virtual Representation representation() const { |
4211 return kUntagged; | 4211 return kUntagged; |
4212 } | 4212 } |
4213 DECLARE_INSTRUCTION(LoadUntagged) | 4213 DECLARE_INSTRUCTION(LoadUntagged) |
4214 virtual CompileType ComputeType() const; | 4214 virtual CompileType ComputeType() const; |
4215 | 4215 |
| 4216 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 4217 ASSERT(idx == 0); |
| 4218 // The object may be tagged or untagged (for external objects). |
| 4219 return kNoRepresentation; |
| 4220 } |
| 4221 |
4216 Value* object() const { return inputs_[0]; } | 4222 Value* object() const { return inputs_[0]; } |
4217 intptr_t offset() const { return offset_; } | 4223 intptr_t offset() const { return offset_; } |
4218 | 4224 |
4219 virtual bool CanDeoptimize() const { return false; } | 4225 virtual bool CanDeoptimize() const { return false; } |
4220 | 4226 |
4221 virtual EffectSet Effects() const { return EffectSet::None(); } | 4227 virtual EffectSet Effects() const { return EffectSet::None(); } |
4222 virtual bool AttributesEqual(Instruction* other) const { return true; } | 4228 virtual bool AttributesEqual(Instruction* other) const { return true; } |
4223 | 4229 |
4224 private: | 4230 private: |
4225 intptr_t offset_; | 4231 intptr_t offset_; |
(...skipping 3744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7970 Isolate* isolate, bool opt) const { \ | 7976 Isolate* isolate, bool opt) const { \ |
7971 UNIMPLEMENTED(); \ | 7977 UNIMPLEMENTED(); \ |
7972 return NULL; \ | 7978 return NULL; \ |
7973 } \ | 7979 } \ |
7974 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 7980 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
7975 | 7981 |
7976 | 7982 |
7977 } // namespace dart | 7983 } // namespace dart |
7978 | 7984 |
7979 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 7985 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |