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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 9325047: Add token index position to classes and types for more accurate error reporting. (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/raw_object.h ('k') | runtime/vm/runtime_entry_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object_snapshot.cc
===================================================================
--- runtime/vm/raw_object_snapshot.cc (revision 3964)
+++ runtime/vm/raw_object_snapshot.cc (working copy)
@@ -51,6 +51,7 @@
cls.set_type_arguments_instance_field_offset(reader->ReadIntptrValue());
cls.set_next_field_offset(reader->ReadIntptrValue());
cls.set_num_native_fields(reader->ReadIntptrValue());
+ cls.set_token_index(reader->ReadIntptrValue());
cls.set_class_state(reader->Read<int8_t>());
if (reader->Read<bool>()) {
cls.set_is_const();
@@ -93,6 +94,7 @@
writer->WriteIntptrValue(ptr()->type_arguments_instance_field_offset_);
writer->WriteIntptrValue(ptr()->next_field_offset_);
writer->WriteIntptrValue(ptr()->num_native_fields_);
+ writer->WriteIntptrValue(ptr()->token_index_);
writer->Write<int8_t>(ptr()->class_state_);
writer->Write<bool>(ptr()->is_const_);
writer->Write<bool>(ptr()->is_interface_);
@@ -186,6 +188,7 @@
parameterized_type.set_tags(tags);
// Set all non object fields.
+ parameterized_type.set_token_index(reader->ReadIntptrValue());
parameterized_type.set_type_state(reader->Read<int8_t>());
// Set all the object fields.
@@ -217,6 +220,7 @@
writer->WriteObjectHeader(Object::kTypeClass, ptr()->tags_);
// Write out all the non object pointer fields.
+ writer->WriteIntptrValue(ptr()->token_index_);
writer->Write<int8_t>(ptr()->type_state_);
// Write out all the object pointer fields.
@@ -241,6 +245,7 @@
// Set all non object fields.
type_parameter.set_index(reader->ReadIntptrValue());
+ type_parameter.set_token_index(reader->ReadIntptrValue());
type_parameter.set_type_state(reader->Read<int8_t>());
// Set all the object fields.
@@ -269,6 +274,7 @@
// Write out all the non object pointer fields.
writer->WriteIntptrValue(ptr()->index_);
+ writer->WriteIntptrValue(ptr()->token_index_);
writer->Write<int8_t>(ptr()->type_state_);
// Write out all the object pointer fields.
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/runtime_entry_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698