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

Unified Diff: vm/object.cc

Issue 9721006: Second set of changes for implementation of stack map support. (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.h ('k') | vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/object.cc
===================================================================
--- vm/object.cc (revision 5572)
+++ vm/object.cc (working copy)
@@ -5388,6 +5388,11 @@
}
+void Stackmap::SetCode(const Code& code) const {
+ StorePointer(&raw_ptr()->code_, code.raw());
+}
+
+
// Return the bit offset of the highest bit set.
intptr_t Stackmap::Maximum() const {
intptr_t bound = SizeInBits();
@@ -5478,12 +5483,12 @@
if (IsNull()) {
return "{null}";
} else {
- intptr_t index = OS::SNPrint(NULL, 0, "0x%lx { ", pc());
+ intptr_t index = OS::SNPrint(NULL, 0, "0x%lx { ", PC());
intptr_t alloc_size = index + ((Maximum() + 1) * 2) + 2; // "{ 1 0 .... }".
Isolate* isolate = Isolate::Current();
char* chars = reinterpret_cast<char*>(
isolate->current_zone()->Allocate(alloc_size));
- index = OS::SNPrint(chars, alloc_size, "0x%lx { ", pc());
+ index = OS::SNPrint(chars, alloc_size, "0x%lx { ", PC());
for (intptr_t i = 0; i <= Maximum(); i++) {
index += OS::SNPrint((chars + index),
(alloc_size - index),
@@ -5643,6 +5648,11 @@
}
+void Code::set_stackmaps(const Array& maps) const {
+ StorePointer(&raw_ptr()->stackmaps_, maps.raw());
+}
+
+
RawCode* Code::New(int pointer_offsets_length) {
const Class& cls = Class::Handle(Object::code_class());
Code& result = Code::Handle();
« no previous file with comments | « vm/object.h ('k') | vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698