[Webkit-unassigned] [Bug 16595] New: Add evaluateToVoid() and LoopNode subclasses which ignore completion type

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 24 00:58:48 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=16595

           Summary: Add evaluateToVoid() and LoopNode subclasses which
                    ignore completion type
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: eric at webkit.org
                CC: mjs at apple.com, ggaren at apple.com


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.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list