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

Side by Side Diff: pkg/compiler/lib/src/js_backend/codegen/unsugar.dart

Issue 1134753007: dart2js cps: Stack trace should be obtained from raw exception value. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Status files 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/tests/vm/vm.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library dart2js.unsugar_cps; 1 library dart2js.unsugar_cps;
2 2
3 import '../../cps_ir/cps_ir_nodes.dart'; 3 import '../../cps_ir/cps_ir_nodes.dart';
4 4
5 // TODO(karlklose): share the [ParentVisitor]. 5 // TODO(karlklose): share the [ParentVisitor].
6 import '../../cps_ir/optimizers.dart'; 6 import '../../cps_ir/optimizers.dart';
7 import '../../constants/expressions.dart'; 7 import '../../constants/expressions.dart';
8 import '../../constants/values.dart'; 8 import '../../constants/values.dart';
9 import '../../elements/elements.dart' show 9 import '../../elements/elements.dart' show
10 ClassElement, 10 ClassElement,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 if (_exceptionParameter.hasAtLeastOneUse || 186 if (_exceptionParameter.hasAtLeastOneUse ||
187 stackTraceParameter.hasAtLeastOneUse) { 187 stackTraceParameter.hasAtLeastOneUse) {
188 Parameter exceptionValue = new Parameter(null); 188 Parameter exceptionValue = new Parameter(null);
189 exceptionValue.substituteFor(_exceptionParameter); 189 exceptionValue.substituteFor(_exceptionParameter);
190 insertStaticCall(_glue.getExceptionUnwrapper(), [_exceptionParameter], 190 insertStaticCall(_glue.getExceptionUnwrapper(), [_exceptionParameter],
191 exceptionValue, body); 191 exceptionValue, body);
192 192
193 if (stackTraceParameter.hasAtLeastOneUse) { 193 if (stackTraceParameter.hasAtLeastOneUse) {
194 Parameter stackTraceValue = new Parameter(null); 194 Parameter stackTraceValue = new Parameter(null);
195 stackTraceValue.substituteFor(stackTraceParameter); 195 stackTraceValue.substituteFor(stackTraceParameter);
196 insertStaticCall(_glue.getTraceFromException(), [exceptionValue], 196 insertStaticCall(_glue.getTraceFromException(), [_exceptionParameter],
197 stackTraceValue, body); 197 stackTraceValue, body);
198 } 198 }
199 } 199 }
200 200
201 assert(stackTraceParameter.hasNoUses); 201 assert(stackTraceParameter.hasNoUses);
202 node.handler.parameters.removeLast(); 202 node.handler.parameters.removeLast();
203 } 203 }
204 204
205 @override 205 @override
206 visitLetHandler(LetHandler node) { 206 visitLetHandler(LetHandler node) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 new LetPrim(i, 286 new LetPrim(i,
287 new Branch(new IsTrue(i), 287 new Branch(new IsTrue(i),
288 node.trueContinuation.definition, 288 node.trueContinuation.definition,
289 node.falseContinuation.definition))); 289 node.falseContinuation.definition)));
290 condition.value.unlink(); 290 condition.value.unlink();
291 node.trueContinuation.unlink(); 291 node.trueContinuation.unlink();
292 node.falseContinuation.unlink(); 292 node.falseContinuation.unlink();
293 parent.body = newNode; 293 parent.body = newNode;
294 } 294 }
295 } 295 }
OLDNEW
« no previous file with comments | « no previous file | runtime/tests/vm/vm.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698