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

Unified Diff: runtime/vm/parser.cc

Issue 1947393003: - Use a map to lookup libraries by URL. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « runtime/vm/object_test.cc ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 1cc59ac84955a31f19b572bd8b5da81ac20a7aa1..f0fda88ecb9e24b517f8d808c4d8c08e75b57bbd 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -5924,10 +5924,10 @@ void Parser::ParseLibraryImportExport(const Object& tl_owner,
CallLibraryTagHandler(Dart_kCanonicalizeUrl, import_pos, url));
// Create a new library if it does not exist yet.
- Library& library = Library::Handle(Z, Library::LookupLibrary(canon_url));
+ Library& library = Library::Handle(Z, Library::LookupLibrary(T, canon_url));
if (library.IsNull()) {
library = Library::New(canon_url);
- library.Register();
+ library.Register(T);
}
// If loading hasn't been requested yet, and if this is not a deferred
@@ -12000,7 +12000,7 @@ class ConstMapKeyEqualsTraits {
return HashValue(String::HashRawSymbol(key.script_url.raw()),
key.token_pos.value());
}
- // Used by CachConstantValue if a new constant is added to the map.
+ // Used by CacheConstantValue if a new constant is added to the map.
static RawObject* NewKey(const ConstantPosKey& key) {
const Array& key_obj = Array::Handle(Array::New(2));
key_obj.SetAt(0, key.script_url);
« no previous file with comments | « runtime/vm/object_test.cc ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698