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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart

Issue 1243063002: dart2js cps: Remove NonTailThrow. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebase Created 5 years, 5 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/cps_ir/cps_ir_builder_task.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 dart2js.ir_builder; 5 library dart2js.ir_builder;
6 6
7 import '../compile_time_constants.dart' show BackendConstantEnvironment; 7 import '../compile_time_constants.dart' show BackendConstantEnvironment;
8 import '../constants/constant_system.dart'; 8 import '../constants/constant_system.dart';
9 import '../constants/values.dart' show ConstantValue, PrimitiveConstantValue; 9 import '../constants/values.dart' show ConstantValue, PrimitiveConstantValue;
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after
2091 } 2091 }
2092 2092
2093 void buildThrow(ir.Primitive value) { 2093 void buildThrow(ir.Primitive value) {
2094 assert(isOpen); 2094 assert(isOpen);
2095 add(new ir.Throw(value)); 2095 add(new ir.Throw(value));
2096 _current = null; 2096 _current = null;
2097 } 2097 }
2098 2098
2099 ir.Primitive buildNonTailThrow(ir.Primitive value) { 2099 ir.Primitive buildNonTailThrow(ir.Primitive value) {
2100 assert(isOpen); 2100 assert(isOpen);
2101 return addPrimitive(new ir.NonTailThrow(value)); 2101 ir.Parameter param = new ir.Parameter(null);
2102 ir.Continuation cont = new ir.Continuation(<ir.Parameter>[param]);
2103 add(new ir.LetCont(cont, new ir.Throw(value)));
2104 return param;
2102 } 2105 }
2103 2106
2104 void buildRethrow() { 2107 void buildRethrow() {
2105 assert(isOpen); 2108 assert(isOpen);
2106 add(new ir.Rethrow()); 2109 add(new ir.Rethrow());
2107 _current = null; 2110 _current = null;
2108 } 2111 }
2109 2112
2110 /// Create a negation of [condition]. 2113 /// Create a negation of [condition].
2111 ir.Primitive buildNegation(ir.Primitive condition) { 2114 ir.Primitive buildNegation(ir.Primitive condition) {
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
2760 } 2763 }
2761 2764
2762 class SwitchCaseInfo { 2765 class SwitchCaseInfo {
2763 final List<ir.Primitive> constants = <ir.Primitive>[]; 2766 final List<ir.Primitive> constants = <ir.Primitive>[];
2764 final SubbuildFunction buildBody; 2767 final SubbuildFunction buildBody;
2765 2768
2766 SwitchCaseInfo(this.buildBody); 2769 SwitchCaseInfo(this.buildBody);
2767 2770
2768 void addConstant(ir.Primitive constant) => constants.add(constant); 2771 void addConstant(ir.Primitive constant) => constants.add(constant);
2769 } 2772 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698