mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
koch boot compiler with orc (#20467)
* koch boot compiler with orc * use orc * workaround bugs * move it * move the data
This commit is contained in:
@@ -6,7 +6,6 @@ define:booting
|
||||
define:nimcore
|
||||
define:nimPreviewFloatRoundtrip
|
||||
define:nimPreviewSlimSystem
|
||||
gc:refc
|
||||
|
||||
#import:"$projectpath/testability"
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ proc semTry(c: PContext, n: PNode; flags: TExprFlags; expectedType: PType = nil)
|
||||
|
||||
if a.len == 2 and a[0].kind == nkBracket:
|
||||
# rewrite ``except [a, b, c]: body`` -> ```except a, b, c: body```
|
||||
a.sons[0..0] = a[0].sons
|
||||
a.sons[0..0] = move a[0].sons
|
||||
|
||||
if a.len == 2 and a[0].isInfixAs():
|
||||
# support ``except Exception as ex: body``
|
||||
|
||||
7
koch.nim
7
koch.nim
@@ -537,7 +537,8 @@ proc runCI(cmd: string) =
|
||||
# boot without -d:nimHasLibFFI to make sure this still works
|
||||
# `--lib:lib` is needed for bootstrap on openbsd, for reasons described in
|
||||
# https://github.com/nim-lang/Nim/pull/14291 (`getAppFilename` bugsfor older nim on openbsd).
|
||||
kochExecFold("Boot in release mode", "boot -d:release -d:nimStrictMode --lib:lib")
|
||||
kochExecFold("Boot in release mode", "boot -d:release --gc:refc -d:nimStrictMode --lib:lib")
|
||||
kochExecFold("Boot Nim ORC", "boot -d:release --lib:lib")
|
||||
|
||||
when false: # debugging: when you need to run only 1 test in CI, use something like this:
|
||||
execFold("debugging test", "nim r tests/stdlib/tosproc.nim")
|
||||
@@ -591,10 +592,6 @@ proc runCI(cmd: string) =
|
||||
|
||||
execFold("Run atlas tests", "nim c -r -d:atlasTests tools/atlas/atlas.nim clone https://github.com/disruptek/balls")
|
||||
|
||||
when not defined(bsd):
|
||||
# the BSDs are overwhelmed already, so only run this test on the other machines:
|
||||
kochExecFold("Boot Nim ORC", "boot -d:release --mm:orc --lib:lib")
|
||||
|
||||
proc testUnixInstall(cmdLineRest: string) =
|
||||
csource("-d:danger" & cmdLineRest)
|
||||
xz(false, cmdLineRest)
|
||||
|
||||
@@ -1211,10 +1211,10 @@ else:
|
||||
|
||||
|
||||
when defined(nimSeqsV2):
|
||||
template movingCopy(a, b) =
|
||||
template movingCopy(a, b: typed) =
|
||||
a = move(b)
|
||||
else:
|
||||
template movingCopy(a, b) =
|
||||
template movingCopy(a, b: typed) =
|
||||
shallowCopy(a, b)
|
||||
|
||||
proc del*[T](x: var seq[T], i: Natural) {.noSideEffect.} =
|
||||
|
||||
@@ -55,7 +55,7 @@ template `[]=`*(s: string; i: int; val: char) = arrPut(s, i, val)
|
||||
template `^^`(s, i: untyped): untyped =
|
||||
(when i is BackwardsIndex: s.len - int(i) else: int(i))
|
||||
|
||||
template spliceImpl(s, a, L, b: untyped): untyped =
|
||||
template spliceImpl(s, a, L, b: typed): untyped =
|
||||
# make room for additional elements or cut:
|
||||
var shift = b.len - max(0,L) # ignore negative slice size
|
||||
var newLen = s.len + shift
|
||||
@@ -147,7 +147,6 @@ proc `[]=`*[T; U, V: Ordinal](s: var seq[T], x: HSlice[U, V], b: openArray[T]) =
|
||||
var s = @"abcdefgh"
|
||||
s[1 .. ^2] = @"xyz"
|
||||
assert s == @"axyzh"
|
||||
|
||||
let a = s ^^ x.a
|
||||
let L = (s ^^ x.b) - a + 1
|
||||
if L == b.len:
|
||||
|
||||
Reference in New Issue
Block a user