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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/raw_object_snapshot.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_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/atomic.h" 9 #include "vm/atomic.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 RAW_HEAP_OBJECT_IMPLEMENTATION(Class); 665 RAW_HEAP_OBJECT_IMPLEMENTATION(Class);
666 666
667 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 667 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
668 RawString* name_; 668 RawString* name_;
669 NOT_IN_PRODUCT(RawString* user_name_); 669 NOT_IN_PRODUCT(RawString* user_name_);
670 RawArray* functions_; 670 RawArray* functions_;
671 RawArray* functions_hash_table_; 671 RawArray* functions_hash_table_;
672 RawArray* fields_; 672 RawArray* fields_;
673 RawArray* offset_in_words_to_field_; 673 RawArray* offset_in_words_to_field_;
674 RawArray* interfaces_; // Array of AbstractType. 674 RawArray* interfaces_; // Array of AbstractType.
675 RawGrowableObjectArray* direct_subclasses_; // Array of Class.
676 RawScript* script_; 675 RawScript* script_;
677 RawLibrary* library_; 676 RawLibrary* library_;
678 RawTypeArguments* type_parameters_; // Array of TypeParameter. 677 RawTypeArguments* type_parameters_; // Array of TypeParameter.
679 RawAbstractType* super_type_; 678 RawAbstractType* super_type_;
680 RawType* mixin_; // Generic mixin type, e.g. M<T>, not M<int>. 679 RawType* mixin_; // Generic mixin type, e.g. M<T>, not M<int>.
681 RawFunction* signature_function_; // Associated function for typedef class. 680 RawFunction* signature_function_; // Associated function for typedef class.
682 RawArray* constants_; // Canonicalized values of this class. 681 RawArray* constants_; // Canonicalized values of this class.
683 RawObject* canonical_types_; // An array of canonicalized types of this class 682 RawObject* canonical_types_; // An array of canonicalized types of this class
684 // or the canonical type. 683 // or the canonical type.
685 RawArray* invocation_dispatcher_cache_; // Cache for dispatcher functions. 684 RawArray* invocation_dispatcher_cache_; // Cache for dispatcher functions.
685 RawCode* allocation_stub_; // Stub code for allocation of instances.
686 RawGrowableObjectArray* direct_subclasses_; // Array of Class.
686 RawArray* cha_codes_; // CHA optimized codes. 687 RawArray* cha_codes_; // CHA optimized codes.
687 RawCode* allocation_stub_; // Stub code for allocation of instances.
688 RawObject** to() { 688 RawObject** to() {
689 return reinterpret_cast<RawObject**>(&ptr()->allocation_stub_); 689 return reinterpret_cast<RawObject**>(&ptr()->cha_codes_);
690 } 690 }
691 691
692 cpp_vtable handle_vtable_; 692 cpp_vtable handle_vtable_;
693 TokenPosition token_pos_; 693 TokenPosition token_pos_;
694 int32_t instance_size_in_words_; // Size if fixed len or 0 if variable len. 694 int32_t instance_size_in_words_; // Size if fixed len or 0 if variable len.
695 int32_t type_arguments_field_offset_in_words_; // Offset of type args fld. 695 int32_t type_arguments_field_offset_in_words_; // Offset of type args fld.
696 int32_t next_field_offset_in_words_; // Offset of the next instance field. 696 int32_t next_field_offset_in_words_; // Offset of the next instance field.
697 classid_t id_; // Class Id, also index in the class table. 697 classid_t id_; // Class Id, also index in the class table.
698 int16_t num_type_arguments_; // Number of type arguments in flattened vector. 698 int16_t num_type_arguments_; // Number of type arguments in flattened vector.
699 int16_t num_own_type_arguments_; // Number of non-overlapping type arguments. 699 int16_t num_own_type_arguments_; // Number of non-overlapping type arguments.
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1548 class RawInstance : public RawObject { 1548 class RawInstance : public RawObject {
1549 RAW_HEAP_OBJECT_IMPLEMENTATION(Instance); 1549 RAW_HEAP_OBJECT_IMPLEMENTATION(Instance);
1550 }; 1550 };
1551 1551
1552 1552
1553 class RawLibraryPrefix : public RawInstance { 1553 class RawLibraryPrefix : public RawInstance {
1554 RAW_HEAP_OBJECT_IMPLEMENTATION(LibraryPrefix); 1554 RAW_HEAP_OBJECT_IMPLEMENTATION(LibraryPrefix);
1555 1555
1556 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 1556 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
1557 RawString* name_; // Library prefix name. 1557 RawString* name_; // Library prefix name.
1558 RawLibrary* importer_; // Library which declares this prefix.
1559 RawObject** to_precompiled_snapshot() {
1560 return reinterpret_cast<RawObject**>(&ptr()->importer_);
1561 }
1558 RawArray* imports_; // Libraries imported with this prefix. 1562 RawArray* imports_; // Libraries imported with this prefix.
1559 RawLibrary* importer_; // Library which declares this prefix.
1560 RawArray* dependent_code_; // Code that refers to deferred, unloaded 1563 RawArray* dependent_code_; // Code that refers to deferred, unloaded
1561 // library prefix. 1564 // library prefix.
1562 RawObject** to() { 1565 RawObject** to() {
1563 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); 1566 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_);
1564 } 1567 }
1565 uint16_t num_imports_; // Number of library entries in libraries_. 1568 uint16_t num_imports_; // Number of library entries in libraries_.
1566 bool is_deferred_load_; 1569 bool is_deferred_load_;
1567 bool is_loaded_; 1570 bool is_loaded_;
1568 }; 1571 };
1569 1572
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
2348 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2351 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2349 kTypedDataInt8ArrayViewCid + 15); 2352 kTypedDataInt8ArrayViewCid + 15);
2350 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2353 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2351 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2354 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2352 return (kNullCid - kTypedDataInt8ArrayCid); 2355 return (kNullCid - kTypedDataInt8ArrayCid);
2353 } 2356 }
2354 2357
2355 } // namespace dart 2358 } // namespace dart
2356 2359
2357 #endif // VM_RAW_OBJECT_H_ 2360 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698