gogc: GCC-8.2.0 compatibility and other improvements (#9211)
- Go's write barriers are now plugged-in in all the relevant points - "gcGo" is correctly classified by usesWriteBarrier() - some gogc structures and functions now use golib wrappers to keep GCC version-specific conditions out of the compiler/stdlib code - we no longer allow mixing the C malloc with Go's - fix a problem with string copying
This commit is contained in:
parent
d48e964950
commit
10f5f67767
5 changed files with 83 additions and 118 deletions
|
|
@ -122,6 +122,8 @@ proc copyStringRC1(src: NimString): NimString {.compilerRtl.} =
|
|||
result = cast[NimString](newObjRC1(addr(strDesc), sizeof(TGenericSeq) +
|
||||
s+1))
|
||||
result.reserved = s
|
||||
when defined(gogc):
|
||||
result.elemSize = 1
|
||||
else:
|
||||
result = rawNewStringNoInit(src.len)
|
||||
result.len = src.len
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue