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

Unified Diff: pkg/compiler/lib/src/closure.dart

Issue 2925263002: A step towards handling `new Object()` in compile_from_dill_test (Closed)
Patch Set: Updated cf. comments Created 3 years, 6 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/closure.dart
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index 5611c40773068cd12b9d6c64556f793164f7c80d..4b0f6beaa21059a6ec91463541f49b2b3694a685 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -150,7 +150,8 @@ class ClosureFieldElement extends ElementX
MemberElement get memberContext => closureClass.methodElement.memberContext;
@override
- Entity get declaredEntity => local;
+ Local get declaredEntity => local;
+
@override
Entity get rootOfScope => closureClass;
@@ -292,6 +293,7 @@ class BoxLocal extends Local {
// find a more general solution.
class BoxFieldElement extends ElementX
implements TypedElement, FieldElement, PrivatelyNamedJSEntity {
+ final LocalVariableElement variableElement;
final BoxLocal box;
BoxFieldElement(String name, this.variableElement, BoxLocal box)
@@ -303,12 +305,11 @@ class BoxFieldElement extends ElementX
ResolutionDartType get type => variableElement.type;
@override
- Entity get declaredEntity => variableElement;
+ Local get declaredEntity => variableElement;
+
@override
Entity get rootOfScope => box;
- final VariableElement variableElement;
-
accept(ElementVisitor visitor, arg) {
return visitor.visitBoxFieldElement(this, arg);
}
@@ -722,7 +723,6 @@ class ClosureTranslator extends Visitor {
String name = getClosureVariableName(capturedLocal.name, id);
addClosureField(capturedLocal, name);
}
- closureClass.reverseBackendMembers();
}
}
@@ -1243,8 +1243,8 @@ class TypeVariableLocal implements Local {
///
/// Move the below classes to a JS model eventually.
///
-abstract class JSEntity implements Entity {
- Entity get declaredEntity;
+abstract class JSEntity implements MemberEntity {
+ Local get declaredEntity;
}
abstract class PrivatelyNamedJSEntity implements JSEntity {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698