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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 324843004: Significantly improve performance of code coverage tool by precomputing a map token_pos->line numbe… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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/raw_object_snapshot.cc
===================================================================
--- runtime/vm/raw_object_snapshot.cc (revision 37119)
+++ runtime/vm/raw_object_snapshot.cc (working copy)
@@ -958,6 +958,9 @@
TokenStream& stream = TokenStream::Handle();
stream ^= reader->ReadObjectImpl();
script.set_tokens(stream);
+ TypedData& array = TypedData::Handle();
+ array ^= reader->ReadObjectImpl();
+ script.set_token_pos_to_line_nr(array);
script.raw_ptr()->line_offset_ = reader->Read<int32_t>();
script.raw_ptr()->col_offset_ = reader->Read<int32_t>();
@@ -986,6 +989,7 @@
// Write out all the object pointer fields.
writer->WriteObjectImpl(ptr()->url_);
writer->WriteObjectImpl(ptr()->tokens_);
+ writer->WriteObjectImpl(ptr()->token_pos_to_line_nr_);
writer->Write<int32_t>(ptr()->line_offset_);
writer->Write<int32_t>(ptr()->col_offset_);

Powered by Google App Engine
This is Rietveld 408576698