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

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

Issue 1686773002: Precompilation: drop unused types and type arguments and empty classes and libraries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « runtime/vm/class_table.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 void set_interfaces(const Array& value) const; 1083 void set_interfaces(const Array& value) const;
1084 static intptr_t interfaces_offset() { 1084 static intptr_t interfaces_offset() {
1085 return OFFSET_OF(RawClass, interfaces_); 1085 return OFFSET_OF(RawClass, interfaces_);
1086 } 1086 }
1087 1087
1088 // Returns the list of classes having this class as direct superclass. 1088 // Returns the list of classes having this class as direct superclass.
1089 RawGrowableObjectArray* direct_subclasses() const { 1089 RawGrowableObjectArray* direct_subclasses() const {
1090 return raw_ptr()->direct_subclasses_; 1090 return raw_ptr()->direct_subclasses_;
1091 } 1091 }
1092 void AddDirectSubclass(const Class& subclass) const; 1092 void AddDirectSubclass(const Class& subclass) const;
1093 void ClearDirectSubclasses() const;
1093 1094
1094 // Check if this class represents the class of null. 1095 // Check if this class represents the class of null.
1095 bool IsNullClass() const { return id() == kNullCid; } 1096 bool IsNullClass() const { return id() == kNullCid; }
1096 1097
1097 // Check if this class represents the 'dynamic' class. 1098 // Check if this class represents the 'dynamic' class.
1098 bool IsDynamicClass() const { return id() == kDynamicCid; } 1099 bool IsDynamicClass() const { return id() == kDynamicCid; }
1099 1100
1100 // Check if this class represents the 'void' class. 1101 // Check if this class represents the 'void' class.
1101 bool IsVoidClass() const { return id() == kVoidCid; } 1102 bool IsVoidClass() const { return id() == kVoidCid; }
1102 1103
(...skipping 2404 matching lines...) Expand 10 before | Expand all | Expand 10 after
3507 3508
3508 // Library imports. 3509 // Library imports.
3509 RawArray* imports() const { return raw_ptr()->imports_; } 3510 RawArray* imports() const { return raw_ptr()->imports_; }
3510 RawArray* exports() const { return raw_ptr()->exports_; } 3511 RawArray* exports() const { return raw_ptr()->exports_; }
3511 void AddImport(const Namespace& ns) const; 3512 void AddImport(const Namespace& ns) const;
3512 intptr_t num_imports() const { return raw_ptr()->num_imports_; } 3513 intptr_t num_imports() const { return raw_ptr()->num_imports_; }
3513 RawNamespace* ImportAt(intptr_t index) const; 3514 RawNamespace* ImportAt(intptr_t index) const;
3514 RawLibrary* ImportLibraryAt(intptr_t index) const; 3515 RawLibrary* ImportLibraryAt(intptr_t index) const;
3515 bool ImportsCorelib() const; 3516 bool ImportsCorelib() const;
3516 3517
3518 void DropDependencies() const;
3519
3517 // Resolving native methods for script loaded in the library. 3520 // Resolving native methods for script loaded in the library.
3518 Dart_NativeEntryResolver native_entry_resolver() const { 3521 Dart_NativeEntryResolver native_entry_resolver() const {
3519 return raw_ptr()->native_entry_resolver_; 3522 return raw_ptr()->native_entry_resolver_;
3520 } 3523 }
3521 void set_native_entry_resolver(Dart_NativeEntryResolver value) const { 3524 void set_native_entry_resolver(Dart_NativeEntryResolver value) const {
3522 StoreNonPointer(&raw_ptr()->native_entry_resolver_, value); 3525 StoreNonPointer(&raw_ptr()->native_entry_resolver_, value);
3523 } 3526 }
3524 Dart_NativeEntrySymbol native_entry_symbol_resolver() const { 3527 Dart_NativeEntrySymbol native_entry_symbol_resolver() const {
3525 return raw_ptr()->native_entry_symbol_resolver_; 3528 return raw_ptr()->native_entry_symbol_resolver_;
3526 } 3529 }
(...skipping 4897 matching lines...) Expand 10 before | Expand all | Expand 10 after
8424 8427
8425 8428
8426 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8429 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8427 intptr_t index) { 8430 intptr_t index) {
8428 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8431 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8429 } 8432 }
8430 8433
8431 } // namespace dart 8434 } // namespace dart
8432 8435
8433 #endif // VM_OBJECT_H_ 8436 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/class_table.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698