Error parsing input files
trevnorris opened this issue · comments
Test script:
'use strict';
function runSplice(arr, index) {
for (var i = 0; i < 1e7; i++) {
arr.splice(index, 1);
arr.push(100);
}
}
(function runner() {
var arr = new Array(150);
for (var i = 0; i < arr.length; ++i) {
arr[i] = i;
}
runSplice(arr, 5);
}());
To reproduce:
- Run with the following:
$ ./out/x64.release/d8 --trace_hydrogen --trace_phase=Z --trace_deopt \
--code_comments --hydrogen_track_positions --redirect_code_traces \
--redirect_code_traces_to=code.asm --print_opt_code test.js
- Load the resulting
code.asm
andhydrogen.cfg
files into IRHydra (http://mrale.ph/irhydra/2/). - Select
runSplice
In the bottom left corner should see the message:
ERROR: Source does not match IR. See console for more details.
- Now click on "Hide Disassembly" and select "Split Disassembly"
Should see that a majority of the IR output is no longer there.
Tested with V8 v4.2.77.20 and v4.4.63
If it's helpful, note that with #43 you can now put the asm and cfg files in a gist and link to them in irhydra directly.
The #gist:
link thing isn't working for me, but here are the files: https://gist.github.com/trevnorris/8160de664e5b594576b0
(ran with d8 v4.4.63)
@mraleph Awesome! Thanks.
Weird, I was able to reproduce http://mrale.ph/irhydra/2/#gist:8160de664e5b594576b0 not displaying anything for me either, but now it's working for me. @mraleph did you fix something?
@brendankenny I think I fixed by this hack
irhydra/irhydra/lib/src/modes/v8/hydrogen_parser.dart
Lines 31 to 32 in 65d73e9
there was a new line missing at the end of hydrogen.cfg