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

Unified Diff: lib/compiler/implementation/enqueue.dart

Issue 10535074: Add field getters and setters to the collection of getters and setters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed code in comments Created 8 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 | « lib/compiler/implementation/emitter.dart ('k') | lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/enqueue.dart
diff --git a/lib/compiler/implementation/enqueue.dart b/lib/compiler/implementation/enqueue.dart
index 855c539fa1d4a28b9b0a875062deca3965ceb5cf..7ea54ad59f9748ea238929acbb3f917367ff1efb 100644
--- a/lib/compiler/implementation/enqueue.dart
+++ b/lib/compiler/implementation/enqueue.dart
@@ -109,7 +109,7 @@ class Enqueuer {
}
// If there is a property access with the same name as a method we
// need to emit the method.
- if (universe.hasGetter(member, compiler)) {
+ if (universe.hasInvokedGetter(member, compiler)) {
// We will emit a closure, so make sure the closure class is
// generated.
compiler.closureClass.ensureResolved(compiler);
@@ -117,7 +117,7 @@ class Enqueuer {
return addToWorkList(member);
}
} else if (member.kind == ElementKind.GETTER) {
- if (universe.hasGetter(member, compiler)) {
+ if (universe.hasInvokedGetter(member, compiler)) {
return addToWorkList(member);
}
// We don't know what selectors the returned closure accepts. If
@@ -126,7 +126,7 @@ class Enqueuer {
return addToWorkList(member);
}
} else if (member.kind === ElementKind.SETTER) {
- if (universe.hasSetter(member, compiler)) {
+ if (universe.hasInvokedSetter(member, compiler)) {
return addToWorkList(member);
}
}
@@ -163,13 +163,13 @@ class Enqueuer {
});
}
- void registerGetter(SourceString getterName, Selector selector) {
+ void registerInvokedGetter(SourceString getterName, Selector selector) {
task.measure(() {
registerNewSelector(getterName, selector, universe.invokedGetters);
});
}
- void registerSetter(SourceString setterName, Selector selector) {
+ void registerInvokedSetter(SourceString setterName, Selector selector) {
task.measure(() {
registerNewSelector(setterName, selector, universe.invokedSetters);
});
@@ -216,11 +216,27 @@ class Enqueuer {
}
void registerDynamicGetter(SourceString methodName, Selector selector) {
- registerGetter(methodName, selector);
+ registerInvokedGetter(methodName, selector);
}
void registerDynamicSetter(SourceString methodName, Selector selector) {
- registerSetter(methodName, selector);
+ registerInvokedSetter(methodName, selector);
+ }
+
+ void registerFieldGetter(SourceString getterName, Type type) {
+ task.measure(() {
+ registerNewSelector(getterName,
+ new TypedSelector(type, Selector.GETTER),
+ universe.fieldGetters);
+ });
+ }
+
+ void registerFieldSetter(SourceString setterName, Type type) {
+ task.measure(() {
+ registerNewSelector(setterName,
+ new TypedSelector(type, Selector.SETTER),
+ universe.fieldSetters);
+ });
}
// TODO(ngeoffray): This should get a type.
« no previous file with comments | « lib/compiler/implementation/emitter.dart ('k') | lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698