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

Unified Diff: runtime/bin/builtin.cc

Issue 2485993002: VM: Support bootstrapping core libraries from Kernel binaries instead of source. (Closed)
Patch Set: Done Created 4 years, 1 month 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 | « no previous file | runtime/bin/gen_snapshot.cc » ('j') | runtime/bin/gen_snapshot.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin.cc
diff --git a/runtime/bin/builtin.cc b/runtime/bin/builtin.cc
index 49ebb05a50b96f71276d2d921ea2508a667fc214..cbc20063738280c799ba3b867b3f8c5f71196feb 100644
--- a/runtime/bin/builtin.cc
+++ b/runtime/bin/builtin.cc
@@ -110,7 +110,17 @@ Dart_Handle Builtin::GetSource(const char** source_paths, const char* uri) {
void Builtin::SetNativeResolver(BuiltinLibraryId id) {
- UNREACHABLE();
+ ASSERT(static_cast<int>(id) >= 0);
+ ASSERT(static_cast<int>(id) < num_libs_);
+
+ if (builtin_libraries_[id].has_natives_) {
+ Dart_Handle url = DartUtils::NewString(builtin_libraries_[id].url_);
+ Dart_Handle library = Dart_LookupLibrary(url);
+ ASSERT(!Dart_IsError(library));
+ // Setup the native resolver for built in library functions.
+ DART_CHECK_VALID(
+ Dart_SetNativeResolver(library, NativeLookup, NativeSymbol));
+ }
}
« no previous file with comments | « no previous file | runtime/bin/gen_snapshot.cc » ('j') | runtime/bin/gen_snapshot.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698