transf: big refactoring; other small fixes

This commit is contained in:
Araq 2011-01-05 23:46:50 +01:00
commit 5635fde060
11 changed files with 286 additions and 225 deletions

View file

@ -664,6 +664,9 @@ proc `&` * (x, y: string): string {.
proc `&` * (x: char, y: string): string {.
magic: "ConStrStr", noSideEffect, merge.}
## is the `concatenation operator`. It concatenates `x` and `y`.
# implementation note: These must all have the same magic value "ConStrStr" so
# that the merge optimization works properly.
proc add*(x: var string, y: char) {.magic: "AppendStrCh", noSideEffect.}
proc add*(x: var string, y: string) {.magic: "AppendStrStr", noSideEffect.}