Fixed string concatenation and other bugs in the JS backend. Fixed a small bug in the IRC module.

This commit is contained in:
dom96 2011-09-23 21:43:24 +01:00
commit 6deda5a973
9 changed files with 117 additions and 44 deletions

View file

@ -1495,6 +1495,8 @@ else:
`x`[0][len] = 0
"""
proc add*(x: var cstring, y: cstring) {.magic: "AppendStrStr".}
proc echo*[Ty](x: openarray[Ty]) {.magic: "Echo", noSideEffect.}
## special built-in that takes a variable number of arguments. Each argument
## is converted to a string via ``$``, so it works for user-defined
@ -1886,6 +1888,7 @@ elif defined(ecmaScript) or defined(NimrodVM):
when defined(ecmaScript):
include "system/ecmasys"
include "system/reprjs"
elif defined(NimrodVM):
proc cmp(x, y: string): int =
if x == y: return 0