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

Unified Diff: lib/compiler/implementation/compiler.dart

Issue 10332196: Start working on unparse validation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Start working on unparse validation. Created 8 years, 7 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 | « lib/compiler/implementation/apiimpl.dart ('k') | lib/compiler/implementation/dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index 45d252d55546a150db051440883e9a07d59b3ca6..3f191638fd543341205d2873d2e402fe021fb9d1 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -125,6 +125,7 @@ class Compiler implements DiagnosticListener {
DietParserTask dietParser;
ParserTask parser;
TreeValidatorTask validator;
+ UnparseValidator unparseValidator;
ResolverTask resolver;
TypeCheckerTask checker;
Backend backend;
@@ -143,7 +144,8 @@ class Compiler implements DiagnosticListener {
Compiler([this.tracer = const Tracer(),
this.enableTypeAssertions = false,
- bool emitJavascript = true])
+ bool emitJavascript = true,
+ validateUnparse = false])
: libraries = new Map<String, LibraryElement>(),
world = new World(),
codegenProgress = new Stopwatch.start() {
@@ -153,13 +155,14 @@ class Compiler implements DiagnosticListener {
dietParser = new DietParserTask(this);
parser = new ParserTask(this);
validator = new TreeValidatorTask(this);
+ unparseValidator = new UnparseValidator(this, validateUnparse);
resolver = new ResolverTask(this);
checker = new TypeCheckerTask(this);
backend = emitJavascript ?
new JavaScriptBackend(this) : new DartBackend(this);
enqueuer = new EnqueueTask(this);
tasks = [scanner, dietParser, parser, resolver, checker,
- constantHandler, enqueuer];
+ unparseValidator, constantHandler, enqueuer];
}
Universe get codegenWorld() => enqueuer.codegen.universe;
@@ -374,6 +377,7 @@ class Compiler implements DiagnosticListener {
assert(parser !== null);
Node tree = parser.parse(element);
validator.validate(tree);
+ unparseValidator.check(element);
TreeElements elements = resolver.resolve(element);
checker.check(tree, elements);
return elements;
« no previous file with comments | « lib/compiler/implementation/apiimpl.dart ('k') | lib/compiler/implementation/dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698