mukul-rathi / bolt

Bolt is a language with in-built data-race freedom!
MIT License
548 stars 53 forks source link

Allocate objects to heap in LLVM IR #96

Closed mukul-rathi closed 4 years ago

mukul-rathi commented 4 years ago

Right now if we have

let x = new Foo(f:5);
finish{
async{
x.f:=6
}
let w = new Foo();
}
printf("X.f is %d", x.f);

This prints x.f is 5, not 6, since the thread is writing to a thread local stack.

Instead we should have heap memory for objects - use malloc()