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

Unified Diff: runtime/vm/object.h

Issue 182703003: Cleanup native, collected, and stub code handling in profiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « runtime/vm/disassembler_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index faf01cc65881fe6f86a4146bace35aba588d06a1..ddd5ce162d0eca0a484d71b1e71f3d83918154dc 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -3276,11 +3276,22 @@ class Code : public Object {
}
RawFunction* function() const {
- return raw_ptr()->function_;
+ return reinterpret_cast<RawFunction*>(raw_ptr()->owner_);
+ }
+
+ RawObject* owner() const {
+ return raw_ptr()->owner_;
}
- void set_function(const Function& function) const {
+
+ void set_owner(const Function& function) const {
ASSERT(function.IsOld());
- StorePointer(&raw_ptr()->function_, function.raw());
+ StorePointer(&raw_ptr()->owner_,
+ reinterpret_cast<RawObject*>(function.raw()));
+ }
+
+ void set_owner(const Class& cls) {
+ ASSERT(cls.IsOld());
+ StorePointer(&raw_ptr()->owner_, reinterpret_cast<RawObject*>(cls.raw()));
}
// We would have a VisitPointers function here to traverse all the
@@ -3305,6 +3316,7 @@ class Code : public Object {
Assembler* assembler,
bool optimized = false);
static RawCode* LookupCode(uword pc);
+ static RawCode* LookupCodeInVmIsolate(uword pc);
int32_t GetPointerOffsetAt(int index) const {
return *PointerOffsetAddrAt(index);
@@ -3331,6 +3343,9 @@ class Code : public Object {
// Returns an array indexed by deopt id, containing the extracted ICData.
RawArray* ExtractTypeFeedbackArray() const;
+ RawString* Name() const;
+ RawString* UserName() const;
+
private:
void set_state_bits(intptr_t bits) const;
@@ -3383,6 +3398,7 @@ class Code : public Object {
}
intptr_t BinarySearchInSCallTable(uword pc) const;
+ static RawCode* LookupCodeInIsolate(Isolate* isolate, uword pc);
// New is a private method as RawInstruction and RawCode objects should
// only be created using the Code::FinalizeCode method. This method creates
@@ -4937,6 +4953,7 @@ class String : public Instance {
ch_(0),
index_(-1),
end_(str.Length()) {
+ ASSERT(!str_.IsNull());
}
CodePointIterator(const String& str, intptr_t start, intptr_t length)
« no previous file with comments | « runtime/vm/disassembler_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698