defaults to ORC (#19972)
* defaults to Orc * bootstrap using refc * use gc * init orc defines * unregister orc * fix gc * fix commands * add prepareMutation for orc * enable deepcopy for orc * prepareMutation * more fixes * some cases * bug #20081 * partial fixes * partial fixes * fixes command line * more fixes * build Nim with refc * use gc * more fixes * rstore * orc doesn't support threadpool * more shallowCopy * more fixes * fixes unsafeNew * workarounds * small * more fixes * fixes some megatest * tcodegenbugs1 refc * fxies megatest * build nimble with refc * workaround tensordsl tests * replace shallowCopy with move * fixes action * workaround * add todo * fixes important packages * unpublic unregisterArcOrc * fixes cpp * enable windows Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
This commit is contained in:
parent
47b59e4d33
commit
7739e23420
81 changed files with 255 additions and 150 deletions
|
|
@ -243,7 +243,7 @@ proc InsertItem[T,D](APath: RPath[T,D], ANode:PNode[T,D], Akey: T, Avalue: D) =
|
|||
of cLenCenter: setLen(APath.Nd.slots, cLen4)
|
||||
of cLen4: setLen(APath.Nd.slots, cLenMax)
|
||||
else: discard
|
||||
for i in countdown(APath.Nd.count.int - 1, x + 1): shallowCopy(APath.Nd.slots[i], APath.Nd.slots[i - 1])
|
||||
for i in countdown(APath.Nd.count.int - 1, x + 1): APath.Nd.slots[i] = move APath.Nd.slots[i - 1]
|
||||
APath.Nd.slots[x] = setItem(Akey, Avalue, ANode)
|
||||
|
||||
|
||||
|
|
@ -255,31 +255,39 @@ proc SplitPage[T,D](n, left: PNode[T,D], xi: int, Akey:var T, Avalue:var D): PNo
|
|||
result.slots.newSeq(cLenCenter)
|
||||
result.count = cCenter
|
||||
if x == cCenter:
|
||||
for i in 0..cCenter-1: shallowCopy(it1[i], left.slots[i])
|
||||
for i in 0..cCenter-1: shallowCopy(result.slots[i], left.slots[cCenter + i])
|
||||
for i in 0..cCenter-1:
|
||||
it1[i] = move left.slots[i]
|
||||
for i in 0..cCenter-1:
|
||||
result.slots[i] = move left.slots[cCenter + i]
|
||||
result.left = n
|
||||
else :
|
||||
if x < cCenter :
|
||||
for i in 0..x-1: shallowCopy(it1[i], left.slots[i])
|
||||
for i in 0..x-1:
|
||||
it1[i] = move left.slots[i]
|
||||
it1[x] = setItem(Akey, Avalue, n)
|
||||
for i in x+1 .. cCenter-1: shallowCopy(it1[i], left.slots[i-1])
|
||||
for i in x+1 .. cCenter-1:
|
||||
it1[i] = move left.slots[i-1]
|
||||
var w = left.slots[cCenter-1]
|
||||
Akey = w.key
|
||||
Avalue = w.value
|
||||
result.left = w.node
|
||||
for i in 0..cCenter-1: shallowCopy(result.slots[i], left.slots[cCenter + i])
|
||||
for i in 0..cCenter-1:
|
||||
result.slots[i] = move left.slots[cCenter + i]
|
||||
else :
|
||||
for i in 0..cCenter-1: shallowCopy(it1[i], left.slots[i])
|
||||
for i in 0..cCenter-1:
|
||||
it1[i] = move left.slots[i]
|
||||
x = x - (cCenter + 1)
|
||||
for i in 0..x-1: shallowCopy(result.slots[i], left.slots[cCenter + i + 1])
|
||||
for i in 0..x-1:
|
||||
result.slots[i] = move left.slots[cCenter + i + 1]
|
||||
result.slots[x] = setItem(Akey, Avalue, n)
|
||||
for i in x+1 .. cCenter-1: shallowCopy(result.slots[i], left.slots[cCenter + i])
|
||||
for i in x+1 .. cCenter-1:
|
||||
result.slots[i] = move left.slots[cCenter + i]
|
||||
var w = left.slots[cCenter]
|
||||
Akey = w.key
|
||||
Avalue = w.value
|
||||
result.left = w.node
|
||||
left.count = cCenter
|
||||
shallowCopy(left.slots, it1)
|
||||
left.slots = move it1
|
||||
|
||||
|
||||
proc internalPut[T,D](ANode: ref TNode[T,D], Akey: T, Avalue: D, Oldvalue: var D): ref TNode[T,D] =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue