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

Unified Diff: lib/src/codegen/js_codegen.dart

Issue 1401273002: Move DDC to analyzer-based checker (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: rebase Created 5 years, 2 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/src/codegen/code_generator.dart ('k') | lib/src/codegen/reify_coercions.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/js_codegen.dart
diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart
index 99a24081af8820c5e756a892f4d544147b01153e..872a7a532064a9b18f9151a540d69a136561907a 100644
--- a/lib/src/codegen/js_codegen.dart
+++ b/lib/src/codegen/js_codegen.dart
@@ -105,11 +105,10 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ClosureAnnotator {
Map<String, DartType> _objectMembers;
- JSCodegenVisitor(AbstractCompiler compiler, this.currentLibrary,
+ JSCodegenVisitor(AbstractCompiler compiler, this.rules, this.currentLibrary,
this._extensionTypes, this._fieldsNeedingStorage)
: compiler = compiler,
options = compiler.options.codegenOptions,
- rules = compiler.rules,
_types = compiler.context.typeProvider {
_loader = new ModuleItemLoadOrder(_emitModuleItem);
@@ -125,7 +124,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ClosureAnnotator {
JS.Program emitLibrary(LibraryUnit library) {
// Modify the AST to make coercions explicit.
- new CoercionReifier(library, compiler).reify();
+ new CoercionReifier(library, rules).reify();
// Build the public namespace for this library. This allows us to do
// constant time lookups (contrast with `Element.getChild(name)`).
@@ -3280,7 +3279,7 @@ class JSGenerator extends CodeGenerator {
var library = unit.library.element.library;
var fields = findFieldsNeedingStorage(unit);
var codegen =
- new JSCodegenVisitor(compiler, library, _extensionTypes, fields);
+ new JSCodegenVisitor(compiler, rules, library, _extensionTypes, fields);
var module = codegen.emitLibrary(unit);
var out = compiler.getOutputPath(library.source.uri);
return writeJsLibrary(module, out,
« no previous file with comments | « lib/src/codegen/code_generator.dart ('k') | lib/src/codegen/reify_coercions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698