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

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

Issue 1580613002: dart2js: Remove rethrow from the CPS and Tree IRs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Restore rethrow to the CPS IR. Created 4 years, 11 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 | pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 '../../closure.dart' show 9 import '../../closure.dart' show
10 ClosureClassElement; 10 ClosureClassElement;
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 .withSourceInformation(node.sourceInformation)); 782 .withSourceInformation(node.sourceInformation));
783 } 783 }
784 } 784 }
785 785
786 @override 786 @override
787 void visitThrow(tree_ir.Throw node) { 787 void visitThrow(tree_ir.Throw node) {
788 accumulator.add(new js.Throw(visitExpression(node.value))); 788 accumulator.add(new js.Throw(visitExpression(node.value)));
789 } 789 }
790 790
791 @override 791 @override
792 void visitRethrow(tree_ir.Rethrow node) {
793 glue.reportInternalError('rethrow seen in JavaScript output');
794 }
795
796 @override
797 void visitUnreachable(tree_ir.Unreachable node) { 792 void visitUnreachable(tree_ir.Unreachable node) {
798 if (emitUnreachableAsReturn.last) { 793 if (emitUnreachableAsReturn.last) {
799 // Emit a return to assist local analysis in the VM. 794 // Emit a return to assist local analysis in the VM.
800 accumulator.add(new js.Return()); 795 accumulator.add(new js.Return());
801 } 796 }
802 } 797 }
803 798
804 @override 799 @override
805 void visitTry(tree_ir.Try node) { 800 void visitTry(tree_ir.Try node) {
806 js.Block tryBlock = buildBodyBlock(node.tryBody); 801 js.Block tryBlock = buildBodyBlock(node.tryBody);
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 void registerDefaultParameterValues(ExecutableElement element) { 1225 void registerDefaultParameterValues(ExecutableElement element) {
1231 if (element is! FunctionElement) return; 1226 if (element is! FunctionElement) return;
1232 FunctionElement function = element; 1227 FunctionElement function = element;
1233 if (function.isStatic) return; // Defaults are inlined at call sites. 1228 if (function.isStatic) return; // Defaults are inlined at call sites.
1234 function.functionSignature.forEachOptionalParameter((param) { 1229 function.functionSignature.forEachOptionalParameter((param) {
1235 ConstantValue constant = glue.getDefaultParameterValue(param); 1230 ConstantValue constant = glue.getDefaultParameterValue(param);
1236 registry.registerCompileTimeConstant(constant); 1231 registry.registerCompileTimeConstant(constant);
1237 }); 1232 });
1238 } 1233 }
1239 } 1234 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698