On 15 November 2014 12:37, Max Leske <[email protected]> wrote: > I got a bit frustrated and ended up searching the source for > ‘[\w]opt[[:upper]]’ to find all NativeBoost options. Some of those options > are in fact undocumented: > > optMayGC > - tells that during calling external function one may trigger GC. Therefore, if that option is on, the code generator will use a gate function for call, to safeguard against possible relocation of compiled method, which contains machine code (and thus could return from external function to wrong place).
> optProxyLabels > - used for debugging purposes, to see where the proxy function (and what exactly function) get called in generated code. Does not affects anything in resulting machine code. > optCdecl > - use cdecl calling convention. This option are exposed through different public API and not used directly > optReturnNullAsNil > - for pointer return types and ExternalObject, coerce null return value to nil. > optStdcall > - same as for optCdecl, except it is stdcall convention. > optNonMovable - tells the code generator that the generated code will never move (relocate) in memory. Used for generating code and placing it in external memory > optReserveCallgateSpace > - not used optDebug > - halt at the end of code generation, to see what is generated. For debugging purposes. > optNoAlignment > - ignore default stack alignment when generating a call to external function. Can be used, if you absolutely sure that subject function doesn't requires stack alignment. Thus one can avoid emitting extra code for stack alignment => saving some CPU cycles. > optEmitCall > - private. optNoCleanup > - do not emit code for cleaning stack after calling a function according to calling convention (not all conventions require stack cleanup, cdecl does). Basically, leaving stack pointer untouched after return from external call. optCheckFailOnEveryArgument > - check for the primitive failure after each argument coercion. By default the check is generated only at single place, right before performing an external function call, after all arguments are coerced and pushed on stack. Useful for debugging, when it is hard to figure, which exactly argument fails the coercion. > optStringOrNull > - allow passing nil for arguments of String type, effectively will push null pointer as argument WinUnicode > - Controls the coercion of Windows string types to be either single-byte or multi-byte. Related to types like LPCTSTR etc. See NBTString class and its sole class-side method. -- Best regards, Igor Stasenko.
