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

Unified Diff: pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart

Issue 1575593002: dart2js cps: Name labels uniquely within each method, not globally. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Typo 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
index 8f51f82d8bbd98200f190ed10c813ca9139486d0..8c6549b301113672957abc9087a81ab2cd924ed8 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
@@ -67,18 +67,6 @@ abstract class Statement extends Node {
* Labels name [LabeledStatement]s.
*/
class Label {
- // A counter used to generate names. The counter is reset to 0 for each
- // function emitted.
- static int counter = 0;
- static String _newName() => 'L${counter++}';
-
- String cachedName;
-
- String get name {
- if (cachedName == null) cachedName = _newName();
- return cachedName;
- }
-
/// Number of [Break] or [Continue] statements that target this label.
/// The [Break] constructor will increment this automatically, but the
/// counter must be decremented by hand when a [Break] becomes orphaned.

Powered by Google App Engine
This is Rietveld 408576698