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: lib/compiler/implementation/ssa/codegen.dart

Issue 10537118: Reapply "Collect field getters and setters in the universe"" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed un-needed check 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/enqueue.dart ('k') | lib/compiler/implementation/universe.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/codegen.dart
diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart
index 1b7e7d16c32cdbe58adca3905b604347a719b59a..67192715df8709a4e3877843c4a55422e4470abf 100644
--- a/lib/compiler/implementation/ssa/codegen.dart
+++ b/lib/compiler/implementation/ssa/codegen.dart
@@ -1319,7 +1319,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
compiler.internalError('visitTry should not be called', instruction: node);
}
- /**
+ /**
* Analyzes the given [graph] to know whether it is empty, or
* contains one statement, one expression, or multiple statements.
*/
@@ -1329,7 +1329,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
// Only deal with single blocks for now. TODO(ngeoffray): analyze
// all blocks.
if (start !== end) return MULTIPLE_STATEMENTS;
-
+
int kind = EMPTY;
bool updateKind(int newKind) {
if (kind != EMPTY) return false;
@@ -1688,6 +1688,10 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
buffer.add('.');
buffer.add(name);
beginExpression(JSPrecedence.MEMBER_PRECEDENCE);
+ Type type = node.receiver.propagatedType.computeType(compiler);
+ if (type != null) {
+ world.registerFieldGetter(node.element.name, type);
+ }
} else {
use(node.receiver, JSPrecedence.EXPRESSION_PRECEDENCE);
}
@@ -1701,6 +1705,10 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
use(node.receiver, JSPrecedence.MEMBER_PRECEDENCE);
buffer.add('.');
buffer.add(name);
+ Type type = node.receiver.propagatedType.computeType(compiler);
+ if (type != null) {
+ world.registerFieldSetter(node.element.name, type);
+ }
} else {
declareInstruction(node.receiver);
}
@@ -2623,12 +2631,12 @@ class SsaUnoptimizedCodeGenerator extends SsaCodeGenerator {
// find the name of its checked input. Note that there must be a
// name, otherwise the instruction would not be in the live
// environment.
- HInstruction unwrap(argument) {
+ HInstruction unwrap(argument) {
while (argument is HCheck && !variableNames.hasName(argument)) {
argument = argument.checkedInput;
}
assert(variableNames.hasName(argument));
- return argument;
+ return argument;
}
void visitTypeGuard(HTypeGuard node) {
« no previous file with comments | « lib/compiler/implementation/enqueue.dart ('k') | lib/compiler/implementation/universe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698