Title: [163210] trunk/Source/_javascript_Core
- Revision
- 163210
- Author
- [email protected]
- Date
- 2014-01-31 15:18:15 -0800 (Fri, 31 Jan 2014)
Log Message
Don't need a JSNameScope for the callee name just for the debugger.
<https://webkit.org/b/128024>
Reviewed by Geoffrey Garen.
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 redefine 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 need this feature because it declares all new vars
in a temporary nested scope. Hence, we can remove the presence of the
debugger as a criteria for pushing the JSNameScope.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::resolveCallee):
(JSC::BytecodeGenerator::addCallee):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (163209 => 163210)
--- trunk/Source/_javascript_Core/ChangeLog 2014-01-31 23:12:05 UTC (rev 163209)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-01-31 23:18:15 UTC (rev 163210)
@@ -1,3 +1,23 @@
+2014-01-31 Mark Lam <[email protected]>
+
+ Don't need a JSNameScope for the callee name just for the debugger.
+ <https://webkit.org/b/128024>
+
+ Reviewed by Geoffrey Garen.
+
+ 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 redefine 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 need this feature because it declares all new vars
+ in a temporary nested scope. Hence, we can remove the presence of the
+ debugger as a criteria for pushing the JSNameScope.
+
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::resolveCallee):
+ (JSC::BytecodeGenerator::addCallee):
+
2014-01-31 Filip Pizlo <[email protected]>
Unreviewed, build fix.
Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (163209 => 163210)
--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2014-01-31 23:12:05 UTC (rev 163209)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2014-01-31 23:18:15 UTC (rev 163210)
@@ -490,7 +490,7 @@
m_calleeRegister.setIndex(JSStack::Callee);
// If non-strict eval is in play, we use a separate object in the scope chain for the callee's name.
- if ((m_codeBlock->usesEval() && !m_codeBlock->isStrictMode()) || m_shouldEmitDebugHooks)
+ if (m_codeBlock->usesEval() && !m_codeBlock->isStrictMode())
emitPushNameScope(functionBodyNode->ident(), &m_calleeRegister, ReadOnly | DontDelete);
if (!functionBodyNode->captures(functionBodyNode->ident()))
@@ -506,7 +506,7 @@
return;
// If non-strict eval is in play, we use a separate object in the scope chain for the callee's name.
- if ((m_codeBlock->usesEval() && !m_codeBlock->isStrictMode()) || m_shouldEmitDebugHooks)
+ if (m_codeBlock->usesEval() && !m_codeBlock->isStrictMode())
return;
ASSERT(calleeRegister);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes