lp:~mgiuca/mars/native
This branch introduces a native code interface to Mars, by adding the ability to import functions from a dynamically-linked library, and introducing several new primitives including dlopen. This allows arbitrary native library files to be opened at runtime and C functions to be called.
Requires libdl, so only compatible with POSIX systems.
- Get this branch:
- bzr branch lp:~mgiuca/mars/native
Branch merges
- Matt Giuca: Approve
- Diff: 0 lines
Related bugs
Bug #488588: Add the ability to call native code | Wishlist | Fix Committed |
|
Related blueprints
Branch information
Recent revisions
- 1044. By Matt Giuca
-
Changed rules about native_import: it is no longer valid to have a native_import as a CGC.
(Basically because it would have been too hard to compile it in LLVM.)
typecheck now displays a compiler error in this case.
Updated documentation and test suite (including a new test to check for this compiler error). - 1043. By Matt Giuca
-
backend_llvm: compile_program now takes a list of DLL names.
It will load them and then map each native_import function onto the appropriate symbol in the symbol table.
It is now a load-time error if a native_import function is not found in the linked binaries, and it is now possible to link to functions in libraries other than libc. - 1041. By Matt Giuca
-
interpret: Moved lib_load and lib_sym to native module.
This will be useful by the LLVM backend as well. - 1038. By Matt Giuca
-
test native_import: Uncomment broken tests.
LLVM backend now does native imports properly, but there is still one case that has to be commented out. - 1037. By Matt Giuca
-
backend_llvm: Added better error message when a native_import uses the wrong arguments.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)