summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/xdr/share-bytecode.js
blob: d139c94cfa4af4635d660ac4eedbc7d11fb37362 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
let entry = cacheEntry(`
    function f() { }
    f()                 // Delazify
    f                   // Return function object
`);

let f1 = evaluate(entry, {saveIncrementalBytecode: true});
let f2 = evaluate(entry, {loadBytecode: true});

// Reading from XDR should still deduplicate to same bytecode
assertEq(hasSameBytecodeData(f1, f2), true)