DynCall

A library which encapsulates architecture-, OS- and compiler-specific function call semantics.
Download

DynCall Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Other/Proprietary Li...
  • Price:
  • FREE
  • Publisher Name:
  • Daniel Adler and Tassilo Philipp
  • Publisher web site:
  • http://dyncall.org/

DynCall Tags


DynCall Description

A library which encapsulates architecture-, OS- and compiler-specific function call semantics. DynCall is a library which encapsulates architecture-, OS- and compiler-specific function call semantics in a virtual "bind argument parameters from left to right and then call" interface allowing programmers to call C functions in a completely dynamic manner. In other words, instead of calling a function directly, the dyncall library provides a mechanism to push the function parameters manually and to issue the call afterwards.This means, that a program can determine at runtime what function to call, and what parameters to pass to it. The library is written in C and assembly and provides a very simple C interface to program against.DynCall comes in very handy to power flexible message systems, dynamic function call dispatch mechanisms, closure implementations or even to bridge different programming languages.When it comes to language bindings, the dyncall library provides a clean and portable C interface to dynamically issue calls to foreign code using small call kernels written in assembly. Instead of providing code for every bridged function call, which unnecessarily results in code bloat, only a couple of instructions are used to invoke every possible call.ExampleLet's say, we want to make a call to the function: double sqrt(double x); Using the dyncall library, this function would be called as follows: double r;DCCallVM* vm = dcNewCallVM(4096);dcMode(vm, DC_CALL_C_DEFAULT);dcArgDouble(vm, 4.2373);r = dcCallDouble(vm, (DCpointer)&sqrt);dcFree(vm);However, by exposing this functionality to a dynamic scripting environment, the latter can gain system programming status to a certain degree. It is easy to see the power one can get by calling a C function directly from within a scripting language. Demonstrative bindings and examples for several different scripting languages are provided with the library. What's New in This Release: · Two new ports were added for ARM THUMB mode and PowerPC 32-bit System V ABI. · The System V port has been tested on Linux, but the *BSDs are currently untested. · A bug was fixed for cygwin/GNU as a tool chain. · Additions and improvements were made in the test suites. · Minor cosmetic changes and documentation updates were made.


DynCall Related Software