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

Unified Diff: runtime/vm/object.cc

Issue 10389023: Fixed compilation time measurement, restructure some code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/object.cc
===================================================================
--- runtime/vm/object.cc (revision 7417)
+++ runtime/vm/object.cc (working copy)
@@ -3653,7 +3653,7 @@
ASSERT(class_name != NULL);
const Library& library = Library::Handle(function_class.library());
ASSERT(!library.IsNull());
- const char* library_name = String::Handle(library.url()).ToCString();
+ const char* library_name = String::Handle(library.url()).ToCString();
hausner 2012/05/08 21:41:01 Extra space to balance the universe?
srdjan 2012/05/08 21:51:31 Rebalanced the universe.
ASSERT(library_name != NULL);
const char* lib_class_format =
(library_name[0] == '\0') ? "%s%s_" : "%s_%s_";
@@ -6071,6 +6071,7 @@
}
hausner 2012/05/08 21:41:01 Remove extra line?
srdjan 2012/05/08 21:51:31 Done.
+
RawCode* Code::FinalizeCode(const char* name,
hausner 2012/05/08 21:41:01 Maybe an assert in this function that name is not
srdjan 2012/05/08 21:51:31 Done.
Assembler* assembler,
Heap::Space space) {
@@ -6150,6 +6151,20 @@
}
+RawCode* Code::FinalizeCodeForFunction(const Function& function,
+ Assembler* assembler) {
+ // Calling ToFullyQualifiedCString is very expensive, try to avoid it.
+ if (FLAG_generate_gdb_symbols || (Dart::pprof_symbol_generator() != NULL)) {
+ return FinalizeCode(function.ToFullyQualifiedCString(),
+ assembler,
+ Heap::kDartCode);
+ } else {
+ return FinalizeCode("", assembler, Heap::kDartCode);
+ }
+}
+
hausner 2012/05/08 21:41:01 Save the extra empty line for a rainy day.
srdjan 2012/05/08 21:51:31 Done.
+
+
intptr_t Code::GetTokenIndexOfPC(uword pc) const {
intptr_t token_index = -1;
const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors());

Powered by Google App Engine
This is Rietveld 408576698