high/low was missing the internal proc

This commit is contained in:
mratsim 2018-05-06 22:24:51 +02:00
parent 8c0d830acf
commit 0dae6897b1
2 changed files with 4 additions and 0 deletions

View File

@ -82,6 +82,8 @@ make_binary(`xor`, Stint)
# proc `shl`*(x: Stint, y: SomeInteger): Stint {.fooPragma, inline, noSideEffect.} = # proc `shl`*(x: Stint, y: SomeInteger): Stint {.fooPragma, inline, noSideEffect.} =
# result.data = x.data shl y # result.data = x.data shl y
import ./private/int_highlow
func high*[bits: static[int]](_: typedesc[Stint[bits]]): Stint[bits] {.inline.} = func high*[bits: static[int]](_: typedesc[Stint[bits]]): Stint[bits] {.inline.} =
result.data = high(type result.data) result.data = high(type result.data)

View File

@ -77,6 +77,8 @@ proc `shr`*(x: StUint, y: SomeInteger): StUint {.fooPragma, inline, noSideEffect
proc `shl`*(x: StUint, y: SomeInteger): StUint {.fooPragma, inline, noSideEffect.} = proc `shl`*(x: StUint, y: SomeInteger): StUint {.fooPragma, inline, noSideEffect.} =
result.data = x.data shl y result.data = x.data shl y
import ./private/uint_highlow
func high*[bits: static[int]](_: typedesc[Stuint[bits]]): Stuint[bits] {.inline.} = func high*[bits: static[int]](_: typedesc[Stuint[bits]]): Stuint[bits] {.inline.} =
result.data = high(type result.data) result.data = high(type result.data)