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

Unified Diff: pkg/compiler/lib/src/common/codegen.dart

Issue 2742283002: Add ConstantUse to WorldImpact (Closed)
Patch Set: Cleanup. Created 3 years, 9 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
Index: pkg/compiler/lib/src/common/codegen.dart
diff --git a/pkg/compiler/lib/src/common/codegen.dart b/pkg/compiler/lib/src/common/codegen.dart
index c733c1cad25f9bdfb29879fc4b83be04b2ed36b7..6ac632897cb19cd2dd74a14b442a3655705506b7 100644
--- a/pkg/compiler/lib/src/common/codegen.dart
+++ b/pkg/compiler/lib/src/common/codegen.dart
@@ -17,7 +17,7 @@ import '../elements/elements.dart'
MemberElement,
ResolvedAst;
import '../js_backend/backend.dart' show JavaScriptBackend;
-import '../universe/use.dart' show DynamicUse, StaticUse, TypeUse;
+import '../universe/use.dart' show ConstantUse, DynamicUse, StaticUse, TypeUse;
import '../universe/world_impact.dart'
show WorldImpact, WorldImpactBuilderImpl, WorldImpactVisitor;
import '../util/util.dart' show Pair, Setlet;
@@ -26,8 +26,6 @@ import 'work.dart' show WorkItem;
class CodegenImpact extends WorldImpact {
const CodegenImpact();
- Iterable<ConstantValue> get compileTimeConstants => const <ConstantValue>[];
-
Iterable<Pair<ResolutionDartType, ResolutionDartType>>
get typeVariableBoundsSubtypeChecks {
return const <Pair<ResolutionDartType, ResolutionDartType>>[];
@@ -47,7 +45,6 @@ class CodegenImpact extends WorldImpact {
}
class _CodegenImpact extends WorldImpactBuilderImpl implements CodegenImpact {
- Setlet<ConstantValue> _compileTimeConstants;
Setlet<Pair<ResolutionDartType, ResolutionDartType>>
_typeVariableBoundsSubtypeChecks;
Setlet<String> _constSymbols;
@@ -64,19 +61,6 @@ class _CodegenImpact extends WorldImpactBuilderImpl implements CodegenImpact {
typeUses.forEach(visitor.visitTypeUse);
}
- void registerCompileTimeConstant(ConstantValue constant) {
- if (_compileTimeConstants == null) {
- _compileTimeConstants = new Setlet<ConstantValue>();
- }
- _compileTimeConstants.add(constant);
- }
-
- Iterable<ConstantValue> get compileTimeConstants {
- return _compileTimeConstants != null
- ? _compileTimeConstants
- : const <ConstantValue>[];
- }
-
void registerTypeVariableBoundsSubtypeCheck(
ResolutionDartType subtype, ResolutionDartType supertype) {
if (_typeVariableBoundsSubtypeChecks == null) {
@@ -178,8 +162,8 @@ class CodegenRegistry {
worldImpact.registerTypeUse(typeUse);
}
- void registerCompileTimeConstant(ConstantValue constant) {
- worldImpact.registerCompileTimeConstant(constant);
+ void registerConstantUse(ConstantUse constantUse) {
+ worldImpact.registerConstantUse(constantUse);
}
void registerTypeVariableBoundsSubtypeCheck(
« no previous file with comments | « no previous file | pkg/compiler/lib/src/enqueue.dart » ('j') | pkg/compiler/lib/src/js_backend/lookup_map_analysis.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698