| 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/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 #if defined(DEBUG) | 857 #if defined(DEBUG) |
| 858 Isolate* isolate = Isolate::Current(); | 858 Isolate* isolate = Isolate::Current(); |
| 859 ASSERT(isolate != NULL); | 859 ASSERT(isolate != NULL); |
| 860 Class& cls = Class::Handle(isolate, Class::null()); | 860 Class& cls = Class::Handle(isolate, Class::null()); |
| 861 for (intptr_t cid = (kIllegalCid + 1); cid < kNumPredefinedCids; cid++) { | 861 for (intptr_t cid = (kIllegalCid + 1); cid < kNumPredefinedCids; cid++) { |
| 862 if (isolate->class_table()->HasValidClassAt(cid)) { | 862 if (isolate->class_table()->HasValidClassAt(cid)) { |
| 863 cls ^= isolate->class_table()->At(cid); | 863 cls ^= isolate->class_table()->At(cid); |
| 864 ASSERT(builtin_vtables_[cid] == cls.raw_ptr()->handle_vtable_); | 864 ASSERT(builtin_vtables_[cid] == cls.raw_ptr()->handle_vtable_); |
| 865 } | 865 } |
| 866 } | 866 } |
| 867 ASSERT(builtin_vtables_[kFreeListElement] == 0); |
| 867 #endif | 868 #endif |
| 868 } | 869 } |
| 869 | 870 |
| 870 | 871 |
| 871 void Object::RegisterClass(const Class& cls, | 872 void Object::RegisterClass(const Class& cls, |
| 872 const String& name, | 873 const String& name, |
| 873 const Library& lib) { | 874 const Library& lib) { |
| 874 ASSERT(name.Length() > 0); | 875 ASSERT(name.Length() > 0); |
| 875 ASSERT(name.CharAt(0) != '_'); | 876 ASSERT(name.CharAt(0) != '_'); |
| 876 cls.set_name(name); | 877 cls.set_name(name); |
| (...skipping 17076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17953 return "_MirrorReference"; | 17954 return "_MirrorReference"; |
| 17954 } | 17955 } |
| 17955 | 17956 |
| 17956 | 17957 |
| 17957 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 17958 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
| 17958 Instance::PrintToJSONStream(stream, ref); | 17959 Instance::PrintToJSONStream(stream, ref); |
| 17959 } | 17960 } |
| 17960 | 17961 |
| 17961 | 17962 |
| 17962 } // namespace dart | 17963 } // namespace dart |
| OLD | NEW |