Changeset 36463 in webkit for trunk/JavaScriptCore/VM/CTI.cpp


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/CTI.cpp

    r36462 r36463  
    835835            break;
    836836        }
     837        case op_construct_verify: {
     838            emitPutArgConstant(instruction[i + 1].u.operand, 0);
     839            emitPutArgConstant(instruction[i + 2].u.operand, 4);
     840            emitCall(i, Machine::cti_op_construct_verify);
     841            i += 3;
     842            break;
     843        }
    837844        case op_get_by_val: {
    838845            emitGetArg(instruction[i + 2].u.operand, X86::eax);
Note: See TracChangeset for help on using the changeset viewer.