dop251 / goja

ECMAScript/JavaScript engine in pure Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Posibility to access goja bytecode and native fields of compiled programs

NULL0B opened this issue · comments

Hi, nice project.

Would be nice to be able of inspecting the compiled program.

For example, here I would like to get all globals variables defined, so i must search for bind global instruction and inspect it.
As the code, other fields, and instriction structs are hidden with lowercase i cant access.

image

Would be nice to have the instructions structs public, and maybe some getters

Hi.

Neither the 'bytecode' nor the compiled programs have reached a state where I'm willing to commit to backward compatibility in terms of the API. By keeping them unexported I have the freedom to tweak them without breaking people's code. Hope this makes sense.