| 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 #ifndef VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
| 6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 | 330 |
| 331 static Object& ZoneHandle() { | 331 static Object& ZoneHandle() { |
| 332 return ZoneHandle(Isolate::Current(), null_); | 332 return ZoneHandle(Isolate::Current(), null_); |
| 333 } | 333 } |
| 334 | 334 |
| 335 static Object& ZoneHandle(RawObject* raw_ptr) { | 335 static Object& ZoneHandle(RawObject* raw_ptr) { |
| 336 return ZoneHandle(Isolate::Current(), raw_ptr); | 336 return ZoneHandle(Isolate::Current(), raw_ptr); |
| 337 } | 337 } |
| 338 | 338 |
| 339 static RawObject* null() { return null_; } | 339 static RawObject* null() { return null_; } |
| 340 |
| 340 static const Object& null_object() { | 341 static const Object& null_object() { |
| 341 ASSERT(null_object_ != NULL); | 342 ASSERT(null_object_ != NULL); |
| 342 return *null_object_; | 343 return *null_object_; |
| 343 } | 344 } |
| 344 static const Array& null_array() { | 345 static const Array& null_array() { |
| 345 ASSERT(null_array_ != NULL); | 346 ASSERT(null_array_ != NULL); |
| 346 return *null_array_; | 347 return *null_array_; |
| 347 } | 348 } |
| 348 static const String& null_string() { | 349 static const String& null_string() { |
| 349 ASSERT(null_string_ != NULL); | 350 ASSERT(null_string_ != NULL); |
| 350 return *null_string_; | 351 return *null_string_; |
| 351 } | 352 } |
| 352 static const Instance& null_instance() { | 353 static const Instance& null_instance() { |
| 353 ASSERT(null_instance_ != NULL); | 354 ASSERT(null_instance_ != NULL); |
| 354 return *null_instance_; | 355 return *null_instance_; |
| 355 } | 356 } |
| 356 static const AbstractTypeArguments& null_abstract_type_arguments() { | 357 static const AbstractTypeArguments& null_abstract_type_arguments() { |
| 357 ASSERT(null_abstract_type_arguments_ != NULL); | 358 ASSERT(null_abstract_type_arguments_ != NULL); |
| 358 return *null_abstract_type_arguments_; | 359 return *null_abstract_type_arguments_; |
| 359 } | 360 } |
| 361 |
| 360 static const Array& empty_array() { | 362 static const Array& empty_array() { |
| 361 ASSERT(empty_array_ != NULL); | 363 ASSERT(empty_array_ != NULL); |
| 362 return *empty_array_; | 364 return *empty_array_; |
| 363 } | 365 } |
| 364 | 366 |
| 365 // The sentinel is a value that cannot be produced by Dart code. | 367 // The sentinel is a value that cannot be produced by Dart code. |
| 366 // It can be used to mark special values, for example to distinguish | 368 // It can be used to mark special values, for example to distinguish |
| 367 // "uninitialized" fields. | 369 // "uninitialized" fields. |
| 368 static const Instance& sentinel() { | 370 static const Instance& sentinel() { |
| 369 ASSERT(sentinel_ != NULL); | 371 ASSERT(sentinel_ != NULL); |
| (...skipping 5788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6158 | 6160 |
| 6159 | 6161 |
| 6160 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6162 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6161 intptr_t index) { | 6163 intptr_t index) { |
| 6162 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6164 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6163 } | 6165 } |
| 6164 | 6166 |
| 6165 } // namespace dart | 6167 } // namespace dart |
| 6166 | 6168 |
| 6167 #endif // VM_OBJECT_H_ | 6169 #endif // VM_OBJECT_H_ |
| OLD | NEW |