Chromium Code Reviews| 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..1c7d006adffce76b381580aa4e5f374fb203f981 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,12 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| buffer.add('.'); |
| buffer.add(name); |
| beginExpression(JSPrecedence.MEMBER_PRECEDENCE); |
| + if (node.receiver != null) { |
|
ngeoffray
2012/06/12 08:23:07
I don't think this can happen, see line 1687
Søren Gjesse
2012/06/12 10:09:17
Removed check.
|
| + Type type = node.receiver.propagatedType.computeType(compiler); |
| + if (type != null) { |
|
ngeoffray
2012/06/12 08:23:07
I'm surprised that we have a null type here. A HIn
Søren Gjesse
2012/06/12 10:09:17
As discussed offline there are HFieldGet instructi
|
| + world.registerFieldGetter(node.element.name, type); |
| + } |
| + } |
| } else { |
| use(node.receiver, JSPrecedence.EXPRESSION_PRECEDENCE); |
| } |
| @@ -1701,6 +1707,12 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| use(node.receiver, JSPrecedence.MEMBER_PRECEDENCE); |
| buffer.add('.'); |
| buffer.add(name); |
| + if (node.receiver != null) { |
| + Type type = node.receiver.propagatedType.computeType(compiler); |
| + if (type != null) { |
| + world.registerFieldSetter(node.element.name, type); |
| + } |
| + } |
| } else { |
| declareInstruction(node.receiver); |
| } |
| @@ -2623,12 +2635,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) { |