2 ms·
I didn't notice that the Typed Object spec supports "new" heap allocation, if this'll work with asmjs, than awesome. GWT's needs are primarily two fold: 1) rec
by cromwellian 12y ago
I didn't notice that the Typed Object spec supports "new" heap allocation, if this'll work with asmjs, than awesome.
GWT's needs are primarily two fold:
1) recognize Java types that can be promoted to struct-types. GWT already knows how to do this as it has passes to convert all methods of a class to monomorphic/static dispatch, meaning the prototype only has to contain field values. Thus if a Java type has no polymorphic methods, and all fields are either primitives, or references to other 'struct' types, then the compiler can emit typed objects.
2) Since Java is a GC'ed language, GWT currently isn't in the business of implementing a memory management scheme. We rely on Javascript to do this. The current problem with strict asmjs output is we'd need to allocate typed arrays and our own memory management scheme. There's not much appetite for that right now, but I suppose it could change in the future.