Bug 128024

Summary: Don't need a JSNameScope for the callee name just for the debugger
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, ggaren, joethomas, mhahnenberg, msaboff, oliver, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 127910    
Attachments:
Description Flags
the patch. ggaren: review+

Description Mark Lam 2014-01-31 15:02:04 PST
Currently, in the bytecode for a function, we push a JSNamedScope for the name of the function when a debugger is attached.  The name scope for the function name is only needed for evals which can redefined the name to resolve to something else, and can later delete the redefined name which should revert the resolution of the name to the original function.  The debugger does not add the need for this functionality.  Hence, we can remove the presence of the debugger as a criteria for pushing the JSNameScope.
Comment 1 Mark Lam 2014-01-31 15:05:44 PST
Created attachment 222859 [details]
the patch.
Comment 2 Geoffrey Garen 2014-01-31 15:08:56 PST
Comment on attachment 222859 [details]
the patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=222859&action=review

r=me

> Source/JavaScriptCore/ChangeLog:10
> +        the function name is only needed for evals which can redefined the name

"redefine"

> Source/JavaScriptCore/ChangeLog:14
> +        The debugger does not add the need for this functionality. Hence, we can
> +        remove the presence of the debugger as a criteria for pushing the

The reason the debugger doesn't need this feature is that it declares all new vars in a temporary, nested scope.
Comment 3 Mark Lam 2014-01-31 15:14:07 PST
Thanks.  Landed in r163210: <http://trac.webkit.org/r163210>.