Skip to content

Commit 45b1612

Browse files
nshahanCommit Queue
authored andcommitted
[ddc] Delete generic class table
The generic class table is no longer used since changing to the new representation for generic classes. Change-Id: I836e0ee9e4b291dab68397554adbbd1a67376b9f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388740 Commit-Queue: Nicholas Shahan <[email protected]> Reviewed-by: Mark Zhou <[email protected]>
1 parent 2142d8e commit 45b1612

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

pkg/dev_compiler/lib/src/kernel/compiler.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,6 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
187187
/// Table of named and possibly hoisted types.
188188
late TypeTable _typeTable;
189189

190-
/// Table of instantiated generic class references.
191-
///
192-
/// Provides a cache for the instantiated generic types local to a module.
193-
late TypeTable _genericClassTable;
194-
195190
/// The global extension type table.
196191
// TODO(jmesserly): rename to `_nativeTypes`
197192
final NativeTypeSet _extensionTypes;
@@ -586,7 +581,6 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
586581

587582
_nullableInference.allowNotNullDeclarations = _isBuildingSdk;
588583
_typeTable = TypeTable('T', _runtimeCall);
589-
_genericClassTable = TypeTable('G', _runtimeCall);
590584

591585
// Collect all class/type Element -> Node mappings
592586
// in case we need to forward declare any classes.
@@ -786,10 +780,6 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
786780
items.addAll(_typeTable.dischargeBoundTypes());
787781
_ticker?.logMs('Emitted type table');
788782

789-
// Emit the hoisted instantiated generic class table cache variables
790-
items.addAll(_genericClassTable.dischargeBoundTypes());
791-
_ticker?.logMs('Emitted instantiated generic class table');
792-
793783
var module = _finishModule(items, _options.moduleName,
794784
header: _generateCompilationHeader());
795785
_ticker?.logMs('Finished emitting module');
@@ -3514,7 +3504,6 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
35143504
_uriContainer = ModuleItemContainer<String>.asArray('I');
35153505

35163506
_typeTable.typeContainer.setIncrementalMode();
3517-
_genericClassTable.typeContainer.setIncrementalMode();
35183507
}
35193508

35203509
/// Emits function after initial compilation.
@@ -3562,7 +3551,6 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
35623551
var body = js_ast.Block([
35633552
...extensionSymbols,
35643553
..._typeTable.dischargeBoundTypes(),
3565-
..._genericClassTable.dischargeBoundTypes(),
35663554
..._symbolContainer.emit(),
35673555
..._emitConstTable(),
35683556
..._uriContainer.emit(),

pkg/dev_compiler/lib/src/kernel/compiler_new.dart

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,6 @@ class LibraryCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
348348
/// Table of named and possibly hoisted types.
349349
late TypeTable _typeTable;
350350

351-
/// Table of instantiated generic class references.
352-
///
353-
/// Provides a cache for the instantiated generic types local to a module.
354-
late TypeTable _genericClassTable;
355-
356351
/// The global extension type table.
357352
// TODO(jmesserly): rename to `_nativeTypes`
358353
final NativeTypeSet _extensionTypes;
@@ -740,7 +735,6 @@ class LibraryCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
740735
var items = _startLibrary(library);
741736
_nullableInference.allowNotNullDeclarations = _isBuildingSdk;
742737
_typeTable = TypeTable('T', _runtimeCall);
743-
_genericClassTable = TypeTable('G', _runtimeCall);
744738
// Insert a circular reference so neither the constant table or its cache
745739
// are optimized away by V8. Required for expression evaluation.
746740
var constTableDeclaration =
@@ -932,9 +926,6 @@ class LibraryCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
932926
items.addAll(_typeTable.dischargeBoundTypes());
933927
_ticker?.logMs('Emitted type table');
934928

935-
// Emit the hoisted instantiated generic class table cache variables
936-
items.addAll(_genericClassTable.dischargeBoundTypes());
937-
_ticker?.logMs('Emitted instantiated generic class table');
938929
var compiledLibrary = _finishLibrary(
939930
items, '${library.importUri}', _emitLibraryName(library));
940931
_ticker?.logMs('Finished emitting module');
@@ -3580,7 +3571,6 @@ class LibraryCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
35803571
_uriContainer = ModuleItemContainer<String>.asArray('I');
35813572

35823573
_typeTable.typeContainer.setIncrementalMode();
3583-
_genericClassTable.typeContainer.setIncrementalMode();
35843574
}
35853575

35863576
/// Emits function after initial compilation.
@@ -3627,7 +3617,6 @@ class LibraryCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
36273617
var body = js_ast.Block([
36283618
...extensionSymbols,
36293619
..._typeTable.dischargeBoundTypes(),
3630-
..._genericClassTable.dischargeBoundTypes(),
36313620
..._symbolContainer.emit(),
36323621
..._emitConstTable(),
36333622
..._uriContainer.emit(),

0 commit comments

Comments
 (0)