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

Unified Diff: runtime/vm/code_generator.cc

Issue 11694003: In unoptimized code use call for instanceof instead of inlined checks. This allows us to collect ty… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 12 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
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 16582)
+++ runtime/vm/code_generator.cc (working copy)
@@ -30,7 +30,6 @@
DEFINE_FLAG(bool, deoptimize_alot, false,
"Deoptimizes all live frames when we are about to return to Dart code from"
" native entries.");
-DEFINE_FLAG(bool, inline_cache, true, "Enable inline caches");
DEFINE_FLAG(bool, trace_deoptimization, false, "Trace deoptimization");
DEFINE_FLAG(bool, trace_deoptimization_verbose, false,
"Trace deoptimization verbose");
@@ -160,16 +159,7 @@
DartFrameIterator iterator;
StackFrame* caller_frame = iterator.NextFrame();
ASSERT(caller_frame != NULL);
- const Code& code = Code::Handle(caller_frame->LookupDartCode());
- const PcDescriptors& descriptors =
- PcDescriptors::Handle(code.pc_descriptors());
- ASSERT(!descriptors.IsNull());
- for (int i = 0; i < descriptors.Length(); i++) {
- if (static_cast<uword>(descriptors.PC(i)) == caller_frame->pc()) {
- return descriptors.TokenPos(i);
- }
- }
- return -1;
+ return caller_frame->GetTokenPos();
}

Powered by Google App Engine
This is Rietveld 408576698