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

Unified Diff: runtime/vm/code_generator_test.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/code_descriptors_test.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator_test.cc
diff --git a/runtime/vm/code_generator_test.cc b/runtime/vm/code_generator_test.cc
index b532cf17a6eff7be3c93a2870a83a6ab1002a209..54a917492bd077047324d305cfea3a61dc7c1c2d 100644
--- a/runtime/vm/code_generator_test.cc
+++ b/runtime/vm/code_generator_test.cc
@@ -213,14 +213,16 @@ CODEGEN_TEST_RUN(DoubleUnaryOpCodegen, Double::New(-12.0))
static Library& MakeTestLibrary(const char* url) {
- const String& lib_url = String::ZoneHandle(Symbols::New(Thread::Current(),
- url));
- Library& lib = Library::ZoneHandle(Library::New(lib_url));
- lib.Register();
- Library& core_lib = Library::Handle(Library::CoreLibrary());
+ Thread* thread = Thread::Current();
+ Zone* zone = thread->zone();
+
+ const String& lib_url = String::ZoneHandle(zone, Symbols::New(thread, url));
+ Library& lib = Library::ZoneHandle(zone, Library::New(lib_url));
+ lib.Register(thread);
+ Library& core_lib = Library::Handle(zone, Library::CoreLibrary());
ASSERT(!core_lib.IsNull());
- const Namespace& core_ns = Namespace::Handle(
- Namespace::New(core_lib, Array::Handle(), Array::Handle()));
+ const Namespace& core_ns = Namespace::Handle(zone,
+ Namespace::New(core_lib, Array::Handle(zone), Array::Handle(zone)));
lib.AddImport(core_ns);
return lib;
}
« no previous file with comments | « runtime/vm/code_descriptors_test.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698