improvements to addInt and $ for integer types (#18592)

* improvements to $(SomeInteger) and addInt
* remove mIntToStr, mInt64ToStr
* improvements
* fix tests/pragmas/tinjectstmt.nim; the diff is harmless, cgen code is identical with -d:danger or debug mode
* rm tests/system/tstrmantle.nim
* revert compiler/jsgen.nim for -d:nimVersion140
This commit is contained in:
Timothee Cour 2021-08-19 02:33:52 -07:00 • committed by GitHub
commit 394f4ac7bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 162 additions and 186 deletions

View file

@ -7,15 +7,18 @@ ok0
ok1
onInject: 3
onInject: 4
0
onInject: 5
0
onInject: 6
1
onInject: 7
onInject: 8
1
onInject: 9
onInject: 10
onInject: 11
2
ok2
onInject: 9
onInject: 12
'''
"""
@ -25,7 +28,7 @@ onInject: 9
{.injectStmt.} pragma can be used to inject a statement before every
other statement in the current module. It's now undocumented and may be removed
in the future and replaced with something more general and without its limitations.
e.g. (e.g. doesn't work in VM or js backends).
(e.g. doesn't work in VM or js backends).
]#
from system/ansi_c import c_printf
@ -44,5 +47,5 @@ proc main()=
echo a
echo "ok2"
static: main() # xxx injectStmt not honred in VM
static: main() # xxx injectStmt not honored in VM
main()