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

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
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 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 void set_interfaces(const Array& value) const; 1087 void set_interfaces(const Array& value) const;
1088 static intptr_t interfaces_offset() { 1088 static intptr_t interfaces_offset() {
1089 return OFFSET_OF(RawClass, interfaces_); 1089 return OFFSET_OF(RawClass, interfaces_);
1090 } 1090 }
1091 1091
1092 // Returns the list of classes having this class as direct superclass. 1092 // Returns the list of classes having this class as direct superclass.
1093 RawGrowableObjectArray* direct_subclasses() const { 1093 RawGrowableObjectArray* direct_subclasses() const {
1094 return raw_ptr()->direct_subclasses_; 1094 return raw_ptr()->direct_subclasses_;
1095 } 1095 }
1096 void AddDirectSubclass(const Class& subclass) const; 1096 void AddDirectSubclass(const Class& subclass) const;
1097 void ClearDirectSubclasses() const;
1097 1098
1098 // Check if this class represents the class of null. 1099 // Check if this class represents the class of null.
1099 bool IsNullClass() const { return id() == kNullCid; } 1100 bool IsNullClass() const { return id() == kNullCid; }
1100 1101
1101 // Check if this class represents the 'dynamic' class. 1102 // Check if this class represents the 'dynamic' class.
1102 bool IsDynamicClass() const { return id() == kDynamicCid; } 1103 bool IsDynamicClass() const { return id() == kDynamicCid; }
1103 1104
1104 // Check if this class represents the 'void' class. 1105 // Check if this class represents the 'void' class.
1105 bool IsVoidClass() const { return id() == kVoidCid; } 1106 bool IsVoidClass() const { return id() == kVoidCid; }
1106 1107
(...skipping 2404 matching lines...) Expand 10 before | Expand all | Expand 10 after
3511 3512
3512 // Library imports. 3513 // Library imports.
3513 RawArray* imports() const { return raw_ptr()->imports_; } 3514 RawArray* imports() const { return raw_ptr()->imports_; }
3514 RawArray* exports() const { return raw_ptr()->exports_; } 3515 RawArray* exports() const { return raw_ptr()->exports_; }
3515 void AddImport(const Namespace& ns) const; 3516 void AddImport(const Namespace& ns) const;
3516 intptr_t num_imports() const { return raw_ptr()->num_imports_; } 3517 intptr_t num_imports() const { return raw_ptr()->num_imports_; }
3517 RawNamespace* ImportAt(intptr_t index) const; 3518 RawNamespace* ImportAt(intptr_t index) const;
3518 RawLibrary* ImportLibraryAt(intptr_t index) const; 3519 RawLibrary* ImportLibraryAt(intptr_t index) const;
3519 bool ImportsCorelib() const; 3520 bool ImportsCorelib() const;
3520 3521
3522 void DropDependencies() const;
3523
3521 // Resolving native methods for script loaded in the library. 3524 // Resolving native methods for script loaded in the library.
3522 Dart_NativeEntryResolver native_entry_resolver() const { 3525 Dart_NativeEntryResolver native_entry_resolver() const {
3523 return raw_ptr()->native_entry_resolver_; 3526 return raw_ptr()->native_entry_resolver_;
3524 } 3527 }
3525 void set_native_entry_resolver(Dart_NativeEntryResolver value) const { 3528 void set_native_entry_resolver(Dart_NativeEntryResolver value) const {
3526 StoreNonPointer(&raw_ptr()->native_entry_resolver_, value); 3529 StoreNonPointer(&raw_ptr()->native_entry_resolver_, value);
3527 } 3530 }
3528 Dart_NativeEntrySymbol native_entry_symbol_resolver() const { 3531 Dart_NativeEntrySymbol native_entry_symbol_resolver() const {
3529 return raw_ptr()->native_entry_symbol_resolver_; 3532 return raw_ptr()->native_entry_symbol_resolver_;
3530 } 3533 }
(...skipping 4897 matching lines...) Expand 10 before | Expand all | Expand 10 after
8428 8431
8429 8432
8430 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8433 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8431 intptr_t index) { 8434 intptr_t index) {
8432 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8435 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8433 } 8436 }
8434 8437
8435 } // namespace dart 8438 } // namespace dart
8436 8439
8437 #endif // VM_OBJECT_H_ 8440 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/class_table.cc ('k') | runtime/vm/object.cc » ('j') | runtime/vm/precompiler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698