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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 } | 360 } |
361 static const TypeArguments& null_type_arguments() { | 361 static const TypeArguments& null_type_arguments() { |
362 ASSERT(null_type_arguments_ != NULL); | 362 ASSERT(null_type_arguments_ != NULL); |
363 return *null_type_arguments_; | 363 return *null_type_arguments_; |
364 } | 364 } |
365 | 365 |
366 static const Array& empty_array() { | 366 static const Array& empty_array() { |
367 ASSERT(empty_array_ != NULL); | 367 ASSERT(empty_array_ != NULL); |
368 return *empty_array_; | 368 return *empty_array_; |
369 } | 369 } |
| 370 static const Array& zero_array() { |
| 371 ASSERT(zero_array_ != NULL); |
| 372 return *zero_array_; |
| 373 } |
370 | 374 |
371 static const PcDescriptors& empty_descriptors() { | 375 static const PcDescriptors& empty_descriptors() { |
372 ASSERT(empty_descriptors_ != NULL); | 376 ASSERT(empty_descriptors_ != NULL); |
373 return *empty_descriptors_; | 377 return *empty_descriptors_; |
374 } | 378 } |
375 | 379 |
376 // The sentinel is a value that cannot be produced by Dart code. | 380 // The sentinel is a value that cannot be produced by Dart code. |
377 // It can be used to mark special values, for example to distinguish | 381 // It can be used to mark special values, for example to distinguish |
378 // "uninitialized" fields. | 382 // "uninitialized" fields. |
379 static const Instance& sentinel() { | 383 static const Instance& sentinel() { |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 static RawClass* unwind_error_class_; // Class of UnwindError. | 611 static RawClass* unwind_error_class_; // Class of UnwindError. |
608 | 612 |
609 // The static values below are read-only handle pointers for singleton | 613 // The static values below are read-only handle pointers for singleton |
610 // objects that are shared between the different isolates. | 614 // objects that are shared between the different isolates. |
611 static Object* null_object_; | 615 static Object* null_object_; |
612 static Array* null_array_; | 616 static Array* null_array_; |
613 static String* null_string_; | 617 static String* null_string_; |
614 static Instance* null_instance_; | 618 static Instance* null_instance_; |
615 static TypeArguments* null_type_arguments_; | 619 static TypeArguments* null_type_arguments_; |
616 static Array* empty_array_; | 620 static Array* empty_array_; |
| 621 static Array* zero_array_; |
617 static PcDescriptors* empty_descriptors_; | 622 static PcDescriptors* empty_descriptors_; |
618 static Instance* sentinel_; | 623 static Instance* sentinel_; |
619 static Instance* transition_sentinel_; | 624 static Instance* transition_sentinel_; |
620 static Instance* unknown_constant_; | 625 static Instance* unknown_constant_; |
621 static Instance* non_constant_; | 626 static Instance* non_constant_; |
622 static Bool* bool_true_; | 627 static Bool* bool_true_; |
623 static Bool* bool_false_; | 628 static Bool* bool_false_; |
624 static Smi* smi_illegal_cid_; | 629 static Smi* smi_illegal_cid_; |
625 static LanguageError* snapshot_writer_error_; | 630 static LanguageError* snapshot_writer_error_; |
626 static LanguageError* branch_offset_error_; | 631 static LanguageError* branch_offset_error_; |
(...skipping 5989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6616 | 6621 |
6617 | 6622 |
6618 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6623 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
6619 intptr_t index) { | 6624 intptr_t index) { |
6620 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6625 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
6621 } | 6626 } |
6622 | 6627 |
6623 } // namespace dart | 6628 } // namespace dart |
6624 | 6629 |
6625 #endif // VM_OBJECT_H_ | 6630 #endif // VM_OBJECT_H_ |
OLD | NEW |