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

Unified Diff: dart/runtime/vm/object.h

Issue 75123002: Version 1.0.0.6 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
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
« no previous file with comments | « dart/runtime/vm/intermediate_language.h ('k') | dart/runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/vm/object.h
===================================================================
--- dart/runtime/vm/object.h (revision 30333)
+++ dart/runtime/vm/object.h (working copy)
@@ -3757,9 +3757,6 @@
class ApiError : public Error {
public:
RawString* message() const { return raw_ptr()->message_; }
- static intptr_t message_offset() {
- return OFFSET_OF(RawApiError, message_);
- }
static intptr_t InstanceSize() {
return RoundedAllocationSize(sizeof(RawApiError));
@@ -3782,23 +3779,62 @@
class LanguageError : public Error {
public:
- RawString* message() const { return raw_ptr()->message_; }
- static intptr_t message_offset() {
- return OFFSET_OF(RawLanguageError, message_);
- }
+ enum Kind {
+ kWarning,
+ kError,
+ kMalformedType,
+ kMalboundedType,
+ };
+ // Build, cache, and return formatted message.
+ RawString* FormatMessage() const;
+
static intptr_t InstanceSize() {
return RoundedAllocationSize(sizeof(RawLanguageError));
}
- static RawLanguageError* New(const String& message,
+ // A null script means no source and a negative token_pos means no position.
+ static RawLanguageError* NewFormatted(const Error& prev_error,
+ const Script& script,
+ intptr_t token_pos,
+ Kind kind,
+ Heap::Space space,
+ const char* format, ...)
+ PRINTF_ATTRIBUTE(6, 7);
+
+ static RawLanguageError* NewFormattedV(const Error& prev_error,
+ const Script& script,
+ intptr_t token_pos,
+ Kind kind,
+ Heap::Space space,
+ const char* format, va_list args);
+
+ static RawLanguageError* New(const String& formatted_message,
Heap::Space space = Heap::kNew);
virtual const char* ToErrorCString() const;
private:
- void set_message(const String& message) const;
+ RawError* previous_error() const {
+ return raw_ptr()->previous_error_;
+ }
+ void set_previous_error(const Error& value) const;
+ RawScript* script() const { return raw_ptr()->script_; }
+ void set_script(const Script& value) const;
+
+ intptr_t token_pos() const { return raw_ptr()->token_pos_; }
+ void set_token_pos(intptr_t value) const;
+
+ Kind kind() const { return static_cast<Kind>(raw_ptr()->kind_); }
+ void set_kind(uint8_t value) const;
+
+ RawString* message() const { return raw_ptr()->message_; }
+ void set_message(const String& value) const;
+
+ RawString* formatted_message() const { return raw_ptr()->formatted_message_; }
+ void set_formatted_message(const String& value) const;
+
static RawLanguageError* New();
FINAL_HEAP_OBJECT_IMPLEMENTATION(LanguageError, Error);
@@ -3840,9 +3876,6 @@
class UnwindError : public Error {
public:
RawString* message() const { return raw_ptr()->message_; }
- static intptr_t message_offset() {
- return OFFSET_OF(RawUnwindError, message_);
- }
static intptr_t InstanceSize() {
return RoundedAllocationSize(sizeof(RawUnwindError));
« no previous file with comments | « dart/runtime/vm/intermediate_language.h ('k') | dart/runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698