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

Unified Diff: runtime/vm/raw_object.h

Issue 68113028: Lazily format LanguageError messages (fix issue 15069). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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.h
===================================================================
--- runtime/vm/raw_object.h (revision 30298)
+++ runtime/vm/raw_object.h (working copy)
@@ -1092,12 +1092,17 @@
RAW_HEAP_OBJECT_IMPLEMENTATION(LanguageError);
RawObject** from() {
- return reinterpret_cast<RawObject**>(&ptr()->message_);
+ return reinterpret_cast<RawObject**>(&ptr()->previous_error_);
}
+ RawError* previous_error_; // May be null.
+ RawScript* script_;
RawString* message_;
+ RawString* formatted_message_; // Incl. previous error's formatted message.
siva 2013/11/15 16:35:51 Is there any value in storing the formattted messa
regis 2013/11/15 18:27:38 It is not clear. On the other hand, the cost of st
RawObject** to() {
- return reinterpret_cast<RawObject**>(&ptr()->message_);
+ return reinterpret_cast<RawObject**>(&ptr()->formatted_message_);
}
+ intptr_t token_pos_; // Source position in script_.
+ int8_t kind_; // Of type LanguageError::Kind.
};

Powered by Google App Engine
This is Rietveld 408576698