diff options
-rwxr-xr-x | lib/system/assign.nim | 45 | ||||
-rwxr-xr-x | todo.txt | 5 |
2 files changed, 5 insertions, 45 deletions
diff --git a/lib/system/assign.nim b/lib/system/assign.nim index 943d1f9bd..aa5cd3af3 100755 --- a/lib/system/assign.nim +++ b/lib/system/assign.nim @@ -7,43 +7,6 @@ # distribution, for details about the copyright. # -proc checkTypeInfo*(dest: Pointer, src: int, mt: pointer) -proc checkTypeInfo(dest: Pointer, src: int, n: ptr TNimNode) = - var - d = cast[TAddress](dest) - s = cast[TAddress](src) - case n.kind - of nkSlot: checkTypeInfo(cast[pointer](d +% n.offset), src, n.typ) - of nkList: - for i in 0..n.len-1: checkTypeInfo(dest, src, n.sons[i]) - of nkCase: - var m = selectBranch(dest, n) - if m != nil: checkTypeInfo(dest, src, m) - else: - c_fprintf(cstdout, "ugh memory corruption! in check type info %ld\n", src) - quit 1 - #of nkNone: assert(false) - -proc checkTypeInfo(dest: Pointer, src: int, mt: pointer) = - var mt = cast[PNimType](mt) - var - d = cast[TAddress](dest) - s = cast[TAddress](src) - assert(mt != nil) - case mt.Kind - of tyString: nil - of tySequence: nil - of tyObject, tyTuple, tyPureObject: - checkTypeInfo(dest, src, mt.node) - of tyArray, tyArrayConstr: - for i in 0..(mt.size div mt.base.size)-1: - checkTypeInfo(cast[pointer](d +% i*% mt.base.size), - src, mt.base) - of tyRef: nil - else: - nil # copy raw bits - - proc genericAssignAux(dest, src: Pointer, mt: PNimType, shallow: bool) proc genericAssignAux(dest, src: Pointer, n: ptr TNimNode, shallow: bool) = var @@ -61,10 +24,10 @@ proc genericAssignAux(dest, src: Pointer, n: ptr TNimNode, shallow: bool) = n.typ.size) var m = selectBranch(src, n) if m != nil: genericAssignAux(dest, src, m, shallow) - else: - echo "ugh memory corruption! ", n.kind - quit 1 - #of nkNone: assert(false) + of nkNone: assert(false) + #else: + # echo "ugh memory corruption! ", n.kind + # quit 1 proc genericAssignAux(dest, src: Pointer, mt: PNimType, shallow: bool) = var diff --git a/todo.txt b/todo.txt index 424a32b10..1dd27d655 100755 --- a/todo.txt +++ b/todo.txt @@ -1,9 +1,5 @@ High priority (version 0.8.12) ============================== -- sorting with leads to a strange memory corruption: tsimplesort - --> system.swap or genericAssign is broken! And indeed, if reference counts - are not modified and the GC is triggered in between a swap, bad things - may happen! - bug: invoking a generic iterator twice triggers a code gen bug (titer2) * implement message passing built-ins * add --deadlock_prevention:on|off switch? timeout for locks? @@ -14,6 +10,7 @@ High priority (version 0.8.12) version 0.9.0 ============= +- bug: tfFinal not passed to generic - bug: forward proc for generic seems broken - test the sort implementation again - warning for implicit openArray -> varargs convention |