Bug 128024 - Don't need a JSNameScope for the callee name just for the debugger
Summary: Don't need a JSNameScope for the callee name just for the debugger
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks: 127910
  Show dependency treegraph
 
Reported: 2014-01-31 15:02 PST by Mark Lam
Modified: 2014-01-31 15:14 PST (History)
7 users (show)

See Also:


Attachments
the patch. (2.41 KB, patch)
2014-01-31 15:05 PST, Mark Lam
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>.