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

Unified Diff: runtime/vm/object.cc

Issue 27006003: Cleanups, refactoring in anticipation of new string interpolation nodes. Removed unnecessary code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 28616)
+++ runtime/vm/object.cc (working copy)
@@ -7761,6 +7761,25 @@
}
+const String& Library::PrivateCoreLibName(const String& member) {
+ const Library& core_lib = Library::Handle(Library::CoreLibrary());
+ const String& private_name = String::ZoneHandle(core_lib.PrivateName(member));
+ return private_name;
+}
+
+
+RawClass* Library::LookupCoreClass(const String& class_name) {
+ const Library& core_lib = Library::Handle(Library::CoreLibrary());
+ String& name = String::Handle(class_name.raw());
+ if (class_name.CharAt(0) == Scanner::kPrivateIdentifierStart) {
+ // Private identifiers are mangled on a per script basis.
hausner 2013/10/14 23:11:14 per library, not per script
srdjan 2013/10/14 23:19:42 Done, also fixed identical comment in scanner.cc
+ name = String::Concat(name, String::Handle(core_lib.private_key()));
+ name = Symbols::New(name);
+ }
+ return core_lib.LookupClass(name);
+}
+
+
// Cannot handle qualified names properly as it only appends private key to
// the end (e.g. _Alfa.foo -> _Alfa.foo@...).
RawString* Library::PrivateName(const String& name) const {
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698