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

Unified Diff: runtime/vm/raw_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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index a262edff2c4f773a7633dcc2d66fc633927bc13e..1a343f3ddd141ec838113fab32719e4fe42d9131 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -672,7 +672,6 @@ class RawClass : public RawObject {
RawArray* fields_;
RawArray* offset_in_words_to_field_;
RawArray* interfaces_; // Array of AbstractType.
- RawGrowableObjectArray* direct_subclasses_; // Array of Class.
RawScript* script_;
RawLibrary* library_;
RawTypeArguments* type_parameters_; // Array of TypeParameter.
@@ -683,10 +682,11 @@ class RawClass : public RawObject {
RawObject* canonical_types_; // An array of canonicalized types of this class
// or the canonical type.
RawArray* invocation_dispatcher_cache_; // Cache for dispatcher functions.
- RawArray* cha_codes_; // CHA optimized codes.
RawCode* allocation_stub_; // Stub code for allocation of instances.
+ RawGrowableObjectArray* direct_subclasses_; // Array of Class.
+ RawArray* cha_codes_; // CHA optimized codes.
RawObject** to() {
- return reinterpret_cast<RawObject**>(&ptr()->allocation_stub_);
+ return reinterpret_cast<RawObject**>(&ptr()->cha_codes_);
}
cpp_vtable handle_vtable_;
@@ -1555,8 +1555,11 @@ class RawLibraryPrefix : public RawInstance {
RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
RawString* name_; // Library prefix name.
- RawArray* imports_; // Libraries imported with this prefix.
RawLibrary* importer_; // Library which declares this prefix.
+ RawObject** to_precompiled_snapshot() {
+ return reinterpret_cast<RawObject**>(&ptr()->importer_);
+ }
+ RawArray* imports_; // Libraries imported with this prefix.
RawArray* dependent_code_; // Code that refers to deferred, unloaded
// library prefix.
RawObject** to() {

Powered by Google App Engine
This is Rietveld 408576698