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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/closure.dart

Issue 99303004: Remove unused API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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: dart/sdk/lib/_internal/compiler/implementation/closure.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/closure.dart b/dart/sdk/lib/_internal/compiler/implementation/closure.dart
index 11529b6cf7756d91fba9e23add635955bd5051bd..2b0849402d20b22f767e7bcf383771021a762cb3 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/closure.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/closure.dart
@@ -197,23 +197,6 @@ class ThisElement extends ElementX {
accept(ElementVisitor visitor) => visitor.visitThisElement(this);
}
-// TODO(ahe): These classes continuously cause problems. We need to
-// move these classes to elements/modelx.dart or see if we can find a
-// more general solution.
-class CheckVariableElement extends ElementX {
- Element parameter;
- CheckVariableElement(String name, this.parameter, Element enclosing)
- : super(name, ElementKind.VARIABLE, enclosing);
-
- DartType computeType(Compiler compiler) => compiler.types.dynamicType;
-
- // Since there is no declaration for the synthetic 'check' variable, use
- // parameter.
- Token position() => parameter.position();
-
- accept(ElementVisitor visitor) => visitor.visitCheckVariableElement(this);
-}
-
// The box-element for a scope, and the captured variables that need to be
// stored in the box.
class ClosureScope {
@@ -271,11 +254,6 @@ class ClosureClassMap {
bool isClosure() => closureElement != null;
- bool isVariableCaptured(Element element) {
- return freeVariableMapping.containsKey(element)
- || capturingScopesBox(element);
- }
-
bool capturingScopesBox(Element element) {
return capturingScopes.values.any((scope) {
return scope.boxedLoopVariables.contains(element);
@@ -307,14 +285,6 @@ class ClosureClassMap {
scope.capturedVariableMapping.forEach(f);
});
}
-
- void forEachNonBoxedCapturedVariable(void f(Element local, Element field)) {
- freeVariableMapping.forEach((variable, copy) {
- if (variable is BoxElement) return;
- if (isVariableBoxed(variable)) return;
- f(variable, copy);
- });
- }
}
class ClosureTranslator extends Visitor {

Powered by Google App Engine
This is Rietveld 408576698