|
Hello,
just wanna tell you that i adopted NativeBoost under Cog and have a
first running prototype.
It still lacks callbacks support, but its already can be used for
callouts and to run native code.
NativeBoost-CogPlugin does not requires patched for platform-specific code.
Just load it into Cog VMMaker image, generate & build vm and you done!
Thanks Eliot for providing necessary bits for controlling memory
execution protection.
The NativeBoost-CogPlugin will have some additional functionality,
comparing to its Squeak VM cousin.
- it using a primitive failure codes, so when primitive fails , you
can determine why and where your native call fails.
The primitive error codes still not handled/used by language side,
so its a work to do:
- a marchalling code can use error codes to report that primitive
fails due to coercion error, and it even will tell which exactly
argument
failed to coerce.
- of course, you will be able to add own custom error codes, and
handle them as you like to.
By default, a plugin could report following problems:
"execution of native code is not enabled by plugin"
ErrNotEnabled
"failed to find a native code for primitive method"
ErrNoNativeCodeInMethod
"native code generated for different platform"
ErrInvalidPlatformId
I wanna say thanks to Eliot for providing primitive fail codes in VM.
A proper error handling is an important part of infrastructure-level
project (such as NativeBoost), since then people who using it,
can quickly determine what's wrong with their code.
--
Best regards,
Igor Stasenko AKA sig.
|