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

Unified Diff: lib/compiler/implementation/lib/coreimpl_patch.dart

Issue 10887024: Move print to corelib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Get rid of more builtin importing that is no longer needed. Created 8 years, 4 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
Index: lib/compiler/implementation/lib/coreimpl_patch.dart
diff --git a/lib/compiler/implementation/lib/coreimpl_patch.dart b/lib/compiler/implementation/lib/coreimpl_patch.dart
index 3d2a235d00e9379085d02ae70a9531d94ab2b17f..33e23649c140d4222c290d0590fa4787a78579d5 100644
--- a/lib/compiler/implementation/lib/coreimpl_patch.dart
+++ b/lib/compiler/implementation/lib/coreimpl_patch.dart
@@ -4,7 +4,19 @@
// Patch file for dart:core classes.
-// Path for Object implementation.
+// Patch for 'print' function.
+patch class PrintImplementation {
+ patch static void print(var obj) {
+ if (obj is String) {
+ Primitives.printString(obj);
+ } else {
+ Primitives.printString(obj.toString());
+ }
+ }
+}
+
+
+// Patch for Object implementation.
// TODO(ager): Split out into object_patch.dart and allow #source
// in patch files?
patch class ObjectImplementation {

Powered by Google App Engine
This is Rietveld 408576698