rce-incorporated / Fiu

Luau bytecode interpreter for Luau
MIT License
91 stars 18 forks source link

Native namecall handler support #19

Closed TheGreatSageEqualToHeaven closed 8 months ago

TheGreatSageEqualToHeaven commented 8 months ago

Luau sets up L->namecall when namecalling on anything but tables. While this behaviour is impossible to support dynamically in the VM we can allow users to pass a namecallHandlers table so we can partially support this behaviour.

Example:

settings.namecallHandlers["method"] = function(self, ...)
      return self:method(...)
end