Chromium Code Reviews| Index: lib/compiler/implementation/ssa/builder.dart |
| diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart |
| index c5b35184a51f412859fd4f97f39845f1df1c057e..5fe36054a309011284ac6834c164782ee67adab9 100644 |
| --- a/lib/compiler/implementation/ssa/builder.dart |
| +++ b/lib/compiler/implementation/ssa/builder.dart |
| @@ -1493,6 +1493,9 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
| } |
| visitFunctionExpression(FunctionExpression node) { |
| + if (compiler.pass == 2) { |
| + throw new Pass2BailoutException("visitFunctionExpression"); |
| + } |
| ClosureData nestedClosureData = builder.closureDataCache[node]; |
| if (nestedClosureData === null) { |
| // TODO(floitsch): we can only assume that the reason for not having a |
| @@ -1504,11 +1507,13 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
| ClassElement closureClassElement = |
| nestedClosureData.closureClassElement; |
| FunctionElement callElement = nestedClosureData.callElement; |
| - // TODO(ahe): This should be registered in codegen, not here. |
| - compiler.enqueuer.codegen.addToWorkList(callElement, elements); |
| - // TODO(ahe): This should be registered in codegen, not here. |
| - compiler.enqueuer.codegen.registerInstantiatedClass(closureClassElement); |
| - assert(closureClassElement.members.isEmpty()); |
| + if (compiler.pass == 1) { |
|
floitsch
2012/06/07 10:59:39
Shouldn't be needed: we bailout earlier, and even
Søren Gjesse
2012/06/13 10:55:09
Removed. Actually the bailout is also removed but
|
| + // TODO(ahe): This should be registered in codegen, not here. |
| + compiler.enqueuer.codegen.addToWorkList(callElement, elements); |
| + // TODO(ahe): This should be registered in codegen, not here. |
| + compiler.enqueuer.codegen.registerInstantiatedClass(closureClassElement); |
| + assert(closureClassElement.members.isEmpty()); |
| + } |
| List<HInstruction> capturedVariables = <HInstruction>[]; |
| for (Element member in closureClassElement.backendMembers) { |