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

Unified Diff: runtime/bin/builtin_nolib.cc

Issue 9254026: Split dart:builtin into dart:builtin and dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment and add binaries. Created 8 years, 11 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 | « runtime/bin/builtin_natives.cc ('k') | runtime/bin/builtin_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « runtime/bin/builtin_natives.cc ('k') | runtime/bin/builtin_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698