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

Unified Diff: runtime/vm/scanner.cc

Issue 149643007: Small cleanup: move all library private key code to Library class (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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
« runtime/vm/object.cc ('K') | « runtime/vm/scanner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scanner.cc
===================================================================
--- runtime/vm/scanner.cc (revision 32509)
+++ runtime/vm/scanner.cc (working copy)
@@ -312,7 +312,7 @@
current_token_.kind = Token::kIDENT;
String& literal =
String::ZoneHandle(Symbols::New(source_, ident_pos, ident_length));
- if (ident_char0 == kPrivateIdentifierStart) {
+ if (ident_char0 == Library::kPrivateIdentifierStart) {
// Private identifiers are mangled on a per library basis.
literal = String::Concat(literal, private_key_);
literal = Symbols::New(literal);
@@ -932,20 +932,6 @@
}
-RawString* Scanner::AllocatePrivateKey(const Library& library) {
- const String& url = String::Handle(library.url());
- intptr_t key_value = url.Hash();
- while (Library::IsKeyUsed(key_value)) {
- key_value++;
- }
- char private_key[32];
- OS::SNPrint(private_key, sizeof(private_key),
- "%c%#" Px "", kPrivateKeySeparator, key_value);
- const String& result = String::Handle(String::New(private_key, Heap::kOld));
- return result.raw();
-}
-
-
void Scanner::InitOnce() {
ASSERT(Isolate::Current() == Dart::vm_isolate());
for (int i = 0; i < Token::numKeywords; i++) {
« runtime/vm/object.cc ('K') | « runtime/vm/scanner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698