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

Unified Diff: runtime/vm/raw_object.h

Issue 9395016: First part of new ICData infrastructure: use a wrapper object instead of an array. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
===================================================================
--- runtime/vm/raw_object.h (revision 4401)
+++ runtime/vm/raw_object.h (working copy)
@@ -65,6 +65,7 @@
V(Closure) \
V(Stacktrace) \
V(JSRegExp) \
+ V(ICData) \
#define CLASS_LIST(V) \
V(Object) \
@@ -635,10 +636,8 @@
RawExceptionHandlers* exception_handlers_;
RawPcDescriptors* pc_descriptors_;
RawLocalVarDescriptors* var_descriptors_;
- // Ongoing redesign of inline caches may soon remove the need for 'ic_data_'.
- RawArray* ic_data_; // Used to store IC stub data (see class ICData).
RawObject** to() {
- return reinterpret_cast<RawObject**>(&ptr()->ic_data_);
+ return reinterpret_cast<RawObject**>(&ptr()->var_descriptors_);
}
intptr_t pointer_offsets_length_;
@@ -1083,6 +1082,26 @@
uint8_t data_[0];
};
+
+class RawICData : public RawInstance {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(ICData);
+
+ RawObject** from() {
+ return reinterpret_cast<RawObject**>(&ptr()->function_);
+ }
+
+ RawObject** to() {
+ return reinterpret_cast<RawObject**>(&ptr()->ic_data_);
+ }
+
+ RawFunction* function_; // Parent/calling function of this IC.
+ RawString* target_name_; // Name of target function.
+ RawArray* ic_data_; // Contains test classes and target function.
+ intptr_t id_; // Parser node id corresponding to this IC.
+ intptr_t num_args_tested_; // Number of arguments tested in IC.
+};
+
+
} // namespace dart
#endif // VM_RAW_OBJECT_H_

Powered by Google App Engine
This is Rietveld 408576698