[dart2js, ddc] Remove PRINT_LEGACY_STARS.
Bug: #60327 Change-Id: I32a9f078e4c2ae5fc3b79b4f549a4357a08818d9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416043 Reviewed-by: Stephen Adams <sra@google.com> Reviewed-by: Nicholas Shahan <nshahan@google.com> Reviewed-by: Nate Biggs <natebiggs@google.com>
This commit is contained in:
committed by
Commit Queue
parent
13b5b8ab37
commit
6a2e567859
@@ -99,7 +99,6 @@ class Flags {
|
||||
static const String noOmitLateNames = '--no-omit-late-names';
|
||||
|
||||
static const String preserveUris = '--preserve-uris';
|
||||
static const String printLegacyStars = '--debug-print-legacy-stars';
|
||||
static const String showPackageWarnings = '--show-package-warnings';
|
||||
static const String suppressHints = '--suppress-hints';
|
||||
static const String suppressWarnings = '--suppress-warnings';
|
||||
|
||||
@@ -450,7 +450,6 @@ Future<api.CompilationResult> compile(
|
||||
_OneOption(Flags.omitLateNames, passThrough),
|
||||
_OneOption(Flags.noOmitLateNames, passThrough),
|
||||
_OneOption(Flags.preserveUris, ignoreOption),
|
||||
_OneOption(Flags.printLegacyStars, passThrough),
|
||||
_OneOption('--force-strip=.*', setStrip),
|
||||
_OneOption(Flags.disableDiagnosticColors, (_) {
|
||||
enableColors = false;
|
||||
|
||||
@@ -59,7 +59,6 @@ class JsGetFlagLowering {
|
||||
_options.features.useContentSecurityPolicy.isEnabled,
|
||||
'VARIANCE' => _options.enableVariance,
|
||||
'LEGACY' => _options.useLegacySubtyping,
|
||||
'PRINT_LEGACY_STARS' => _options.printLegacyStars,
|
||||
_ => null,
|
||||
};
|
||||
|
||||
|
||||
@@ -552,9 +552,6 @@ class CompilerOptions implements DiagnosticOptions {
|
||||
/// Location of the kernel platform `.dill` files.
|
||||
Uri? platformBinaries;
|
||||
|
||||
/// Whether to print legacy types as T* rather than T.
|
||||
bool printLegacyStars = false;
|
||||
|
||||
/// URI where the compiler should generate the output source map file.
|
||||
Uri? sourceMapUri;
|
||||
|
||||
@@ -934,7 +931,6 @@ class CompilerOptions implements DiagnosticOptions {
|
||||
..generateSourceMap = !_hasOption(options, Flags.noSourceMaps)
|
||||
.._outputUri = _extractUriOption(options, '--out=')
|
||||
..platformBinaries = platformBinaries
|
||||
..printLegacyStars = _hasOption(options, Flags.printLegacyStars)
|
||||
..sourceMapUri = _extractUriOption(options, '--source-map=')
|
||||
..omitImplicitChecks = _hasOption(options, Flags.omitImplicitChecks)
|
||||
..omitAsCasts = _hasOption(options, Flags.omitAsCasts)
|
||||
|
||||
@@ -6152,9 +6152,8 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
|
||||
var value = flag.value;
|
||||
return switch (value) {
|
||||
'DEV_COMPILER' => js.boolean(true),
|
||||
// TODO(nshahan): Delete 'PRINT_LEGACY_STARS' and 'LEGACY' after
|
||||
// uses are deleted from dart:_rti.
|
||||
'PRINT_LEGACY_STARS' => js.boolean(false),
|
||||
// TODO(nshahan): Delete 'LEGACY' after uses are deleted from
|
||||
// dart:_rti.
|
||||
'LEGACY' => js.boolean(false),
|
||||
'MINIFIED' => js.boolean(false),
|
||||
'VARIANCE' =>
|
||||
|
||||
@@ -6600,9 +6600,8 @@ class LibraryCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
|
||||
var value = flag.value;
|
||||
return switch (value) {
|
||||
'DEV_COMPILER' => js.boolean(true),
|
||||
// TODO(nshahan): Delete 'PRINT_LEGACY_STARS' and 'LEGACY' after
|
||||
// uses are deleted from dart:_rti.
|
||||
'PRINT_LEGACY_STARS' => js.boolean(false),
|
||||
// TODO(nshahan): Delete 'LEGACY' after uses are deleted from
|
||||
// dart:_rti.
|
||||
'LEGACY' => js.boolean(false),
|
||||
'MINIFIED' => js.boolean(false),
|
||||
'VARIANCE' =>
|
||||
|
||||
@@ -410,9 +410,6 @@ class Rti {
|
||||
// TODO(nshahan): Make private and change the argument type to rti once this
|
||||
// method is no longer called from outside the library.
|
||||
Rti getLegacyErasedRti(Object? rti) {
|
||||
// When preserving the legacy stars in the runtime type no legacy erasure
|
||||
// happens so the cached version cannot be used.
|
||||
assert(!JS_GET_FLAG('PRINT_LEGACY_STARS'));
|
||||
var originalType = _Utils.asRti(rti);
|
||||
return Rti._getCachedRuntimeType(originalType)?._rti ??
|
||||
_createAndCacheRuntimeType(originalType)._rti;
|
||||
@@ -1181,9 +1178,6 @@ _Type _createAndCacheRuntimeType(Rti rti) {
|
||||
}
|
||||
|
||||
_Type _createRuntimeType(Rti rti) {
|
||||
if (JS_GET_FLAG('PRINT_LEGACY_STARS')) {
|
||||
return _Type(rti);
|
||||
}
|
||||
String recipe = Rti._getCanonicalRecipe(rti);
|
||||
String starErasedRecipe = Rti.getLegacyErasedRecipe(rti);
|
||||
if (starErasedRecipe == recipe) {
|
||||
@@ -1996,16 +1990,7 @@ String _rtiToString(Rti rti, List<String>? genericContext) {
|
||||
if (kind == Rti.kindStar) {
|
||||
Rti starArgument = Rti._getStarArgument(rti);
|
||||
String s = _rtiToString(starArgument, genericContext);
|
||||
if (JS_GET_FLAG('PRINT_LEGACY_STARS')) {
|
||||
int argumentKind = Rti._getKind(starArgument);
|
||||
if (argumentKind == Rti.kindFunction ||
|
||||
argumentKind == Rti.kindGenericFunction) {
|
||||
s = '(' + s + ')';
|
||||
}
|
||||
return s + '*';
|
||||
} else {
|
||||
return s;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
if (kind == Rti.kindQuestion) {
|
||||
|
||||
Reference in New Issue
Block a user