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

Unified Diff: runtime/vm/parser.h

Issue 9515011: Add support for malformed types and postpone some related errors from compile (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/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.h
===================================================================
--- runtime/vm/parser.h (revision 4731)
+++ runtime/vm/parser.h (working copy)
@@ -8,6 +8,7 @@
#include "include/dart_api.h"
#include "vm/ast.h"
+#include "vm/class_finalizer.h"
#include "vm/compiler_stats.h"
#include "vm/scanner.h"
@@ -181,13 +182,15 @@
const char* format,
va_list args);
- // Reports error message at location of current token.
+ // Reports error/warning message at location of current token.
void ErrorMsg(const char* msg, ...);
- void ErrorMsg(intptr_t token_index, const char* msg, ...);
void Warning(const char* msg, ...);
- void Warning(intptr_t token_index, const char* msg, ...);
void Unimplemented(const char* msg);
+ // Reports error message at given location.
+ void ErrorMsg(intptr_t token_index, const char* msg, ...);
+ void Warning(intptr_t token_index, const char* msg, ...);
+
const Instance& EvaluateConstExpr(AstNode* expr);
void RunStaticFieldInitializer(const Field& field);
RawObject* EvaluateConstConstructorCall(
@@ -217,18 +220,14 @@
void ParseLibraryInclude();
void ParseLibraryResource();
- enum TypeResolution {
- kIgnore, // Parsed type is ignored and replaced by Dynamic.
- kDoNotResolve, // Type resolution is postponed.
- kCanResolve, // Type resolution is optional.
- kMustResolve // Type resolution is required.
- };
void ResolveTypeFromClass(const Class& cls,
- TypeResolution type_resolution,
+ ClassFinalizer::FinalizationKind finalization,
AbstractType* type);
- RawAbstractType* ParseType(TypeResolution type_resolution);
+ RawAbstractType* ParseType(ClassFinalizer::FinalizationKind finalization);
void ParseTypeParameters(const Class& cls);
- RawAbstractTypeArguments* ParseTypeArguments(TypeResolution type_resolution);
+ RawAbstractTypeArguments* ParseTypeArguments(
+ Error* malformed_error,
+ ClassFinalizer::FinalizationKind finalization);
void ParseQualIdent(QualIdent* qual_ident);
void ParseMethodOrConstructor(ClassDesc* members, MemberDesc* method);
void ParseFieldDefinition(ClassDesc* members, MemberDesc* field);
@@ -323,7 +322,8 @@
// Add the inlined finally block to the specified node.
void AddFinallyBlockToNode(AstNode* node, InlinedFinallyNode* finally_node);
AstNode* ParseTryStatement(String* label_name);
- RawAbstractType* ParseFinalVarOrType(TypeResolution type_resolution);
+ RawAbstractType* ParseFinalVarOrType(
+ ClassFinalizer::FinalizationKind finalization);
AstNode* ParseVariableDeclaration(const AbstractType& type, bool is_const);
AstNode* ParseVariableDeclarationList();
AstNode* ParseFunctionStatement(bool is_literal);
@@ -424,6 +424,7 @@
const char* function_name,
ArgumentListNode* arguments);
AstNode* MakeAssertCall(intptr_t begin, intptr_t end);
+ AstNode* ThrowTypeError(intptr_t type_pos, const AbstractType& type);
void CheckFunctionIsCallable(intptr_t token_index, const Function& function);
void CheckOperatorArity(const MemberDesc& member, Token::Kind operator_token);
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698