Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(610)

Side by Side Diff: runtime/vm/object_store.cc

Issue 10832199: Add a weak property type to the virtual machine. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: minor clean-up Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "vm/object_store.h" 5 #include "vm/object_store.h"
6 6
7 #include "vm/exceptions.h" 7 #include "vm/exceptions.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/raw_object.h" 10 #include "vm/raw_object.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 external_int16_array_class_(Class::null()), 52 external_int16_array_class_(Class::null()),
53 external_uint16_array_class_(Class::null()), 53 external_uint16_array_class_(Class::null()),
54 external_int32_array_class_(Class::null()), 54 external_int32_array_class_(Class::null()),
55 external_uint32_array_class_(Class::null()), 55 external_uint32_array_class_(Class::null()),
56 external_int64_array_class_(Class::null()), 56 external_int64_array_class_(Class::null()),
57 external_uint64_array_class_(Class::null()), 57 external_uint64_array_class_(Class::null()),
58 external_float32_array_class_(Class::null()), 58 external_float32_array_class_(Class::null()),
59 external_float64_array_class_(Class::null()), 59 external_float64_array_class_(Class::null()),
60 stacktrace_class_(Class::null()), 60 stacktrace_class_(Class::null()),
61 jsregexp_class_(Class::null()), 61 jsregexp_class_(Class::null()),
62 weak_property_class_(Class::null()),
62 true_value_(Bool::null()), 63 true_value_(Bool::null()),
63 false_value_(Bool::null()), 64 false_value_(Bool::null()),
64 empty_array_(Array::null()), 65 empty_array_(Array::null()),
65 symbol_table_(Array::null()), 66 symbol_table_(Array::null()),
66 canonical_type_arguments_(Array::null()), 67 canonical_type_arguments_(Array::null()),
67 core_library_(Library::null()), 68 core_library_(Library::null()),
68 core_impl_library_(Library::null()), 69 core_impl_library_(Library::null()),
69 math_library_(Library::null()), 70 math_library_(Library::null()),
70 isolate_library_(Library::null()), 71 isolate_library_(Library::null()),
71 mirrors_library_(Library::null()), 72 mirrors_library_(Library::null()),
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 case kExternalInt16ArrayClass: return external_int16_array_class_; 171 case kExternalInt16ArrayClass: return external_int16_array_class_;
171 case kExternalUint16ArrayClass: return external_uint16_array_class_; 172 case kExternalUint16ArrayClass: return external_uint16_array_class_;
172 case kExternalInt32ArrayClass: return external_int32_array_class_; 173 case kExternalInt32ArrayClass: return external_int32_array_class_;
173 case kExternalUint32ArrayClass: return external_uint32_array_class_; 174 case kExternalUint32ArrayClass: return external_uint32_array_class_;
174 case kExternalInt64ArrayClass: return external_int64_array_class_; 175 case kExternalInt64ArrayClass: return external_int64_array_class_;
175 case kExternalUint64ArrayClass: return external_uint64_array_class_; 176 case kExternalUint64ArrayClass: return external_uint64_array_class_;
176 case kExternalFloat32ArrayClass: return external_float32_array_class_; 177 case kExternalFloat32ArrayClass: return external_float32_array_class_;
177 case kExternalFloat64ArrayClass: return external_float64_array_class_; 178 case kExternalFloat64ArrayClass: return external_float64_array_class_;
178 case kStacktraceClass: return stacktrace_class_; 179 case kStacktraceClass: return stacktrace_class_;
179 case kJSRegExpClass: return jsregexp_class_; 180 case kJSRegExpClass: return jsregexp_class_;
181 case kWeakPropertyClass: return weak_property_class_;
180 default: break; 182 default: break;
181 } 183 }
182 UNREACHABLE(); 184 UNREACHABLE();
183 return Class::null(); 185 return Class::null();
184 } 186 }
185 187
186 188
187 int ObjectStore::GetClassIndex(const RawClass* raw_class) { 189 int ObjectStore::GetClassIndex(const RawClass* raw_class) {
188 ASSERT(raw_class->IsHeapObject()); 190 ASSERT(raw_class->IsHeapObject());
189 if (raw_class == object_class_) { 191 if (raw_class == object_class_) {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 return kStringInterface; 314 return kStringInterface;
313 } else if (raw_type == list_interface()) { 315 } else if (raw_type == list_interface()) {
314 return kListInterface; 316 return kListInterface;
315 } else if (raw_type == byte_array_interface()) { 317 } else if (raw_type == byte_array_interface()) {
316 return kByteArrayInterface; 318 return kByteArrayInterface;
317 } 319 }
318 return kInvalidIndex; 320 return kInvalidIndex;
319 } 321 }
320 322
321 } // namespace dart 323 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698