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

Unified Diff: runtime/vm/disassembler.cc

Issue 132163005: Version 1.1.0-dev.5.7 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 11 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.h ('k') | runtime/vm/disassembler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/disassembler.cc
===================================================================
--- runtime/vm/disassembler.cc (revision 31662)
+++ runtime/vm/disassembler.cc (working copy)
@@ -73,4 +73,30 @@
free(p);
}
+
+class FindAddrVisitor : public FindObjectVisitor {
+ public:
+ explicit FindAddrVisitor(uword addr)
+ : FindObjectVisitor(Isolate::Current()), addr_(addr) { }
+ virtual ~FindAddrVisitor() { }
+
+ virtual uword filter_addr() const { return addr_; }
+
+ // Check if object matches find condition.
+ virtual bool FindObject(RawObject* obj) const {
+ return obj == reinterpret_cast<RawObject*>(addr_);
+ }
+
+ private:
+ const uword addr_;
+
+ DISALLOW_COPY_AND_ASSIGN(FindAddrVisitor);
+};
+
+
+bool Disassembler::CanFindOldObject(uword addr) {
+ FindAddrVisitor visitor(addr);
+ return Isolate::Current()->heap()->FindOldObject(&visitor) != Object::null();
+}
+
} // namespace dart
« no previous file with comments | « runtime/vm/disassembler.h ('k') | runtime/vm/disassembler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698