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

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

Issue 980853002: dart2dart: Bugfix in copy propagator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 5 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library code_generator; 5 library code_generator;
6 6
7 import 'glue.dart'; 7 import 'glue.dart';
8 8
9 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir; 9 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir;
10 import '../../js/js.dart' as js; 10 import '../../js/js.dart' as js;
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 js.Statement result = buildBody(); 394 js.Statement result = buildBody();
395 if (usedLabels.remove(label)) { 395 if (usedLabels.remove(label)) {
396 result = new js.LabeledStatement(label.name, result); 396 result = new js.LabeledStatement(label.name, result);
397 } 397 }
398 fallthrough = savedFallthrough; 398 fallthrough = savedFallthrough;
399 return result; 399 return result;
400 } 400 }
401 401
402 @override 402 @override
403 void visitAssign(tree_ir.Assign node) { 403 void visitAssign(tree_ir.Assign node) {
404 tree_ir.Expression value = node.definition; 404 tree_ir.Expression value = node.value;
405 js.Expression definition = visitExpression(value); 405 js.Expression definition = visitExpression(value);
406 406
407 accumulator.add(new js.ExpressionStatement(new js.Assignment( 407 accumulator.add(new js.ExpressionStatement(new js.Assignment(
408 buildVariableAccess(node.variable), 408 buildVariableAccess(node.variable),
409 definition))); 409 definition)));
410 visitStatement(node.next); 410 visitStatement(node.next);
411 } 411 }
412 412
413 @override 413 @override
414 void visitBreak(tree_ir.Break node) { 414 void visitBreak(tree_ir.Break node) {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 568
569 @override 569 @override
570 visitSuperInitializer(tree_ir.SuperInitializer node) { 570 visitSuperInitializer(tree_ir.SuperInitializer node) {
571 return errorUnsupportedNode(node); 571 return errorUnsupportedNode(node);
572 } 572 }
573 573
574 errorUnsupportedNode(tree_ir.DartSpecificNode node) { 574 errorUnsupportedNode(tree_ir.DartSpecificNode node) {
575 throw "Unsupported node in JS backend: $node"; 575 throw "Unsupported node in JS backend: $node";
576 } 576 }
577 } 577 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698