HaxeFoundation / hashlink

A virtual machine for Haxe
https://hashlink.haxe.org/
MIT License
812 stars 158 forks source link

Fix OCallMethod on HVirtual, when obj is in args #701

Closed yuxiaomao closed 3 months ago

yuxiaomao commented 3 months ago

Fixes #688 : OCallMethod obj f args where obj is also in args list. Inspired by OCallClosure. Haxe compiler does not generated this bytecode in most cases, so I choose to keep the o->value hack if the new logic is not necessary.

I also tested when using only the new logic (keep o->value in R(f->nregs)) and it seems to work fine.