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

Side by Side Diff: bin/main.cc

Issue 9417012: - Add dart:json, dart:uri and dart:utf8 to the known and builtin libraries. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « bin/json_sources.gypi ('k') | bin/uri_sources.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <string.h> 6 #include <string.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "include/dart_debugger_api.h" 10 #include "include/dart_debugger_api.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 if (tag == kCanonicalizeUrl) { 260 if (tag == kCanonicalizeUrl) {
261 // If this is a Dart Scheme URL then it is not modified as it will be 261 // If this is a Dart Scheme URL then it is not modified as it will be
262 // handled by the VM internally. 262 // handled by the VM internally.
263 if (is_dart_scheme_url) { 263 if (is_dart_scheme_url) {
264 return url; 264 return url;
265 } 265 }
266 // Create a canonical path based on the including library and current url. 266 // Create a canonical path based on the including library and current url.
267 return DartUtils::CanonicalizeURL(NULL, library, url_string); 267 return DartUtils::CanonicalizeURL(NULL, library, url_string);
268 } 268 }
269 if (is_dart_scheme_url) { 269 if (is_dart_scheme_url) {
270 // Handle imports of dart:io. 270 ASSERT(tag == kImportTag);
271 if (DartUtils::IsDartIOLibURL(url_string) && (tag == kImportTag)) { 271 // Handle imports of other built-in libraries present in the SDK.
272 if (DartUtils::IsDartIOLibURL(url_string)) {
272 return Builtin::LoadLibrary(Builtin::kIOLibrary); 273 return Builtin::LoadLibrary(Builtin::kIOLibrary);
274 } else if (DartUtils::IsDartJsonLibURL(url_string)) {
275 return Builtin::LoadLibrary(Builtin::kJsonLibrary);
276 } else if (DartUtils::IsDartUriLibURL(url_string)) {
277 return Builtin::LoadLibrary(Builtin::kUriLibrary);
278 } else if (DartUtils::IsDartUtf8LibURL(url_string)) {
279 return Builtin::LoadLibrary(Builtin::kUtf8Library);
273 } else { 280 } else {
274 return Dart_Error("Do not know how to load '%s'", url_string); 281 return Dart_Error("Do not know how to load '%s'", url_string);
275 } 282 }
276 } 283 }
277 result = DartUtils::LoadSource(NULL, 284 result = DartUtils::LoadSource(NULL,
278 library, 285 library,
279 url, 286 url,
280 tag, 287 tag,
281 url_string, 288 url_string,
282 import_map); 289 import_map);
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 DumpPprofSymbolInfo(); 617 DumpPprofSymbolInfo();
611 // Shutdown the isolate. 618 // Shutdown the isolate.
612 Dart_ShutdownIsolate(); 619 Dart_ShutdownIsolate();
613 // Terminate event handler. 620 // Terminate event handler.
614 EventHandler::Terminate(); 621 EventHandler::Terminate();
615 // Terminate process exit-code handler. 622 // Terminate process exit-code handler.
616 Process::TerminateExitCodeHandler(); 623 Process::TerminateExitCodeHandler();
617 624
618 return 0; 625 return 0;
619 } 626 }
OLDNEW
« no previous file with comments | « bin/json_sources.gypi ('k') | bin/uri_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698