mirror of
https://github.com/morluto/awesome-reverse-engineering.git
synced 2026-12-02 13:11:19 -05:00
67417115f0
Run the hermes-dec check from the issue #6 conditional backlog: a self-authored JavaScript fixture is compiled to HBC 98 and 99 by pinned hermes-compiler builds, then parsed, disassembled, and decompiled. The check also records the limits found: an unsupported-version warning, a TypeError when parsing -g1 debug info, and pseudo-code that does not reproduce the original output when executed.
11 lines
276 B
JavaScript
11 lines
276 B
JavaScript
function classify(n) {
|
|
if (n < 0) return "negative";
|
|
if (n === 0) return "zero";
|
|
return n % 2 === 0 ? "even" : "odd";
|
|
}
|
|
function scaled(a, b) {
|
|
return a * 7 + b;
|
|
}
|
|
globalThis.marker = "hbc-fixture-marker";
|
|
print(classify(4) + ":" + classify(-1) + ":" + scaled(3, 4));
|