work on multithread, interpreter, and prototyped a #line-in-simple-passthrough ast changing pass turned on with -g

This commit is contained in:
Nathan Braswell
2016-06-14 02:14:25 -07:00
parent 1318e71efd
commit 27fea0e90c
12 changed files with 243 additions and 112 deletions

View File

@@ -20,7 +20,7 @@ fun run<T>(func :fun(T): void, data: T) : *ulong {
// to avoid extra copy etc
var func_copy = new<fun(T):void>()
var func_and_data = new<pair<*void, *T>>()->construct()
*data_copy = data
maybe_copy_construct(data_copy, &data)
memmove((func_copy) cast *void, (&func) cast *void, #sizeof<fun(T):void>)
*func_and_data = make_pair((func_copy) cast *void, data_copy)
var wrapper = fun(func_and_data: *void): *void {