lp:~mgiuca/mars/native

Created by Matt Giuca and last modified

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
Only Matt Giuca can upload to this branch. If you are Matt Giuca please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Matt Giuca
Project:
Mars
Status:
Merged

Recent revisions

1045. By Matt Giuca

backend_llvm: Cleanup TODO.

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.

1042. By Matt Giuca

doc: Correct linker error stuff for native_import.

1041. By Matt Giuca

interpret: Moved lib_load and lib_sym to native module.
This will be useful by the LLVM backend as well.

1040. By Matt Giuca

docs: More warnings about native_import.

1039. By Matt Giuca

docs: Added note about re-declaration problem.

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.

1036. By Matt Giuca

Merge from trunk.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers