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

Unified Diff: pkg/compiler/lib/src/id_generator.dart

Issue 1867243004: Begin refactoring compiler out of diet parser and scanner (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/parser/diet_parser_task.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/id_generator.dart
diff --git a/pkg/compiler/lib/src/id_generator.dart b/pkg/compiler/lib/src/id_generator.dart
new file mode 100644
index 0000000000000000000000000000000000000000..4c92ea9dbfa69023c9908c80dd778e111b3ae0dd
--- /dev/null
+++ b/pkg/compiler/lib/src/id_generator.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// A generator of globally unique identifiers.
+class IdGenerator {
+ int _nextFreeId = 0;
+
+ /// Returns the next free identifier.
+ ///
+ /// This identifier is guaranteed to be unique.
+ int getNextFreeId() => _nextFreeId++;
+}
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/parser/diet_parser_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698