mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-04 21:14:48 +00:00
style fix: change 'JS' to 'js' to make it consistent (#13168)
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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".}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user