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

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

Issue 1141013002: Fixes #179 -- compile error if editing files during server mode (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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/src/codegen/code_generator.dart ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/dart_codegen.dart
diff --git a/lib/src/codegen/dart_codegen.dart b/lib/src/codegen/dart_codegen.dart
index b9f55933cf1ef79930f75d3e7d287f3a3f9a2dd0..53fea1d74585f119088e25ccd2eed012566daa72 100644
--- a/lib/src/codegen/dart_codegen.dart
+++ b/lib/src/codegen/dart_codegen.dart
@@ -15,8 +15,8 @@ import 'package:dart_style/dart_style.dart';
import 'package:logging/logging.dart' as logger;
import 'package:path/path.dart' as path;
+import 'package:dev_compiler/devc.dart' show AbstractCompiler;
import 'package:dev_compiler/src/info.dart';
-import 'package:dev_compiler/src/checker/rules.dart';
import 'package:dev_compiler/src/options.dart';
import 'package:dev_compiler/src/utils.dart' as utils;
import 'ast_builder.dart';
@@ -385,13 +385,9 @@ class UnitGenerator extends UnitGeneratorCommon with ConversionVisitor<Object> {
}
class DartGenerator extends codegenerator.CodeGenerator {
- final CompilerOptions options;
- TypeRules _rules;
final DevCompilerRuntime _runtime = new DevCompilerRuntime();
- DartGenerator(String outDir, Uri root, TypeRules rules, this.options)
- : _rules = rules,
- super(outDir, root, rules);
+ DartGenerator(AbstractCompiler compiler) : super(compiler);
Set<LibraryElement> computeExtraImports(Map<Identifier, NewTypeIdDesc> ids) {
var imports = new Set<LibraryElement>();
@@ -410,7 +406,7 @@ class DartGenerator extends codegenerator.CodeGenerator {
}
String generateLibrary(LibraryUnit library, LibraryInfo info) {
- var r = new CoercionReifier(library, rules, options, _runtime);
+ var r = new CoercionReifier(library, compiler, _runtime);
var ids = r.reify();
var extraImports = computeExtraImports(ids);
@@ -448,10 +444,7 @@ class EmptyUnitGenerator extends UnitGeneratorCommon {
// This class emits the code unchanged, for comparison purposes.
class EmptyDartGenerator extends codegenerator.CodeGenerator {
- final CompilerOptions options;
-
- EmptyDartGenerator(String outDir, Uri root, TypeRules rules, this.options)
- : super(outDir, root, rules);
+ EmptyDartGenerator(AbstractCompiler compiler) : super(compiler);
String generateLibrary(LibraryUnit library, LibraryInfo info) {
for (var unit in library.partsThenLibrary) {
« no previous file with comments | « lib/src/codegen/code_generator.dart ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698