You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.
For the C client, and more particularly for the Java client, we would like to be able to describe an initialized aggregate value. The obvious case is string literals for C. In Java we would like to be able to describe a Java char array for these. A Java array will be a HYBRID object. Not having these means unpleasant work-arounds involving element by element initialization by code that we have to arrange to have invoked before the objects could possibly be used.
The text was updated successfully, but these errors were encountered:
The API function load_hail can load such "HAIL bundles", creating and initialising objects. So the C/Java client can generate not only a Mu IR bundle, but also a companion HAIL bundle for initialising these objects.
For an ahead-of-time compiling implementation of Mu, the solution can be "let the ahead-of-time MuIR-to-ELF compiler generates an executable ELF file which, when executed, behaves as if it continues from a Mu instance where some Mu IR bundles are loaded, some HAIL bundles are loaded after that, a main stack is created with a particular function (probably @main) at the bottom, and a main thread is created". i.e. It behaves like a "frozen Mu instance". It still complies to what the spec defines, except some initialisation operations are "not really executed", or more precisely, "already executed".
Alternatively, in a JIT-compiling Mu VM, some MuIR programs can read .class files directly (via the unsafe Native Interface), create objects and copy these string contents at run time (run time for Mu, class-loading time for the Java client).
Note: the master branch (which still uses PHI nodes, and will be replaced by the goto-with-values branch) does not support HAIL. It is recommended to migrate to the goto-with-values form.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
For the C client, and more particularly for the Java client, we would like to be able to describe an initialized aggregate value. The obvious case is string literals for C. In Java we would like to be able to describe a Java char array for these. A Java array will be a HYBRID object. Not having these means unpleasant work-arounds involving element by element initialization by code that we have to arrange to have invoked before the objects could possibly be used.
The text was updated successfully, but these errors were encountered: