Index: runtime/bin/builtin_nolib.cc |
diff --git a/runtime/bin/builtin_nolib.cc b/runtime/bin/builtin_nolib.cc |
index fc3447b114fad2673f9b09a53de887d930873450..b85dfad70f418574f878bf5a1bec80e35feb37d3 100644 |
--- a/runtime/bin/builtin_nolib.cc |
+++ b/runtime/bin/builtin_nolib.cc |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -10,21 +10,33 @@ |
#include "bin/dartutils.h" |
-Dart_Handle Builtin::Source() { |
+Dart_Handle Builtin::Source(BuiltinLibraryId id) { |
UNREACHABLE(); |
return Dart_Null(); |
} |
-void Builtin::SetupLibrary(Dart_Handle builtin_lib) { |
+void Builtin::SetupLibrary(Dart_Handle library, BuiltinLibraryId id) { |
UNREACHABLE(); |
} |
-void Builtin::ImportLibrary(Dart_Handle library) { |
- Dart_Handle url = Dart_NewString(DartUtils::kBuiltinLibURL); |
- Dart_Handle builtin_lib = Dart_LookupLibrary(url); |
+Dart_Handle Builtin::LoadLibrary(BuiltinLibraryId id) { |
+ UNREACHABLE(); |
+ return Dart_Null(); |
+} |
+ |
+ |
+void Builtin::ImportLibrary(Dart_Handle library, BuiltinLibraryId id) { |
+ Dart_Handle url; |
+ if (id == kBuiltinLibrary) { |
+ url = Dart_NewString(DartUtils::kBuiltinLibURL); |
+ } else { |
+ ASSERT(id == kIOLibrary); |
+ url = Dart_NewString(DartUtils::kIOLibURL); |
+ } |
+ Dart_Handle imported_library = Dart_LookupLibrary(url); |
// Import the builtin library into current library. |
- DART_CHECK_VALID(builtin_lib); |
- DART_CHECK_VALID(Dart_LibraryImportLibrary(library, builtin_lib)); |
+ DART_CHECK_VALID(imported_library); |
+ DART_CHECK_VALID(Dart_LibraryImportLibrary(library, imported_library)); |
} |