News for hackers. Stuff that matters.
Re:Backdooring JavaScript using minifier bugs by phpnode on Monday August 24, 2015 @07:04AM (#10108956)
V8 doesn't use an AST, it uses a CFG, but I believe it comes down to efficiency - it's far cheaper to look at the length of a string than to traverse a graph, and by its nature JS needs very fast compilation times.

This is probably one of those heuristics that works well enough on enough real world code, even though everyone knows it's suboptimal. I've heard that the turbofan compiler will remove this limitation but that's still very much work in progress.

Re:Backdooring JavaScript using minifier bugs by teacup50 on Monday August 24, 2015 @01:01PM (#10111283)
... and people wonder why we want a web bytecode so, so badly.
Re:Backdooring JavaScript using minifier bugs by barrkel on Tuesday August 25, 2015 @02:14PM (#10118478)
Re:Backdooring JavaScript using minifier bugs by phpnode on Tuesday August 25, 2015 @05:27PM (#10119563)
thanks
Re:Backdooring JavaScript using minifier bugs by barrkel on Thursday August 27, 2015 @08:40AM (#10129017)
Only reason I brought it up was the assertion that V8 didn't have an AST. Only the most trivial of compilers avoid building an AST; V8 may not use an AST for interpretation, but interpretation / compilation will be downstream of the AST and could use info from the AST for optimization heuristics. A non-IDE AST would not normally include comments.
Re:Backdooring JavaScript using minifier bugs by phpnode on Thursday August 27, 2015 @10:52AM (#10129746)
I remember thinking that it was odd when I first read about it, I think it must have been in relation to one of the other compilers and I got my wires crossed, but I can't find the source now. Thanks for the correction anyway.