| Index: runtime/bin/builtin_gen_snapshot.cc
|
| diff --git a/runtime/bin/builtin.cc b/runtime/bin/builtin_gen_snapshot.cc
|
| similarity index 83%
|
| copy from runtime/bin/builtin.cc
|
| copy to runtime/bin/builtin_gen_snapshot.cc
|
| index f6d297e9c8435400cc0f83f30b2803f9a150fdfd..fd64f46bd9cfef863c6eda7adeba2be7ecad3fa4 100644
|
| --- a/runtime/bin/builtin.cc
|
| +++ b/runtime/bin/builtin_gen_snapshot.cc
|
| @@ -30,6 +30,13 @@ Dart_Handle Builtin::Source(BuiltinLibraryId id) {
|
| }
|
|
|
|
|
| +Dart_NativeFunction Builtin::NativeLookup(Dart_Handle name,
|
| + int argument_count) {
|
| + UNREACHABLE();
|
| + return NULL;
|
| +}
|
| +
|
| +
|
| void Builtin::SetNativeResolver(BuiltinLibraryId id) {
|
| UNREACHABLE();
|
| }
|
| @@ -45,7 +52,10 @@ Dart_Handle Builtin::LoadAndCheckLibrary(BuiltinLibraryId id) {
|
| library = Dart_LoadLibrary(url, Source(id));
|
| if (!Dart_IsError(library) && (builtin_libraries_[id].has_natives_)) {
|
| // Setup the native resolver for built in library functions.
|
| - DART_CHECK_VALID(Dart_SetNativeResolver(library, NativeLookup));
|
| + // Looks up native functions only in libdart_builtin, not libdart_io.
|
| + // This is for use in the snapshot generator, which should be
|
| + // independent of most of the dart:io C++ code.
|
| + DART_CHECK_VALID(Dart_SetNativeResolver(library, BuiltinNativeLookup));
|
| }
|
| if (builtin_libraries_[id].patch_url_ != NULL) {
|
| ASSERT(builtin_libraries_[id].patch_source_ != NULL);
|
|
|