mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-13 02:25:28 +00:00
fixes and miscellaneous
This commit is contained in:
@@ -4,6 +4,7 @@ const useGCC_builtins = (defined(gcc) or defined(llvm_gcc) or
|
||||
defined(clang)) and useBuiltins
|
||||
const useICC_builtins = defined(icc) and useBuiltins
|
||||
const useVCC_builtins = defined(vcc) and useBuiltins
|
||||
const arch64 = sizeof(int) == 8
|
||||
|
||||
template forwardImpl(impl, arg) {.dirty.} =
|
||||
when sizeof(x) <= 4:
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
|
||||
include std/private/bitops_utils
|
||||
|
||||
const arch64 = sizeof(int) == 8
|
||||
|
||||
template countBitsImpl(n: uint32): int =
|
||||
# generic formula is from: https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel
|
||||
var v = uint32(n)
|
||||
|
||||
@@ -94,8 +94,7 @@ proc `$`*[T: tuple](x: T): string =
|
||||
tupleObjectDollar(result, x)
|
||||
|
||||
when not defined(nimPreviewSlimSystem):
|
||||
import std/objectdollar
|
||||
export objectdollar
|
||||
include std/objectdollar
|
||||
|
||||
proc collectionToString[T](x: T, prefix, separator, suffix: string): string =
|
||||
result = prefix
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
#
|
||||
# The generic ``repr`` procedure for the javascript backend.
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/formatfloat
|
||||
|
||||
proc reprInt(x: int64): string {.compilerproc.} = $x
|
||||
proc reprInt(x: uint64): string {.compilerproc.} = $x
|
||||
proc reprInt(x: int): string {.compilerproc.} = $x
|
||||
|
||||
Reference in New Issue
Block a user