| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
| 6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
| 7 | 7 |
| 8 #include "vm/assert.h" | 8 #include "vm/assert.h" |
| 9 #include "vm/dart.h" | 9 #include "vm/dart.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1309 | 1309 |
| 1310 static intptr_t value_offset() { return OFFSET_OF(RawField, value_); } | 1310 static intptr_t value_offset() { return OFFSET_OF(RawField, value_); } |
| 1311 | 1311 |
| 1312 intptr_t token_index() const { return raw_ptr()->token_index_; } | 1312 intptr_t token_index() const { return raw_ptr()->token_index_; } |
| 1313 | 1313 |
| 1314 bool has_initializer() const { return raw_ptr()->has_initializer_; } | 1314 bool has_initializer() const { return raw_ptr()->has_initializer_; } |
| 1315 void set_has_initializer(bool has_initializer) const { | 1315 void set_has_initializer(bool has_initializer) const { |
| 1316 raw_ptr()->has_initializer_ = has_initializer; | 1316 raw_ptr()->has_initializer_ = has_initializer; |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 // Constructs getter and setter names for fields. | 1319 // Constructs getter and setter names for fields and vice versa. |
| 1320 static RawString* GetterName(const String& field_name); | 1320 static RawString* GetterName(const String& field_name); |
| 1321 static RawString* SetterName(const String& field_name); | 1321 static RawString* SetterName(const String& field_name); |
| 1322 static RawString* NameFromGetter(const String& getter_name); |
| 1323 static RawString* NameFromSetter(const String& setter_name); |
| 1322 | 1324 |
| 1323 private: | 1325 private: |
| 1324 void set_name(const String& value) const; | 1326 void set_name(const String& value) const; |
| 1325 void set_is_static(bool is_static) const { | 1327 void set_is_static(bool is_static) const { |
| 1326 raw_ptr()->is_static_ = is_static; | 1328 raw_ptr()->is_static_ = is_static; |
| 1327 } | 1329 } |
| 1328 void set_is_final(bool is_final) const { | 1330 void set_is_final(bool is_final) const { |
| 1329 raw_ptr()->is_final_ = is_final; | 1331 raw_ptr()->is_final_ = is_final; |
| 1330 } | 1332 } |
| 1331 void set_token_index(intptr_t token_index) const { | 1333 void set_token_index(intptr_t token_index) const { |
| (...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2934 } | 2936 } |
| 2935 | 2937 |
| 2936 | 2938 |
| 2937 void Context::SetAt(intptr_t index, const Instance& value) const { | 2939 void Context::SetAt(intptr_t index, const Instance& value) const { |
| 2938 StorePointer(InstanceAddr(index), value.raw()); | 2940 StorePointer(InstanceAddr(index), value.raw()); |
| 2939 } | 2941 } |
| 2940 | 2942 |
| 2941 } // namespace dart | 2943 } // namespace dart |
| 2942 | 2944 |
| 2943 #endif // VM_OBJECT_H_ | 2945 #endif // VM_OBJECT_H_ |
| OLD | NEW |