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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart

Issue 1128903012: dart2js cps: Fix for try/catch. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Status file Created 5 years, 7 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 | tests/language/language_dart2js.status » ('j') | tests/language/language_dart2js.status » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
index d804f448911c40d868fd12137f4d539873529d52..ee22d98d389973857ab747c28f64ca34f9acc0bb 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
@@ -1866,7 +1866,8 @@ abstract class IrBuilder {
List<ir.Parameter> catchParameters =
<ir.Parameter>[exceptionParameter, traceParameter];
ir.Continuation catchContinuation = new ir.Continuation(catchParameters);
- catchContinuation.body = catchBody;
+ catchBuilder.add(catchBody);
+ catchContinuation.body = catchBuilder._root;
tryCatchBuilder.add(
new ir.LetHandler(catchContinuation, tryBuilder._root));
@@ -2482,6 +2483,8 @@ class JsIrBuilder extends IrBuilder {
location.field);
result.useElementAsHint(local);
return addPrimitive(result);
+ } else if (isInMutableVariable(local)) {
+ return addPrimitive(new ir.GetMutableVariable(getMutableVariable(local)));
} else {
return environment.lookup(local);
}
@@ -2497,6 +2500,8 @@ class JsIrBuilder extends IrBuilder {
add(new ir.SetField(environment.lookup(location.box),
location.field,
value));
+ } else if (isInMutableVariable(local)) {
+ add(new ir.SetMutableVariable(getMutableVariable(local), value));
} else {
value.useElementAsHint(local);
environment.update(local, value);
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('j') | tests/language/language_dart2js.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698