| 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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 8196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8207 !other_type_arguments.IsInstantiated()) { | 8207 !other_type_arguments.IsInstantiated()) { |
| 8208 other_type_arguments = | 8208 other_type_arguments = |
| 8209 other_type_arguments.InstantiateFrom(other_instantiator); | 8209 other_type_arguments.InstantiateFrom(other_instantiator); |
| 8210 } | 8210 } |
| 8211 } | 8211 } |
| 8212 return cls.IsSubtypeOf(type_arguments, other_class, other_type_arguments, | 8212 return cls.IsSubtypeOf(type_arguments, other_class, other_type_arguments, |
| 8213 malformed_error); | 8213 malformed_error); |
| 8214 } | 8214 } |
| 8215 | 8215 |
| 8216 | 8216 |
| 8217 bool Instance::IsValidNativeIndex(int index) const { | |
| 8218 const Class& cls = Class::Handle(clazz()); | |
| 8219 return (index >= 0 && index < cls.num_native_fields()); | |
| 8220 } | |
| 8221 | |
| 8222 | |
| 8223 RawInstance* Instance::New(const Class& cls, Heap::Space space) { | 8217 RawInstance* Instance::New(const Class& cls, Heap::Space space) { |
| 8224 Instance& result = Instance::Handle(); | 8218 Instance& result = Instance::Handle(); |
| 8225 { | 8219 { |
| 8226 intptr_t instance_size = cls.instance_size(); | 8220 intptr_t instance_size = cls.instance_size(); |
| 8227 ASSERT(instance_size > 0); | 8221 ASSERT(instance_size > 0); |
| 8228 RawObject* raw = Object::Allocate(cls.id(), instance_size, space); | 8222 RawObject* raw = Object::Allocate(cls.id(), instance_size, space); |
| 8229 NoGCScope no_gc; | 8223 NoGCScope no_gc; |
| 8230 result ^= raw; | 8224 result ^= raw; |
| 8231 uword addr = reinterpret_cast<uword>(result.raw_ptr()); | 8225 uword addr = reinterpret_cast<uword>(result.raw_ptr()); |
| 8232 // Initialize fields. | 8226 // Initialize fields. |
| (...skipping 2963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11196 } | 11190 } |
| 11197 return result.raw(); | 11191 return result.raw(); |
| 11198 } | 11192 } |
| 11199 | 11193 |
| 11200 | 11194 |
| 11201 const char* WeakProperty::ToCString() const { | 11195 const char* WeakProperty::ToCString() const { |
| 11202 return "_WeakProperty"; | 11196 return "_WeakProperty"; |
| 11203 } | 11197 } |
| 11204 | 11198 |
| 11205 } // namespace dart | 11199 } // namespace dart |
| OLD | NEW |