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

Side by Side Diff: runtime/bin/builtin.dart

Issue 10887024: Move print to corelib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comment. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/builtin.cc ('k') | runtime/bin/main.cc » ('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 #library("builtin"); 5 #library("builtin");
6 #import("dart:uri"); 6 #import("dart:uri");
7 7
8 void print(arg) { 8 // Corelib 'print' implementation.
9 void _print(arg) {
9 _Logger._printString(arg.toString()); 10 _Logger._printString(arg.toString());
10 } 11 }
11 12
12 class _Logger { 13 class _Logger {
13 static void _printString(String s) native "Logger_PrintString"; 14 static void _printString(String s) native "Logger_PrintString";
14 } 15 }
15 16
17 _getPrintClosure() => _print;
16 18
17 // The URI that the entrypoint script was loaded from. Remembered so that 19 // The URI that the entrypoint script was loaded from. Remembered so that
18 // package imports can be resolved relative to it. 20 // package imports can be resolved relative to it.
19 var _entrypoint; 21 var _entrypoint;
20 22
21 // The directory to look in to resolve "package:" scheme URIs. 23 // The directory to look in to resolve "package:" scheme URIs.
22 var _packageRoot; 24 var _packageRoot;
23 25
24 void _logResolution(String msg) { 26 void _logResolution(String msg) {
25 final enabled = false; 27 final enabled = false;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 var path; 149 var path;
148 if (_packageRoot !== null) { 150 if (_packageRoot !== null) {
149 path = "${_packageRoot}${uri.path}"; 151 path = "${_packageRoot}${uri.path}";
150 } else { 152 } else {
151 path = _entrypoint.resolve('packages/${uri.path}').path; 153 path = _entrypoint.resolve('packages/${uri.path}').path;
152 } 154 }
153 155
154 _logResolution("# Package: $path"); 156 _logResolution("# Package: $path");
155 return path; 157 return path;
156 } 158 }
OLDNEW
« no previous file with comments | « runtime/bin/builtin.cc ('k') | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698