Closed cheako closed 9 months ago
My testing shows that object constructors return the object constructor function and if this function is called it returns the same.
I got glm.common.js to run under duktape https://github.com/cheako/cheako-vulkan/blob/60f63ead64aa23391bf7ba34c860acebb9761dc6/015glm-js/default_js.js#L18
I've abandoned this and have started https://github.com/cheako/cglm-js
Hi Michael -- I recently rediscovered your incredible PR porting glm-js towards DukTape. Thank you so much for your dedication and ingenuity! While the glm-js project is now sunsetting (see #19), I wanted to express my sincere gratitude for your effort and respect your decision on moving forward. Your work was truly inspiring, and I appreciate you pushing boundaries with glm-js. Best regards, -Tim
A proof of concept: This code only partially works, not sure what needs fixing.
A lot of the eval(Function.prototype.toString()) behaviour is undefined. The spec only mandates that it creates an identical object, but that's actually impossible if for example this is no-longer the same. I'm not sure what behaviour glm-js relies on, nor is it even practical to implement in duktape. It's far better to remove the relises on undefined behaviour.
https://en.wikipedia.org/wiki/Undefined_behavior#Risks