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

Unified Diff: runtime/vm/parser.cc

Issue 1955453002: - Use a map to lookup libraries by URL. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix precompiler handling. 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
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index ee0c2d98fd0a0ae48d608b063bbfc709b8b25555..3032408d1c12916e0dd3899a26dcbba362733f3f 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -5922,10 +5922,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
@@ -11998,7 +11998,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);
« runtime/vm/object.cc ('K') | « 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