4 ms·
You can't just wave away the impact of having eval though. Just the fact that it exists means you need to keep around some supporting state like variable names.
by viraptor 8y ago
You can't just wave away the impact of having eval though. Just the fact that it exists means you need to keep around some supporting state like variable names. You can't do full constant folding and eliminate all intermediate steps for example if there a chance a runtime-created code will reach into your frame and want them back.
- rujuladanh 8y agoSimilar things are done by JS engines and others nowadays. They optimize and keep the original stuff in case assumptions stop holding.
- wvenable 8y agoeval() is scoped to the current block. If you even just ignored JITing any function with eval() in it then you'd still get quite far.