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

Unified Diff: bin/main.cc

Issue 10388242: Minor restructure some of the builtin library processing code (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 | « bin/gen_snapshot.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/main.cc
===================================================================
--- bin/main.cc (revision 8133)
+++ bin/main.cc (working copy)
@@ -367,19 +367,21 @@
if (is_dart_scheme_url) {
ASSERT(tag == kImportTag);
// Handle imports of other built-in libraries present in the SDK.
+ Builtin::BuiltinLibraryId id;
if (DartUtils::IsDartCryptoLibURL(url_string)) {
- return Builtin::LoadLibrary(Builtin::kCryptoLibrary);
+ id = Builtin::kCryptoLibrary;
} else if (DartUtils::IsDartIOLibURL(url_string)) {
- return Builtin::LoadLibrary(Builtin::kIOLibrary);
+ id = Builtin::kIOLibrary;
} else if (DartUtils::IsDartJsonLibURL(url_string)) {
- return Builtin::LoadLibrary(Builtin::kJsonLibrary);
+ id = Builtin::kJsonLibrary;
} else if (DartUtils::IsDartUriLibURL(url_string)) {
- return Builtin::LoadLibrary(Builtin::kUriLibrary);
+ id = Builtin::kUriLibrary;
} else if (DartUtils::IsDartUtfLibURL(url_string)) {
- return Builtin::LoadLibrary(Builtin::kUtfLibrary);
+ id = Builtin::kUtfLibrary;
} else {
return Dart_Error("Do not know how to load '%s'", url_string);
}
+ return Builtin::LoadLibrary(id);
} else {
// Get the file path out of the url.
Dart_Handle builtin_lib = Builtin::LoadLibrary(Builtin::kBuiltinLibrary);
« no previous file with comments | « bin/gen_snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698