[Webkit-unassigned] [Bug 20764] Proposed byte-code optimization framework

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 10 10:58:18 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=20764





------- Comment #5 from ggaren at apple.com  2008-09-10 10:58 PDT -------
Some initial impressions, from trying to get the patch to build: 

 RegisterID* FunctionBodyNode::emitCode(CodeGenerator& generator, RegisterID*)
@@ -1795,6 +1799,9 @@

     CodeGenerator generator(this, globalObject->debugger(), scopeChain,
&globalObject->symbolTable(), m_code.get(), m_varStack, m_functionStack);
     generator.generate();
+
+    CodeBlockOptimizer opt;
+   
m_code.set(static_cast<JSC::ProgramCodeBlock*>(opt.optimizeBlock(m_code.get(),
globalObject->globalExec())));
 }

This cast is invalid, since a FunctionBodyNode does not hold a
ProgramCodeBlock. You should change the optimizer to accept any kind of
codeblock.

OptConstantFoldingPropagation.cpp should just fold into with
CodeBlockOptimizer.cpp, since it holds part of the implementation for
CodeBlockOptimizer.

The flags in Opcode.h are pretty hard to read. I think something like
"kConditionalJump" would be much easier to read than "OPFLAG_CJUMP." It's a
shame when a variable name requires a comment just to explain what it stands
for. You can put the constants inside a class or a namespace to avoid name
collisions.

We know there are strings and floats that can be constant-folded in SunSpider.
It's surprising that those tests didn't speed up at all.


-- 
Configure bugmail: https://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