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

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
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 RawString* user_name_; 669 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 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after
2348 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2348 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2349 kTypedDataInt8ArrayViewCid + 15); 2349 kTypedDataInt8ArrayViewCid + 15);
2350 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2350 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2351 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2351 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2352 return (kNullCid - kTypedDataInt8ArrayCid); 2352 return (kNullCid - kTypedDataInt8ArrayCid);
2353 } 2353 }
2354 2354
2355 } // namespace dart 2355 } // namespace dart
2356 2356
2357 #endif // VM_RAW_OBJECT_H_ 2357 #endif // VM_RAW_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698