compiler, runtime: add layout parameter to runtime.alloc

This layout parameter is currently always nil and ignored, but will
eventually contain a pointer to a memory layout.

This commit also adds module verification to the transform tests, as I
found out that it didn't (and therefore didn't initially catch all
bugs).
This commit is contained in:
Ayke van Laethem
2021-07-09 14:01:37 +02:00
committed by Ron Evans
parent c454568688
commit f24a93c51d
38 changed files with 99 additions and 89 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ func growHeap() bool {
//export malloc
func libc_malloc(size uintptr) unsafe.Pointer {
return alloc(size)
return alloc(size, nil)
}
//export free
@@ -79,7 +79,7 @@ func libc_calloc(nmemb, size uintptr) unsafe.Pointer {
// Note: we could be even more correct here and check that nmemb * size
// doesn't overflow. However the current implementation should normally work
// fine.
return alloc(nmemb * size)
return alloc(nmemb*size, nil)
}
//export realloc