Remove PHP backend. (#7606)

* remove php

* fix

* keep nimphpext

* remove targetJS enum
This commit is contained in:
treeform 2018-04-18 11:40:11 -07:00 • committed by Andreas Rumpf
commit 35b0cc67e8
9 changed files with 330 additions and 778 deletions

View file

@ -2404,7 +2404,7 @@ proc `==` *[T](x, y: seq[T]): bool {.noSideEffect.} =
if x.isNil and y.isNil:
return true
else:
when not defined(JS) or defined(nimphp):
when not defined(JS):
proc seqToPtr[T](x: seq[T]): pointer {.inline, nosideeffect.} =
result = cast[pointer](x)
else:
@ -2766,17 +2766,14 @@ type
when defined(JS):
proc add*(x: var string, y: cstring) {.asmNoStackFrame.} =
when defined(nimphp):
asm """`x` .= `y`;"""
else:
asm """
var len = `x`[0].length-1;
for (var i = 0; i < `y`.length; ++i) {
`x`[0][len] = `y`.charCodeAt(i);
++len;
}
`x`[0][len] = 0
"""
asm """
var len = `x`[0].length-1;
for (var i = 0; i < `y`.length; ++i) {
`x`[0][len] = `y`.charCodeAt(i);
++len;
}
`x`[0][len] = 0
"""
proc add*(x: var cstring, y: cstring) {.magic: "AppendStrStr".}
elif hasAlloc: