Resolve type mismatches.
This commit is contained in:
parent
7754bc73b4
commit
502f7bffa3
3 changed files with 5 additions and 5 deletions
|
|
@ -484,7 +484,7 @@ proc unaryArithOverflow(p: BProc, e: PNode, d: var TLoc, m: TMagic) =
|
||||||
opr: array[mUnaryMinusI..mAbsI64, string] = [
|
opr: array[mUnaryMinusI..mAbsI64, string] = [
|
||||||
mUnaryMinusI: "((NI$2)-($1))",
|
mUnaryMinusI: "((NI$2)-($1))",
|
||||||
mUnaryMinusI64: "-($1)",
|
mUnaryMinusI64: "-($1)",
|
||||||
mAbsI: "(NI$2)abs($1)",
|
mAbsI: "($1 > 0? ($1) : -($1))",
|
||||||
mAbsI64: "($1 > 0? ($1) : -($1))"]
|
mAbsI64: "($1 > 0? ($1) : -($1))"]
|
||||||
var
|
var
|
||||||
a: TLoc
|
a: TLoc
|
||||||
|
|
|
||||||
4
koch.nim
4
koch.nim
|
|
@ -152,7 +152,7 @@ proc boot(args: string) =
|
||||||
copyExe(findStartNimrod(), 0.thVersion)
|
copyExe(findStartNimrod(), 0.thVersion)
|
||||||
for i in 0..2:
|
for i in 0..2:
|
||||||
echo "iteration: ", i+1
|
echo "iteration: ", i+1
|
||||||
exec i.thVersion & " cc $# $# compiler" / "nimrod.nim" % [bootOptions, args]
|
exec i.thVersion & " cpp $# $# compiler" / "nimrod.nim" % [bootOptions, args]
|
||||||
if sameFileContent(output, i.thVersion):
|
if sameFileContent(output, i.thVersion):
|
||||||
copyExe(output, finalDest)
|
copyExe(output, finalDest)
|
||||||
echo "executables are equal: SUCCESS!"
|
echo "executables are equal: SUCCESS!"
|
||||||
|
|
@ -282,7 +282,7 @@ proc tests(args: string) =
|
||||||
proc temp(args: string) =
|
proc temp(args: string) =
|
||||||
var output = "compiler" / "nimrod".exe
|
var output = "compiler" / "nimrod".exe
|
||||||
var finalDest = "bin" / "nimrod_temp".exe
|
var finalDest = "bin" / "nimrod_temp".exe
|
||||||
exec("nimrod c compiler" / "nimrod")
|
exec("nimrod cpp compiler" / "nimrod")
|
||||||
copyExe(output, finalDest)
|
copyExe(output, finalDest)
|
||||||
if args.len > 0: exec(finalDest & " " & args)
|
if args.len > 0: exec(finalDest & " " & args)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
# set handling
|
# set handling
|
||||||
|
|
||||||
type
|
type
|
||||||
TNimSet = array [0..4*2048-1, int8]
|
TNimSet = array [0..4*2048-1, uint8]
|
||||||
|
|
||||||
proc countBits32(n: int32): int {.compilerproc.} =
|
proc countBits32(n: int32): int {.compilerproc.} =
|
||||||
var v = n
|
var v = n
|
||||||
|
|
@ -25,4 +25,4 @@ proc countBits64(n: int64): int {.compilerproc.} =
|
||||||
proc cardSet(s: TNimSet, len: int): int {.compilerproc.} =
|
proc cardSet(s: TNimSet, len: int): int {.compilerproc.} =
|
||||||
result = 0
|
result = 0
|
||||||
for i in countup(0, len-1):
|
for i in countup(0, len-1):
|
||||||
inc(result, countBits32(int32(ze(s[i]))))
|
inc(result, countBits32(int32(s[i])))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue