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

Unified Diff: runtime/vm/object.cc

Issue 9475031: Cleaned up usage of Function::code, since it may be misunderstood that it points to the only Code o… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/object.h ('k') | runtime/vm/opt_code_generator_ia32.cc » ('j') | 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 4655)
+++ runtime/vm/object.cc (working copy)
@@ -3585,6 +3585,11 @@
}
+bool Function::HasOptimizedCode() const {
+ return HasCode() && Code::Handle(raw_ptr()->code_).is_optimized();
+}
+
+
const char* Function::ToCString() const {
const char* f0 = is_static() ? " static" : "";
const char* f1 = NULL;
@@ -7995,9 +8000,10 @@
const Array& code_array = Array::Handle(raw_ptr()->code_array_);
const Array& pc_offset_array = Array::Handle(raw_ptr()->pc_offset_array_);
for (intptr_t i = 0; i < frame_pcs.length(); i++) {
- function = code_index_table->LookupFunction(frame_pcs[i]);
+ code = code_index_table->LookupCode(frame_pcs[i]);
+ ASSERT(!code.IsNull());
+ function = code.function();
function_array.SetAt((index + i), function);
- code = function.code();
code_array.SetAt((index + i), code);
pc_offset = Smi::New(frame_pcs[i] - code.EntryPoint());
pc_offset_array.SetAt((index + i), pc_offset);
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/opt_code_generator_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698