Starting with this:
and running:
$ hermes -emit-binary -out bin.hbc -O0 in.js
$ hbc-decompiler bin.hbc out.js
gives the following:
r0 = undefined;
r1 = global;
r2 = 'Hello World';
r3 = r0;
r4 = r1.print;
r9 = r0;
r8 = r2;
r5 = r9[r4](r8, r7);
r3 = r5;
r6 = r3;
return r6;
r0 is set to undefined, then r9 is set to r0, then the line r5 = r9[r4](r8, r7); tries to read a property from undefined? Why is it doing this? Also, the property it's reading is the function object that it's supposed to be calling??? I don't get what is supposed to be happening here
Starting with this:
and running:
gives the following:
r0is set toundefined, thenr9is set tor0, then the liner5 = r9[r4](r8, r7);tries to read a property fromundefined? Why is it doing this? Also, the property it's reading is the function object that it's supposed to be calling??? I don't get what is supposed to be happening here