1. 24 Jul, 2013 1 commit
    • oliver@apple.com's avatar
      fourthTier: DFG should support op_in and it should use patching to make it fast · b3e5acbf
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=117385
      
      Source/JavaScriptCore:
      
      Reviewed by Geoffrey Garen.
      
      Implement op_in in the DFG and give it patching. The code we generate is just
      a jump on the hot path, and the slow paths generate stubs and link the jump to
      them. I didn't want to bother with patching structures and load offsets and
      the like, although I probably could have.
      
      This is a ginormous speed-up on microbenchmarks for "in", obviously.
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::dumpAssumingJITType):
      (JSC::CodeBlock::resetStubInternal):
      (JSC::structureStubInfoLessThan):
      (JSC):
      (JSC::CodeBlock::sortStructureStubInfos):
      * bytecode/CodeBlock.h:
      (CodeBlock):
      * bytecode/StructureStubInfo.cpp:
      (JSC::StructureStubInfo::deref):
      (JSC::StructureStubInfo::visitWeakReferences):
      * bytecode/StructureStubInfo.h:
      (JSC::isInAccess):
      (JSC):
      (StructureStubInfo):
      (JSC::StructureStubInfo::initInList):
      * dfg/DFGAbstractState.cpp:
      (JSC::DFG::AbstractState::executeEffects):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGCCallHelpers.h:
      (JSC::DFG::CCallHelpers::setupResults):
      * dfg/DFGCapabilities.cpp:
      (JSC::DFG::capabilityLevel):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::fixupNode):
      * dfg/DFGGPRInfo.h:
      (JSC::DFG::JSValueRegs::payloadOnly):
      (JSValueRegs):
      (JSC::DFG::JSValueRegs::JSValueRegs):
      (JSC::DFG::JSValueRegs::operator!):
      (JSC::DFG::JSValueSource::operator!):
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::link):
      * dfg/DFGJITCompiler.h:
      (JSC::DFG::InRecord::InRecord):
      (InRecord):
      (DFG):
      (JITCompiler):
      (JSC::DFG::JITCompiler::addIn):
      * dfg/DFGNodeType.h:
      (DFG):
      * dfg/DFGOperations.cpp:
      * dfg/DFGOperations.h:
      * dfg/DFGPredictionPropagationPhase.cpp:
      (JSC::DFG::PredictionPropagationPhase::propagate):
      * dfg/DFGRepatch.cpp:
      (JSC::DFG::tryRepatchIn):
      (DFG):
      (JSC::DFG::dfgRepatchIn):
      (JSC::DFG::dfgResetIn):
      * dfg/DFGRepatch.h:
      (DFG):
      (JSC::DFG::dfgResetIn):
      * dfg/DFGSlowPathGenerator.h:
      (JSC::DFG::CallSlowPathGenerator::CallSlowPathGenerator):
      (JSC::DFG::CallSlowPathGenerator::tearDown):
      (JSC::DFG::CallResultAndNoArgumentsSlowPathGenerator::generateInternal):
      (JSC::DFG::CallResultAndOneArgumentSlowPathGenerator::generateInternal):
      (JSC::DFG::CallResultAndTwoArgumentsSlowPathGenerator::generateInternal):
      (JSC::DFG::CallResultAndThreeArgumentsSlowPathGenerator::generateInternal):
      (JSC::DFG::CallResultAndFourArgumentsSlowPathGenerator::generateInternal):
      (JSC::DFG::CallResultAndFiveArgumentsSlowPathGenerator::generateInternal):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compileIn):
      (DFG):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::extractResult):
      (DFG):
      (SpeculativeJIT):
      (JSC::DFG::SpeculativeJIT::callOperation):
      (JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheckSetResult):
      (JSC::DFG::SpeculativeJIT::appendCallSetResult):
      (JSC::DFG::JSValueOperand::tagGPR):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * runtime/JSCJSValue.cpp:
      (JSC::JSValue::dump):
      * runtime/JSString.h:
      (JSString):
      (JSC::JSString::tryGetValueImpl):
      (JSC):
      * runtime/Operations.h:
      (JSC::normalizePrototypeChainForChainAccess):
      
      Source/WTF:
      
      Reviewed by Geoffrey Garen.
      
      Now if you pass a null StringImpl* then something will still get printed instead
      of crashing. I figure that this is broadly useful for debug code, and I make use
      of it in the JSC portion of this patch.
      
      * wtf/PrintStream.cpp:
      (WTF::printInternal):
      
      LayoutTests:
      
      Reviewed by Geoffrey Garen.
      
      Test coverage for op_in performance.
      
      * fast/js/regress/in-four-cases-expected.txt: Added.
      * fast/js/regress/in-four-cases.html: Added.
      * fast/js/regress/in-one-case-false-expected.txt: Added.
      * fast/js/regress/in-one-case-false.html: Added.
      * fast/js/regress/in-one-case-true-expected.txt: Added.
      * fast/js/regress/in-one-case-true.html: Added.
      * fast/js/regress/in-two-cases-expected.txt: Added.
      * fast/js/regress/in-two-cases.html: Added.
      * fast/js/regress/script-tests/in-four-cases.js: Added.
      (foo):
      (bar):
      * fast/js/regress/script-tests/in-one-case-false.js: Added.
      (foo):
      (bar):
      * fast/js/regress/script-tests/in-one-case-true.js: Added.
      (foo):
      (bar):
      * fast/js/regress/script-tests/in-two-cases.js: Added.
      (foo):
      (bar):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b3e5acbf
  2. 23 Jan, 2013 1 commit
    • oliver@apple.com's avatar
      Replace ASSERT_NOT_REACHED with RELEASE_ASSERT_NOT_REACHED in JSC · 5598c181
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=107736
      
      Reviewed by Mark Hahnenberg.
      
      Mechanical change with no performance impact.
      
      * API/JSBlockAdaptor.mm:
      (BlockArgumentTypeDelegate::typeVoid):
      * API/JSCallbackObjectFunctions.h:
      (JSC::::construct):
      (JSC::::call):
      * API/JSScriptRef.cpp:
      * API/ObjCCallbackFunction.mm:
      (ArgumentTypeDelegate::typeVoid):
      * assembler/ARMv7Assembler.h:
      (JSC::ARMv7Assembler::link):
      (JSC::ARMv7Assembler::replaceWithLoad):
      (JSC::ARMv7Assembler::replaceWithAddressComputation):
      * assembler/MacroAssembler.h:
      (JSC::MacroAssembler::invert):
      * assembler/MacroAssemblerARM.h:
      (JSC::MacroAssemblerARM::countLeadingZeros32):
      (JSC::MacroAssemblerARM::divDouble):
      * assembler/MacroAssemblerMIPS.h:
      (JSC::MacroAssemblerMIPS::absDouble):
      (JSC::MacroAssemblerMIPS::replaceWithJump):
      (JSC::MacroAssemblerMIPS::maxJumpReplacementSize):
      * assembler/MacroAssemblerSH4.h:
      (JSC::MacroAssemblerSH4::absDouble):
      (JSC::MacroAssemblerSH4::replaceWithJump):
      (JSC::MacroAssemblerSH4::maxJumpReplacementSize):
      * assembler/SH4Assembler.h:
      (JSC::SH4Assembler::shllImm8r):
      (JSC::SH4Assembler::shlrImm8r):
      (JSC::SH4Assembler::cmplRegReg):
      (JSC::SH4Assembler::branch):
      * assembler/X86Assembler.h:
      (JSC::X86Assembler::replaceWithLoad):
      (JSC::X86Assembler::replaceWithAddressComputation):
      * bytecode/CallLinkInfo.cpp:
      (JSC::CallLinkInfo::unlink):
      * bytecode/CodeBlock.cpp:
      (JSC::debugHookName):
      (JSC::CodeBlock::printGetByIdOp):
      (JSC::CodeBlock::printGetByIdCacheStatus):
      (JSC::CodeBlock::visitAggregate):
      (JSC::CodeBlock::finalizeUnconditionally):
      (JSC::CodeBlock::usesOpcode):
      * bytecode/DataFormat.h:
      (JSC::needDataFormatConversion):
      * bytecode/ExitKind.cpp:
      (JSC::exitKindToString):
      (JSC::exitKindIsCountable):
      * bytecode/MethodOfGettingAValueProfile.cpp:
      (JSC::MethodOfGettingAValueProfile::getSpecFailBucket):
      * bytecode/Opcode.h:
      (JSC::opcodeLength):
      * bytecode/PolymorphicPutByIdList.cpp:
      (JSC::PutByIdAccess::fromStructureStubInfo):
      (JSC::PutByIdAccess::visitWeak):
      * bytecode/StructureStubInfo.cpp:
      (JSC::StructureStubInfo::deref):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::ResolveResult::checkValidity):
      (JSC::BytecodeGenerator::emitGetLocalVar):
      (JSC::BytecodeGenerator::beginSwitch):
      * bytecompiler/NodesCodegen.cpp:
      (JSC::BinaryOpNode::emitBytecode):
      (JSC::emitReadModifyAssignment):
      * dfg/DFGAbstractState.cpp:
      (JSC::DFG::AbstractState::execute):
      (JSC::DFG::AbstractState::mergeStateAtTail):
      (JSC::DFG::AbstractState::mergeToSuccessors):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::makeSafe):
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGCFGSimplificationPhase.cpp:
      (JSC::DFG::CFGSimplificationPhase::fixPossibleGetLocal):
      (JSC::DFG::CFGSimplificationPhase::fixTailOperand):
      * dfg/DFGCSEPhase.cpp:
      (JSC::DFG::CSEPhase::setLocalStoreElimination):
      * dfg/DFGCapabilities.cpp:
      (JSC::DFG::canHandleOpcodes):
      * dfg/DFGCommon.h:
      (JSC::DFG::useKindToString):
      * dfg/DFGDoubleFormatState.h:
      (JSC::DFG::mergeDoubleFormatStates):
      (JSC::DFG::doubleFormatStateToString):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::blessArrayOperation):
      * dfg/DFGGraph.h:
      (JSC::DFG::Graph::clobbersWorld):
      * dfg/DFGNode.h:
      (JSC::DFG::Node::valueOfJSConstant):
      (JSC::DFG::Node::successor):
      * dfg/DFGNodeFlags.cpp:
      (JSC::DFG::nodeFlagsAsString):
      * dfg/DFGNodeType.h:
      (JSC::DFG::defaultFlags):
      * dfg/DFGRepatch.h:
      (JSC::DFG::dfgResetGetByID):
      (JSC::DFG::dfgResetPutByID):
      * dfg/DFGSlowPathGenerator.h:
      (JSC::DFG::SlowPathGenerator::call):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::silentSavePlanForGPR):
      (JSC::DFG::SpeculativeJIT::silentSpill):
      (JSC::DFG::SpeculativeJIT::silentFill):
      (JSC::DFG::SpeculativeJIT::checkArray):
      (JSC::DFG::SpeculativeJIT::checkGeneratedTypeForToInt32):
      (JSC::DFG::SpeculativeJIT::compileValueToInt32):
      (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
      (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::bitOp):
      (JSC::DFG::SpeculativeJIT::shiftOp):
      (JSC::DFG::SpeculativeJIT::integerResult):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::fillInteger):
      (JSC::DFG::SpeculativeJIT::fillDouble):
      (JSC::DFG::SpeculativeJIT::fillJSValue):
      (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
      (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
      (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
      (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::fillInteger):
      (JSC::DFG::SpeculativeJIT::fillDouble):
      (JSC::DFG::SpeculativeJIT::fillJSValue):
      (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
      (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
      (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
      (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGStructureCheckHoistingPhase.cpp:
      (JSC::DFG::StructureCheckHoistingPhase::run):
      * dfg/DFGValueSource.h:
      (JSC::DFG::ValueSource::valueRecovery):
      * dfg/DFGVariableEvent.cpp:
      (JSC::DFG::VariableEvent::dump):
      * dfg/DFGVariableEventStream.cpp:
      (JSC::DFG::VariableEventStream::reconstruct):
      * heap/BlockAllocator.h:
      (JSC::BlockAllocator::regionSetFor):
      * heap/GCThread.cpp:
      (JSC::GCThread::gcThreadMain):
      * heap/MarkedBlock.cpp:
      (JSC::MarkedBlock::sweepHelper):
      * heap/MarkedBlock.h:
      (JSC::MarkedBlock::isLive):
      * interpreter/CallFrame.h:
      (JSC::ExecState::inlineCallFrame):
      * interpreter/Interpreter.cpp:
      (JSC::getCallerInfo):
      (JSC::getStackFrameCodeType):
      (JSC::Interpreter::execute):
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FixedVMPoolExecutableAllocator::notifyPageIsFree):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompileMainPass):
      (JSC::JIT::privateCompileSlowCases):
      (JSC::JIT::privateCompile):
      * jit/JITArithmetic.cpp:
      (JSC::JIT::emitSlow_op_mod):
      * jit/JITArithmetic32_64.cpp:
      (JSC::JIT::emitBinaryDoubleOp):
      (JSC::JIT::emitSlow_op_mod):
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::isDirectPutById):
      * jit/JITStubs.cpp:
      (JSC::getPolymorphicAccessStructureListSlot):
      (JSC::DEFINE_STUB_FUNCTION):
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::jitCompileAndSetHeuristics):
      * parser/Lexer.cpp:
      (JSC::::lex):
      * parser/Nodes.h:
      (JSC::ExpressionNode::emitBytecodeInConditionContext):
      * parser/Parser.h:
      (JSC::Parser::getTokenName):
      (JSC::Parser::updateErrorMessageSpecialCase):
      * parser/SyntaxChecker.h:
      (JSC::SyntaxChecker::operatorStackPop):
      * runtime/Arguments.cpp:
      (JSC::Arguments::tearOffForInlineCallFrame):
      * runtime/DatePrototype.cpp:
      (JSC::formatLocaleDate):
      * runtime/Executable.cpp:
      (JSC::samplingDescription):
      * runtime/Executable.h:
      (JSC::ScriptExecutable::unlinkCalls):
      * runtime/Identifier.cpp:
      (JSC):
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::getCallData):
      * runtime/JSArray.cpp:
      (JSC::JSArray::push):
      (JSC::JSArray::sort):
      * runtime/JSCell.cpp:
      (JSC::JSCell::defaultValue):
      (JSC::JSCell::getOwnPropertyNames):
      (JSC::JSCell::getOwnNonIndexPropertyNames):
      (JSC::JSCell::className):
      (JSC::JSCell::getPropertyNames):
      (JSC::JSCell::customHasInstance):
      (JSC::JSCell::putDirectVirtual):
      (JSC::JSCell::defineOwnProperty):
      (JSC::JSCell::getOwnPropertyDescriptor):
      * runtime/JSCell.h:
      (JSCell):
      * runtime/JSNameScope.cpp:
      (JSC::JSNameScope::put):
      * runtime/JSObject.cpp:
      (JSC::JSObject::getOwnPropertySlotByIndex):
      (JSC::JSObject::putByIndex):
      (JSC::JSObject::ensureArrayStorageSlow):
      (JSC::JSObject::deletePropertyByIndex):
      (JSC::JSObject::getOwnPropertyNames):
      (JSC::JSObject::putByIndexBeyondVectorLength):
      (JSC::JSObject::putDirectIndexBeyondVectorLength):
      (JSC::JSObject::getOwnPropertyDescriptor):
      * runtime/JSObject.h:
      (JSC::JSObject::canGetIndexQuickly):
      (JSC::JSObject::getIndexQuickly):
      (JSC::JSObject::tryGetIndexQuickly):
      (JSC::JSObject::canSetIndexQuickly):
      (JSC::JSObject::canSetIndexQuicklyForPutDirect):
      (JSC::JSObject::setIndexQuickly):
      (JSC::JSObject::initializeIndex):
      (JSC::JSObject::hasSparseMap):
      (JSC::JSObject::inSparseIndexingMode):
      * runtime/JSScope.cpp:
      (JSC::JSScope::isDynamicScope):
      * runtime/JSSymbolTableObject.cpp:
      (JSC::JSSymbolTableObject::putDirectVirtual):
      * runtime/JSSymbolTableObject.h:
      (JSSymbolTableObject):
      * runtime/LiteralParser.cpp:
      (JSC::::parse):
      * runtime/RegExp.cpp:
      (JSC::RegExp::compile):
      (JSC::RegExp::compileMatchOnly):
      * runtime/StructureTransitionTable.h:
      (JSC::newIndexingType):
      * tools/CodeProfile.cpp:
      (JSC::CodeProfile::sample):
      * yarr/YarrCanonicalizeUCS2.h:
      (JSC::Yarr::getCanonicalPair):
      (JSC::Yarr::areCanonicallyEquivalent):
      * yarr/YarrInterpreter.cpp:
      (JSC::Yarr::Interpreter::matchCharacterClass):
      (JSC::Yarr::Interpreter::matchBackReference):
      (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
      (JSC::Yarr::Interpreter::matchParentheses):
      (JSC::Yarr::Interpreter::backtrackParentheses):
      (JSC::Yarr::Interpreter::matchDisjunction):
      * yarr/YarrJIT.cpp:
      (JSC::Yarr::YarrGenerator::generateTerm):
      (JSC::Yarr::YarrGenerator::backtrackTerm):
      * yarr/YarrParser.h:
      (JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary):
      (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference):
      * yarr/YarrPattern.cpp:
      (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5598c181
  3. 30 Aug, 2012 1 commit
    • ggaren@apple.com's avatar
      Use one object instead of two for closures, eliminating ScopeChainNode · b11e7874
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=95501
      
      Reviewed by Filip Pizlo.
      
      ../JavaScriptCore: 
      
      This patch removes ScopeChainNode, and moves all the data and related
      functions that used to be in ScopeChainNode into JSScope.
      
      Most of this patch is mechanical changes to use a JSScope* where we used
      to use a ScopeChainNode*. I've only specifically commented about items
      that were non-mechanical.
      
      * runtime/Completion.cpp:
      (JSC::evaluate):
      * runtime/Completion.h: Don't require an explicit scope chain argument
      when evaluating code. Clients never wanted anything other than the
      global scope, and other arbitrary scopes probably wouldn't work
      correctly, anyway.
      
      * runtime/JSScope.cpp:
      * runtime/JSScope.h:
      (JSC::JSScope::JSScope): JSScope now requires the data we used to pass to
      ScopeChainNode, so it can link itself into the scope chain correctly.
      
      * runtime/JSWithScope.h:
      (JSC::JSWithScope::create):
      (JSC::JSWithScope::JSWithScope): JSWithScope gets an extra constructor
      for specifically supplying your own scope chain. The DOM needs this
      interface for setting up the scope chain for certain event handlers.
      Other clients always just push the JSWithScope to the head of the current
      scope chain.
      
      ../WebCore: 
      
      Mechanical changes to update for JSC interface changes.
      
      ../WebKit/mac: 
      
      Mechanical change to update for JSC interface change.
      
      ../WebKit/qt: 
      
      Mechanical change to update for JSC interface change.
      
      * Api/qwebelement.cpp:
      (QWebElement::evaluateJavaScript):
      
      ../WebKit2: 
      
      Mechanical changes to update for JSC interface change.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b11e7874
  4. 11 Apr, 2012 1 commit
  5. 11 Feb, 2012 1 commit
    • fpizlo@apple.com's avatar
      DFG should have polymorphic put_by_id caching · 40cae3a4
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=78062
      <rdar://problem/10326439> <rdar://problem/10824839>
      
      Reviewed by Oliver Hunt.
              
      Implemented polymorphic put_by_id caching in the DFG, and added much of the
      machinery that would be needed to implement it in the old JIT as well.
              
      I decided against using the old PolymorphicAccessStructureList mechanism as
      this didn't quite fit with put_by_id. In particular, I wanted the ability to
      have one list that captured all relevant cases (including proto put_by_id
      if we ever decided to do it). And I wanted the code to have better
      encapsulation. And I didn't want to get confused by the fact that the
      original (non-list) put_by_id cache may itself consist of a stub routine.
              
      This code is still sub-optimal (for example adding a replace to a list whose
      previous elements are all transitions should just repatch the original code,
      but here it will generate a stub) but it already generates a >20% speed-up
      on V8-splay, leading to a 2% win overall in splay. Neutral elsewhere.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/PolymorphicPutByIdList.cpp: Added.
      (JSC):
      (JSC::PutByIdAccess::fromStructureStubInfo):
      (JSC::PutByIdAccess::visitWeak):
      (JSC::PolymorphicPutByIdList::PolymorphicPutByIdList):
      (JSC::PolymorphicPutByIdList::from):
      (JSC::PolymorphicPutByIdList::~PolymorphicPutByIdList):
      (JSC::PolymorphicPutByIdList::isFull):
      (JSC::PolymorphicPutByIdList::isAlmostFull):
      (JSC::PolymorphicPutByIdList::addAccess):
      (JSC::PolymorphicPutByIdList::visitWeak):
      * bytecode/PolymorphicPutByIdList.h: Added.
      (JSC):
      (PutByIdAccess):
      (JSC::PutByIdAccess::PutByIdAccess):
      (JSC::PutByIdAccess::transition):
      (JSC::PutByIdAccess::replace):
      (JSC::PutByIdAccess::isSet):
      (JSC::PutByIdAccess::operator!):
      (JSC::PutByIdAccess::type):
      (JSC::PutByIdAccess::isTransition):
      (JSC::PutByIdAccess::isReplace):
      (JSC::PutByIdAccess::oldStructure):
      (JSC::PutByIdAccess::structure):
      (JSC::PutByIdAccess::newStructure):
      (JSC::PutByIdAccess::chain):
      (JSC::PutByIdAccess::stubRoutine):
      (PolymorphicPutByIdList):
      (JSC::PolymorphicPutByIdList::currentSlowPathTarget):
      (JSC::PolymorphicPutByIdList::isEmpty):
      (JSC::PolymorphicPutByIdList::size):
      (JSC::PolymorphicPutByIdList::at):
      (JSC::PolymorphicPutByIdList::operator[]):
      (JSC::PolymorphicPutByIdList::kind):
      * bytecode/PutKind.h: Added.
      (JSC):
      * bytecode/StructureStubInfo.cpp:
      (JSC::StructureStubInfo::deref):
      (JSC::StructureStubInfo::visitWeakReferences):
      * bytecode/StructureStubInfo.h:
      (JSC):
      (JSC::isPutByIdAccess):
      (JSC::StructureStubInfo::initPutByIdList):
      (StructureStubInfo):
      (JSC::StructureStubInfo::reset):
      * dfg/DFGOperations.cpp:
      * dfg/DFGOperations.h:
      (DFG):
      * dfg/DFGRepatch.cpp:
      (JSC::DFG::appropriateGenericPutByIdFunction):
      (JSC::DFG::appropriateListBuildingPutByIdFunction):
      (DFG):
      (JSC::DFG::emitPutReplaceStub):
      (JSC::DFG::emitPutTransitionStub):
      (JSC::DFG::tryCachePutByID):
      (JSC::DFG::dfgRepatchPutByID):
      (JSC::DFG::tryBuildPutByIdList):
      (JSC::DFG::dfgBuildPutByIdList):
      (JSC::DFG::dfgResetPutByID):
      * dfg/DFGRepatch.h:
      (DFG):
      * runtime/WriteBarrier.h:
      (WriteBarrierBase):
      (JSC::WriteBarrierBase::copyFrom):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      40cae3a4
  6. 30 Nov, 2011 1 commit
    • fpizlo@apple.com's avatar
      Resetting a put_by_id inline cache should preserve the "isDirect" bit · d13cf48b
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=73375
      
      Reviewed by Gavin Barraclough.
              
      For the replace case, we can find out if it was direct by looking at the
      slow call. For the transition case, we explicitly remember if it was
      direct.
      
      * bytecode/CodeBlock.cpp:
      (JSC::printStructureStubInfo):
      * bytecode/StructureStubInfo.cpp:
      (JSC::StructureStubInfo::deref):
      (JSC::StructureStubInfo::visitWeakReferences):
      * bytecode/StructureStubInfo.h:
      (JSC::isPutByIdAccess):
      (JSC::StructureStubInfo::initPutByIdTransition):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGRepatch.cpp:
      (JSC::DFG::tryCachePutByID):
      * jit/JIT.h:
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::resetPatchPutById):
      (JSC::JIT::isDirectPutById):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::resetPatchPutById):
      * jit/JITStubs.cpp:
      (JSC::JITThunks::tryCachePutByID):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@101457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d13cf48b
  7. 20 Nov, 2011 1 commit
    • fpizlo@apple.com's avatar
      Inline caches that refer to otherwise dead objects should be cleared · a147a4d3
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=72311
      
      Reviewed by Geoff Garen.
      
      DFG code blocks now participate in the weak reference harvester fixpoint
      so that they only consider themselves to be live if either they are
      currently executing, or their owner is live and all of their weak references
      are live. If not, the relevant code blocks are jettisoned.
      
      Inline caches in both the old JIT and the DFG are now cleared if any of
      their references are not marked at the end of a GC.
      
      This is performance-neutral on SunSpider, V8, and Kraken. With the clear-
      all-code-on-GC policy that we currently have, it shows a slight reduction
      in memory usage. If we turn that policy off, it's pretty easy to come up
      with an example program that will cause ToT to experience linear heap
      growth, while with this patch, the heap stays small and remains at a
      constant size.
      
      * assembler/ARMv7Assembler.h:
      (JSC::ARMv7Assembler::readCallTarget):
      * assembler/MacroAssemblerARMv7.h:
      (JSC::MacroAssemblerARMv7::readCallTarget):
      * assembler/MacroAssemblerX86.h:
      (JSC::MacroAssemblerX86::readCallTarget):
      * assembler/MacroAssemblerX86_64.h:
      (JSC::MacroAssemblerX86_64::readCallTarget):
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::visitAggregate):
      (JSC::CodeBlock::performTracingFixpointIteration):
      (JSC::CodeBlock::visitWeakReferences):
      (JSC::CodeBlock::finalizeUnconditionally):
      (JSC::CodeBlock::stronglyVisitStrongReferences):
      (JSC::MethodCallLinkInfo::reset):
      (JSC::ProgramCodeBlock::jettison):
      (JSC::EvalCodeBlock::jettison):
      (JSC::FunctionCodeBlock::jettison):
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::reoptimize):
      (JSC::CodeBlock::shouldImmediatelyAssumeLivenessDuringScan):
      * bytecode/Instruction.h:
      (JSC::PolymorphicAccessStructureList::visitWeak):
      * bytecode/StructureStubInfo.cpp:
      (JSC::StructureStubInfo::visitWeakReferences):
      * bytecode/StructureStubInfo.h:
      (JSC::isGetByIdAccess):
      (JSC::isPutByIdAccess):
      (JSC::StructureStubInfo::reset):
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::link):
      * dfg/DFGOperations.cpp:
      * dfg/DFGRepatch.cpp:
      (JSC::DFG::dfgRepatchByIdSelfAccess):
      (JSC::DFG::dfgResetGetByID):
      (JSC::DFG::dfgResetPutByID):
      * dfg/DFGRepatch.h:
      (JSC::DFG::dfgResetGetByID):
      (JSC::DFG::dfgResetPutByID):
      * jit/JIT.h:
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::resetPatchGetById):
      (JSC::JIT::resetPatchPutById):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::resetPatchGetById):
      (JSC::JIT::resetPatchPutById):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * jit/JITWriteBarrier.h:
      (JSC::JITWriteBarrierBase::clearToMaxUnsigned):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a147a4d3
  8. 25 May, 2011 1 commit
  9. 21 Apr, 2011 1 commit
    • oliver@apple.com's avatar
      2011-04-21 Oliver Hunt <oliver@apple.com> · 433d02f9
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Start moving to a general visitor pattern for GC traversal
              https://bugs.webkit.org/show_bug.cgi?id=59141
      
              This is just a rename:
                  markChildren -> visitChildren
                  markAggregate -> visitAggregate
                  markStack -> visitor
                  MarkStack -> typedef'd to SlotVisitor
      
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObjectData::visitChildren):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
              (JSC::JSCallbackObject::visitChildren):
              * JavaScriptCore.exp:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::visitStructures):
              (JSC::EvalCodeCache::visitAggregate):
              (JSC::CodeBlock::visitAggregate):
              * bytecode/CodeBlock.h:
              * bytecode/EvalCodeCache.h:
              * bytecode/Instruction.h:
              (JSC::PolymorphicAccessStructureList::visitAggregate):
              * bytecode/StructureStubInfo.cpp:
              (JSC::StructureStubInfo::visitAggregate):
              * bytecode/StructureStubInfo.h:
              * debugger/DebuggerActivation.cpp:
              (JSC::DebuggerActivation::visitChildren):
              * debugger/DebuggerActivation.h:
              * heap/HandleHeap.cpp:
              (JSC::WeakHandleOwner::isReachableFromOpaqueRoots):
              (JSC::HandleHeap::markStrongHandles):
              (JSC::HandleHeap::markWeakHandles):
              * heap/HandleHeap.h:
              * heap/HandleStack.cpp:
              (JSC::HandleStack::mark):
              * heap/HandleStack.h:
              * heap/Heap.cpp:
              (JSC::Heap::markProtectedObjects):
              (JSC::Heap::markTempSortVectors):
              (JSC::Heap::markRoots):
              * heap/Heap.h:
              * heap/MarkStack.cpp:
              (JSC::MarkStack::visitChildren):
              (JSC::MarkStack::drain):
              * heap/MarkStack.h:
              (JSC::HeapRootVisitor::HeapRootVisitor):
              (JSC::HeapRootVisitor::mark):
              (JSC::HeapRootVisitor::visitor):
              * heap/MarkedSpace.h:
              * runtime/ArgList.cpp:
              (JSC::MarkedArgumentBuffer::markLists):
              * runtime/ArgList.h:
              * runtime/Arguments.cpp:
              (JSC::Arguments::visitChildren):
              * runtime/Arguments.h:
              * runtime/Executable.cpp:
              (JSC::EvalExecutable::visitChildren):
              (JSC::ProgramExecutable::visitChildren):
              (JSC::FunctionExecutable::visitChildren):
              * runtime/Executable.h:
              * runtime/GetterSetter.cpp:
              (JSC::GetterSetter::visitChildren):
              * runtime/GetterSetter.h:
              (JSC::GetterSetter::createStructure):
              * runtime/JSAPIValueWrapper.h:
              (JSC::JSAPIValueWrapper::createStructure):
              * runtime/JSActivation.cpp:
              (JSC::JSActivation::visitChildren):
              * runtime/JSActivation.h:
              * runtime/JSArray.cpp:
              (JSC::JSArray::visitChildren):
              * runtime/JSArray.h:
              (JSC::JSArray::visitDirect):
              * runtime/JSCell.h:
              (JSC::JSCell::JSCell::visitChildren):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::visitChildren):
              * runtime/JSFunction.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::visitIfNeeded):
              (JSC::JSGlobalObject::visitChildren):
              * runtime/JSGlobalObject.h:
              * runtime/JSONObject.cpp:
              * runtime/JSObject.cpp:
              (JSC::JSObject::visitChildren):
              * runtime/JSObject.h:
              (JSC::JSObject::visitDirect):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::visitChildren):
              * runtime/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::createStructure):
              * runtime/JSStaticScopeObject.cpp:
              (JSC::JSStaticScopeObject::visitChildren):
              * runtime/JSStaticScopeObject.h:
              * runtime/JSTypeInfo.h:
              (JSC::TypeInfo::TypeInfo):
              (JSC::TypeInfo::overridesVisitChildren):
              * runtime/JSWrapperObject.cpp:
              (JSC::JSWrapperObject::visitChildren):
              * runtime/JSWrapperObject.h:
              * runtime/JSZombie.h:
              (JSC::JSZombie::visitChildren):
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::visitChildren):
              * runtime/NativeErrorConstructor.h:
              * runtime/RegExpObject.cpp:
              (JSC::RegExpObject::visitChildren):
              * runtime/RegExpObject.h:
              * runtime/ScopeChain.cpp:
              (JSC::ScopeChainNode::visitChildren):
              * runtime/ScopeChain.h:
              * runtime/SmallStrings.cpp:
              (JSC::SmallStrings::visitChildren):
              * runtime/SmallStrings.h:
              * runtime/Structure.cpp:
              (JSC::Structure::Structure):
              (JSC::Structure::visitChildren):
              * runtime/Structure.h:
              * runtime/StructureChain.cpp:
              (JSC::StructureChain::visitChildren):
              * runtime/StructureChain.h:
              (JSC::StructureChain::createStructure):
      2011-04-21  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Start moving to a general visitor pattern for GC traversal
              https://bugs.webkit.org/show_bug.cgi?id=59141
      
              This is just a rename:
                  markChildren -> visitChildren
                  markAggregate -> visitAggregate
                  markStack -> visitor
                  MarkStack -> typedef'd to SlotVisitor
      
              * UserObjectImp.cpp:
              (UserObjectImp::visitChildren):
      2011-04-21  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Start moving to a general visitor pattern for GC traversal
              https://bugs.webkit.org/show_bug.cgi?id=59141
      
              This is just a rename:
                  markChildren -> visitChildren
                  markAggregate -> visitAggregate
                  markStack -> visitor
                  MarkStack -> typedef'd to SlotVisitor
      
              * bindings/js/JSAttrCustom.cpp:
              (WebCore::JSAttr::visitChildren):
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::constructAudio):
              * bindings/js/JSCSSRuleCustom.cpp:
              (WebCore::JSCSSRule::visitChildren):
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
              (WebCore::JSCSSStyleDeclaration::visitChildren):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::visitActiveObjectsForContext):
              (WebCore::markDOMObjectWrapper):
              * bindings/js/JSDOMBinding.h:
              * bindings/js/JSDOMGlobalObject.cpp:
              (WebCore::JSDOMGlobalObject::visitChildren):
              * bindings/js/JSDOMGlobalObject.h:
              * bindings/js/JSDOMImplementationCustom.cpp:
              (WebCore::JSDOMImplementation::visitChildren):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::visitChildren):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::visitChildren):
              * bindings/js/JSDOMWindowShell.h:
              * bindings/js/JSDocumentCustom.cpp:
              (WebCore::JSDocument::visitChildren):
              * bindings/js/JSElementCustom.cpp:
              (WebCore::JSElement::visitChildren):
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSEventListener::markJSFunction):
              * bindings/js/JSEventListener.h:
              * bindings/js/JSHTMLCanvasElementCustom.cpp:
              (WebCore::JSHTMLCanvasElement::visitChildren):
              * bindings/js/JSHTMLLinkElementCustom.cpp:
              (WebCore::JSHTMLLinkElement::visitChildren):
              * bindings/js/JSHTMLStyleElementCustom.cpp:
              (WebCore::JSHTMLStyleElement::visitChildren):
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::constructImage):
              * bindings/js/JSJavaScriptAudioNodeCustom.cpp:
              (WebCore::JSJavaScriptAudioNode::visitChildren):
              * bindings/js/JSMessageChannelCustom.cpp:
              (WebCore::JSMessageChannel::visitChildren):
              * bindings/js/JSMessagePortCustom.cpp:
              (WebCore::JSMessagePort::visitChildren):
              * bindings/js/JSNamedNodeMapCustom.cpp:
              (WebCore::JSNamedNodeMapOwner::isReachableFromOpaqueRoots):
              (WebCore::JSNamedNodeMap::visitChildren):
              * bindings/js/JSNavigatorCustom.cpp:
              (WebCore::JSNavigator::visitChildren):
              * bindings/js/JSNodeCustom.cpp:
              (WebCore::isObservable):
              (WebCore::isReachableFromDOM):
              (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
              (WebCore::JSNode::visitChildren):
              * bindings/js/JSNodeCustom.h:
              * bindings/js/JSNodeFilterCondition.cpp:
              (WebCore::JSNodeFilterCondition::WeakOwner::isReachableFromOpaqueRoots):
              * bindings/js/JSNodeFilterCondition.h:
              * bindings/js/JSNodeFilterCustom.cpp:
              (WebCore::JSNodeFilter::visitChildren):
              * bindings/js/JSNodeIteratorCustom.cpp:
              (WebCore::JSNodeIterator::visitChildren):
              * bindings/js/JSNodeListCustom.cpp:
              (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
              * bindings/js/JSProcessingInstructionCustom.cpp:
              (WebCore::JSProcessingInstruction::visitChildren):
              * bindings/js/JSSVGElementInstanceCustom.cpp:
              (WebCore::JSSVGElementInstance::visitChildren):
              * bindings/js/JSSharedWorkerCustom.cpp:
              (WebCore::JSSharedWorker::visitChildren):
              * bindings/js/JSStyleSheetCustom.cpp:
              (WebCore::JSStyleSheet::visitChildren):
              * bindings/js/JSTreeWalkerCustom.cpp:
              (WebCore::JSTreeWalker::visitChildren):
              * bindings/js/JSWebGLRenderingContextCustom.cpp:
              (WebCore::JSWebGLRenderingContext::visitChildren):
              * bindings/js/JSWebKitAnimationListCustom.cpp:
              (WebCore::JSWebKitAnimationList::visitChildren):
              * bindings/js/JSWorkerContextCustom.cpp:
              (WebCore::JSWorkerContext::visitChildren):
              * bindings/js/JSXMLHttpRequestCustom.cpp:
              (WebCore::JSXMLHttpRequest::visitChildren):
              * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
              (WebCore::JSXMLHttpRequestUpload::visitChildren):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/qt/qt_instance.cpp:
              (JSC::Bindings::QtRuntimeObject::visitChildren):
              (JSC::Bindings::QtInstance::markAggregate):
              * bridge/qt/qt_instance.h:
              * bridge/qt/qt_pixmapruntime.cpp:
              * bridge/qt/qt_runtime.cpp:
              (JSC::Bindings::QtRuntimeMetaMethod::visitChildren):
              * bridge/qt/qt_runtime.h:
              * dom/EventListener.h:
              (WebCore::EventListener::visitJSFunction):
              * dom/EventTarget.h:
              (WebCore::EventTarget::visitJSEventListeners):
              * dom/Node.h:
              * dom/NodeFilterCondition.h:
              (WebCore::NodeFilterCondition::visitAggregate):
              * page/DOMWindow.h:
              * workers/WorkerContext.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      433d02f9
  10. 15 Apr, 2011 2 commits
  11. 13 Apr, 2011 1 commit
    • oliver@apple.com's avatar
      2011-04-13 Oliver Hunt <oliver@apple.com> · bb8da910
      oliver@apple.com authored
              Reviewed by Geoff Garen.
      
              GC allocate Structure
              https://bugs.webkit.org/show_bug.cgi?id=58483
      
              Additional structures are allocated beyond the expected threshold
              so we preflight the test to get them allocated.
      
              * fast/dom/gc-10.html:
      2011-04-13  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoff Garen.
      
              GC allocate Structure
              https://bugs.webkit.org/show_bug.cgi?id=58483
      
              Turn Structure into a GC allocated object.  Most of this patch
              is the mechanical change of replacing variations on RefPtr<Structure>
              with either Structure* (for arguments and locals), WriteBarrier<Structure>
              for the few cases where Structures are held by GC allocated objects
              and Strong<Structure> for the root structure objects in GlobalData.
      
              * API/JSCallbackConstructor.cpp:
              (JSC::JSCallbackConstructor::JSCallbackConstructor):
              * API/JSCallbackConstructor.h:
              (JSC::JSCallbackConstructor::createStructure):
              * API/JSCallbackFunction.h:
              (JSC::JSCallbackFunction::createStructure):
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObject::createStructure):
              * API/JSCallbackObjectFunctions.h:
              (JSC::::JSCallbackObject):
              * API/JSContextRef.cpp:
              * JavaScriptCore.JSVALUE32_64only.exp:
              * JavaScriptCore.JSVALUE64only.exp:
              * JavaScriptCore.exp:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::~CodeBlock):
              (JSC::CodeBlock::markStructures):
              (JSC::CodeBlock::markAggregate):
              * bytecode/CodeBlock.h:
              (JSC::MethodCallLinkInfo::setSeen):
              (JSC::GlobalResolveInfo::GlobalResolveInfo):
              * bytecode/Instruction.h:
              (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
              (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
              (JSC::PolymorphicAccessStructureList::markAggregate):
              (JSC::Instruction::Instruction):
              * bytecode/StructureStubInfo.cpp:
              (JSC::StructureStubInfo::deref):
              (JSC::StructureStubInfo::markAggregate):
              * bytecode/StructureStubInfo.h:
              (JSC::StructureStubInfo::initGetByIdSelf):
              (JSC::StructureStubInfo::initGetByIdProto):
              (JSC::StructureStubInfo::initGetByIdChain):
              (JSC::StructureStubInfo::initPutByIdTransition):
              (JSC::StructureStubInfo::initPutByIdReplace):
              * debugger/DebuggerActivation.cpp:
              (JSC::DebuggerActivation::DebuggerActivation):
              * debugger/DebuggerActivation.h:
              (JSC::DebuggerActivation::createStructure):
              * heap/Handle.h:
              * heap/MarkStack.cpp:
              (JSC::MarkStack::markChildren):
              (JSC::MarkStack::drain):
              * heap/MarkedBlock.cpp:
              (JSC::MarkedBlock::MarkedBlock):
              (JSC::MarkedBlock::sweep):
              * heap/Strong.h:
              (JSC::Strong::Strong):
              (JSC::Strong::set):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::resolveGlobal):
              (JSC::Interpreter::resolveGlobalDynamic):
              (JSC::Interpreter::tryCachePutByID):
              (JSC::Interpreter::uncachePutByID):
              (JSC::Interpreter::tryCacheGetByID):
              (JSC::Interpreter::uncacheGetByID):
              (JSC::Interpreter::privateExecute):
              * jit/JIT.h:
              * jit/JITPropertyAccess.cpp:
              (JSC::JIT::privateCompilePutByIdTransition):
              (JSC::JIT::patchMethodCallProto):
              (JSC::JIT::privateCompileGetByIdProto):
              (JSC::JIT::privateCompileGetByIdSelfList):
              (JSC::JIT::privateCompileGetByIdProtoList):
              (JSC::JIT::privateCompileGetByIdChainList):
              (JSC::JIT::privateCompileGetByIdChain):
              * jit/JITPropertyAccess32_64.cpp:
              (JSC::JIT::privateCompilePutByIdTransition):
              (JSC::JIT::patchMethodCallProto):
              (JSC::JIT::privateCompileGetByIdProto):
              (JSC::JIT::privateCompileGetByIdSelfList):
              (JSC::JIT::privateCompileGetByIdProtoList):
              (JSC::JIT::privateCompileGetByIdChainList):
              (JSC::JIT::privateCompileGetByIdChain):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCachePutByID):
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::DEFINE_STUB_FUNCTION):
              (JSC::getPolymorphicAccessStructureListSlot):
              * jit/JSInterfaceJIT.h:
              (JSC::JSInterfaceJIT::storePtrWithWriteBarrier):
              * jsc.cpp:
              (cleanupGlobalData):
              * runtime/Arguments.h:
              (JSC::Arguments::createStructure):
              (JSC::Arguments::Arguments):
              (JSC::JSActivation::copyRegisters):
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              (JSC::constructArrayWithSizeQuirk):
              * runtime/ArrayConstructor.h:
              * runtime/ArrayPrototype.cpp:
              (JSC::ArrayPrototype::ArrayPrototype):
              (JSC::arrayProtoFuncSplice):
              * runtime/ArrayPrototype.h:
              (JSC::ArrayPrototype::createStructure):
              * runtime/BatchedTransitionOptimizer.h:
              (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
              * runtime/BooleanConstructor.cpp:
              (JSC::BooleanConstructor::BooleanConstructor):
              * runtime/BooleanConstructor.h:
              * runtime/BooleanObject.cpp:
              (JSC::BooleanObject::BooleanObject):
              * runtime/BooleanObject.h:
              (JSC::BooleanObject::createStructure):
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              * runtime/BooleanPrototype.h:
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              * runtime/DateConstructor.h:
              * runtime/DateInstance.cpp:
              (JSC::DateInstance::DateInstance):
              * runtime/DateInstance.h:
              (JSC::DateInstance::createStructure):
              * runtime/DatePrototype.cpp:
              (JSC::DatePrototype::DatePrototype):
              * runtime/DatePrototype.h:
              (JSC::DatePrototype::createStructure):
              * runtime/Error.cpp:
              (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
              * runtime/ErrorConstructor.cpp:
              (JSC::ErrorConstructor::ErrorConstructor):
              * runtime/ErrorConstructor.h:
              * runtime/ErrorInstance.cpp:
              (JSC::ErrorInstance::ErrorInstance):
              (JSC::ErrorInstance::create):
              * runtime/ErrorInstance.h:
              (JSC::ErrorInstance::createStructure):
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * runtime/ErrorPrototype.h:
              * runtime/ExceptionHelpers.cpp:
              (JSC::InterruptedExecutionError::InterruptedExecutionError):
              (JSC::TerminatedExecutionError::TerminatedExecutionError):
              * runtime/Executable.cpp:
              * runtime/Executable.h:
              (JSC::ExecutableBase::ExecutableBase):
              (JSC::ExecutableBase::createStructure):
              (JSC::NativeExecutable::createStructure):
              (JSC::NativeExecutable::NativeExecutable):
              (JSC::ScriptExecutable::ScriptExecutable):
              (JSC::EvalExecutable::createStructure):
              (JSC::ProgramExecutable::createStructure):
              (JSC::FunctionExecutable::createStructure):
              * runtime/FunctionConstructor.cpp:
              (JSC::FunctionConstructor::FunctionConstructor):
              * runtime/FunctionConstructor.h:
              * runtime/FunctionPrototype.cpp:
              (JSC::FunctionPrototype::FunctionPrototype):
              * runtime/FunctionPrototype.h:
              (JSC::FunctionPrototype::createStructure):
              * runtime/GetterSetter.h:
              (JSC::GetterSetter::GetterSetter):
              (JSC::GetterSetter::createStructure):
              * runtime/InitializeThreading.cpp:
              (JSC::initializeThreadingOnce):
              * runtime/InternalFunction.cpp:
              (JSC::InternalFunction::InternalFunction):
              * runtime/InternalFunction.h:
              (JSC::InternalFunction::createStructure):
              * runtime/JSAPIValueWrapper.h:
              (JSC::JSAPIValueWrapper::createStructure):
              (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
              * runtime/JSActivation.cpp:
              (JSC::JSActivation::JSActivation):
              * runtime/JSActivation.h:
              (JSC::JSActivation::createStructure):
              * runtime/JSArray.cpp:
              (JSC::JSArray::JSArray):
              * runtime/JSArray.h:
              (JSC::JSArray::createStructure):
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::JSByteArray):
              (JSC::JSByteArray::createStructure):
              * runtime/JSByteArray.h:
              (JSC::JSByteArray::JSByteArray):
              * runtime/JSCell.cpp:
              (JSC::isZombie):
              * runtime/JSCell.h:
              (JSC::JSCell::JSCell::JSCell):
              (JSC::JSCell::JSCell::addressOfStructure):
              (JSC::JSCell::JSCell::structure):
              (JSC::JSCell::JSCell::markChildren):
              (JSC::JSCell::JSValue::isZombie):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              * runtime/JSFunction.h:
              (JSC::JSFunction::createStructure):
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::storeVPtrs):
              (JSC::JSGlobalData::JSGlobalData):
              (JSC::JSGlobalData::clearBuiltinStructures):
              (JSC::JSGlobalData::createLeaked):
              * runtime/JSGlobalData.h:
              (JSC::allocateGlobalHandle):
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::reset):
              (JSC::JSGlobalObject::markChildren):
              (JSC::JSGlobalObject::copyGlobalsFrom):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObject):
              (JSC::JSGlobalObject::createStructure):
              (JSC::Structure::prototypeChain):
              (JSC::Structure::isValid):
              (JSC::constructEmptyArray):
              * runtime/JSNotAnObject.h:
              (JSC::JSNotAnObject::JSNotAnObject):
              (JSC::JSNotAnObject::createStructure):
              * runtime/JSONObject.cpp:
              (JSC::JSONObject::JSONObject):
              * runtime/JSONObject.h:
              (JSC::JSONObject::createStructure):
              * runtime/JSObject.cpp:
              (JSC::JSObject::defineGetter):
              (JSC::JSObject::defineSetter):
              (JSC::JSObject::seal):
              (JSC::JSObject::freeze):
              (JSC::JSObject::preventExtensions):
              (JSC::JSObject::removeDirect):
              (JSC::JSObject::createInheritorID):
              * runtime/JSObject.h:
              (JSC::JSObject::createStructure):
              (JSC::JSObject::JSObject):
              (JSC::JSNonFinalObject::createStructure):
              (JSC::JSNonFinalObject::JSNonFinalObject):
              (JSC::JSFinalObject::create):
              (JSC::JSFinalObject::createStructure):
              (JSC::JSFinalObject::JSFinalObject):
              (JSC::constructEmptyObject):
              (JSC::createEmptyObjectStructure):
              (JSC::JSObject::~JSObject):
              (JSC::JSObject::setPrototype):
              (JSC::JSObject::setStructure):
              (JSC::JSObject::inheritorID):
              (JSC::JSObject::putDirectInternal):
              (JSC::JSObject::transitionTo):
              (JSC::JSObject::markChildrenDirect):
              * runtime/JSObjectWithGlobalObject.cpp:
              (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
              * runtime/JSObjectWithGlobalObject.h:
              (JSC::JSObjectWithGlobalObject::createStructure):
              (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
              (JSC::JSPropertyNameIterator::create):
              (JSC::JSPropertyNameIterator::get):
              * runtime/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::createStructure):
              (JSC::JSPropertyNameIterator::setCachedStructure):
              (JSC::Structure::setEnumerationCache):
              * runtime/JSStaticScopeObject.h:
              (JSC::JSStaticScopeObject::JSStaticScopeObject):
              (JSC::JSStaticScopeObject::createStructure):
              * runtime/JSString.h:
              (JSC::RopeBuilder::JSString):
              (JSC::RopeBuilder::createStructure):
              * runtime/JSType.h:
              * runtime/JSTypeInfo.h:
              (JSC::TypeInfo::TypeInfo):
              * runtime/JSValue.h:
              * runtime/JSVariableObject.h:
              (JSC::JSVariableObject::createStructure):
              (JSC::JSVariableObject::JSVariableObject):
              (JSC::JSVariableObject::copyRegisterArray):
              * runtime/JSWrapperObject.h:
              (JSC::JSWrapperObject::createStructure):
              (JSC::JSWrapperObject::JSWrapperObject):
              * runtime/JSZombie.cpp:
              * runtime/JSZombie.h:
              (JSC::JSZombie::JSZombie):
              (JSC::JSZombie::createStructure):
              * runtime/MathObject.cpp:
              (JSC::MathObject::MathObject):
              * runtime/MathObject.h:
              (JSC::MathObject::createStructure):
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              (JSC::NativeErrorConstructor::markChildren):
              * runtime/NativeErrorConstructor.h:
              (JSC::NativeErrorConstructor::createStructure):
              * runtime/NativeErrorPrototype.cpp:
              (JSC::NativeErrorPrototype::NativeErrorPrototype):
              * runtime/NativeErrorPrototype.h:
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::NumberConstructor):
              * runtime/NumberConstructor.h:
              (JSC::NumberConstructor::createStructure):
              * runtime/NumberObject.cpp:
              (JSC::NumberObject::NumberObject):
              * runtime/NumberObject.h:
              (JSC::NumberObject::createStructure):
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * runtime/NumberPrototype.h:
              * runtime/ObjectConstructor.cpp:
              (JSC::ObjectConstructor::ObjectConstructor):
              * runtime/ObjectConstructor.h:
              (JSC::ObjectConstructor::createStructure):
              * runtime/ObjectPrototype.cpp:
              (JSC::ObjectPrototype::ObjectPrototype):
              * runtime/ObjectPrototype.h:
              * runtime/PropertyMapHashTable.h:
              (JSC::PropertyTable::PropertyTable):
              * runtime/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::RegExpConstructor):
              (JSC::RegExpMatchesArray::RegExpMatchesArray):
              * runtime/RegExpConstructor.h:
              (JSC::RegExpConstructor::createStructure):
              * runtime/RegExpObject.cpp:
              (JSC::RegExpObject::RegExpObject):
              * runtime/RegExpObject.h:
              (JSC::RegExpObject::createStructure):
              * runtime/RegExpPrototype.cpp:
              (JSC::RegExpPrototype::RegExpPrototype):
              * runtime/RegExpPrototype.h:
              * runtime/ScopeChain.h:
              (JSC::ScopeChainNode::ScopeChainNode):
              (JSC::ScopeChainNode::createStructure):
              * runtime/StrictEvalActivation.cpp:
              (JSC::StrictEvalActivation::StrictEvalActivation):
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              * runtime/StringConstructor.h:
              * runtime/StringObject.cpp:
              (JSC::StringObject::StringObject):
              * runtime/StringObject.h:
              (JSC::StringObject::createStructure):
              * runtime/StringObjectThatMasqueradesAsUndefined.h:
              (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
              (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
              * runtime/StringPrototype.cpp:
              (JSC::StringPrototype::StringPrototype):
              * runtime/StringPrototype.h:
              (JSC::StringPrototype::createStructure):
              * runtime/Structure.cpp:
              (JSC::StructureTransitionTable::remove):
              (JSC::StructureTransitionTable::add):
              (JSC::Structure::Structure):
              (JSC::Structure::~Structure):
              (JSC::Structure::materializePropertyMap):
              (JSC::Structure::addPropertyTransitionToExistingStructure):
              (JSC::Structure::addPropertyTransition):
              (JSC::Structure::removePropertyTransition):
              (JSC::Structure::changePrototypeTransition):
              (JSC::Structure::despecifyFunctionTransition):
              (JSC::Structure::getterSetterTransition):
              (JSC::Structure::toDictionaryTransition):
              (JSC::Structure::toCacheableDictionaryTransition):
              (JSC::Structure::toUncacheableDictionaryTransition):
              (JSC::Structure::sealTransition):
              (JSC::Structure::freezeTransition):
              (JSC::Structure::preventExtensionsTransition):
              (JSC::Structure::flattenDictionaryStructure):
              (JSC::Structure::copyPropertyTable):
              (JSC::Structure::put):
              (JSC::Structure::markChildren):
              * runtime/Structure.h:
              (JSC::Structure::create):
              (JSC::Structure::setPrototypeWithoutTransition):
              (JSC::Structure::createStructure):
              (JSC::JSCell::createDummyStructure):
              (JSC::StructureTransitionTable::WeakGCMapFinalizerCallback::keyForFinalizer):
              * runtime/StructureChain.cpp:
              (JSC::StructureChain::StructureChain):
              (JSC::StructureChain::markChildren):
              * runtime/StructureChain.h:
              (JSC::StructureChain::create):
              (JSC::StructureChain::head):
              (JSC::StructureChain::createStructure):
              * runtime/StructureTransitionTable.h:
              (JSC::StructureTransitionTable::WeakGCMapFinalizerCallback::finalizerContextFor):
              (JSC::StructureTransitionTable::~StructureTransitionTable):
              (JSC::StructureTransitionTable::slot):
              (JSC::StructureTransitionTable::setMap):
              (JSC::StructureTransitionTable::singleTransition):
              (JSC::StructureTransitionTable::clearSingleTransition):
              (JSC::StructureTransitionTable::setSingleTransition):
              * runtime/WeakGCMap.h:
              (JSC::DefaultWeakGCMapFinalizerCallback::finalizerContextFor):
              (JSC::DefaultWeakGCMapFinalizerCallback::keyForFinalizer):
              (JSC::WeakGCMap::contains):
              (JSC::WeakGCMap::find):
              (JSC::WeakGCMap::remove):
              (JSC::WeakGCMap::add):
              (JSC::WeakGCMap::set):
              (JSC::WeakGCMap::finalize):
              * runtime/WriteBarrier.h:
              (JSC::writeBarrier):
              (JSC::WriteBarrierBase::set):
              (JSC::WriteBarrierBase::operator*):
              (JSC::WriteBarrierBase::operator->):
              (JSC::WriteBarrierBase::setWithoutWriteBarrier):
      2011-04-13  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoff Garen.
      
              GC allocate Structure
              https://bugs.webkit.org/show_bug.cgi?id=58483
      
              Fix up JSG to correctly mark Structure, et al.
      
              * JSRun.cpp:
              (JSGlueGlobalObject::JSGlueGlobalObject):
              * JSRun.h:
              * JSUtils.cpp:
              (JSObjectKJSValue):
              * UserObjectImp.cpp:
              (UserObjectImp::UserObjectImp):
              * UserObjectImp.h:
              (UserObjectImp::createStructure):
      2011-04-13  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoff Garen.
      
              GC allocate Structure
              https://bugs.webkit.org/show_bug.cgi?id=58483
      
              Update WebCore for Structure being a GC allocated object
      
              * WebCore.exp.in:
              * bindings/js/JSAudioConstructor.h:
              (WebCore::JSAudioConstructor::createStructure):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::cacheDOMStructure):
              * bindings/js/JSDOMBinding.h:
              (WebCore::DOMObjectWithGlobalPointer::createStructure):
              (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
              (WebCore::DOMConstructorObject::createStructure):
              (WebCore::DOMConstructorObject::DOMConstructorObject):
              (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
              * bindings/js/JSDOMGlobalObject.cpp:
              (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
              (WebCore::JSDOMGlobalObject::markChildren):
              * bindings/js/JSDOMGlobalObject.h:
              (WebCore::JSDOMGlobalObject::createStructure):
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::JSDOMWindowBase):
              * bindings/js/JSDOMWindowBase.h:
              (WebCore::JSDOMWindowBase::createStructure):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::createStructure):
              * bindings/js/JSDOMWrapper.h:
              (WebCore::DOMObject::DOMObject):
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSEventListener::JSEventListener):
              * bindings/js/JSImageConstructor.h:
              (WebCore::JSImageConstructor::createStructure):
              * bindings/js/JSImageDataCustom.cpp:
              (WebCore::toJS):
              * bindings/js/JSOptionConstructor.h:
              (WebCore::JSOptionConstructor::createStructure):
              * bindings/js/JSWorkerContextBase.cpp:
              (WebCore::JSWorkerContextBase::JSWorkerContextBase):
              * bindings/js/JSWorkerContextBase.h:
              (WebCore::JSWorkerContextBase::createStructure):
              * bindings/js/ScriptCachedFrameData.h:
              * bindings/js/SerializedScriptValue.h:
              * bindings/js/WorkerScriptController.cpp:
              (WebCore::WorkerScriptController::initScript):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/c/CRuntimeObject.h:
              (JSC::Bindings::CRuntimeObject::createStructure):
              * bridge/c/c_instance.cpp:
              (JSC::Bindings::CRuntimeMethod::createStructure):
              * bridge/jni/jsc/JavaInstanceJSC.cpp:
              (JavaRuntimeMethod::createStructure):
              * bridge/jni/jsc/JavaRuntimeObject.h:
              (JSC::Bindings::JavaRuntimeObject::createStructure):
              * bridge/objc/ObjCRuntimeObject.h:
              (JSC::Bindings::ObjCRuntimeObject::createStructure):
              * bridge/objc/objc_instance.mm:
              (ObjCRuntimeMethod::createStructure):
              * bridge/objc/objc_runtime.h:
              (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
              * bridge/runtime_array.cpp:
              (JSC::RuntimeArray::RuntimeArray):
              * bridge/runtime_array.h:
              (JSC::RuntimeArray::createStructure):
              * bridge/runtime_method.cpp:
              (JSC::RuntimeMethod::RuntimeMethod):
              * bridge/runtime_method.h:
              (JSC::RuntimeMethod::createStructure):
              * bridge/runtime_object.cpp:
              (JSC::Bindings::RuntimeObject::RuntimeObject):
              * bridge/runtime_object.h:
              (JSC::Bindings::RuntimeObject::createStructure):
              * history/HistoryItem.h:
      2011-04-13  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoff Garen.
      
              GC allocate Structure
              https://bugs.webkit.org/show_bug.cgi?id=58483
      
              Update WebKit for the world of GC allocated Structure
      
              * Plugins/Hosted/NetscapePluginInstanceProxy.h:
              * Plugins/Hosted/ProxyInstance.mm:
              (WebKit::ProxyRuntimeMethod::createStructure):
              * Plugins/Hosted/ProxyRuntimeObject.h:
              (WebKit::ProxyRuntimeObject::createStructure):
      2011-04-13  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoff Garen.
      
              GC allocate Structure
              https://bugs.webkit.org/show_bug.cgi?id=58483
      
              Update WK2 for the world of GC allocated Structure
      
              * WebProcess/Plugins/Netscape/JSNPMethod.h:
              (WebKit::JSNPMethod::createStructure):
              * WebProcess/Plugins/Netscape/JSNPObject.h:
              (WebKit::JSNPObject::createStructure):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb8da910
  12. 05 Apr, 2011 1 commit
  13. 04 Apr, 2011 1 commit
    • oliver@apple.com's avatar
      2011-04-01 Oliver Hunt <oliver@apple.com> · 59144210
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Make StructureChain GC allocated
              https://bugs.webkit.org/show_bug.cgi?id=56695
      
              Make StructureChain GC allocated, and make the various owners
              mark it correctly.
      
              * JavaScriptCore.exp:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::dump):
              (JSC::CodeBlock::derefStructures):
              (JSC::CodeBlock::refStructures):
              (JSC::CodeBlock::markAggregate):
              * bytecode/Instruction.h:
              (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
              (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
              (JSC::PolymorphicAccessStructureList::derefStructures):
              (JSC::PolymorphicAccessStructureList::markAggregate):
              (JSC::Instruction::Instruction):
              * bytecode/StructureStubInfo.cpp:
              (JSC::StructureStubInfo::deref):
              (JSC::StructureStubInfo::markAggregate):
              * bytecode/StructureStubInfo.h:
              (JSC::StructureStubInfo::initGetByIdChain):
              (JSC::StructureStubInfo::initPutByIdTransition):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
              * collector/handles/Handle.h:
              (JSC::HandleConverter::operator->):
              (JSC::HandleConverter::operator*):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::privateExecute):
              * jit/JITOpcodes.cpp:
              (JSC::JIT::emit_op_jneq_ptr):
              * jit/JITOpcodes32_64.cpp:
              (JSC::JIT::emit_op_jneq_ptr):
              * jit/JITPropertyAccess.cpp:
              (JSC::JIT::privateCompileGetByIdChainList):
              * jit/JITPropertyAccess32_64.cpp:
              (JSC::JIT::privateCompileGetByIdChainList):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCachePutByID):
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::getPolymorphicAccessStructureListSlot):
              (JSC::DEFINE_STUB_FUNCTION):
              * runtime/JSCell.h:
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::markIfNeeded):
              * runtime/JSGlobalObject.h:
              (JSC::Structure::prototypeChain):
              * runtime/JSObject.h:
              (JSC::JSObject::putDirectInternal):
              (JSC::JSObject::markChildrenDirect):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::create):
              (JSC::JSPropertyNameIterator::get):
              (JSC::JSPropertyNameIterator::markChildren):
              * runtime/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
              * runtime/JSZombie.cpp:
              (JSC::JSZombie::leakedZombieStructure):
              * runtime/JSZombie.h:
              * runtime/MarkStack.h:
              (JSC::MarkStack::append):
              * runtime/MarkedBlock.cpp:
              (JSC::MarkedBlock::sweep):
              * runtime/Structure.cpp:
              (JSC::Structure::addPropertyTransition):
              * runtime/Structure.h:
              (JSC::Structure::markAggregate):
              * runtime/StructureChain.cpp:
              (JSC::StructureChain::StructureChain):
              (JSC::StructureChain::~StructureChain):
              (JSC::StructureChain::markChildren):
              * runtime/StructureChain.h:
              (JSC::StructureChain::create):
              (JSC::StructureChain::createStructure):
              * runtime/WriteBarrier.h:
              (JSC::WriteBarrierBase::get):
              (JSC::WriteBarrierBase::operator*):
              (JSC::WriteBarrierBase::operator->):
      2011-04-01  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Make StructureChain GC allocated
              https://bugs.webkit.org/show_bug.cgi?id=56695
      
              Update for new Structure marking function
      
              * bindings/js/JSDOMGlobalObject.cpp:
              (WebCore::JSDOMGlobalObject::markChildren):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      59144210
  14. 30 Mar, 2011 2 commits
    • oliver@apple.com's avatar
      Rollout r82500 · 9d5d1b0f
      oliver@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d5d1b0f
    • oliver@apple.com's avatar
      2011-03-30 Oliver Hunt <oliver@apple.com> · 887a036f
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Make StructureChain GC allocated
              https://bugs.webkit.org/show_bug.cgi?id=56695
      
              Make StructureChain GC allocated, and make the various owners
              mark it correctly.
      
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::dump):
              (JSC::CodeBlock::derefStructures):
              (JSC::CodeBlock::refStructures):
              (JSC::CodeBlock::markAggregate):
              * bytecode/Instruction.h:
              (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
              (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
              (JSC::PolymorphicAccessStructureList::derefStructures):
              (JSC::PolymorphicAccessStructureList::markAggregate):
              (JSC::Instruction::Instruction):
              * bytecode/StructureStubInfo.cpp:
              (JSC::StructureStubInfo::deref):
              (JSC::StructureStubInfo::markAggregate):
              * bytecode/StructureStubInfo.h:
              (JSC::StructureStubInfo::initGetByIdChain):
              (JSC::StructureStubInfo::initPutByIdTransition):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::privateExecute):
              * jit/JITOpcodes.cpp:
              (JSC::JIT::emit_op_jneq_ptr):
              * jit/JITOpcodes32_64.cpp:
              (JSC::JIT::emit_op_jneq_ptr):
              * jit/JITPropertyAccess.cpp:
              (JSC::JIT::privateCompileGetByIdChainList):
              * jit/JITPropertyAccess32_64.cpp:
              (JSC::JIT::privateCompileGetByIdChainList):
              * jit/JITStubs.cpp:
              (JSC::getPolymorphicAccessStructureListSlot):
              (JSC::DEFINE_STUB_FUNCTION):
              * runtime/JSCell.h:
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::markIfNeeded):
              * runtime/JSGlobalObject.h:
              (JSC::Structure::prototypeChain):
              * runtime/JSObject.h:
              (JSC::JSObject::markChildrenDirect):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::create):
              (JSC::JSPropertyNameIterator::get):
              (JSC::JSPropertyNameIterator::markChildren):
              * runtime/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
              * runtime/MarkStack.h:
              (JSC::MarkStack::append):
              * runtime/Structure.h:
              (JSC::Structure::cachedPrototypeChainSlot):
              * runtime/StructureChain.cpp:
              (JSC::StructureChain::StructureChain):
              * runtime/StructureChain.h:
              (JSC::StructureChain::create):
              (JSC::StructureChain::createStructure):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      887a036f
  15. 14 Mar, 2011 1 commit
    • oliver@apple.com's avatar
      2011-03-11 Oliver Hunt <oliver@apple.com> · 9d4f0eca
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Ensure all values are correctly tagged in the registerfile
              https://bugs.webkit.org/show_bug.cgi?id=56214
      
              This patch makes sure that all JSCell pointers written to
              the registerfile are correctly tagged as JSCells, and replaces
              raw int usage with the immediate representation.
      
              For performance, register pressure, and general saneness reasons
              I've added abstractions for reading and writing the tag
              and payload of integer registers directly for the JSVALUE64
              encoding.
      
              * interpreter/Register.h:
              (JSC::Register::withInt):
              (JSC::Register::withCallee):
              (JSC::Register::operator=):
              (JSC::Register::i):
              (JSC::Register::activation):
              (JSC::Register::function):
              (JSC::Register::propertyNameIterator):
              (JSC::Register::scopeChain):
              * jit/JIT.h:
              * jit/JITCall.cpp:
              (JSC::JIT::compileOpCallInitializeCallFrame):
              (JSC::JIT::compileOpCallVarargs):
              (JSC::JIT::compileOpCall):
              * jit/JITCall32_64.cpp:
              (JSC::JIT::compileOpCallInitializeCallFrame):
              (JSC::JIT::compileOpCallVarargs):
              (JSC::JIT::compileOpCall):
              (JSC::JIT::compileOpCallSlowCase):
              * jit/JITInlineMethods.h:
              (JSC::JIT::emitPutToCallFrameHeader):
              (JSC::JIT::emitPutCellToCallFrameHeader):
              (JSC::JIT::emitPutIntToCallFrameHeader):
              * jit/JITOpcodes.cpp:
              (JSC::JIT::privateCompileCTINativeCall):
              (JSC::JIT::emit_op_get_pnames):
              (JSC::JIT::emit_op_next_pname):
              (JSC::JIT::emit_op_load_varargs):
              (JSC::JIT::emitSlow_op_load_varargs):
              * jit/JITOpcodes32_64.cpp:
              (JSC::JIT::privateCompileCTINativeCall):
              (JSC::JIT::emit_op_get_pnames):
              (JSC::JIT::emit_op_next_pname):
              * jit/JSInterfaceJIT.h:
              (JSC::JSInterfaceJIT::intPayloadFor):
              (JSC::JSInterfaceJIT::intTagFor):
              * jit/SpecializedThunkJIT.h:
              (JSC::SpecializedThunkJIT::returnJSValue):
              (JSC::SpecializedThunkJIT::returnDouble):
              (JSC::SpecializedThunkJIT::returnInt32):
              (JSC::SpecializedThunkJIT::returnJSCell):
      2011-03-11  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Ensure all values are correctly tagged in the registerfile
              https://bugs.webkit.org/show_bug.cgi?id=56214
      
              Make sure everything builds still.
      
              * bridge/c/c_class.cpp:
              * bridge/c/c_runtime.cpp:
              * bridge/jni/JavaMethod.cpp:
              * plugins/PluginViewNone.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d4f0eca
  16. 12 Mar, 2011 1 commit
    • loislo@chromium.org's avatar
      2011-03-12 Sheriff Bot <webkit.review.bot@gmail.com> · 03e7251c
      loislo@chromium.org authored
              Unreviewed, rolling out r80919.
              http://trac.webkit.org/changeset/80919
              https://bugs.webkit.org/show_bug.cgi?id=56251
      
              all windows bots failed to compile this change (Requested by
              loislo on #webkit).
      
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * bytecode/StructureStubInfo.cpp:
              * interpreter/Register.h:
              (JSC::Register::withInt):
              (JSC::Register::withCallee):
              (JSC::Register::operator=):
              (JSC::Register::i):
              (JSC::Register::activation):
              (JSC::Register::function):
              (JSC::Register::propertyNameIterator):
              (JSC::Register::scopeChain):
              * jit/JIT.h:
              * jit/JITCall.cpp:
              (JSC::JIT::compileOpCallInitializeCallFrame):
              (JSC::JIT::compileOpCallVarargs):
              (JSC::JIT::compileOpCall):
              * jit/JITCall32_64.cpp:
              (JSC::JIT::compileOpCallInitializeCallFrame):
              (JSC::JIT::compileOpCallVarargs):
              (JSC::JIT::compileOpCall):
              (JSC::JIT::compileOpCallSlowCase):
              * jit/JITInlineMethods.h:
              (JSC::JIT::emitPutToCallFrameHeader):
              * jit/JITOpcodes.cpp:
              (JSC::JIT::privateCompileCTINativeCall):
              (JSC::JIT::emit_op_get_pnames):
              (JSC::JIT::emit_op_next_pname):
              (JSC::JIT::emit_op_load_varargs):
              (JSC::JIT::emitSlow_op_load_varargs):
              * jit/JITOpcodes32_64.cpp:
              (JSC::JIT::privateCompileCTINativeCall):
              (JSC::JIT::emit_op_get_pnames):
              (JSC::JIT::emit_op_next_pname):
              * jit/JSInterfaceJIT.h:
              (JSC::JSInterfaceJIT::payloadFor):
              * jit/SpecializedThunkJIT.h:
              (JSC::SpecializedThunkJIT::returnJSValue):
              (JSC::SpecializedThunkJIT::returnDouble):
              (JSC::SpecializedThunkJIT::returnInt32):
              (JSC::SpecializedThunkJIT::returnJSCell):
              * runtime/ArgList.cpp:
              * runtime/DateConversion.cpp:
              * runtime/GCActivityCallbackCF.cpp:
              * runtime/Identifier.cpp:
              * runtime/JSActivation.h:
              (JSC::asActivation):
              * runtime/JSLock.cpp:
              * runtime/JSNumberCell.cpp:
              * runtime/JSObject.h:
              * runtime/JSPropertyNameIterator.h:
              * runtime/JSValue.h:
              * runtime/JSZombie.cpp:
              * runtime/MarkedBlock.cpp:
              * runtime/MarkedSpace.cpp:
              * runtime/PropertyNameArray.cpp:
              * runtime/ScopeChain.h:
              (JSC::ExecState::globalThisValue):
              * wtf/DateMath.cpp:
      2011-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r80919.
              http://trac.webkit.org/changeset/80919
              https://bugs.webkit.org/show_bug.cgi?id=56251
      
              all windows bots failed to compile this change (Requested by
              loislo on #webkit).
      
              * bridge/c/c_class.cpp:
              * bridge/c/c_runtime.cpp:
              * bridge/jni/JavaMethod.cpp:
              * plugins/PluginViewNone.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      03e7251c
  17. 11 Mar, 2011 1 commit
    • oliver@apple.com's avatar
      2011-03-11 Oliver Hunt <oliver@apple.com> · 88d8cfa7
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Ensure all values are correctly tagged in the registerfile
              https://bugs.webkit.org/show_bug.cgi?id=56214
      
              This patch makes sure that all JSCell pointers written to
              the registerfile are correctly tagged as JSCells, and replaces
              raw int usage with the immediate representation.
      
              For performance, register pressure, and general saneness reasons
              I've added abstractions for reading and writing the tag
              and payload of integer registers directly for the JSVALUE64
              encoding.
      
              * interpreter/Register.h:
              (JSC::Register::withInt):
              (JSC::Register::withCallee):
              (JSC::Register::operator=):
              (JSC::Register::i):
              (JSC::Register::activation):
              (JSC::Register::function):
              (JSC::Register::propertyNameIterator):
              (JSC::Register::scopeChain):
              * jit/JIT.h:
              * jit/JITCall.cpp:
              (JSC::JIT::compileOpCallInitializeCallFrame):
              (JSC::JIT::compileOpCallVarargs):
              (JSC::JIT::compileOpCall):
              * jit/JITCall32_64.cpp:
              (JSC::JIT::compileOpCallInitializeCallFrame):
              (JSC::JIT::compileOpCallVarargs):
              (JSC::JIT::compileOpCall):
              (JSC::JIT::compileOpCallSlowCase):
              * jit/JITInlineMethods.h:
              (JSC::JIT::emitPutToCallFrameHeader):
              (JSC::JIT::emitPutCellToCallFrameHeader):
              (JSC::JIT::emitPutIntToCallFrameHeader):
              * jit/JITOpcodes.cpp:
              (JSC::JIT::privateCompileCTINativeCall):
              (JSC::JIT::emit_op_get_pnames):
              (JSC::JIT::emit_op_next_pname):
              (JSC::JIT::emit_op_load_varargs):
              (JSC::JIT::emitSlow_op_load_varargs):
              * jit/JITOpcodes32_64.cpp:
              (JSC::JIT::privateCompileCTINativeCall):
              (JSC::JIT::emit_op_get_pnames):
              (JSC::JIT::emit_op_next_pname):
              * jit/JSInterfaceJIT.h:
              (JSC::JSInterfaceJIT::intPayloadFor):
              (JSC::JSInterfaceJIT::intTagFor):
              * jit/SpecializedThunkJIT.h:
              (JSC::SpecializedThunkJIT::returnJSValue):
              (JSC::SpecializedThunkJIT::returnDouble):
              (JSC::SpecializedThunkJIT::returnInt32):
              (JSC::SpecializedThunkJIT::returnJSCell):
      2011-03-11  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Ensure all values are correctly tagged in the registerfile
              https://bugs.webkit.org/show_bug.cgi?id=56214
      
              Make sure everything builds still.
      
              * bridge/c/c_class.cpp:
              * bridge/c/c_runtime.cpp:
              * bridge/jni/JavaMethod.cpp:
              * plugins/PluginViewNone.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      88d8cfa7
  18. 28 Feb, 2011 1 commit
    • oliver@apple.com's avatar
      2011-02-28 Oliver Hunt <oliver@apple.com> · 97cdbd4c
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Make ScopeChainNode GC allocated
              https://bugs.webkit.org/show_bug.cgi?id=55283
      
              Simplify lifetime and other issues with the scopechain
              by making it gc allocated.  This allows us to simplify
              function exit and unwinding, as well as making the
              current iterative refcounting go away.
      
              * JavaScriptCore.exp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::createActivation):
              * bytecode/StructureStubInfo.cpp:
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::generate):
              (JSC::BytecodeGenerator::BytecodeGenerator):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
              * bytecompiler/BytecodeGenerator.h:
              * debugger/Debugger.cpp:
              (JSC::Recompiler::operator()):
              * debugger/DebuggerCallFrame.h:
              (JSC::DebuggerCallFrame::scopeChain):
              * interpreter/CachedCall.h:
              (JSC::CachedCall::CachedCall):
              * interpreter/CallFrame.h:
              * interpreter/Interpreter.cpp:
              (JSC::depth):
              (JSC::Interpreter::unwindCallFrame):
              (JSC::Interpreter::throwException):
              (JSC::Interpreter::execute):
              (JSC::Interpreter::executeCall):
              (JSC::Interpreter::executeConstruct):
              (JSC::Interpreter::privateExecute):
              * jit/JITCall.cpp:
              (JSC::JIT::compileOpCallInitializeCallFrame):
              (JSC::JIT::compileOpCall):
              * jit/JITCall32_64.cpp:
              (JSC::JIT::compileOpCallInitializeCallFrame):
              (JSC::JIT::emit_op_ret):
              (JSC::JIT::emit_op_ret_object_or_this):
              (JSC::JIT::compileOpCall):
              * jit/JITOpcodes.cpp:
              (JSC::JIT::emit_op_end):
              (JSC::JIT::emit_op_ret):
              (JSC::JIT::emit_op_ret_object_or_this):
              * jit/JITOpcodes32_64.cpp:
              (JSC::JIT::emit_op_end):
              * jit/JITStubs.cpp:
              (JSC::DEFINE_STUB_FUNCTION):
              * jit/JITStubs.h:
              * runtime/ArgList.cpp:
              * runtime/Completion.cpp:
              (JSC::evaluate):
              * runtime/Completion.h:
              * runtime/DateConversion.cpp:
              * runtime/Executable.cpp:
              (JSC::EvalExecutable::compileInternal):
              (JSC::ProgramExecutable::compileInternal):
              (JSC::FunctionExecutable::compileForCallInternal):
              (JSC::FunctionExecutable::compileForConstructInternal):
              * runtime/FunctionConstructor.cpp:
              (JSC::constructFunction):
              * runtime/GCActivityCallbackCF.cpp:
              * runtime/Identifier.cpp:
              * runtime/JSCell.h:
              * runtime/JSChunk.cpp: Added.
              * runtime/JSChunk.h: Added.
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              (JSC::JSFunction::markChildren):
              (JSC::JSFunction::getCallData):
              (JSC::JSFunction::getOwnPropertySlot):
              (JSC::JSFunction::getConstructData):
              * runtime/JSFunction.h:
              (JSC::JSFunction::scope):
              (JSC::JSFunction::setScope):
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::init):
              (JSC::JSGlobalObject::markChildren):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
              (JSC::JSGlobalObject::globalScopeChain):
              * runtime/JSGlobalObjectFunctions.cpp:
              (JSC::globalFuncEval):
              * runtime/JSLock.cpp:
              * runtime/JSNumberCell.cpp:
              * runtime/JSZombie.cpp:
              * runtime/MarkedBlock.cpp:
              * runtime/MarkedSpace.cpp:
              * runtime/PropertyNameArray.cpp:
              * runtime/ScopeChain.cpp:
              (JSC::ScopeChainNode::print):
              (JSC::ScopeChainNode::localDepth):
              (JSC::ScopeChainNode::markChildren):
              * runtime/ScopeChain.h:
              (JSC::ScopeChainNode::ScopeChainNode):
              (JSC::ScopeChainNode::createStructure):
              (JSC::ScopeChainNode::push):
              (JSC::ScopeChainNode::pop):
              (JSC::ScopeChainIterator::ScopeChainIterator):
              (JSC::ScopeChainIterator::operator*):
              (JSC::ScopeChainIterator::operator->):
              (JSC::ScopeChainIterator::operator++):
              (JSC::ScopeChainNode::begin):
              (JSC::ScopeChainNode::end):
              (JSC::ExecState::globalData):
              (JSC::ExecState::lexicalGlobalObject):
              (JSC::ExecState::globalThisValue):
              * runtime/ScopeChainMark.h:
              * wtf/DateMath.cpp:
      2011-02-28  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Make ScopeChainNode GC allocated
              https://bugs.webkit.org/show_bug.cgi?id=55283
      
              Update WebCore to deal with the absence of the ScopeChain
              class.
      
              * ForwardingHeaders/runtime/ScopeChain.h: Added.
              * bindings/js/JSHTMLElementCustom.cpp:
              (WebCore::JSHTMLElement::pushEventHandlerScope):
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              (WebCore::JSJavaScriptCallFrame::scopeChain):
              (WebCore::JSJavaScriptCallFrame::scopeType):
              * bindings/js/JSLazyEventListener.cpp:
              (WebCore::JSLazyEventListener::initializeJSFunction):
              * bindings/js/JSMainThreadExecState.h:
              (WebCore::JSMainThreadExecState::evaluate):
              * bindings/js/JSNodeCustom.cpp:
              (WebCore::JSNode::pushEventHandlerScope):
              * bindings/js/JavaScriptCallFrame.cpp:
              (WebCore::JavaScriptCallFrame::scopeChain):
              * bindings/js/JavaScriptCallFrame.h:
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/c/c_class.cpp:
              * bridge/c/c_runtime.cpp:
              * bridge/jni/JNIBridge.cpp:
              * bridge/qt/qt_runtime.cpp:
              (JSC::Bindings::QtConnectionObject::execute):
              * plugins/PluginViewNone.cpp:
      2011-02-28  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Make ScopeChainNode GC allocated
              https://bugs.webkit.org/show_bug.cgi?id=55283
      
              More updates for the absence of the ScopeChain class
      
              * WebView/WebScriptDebugDelegate.mm:
              (-[WebScriptCallFrame scopeChain]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      97cdbd4c
  19. 01 Jan, 2011 1 commit
    • abarth@webkit.org's avatar
      Move JavaScriptCore to Source · 76da8fc1
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=51604
      
      Reviewed by Eric Seidel.
      
      Update references to JavaScriptCore to point to the new location.
      
      * Android.mk:
      * CMakeLists.txt:
      * DerivedSources.pro:
      * GNUmakefile.am:
      * Makefile:
      * WebKit.pri:
      * WebKit.pro:
      * wscript:
      
      Tools: 
      
      Update references to JavaScriptCore to point to the new location.
      
      * BuildSlaveSupport/build.webkit.org-config/master.cfg:
      * DumpRenderTree/qt/DumpRenderTree.pro:
      * DumpRenderTree/qt/ImageDiff.pro:
      * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
      * DumpRenderTree/wscript:
      * Scripts/build-jsc:
      * Scripts/build-webkit:
      * Scripts/do-file-rename:
      * Scripts/do-webcore-rename:
      * Scripts/run-javascriptcore-tests:
      * Scripts/update-javascriptcore-test-results:
      * Scripts/webkitdirs.pm:
      * Scripts/webkitpy/common/config/build_unittest.py:
      * Scripts/webkitpy/style/checker.py:
      * Scripts/webkitpy/style/checker_unittest.py:
      * Scripts/webkitpy/style/checkers/cpp_unittest.py:
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
      * WebKitTestRunner/qt/WebKitTestRunner.pro:
      * wx/build/settings.py:
      
      WebCore: 
      
      Update references to JavaScriptCore.
      
      * Android.derived.jscbindings.mk:
      * Android.v8bindings.mk:
      * CMakeLists.txt:
      * WebCore.gyp/WebCore.gyp:
      * WebCore.pro:
        - These changes are subtle and might not be 100% correct.
      * move-js-headers.sh:
      
      WebKit/chromium: 
      
      * WebKit.gyp:
        - Point to JavaScriptCore in its new location.
      
      WebKit/gtk: 
      
      * GNUmakefile.am:
      * docs/GNUmakefile.am:
        - Point to JavaScriptCore in its new location.
      
      WebKit/qt: 
      
      * WebKit_pch.h:
      * docs/qtwebkit.qdocconf:
        - Point to JavaScriptCore in its new location.
      
      WebKit/win: 
      
      * WebKit.vcproj/WebKit.sln:
        - Point to JavaScriptCore in its new location.
      
      WebKit/wx: 
      
      * bindings/python/wscript:
      * wscript:
        - Point to JavaScriptCore in its new location.
      
      WebKit2: 
      
      * WebKit2.pro:
        - Point to JavaScriptCore in its new location.
      
      Websites/bugs.webkit.org: 
      
      * PrettyPatch/PrettyPatch.rb:
        - Remove reference to JavaScriptCore as a source directory.
      
      Websites/webkit.org: 
      
      * coding/assertion-guidelines.html:
        - Update documentation to point to the new location of
          JavaScriptCore.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76da8fc1
  20. 08 Aug, 2010 2 commits
    • eric@webkit.org's avatar
      2010-08-07 Sheriff Bot <webkit.review.bot@gmail.com> · b8130984
      eric@webkit.org authored
              Unreviewed, rolling out r64938.
              http://trac.webkit.org/changeset/64938
              https://bugs.webkit.org/show_bug.cgi?id=43685
      
              Did not compile on several ports (Requested by abarth on
              #webkit).
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * JavaScriptCore.gypi:
              * JavaScriptCore.pro:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * assembler/AbstractMacroAssembler.h:
              * assembler/MacroAssembler.h:
              * assembler/MacroAssemblerX86.h:
              (JSC::MacroAssemblerX86::load32):
              (JSC::MacroAssemblerX86::store32):
              * assembler/X86Assembler.h:
              (JSC::X86Assembler::movl_rm):
              (JSC::X86Assembler::movl_mr):
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::markAggregate):
              * bytecode/Instruction.h:
              (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::):
              (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
              (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
              * bytecode/StructureStubInfo.cpp:
              (JSC::StructureStubInfo::deref):
              * bytecode/StructureStubInfo.h:
              (JSC::StructureStubInfo::initGetByIdProto):
              (JSC::StructureStubInfo::initGetByIdChain):
              (JSC::StructureStubInfo::):
              * jit/JIT.h:
              * jit/JITMarkObjects.cpp: Removed.
              * jit/JITPropertyAccess.cpp:
              (JSC::JIT::compileGetDirectOffset):
              (JSC::JIT::testPrototype):
              (JSC::JIT::privateCompilePutByIdTransition):
              (JSC::JIT::privateCompileGetByIdProto):
              (JSC::JIT::privateCompileGetByIdProtoList):
              (JSC::JIT::privateCompileGetByIdChainList):
              (JSC::JIT::privateCompileGetByIdChain):
              * jit/JITPropertyAccess32_64.cpp:
              (JSC::JIT::compileGetDirectOffset):
              (JSC::JIT::testPrototype):
              (JSC::JIT::privateCompilePutByIdTransition):
              (JSC::JIT::privateCompileGetByIdProto):
              (JSC::JIT::privateCompileGetByIdProtoList):
              (JSC::JIT::privateCompileGetByIdChainList):
              (JSC::JIT::privateCompileGetByIdChain):
              * jit/JITStubs.cpp:
              (JSC::setupPolymorphicProtoList):
              * wtf/Platform.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b8130984
    • eric@webkit.org's avatar
      2010-08-07 Nathan Lawrence <nlawrence@apple.com> · 667fa8a7
      eric@webkit.org authored
              Reviewed by Geoffrey Garen.
      
              The JIT code contains a number of direct references to GC'd objects.
              When we have movable objects, these references will need to be
              updated.
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * JavaScriptCore.gypi:
              * JavaScriptCore.pro:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * assembler/AbstractMacroAssembler.h:
              (JSC::AbstractMacroAssembler::int32AtLocation):
              (JSC::AbstractMacroAssembler::pointerAtLocation):
              (JSC::AbstractMacroAssembler::jumpTarget):
              * assembler/MacroAssembler.h:
              (JSC::MacroAssembler::loadPtrWithPatch):
                  Normally, loadPtr will optimize when the register is eax.  Since
                  the slightly smaller instruction changes the offsets, it messes up
                  our ability to repatch the code.  We added this new instruction
                  that garuntees a constant size.
              * assembler/MacroAssemblerX86.h:
              (JSC::MacroAssemblerX86::load32WithPatch):
                  Changed load32 in the same way described above.
              (JSC::MacroAssemblerX86::load32):
                  Moved the logic to optimize laod32 from movl_mr to load32
              (JSC::MacroAssemblerX86::store32):
                  Moved the logic to optimize store32 from movl_rm to store32
              * assembler/X86Assembler.h:
              (JSC::X86Assembler::movl_rm):
              (JSC::X86Assembler::movl_mr):
              (JSC::X86Assembler::int32AtLocation):
              (JSC::X86Assembler::pointerAtLocation):
              (JSC::X86Assembler::jumpTarget):
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::markAggregate):
              * bytecode/Instruction.h:
                  As described in StructureStubInfo.h, we needed to add additional
                  fields to both StructureStubInfo and
                  PolymorphicAccessStructureList so that we can determine the
                  structure of the JITed code at patch time.
              (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
              (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
              * bytecode/StructureStubInfo.cpp:
              (JSC::StructureStubInfo::markAggregate):
                  Added this function to mark the JITed code that correosponds to
                  this structure stub info.
              * bytecode/StructureStubInfo.h:
              (JSC::StructureStubInfo::initGetByIdProto):
              (JSC::StructureStubInfo::initGetByIdChain):
              (JSC::StructureStubInfo::):
              * jit/JIT.h:
              * jit/JITMarkObjects.cpp: Added.
              (JSC::JIT::patchPrototypeStructureAddress):
              (JSC::JIT::patchGetDirectOffset):
              (JSC::JIT::markGetByIdProto):
              (JSC::JIT::markGetByIdChain):
              (JSC::JIT::markGetByIdProtoList):
              (JSC::JIT::markPutByIdTransition):
              (JSC::JIT::markGlobalObjectReference):
              * jit/JITPropertyAccess.cpp:
                  Added asserts for the patch offsets.
              (JSC::JIT::compileGetDirectOffset):
              (JSC::JIT::testPrototype):
              (JSC::JIT::privateCompilePutByIdTransition):
              (JSC::JIT::privateCompileGetByIdProto):
              (JSC::JIT::privateCompileGetByIdProtoList):
              (JSC::JIT::privateCompileGetByIdChainList):
              (JSC::JIT::privateCompileGetByIdChain):
              * jit/JITPropertyAccess32_64.cpp:
              (JSC::JIT::compileGetDirectOffset):
              (JSC::JIT::testPrototype):
              (JSC::JIT::privateCompilePutByIdTransition):
              (JSC::JIT::privateCompileGetByIdProto):
              (JSC::JIT::privateCompileGetByIdProtoList):
              (JSC::JIT::privateCompileGetByIdChainList):
              (JSC::JIT::privateCompileGetByIdChain):
              * jit/JITStubs.cpp:
              (JSC::setupPolymorphicProtoList):
              * wtf/Platform.h:
                  Added ENABLE_MOVABLE_GC_OBJECTS flag
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      667fa8a7
  21. 06 Aug, 2009 1 commit
    • barraclough@apple.com's avatar
      2009-08-06 Gavin Barraclough <barraclough@apple.com> · 2e342af4
      barraclough@apple.com authored
              Reviewed by Oliver Hunt.
      
              Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification.
              ( https://bugs.webkit.org/show_bug.cgi?id=27635 )
      
              This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%.
              (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled).
      
              * bytecode/CodeBlock.cpp:
              (JSC::printStructureStubInfo):
                  - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
      
              * bytecode/CodeBlock.h:
              (JSC::):
              (JSC::CallLinkInfo::seenOnce):
              (JSC::CallLinkInfo::setSeen):
              (JSC::MethodCallLinkInfo::seenOnce):
              (JSC::MethodCallLinkInfo::setSeen):
                  - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once.
      
              * bytecode/StructureStubInfo.cpp:
              (JSC::StructureStubInfo::deref):
                  - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
      
              * bytecode/StructureStubInfo.h:
              (JSC::StructureStubInfo::StructureStubInfo):
              (JSC::StructureStubInfo::initGetByIdSelf):
              (JSC::StructureStubInfo::initGetByIdProto):
              (JSC::StructureStubInfo::initGetByIdChain):
              (JSC::StructureStubInfo::initGetByIdSelfList):
              (JSC::StructureStubInfo::initGetByIdProtoList):
              (JSC::StructureStubInfo::initPutByIdTransition):
              (JSC::StructureStubInfo::initPutByIdReplace):
              (JSC::StructureStubInfo::seenOnce):
              (JSC::StructureStubInfo::setSeen):
                  - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once.
      
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::emitGetById):
              (JSC::BytecodeGenerator::emitPutById):
                  - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
      
              * jit/JIT.cpp:
              (JSC::JIT::privateCompileCTIMachineTrampolines):
              (JSC::JIT::unlinkCall):
                  - Remove the "don't lazy link" stage of calls.
      
              * jit/JIT.h:
              (JSC::JIT::compileCTIMachineTrampolines):
                  - Remove the "don't lazy link" stage of calls.
      
              * jit/JITCall.cpp:
              (JSC::JIT::compileOpCallSlowCase):
                  - Remove the "don't lazy link" stage of calls.
      
              * jit/JITStubs.cpp:
              (JSC::JITThunks::JITThunks):
              (JSC::JITThunks::tryCachePutByID):
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::JITStubs::DEFINE_STUB_FUNCTION):
              (JSC::JITStubs::getPolymorphicAccessStructureListSlot):
                  - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
      
              * jit/JITStubs.h:
              (JSC::JITThunks::ctiStringLengthTrampoline):
              (JSC::JITStubs::):
                  - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
      
              * wtf/PtrAndFlags.h:
              (WTF::PtrAndFlags::PtrAndFlags):
              (WTF::PtrAndFlags::operator!):
              (WTF::PtrAndFlags::operator->):
                  - Add ! and -> operators, add constuctor with pointer argument.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e342af4
  22. 30 Jul, 2009 2 commits
    • barraclough@apple.com's avatar
      2009-07-30 Gavin Barraclough <barraclough@apple.com> · 70dfd9a0
      barraclough@apple.com authored
              Reviewed by NOBODY (build fix).
      
              Temporarily revert r46618 since this is b0rking on Linux.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      70dfd9a0
    • barraclough@apple.com's avatar
      2009-07-23 Gavin Barraclough <barraclough@apple.com> · 7c0daf05
      barraclough@apple.com authored
              Reviewed by Oliver Hunt.
      
              Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification.
              ( https://bugs.webkit.org/show_bug.cgi?id=27635 )
      
              This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%.
              (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled).
      
              * bytecode/CodeBlock.cpp:
              (JSC::printStructureStubInfo):
                  - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
      
              * bytecode/CodeBlock.h:
              (JSC::):
              (JSC::CallLinkInfo::seenOnce):
              (JSC::CallLinkInfo::setSeen):
              (JSC::MethodCallLinkInfo::seenOnce):
              (JSC::MethodCallLinkInfo::setSeen):
                  - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once.
      
              * bytecode/StructureStubInfo.cpp:
              (JSC::StructureStubInfo::deref):
                  - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
      
              * bytecode/StructureStubInfo.h:
              (JSC::StructureStubInfo::StructureStubInfo):
              (JSC::StructureStubInfo::initGetByIdSelf):
              (JSC::StructureStubInfo::initGetByIdProto):
              (JSC::StructureStubInfo::initGetByIdChain):
              (JSC::StructureStubInfo::initGetByIdSelfList):
              (JSC::StructureStubInfo::initGetByIdProtoList):
              (JSC::StructureStubInfo::initPutByIdTransition):
              (JSC::StructureStubInfo::initPutByIdReplace):
              (JSC::StructureStubInfo::seenOnce):
              (JSC::StructureStubInfo::setSeen):
                  - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once.
      
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::emitGetById):
              (JSC::BytecodeGenerator::emitPutById):
                  - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
      
              * jit/JIT.cpp:
              (JSC::JIT::privateCompileCTIMachineTrampolines):
              (JSC::JIT::unlinkCall):
                  - Remove the "don't lazy link" stage of calls.
      
              * jit/JIT.h:
              (JSC::JIT::compileCTIMachineTrampolines):
                  - Remove the "don't lazy link" stage of calls.
      
              * jit/JITCall.cpp:
              (JSC::JIT::compileOpCallSlowCase):
                  - Remove the "don't lazy link" stage of calls.
      
              * jit/JITStubs.cpp:
              (JSC::JITThunks::JITThunks):
              (JSC::JITThunks::tryCachePutByID):
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::JITStubs::DEFINE_STUB_FUNCTION):
              (JSC::JITStubs::getPolymorphicAccessStructureListSlot):
                  - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
      
              * jit/JITStubs.h:
              (JSC::JITThunks::ctiStringLengthTrampoline):
              (JSC::JITStubs::):
                  - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
      
              * wtf/PtrAndFlags.h:
              (WTF::PtrAndFlags::PtrAndFlags):
              (WTF::PtrAndFlags::operator!):
              (WTF::PtrAndFlags::operator->):
                  - Add ! and -> operators, add constuctor with pointer argument.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7c0daf05
  23. 12 Dec, 2008 1 commit
    • weinig@apple.com's avatar
      2008-12-11 Sam Weinig <sam@webkit.org> · 0aaf82a4
      weinig@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Remove dependancy on having the Instruction buffer in order to
              deref Structures used for property access and global resolves.
              Instead, we put references to the necessary Structures in axillary
              data structures on the CodeBlock. This is not an ideal solution,
              as we still pay for having the Structures in two places and we
              would like to eventually just hold on to offsets into the machine
              code buffer.
      
              - Also removes CodeBlock bloat in non-JIT by #ifdefing the JIT
                only data structures.
      
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.scons:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * bytecode/CodeBlock.cpp:
              (JSC::isGlobalResolve):
              (JSC::isPropertyAccess):
              (JSC::instructionOffsetForNth):
              (JSC::printGlobalResolveInfo):
              (JSC::printStructureStubInfo):
              (JSC::CodeBlock::printStructures):
              (JSC::CodeBlock::dump):
              (JSC::CodeBlock::~CodeBlock):
              (JSC::CodeBlock::shrinkToFit):
              * bytecode/CodeBlock.h:
              (JSC::GlobalResolveInfo::GlobalResolveInfo):
              (JSC::getNativePC):
              (JSC::CodeBlock::instructions):
              (JSC::CodeBlock::getStubInfo):
              (JSC::CodeBlock::getBytecodeIndex):
              (JSC::CodeBlock::addPropertyAccessInstruction):
              (JSC::CodeBlock::addGlobalResolveInstruction):
              (JSC::CodeBlock::numberOfStructureStubInfos):
              (JSC::CodeBlock::addStructureStubInfo):
              (JSC::CodeBlock::structureStubInfo):
              (JSC::CodeBlock::addGlobalResolveInfo):
              (JSC::CodeBlock::globalResolveInfo):
              (JSC::CodeBlock::numberOfCallLinkInfos):
              (JSC::CodeBlock::addCallLinkInfo):
              (JSC::CodeBlock::callLinkInfo):
              * bytecode/Instruction.h:
              (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
              (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
              * bytecode/Opcode.h:
              (JSC::):
              * bytecode/StructureStubInfo.cpp: Copied from bytecode/CodeBlock.cpp.
              (JSC::StructureStubInfo::deref):
              * bytecode/StructureStubInfo.h: Copied from bytecode/CodeBlock.h.
              (JSC::StructureStubInfo::StructureStubInfo):
              (JSC::StructureStubInfo::initGetByIdSelf):
              (JSC::StructureStubInfo::initGetByIdProto):
              (JSC::StructureStubInfo::initGetByIdChain):
              (JSC::StructureStubInfo::initGetByIdSelfList):
              (JSC::StructureStubInfo::initGetByIdProtoList):
              (JSC::StructureStubInfo::initPutByIdTransition):
              (JSC::StructureStubInfo::initPutByIdReplace):
              (JSC::StructureStubInfo::):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::emitResolve):
              (JSC::BytecodeGenerator::emitGetById):
              (JSC::BytecodeGenerator::emitPutById):
              (JSC::BytecodeGenerator::emitCall):
              (JSC::BytecodeGenerator::emitConstruct):
              (JSC::BytecodeGenerator::emitCatch):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::tryCTICachePutByID):
              (JSC::Interpreter::tryCTICacheGetByID):
              (JSC::Interpreter::cti_op_get_by_id_self_fail):
              (JSC::getPolymorphicAccessStructureListSlot):
              (JSC::Interpreter::cti_op_get_by_id_proto_list):
              (JSC::Interpreter::cti_op_resolve_global):
              * jit/JIT.cpp:
              (JSC::JIT::JIT):
              (JSC::JIT::privateCompileMainPass):
              (JSC::JIT::privateCompileSlowCases):
              (JSC::JIT::privateCompile):
              * jit/JITPropertyAccess.cpp:
              (JSC::JIT::compileGetByIdHotPath):
              (JSC::JIT::compilePutByIdHotPath):
              (JSC::JIT::compileGetByIdSlowCase):
              (JSC::JIT::compilePutByIdSlowCase):
              (JSC::JIT::privateCompileGetByIdSelfList):
              (JSC::JIT::privateCompileGetByIdProtoList):
              (JSC::JIT::privateCompileGetByIdChainList):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0aaf82a4