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 3445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3456 | 3456 |
3457 | 3457 |
3458 class StoreInstanceFieldInstr : public TemplateDefinition<2, NoThrow> { | 3458 class StoreInstanceFieldInstr : public TemplateDefinition<2, NoThrow> { |
3459 public: | 3459 public: |
3460 StoreInstanceFieldInstr(const Field& field, | 3460 StoreInstanceFieldInstr(const Field& field, |
3461 Value* instance, | 3461 Value* instance, |
3462 Value* value, | 3462 Value* value, |
3463 StoreBarrierType emit_store_barrier, | 3463 StoreBarrierType emit_store_barrier, |
3464 intptr_t token_pos) | 3464 intptr_t token_pos) |
3465 : field_(field), | 3465 : field_(field), |
3466 offset_in_bytes_(field.Offset()), | 3466 offset_in_bytes_(field.InstanceFieldOffset()), |
3467 emit_store_barrier_(emit_store_barrier), | 3467 emit_store_barrier_(emit_store_barrier), |
3468 token_pos_(token_pos), | 3468 token_pos_(token_pos), |
3469 is_potential_unboxed_initialization_(false), | 3469 is_potential_unboxed_initialization_(false), |
3470 is_object_reference_initialization_(false) { | 3470 is_object_reference_initialization_(false) { |
3471 SetInputAt(kInstancePos, instance); | 3471 SetInputAt(kInstancePos, instance); |
3472 SetInputAt(kValuePos, value); | 3472 SetInputAt(kValuePos, value); |
3473 } | 3473 } |
3474 | 3474 |
3475 StoreInstanceFieldInstr(intptr_t offset_in_bytes, | 3475 StoreInstanceFieldInstr(intptr_t offset_in_bytes, |
3476 Value* instance, | 3476 Value* instance, |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4168 | 4168 |
4169 Definition* allocation() const { return allocation_; } | 4169 Definition* allocation() const { return allocation_; } |
4170 const Class& cls() const { return cls_; } | 4170 const Class& cls() const { return cls_; } |
4171 | 4171 |
4172 intptr_t num_variables() const { | 4172 intptr_t num_variables() const { |
4173 return num_variables_; | 4173 return num_variables_; |
4174 } | 4174 } |
4175 | 4175 |
4176 intptr_t FieldOffsetAt(intptr_t i) const { | 4176 intptr_t FieldOffsetAt(intptr_t i) const { |
4177 return slots_[i]->IsField() | 4177 return slots_[i]->IsField() |
4178 ? Field::Cast(*slots_[i]).Offset() | 4178 ? Field::Cast(*slots_[i]).InstanceFieldOffset() |
4179 : Smi::Cast(*slots_[i]).Value(); | 4179 : Smi::Cast(*slots_[i]).Value(); |
4180 } | 4180 } |
4181 | 4181 |
4182 const Location& LocationAt(intptr_t i) { | 4182 const Location& LocationAt(intptr_t i) { |
4183 return locations_[i]; | 4183 return locations_[i]; |
4184 } | 4184 } |
4185 | 4185 |
4186 DECLARE_INSTRUCTION(MaterializeObject) | 4186 DECLARE_INSTRUCTION(MaterializeObject) |
4187 virtual void PrintOperandsTo(BufferFormatter* f) const; | 4187 virtual void PrintOperandsTo(BufferFormatter* f) const; |
4188 | 4188 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4361 token_pos_(token_pos) { | 4361 token_pos_(token_pos) { |
4362 ASSERT(offset_in_bytes >= 0); | 4362 ASSERT(offset_in_bytes >= 0); |
4363 ASSERT(type.IsZoneHandle()); // May be null if field is not an instance. | 4363 ASSERT(type.IsZoneHandle()); // May be null if field is not an instance. |
4364 SetInputAt(0, instance); | 4364 SetInputAt(0, instance); |
4365 } | 4365 } |
4366 | 4366 |
4367 LoadFieldInstr(Value* instance, | 4367 LoadFieldInstr(Value* instance, |
4368 const Field* field, | 4368 const Field* field, |
4369 const AbstractType& type, | 4369 const AbstractType& type, |
4370 intptr_t token_pos) | 4370 intptr_t token_pos) |
4371 : offset_in_bytes_(field->Offset()), | 4371 : offset_in_bytes_(field->InstanceFieldOffset()), |
4372 type_(type), | 4372 type_(type), |
4373 result_cid_(kDynamicCid), | 4373 result_cid_(kDynamicCid), |
4374 immutable_(false), | 4374 immutable_(false), |
4375 recognized_kind_(MethodRecognizer::kUnknown), | 4375 recognized_kind_(MethodRecognizer::kUnknown), |
4376 field_(field), | 4376 field_(field), |
4377 token_pos_(token_pos) { | 4377 token_pos_(token_pos) { |
4378 ASSERT(field->IsZoneHandle()); | 4378 ASSERT(field->IsZoneHandle()); |
4379 ASSERT(type.IsZoneHandle()); // May be null if field is not an instance. | 4379 ASSERT(type.IsZoneHandle()); // May be null if field is not an instance. |
4380 SetInputAt(0, instance); | 4380 SetInputAt(0, instance); |
4381 } | 4381 } |
(...skipping 3723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8105 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8105 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
8106 UNIMPLEMENTED(); \ | 8106 UNIMPLEMENTED(); \ |
8107 return NULL; \ | 8107 return NULL; \ |
8108 } \ | 8108 } \ |
8109 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8109 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
8110 | 8110 |
8111 | 8111 |
8112 } // namespace dart | 8112 } // namespace dart |
8113 | 8113 |
8114 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8114 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |