shsajjadi / OctaveCoder

Octave Coder __ A code generator and build system that converts Octave to C++
Other
27 stars 3 forks source link

Method call dispatch don't work #26

Closed shsajjadi closed 1 year ago

shsajjadi commented 1 year ago

Currently the only way to call classdef object methods is obj.method () syntax. Implementing dispatch call as method(obj) has a little overhead on all function calls. Because a virtual function should be called on the first argument to check whether it has an object or not. If it is an object the name of the function is passed to the interpreter to find the function and call it. This second overhead is exclusive to calling classdef method dispatch.

shsajjadi commented 1 year ago

Fixed here: 01bc98e7bb818b4cfbeac63ec2c8b5f4d197b2a3