further progress; more tests are green
This commit is contained in:
parent
27723af469
commit
49667798eb
5 changed files with 24 additions and 25 deletions
|
|
@ -461,6 +461,7 @@ proc rawNewObj(typ: PNimType, size: int, gch: var GcHeap): pointer =
|
|||
gcAssert(typ.kind in {tyRef, tyString, tySequence}, "newObj: 1")
|
||||
collectCT(gch)
|
||||
var res = cast[PCell](rawAlloc(gch.region, size + sizeof(Cell)))
|
||||
gcAssert typ.kind == tyString or size >= typ.base.size, "size too small"
|
||||
gcAssert((cast[ByteAddress](res) and (MemAlign-1)) == 0, "newObj: 2")
|
||||
# now it is buffered in the ZCT
|
||||
res.typ = typ
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue