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

Unified Diff: lib/compiler/implementation/js_backend/namer.dart

Issue 10915083: Change assert implementation to not depend on a top-level function called 'assert'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 3 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: lib/compiler/implementation/js_backend/namer.dart
diff --git a/lib/compiler/implementation/js_backend/namer.dart b/lib/compiler/implementation/js_backend/namer.dart
index c07c6cffedb606813332629d9c8154efd906ebdd..50f678f4e7f393aaa9b31330e3f011746b7b8344 100644
--- a/lib/compiler/implementation/js_backend/namer.dart
+++ b/lib/compiler/implementation/js_backend/namer.dart
@@ -18,17 +18,14 @@ class Namer {
return _jsReserved;
}
- final Map<Element, String> globals;
- final Map<String, int> usedGlobals;
- final Map<String, LibraryElement> shortPrivateNameOwners;
-
- final Map<Constant, String> constantNames;
+ Map<Element, String> globals;
+ Map<String, int> usedGlobals;
+ Map<String, LibraryElement> shortPrivateNameOwners;
Namer(this.compiler)
: globals = new Map<Element, String>(),
usedGlobals = new Map<String, int>(),
- shortPrivateNameOwners = new Map<String, LibraryElement>(),
- constantNames = new Map<Constant, String>();
+ shortPrivateNameOwners = new Map<String, LibraryElement>();
final String CURRENT_ISOLATE = @'$';
final String ISOLATE = 'Isolate';
@@ -39,18 +36,6 @@ class Namer {
static const SourceString CLOSURE_INVOCATION_NAME =
Compiler.CALL_OPERATOR_NAME;
- String constantName(Constant constant) {
- // In the current implementation it doesn't make sense to give names to
- // function constants since the function-implementation itself serves as
- // constant and can be accessed directly.
- assert(!constant.isFunction());
- String result = constantNames[constant];
- if (result === null) {
- result = getFreshGlobalName("CTC");
- constantNames[constant] = result;
- }
- return result;
- }
String closureInvocationName(Selector selector) {
// TODO(floitsch): mangle, while not conflicting with instance names.
« no previous file with comments | « lib/compiler/implementation/js_backend/js_backend.dart ('k') | lib/compiler/implementation/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698