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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart

Issue 104723004: Address late comments from CL 50313007. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Another typo 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/js_emitter/container_builder.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart b/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart
index f55026a806851c867fee259d14676437a3f09cb9..254b28e8606ca93c0ab76199835ce9f790d0fa0f 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart
@@ -167,10 +167,6 @@ class ContainerBuilder extends CodeEmitterHelper {
// (4) No stub generated, call is direct.
// (5) No stub generated, call is direct.
- Set<Selector> selectors = member.isInstanceMember()
- ? compiler.codegenWorld.invokedNames[member.name]
- : null; // No stubs needed for static methods.
-
/// Returns all closure call selectors renamed to match this member.
Set<Selector> callSelectorsAsNamed() {
if (!canTearOff) return null;
@@ -183,6 +179,10 @@ class ContainerBuilder extends CodeEmitterHelper {
callSelector.argumentCount, callSelector.namedArguments);
}).toSet();
}
+
+ Set<Selector> selectors = member.isInstanceMember()
+ ? compiler.codegenWorld.invokedNames[member.name]
+ : null; // No stubs needed for static methods.
if (selectors == null) {
selectors = callSelectorsAsNamed();
if (selectors == null) return;
@@ -336,7 +336,7 @@ class ContainerBuilder extends CodeEmitterHelper {
canTearOff = false;
isClosure = true;
} else {
- // Careful with operators.
+ // TODO(ahe): What happens if an operator is passed to getterName?
canTearOff = compiler.codegenWorld.hasInvokedGetter(member, compiler);
tearOffName = namer.getterName(member);
}
@@ -435,7 +435,10 @@ class ContainerBuilder extends CodeEmitterHelper {
// stubs for implicit closures.
expressions.add("null");
// TOOD(ahe): Since we know when reading static data versus instance
- // data, we can eliminate this element.
+ // data, we can eliminate this element from the emitted array. In
+ // other words, instead of generating [..., foo, null, bar, ...], we
+ // can generate [..., foo, bar, ...] and adjust the index differently
+ // when reading this information from a static function.
}
Set<Selector> callSelectors = compiler.codegenWorld.invokedNames[
namer.closureInvocationSelectorName];

Powered by Google App Engine
This is Rietveld 408576698