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

Unified Diff: vm/raw_object.h

Issue 9701010: First step towards implementing stack map descriptions for the optimizing compiler. (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 | « vm/object.cc ('k') | vm/raw_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/raw_object.h
===================================================================
--- vm/raw_object.h (revision 5501)
+++ vm/raw_object.h (working copy)
@@ -35,6 +35,7 @@
V(Code) \
V(Instructions) \
V(PcDescriptors) \
+ V(Stackmap) \
V(LocalVarDescriptors) \
V(ExceptionHandlers) \
V(Context) \
@@ -688,6 +689,32 @@
};
+// Stackmap is an immutable representation of the layout of the stack at
+// a PC. The stack map representation consists of a bit map which marks
+// each stack slot index starting from the FP (frame pointer) as an object
+// or regular untagged value.
+// The Stackmap also consists of a link to code object corresponding to
+// the frame which the stack map is describing.
+// The bit map representation is optimized for dense and small bit maps,
+// without any upper bound.
+class RawStackmap : public RawObject {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(Stackmap);
+
+ RawObject** from() {
+ return reinterpret_cast<RawObject**>(&ptr()->code_);
+ }
+ RawCode* code_; // Code object corresponding to the frame described.
+ RawSmi* bitmap_size_in_bytes_; // Size of the bit map in bytes.
+ RawObject** to() {
+ return reinterpret_cast<RawObject**>(&ptr()->bitmap_size_in_bytes_);
+ }
+ uword pc_; // PC corresponding to this stack map representation.
+
+ // Variable length data follows here (bitmap of the stack layout).
+ uint8_t data_[0];
+};
+
+
class RawLocalVarDescriptors : public RawObject {
RAW_HEAP_OBJECT_IMPLEMENTATION(LocalVarDescriptors);
@@ -1139,7 +1166,6 @@
uint8_t data_[0];
};
-
} // namespace dart
#endif // VM_RAW_OBJECT_H_
« no previous file with comments | « vm/object.cc ('k') | vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698