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

Unified Diff: bin/builtin.cc

Issue 10911135: Simplify the builtin functions and get rid of unused code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 3 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 | « bin/builtin.h ('k') | bin/builtin_natives.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/builtin.cc
===================================================================
--- bin/builtin.cc (revision 11998)
+++ bin/builtin.cc (working copy)
@@ -30,14 +30,8 @@
}
-void Builtin::SetupLibrary(Dart_Handle library, BuiltinLibraryId id) {
- ASSERT((sizeof(builtin_libraries_) / sizeof(builtin_lib_props)) ==
- kInvalidLibrary);
- ASSERT(id >= kBuiltinLibrary && id < kInvalidLibrary);
- if (builtin_libraries_[id].has_natives_) {
- // Setup the native resolver for built in library functions.
- DART_CHECK_VALID(Dart_SetNativeResolver(library, NativeLookup));
- }
+void Builtin::SetNativeResolver(BuiltinLibraryId id) {
+ UNREACHABLE();
}
@@ -49,19 +43,11 @@
Dart_Handle library = Dart_LookupLibrary(url);
if (Dart_IsError(library)) {
library = Dart_LoadLibrary(url, Source(id));
- if (!Dart_IsError(library)) {
- SetupLibrary(library, 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));
}
}
DART_CHECK_VALID(library);
return library;
}
-
-
-void Builtin::ImportLibrary(Dart_Handle library, BuiltinLibraryId id) {
- Dart_Handle imported_library = LoadAndCheckLibrary(id);
- // Import the library into current library.
- DART_CHECK_VALID(Dart_LibraryImportLibrary(library,
- imported_library,
- Dart_Null()));
-}
« no previous file with comments | « bin/builtin.h ('k') | bin/builtin_natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698