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

Unified Diff: runtime/vm/raw_object.h

Issue 26682003: Cache number of type arguments in class object instead of recalculating it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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
===================================================================
--- runtime/vm/raw_object.h (revision 28616)
+++ runtime/vm/raw_object.h (working copy)
@@ -496,12 +496,14 @@
}
cpp_vtable handle_vtable_;
+ intptr_t id_; // Class Id, also index in the class table.
+ intptr_t token_pos_;
intptr_t instance_size_in_words_; // Size if fixed len or 0 if variable len.
- intptr_t id_; // Class Id, also index in the class table.
intptr_t type_arguments_field_offset_in_words_; // Offset of type args fld.
intptr_t next_field_offset_in_words_; // Offset of the next instance field.
- intptr_t num_native_fields_; // Number of native fields in class.
- intptr_t token_pos_;
+ int16_t num_type_arguments_; // Number of type arguments in flatten vector.
+ int16_t num_own_type_arguments_; // Number of non-overlapping type arguments.
+ uint16_t num_native_fields_; // Number of native fields in class.
uint16_t state_bits_;
friend class Instance;

Powered by Google App Engine
This is Rietveld 408576698