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

Unified Diff: runtime/vm/object.cc

Issue 10010029: When checking against non-parametrized types use a cache to hold result tuples (class, result). Tha… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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/object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 6277)
+++ runtime/vm/object.cc (working copy)
@@ -5489,6 +5489,7 @@
case PcDescriptors::kIcCall: return "ic-call";
case PcDescriptors::kFuncCall: return "func-call";
case PcDescriptors::kReturn: return "return";
+ case PcDescriptors::kTypeTest: return "type-test";
case PcDescriptors::kOther: return "other";
}
UNREACHABLE();
@@ -5932,6 +5933,18 @@
}
+uword Code::GetTypeTestAtNodeId(intptr_t node_id) const {
+ const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors());
+ for (intptr_t i = 0; i < descriptors.Length(); i++) {
+ if ((descriptors.NodeId(i) == node_id) &&
+ (descriptors.DescriptorKind(i) == PcDescriptors::kTypeTest)) {
+ return descriptors.PC(i);
+ }
+ }
+ return 0;
+}
+
+
const char* Code::ToCString() const {
const char* kFormat = "Code entry:0x%d";
intptr_t len = OS::SNPrint(NULL, 0, kFormat, EntryPoint());
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698