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

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

Issue 2464103002: Introduce ClassLike, MemberLike, FieldLike and FunctionLike (Closed)
Patch Set: Created 4 years, 1 month 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/ssa/codegen.dart
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index a50cffe917f140279e31034cff91773381a878e2..777855c3b0e715228ca66b78dac0304bce6326fc 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -1582,7 +1582,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
js.Expression object = pop();
String methodName;
List<js.Expression> arguments = visitArguments(node.inputs);
- Element target = node.element;
+ MemberElement target = node.element;
// TODO(herhut): The namer should return the appropriate backendname here.
if (target != null && !node.isInterceptedCall) {
@@ -1680,7 +1680,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
// If we don't know what we're calling or if we are calling a getter,
// we need to register that fact that we may be calling a closure
// with the same arguments.
- Element target = node.element;
+ MemberElement target = node.element;
if (target == null || target.isGetter) {
// TODO(kasperl): If we have a typed selector for the call, we
// may know something about the types of closures that need
@@ -1762,7 +1762,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
visitInvokeStatic(HInvokeStatic node) {
- Element element = node.element;
+ MemberElement element = node.element;
List<DartType> instantiatedTypes = node.instantiatedTypes;
if (instantiatedTypes != null && !instantiatedTypes.isEmpty) {
@@ -1809,7 +1809,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
visitInvokeSuper(HInvokeSuper node) {
- Element superElement = node.element;
+ MemberElement superElement = node.element;
ClassElement superClass = superElement.enclosingClass;
if (superElement.isField) {
js.Name fieldName = backend.namer.instanceFieldPropertyName(superElement);
@@ -1867,7 +1867,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
visitFieldGet(HFieldGet node) {
use(node.receiver);
- Element element = node.element;
+ MemberElement element = node.element;
if (node.isNullCheck) {
// We access a JavaScript member we know all objects besides
// null and undefined have: V8 does not like accessing a member
@@ -1889,7 +1889,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
visitFieldSet(HFieldSet node) {
- Element element = node.element;
+ MemberElement element = node.element;
registry.registerStaticUse(new StaticUse.fieldSet(element));
js.Name name = backend.namer.instanceFieldPropertyName(element);
use(node.receiver);
@@ -1900,7 +1900,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
visitReadModifyWrite(HReadModifyWrite node) {
- Element element = node.element;
+ FieldElement element = node.element;
registry.registerStaticUse(new StaticUse.fieldGet(element));
registry.registerStaticUse(new StaticUse.fieldSet(element));
js.Name name = backend.namer.instanceFieldPropertyName(element);
@@ -2279,7 +2279,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
void visitStatic(HStatic node) {
- Element element = node.element;
+ MemberLike element = node.element;
assert(element.isFunction || element.isField);
if (element.isFunction) {
push(backend.emitter
@@ -2295,7 +2295,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
void visitLazyStatic(HLazyStatic node) {
- Element element = node.element;
+ FieldLike element = node.element;
registry.registerStaticUse(new StaticUse.staticInit(element));
js.Expression lazyGetter =
backend.emitter.isolateLazyInitializerAccess(element);

Powered by Google App Engine
This is Rietveld 408576698