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

Unified Diff: lib/compiler/implementation/ssa/builder.dart

Issue 10537025: Prototype re-compiling methods in dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
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) {
+ // 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) {

Powered by Google App Engine
This is Rietveld 408576698