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

Side by Side Diff: runtime/vm/object.h

Issue 12213020: Remember owner class of patch code (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')
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_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 1139
1140 FINAL_HEAP_OBJECT_IMPLEMENTATION(InstantiatedTypeArguments, 1140 FINAL_HEAP_OBJECT_IMPLEMENTATION(InstantiatedTypeArguments,
1141 AbstractTypeArguments); 1141 AbstractTypeArguments);
1142 friend class Class; 1142 friend class Class;
1143 }; 1143 };
1144 1144
1145 1145
1146 class PatchClass : public Object { 1146 class PatchClass : public Object {
1147 public: 1147 public:
1148 RawClass* patched_class() const { return raw_ptr()->patched_class_; } 1148 RawClass* patched_class() const { return raw_ptr()->patched_class_; }
1149 RawScript* script() const { return raw_ptr()->script_; } 1149 RawClass* source_class() const { return raw_ptr()->source_class_; }
1150 RawScript* Script() const;
1150 1151
1151 static intptr_t InstanceSize() { 1152 static intptr_t InstanceSize() {
1152 return RoundedAllocationSize(sizeof(RawPatchClass)); 1153 return RoundedAllocationSize(sizeof(RawPatchClass));
1153 } 1154 }
1154 1155
1155 static RawPatchClass* New(const Class& patched_class, const Script& script); 1156 static RawPatchClass* New(const Class& patched_class,
1157 const Class& source_class);
1156 1158
1157 private: 1159 private:
1158 void set_patched_class(const Class& value) const; 1160 void set_patched_class(const Class& value) const;
1159 void set_script(const Script& value) const; 1161 void set_source_class(const Class& value) const;
1160 static RawPatchClass* New(); 1162 static RawPatchClass* New();
1161 1163
1162 FINAL_HEAP_OBJECT_IMPLEMENTATION(PatchClass, Object); 1164 FINAL_HEAP_OBJECT_IMPLEMENTATION(PatchClass, Object);
1163 friend class Class; 1165 friend class Class;
1164 }; 1166 };
1165 1167
1166 1168
1167 class Function : public Object { 1169 class Function : public Object {
1168 public: 1170 public:
1169 RawString* name() const { return raw_ptr()->name_; } 1171 RawString* name() const { return raw_ptr()->name_; }
(...skipping 5166 matching lines...) Expand 10 before | Expand all | Expand 10 after
6336 6338
6337 6339
6338 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6340 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6339 intptr_t index) { 6341 intptr_t index) {
6340 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6342 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6341 } 6343 }
6342 6344
6343 } // namespace dart 6345 } // namespace dart
6344 6346
6345 #endif // VM_OBJECT_H_ 6347 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698