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

Unified Diff: vm/object.h

Issue 9691024: - Make RawICData a subclass of RawObject and not RawInstance. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/object.h
===================================================================
--- vm/object.h (revision 5374)
+++ vm/object.h (working copy)
@@ -156,11 +156,11 @@
kExceptionHandlersClass,
kContextClass,
kContextScopeClass,
+ kICDataClass,
kApiErrorClass,
kLanguageErrorClass,
kUnhandledExceptionClass,
kUnwindErrorClass,
- kICDataClass,
kMaxId,
kInvalidIndex = -1,
};
@@ -404,11 +404,11 @@
static RawClass* exception_handlers_class_; // Class of ExceptionHandlers.
static RawClass* context_class_; // Class of the Context vm object.
static RawClass* context_scope_class_; // Class of ContextScope vm object.
+ static RawClass* icdata_class_; // Class of ICData.
static RawClass* api_error_class_; // Class of ApiError.
static RawClass* language_error_class_; // Class of LanguageError.
static RawClass* unhandled_exception_class_; // Class of UnhandledException.
static RawClass* unwind_error_class_; // Class of UnwindError.
- static RawClass* icdata_class_; // Class of ICData.
friend void RawObject::Validate() const;
friend class SnapshotReader;
@@ -2353,6 +2353,78 @@
};
+// Object holding information about an IC: test classes and their
+// corresponding classes.
+class ICData : public Object {
+ public:
+ RawFunction* function() const {
+ return raw_ptr()->function_;
+ }
+
+ RawString* target_name() const {
+ return raw_ptr()->target_name_;
+ }
+
+ intptr_t num_args_tested() const {
+ return raw_ptr()->num_args_tested_;
+ }
+
+ intptr_t id() const {
+ return raw_ptr()->id_;
+ }
+
+ intptr_t NumberOfChecks() const;
+
+ static intptr_t InstanceSize() {
+ return RoundedAllocationSize(sizeof(RawICData));
+ }
+
+ static intptr_t target_name_offset() {
+ return OFFSET_OF(RawICData, target_name_);
+ }
+
+ static intptr_t num_args_tested_offset() {
+ return OFFSET_OF(RawICData, num_args_tested_);
+ }
+
+ static intptr_t ic_data_offset() {
+ return OFFSET_OF(RawICData, ic_data_);
+ }
+
+ static intptr_t function_offset() {
+ return OFFSET_OF(RawICData, function_);
+ }
+
+ void AddCheck(const GrowableArray<const Class*>& classes,
+ const Function& target) const;
+ void GetCheckAt(intptr_t index,
+ GrowableArray<const Class*>* classes,
+ Function* target) const;
+ void GetOneClassCheckAt(int index, Class* cls, Function* target) const;
+
+ static RawICData* New(const Function& caller_function,
+ const String& target_name,
+ intptr_t id,
+ intptr_t num_args_tested);
+
+ private:
+ RawArray* ic_data() const {
+ return raw_ptr()->ic_data_;
+ }
+
+ void set_function(const Function& value) const;
+ void set_target_name(const String& value) const;
+ void set_id(intptr_t value) const;
+ void set_num_args_tested(intptr_t value) const;
+ void set_ic_data(const Array& value) const;
+
+ intptr_t TestEntryLength() const;
+
+ HEAP_OBJECT_IMPLEMENTATION(ICData, Object);
+ friend class Class;
+};
+
+
class Error : public Object {
public:
virtual const char* ToErrorCString() const;
@@ -3787,78 +3859,6 @@
};
-// Object holding information about an IC: test classes and their
-// corresponding classes.
-class ICData : public Instance {
- public:
- RawFunction* function() const {
- return raw_ptr()->function_;
- }
-
- RawString* target_name() const {
- return raw_ptr()->target_name_;
- }
-
- intptr_t num_args_tested() const {
- return raw_ptr()->num_args_tested_;
- }
-
- intptr_t id() const {
- return raw_ptr()->id_;
- }
-
- intptr_t NumberOfChecks() const;
-
- static intptr_t InstanceSize() {
- return RoundedAllocationSize(sizeof(RawICData));
- }
-
- static intptr_t target_name_offset() {
- return OFFSET_OF(RawICData, target_name_);
- }
-
- static intptr_t num_args_tested_offset() {
- return OFFSET_OF(RawICData, num_args_tested_);
- }
-
- static intptr_t ic_data_offset() {
- return OFFSET_OF(RawICData, ic_data_);
- }
-
- static intptr_t function_offset() {
- return OFFSET_OF(RawICData, function_);
- }
-
- void AddCheck(const GrowableArray<const Class*>& classes,
- const Function& target) const;
- void GetCheckAt(intptr_t index,
- GrowableArray<const Class*>* classes,
- Function* target) const;
- void GetOneClassCheckAt(int index, Class* cls, Function* target) const;
-
- static RawICData* New(const Function& caller_function,
- const String& target_name,
- intptr_t id,
- intptr_t num_args_tested);
-
- private:
- RawArray* ic_data() const {
- return raw_ptr()->ic_data_;
- }
-
- void set_function(const Function& value) const;
- void set_target_name(const String& value) const;
- void set_id(intptr_t value) const;
- void set_num_args_tested(intptr_t value) const;
- void set_ic_data(const Array& value) const;
-
- intptr_t TestEntryLength() const;
-
- HEAP_OBJECT_IMPLEMENTATION(ICData, Instance);
- friend class Class;
-};
-
-
// Breaking cycles and loops.
RawClass* Object::clazz() const {
uword raw_value = reinterpret_cast<uword>(raw_);
« no previous file with comments | « no previous file | vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698