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

Side by Side Diff: pkg/compiler/lib/src/patch_parser.dart

Issue 1880323002: dart2js cleanup: remove unused imports and variables (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge master 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * This library contains the infrastructure to parse and integrate patch files. 6 * This library contains the infrastructure to parse and integrate patch files.
7 * 7 *
8 * Three types of elements can be patched: [LibraryElement], [ClassElement], 8 * Three types of elements can be patched: [LibraryElement], [ClassElement],
9 * [FunctionElement]. Patches are introduced in patch libraries which are loaded 9 * [FunctionElement]. Patches are introduced in patch libraries which are loaded
10 * together with the corresponding origin library. Which libraries that are 10 * together with the corresponding origin library. Which libraries that are
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 * - Builders shift between declaration and implementation depending on usages. 109 * - Builders shift between declaration and implementation depending on usages.
110 * - Compile-time constants use constructor implementation exclusively. 110 * - Compile-time constants use constructor implementation exclusively.
111 * - Work on function parameters is performed on the declaration of the function 111 * - Work on function parameters is performed on the declaration of the function
112 * element. 112 * element.
113 */ 113 */
114 114
115 library dart2js.patchparser; 115 library dart2js.patchparser;
116 116
117 import 'dart:async'; 117 import 'dart:async';
118 118
119 import 'constants/values.dart' show ConstantValue; 119 import 'common/tasks.dart' show CompilerTask;
120 import 'common.dart'; 120 import 'common.dart';
121 import 'compiler.dart' show Compiler; 121 import 'compiler.dart' show Compiler;
122 import 'common/tasks.dart' show CompilerTask; 122 import 'constants/values.dart' show ConstantValue;
123 import 'dart_types.dart' show DartType; 123 import 'dart_types.dart' show DartType;
124 import 'elements/elements.dart'; 124 import 'elements/elements.dart';
125 import 'elements/modelx.dart' 125 import 'elements/modelx.dart'
126 show 126 show
127 BaseFunctionElementX, 127 BaseFunctionElementX,
128 ClassElementX, 128 ClassElementX,
129 GetterElementX, 129 GetterElementX,
130 LibraryElementX, 130 LibraryElementX,
131 MetadataAnnotationX,
132 SetterElementX; 131 SetterElementX;
133 import 'id_generator.dart'; 132 import 'id_generator.dart';
134 import 'js_backend/js_backend.dart' show JavaScriptBackend; 133 import 'js_backend/js_backend.dart' show JavaScriptBackend;
135 import 'library_loader.dart' show LibraryLoader; 134 import 'library_loader.dart' show LibraryLoader;
136 import 'options.dart' show ParserOptions; 135 import 'options.dart' show ParserOptions;
136 import 'parser/element_listener.dart' show ElementListener;
137 import 'parser/listener.dart' show Listener, ParserError; 137 import 'parser/listener.dart' show Listener, ParserError;
138 import 'parser/element_listener.dart' show ElementListener;
139 import 'parser/member_listener.dart' show MemberListener; 138 import 'parser/member_listener.dart' show MemberListener;
139 import 'parser/parser.dart' show Parser;
140 import 'parser/partial_elements.dart' show PartialClassElement; 140 import 'parser/partial_elements.dart' show PartialClassElement;
141 import 'parser/partial_parser.dart' show PartialParser; 141 import 'parser/partial_parser.dart' show PartialParser;
142 import 'parser/parser.dart' show Parser;
143 import 'scanner/scanner.dart' show Scanner; 142 import 'scanner/scanner.dart' show Scanner;
144 import 'script.dart'; 143 import 'script.dart';
145 import 'tokens/token.dart' show StringToken, Token; 144 import 'tokens/token.dart' show StringToken, Token;
146 145
147 class PatchParserTask extends CompilerTask { 146 class PatchParserTask extends CompilerTask {
148 final String name = "Patching Parser"; 147 final String name = "Patching Parser";
149 final ParserOptions parserOptions; 148 final ParserOptions parserOptions;
150 149
151 PatchParserTask(Compiler compiler, this.parserOptions) : super(compiler); 150 PatchParserTask(Compiler compiler, this.parserOptions) : super(compiler);
152 151
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 611
613 class PatchVersion { 612 class PatchVersion {
614 final String tag; 613 final String tag;
615 614
616 const PatchVersion(this.tag); 615 const PatchVersion(this.tag);
617 616
618 bool isActive(String patchTag) => tag == null || tag == patchTag; 617 bool isActive(String patchTag) => tag == null || tag == patchTag;
619 618
620 String toString() => 'PatchVersion($tag)'; 619 String toString() => 'PatchVersion($tag)';
621 } 620 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/parser/partial_elements.dart ('k') | pkg/compiler/lib/src/resolution/class_members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698