1. 17 Oct, 2012 1 commit
    • fpizlo@apple.com's avatar
      Array and object allocations via 'new Object' or 'new Array' should be inlined... · 4500e353
      fpizlo@apple.com authored
      Array and object allocations via 'new Object' or 'new Array' should be inlined in bytecode to allow allocation site profiling
      https://bugs.webkit.org/show_bug.cgi?id=99557
      
      Reviewed by Geoffrey Garen.
      
      This uses the old jneq_ptr trick to allow for the bytecode to "see" that the
      operation in question is what we almost certainly know it to be.
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::dump):
      * bytecode/Opcode.h:
      (JSC):
      (JSC::padOpcodeName):
      * bytecode/SpecialPointer.h:
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::emitCall):
      (JSC::BytecodeGenerator::emitCallEval):
      (JSC::BytecodeGenerator::expectedFunctionForIdentifier):
      (JSC):
      (JSC::BytecodeGenerator::emitExpectedFunctionSnippet):
      (JSC::BytecodeGenerator::emitConstruct):
      * bytecompiler/BytecodeGenerator.h:
      (BytecodeGenerator):
      * bytecompiler/NodesCodegen.cpp:
      (JSC::NewExprNode::emitBytecode):
      (JSC::FunctionCallValueNode::emitBytecode):
      (JSC::FunctionCallResolveNode::emitBytecode):
      (JSC::FunctionCallBracketNode::emitBytecode):
      (JSC::FunctionCallDotNode::emitBytecode):
      (JSC::CallFunctionCallDotNode::emitBytecode):
      (JSC::ApplyFunctionCallDotNode::emitBytecode):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGCapabilities.h:
      (JSC::DFG::canCompileOpcode):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompileMainPass):
      * jit/JIT.h:
      (JIT):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_new_array_with_size):
      (JSC):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      (JSC):
      * jit/JITStubs.h:
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::LLINT_SLOW_PATH_DECL):
      (LLInt):
      * llint/LLIntSlowPaths.h:
      (LLInt):
      * llint/LowLevelInterpreter.asm:
      * runtime/ArrayConstructor.cpp:
      (JSC::constructArrayWithSizeQuirk):
      (JSC):
      * runtime/ArrayConstructor.h:
      (JSC):
      * runtime/CommonIdentifiers.h:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      (JSC):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4500e353
  2. 27 Sep, 2012 1 commit
    • fpizlo@apple.com's avatar
      jneq_ptr shouldn't have a pointer · 1271fa3a
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97739
      
      Reviewed by Oliver Hunt.
      
      Slamming pointers directly into bytecode is sometimes cool, but in this case it's
      unwieldy and confusing. Switched the instruction to use an enum instead. This has
      zero effect on code gen behavior in the JITs. In the LLInt, there is now more
      indirection, but that doesn't affect benchmarks.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/Instruction.h:
      (JSC::Instruction::Instruction):
      (Instruction):
      * bytecode/SpecialPointer.cpp: Added.
      (JSC):
      (JSC::actualPointerFor):
      * bytecode/SpecialPointer.h: Added.
      (JSC):
      (JSC::pointerIsFunction):
      (JSC::pointerIsCell):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
      (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_jneq_ptr):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::emit_op_jneq_ptr):
      * llint/LowLevelInterpreter32_64.asm:
      * llint/LowLevelInterpreter64.asm:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      (JSC):
      * runtime/JSGlobalObject.h:
      (JSGlobalObject):
      (JSC::JSGlobalObject::actualPointerFor):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1271fa3a