WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
16595
Add evaluateToVoid() and LoopNode subclasses which ignore completion type
https://bugs.webkit.org/show_bug.cgi?id=16595
Summary
Add evaluateToVoid() and LoopNode subclasses which ignore completion type
Eric Seidel (no email)
Reported
2007-12-24 00:58:48 PST
Add evaluateToVoid() and LoopNode subclasses which ignore completion type Loop nodes are spending time updating a completion value to be returned (and generally ignored). For example, most for loops never have their returned completion type examined. I've never seen code like this: function bar() { for(var x = 0; x < 10; x++) x; } alert(bar()); Only in cases like that do we need to care what the loop completion value was. In the common case, we can use a reverse execution walk through the node tree to keep track of when completion values are ignored: var x = 2; // the fact that this updates the last completion value is completely ignored var y = 4; and use evaluateToVoid() calls instead. We could even swap out entire BlockNodes which call void executeToVoid(exec) instead.
Attachments
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2007-12-24 01:01:55 PST
actually, the only way to access a completion value is from a function w/o a return value or an eval statement so you don't even need to walk, you just look at the last statement. in the global context you can always evaluate to void
Cameron Zwarich (cpst)
Comment 2
2008-09-03 02:41:38 PDT
This is now irrelevant after SquirrelFish.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug