2008-09-15 Geoffrey Garen <ggaren@apple.com>
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Sep 2008 23:37:31 +0000 (23:37 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Sep 2008 23:37:31 +0000 (23:37 +0000)
commit462b920fd7dd7da8e215b80973aa33fad656c403
tree2a4c55a1a06d5d5b476033754fd7fcf4d5315cb9
parenteb4de98f0e70c2ac9745ca3460b8baae186dd1bf
2008-09-15  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Removed the CalledAsConstructor flag from the call frame header. Now,
        we use an explicit opcode at the call site to fix up constructor results.

        SunSpider says 0.4% faster.

        cti_op_construct_verify is an out-of-line function call for now, but we
        can fix that once StructureID holds type information like isObject.

        * VM/CTI.cpp:
        (JSC::CTI::privateCompileMainPass): Codegen for the new opcode.

        * VM/CodeBlock.cpp:
        (JSC::CodeBlock::dump):

        * VM/CodeGenerator.cpp: Codegen for the new opcode. Also...
        (JSC::CodeGenerator::emitCall): ... don't test for known non-zero value.
        (JSC::CodeGenerator::emitConstruct): ... ditto.

        * VM/Machine.cpp: No more CalledAsConstructor
        (JSC::Machine::privateExecute): Implementation for the new opcode.
        (JSC::Machine::cti_op_ret): The speedup: no need to check whether we were
        called as a constructor.
        (JSC::Machine::cti_op_construct_verify): Implementation for the new opcode.
        * VM/Machine.h:

        * VM/Opcode.h: Declare new opcode.

        * VM/RegisterFile.h:
        (JSC::RegisterFile::): No more CalledAsConstructor

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/VM/CTI.cpp
JavaScriptCore/VM/CodeBlock.cpp
JavaScriptCore/VM/CodeGenerator.cpp
JavaScriptCore/VM/Machine.cpp
JavaScriptCore/VM/Machine.h
JavaScriptCore/VM/Opcode.h
JavaScriptCore/VM/RegisterFile.h