| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #include "vm/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/become.h" | 10 #include "vm/become.h" |
| (...skipping 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2069 ASSERT(is_finalized()); | 2069 ASSERT(is_finalized()); |
| 2070 const intptr_t length = raw_ptr()->instance_size_in_words_; | 2070 const intptr_t length = raw_ptr()->instance_size_in_words_; |
| 2071 array = Array::New(length, Heap::kOld); | 2071 array = Array::New(length, Heap::kOld); |
| 2072 Class& cls = Class::Handle(this->raw()); | 2072 Class& cls = Class::Handle(this->raw()); |
| 2073 Array& fields = Array::Handle(); | 2073 Array& fields = Array::Handle(); |
| 2074 Field& f = Field::Handle(); | 2074 Field& f = Field::Handle(); |
| 2075 while (!cls.IsNull()) { | 2075 while (!cls.IsNull()) { |
| 2076 fields = cls.fields(); | 2076 fields = cls.fields(); |
| 2077 for (intptr_t i = 0; i < fields.Length(); ++i) { | 2077 for (intptr_t i = 0; i < fields.Length(); ++i) { |
| 2078 f ^= fields.At(i); | 2078 f ^= fields.At(i); |
| 2079 if (!f.is_static()) { | 2079 if (f.is_instance()) { |
| 2080 array.SetAt(f.Offset() >> kWordSizeLog2, f); | 2080 array.SetAt(f.Offset() >> kWordSizeLog2, f); |
| 2081 } | 2081 } |
| 2082 } | 2082 } |
| 2083 cls = cls.SuperClass(); | 2083 cls = cls.SuperClass(); |
| 2084 } | 2084 } |
| 2085 StorePointer(&raw_ptr()->offset_in_words_to_field_, array.raw()); | 2085 StorePointer(&raw_ptr()->offset_in_words_to_field_, array.raw()); |
| 2086 } | 2086 } |
| 2087 return array.raw(); | 2087 return array.raw(); |
| 2088 } | 2088 } |
| 2089 | 2089 |
| (...skipping 20611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22701 return UserTag::null(); | 22701 return UserTag::null(); |
| 22702 } | 22702 } |
| 22703 | 22703 |
| 22704 | 22704 |
| 22705 const char* UserTag::ToCString() const { | 22705 const char* UserTag::ToCString() const { |
| 22706 const String& tag_label = String::Handle(label()); | 22706 const String& tag_label = String::Handle(label()); |
| 22707 return tag_label.ToCString(); | 22707 return tag_label.ToCString(); |
| 22708 } | 22708 } |
| 22709 | 22709 |
| 22710 } // namespace dart | 22710 } // namespace dart |
| OLD | NEW |