Title: [133255] trunk/Source/_javascript_Core
- Revision
- 133255
- Author
- [email protected]
- Date
- 2012-11-01 18:43:25 -0700 (Thu, 01 Nov 2012)
Log Message
Remove GlobalObject constant register that is typically unused
https://bugs.webkit.org/show_bug.cgi?id=101005
Reviewed by Geoffrey Garen.
The GlobalObject constant register is frequently allocated even when it
is not used, it is also getting in the way of some other optimisations.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* bytecode/CodeBlock.h:
(CodeBlock):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseResolveOperations):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (133254 => 133255)
--- trunk/Source/_javascript_Core/ChangeLog 2012-11-02 01:42:16 UTC (rev 133254)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-11-02 01:43:25 UTC (rev 133255)
@@ -1,3 +1,22 @@
+2012-11-01 Oliver Hunt <[email protected]>
+
+ Remove GlobalObject constant register that is typically unused
+ https://bugs.webkit.org/show_bug.cgi?id=101005
+
+ Reviewed by Geoffrey Garen.
+
+ The GlobalObject constant register is frequently allocated even when it
+ is not used, it is also getting in the way of some other optimisations.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::CodeBlock):
+ * bytecode/CodeBlock.h:
+ (CodeBlock):
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::parseResolveOperations):
+
2012-10-31 Filip Pizlo <[email protected]>
DFG optimized string access code should be enabled
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (133254 => 133255)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2012-11-02 01:42:16 UTC (rev 133254)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2012-11-02 01:43:25 UTC (rev 133255)
@@ -1607,7 +1607,6 @@
, m_thisRegister(other.m_thisRegister)
, m_argumentsRegister(other.m_argumentsRegister)
, m_activationRegister(other.m_activationRegister)
- , m_globalObjectConstant(other.m_globalObjectConstant)
, m_needsFullScopeChain(other.m_needsFullScopeChain)
, m_usesEval(other.m_usesEval)
, m_isNumericCompareFunction(other.m_isNumericCompareFunction)
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.h (133254 => 133255)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2012-11-02 01:42:16 UTC (rev 133254)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2012-11-02 01:43:25 UTC (rev 133255)
@@ -1216,9 +1216,6 @@
int m_numVars;
bool m_isConstructor;
- int globalObjectConstant() const { return m_globalObjectConstant; }
- void setGlobalObjectConstant(int globalRegister) { m_globalObjectConstant = globalRegister; }
-
protected:
#if ENABLE(JIT)
virtual bool jitCompileImpl(ExecState*) = 0;
@@ -1298,7 +1295,6 @@
int m_thisRegister;
int m_argumentsRegister;
int m_activationRegister;
- int m_globalObjectConstant;
bool m_needsFullScopeChain;
bool m_usesEval;
Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (133254 => 133255)
--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2012-11-02 01:42:16 UTC (rev 133254)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2012-11-02 01:43:25 UTC (rev 133255)
@@ -270,7 +270,6 @@
, m_expressionTooDeep(false)
{
m_globalData->startedCompiling(m_codeBlock);
- m_codeBlock->setGlobalObjectConstant(emitLoad(0, JSValue(m_codeBlock->globalObject()))->index());
if (m_shouldEmitDebugHooks)
m_codeBlock->setNeedsFullScopeChain(true);
@@ -354,7 +353,6 @@
, m_expressionTooDeep(false)
{
m_globalData->startedCompiling(m_codeBlock);
- m_codeBlock->setGlobalObjectConstant(emitLoad(0, JSValue(m_codeBlock->globalObject()))->index());
if (m_shouldEmitDebugHooks)
m_codeBlock->setNeedsFullScopeChain(true);
@@ -570,7 +568,6 @@
, m_expressionTooDeep(false)
{
m_globalData->startedCompiling(m_codeBlock);
- m_codeBlock->setGlobalObjectConstant(emitLoad(0, JSValue(m_codeBlock->globalObject()))->index());
if (m_shouldEmitDebugHooks || m_baseScopeDepth)
m_codeBlock->setNeedsFullScopeChain(true);
Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (133254 => 133255)
--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2012-11-02 01:42:16 UTC (rev 133254)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2012-11-02 01:43:25 UTC (rev 133255)
@@ -1876,12 +1876,12 @@
while (resolvingBase) {
switch (pc->m_operation) {
case ResolveOperation::ReturnGlobalObjectAsBase:
- *base = get(m_codeBlock->globalObjectConstant());
+ *base = cellConstant(globalObject);
ASSERT(!value);
return true;
case ResolveOperation::SetBaseToGlobal:
- *base = get(m_codeBlock->globalObjectConstant());
+ *base = cellConstant(globalObject);
setBase = true;
resolvingBase = false;
++pc;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes