Browse thread
[Caml-list] calling native code from bytecode?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Chris Hecker <checker@d...> |
| Subject: | [Caml-list] calling native code from bytecode? |
Is there any way to compile part of a project in bytecode and another part with the native compiler and link them? It seems odd that you can call C from bytecode but not other caml code. The gc and everything is the same between the asm and bytecode runtimes, no? Are datastructures in memory (except code, of course) compatible? Basically, I've got some numerical code that I'd like to compile to native code for performance, but I'd like to keep most of the non-performance stuff in bytecode so I can use the toplevel and whatnot. I suppose I could do some sort of heinous bytecode -> C -> native code shim, but it seems like this could "just work". Obviously, the holy grail would be complete intermingling of bytecode and native code, and the linker just figures it out and does the right thing. That would rock. But, I'd settle for bytecode -> native calls only at this point. Thoughts? Chris ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr