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

Side by Side Diff: runtime/vm/object.h

Issue 22638011: Move Null class out of the VM isolate. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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) 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 ASSERT(snapshot_writer_error_ != NULL); 403 ASSERT(snapshot_writer_error_ != NULL);
404 return *snapshot_writer_error_; 404 return *snapshot_writer_error_;
405 } 405 }
406 406
407 static const LanguageError& branch_offset_error() { 407 static const LanguageError& branch_offset_error() {
408 ASSERT(branch_offset_error_ != NULL); 408 ASSERT(branch_offset_error_ != NULL);
409 return *branch_offset_error_; 409 return *branch_offset_error_;
410 } 410 }
411 411
412 static RawClass* class_class() { return class_class_; } 412 static RawClass* class_class() { return class_class_; }
413 static RawClass* null_class() { return null_class_; }
414 static RawClass* dynamic_class() { return dynamic_class_; } 413 static RawClass* dynamic_class() { return dynamic_class_; }
415 static RawClass* void_class() { return void_class_; } 414 static RawClass* void_class() { return void_class_; }
416 static RawClass* unresolved_class_class() { return unresolved_class_class_; } 415 static RawClass* unresolved_class_class() { return unresolved_class_class_; }
417 static RawClass* type_arguments_class() { return type_arguments_class_; } 416 static RawClass* type_arguments_class() { return type_arguments_class_; }
418 static RawClass* instantiated_type_arguments_class() { 417 static RawClass* instantiated_type_arguments_class() {
419 return instantiated_type_arguments_class_; 418 return instantiated_type_arguments_class_;
420 } 419 }
421 static RawClass* patch_class_class() { return patch_class_class_; } 420 static RawClass* patch_class_class() { return patch_class_class_; }
422 static RawClass* function_class() { return function_class_; } 421 static RawClass* function_class() { return function_class_; }
423 static RawClass* closure_data_class() { return closure_data_class_; } 422 static RawClass* closure_data_class() { return closure_data_class_; }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 } 550 }
552 551
553 static cpp_vtable handle_vtable_; 552 static cpp_vtable handle_vtable_;
554 static cpp_vtable builtin_vtables_[kNumPredefinedCids]; 553 static cpp_vtable builtin_vtables_[kNumPredefinedCids];
555 554
556 // The static values below are singletons shared between the different 555 // The static values below are singletons shared between the different
557 // isolates. They are all allocated in the non-GC'd Dart::vm_isolate_. 556 // isolates. They are all allocated in the non-GC'd Dart::vm_isolate_.
558 static RawObject* null_; 557 static RawObject* null_;
559 558
560 static RawClass* class_class_; // Class of the Class vm object. 559 static RawClass* class_class_; // Class of the Class vm object.
561 static RawClass* null_class_; // Class of the null object.
562 static RawClass* dynamic_class_; // Class of the 'dynamic' type. 560 static RawClass* dynamic_class_; // Class of the 'dynamic' type.
563 static RawClass* void_class_; // Class of the 'void' type. 561 static RawClass* void_class_; // Class of the 'void' type.
564 static RawClass* unresolved_class_class_; // Class of UnresolvedClass. 562 static RawClass* unresolved_class_class_; // Class of UnresolvedClass.
565 // Class of the TypeArguments vm object. 563 // Class of the TypeArguments vm object.
566 static RawClass* type_arguments_class_; 564 static RawClass* type_arguments_class_;
567 static RawClass* instantiated_type_arguments_class_; // Class of Inst..ments. 565 static RawClass* instantiated_type_arguments_class_; // Class of Inst..ments.
568 static RawClass* patch_class_class_; // Class of the PatchClass vm object. 566 static RawClass* patch_class_class_; // Class of the PatchClass vm object.
569 static RawClass* function_class_; // Class of the Function vm object. 567 static RawClass* function_class_; // Class of the Function vm object.
570 static RawClass* closure_data_class_; // Class of ClosureData vm obj. 568 static RawClass* closure_data_class_; // Class of ClosureData vm obj.
571 static RawClass* redirection_data_class_; // Class of RedirectionData vm obj. 569 static RawClass* redirection_data_class_; // Class of RedirectionData vm obj.
(...skipping 3172 matching lines...) Expand 10 before | Expand all | Expand 10 after
3744 // The name of this type's class, i.e. without the type argument names of this 3742 // The name of this type's class, i.e. without the type argument names of this
3745 // type. 3743 // type.
3746 RawString* ClassName() const; 3744 RawString* ClassName() const;
3747 3745
3748 // Check if this type represents the 'dynamic' type. 3746 // Check if this type represents the 'dynamic' type.
3749 bool IsDynamicType() const { 3747 bool IsDynamicType() const {
3750 return HasResolvedTypeClass() && (type_class() == Object::dynamic_class()); 3748 return HasResolvedTypeClass() && (type_class() == Object::dynamic_class());
3751 } 3749 }
3752 3750
3753 // Check if this type represents the 'Null' type. 3751 // Check if this type represents the 'Null' type.
3754 bool IsNullType() const { 3752 bool IsNullType() const;
3755 return HasResolvedTypeClass() && (type_class() == Object::null_class());
3756 }
3757 3753
3758 // Check if this type represents the 'void' type. 3754 // Check if this type represents the 'void' type.
3759 bool IsVoidType() const { 3755 bool IsVoidType() const {
3760 return HasResolvedTypeClass() && (type_class() == Object::void_class()); 3756 return HasResolvedTypeClass() && (type_class() == Object::void_class());
3761 } 3757 }
3762 3758
3763 bool IsObjectType() const { 3759 bool IsObjectType() const {
3764 return HasResolvedTypeClass() && 3760 return HasResolvedTypeClass() &&
3765 Class::Handle(type_class()).IsObjectClass(); 3761 Class::Handle(type_class()).IsObjectClass();
3766 } 3762 }
(...skipping 2286 matching lines...) Expand 10 before | Expand all | Expand 10 after
6053 6049
6054 6050
6055 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6051 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6056 intptr_t index) { 6052 intptr_t index) {
6057 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6053 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6058 } 6054 }
6059 6055
6060 } // namespace dart 6056 } // namespace dart
6061 6057
6062 #endif // VM_OBJECT_H_ 6058 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698