Ignore:
Timestamp:
Sep 15, 2008, 4:37:31 PM (17 years ago)
Author:
[email protected]
Message:

2008-09-15 Geoffrey Garen <[email protected]>

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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/CodeBlock.cpp

    r36460 r36463  
    790790            break;
    791791        }
     792        case op_construct_verify: {
     793            int r0 = (++it)->u.operand;
     794            int r1 = (++it)->u.operand;
     795            printf("[%4d] construct_verify\t %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str());
     796            break;
     797        }
    792798        case op_get_pnames: {
    793799            int r0 = (++it)->u.operand;
Note: See TracChangeset for help on using the changeset viewer.