Index: pkg/compiler/lib/src/parser/diet_parser_task.dart |
diff --git a/pkg/compiler/lib/src/parser/diet_parser_task.dart b/pkg/compiler/lib/src/parser/diet_parser_task.dart |
index cccf1c6dd70358671a0c51a30a8bc13ccc7e2f55..6d9302e040bc53cb916c576a80f5775045f6749b 100644 |
--- a/pkg/compiler/lib/src/parser/diet_parser_task.dart |
+++ b/pkg/compiler/lib/src/parser/diet_parser_task.dart |
@@ -8,6 +8,7 @@ import '../common.dart'; |
import '../common/tasks.dart' show CompilerTask; |
import '../compiler.dart' show Compiler; |
import '../elements/elements.dart' show CompilationUnitElement; |
+import '../id_generator.dart'; |
import '../tokens/token.dart' show Token; |
import 'listener.dart' show ParserError; |
@@ -17,18 +18,19 @@ import 'partial_parser.dart' show PartialParser; |
class DietParserTask extends CompilerTask { |
final ParserOptions _parserOptions; |
+ final IdGenerator _idGenerator; |
- DietParserTask(Compiler compiler, this._parserOptions) : super(compiler); |
+ DietParserTask(Compiler compiler, this._parserOptions, this._idGenerator) |
+ : super(compiler); |
final String name = 'Diet Parser'; |
dietParse(CompilationUnitElement compilationUnit, Token tokens) { |
measure(() { |
- Function idGenerator = compiler.getNextFreeClassId; |
ScannerOptions scannerOptions = |
new ScannerOptions.from(compiler, compilationUnit.library); |
ElementListener listener = new ElementListener( |
- scannerOptions, compiler.reporter, compilationUnit, idGenerator); |
+ scannerOptions, compiler.reporter, compilationUnit, _idGenerator); |
PartialParser parser = new PartialParser(listener, _parserOptions); |
try { |
parser.parseUnit(tokens); |