Friday, May 26, 2017

Node js C++ Addon Overload Resolution - v1.2.0

Major feature implemented for namespace and class wrapping, no more SetMethod/SetPrototypeMethod and target tracking, all is done automatically.

Since its inefficient to write so much code, while making sure SetMethod and SetPrototypeMethod is called on each overload and track the namespaces used to store the callbacks manually, an experimental namespace_wrap and class_wrap were introduced, these two classes wrap the needed calls as well as track the targets (v8::Object).

The wrappers do add overhead to function execution time but it didn't even register when I did performance analysis.

to use the wrappers you'll need to initialize an overload_resolution instance normally but also start tracking a root target: