style fix: change 'JS' to 'js' to make it consistent (#13168)

This commit is contained in:
Miran
2020-01-16 14:14:03 +01:00
committed by Andreas Rumpf
parent 54bfd69a27
commit 352232e62d
14 changed files with 60 additions and 60 deletions

View File

@@ -105,7 +105,7 @@ when defined(nimNoZeroExtendMagic):
## **Deprecated since version 0.19.9**: Use unsigned integers instead.
cast[int32](x)
elif not defined(JS):
elif not defined(js):
proc ze*(x: int8): int {.magic: "Ze8ToI", noSideEffect, deprecated.}
## zero extends a smaller integer type to ``int``. This treats `x` as
## unsigned.

View File

@@ -283,7 +283,7 @@ proc `==`*[T](x, y: seq[T]): bool {.noSideEffect.} =
if x.len == 0 and y.len == 0:
return true
else:
when not defined(JS):
when not defined(js):
proc seqToPtr[T](x: seq[T]): pointer {.inline, noSideEffect.} =
when defined(nimSeqsV2):
result = cast[NimSeqV2[T]](x).p

View File

@@ -13,7 +13,7 @@ when hasAlloc:
gcOptimizeTime, ## optimize for speed
gcOptimizeSpace ## optimize for memory footprint
when hasAlloc and not defined(JS) and not usesDestructors:
when hasAlloc and not defined(js) and not usesDestructors:
proc GC_disable*() {.rtl, inl, benign.}
## Disables the GC. If called `n` times, `n` calls to `GC_enable`
## are needed to reactivate the GC.
@@ -58,7 +58,7 @@ when hasAlloc and not defined(JS) and not usesDestructors:
## Expands operating GC stack range to `theStackBottom`. Does nothing
## if current stack bottom is already lower than `theStackBottom`.
when hasAlloc and defined(JS):
when hasAlloc and defined(js):
template GC_disable* =
{.warning: "GC_disable is a no-op in JavaScript".}

View File

@@ -229,7 +229,7 @@ when hasAlloc:
## Returns the number of bytes that are owned by the process.
when defined(JS):
when defined(js):
# Stubs:
proc getOccupiedMem(): int = return -1
proc getFreeMem(): int = return -1