@@ -26,7 +26,6 @@ import 'package:dev_compiler/dev_compiler.dart'
26
26
import 'package:front_end/src/api_unstable/ddc.dart' as ddc
27
27
show IncrementalCompiler;
28
28
import 'package:front_end/src/api_unstable/vm.dart' ;
29
- import 'package:front_end/widget_cache.dart' ;
30
29
import 'package:kernel/ast.dart' show Library, Procedure, LibraryDependency;
31
30
import 'package:kernel/binary/ast_to_binary.dart' ;
32
31
import 'package:kernel/kernel.dart'
@@ -211,9 +210,6 @@ ArgParser argParser = ArgParser(allowTrailingOptions: true)
211
210
defaultsTo: 'amd' )
212
211
..addFlag ('dartdevc-canary' ,
213
212
help: 'Enable canary features in dartdevc compiler' , defaultsTo: false )
214
- ..addFlag ('flutter-widget-cache' ,
215
- help: 'Enable the widget cache to track changes to Widget subtypes' ,
216
- defaultsTo: false )
217
213
..addFlag ('print-incremental-dependencies' ,
218
214
help: 'Print list of sources added and removed from compilation' ,
219
215
defaultsTo: true )
@@ -436,7 +432,6 @@ class FrontendCompiler implements CompilerInterface {
436
432
/// Nullable fields
437
433
final ProgramTransformer ? transformer;
438
434
bool ? unsafePackageSerialization;
439
- WidgetCache ? _widgetCache;
440
435
441
436
_onDiagnostic (DiagnosticMessage message) {
442
437
switch (message.severity) {
@@ -623,9 +618,6 @@ class FrontendCompiler implements CompilerInterface {
623
618
);
624
619
625
620
incrementalSerializer = _generator.incrementalSerializer;
626
- if (options['flutter-widget-cache' ]) {
627
- _widgetCache = WidgetCache (component);
628
- }
629
621
} else {
630
622
if (options['link-platform' ]) {
631
623
// TODO(aam): Remove linkedDependencies once platform is directly embedded
@@ -964,7 +956,6 @@ class FrontendCompiler implements CompilerInterface {
964
956
await writeDillFile (results, _kernelBinaryFilename,
965
957
incrementalSerializer: _generator.incrementalSerializer);
966
958
}
967
- _updateWidgetCache (deltaProgram);
968
959
969
960
_outputStream.writeln (boundaryKey);
970
961
await _outputDependenciesDelta (results.compiledSources! );
@@ -1188,7 +1179,6 @@ class FrontendCompiler implements CompilerInterface {
1188
1179
@override
1189
1180
void acceptLastDelta () {
1190
1181
_generator.accept ();
1191
- _widgetCache? .reset ();
1192
1182
}
1193
1183
1194
1184
@override
@@ -1202,13 +1192,11 @@ class FrontendCompiler implements CompilerInterface {
1202
1192
@override
1203
1193
void invalidate (Uri uri) {
1204
1194
_generator.invalidate (uri);
1205
- _widgetCache? .invalidate (uri);
1206
1195
}
1207
1196
1208
1197
@override
1209
1198
void resetIncrementalCompiler () {
1210
1199
_generator.resetDeltaState ();
1211
- _widgetCache? .reset ();
1212
1200
_kernelBinaryFilename = _kernelBinaryFilenameFull;
1213
1201
}
1214
1202
@@ -1219,31 +1207,6 @@ class FrontendCompiler implements CompilerInterface {
1219
1207
incrementalSerialization: incrementalSerialization);
1220
1208
}
1221
1209
1222
- /// If the flutter widget cache is enabled, check if a single class was modified.
1223
- ///
1224
- /// The resulting class name is written as a String to
1225
- /// `_kernelBinaryFilename` .widget_cache, or else the file is deleted
1226
- /// if it exists.
1227
- ///
1228
- /// Should not run if a full component is requested.
1229
- void _updateWidgetCache (Component partialComponent) {
1230
- if (_widgetCache == null || _generator.fullComponent) {
1231
- return ;
1232
- }
1233
- final String ? singleModifiedClassName =
1234
- _widgetCache! .checkSingleWidgetTypeModified (
1235
- _generator.lastKnownGoodResult? .component,
1236
- partialComponent,
1237
- _generator.lastKnownGoodResult? .classHierarchy,
1238
- );
1239
- final File outputFile = File ('$_kernelBinaryFilename .widget_cache' );
1240
- if (singleModifiedClassName != null ) {
1241
- outputFile.writeAsStringSync (singleModifiedClassName);
1242
- } else if (outputFile.existsSync ()) {
1243
- outputFile.deleteSync ();
1244
- }
1245
- }
1246
-
1247
1210
Uri _ensureFolderPath (String path) {
1248
1211
String uriPath = Uri .file (path).toString ();
1249
1212
if (! uriPath.endsWith ('/' )) {
0 commit comments