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

Unified Diff: runtime/vm/class_finalizer.h

Issue 10979053: Change many instance creation errors from compile-time errors to dynamic errors (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « no previous file | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.h
===================================================================
--- runtime/vm/class_finalizer.h (revision 12972)
+++ runtime/vm/class_finalizer.h (working copy)
@@ -46,9 +46,18 @@
const AbstractType& type,
FinalizationKind finalization);
- // Replace the malformed type with Dynamic and, depending on the given type
- // finalization mode and execution mode, mark the type as malformed or report
- // a compile time error. Prepend prev_error if not null.
+ // Allocate, finalize, and return a new malformed type as if it was declared
+ // in class cls at the given token position. Build the error message from the
+ // format string and its arguments.
+ static RawType* NewFinalizedMalformedType(const Class& cls,
+ intptr_t type_pos,
+ const char* format, ...)
+ PRINTF_ATTRIBUTE(3, 4);
+
+ // Depending on the given type, finalization mode, and execution mode, mark
+ // the given type as malformed or report a compile time error.
+ // If not null, prepend prev_error to the error message built from the format
+ // string and its arguments.
static void FinalizeMalformedType(const Error& prev_error,
const Class& cls,
const Type& type,
@@ -100,6 +109,12 @@
static void PrintClassInformation(const Class& cls);
static void CollectInterfaces(const Class& cls,
const GrowableObjectArray& interfaces);
+ static void ReportMalformedType(const Error& prev_error,
+ const Class& cls,
+ const Type& type,
+ FinalizationKind finalization,
+ const char* format,
+ va_list args);
static void ReportError(const Error& error);
static void ReportError(const Script& script,
intptr_t token_index,
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698