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

Unified Diff: pkg/compiler/lib/src/parser/diet_parser_task.dart

Issue 1867243004: Begin refactoring compiler out of diet parser and scanner (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « pkg/compiler/lib/src/id_generator.dart ('k') | pkg/compiler/lib/src/parser/element_listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « pkg/compiler/lib/src/id_generator.dart ('k') | pkg/compiler/lib/src/parser/element_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698