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

Unified Diff: frog/leg/compiler.dart

Issue 9223012: Small changes to get code generation of getters and setters working. Resolution is not fully corr... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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 | frog/leg/emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/compiler.dart
===================================================================
--- frog/leg/compiler.dart (revision 3641)
+++ frog/leg/compiler.dart (working copy)
@@ -151,14 +151,23 @@
// overwritten by subclasses.
for (Element member in currentClass.members) {
SourceString name = member.name;
- if (Elements.isInstanceMethod(member) &&
- universe.generatedCode[member] === null) {
+ if (universe.generatedCode[member] !== null) continue;
+ if (!member.isInstanceMember()) continue;
+ if (member.kind == ElementKind.FUNCTION) {
FunctionElement element = member;
Set<int> invocations = universe.invokedNames[name];
if (invocations != null
&& invocations.contains(element.parameterCount(this))) {
addToWorklist(member);
}
+ } else if (member.kind == ElementKind.GETTER) {
+ if (universe.invokedGetters.contains(name)) {
+ addToWorklist(member);
+ }
+ } else if (member.kind === ElementKind.SETTER) {
+ if (universe.invokedSetters.contains(name)) {
+ addToWorklist(member);
+ }
}
}
}
« no previous file with comments | « no previous file | frog/leg/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698