summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-02-10 15:06:39 +0100
committerAraq <rumpf_a@web.de>2013-02-10 15:06:39 +0100
commitfa14466b5be251d0a977a28ed98bd50f5205837e (patch)
tree071541c4431458f8160c68d3b7bd44c4ff9ae126 /lib
parent3d7abb958de10df1fd630a24c01b5e259318b9c1 (diff)
parentd6a82a3bcd8f2dd0d32818ea32a7565598390615 (diff)
downloadNim-fa14466b5be251d0a977a28ed98bd50f5205837e.tar.gz
Merge branch 'master' of github.com:Araq/Nimrod
Diffstat (limited to 'lib')
-rwxr-xr-xlib/system/ecmasys.nim12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/system/ecmasys.nim b/lib/system/ecmasys.nim
index e6a7d7057..f78b7f68c 100755
--- a/lib/system/ecmasys.nim
+++ b/lib/system/ecmasys.nim
@@ -298,8 +298,18 @@ type
     replaceData*: proc (start, len: int, text: cstring) {.nimcall.}
     setAttribute*: proc (name, value: cstring) {.nimcall.}
     setAttributeNode*: proc (attr: ref TNode) {.nimcall.}
+
+when defined(kwin):
+  proc rawEcho {.compilerproc, nostackframe.} =
+    asm """
+      var buf = "";
+      for (var i = 0; i < arguments.length; ++i) {
+        buf += `toEcmaStr`(arguments[i]);
+      }
+      print(buf);
+    """
     
-when defined(nodejs):
+elif defined(nodejs):
   proc ewriteln(x: cstring) = log(x)
   
   proc rawEcho {.compilerproc, nostackframe.} =