1. 26 Sep, 2013 4 commits
    • msaboff@apple.com's avatar
      VirtualRegister should be a class · 1796ad0f
      msaboff@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121732
      
      Reviewed by Geoffrey Garen.
      
      This is a refactoring change.  Changed VirtualRegister from an enum to a class.
      Moved Operands::operandIsArgument(), operandToArgument(), argumentToOperand()
      and the similar functions for locals to VirtualRegister class.
      
      This is in preparation for changing the offset for the first local register from
      0 to -1.  This is needed since most native calling conventions have the architected
      frame pointer (e.g. %rbp for X86) point at the slot that stores the previous frame
      pointer.  Local values start below that address.
      
      * bytecode/CodeBlock.cpp:
      * bytecode/CodeBlock.h:
      * bytecode/Instruction.h:
      * bytecode/LazyOperandValueProfile.h:
      * bytecode/MethodOfGettingAValueProfile.cpp:
      * bytecode/Operands.h:
      * bytecode/UnlinkedCodeBlock.cpp:
      * bytecode/UnlinkedCodeBlock.h:
      * bytecode/ValueRecovery.h:
      * bytecode/VirtualRegister.h:
      * bytecompiler/BytecodeGenerator.cpp:
      * bytecompiler/BytecodeGenerator.h:
      * bytecompiler/RegisterID.h:
      * debugger/DebuggerCallFrame.cpp:
      * dfg/DFGAbstractHeap.h:
      * dfg/DFGAbstractInterpreterInlines.h:
      * dfg/DFGArgumentPosition.h:
      * dfg/DFGArgumentsSimplificationPhase.cpp:
      * dfg/DFGByteCodeParser.cpp:
      * dfg/DFGCFGSimplificationPhase.cpp:
      * dfg/DFGCPSRethreadingPhase.cpp:
      * dfg/DFGCapabilities.cpp:
      * dfg/DFGConstantFoldingPhase.cpp:
      * dfg/DFGFlushLivenessAnalysisPhase.cpp:
      * dfg/DFGGraph.cpp:
      * dfg/DFGGraph.h:
      * dfg/DFGJITCode.cpp:
      * dfg/DFGNode.h:
      * dfg/DFGOSREntry.cpp:
      * dfg/DFGOSREntrypointCreationPhase.cpp:
      * dfg/DFGOSRExit.h:
      * dfg/DFGOSRExitCompiler32_64.cpp:
      * dfg/DFGOSRExitCompiler64.cpp:
      * dfg/DFGRegisterBank.h:
      * dfg/DFGScoreBoard.h:
      * dfg/DFGSpeculativeJIT.cpp:
      * dfg/DFGSpeculativeJIT.h:
      * dfg/DFGSpeculativeJIT64.cpp:
      * dfg/DFGValidate.cpp:
      * dfg/DFGValueRecoveryOverride.h:
      * dfg/DFGVariableAccessData.h:
      * dfg/DFGVariableEvent.h:
      * dfg/DFGVariableEventStream.cpp:
      * dfg/DFGVirtualRegisterAllocationPhase.cpp:
      * ftl/FTLExitArgumentForOperand.h:
      * ftl/FTLLink.cpp:
      * ftl/FTLLowerDFGToLLVM.cpp:
      * ftl/FTLOSREntry.cpp:
      * ftl/FTLOSRExit.cpp:
      * ftl/FTLOSRExit.h:
      * ftl/FTLOSRExitCompiler.cpp:
      * interpreter/CallFrame.h:
      * interpreter/Interpreter.cpp:
      * jit/AssemblyHelpers.h:
      * jit/JIT.h:
      * jit/JITCall.cpp:
      * jit/JITInlines.h:
      * jit/JITOpcodes.cpp:
      * jit/JITOpcodes32_64.cpp:
      * jit/JITStubs.cpp:
      * llint/LLIntSlowPaths.cpp:
      * profiler/ProfilerBytecodeSequence.cpp:
      * runtime/CommonSlowPaths.cpp:
      * runtime/JSActivation.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1796ad0f
    • andersca@apple.com's avatar
      Weak should have a move constructor and move assignment operator · b366a0c2
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121963
      
      Reviewed by Oliver Hunt.
      
      This is the first step towards getting rid of PassWeak.
      
      * API/JSClassRef.cpp:
      (OpaqueJSClass::prototype):
      * heap/Weak.h:
      * heap/WeakInlines.h:
      (JSC::::Weak):
      (JSC::::leakImpl):
      * runtime/SimpleTypedArrayController.cpp:
      (JSC::SimpleTypedArrayController::toJS):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b366a0c2
    • mhahnenberg@apple.com's avatar
      op_to_this shouldn't use value profiling · c5684714
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121920
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Currently it's the only opcode that uses m_singletonValue, which is unnecessary. Our current plan is
      to remove m_singletonValue so that GenGC can have a simpler story for handling CodeBlocks/FunctionExecutables
      during nursery collections.
      
      This patch adds an inline cache for the Structure of to_this so it no longer depends on the ValueProfile's
      m_singletonValue. Since nobody uses m_singletonValue now, this patch also removes m_singletonValue from
      ValueProfile.
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::CodeBlock):
      (JSC::CodeBlock::finalizeUnconditionally):
      (JSC::CodeBlock::stronglyVisitStrongReferences):
      (JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
      (JSC::CodeBlock::updateAllValueProfilePredictions):
      (JSC::CodeBlock::updateAllPredictions):
      (JSC::CodeBlock::shouldOptimizeNow):
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::updateAllValueProfilePredictions):
      (JSC::CodeBlock::updateAllPredictions):
      * bytecode/LazyOperandValueProfile.cpp:
      (JSC::CompressedLazyOperandValueProfileHolder::computeUpdatedPredictions):
      * bytecode/LazyOperandValueProfile.h:
      * bytecode/ValueProfile.h:
      (JSC::ValueProfileBase::ValueProfileBase):
      (JSC::ValueProfileBase::briefDescription):
      (JSC::ValueProfileBase::dump):
      (JSC::ValueProfileBase::computeUpdatedPrediction):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_to_this):
      (JSC::JIT::emitSlow_op_to_this):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::emit_op_to_this):
      (JSC::JIT::emitSlow_op_to_this):
      * llint/LowLevelInterpreter32_64.asm:
      * llint/LowLevelInterpreter64.asm:
      * runtime/CommonSlowPaths.cpp:
      (JSC::SLOW_PATH_DECL):
      
      LayoutTests:
      
      Updated a couple tests that waited for two DFG compiles, but with this patch we
      don't do two compiles any more, so we don't want to wait forever.
      
      * js/script-tests/dfg-convert-this-polymorphic-object-then-exit-on-other.js:
      * js/script-tests/dfg-convert-this-polymorphic-object-then-exit-on-string.js:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c5684714
    • oliver@apple.com's avatar
      Implement prefixed-destructuring assignment · aeca5dcd
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121930
      
      Reviewed by Mark Hahnenberg.
      
      Source/JavaScriptCore:
      
      This is mostly simple - the semantics of deconstruction are already
      present in the language, so most of the complexity (if you call it
      that) is addition of new AST nodes, and parsing the syntax.
      
      In order to get correct semantics for the parameter lists, FunctionParameters
      now needs to store refcounted references to the parameter patterns.
      There's also a little work to ensure that variable creation and assignment
      occurs in the correct order while the BytecodeGenerator is being constructed.
      
      * bytecode/UnlinkedCodeBlock.cpp:
      (JSC::UnlinkedFunctionExecutable::paramString):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      * bytecompiler/BytecodeGenerator.h:
      (JSC::BytecodeGenerator::emitExpressionInfo):
      * bytecompiler/NodesCodegen.cpp:
      (JSC::ForInNode::emitBytecode):
      (JSC::DeconstructingAssignmentNode::emitBytecode):
      (JSC::DeconstructionPatternNode::~DeconstructionPatternNode):
      (JSC::ArrayPatternNode::emitBytecode):
      (JSC::ArrayPatternNode::emitDirectBinding):
      (JSC::ArrayPatternNode::toString):
      (JSC::ArrayPatternNode::collectBoundIdentifiers):
      (JSC::ObjectPatternNode::toString):
      (JSC::ObjectPatternNode::emitBytecode):
      (JSC::ObjectPatternNode::collectBoundIdentifiers):
      (JSC::BindingNode::emitBytecode):
      (JSC::BindingNode::toString):
      (JSC::BindingNode::collectBoundIdentifiers):
      * parser/ASTBuilder.h:
      (JSC::ASTBuilder::createFormalParameterList):
      (JSC::ASTBuilder::createForInLoop):
      (JSC::ASTBuilder::addVar):
      (JSC::ASTBuilder::createDeconstructingAssignment):
      (JSC::ASTBuilder::createArrayPattern):
      (JSC::ASTBuilder::appendArrayPatternSkipEntry):
      (JSC::ASTBuilder::appendArrayPatternEntry):
      (JSC::ASTBuilder::createObjectPattern):
      (JSC::ASTBuilder::appendObjectPatternEntry):
      (JSC::ASTBuilder::createBindingLocation):
      * parser/NodeConstructors.h:
      (JSC::CommaNode::CommaNode):
      (JSC::ParameterNode::ParameterNode):
      (JSC::ForInNode::ForInNode):
      (JSC::DeconstructionPatternNode::DeconstructionPatternNode):
      (JSC::ArrayPatternNode::ArrayPatternNode):
      (JSC::ArrayPatternNode::create):
      (JSC::ObjectPatternNode::ObjectPatternNode):
      (JSC::ObjectPatternNode::create):
      (JSC::BindingNode::create):
      (JSC::BindingNode::BindingNode):
      (JSC::DeconstructingAssignmentNode::DeconstructingAssignmentNode):
      * parser/Nodes.cpp:
      (JSC::FunctionParameters::create):
      (JSC::FunctionParameters::FunctionParameters):
      (JSC::FunctionParameters::~FunctionParameters):
      * parser/Nodes.h:
      (JSC::ExpressionNode::isDeconstructionNode):
      (JSC::ArrayNode::elements):
      (JSC::CommaNode::append):
      (JSC::ParameterNode::pattern):
      (JSC::FunctionParameters::at):
      (JSC::FunctionParameters::patterns):
      (JSC::DeconstructionPatternNode::isBindingNode):
      (JSC::DeconstructionPatternNode::emitDirectBinding):
      (JSC::ArrayPatternNode::appendIndex):
      (JSC::ObjectPatternNode::appendEntry):
      (JSC::ObjectPatternNode::Entry::Entry):
      (JSC::BindingNode::boundProperty):
      (JSC::BindingNode::isBindingNode):
      (JSC::DeconstructingAssignmentNode::bindings):
      (JSC::DeconstructingAssignmentNode::isLocation):
      (JSC::DeconstructingAssignmentNode::isDeconstructionNode):
      * parser/Parser.cpp:
      (JSC::::Parser):
      (JSC::::parseVarDeclaration):
      (JSC::::parseVarDeclarationList):
      (JSC::::createBindingPattern):
      (JSC::::parseDeconstructionPattern):
      (JSC::::parseForStatement):
      (JSC::::parseFormalParameters):
      (JSC::::parseAssignmentExpression):
      * parser/Parser.h:
      (JSC::Scope::declareBoundParameter):
      (JSC::Parser::declareBoundParameter):
      * parser/SyntaxChecker.h:
      (JSC::SyntaxChecker::createFormalParameterList):
      (JSC::SyntaxChecker::addVar):
      (JSC::SyntaxChecker::operatorStackPop):
      * runtime/JSONObject.cpp:
      (JSC::escapeStringToBuilder):
      * runtime/JSONObject.h:
      
      LayoutTests:
      
      Add enw tests, and update old ones.
      
      * js/destructuring-assignment-expected.txt: Added.
      * js/destructuring-assignment.html: Added.
      * js/mozilla/strict/13.1-expected.txt:
      * js/mozilla/strict/regress-532254-expected.txt:
      * js/mozilla/strict/script-tests/13.1.js:
      * js/regress/destructuring-arguments-expected.txt: Added.
      * js/regress/destructuring-arguments-length-expected.txt: Added.
      * js/regress/destructuring-arguments-length.html: Added.
      * js/regress/destructuring-arguments.html: Added.
      * js/regress/destructuring-swap-expected.txt: Added.
      * js/regress/destructuring-swap.html: Added.
      * js/regress/script-tests/destructuring-arguments-length.js: Added.
      (foo):
      * js/regress/script-tests/destructuring-arguments.js: Added.
      (foo):
      * js/regress/script-tests/destructuring-swap.js: Added.
      (foo):
      * js/script-tests/destructuring-assignment.js: Added.
      (testDestructuring):
      (testDeconstructArgs):
      (testDeconstructArgLength):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aeca5dcd
  2. 25 Sep, 2013 6 commits
  3. 24 Sep, 2013 4 commits
    • mhahnenberg@apple.com's avatar
      op_get_callee shouldn't use value profiling · 5f2e70b5
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121821
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore: 
      
      Currently it's one of the two opcodes that uses m_singletonValue, which is unnecessary. 
      Our current plan is to remove m_singletonValue so that GenGC can have a simpler story 
      for handling CodeBlocks/FunctionExecutables during nursery collections.
      
      Instead of using a ValueProfile op_get_callee now has a simple inline cache of the most 
      recent JSFunction that we saw.
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::CodeBlock):
      (JSC::CodeBlock::finalizeUnconditionally):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::emitCreateThis):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompileSlowCases):
      * jit/JIT.h:
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_get_callee):
      (JSC::JIT::emitSlow_op_get_callee):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::emit_op_get_callee):
      (JSC::JIT::emitSlow_op_get_callee):
      * llint/LowLevelInterpreter32_64.asm:
      * llint/LowLevelInterpreter64.asm:
      * runtime/CommonSlowPaths.cpp:
      (JSC::SLOW_PATH_DECL):
      * runtime/CommonSlowPaths.h:
      
      LayoutTests: 
      
      Added two tests to make sure we didn't regress the performance of op_get_callee.
      
      * js/regress/get_callee_monomorphic-expected.txt: Added.
      * js/regress/get_callee_monomorphic.html: Added.
      * js/regress/get_callee_polymorphic-expected.txt: Added.
      * js/regress/get_callee_polymorphic.html: Added.
      * js/regress/script-tests/get_callee_monomorphic.js: Added.
      * js/regress/script-tests/get_callee_polymorphic.js: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5f2e70b5
    • mark.lam@apple.com's avatar
      Change JSC debug hooks to pass a CallFrame* instead of a DebuggerCallFrame. · e72693dc
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121867.
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      1. Removed the need for passing the line and column info to the debug hook
         callbacks. We now get the line and column info from the CallFrame.
      
      2. Simplify BytecodeGenerator::emitDebugHook() to only take 1 line number
         argument. The caller can determine whether to pass in the first or last
         line number of the block of source code as appropriate.
         Note: we still need to pass in the line and column info to emitDebugHook()
         because it uses this info to emit expression info which is later used by
         the StackVisitor to determine the line and column info for its "pc".
      
      3. Pass the exceptionValue explicitly to the exception() debug hook
         callback. It should not be embedded in the CallFrame / DebuggerCallFrame.
      
      4. Change the op_debug opcode size to 2 (from 5) since we've removing 3 arg
         values. Update the LLINT and JIT code to handle this.
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::dumpBytecode):
      (JSC::CodeBlock::CodeBlock):
      * bytecode/Opcode.h:
      (JSC::padOpcodeName):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::emitDebugHook):
      * bytecompiler/BytecodeGenerator.h:
      * bytecompiler/NodesCodegen.cpp:
      (JSC::ConstStatementNode::emitBytecode):
      (JSC::EmptyStatementNode::emitBytecode):
      (JSC::DebuggerStatementNode::emitBytecode):
      (JSC::ExprStatementNode::emitBytecode):
      (JSC::VarStatementNode::emitBytecode):
      (JSC::IfElseNode::emitBytecode):
      (JSC::DoWhileNode::emitBytecode):
      (JSC::WhileNode::emitBytecode):
      (JSC::ForNode::emitBytecode):
      (JSC::ForInNode::emitBytecode):
      (JSC::ContinueNode::emitBytecode):
      (JSC::BreakNode::emitBytecode):
      (JSC::ReturnNode::emitBytecode):
      (JSC::WithNode::emitBytecode):
      (JSC::SwitchNode::emitBytecode):
      (JSC::LabelNode::emitBytecode):
      (JSC::ThrowNode::emitBytecode):
      (JSC::TryNode::emitBytecode):
      (JSC::ProgramNode::emitBytecode):
      (JSC::EvalNode::emitBytecode):
      (JSC::FunctionBodyNode::emitBytecode):
      * debugger/Debugger.h:
      * debugger/DebuggerCallFrame.cpp:
      (JSC::LineAndColumnFunctor::operator()):
      (JSC::LineAndColumnFunctor::line):
      (JSC::LineAndColumnFunctor::column):
      (JSC::DebuggerCallFrame::DebuggerCallFrame):
      (JSC::DebuggerCallFrame::clear):
      * debugger/DebuggerCallFrame.h:
      (JSC::DebuggerCallFrame::line):
      (JSC::DebuggerCallFrame::column):
      * interpreter/Interpreter.cpp:
      (JSC::unwindCallFrame):
      (JSC::UnwindFunctor::UnwindFunctor):
      (JSC::UnwindFunctor::operator()):
      (JSC::Interpreter::unwind):
      (JSC::Interpreter::debug):
      * interpreter/Interpreter.h:
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_debug):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::emit_op_debug):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::LLINT_SLOW_PATH_DECL):
      * llint/LowLevelInterpreter.asm:
      
      Source/WebCore: 
      
      No new tests.
      
      * bindings/js/ScriptDebugServer.cpp:
      (WebCore::ScriptDebugServer::createCallFrame):
      (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
      (WebCore::ScriptDebugServer::callEvent):
      (WebCore::ScriptDebugServer::atStatement):
      (WebCore::ScriptDebugServer::returnEvent):
      (WebCore::ScriptDebugServer::exception):
      (WebCore::ScriptDebugServer::willExecuteProgram):
      (WebCore::ScriptDebugServer::didExecuteProgram):
      (WebCore::ScriptDebugServer::didReachBreakpoint):
      * bindings/js/ScriptDebugServer.h:
      * bindings/js/WorkerScriptDebugServer.cpp:
      (WebCore::WorkerScriptDebugServer::willExecuteProgram):
      * bindings/js/WorkerScriptDebugServer.h:
      
      Source/WebKit/mac: 
      
      * WebView/WebScriptDebugDelegate.mm:
      (-[WebScriptCallFrame _initWithGlobalObject:debuggerCallFrame:exceptionValue:JSC::]):
      (-[WebScriptCallFrame exception]):
      * WebView/WebScriptDebugger.h:
      * WebView/WebScriptDebugger.mm:
      (WebScriptDebugger::exception):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e72693dc
    • fpizlo@apple.com's avatar
      Crashing under JSC::DFG::SpeculativeJIT::spill visiting citicards.com · a63eb124
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121844
      
      Source/JavaScriptCore: 
      
      Reviewed by Mark Hahnenberg.
              
      Fix some int52 bugs that caused this.
      
      * bytecode/ValueRecovery.h:
      (JSC::ValueRecovery::dumpInContext): There's no such thing as int53.
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::spill): Actually spill int52's, instead of hitting an assert and crashing.
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal): Use the right format (from before when we clobber it).
      
      Tools: 
      
      Reviewed by Mark Hahnenberg.
      
      * Scripts/run-javascriptcore-tests: Be more clear about what test suite failed.
      
      LayoutTests: 
      
      Reviewed by Mark Hahnenberg.
      
      * js/dfg-int52-spill-expected.txt: Added.
      * js/dfg-int52-spill-trickier-expected.txt: Added.
      * js/dfg-int52-spill-trickier.html: Added.
      * js/dfg-int52-spill.html: Added.
      * js/script-tests/dfg-int52-spill-trickier.js: Added.
      (foo):
      * js/script-tests/dfg-int52-spill.js: Added.
      (foo):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a63eb124
    • mrowe@apple.com's avatar
      <rdar://problem/14971518> WebKit should build against the Xcode default... · a862530c
      mrowe@apple.com authored
      <rdar://problem/14971518> WebKit should build against the Xcode default toolchain when targeting OS X 10.8
      
      Reviewed by Dan Bernstein.
      
      Source/JavaScriptCore:
      
      * Configurations/Base.xcconfig:
      
      Source/ThirdParty/ANGLE:
      
      * Configurations/Base.xcconfig:
      
      Source/WebCore:
      
      * Configurations/Base.xcconfig:
      
      Source/WebInspectorUI:
      
      * Configurations/Base.xcconfig:
      
      Source/WebKit/mac:
      
      * Configurations/Base.xcconfig:
      
      Source/WebKit2:
      
      * Configurations/Base.xcconfig:
      
      Source/WTF:
      
      * Configurations/Base.xcconfig:
      
      Tools:
      
      * DumpRenderTree/mac/Configurations/Base.xcconfig:
      * MiniBrowser/Configurations/Base.xcconfig:
      * TestWebKitAPI/Configurations/Base.xcconfig:
      * WebKitLauncher/Configurations/Base.xcconfig:
      * WebKitTestRunner/Configurations/Base.xcconfig:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a862530c
  4. 23 Sep, 2013 4 commits
    • paroga@webkit.org's avatar
      use NOMINMAX instead of #define min min · 1f9d5c5c
      paroga@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=73563
      
      Reviewed by Brent Fulgham.
      
      Use NOMINMAX instead of #define min/max as a cleaner
      way of ensuring that Windows system header files don't
      define min/max as macro in the first place.
      
      Source/JavaScriptCore:
      
      * config.h:
      
      Source/WebCore:
      
      * WebCorePrefix.h:
      * config.h:
      
      Source/WebKit/win:
      
      * WebKitPrefix.h:
      
      Source/WebKit2:
      
      * config.h:
      
      Source/WTF:
      
      * config.h:
      
      Tools:
      
      * DumpRenderTree/DumpRenderTreePrefix.h:
      * DumpRenderTree/cg/ImageDiffCG.cpp:
      * DumpRenderTree/config.h:
      * DumpRenderTree/win/ImageDiffCairo.cpp:
      * WebKitTestRunner/WebKitTestRunnerPrefix.h:
      * WebKitTestRunner/config.h:
      
      WebKitLibraries:
      
      * win/tools/vsprops/common.props:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1f9d5c5c
    • fpizlo@apple.com's avatar
      Never use ReturnPC for exception handling and quit using exception check... · 48a7bc89
      fpizlo@apple.com authored
      Never use ReturnPC for exception handling and quit using exception check indices as a lame replica of the CodeOrigin index
      https://bugs.webkit.org/show_bug.cgi?id=121734
      
      Reviewed by Mark Hahnenberg.
              
      Exception handling can deduce where the exception was thrown from by looking at the
      code origin that was stored into the call frame header. There is no need to pass any
      additional meta-data into the exception throwing logic. But the DFG was still doing it
      anyway.
              
      This removes all of the logic to pass extra meta-data into lookupExceptionHandler()
      and friends. It simplifies a lot of code.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::shrinkToFit):
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::codeOrigins):
      (JSC::CodeBlock::hasCodeOrigins):
      (JSC::CodeBlock::canGetCodeOrigin):
      (JSC::CodeBlock::codeOrigin):
      * bytecode/CodeOrigin.h:
      (JSC::InlineCallFrame::InlineCallFrame):
      * bytecode/InlineCallFrameSet.cpp: Added.
      (JSC::InlineCallFrameSet::InlineCallFrameSet):
      (JSC::InlineCallFrameSet::~InlineCallFrameSet):
      (JSC::InlineCallFrameSet::add):
      (JSC::InlineCallFrameSet::shrinkToFit):
      * bytecode/InlineCallFrameSet.h: Added.
      (JSC::InlineCallFrameSet::isEmpty):
      (JSC::InlineCallFrameSet::size):
      (JSC::InlineCallFrameSet::at):
      * dfg/DFGArgumentsSimplificationPhase.cpp:
      (JSC::DFG::ArgumentsSimplificationPhase::run):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
      * dfg/DFGCommonData.cpp:
      (JSC::DFG::CommonData::addCodeOrigin):
      (JSC::DFG::CommonData::shrinkToFit):
      * dfg/DFGCommonData.h:
      * dfg/DFGDesiredWriteBarriers.cpp:
      (JSC::DFG::DesiredWriteBarrier::DesiredWriteBarrier):
      (JSC::DFG::DesiredWriteBarrier::trigger):
      * dfg/DFGDesiredWriteBarriers.h:
      (JSC::DFG::DesiredWriteBarriers::add):
      (JSC::DFG::initializeLazyWriteBarrierForInlineCallFrameExecutable):
      (JSC::DFG::initializeLazyWriteBarrierForInlineCallFrameCallee):
      * dfg/DFGGraph.cpp:
      (JSC::DFG::Graph::Graph):
      * dfg/DFGGraph.h:
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::JITCompiler):
      (JSC::DFG::JITCompiler::compileExceptionHandlers):
      (JSC::DFG::JITCompiler::link):
      (JSC::DFG::JITCompiler::compileFunction):
      * dfg/DFGJITCompiler.h:
      (JSC::DFG::JITCompiler::emitStoreCodeOrigin):
      (JSC::DFG::JITCompiler::exceptionCheck):
      (JSC::DFG::JITCompiler::fastExceptionCheck):
      * dfg/DFGOperations.cpp:
      * dfg/DFGOperations.h:
      * dfg/DFGRepatch.cpp:
      (JSC::DFG::tryBuildGetByIDList):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheck):
      (JSC::DFG::SpeculativeJIT::appendCallSetResult):
      (JSC::DFG::SpeculativeJIT::appendCall):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::emitCall):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::emitCall):
      * dfg/DFGVirtualRegisterAllocationPhase.cpp:
      (JSC::DFG::VirtualRegisterAllocationPhase::run):
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::callPreflight):
      * jit/AssemblyHelpers.h:
      (JSC::AssemblyHelpers::emitExceptionCheck):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      48a7bc89
    • oliver@apple.com's avatar
      CodeLoad performance regression · 343b4f54
      oliver@apple.com authored
      Reviewed by Filip Pizlo.
      
      Temporarily remove the ExpressionInfo compression until we can
      work out how to make it not clobber performance.
      * bytecode/UnlinkedCodeBlock.cpp:
      (JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset):
      (JSC::UnlinkedCodeBlock::addExpressionInfo):
      * bytecode/UnlinkedCodeBlock.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      343b4f54
    • paroga@webkit.org's avatar
      Cleanup CMake files in JavaScriptCore · 4207b08a
      paroga@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=121762
      
      Reviewed by Gyuyoung Kim.
      
      Sort files and unify style.
      
      * CMakeLists.txt:
      * shell/CMakeLists.txt:
      * shell/PlatformBlackBerry.cmake:
      * shell/PlatformEfl.cmake:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4207b08a
  5. 22 Sep, 2013 1 commit
  6. 21 Sep, 2013 8 commits
    • fpizlo@apple.com's avatar
      Interpreter::unwind() has no need for the bytecodeOffset · f825bf66
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121755
      
      Reviewed by Oliver Hunt.
              
      It was only using the bytecodeOffset for some debugger stuff, but the debugger could
      just get the bytecodeOffset the same way the rest of the machinery does: by using the
      CallFrame's location.
              
      It turns out that a lot of really ugly code was in place just to supply this
      bytecodeOffset. This patch kills most of that code, and allows us to kill even more
      code in a future patch - though most likely that killage will involve further
      refactorings as well, see https://bugs.webkit.org/show_bug.cgi?id=121734.
      
      * dfg/DFGOperations.cpp:
      * interpreter/CallFrame.cpp:
      (JSC::CallFrame::bytecodeOffset):
      (JSC::CallFrame::codeOrigin):
      * interpreter/CallFrame.h:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::unwind):
      * interpreter/Interpreter.h:
      * jit/JITExceptions.cpp:
      (JSC::genericUnwind):
      * jit/JITExceptions.h:
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      (JSC::cti_vm_handle_exception):
      * llint/LLIntExceptions.cpp:
      (JSC::LLInt::doThrow):
      (JSC::LLInt::returnToThrow):
      (JSC::LLInt::callToThrow):
      * llint/LLIntExceptions.h:
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::LLINT_SLOW_PATH_DECL):
      * runtime/CommonSlowPaths.cpp:
      (JSC::SLOW_PATH_DECL):
      * runtime/CommonSlowPathsExceptions.cpp:
      (JSC::CommonSlowPaths::interpreterThrowInCaller):
      * runtime/CommonSlowPathsExceptions.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f825bf66
    • darin@apple.com's avatar
      Add ExecState::uncheckedArgument and use where possible to shrink a bit · d9b22137
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121750
      
      Reviewed by Andreas Kling.
      
      Source/JavaScriptCore:
      
      * interpreter/CallFrame.h:
      (JSC::ExecState::uncheckedArgument): Added. Like argument, but with an
      assertion rather than a runtime check.
      
      * API/APICallbackFunction.h:
      (JSC::APICallbackFunction::call): Use uncheckedArgument because we are
      already in a loop over arguments, so don't need a range check.
      * API/JSCallbackConstructor.cpp:
      (JSC::constructJSCallback): Ditto.
      * API/JSCallbackObjectFunctions.h:
      (JSC::JSCallbackObject::construct): Ditto.
      (JSC::JSCallbackObject::call): Ditto.
      * jsc.cpp:
      (functionPrint): Ditto.
      (functionRun): Ditto.
      (functionSetSamplingFlags): Ditto.
      (functionClearSamplingFlags): Ditto.
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncConcat): Ditto.
      (JSC::arrayProtoFuncPush): Use uncheckedArgument because there is already
      code that explicitly checks argumentCount.
      (JSC::arrayProtoFuncSplice): Ditto.
      (JSC::arrayProtoFuncUnShift): Ditto.
      (JSC::arrayProtoFuncReduce): Ditto.
      (JSC::arrayProtoFuncReduceRight): Ditto.
      (JSC::arrayProtoFuncLastIndexOf): Ditto.
      * runtime/DatePrototype.cpp:
      (JSC::fillStructuresUsingTimeArgs): Ditto.
      (JSC::fillStructuresUsingDateArgs): Ditto.
      * runtime/JSArrayBufferConstructor.cpp:
      (JSC::constructArrayBuffer): Ditto.
      * runtime/JSArrayBufferPrototype.cpp:
      (JSC::arrayBufferProtoFuncSlice): Ditto.
      * runtime/JSBoundFunction.cpp:
      (JSC::boundFunctionCall): Ditto.
      (JSC::boundFunctionConstruct): Ditto.
      * runtime/JSDataViewPrototype.cpp:
      (JSC::getData): Ditto.
      (JSC::setData): Ditto.
      * runtime/JSGenericTypedArrayViewConstructorInlines.h:
      (JSC::constructGenericTypedArrayView): Ditto.
      * runtime/JSGenericTypedArrayViewPrototypeInlines.h:
      (JSC::genericTypedArrayViewProtoFuncSet): Ditto.
      (JSC::genericTypedArrayViewProtoFuncSubarray): Ditto.
      * runtime/JSONObject.cpp:
      (JSC::JSONProtoFuncParse): Ditto.
      (JSC::JSONProtoFuncStringify): Ditto.
      * runtime/JSPromiseConstructor.cpp:
      (JSC::constructPromise): Ditto.
      (JSC::JSPromiseConstructorFuncFulfill): Ditto.
      (JSC::JSPromiseConstructorFuncResolve): Ditto.
      (JSC::JSPromiseConstructorFuncReject): Ditto.
      * runtime/MathObject.cpp:
      (JSC::mathProtoFuncMax): Ditto.
      (JSC::mathProtoFuncMin): Ditto.
      
      * runtime/NameConstructor.cpp:
      (JSC::constructPrivateName): Removed unneeded check of argumentCout
      that simply repeats what argument already does.
      * runtime/NativeErrorConstructor.cpp:
      (JSC::Interpreter::constructWithNativeErrorConstructor): Ditto.
      (JSC::Interpreter::callNativeErrorConstructor): Ditto.
      
      * runtime/NumberConstructor.cpp:
      (JSC::constructWithNumberConstructor): Use uncheckedArgument since
      there is already code that explicitly checks argument count.
      (JSC::callNumberConstructor): Ditto.
      
      * runtime/ObjectConstructor.cpp:
      (JSC::objectConstructorCreate): Small refactoring to not call argument(0)
      three times.
      
      * runtime/SetConstructor.cpp:
      (JSC::constructSet): Use uncheckedArgument since we are already in a loop
      over arguments.
      
      * runtime/StringConstructor.cpp:
      (JSC::stringFromCharCodeSlowCase): In a loop.
      (JSC::stringFromCharCode): Already checked count.
      (JSC::constructWithStringConstructor): Ditto.
      (JSC::callStringConstructor): Ditto.
      * runtime/StringPrototype.cpp:
      (JSC::stringProtoFuncConcat): Already checked count.
      * runtime/TestRunnerUtils.cpp:
      (JSC::numberOfDFGCompiles): Ditto.
      (JSC::setNeverInline): Ditto.
      
      Source/WebCore:
      
      * bindings/js/JSHTMLCanvasElementCustom.cpp:
      (WebCore::JSHTMLCanvasElement::probablySupportsContext): Already checked count.
      (WebCore::JSHTMLCanvasElement::toDataURL): Ditto.
      * bindings/js/JSHTMLDocumentCustom.cpp:
      (WebCore::documentWrite): In a loop.
      * bindings/js/JSInjectedScriptHostCustom.cpp:
      (WebCore::JSInjectedScriptHost::inspectedObject): Already checked count.
      (WebCore::JSInjectedScriptHost::internalConstructorName): Ditto.
      (WebCore::JSInjectedScriptHost::isHTMLAllCollection): Ditto.
      (WebCore::JSInjectedScriptHost::type): Ditto.
      (WebCore::JSInjectedScriptHost::functionDetails): Ditto.
      (WebCore::JSInjectedScriptHost::getEventListeners): Ditto.
      (WebCore::JSInjectedScriptHost::inspect): Ditto.
      (WebCore::JSInjectedScriptHost::databaseId): Ditto.
      (WebCore::JSInjectedScriptHost::storageId): Ditto.
      * bindings/js/JSSQLTransactionSyncCustom.cpp:
      (WebCore::JSSQLTransactionSync::executeSql): Ditto.
      * bindings/js/JSSVGLengthCustom.cpp:
      (WebCore::JSSVGLength::convertToSpecifiedUnits): Ditto.
      * bindings/js/JSSharedWorkerCustom.cpp:
      (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Ditto.
      
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      (WebCore::getObjectParameter): Already checked count.
      (WebCore::JSWebGLRenderingContext::getAttachedShaders): Removed tortured code
      to triply do the checking that the toWebGLProgram function already does, including
      spurious exception checking in code that can't create an exception. Also count is
      already checked.
      (WebCore::JSWebGLRenderingContext::getExtension): More of the same.
      (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter): Ditto.
      (WebCore::JSWebGLRenderingContext::getParameter): Ditto.
      (WebCore::JSWebGLRenderingContext::getProgramParameter): Ditto.
      (WebCore::JSWebGLRenderingContext::getShaderParameter): Ditto.
      (WebCore::JSWebGLRenderingContext::getUniform): Ditto.
      (WebCore::dataFunctionf): Ditto.
      (WebCore::dataFunctioni): Ditto.
      (WebCore::dataFunctionMatrix): Ditto.
      
      * bindings/js/JSWorkerGlobalScopeCustom.cpp:
      (WebCore::JSWorkerGlobalScope::importScripts): In a loop.
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::open): Already checked. Also removed some unneeded
      argument count checks.
      (WebCore::JSXMLHttpRequest::send): Removed unneeded special case for 0 argument
      count that does the same thing as the undefined case, since asking for an
      argument past the count yields undefined.
      
      * bindings/js/JSXSLTProcessorCustom.cpp:
      (WebCore::JSXSLTProcessor::setParameter): Already checked.
      (WebCore::JSXSLTProcessor::getParameter): Already checked.
      (WebCore::JSXSLTProcessor::removeParameter): Already checked.
      
      * bindings/js/ScheduledAction.cpp:
      (WebCore::ScheduledAction::ScheduledAction): In a loop.
      * bindings/js/ScriptCallStackFactory.cpp:
      (WebCore::createScriptArguments): Ditto.
      
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateParametersCheck): Removed some excess argumentCount checks.
      Used uncheckedArgument in a few places. More needs to be done, especially for
      overloaded functions.
      
      * bridge/c/c_instance.cpp:
      (JSC::Bindings::CInstance::invokeMethod): In a loop.
      (JSC::Bindings::CInstance::invokeDefaultMethod): Ditto.
      * bridge/objc/objc_instance.mm:
      (ObjcInstance::invokeObjcMethod): Ditto.
      (ObjcInstance::invokeDefaultMethod): Ditto.
      
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      * bindings/scripts/test/JS/JSTestObj.cpp:
      * bindings/scripts/test/JS/JSTestTypedefs.cpp:
      Updated.
      
      Source/WebKit2:
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::callMethod): In a loop.
      (WebKit::JSNPObject::callObject): Ditto.
      (WebKit::JSNPObject::callConstructor): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156240 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9b22137
    • fpizlo@apple.com's avatar
      Remove the notion that a CallFrame can have a pointer to an InlineCallFrame,... · fdd873bb
      fpizlo@apple.com authored
      Remove the notion that a CallFrame can have a pointer to an InlineCallFrame, since that doesn't happen anymore
      https://bugs.webkit.org/show_bug.cgi?id=121753
      
      Reviewed by Darin Adler.
      
      * interpreter/CallFrame.cpp:
      (JSC::CallFrame::bytecodeOffsetFromCodeOriginIndex):
      * interpreter/CallFrame.h:
      * interpreter/Register.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fdd873bb
    • fpizlo@apple.com's avatar
      Unreviewed, fix the revert. · 5ca7eacb
      fpizlo@apple.com authored
      * dfg/DFGRepatch.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ca7eacb
    • fpizlo@apple.com's avatar
      Unreviewed, revert http://trac.webkit.org/changeset/156235. It won't work on Windows. · da4645e1
      fpizlo@apple.com authored
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/CallLinkInfo.cpp:
      (JSC::CallLinkInfo::unlink):
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::resetStubInternal):
      * bytecode/StructureStubInfo.h:
      * dfg/DFGCallArrayAllocatorSlowPathGenerator.h:
      (JSC::DFG::CallArrayAllocatorSlowPathGenerator::CallArrayAllocatorSlowPathGenerator):
      (JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::CallArrayAllocatorWithVariableSizeSlowPathGenerator):
      * dfg/DFGJITCompiler.h:
      * dfg/DFGOSRExitCompiler.h:
      * dfg/DFGOperations.cpp:
      (JSC::DFG::operationPutByValInternal):
      * dfg/DFGOperations.h:
      (JSC::DFG::operationNewTypedArrayWithSizeForType):
      (JSC::DFG::operationNewTypedArrayWithOneArgumentForType):
      * dfg/DFGRegisterSet.h: Added.
      (JSC::DFG::RegisterSet::RegisterSet):
      (JSC::DFG::RegisterSet::asPOD):
      (JSC::DFG::RegisterSet::copyInfo):
      (JSC::DFG::RegisterSet::set):
      (JSC::DFG::RegisterSet::setGPRByIndex):
      (JSC::DFG::RegisterSet::clear):
      (JSC::DFG::RegisterSet::get):
      (JSC::DFG::RegisterSet::getGPRByIndex):
      (JSC::DFG::RegisterSet::getFreeGPR):
      (JSC::DFG::RegisterSet::setFPRByIndex):
      (JSC::DFG::RegisterSet::getFPRByIndex):
      (JSC::DFG::RegisterSet::setByIndex):
      (JSC::DFG::RegisterSet::getByIndex):
      (JSC::DFG::RegisterSet::numberOfSetGPRs):
      (JSC::DFG::RegisterSet::numberOfSetFPRs):
      (JSC::DFG::RegisterSet::numberOfSetRegisters):
      (JSC::DFG::RegisterSet::setBit):
      (JSC::DFG::RegisterSet::clearBit):
      (JSC::DFG::RegisterSet::getBit):
      * dfg/DFGRepatch.cpp: Added.
      (JSC::DFG::repatchCall):
      (JSC::DFG::repatchByIdSelfAccess):
      (JSC::DFG::addStructureTransitionCheck):
      (JSC::DFG::replaceWithJump):
      (JSC::DFG::emitRestoreScratch):
      (JSC::DFG::linkRestoreScratch):
      (JSC::DFG::generateProtoChainAccessStub):
      (JSC::DFG::tryCacheGetByID):
      (JSC::DFG::repatchGetByID):
      (JSC::DFG::getPolymorphicStructureList):
      (JSC::DFG::patchJumpToGetByIdStub):
      (JSC::DFG::tryBuildGetByIDList):
      (JSC::DFG::buildGetByIDList):
      (JSC::DFG::appropriateGenericPutByIdFunction):
      (JSC::DFG::appropriateListBuildingPutByIdFunction):
      (JSC::DFG::emitPutReplaceStub):
      (JSC::DFG::emitPutTransitionStub):
      (JSC::DFG::tryCachePutByID):
      (JSC::DFG::repatchPutByID):
      (JSC::DFG::tryBuildPutByIdList):
      (JSC::DFG::buildPutByIdList):
      (JSC::DFG::tryRepatchIn):
      (JSC::DFG::repatchIn):
      (JSC::DFG::linkSlowFor):
      (JSC::DFG::linkFor):
      (JSC::DFG::linkClosureCall):
      (JSC::DFG::resetGetByID):
      (JSC::DFG::resetPutByID):
      (JSC::DFG::resetIn):
      * dfg/DFGRepatch.h: Added.
      (JSC::DFG::resetGetByID):
      (JSC::DFG::resetPutByID):
      (JSC::DFG::resetIn):
      * dfg/DFGScratchRegisterAllocator.h: Added.
      (JSC::DFG::ScratchRegisterAllocator::ScratchRegisterAllocator):
      (JSC::DFG::ScratchRegisterAllocator::lock):
      (JSC::DFG::ScratchRegisterAllocator::allocateScratch):
      (JSC::DFG::ScratchRegisterAllocator::allocateScratchGPR):
      (JSC::DFG::ScratchRegisterAllocator::allocateScratchFPR):
      (JSC::DFG::ScratchRegisterAllocator::didReuseRegisters):
      (JSC::DFG::ScratchRegisterAllocator::preserveReusedRegistersByPushing):
      (JSC::DFG::ScratchRegisterAllocator::restoreReusedRegistersByPopping):
      (JSC::DFG::ScratchRegisterAllocator::desiredScratchBufferSize):
      (JSC::DFG::ScratchRegisterAllocator::preserveUsedRegistersToScratchBuffer):
      (JSC::DFG::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBuffer):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::writeBarrier):
      (JSC::DFG::SpeculativeJIT::nonSpeculativeCompare):
      (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
      (JSC::DFG::SpeculativeJIT::compare):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::callOperation):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::cachedPutById):
      (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
      (JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator):
      (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::cachedPutById):
      (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
      (JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator):
      (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGThunks.cpp:
      (JSC::DFG::emitPointerValidation):
      (JSC::DFG::throwExceptionFromCallSlowPathGenerator):
      (JSC::DFG::slowPathFor):
      (JSC::DFG::linkForThunkGenerator):
      (JSC::DFG::linkCallThunkGenerator):
      (JSC::DFG::linkConstructThunkGenerator):
      (JSC::DFG::linkClosureCallThunkGenerator):
      (JSC::DFG::virtualForThunkGenerator):
      (JSC::DFG::virtualCallThunkGenerator):
      (JSC::DFG::virtualConstructThunkGenerator):
      * dfg/DFGThunks.h:
      * ftl/FTLIntrinsicRepository.h:
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::compileCallOrConstruct):
      * ftl/FTLOSRExitCompiler.h:
      * jit/AssemblyHelpers.h:
      * jit/JIT.cpp:
      (JSC::JIT::linkFor):
      (JSC::JIT::linkSlowCall):
      * jit/JITCall.cpp:
      (JSC::JIT::compileCallEvalSlowCase):
      (JSC::JIT::compileOpCallSlowCase):
      (JSC::JIT::privateCompileClosureCall):
      * jit/JITCall32_64.cpp:
      (JSC::JIT::compileCallEvalSlowCase):
      (JSC::JIT::compileOpCallSlowCase):
      (JSC::JIT::privateCompileClosureCall):
      * jit/JITOperationWrappers.h: Removed.
      * jit/JITOperations.cpp: Removed.
      * jit/JITOperations.h: Removed.
      * jit/RegisterSet.h: Removed.
      * jit/Repatch.cpp: Removed.
      * jit/Repatch.h: Removed.
      * jit/ScratchRegisterAllocator.h: Removed.
      * jit/ThunkGenerators.cpp:
      (JSC::generateSlowCaseFor):
      (JSC::linkForGenerator):
      (JSC::linkCallGenerator):
      (JSC::linkConstructGenerator):
      (JSC::linkClosureCallGenerator):
      (JSC::virtualForGenerator):
      (JSC::virtualCallGenerator):
      (JSC::virtualConstructGenerator):
      * jit/ThunkGenerators.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da4645e1
    • fpizlo@apple.com's avatar
      Move DFG inline caching logic into jit/ · 4513333c
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121749
      
      Rubber stamped by Sam Weinig.
              
      We want to get rid of the baseline JIT's inline caching machinery and have it use the
      DFG's instead. But before we do that we need to move the DFG's inline caching machine
      out from behind its ENABLE(DFG_JIT) guards and make it available to the whole system.
      This patch does that:
              
      - dfg/DFGRepatch becomes jit/Repatch.
              
      - The thunks used by the DFG IC go into jit/ThunkGenerators, instead of dfg/DFGThunks.
              
      - The operations used by the DFG IC go into jit/JITOperations, instead of
        dfg/DFGOperations.
              
      - The old JIT's thunk generators for calls are renamed to reduce confusion. Previously
        it was easy to know which generators belong to which JIT because the old JIT used
        JSC::virtualCallBlah and the DFG used JSC::DFG::virtualCallBlah, but that's not the
        case anymore. Note that the old JIT's thunk generators will die in a future patch.
              
      No functional changes beyond those moves.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/CallLinkInfo.cpp:
      (JSC::CallLinkInfo::unlink):
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::resetStubInternal):
      * bytecode/StructureStubInfo.h:
      * dfg/DFGCallArrayAllocatorSlowPathGenerator.h:
      (JSC::DFG::CallArrayAllocatorSlowPathGenerator::CallArrayAllocatorSlowPathGenerator):
      (JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::CallArrayAllocatorWithVariableSizeSlowPathGenerator):
      * dfg/DFGJITCompiler.h:
      * dfg/DFGOSRExitCompiler.h:
      * dfg/DFGOperations.cpp:
      (JSC::DFG::operationPutByValInternal):
      * dfg/DFGOperations.h:
      (JSC::DFG::operationNewTypedArrayWithSizeForType):
      (JSC::DFG::operationNewTypedArrayWithOneArgumentForType):
      * dfg/DFGRegisterSet.h: Removed.
      * dfg/DFGRepatch.cpp: Removed.
      * dfg/DFGRepatch.h: Removed.
      * dfg/DFGScratchRegisterAllocator.h: Removed.
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::nonSpeculativeCompare):
      (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
      (JSC::DFG::SpeculativeJIT::compare):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::callOperation):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::cachedPutById):
      (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
      (JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator):
      (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::cachedPutById):
      (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
      (JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator):
      (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGThunks.cpp:
      * dfg/DFGThunks.h:
      * ftl/FTLIntrinsicRepository.h:
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::compileCallOrConstruct):
      * jit/AssemblyHelpers.h:
      (JSC::AssemblyHelpers::writeBarrier):
      * jit/JIT.cpp:
      (JSC::JIT::linkFor):
      (JSC::JIT::linkSlowCall):
      * jit/JITCall.cpp:
      (JSC::JIT::compileCallEval):
      (JSC::JIT::compileCallEvalSlowCase):
      (JSC::JIT::compileOpCallSlowCase):
      (JSC::JIT::privateCompileClosureCall):
      * jit/JITCall32_64.cpp:
      (JSC::JIT::compileCallEvalSlowCase):
      (JSC::JIT::compileOpCallSlowCase):
      (JSC::JIT::privateCompileClosureCall):
      * jit/JITOperationWrappers.h: Added.
      * jit/JITOperations.cpp: Added.
      * jit/JITOperations.h: Added.
      * jit/RegisterSet.h: Added.
      (JSC::RegisterSet::RegisterSet):
      (JSC::RegisterSet::asPOD):
      (JSC::RegisterSet::copyInfo):
      (JSC::RegisterSet::set):
      (JSC::RegisterSet::setGPRByIndex):
      (JSC::RegisterSet::clear):
      (JSC::RegisterSet::get):
      (JSC::RegisterSet::getGPRByIndex):
      (JSC::RegisterSet::getFreeGPR):
      (JSC::RegisterSet::setFPRByIndex):
      (JSC::RegisterSet::getFPRByIndex):
      (JSC::RegisterSet::setByIndex):
      (JSC::RegisterSet::getByIndex):
      (JSC::RegisterSet::numberOfSetGPRs):
      (JSC::RegisterSet::numberOfSetFPRs):
      (JSC::RegisterSet::numberOfSetRegisters):
      (JSC::RegisterSet::setBit):
      (JSC::RegisterSet::clearBit):
      (JSC::RegisterSet::getBit):
      * jit/Repatch.cpp: Added.
      (JSC::repatchCall):
      (JSC::repatchByIdSelfAccess):
      (JSC::addStructureTransitionCheck):
      (JSC::replaceWithJump):
      (JSC::emitRestoreScratch):
      (JSC::linkRestoreScratch):
      (JSC::generateProtoChainAccessStub):
      (JSC::tryCacheGetByID):
      (JSC::repatchGetByID):
      (JSC::getPolymorphicStructureList):
      (JSC::patchJumpToGetByIdStub):
      (JSC::tryBuildGetByIDList):
      (JSC::buildGetByIDList):
      (JSC::appropriateGenericPutByIdFunction):
      (JSC::appropriateListBuildingPutByIdFunction):
      (JSC::emitPutReplaceStub):
      (JSC::emitPutTransitionStub):
      (JSC::tryCachePutByID):
      (JSC::repatchPutByID):
      (JSC::tryBuildPutByIdList):
      (JSC::buildPutByIdList):
      (JSC::tryRepatchIn):
      (JSC::repatchIn):
      (JSC::linkSlowFor):
      (JSC::linkFor):
      (JSC::linkClosureCall):
      (JSC::resetGetByID):
      (JSC::resetPutByID):
      (JSC::resetIn):
      * jit/Repatch.h: Added.
      (JSC::resetGetByID):
      (JSC::resetPutByID):
      (JSC::resetIn):
      * jit/ScratchRegisterAllocator.h: Added.
      (JSC::ScratchRegisterAllocator::ScratchRegisterAllocator):
      (JSC::ScratchRegisterAllocator::lock):
      (JSC::ScratchRegisterAllocator::allocateScratch):
      (JSC::ScratchRegisterAllocator::allocateScratchGPR):
      (JSC::ScratchRegisterAllocator::allocateScratchFPR):
      (JSC::ScratchRegisterAllocator::didReuseRegisters):
      (JSC::ScratchRegisterAllocator::preserveReusedRegistersByPushing):
      (JSC::ScratchRegisterAllocator::restoreReusedRegistersByPopping):
      (JSC::ScratchRegisterAllocator::desiredScratchBufferSize):
      (JSC::ScratchRegisterAllocator::preserveUsedRegistersToScratchBuffer):
      (JSC::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBuffer):
      * jit/ThunkGenerators.cpp:
      (JSC::oldStyleGenerateSlowCaseFor):
      (JSC::oldStyleLinkForGenerator):
      (JSC::oldStyleLinkCallGenerator):
      (JSC::oldStyleLinkConstructGenerator):
      (JSC::oldStyleLinkClosureCallGenerator):
      (JSC::oldStyleVirtualForGenerator):
      (JSC::oldStyleVirtualCallGenerator):
      (JSC::oldStyleVirtualConstructGenerator):
      (JSC::emitPointerValidation):
      (JSC::throwExceptionFromCallSlowPathGenerator):
      (JSC::slowPathFor):
      (JSC::linkForThunkGenerator):
      (JSC::linkCallThunkGenerator):
      (JSC::linkConstructThunkGenerator):
      (JSC::linkClosureCallThunkGenerator):
      (JSC::virtualForThunkGenerator):
      (JSC::virtualCallThunkGenerator):
      (JSC::virtualConstructThunkGenerator):
      * jit/ThunkGenerators.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4513333c
    • andersca@apple.com's avatar
      Fix the non-DFG build. · 75d55eac
      andersca@apple.com authored
      * interpreter/Interpreter.cpp:
      (JSC::unwindCallFrame):
      * interpreter/StackVisitor.cpp:
      (JSC::StackVisitor::Frame::r):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      75d55eac
    • fpizlo@apple.com's avatar
      Get rid of IsInlinedCodeTag and its associated methods since it's unused · 71309443
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121737
      
      Source/JavaScriptCore: 
      
      Reviewed by Sam Weinig.
              
      This was meant to be easy, but I kept wondering if it was safe to remove the
      inline call frame check in Arguments::tearOff(). The check was clearly dead
      since the bit wasn't being set anywhere.
              
      It turns out that the unwindCallFrame() function was relying on tearOff()
      doing the right thing for inlined code, but it wasn't even passing it an
      inline call frame. I fixed this by having unwindCallFrame() inlining check,
      while also making sure that the code uses the right operand index for the
      arguments register.
      
      * interpreter/CallFrame.h:
      * interpreter/CallFrameInlines.h:
      * interpreter/Interpreter.cpp:
      (JSC::unwindCallFrame):
      * interpreter/StackVisitor.cpp:
      (JSC::StackVisitor::Frame::r):
      * interpreter/StackVisitor.h:
      * runtime/Arguments.cpp:
      (JSC::Arguments::tearOff):
      
      LayoutTests: 
      
      Reviewed by Sam Weinig.
      
      * js/dfg-inline-arguments-capture-throw-exception-expected.txt: Added.
      * js/dfg-inline-arguments-capture-throw-exception.html: Added.
      * js/script-tests/dfg-inline-arguments-capture-throw-exception.js: Added.
      (foo):
      (bar):
      (makeF):
      (recurse):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      71309443
  7. 20 Sep, 2013 7 commits
    • mhahnenberg@apple.com's avatar
      (un)shiftCountWithAnyIndexingType will start over in the middle of copying if it sees a hole · 40fcdef2
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121717
      
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore:
      
      This bug caused the array to become corrupted. We now check for holes before we start moving things,
      and start moving things only once we've determined that there are none.
      
      * runtime/JSArray.cpp:
      (JSC::JSArray::shiftCountWithAnyIndexingType):
      (JSC::JSArray::unshiftCountWithAnyIndexingType):
      
      LayoutTests:
      
      Added test to make sure that splicing an array with holes works correctly.
      
      * js/array-splice-with-holes-expected.txt: Added.
      * js/array-splice-with-holes.html: Added.
      * js/script-tests/array-splice-with-holes.js: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      40fcdef2
    • fpizlo@apple.com's avatar
      REGRESSION(r156047): WebCore hangs inside JSC::toInt32(double) · ec1b45ac
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121648
      
      Source/JavaScriptCore: 
      
      Reviewed by Mark Hahnenberg.
              
      The Int52<->StrictInt52 conversion did the opposite fill() than what it was
      supposed to. For example when converting a Int52 to a StrictInt52 it would fill
      as Int52, and vice-versa.
      
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::fillSpeculateInt52):
      
      LayoutTests: 
      
      Reviewed by Mark Hahnenberg.
      
      * js/dfg-int52-change-format-expected.txt: Added.
      * js/dfg-int52-change-format.html: Added.
      * js/script-tests/dfg-int52-change-format.js: Added.
      (foo):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ec1b45ac
    • oliver@apple.com's avatar
      REGRESSION(r153215): New iCloud site crashes · 83ec76bb
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121710
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore:
      
      Don't claim to be able to rely on the arguments structure, use the Arguments
      speculation type
      
      * dfg/DFGAbstractInterpreterInlines.h:
      (JSC::DFG::::executeEffects):
      
      LayoutTests:
      
      New test case
      
      * js/dfg-arguments-mutated-structure-expected.txt: Added.
      * js/dfg-arguments-mutated-structure.html: Added.
      * js/script-tests/dfg-arguments-mutated-structure.js: Added.
      (foo):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      83ec76bb
    • mhahnenberg@apple.com's avatar
      Clobberize phase forgets to indicate that it writes GCState for several node types · 144a6878
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121702
      
      Reviewed by Oliver Hunt.
      
      Added read and write for GCState to the nodes that could end up allocating (and thereby
      cause a garbage collection).
      
      * dfg/DFGClobberize.h:
      (JSC::DFG::clobberize):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      144a6878
    • fpizlo@apple.com's avatar
      Move CCallHelpers and AssemblyHelpers into jit/ and have JSInterfaceJIT use them · cd8eb2c1
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121637
      
      Rubber stamped by Michael Saboff.
              
      Also moved GPRInfo/FPRInfo into jit/. Rolling back in after fixing JIT-only build
      and tests.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/ValueRecovery.h:
      (JSC::ValueRecovery::dumpInContext):
      * dfg/DFGAssemblyHelpers.cpp: Removed.
      * dfg/DFGAssemblyHelpers.h: Removed.
      * dfg/DFGBinarySwitch.h:
      * dfg/DFGByteCodeParser.cpp:
      * dfg/DFGCCallHelpers.h: Removed.
      * dfg/DFGDisassembler.cpp:
      * dfg/DFGFPRInfo.h: Removed.
      * dfg/DFGGPRInfo.h: Removed.
      * dfg/DFGGraph.cpp:
      * dfg/DFGGraph.h:
      * dfg/DFGJITCompiler.h:
      * dfg/DFGOSRExit.cpp:
      * dfg/DFGOSRExit.h:
      * dfg/DFGOSRExitCompiler.h:
      * dfg/DFGOSRExitCompilerCommon.h:
      * dfg/DFGRegisterBank.h:
      * dfg/DFGRegisterSet.h:
      * dfg/DFGRepatch.cpp:
      * dfg/DFGSilentRegisterSavePlan.h:
      * dfg/DFGThunks.cpp:
      * dfg/DFGVariableEvent.cpp:
      * ftl/FTLCArgumentGetter.h:
      (JSC::FTL::CArgumentGetter::CArgumentGetter):
      (JSC::FTL::CArgumentGetter::loadNext8):
      (JSC::FTL::CArgumentGetter::loadNext32):
      (JSC::FTL::CArgumentGetter::loadNext64):
      (JSC::FTL::CArgumentGetter::loadNextPtr):
      (JSC::FTL::CArgumentGetter::loadNextDouble):
      * ftl/FTLCompile.cpp:
      * ftl/FTLExitThunkGenerator.h:
      * ftl/FTLLink.cpp:
      * ftl/FTLThunks.cpp:
      * jit/AssemblyHelpers.cpp: Copied from Source/JavaScriptCore/dfg/DFGAssemblyHelpers.cpp.
      * jit/AssemblyHelpers.h: Copied from Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h.
      (JSC::AssemblyHelpers::AssemblyHelpers):
      (JSC::AssemblyHelpers::debugCall):
      * jit/CCallHelpers.h: Copied from Source/JavaScriptCore/dfg/DFGCCallHelpers.h.
      * jit/FPRInfo.h: Copied from Source/JavaScriptCore/dfg/DFGFPRInfo.h.
      (WTF::printInternal):
      * jit/GPRInfo.h: Copied from Source/JavaScriptCore/dfg/DFGGPRInfo.h.
      (WTF::printInternal):
      * jit/JIT.cpp:
      (JSC::JIT::JIT):
      * jit/JIT.h:
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::stringGetByValStubGenerator):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::stringGetByValStubGenerator):
      * jit/JSInterfaceJIT.h:
      (JSC::JSInterfaceJIT::JSInterfaceJIT):
      * jit/SpecializedThunkJIT.h:
      (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
      (JSC::SpecializedThunkJIT::finalize):
      * jit/ThunkGenerators.cpp:
      (JSC::linkForGenerator):
      (JSC::virtualForGenerator):
      (JSC::stringLengthTrampolineGenerator):
      (JSC::nativeForGenerator):
      (JSC::arityFixup):
      (JSC::charCodeAtThunkGenerator):
      (JSC::charAtThunkGenerator):
      (JSC::fromCharCodeThunkGenerator):
      (JSC::sqrtThunkGenerator):
      (JSC::floorThunkGenerator):
      (JSC::ceilThunkGenerator):
      (JSC::roundThunkGenerator):
      (JSC::expThunkGenerator):
      (JSC::logThunkGenerator):
      (JSC::absThunkGenerator):
      (JSC::powThunkGenerator):
      (JSC::imulThunkGenerator):
      * llint/LLIntThunks.cpp:
      (JSC::LLInt::generateThunkWithJumpTo):
      * runtime/JSCJSValue.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cd8eb2c1
    • allan.jensen@digia.com's avatar
      Inline method exported · b941b0d1
      allan.jensen@digia.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121664
      
      Reviewed by Darin Adler.
      
      WatchDog::didFire() is marked as an exported symbol eventhough it is
      defined inline. This breaks the build on MinGW since it results in dllimport
      being declared on a definition.
      
      * runtime/Watchdog.h:
      (JSC::Watchdog::didFire):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b941b0d1
    • paroga@webkit.org's avatar
      [CMake] Use COMPILE_DEFINITIONS target property for setting BUILDING_* defines · 7249361b
      paroga@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=121672
      
      Reviewed by Gyuyoung Kim.
      
      Since the scope of add_definitions() is always a whole file, we need to use
      target properties instead to set definitions only for specific targets.
      
      Source/JavaScriptCore:
      
      * CMakeLists.txt:
      
      Source/WebCore:
      
      * CMakeLists.txt:
      
      Source/WebKit:
      
      * CMakeLists.txt:
      
      Source/WTF:
      
      * wtf/CMakeLists.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7249361b
  8. 19 Sep, 2013 6 commits
    • bfulgham@apple.com's avatar
      Unreviewed, rolling out r156120. · 63eba56c
      bfulgham@apple.com authored
      http://trac.webkit.org/changeset/156120
      https://bugs.webkit.org/show_bug.cgi?id=121651
      
      Broke windows runtime and all tests (Requested by bfulgham on
      #webkit).
      
      Patch by Commit Queue <commit-queue@webkit.org> on 2013-09-19
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/ValueRecovery.h:
      (JSC::ValueRecovery::dumpInContext):
      * dfg/DFGAssemblyHelpers.cpp: Renamed from Source/JavaScriptCore/jit/AssemblyHelpers.cpp.
      (JSC::DFG::AssemblyHelpers::executableFor):
      (JSC::DFG::AssemblyHelpers::decodedCodeMapFor):
      (JSC::DFG::AssemblyHelpers::setSamplingFlag):
      (JSC::DFG::AssemblyHelpers::clearSamplingFlag):
      (JSC::DFG::AssemblyHelpers::jitAssertIsInt32):
      (JSC::DFG::AssemblyHelpers::jitAssertIsJSInt32):
      (JSC::DFG::AssemblyHelpers::jitAssertIsJSNumber):
      (JSC::DFG::AssemblyHelpers::jitAssertIsJSDouble):
      (JSC::DFG::AssemblyHelpers::jitAssertIsCell):
      (JSC::DFG::AssemblyHelpers::jitAssertHasValidCallFrame):
      * dfg/DFGAssemblyHelpers.h: Renamed from Source/JavaScriptCore/jit/AssemblyHelpers.h.
      (JSC::DFG::AssemblyHelpers::AssemblyHelpers):
      (JSC::DFG::AssemblyHelpers::codeBlock):
      (JSC::DFG::AssemblyHelpers::vm):
      (JSC::DFG::AssemblyHelpers::assembler):
      (JSC::DFG::AssemblyHelpers::preserveReturnAddressAfterCall):
      (JSC::DFG::AssemblyHelpers::restoreReturnAddressBeforeReturn):
      (JSC::DFG::AssemblyHelpers::emitGetFromCallFrameHeaderPtr):
      (JSC::DFG::AssemblyHelpers::emitPutToCallFrameHeader):
      (JSC::DFG::AssemblyHelpers::emitPutImmediateToCallFrameHeader):
      (JSC::DFG::AssemblyHelpers::branchIfNotCell):
      (JSC::DFG::AssemblyHelpers::addressFor):
      (JSC::DFG::AssemblyHelpers::tagFor):
      (JSC::DFG::AssemblyHelpers::payloadFor):
      (JSC::DFG::AssemblyHelpers::branchIfNotObject):
      (JSC::DFG::AssemblyHelpers::selectScratchGPR):
      (JSC::DFG::AssemblyHelpers::debugCall):
      (JSC::DFG::AssemblyHelpers::jitAssertIsInt32):
      (JSC::DFG::AssemblyHelpers::jitAssertIsJSInt32):
      (JSC::DFG::AssemblyHelpers::jitAssertIsJSNumber):
      (JSC::DFG::AssemblyHelpers::jitAssertIsJSDouble):
      (JSC::DFG::AssemblyHelpers::jitAssertIsCell):
      (JSC::DFG::AssemblyHelpers::jitAssertHasValidCallFrame):
      (JSC::DFG::AssemblyHelpers::boxDouble):
      (JSC::DFG::AssemblyHelpers::unboxDouble):
      (JSC::DFG::AssemblyHelpers::boxInt52):
      (JSC::DFG::AssemblyHelpers::emitExceptionCheck):
      (JSC::DFG::AssemblyHelpers::emitCount):
      (JSC::DFG::AssemblyHelpers::globalObjectFor):
      (JSC::DFG::AssemblyHelpers::strictModeFor):
      (JSC::DFG::AssemblyHelpers::baselineCodeBlockFor):
      (JSC::DFG::AssemblyHelpers::baselineCodeBlock):
      (JSC::DFG::AssemblyHelpers::argumentsRegisterFor):
      (JSC::DFG::AssemblyHelpers::symbolTableFor):
      (JSC::DFG::AssemblyHelpers::offsetOfLocals):
      (JSC::DFG::AssemblyHelpers::offsetOfArgumentsIncludingThis):
      * dfg/DFGBinarySwitch.h:
      * dfg/DFGByteCodeParser.cpp:
      * dfg/DFGCCallHelpers.h: Renamed from Source/JavaScriptCore/jit/CCallHelpers.h.
      (JSC::DFG::CCallHelpers::CCallHelpers):
      (JSC::DFG::CCallHelpers::resetCallArguments):
      (JSC::DFG::CCallHelpers::addCallArgument):
      (JSC::DFG::CCallHelpers::setupArguments):
      (JSC::DFG::CCallHelpers::setupArgumentsExecState):
      (JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
      (JSC::DFG::CCallHelpers::setupTwoStubArgs):
      (JSC::DFG::CCallHelpers::setupStubArguments):
      (JSC::DFG::CCallHelpers::setupResults):
      * dfg/DFGDisassembler.cpp:
      * dfg/DFGFPRInfo.h: Renamed from Source/JavaScriptCore/jit/FPRInfo.h.
      (JSC::DFG::FPRInfo::toRegister):
      (JSC::DFG::FPRInfo::toIndex):
      (JSC::DFG::FPRInfo::toArgumentRegister):
      (JSC::DFG::FPRInfo::debugName):
      * dfg/DFGGPRInfo.h: Renamed from Source/JavaScriptCore/jit/GPRInfo.h.
      (JSC::DFG::JSValueRegs::JSValueRegs):
      (JSC::DFG::JSValueRegs::payloadOnly):
      (JSC::DFG::JSValueRegs::operator!):
      (JSC::DFG::JSValueRegs::gpr):
      (JSC::DFG::JSValueRegs::payloadGPR):
      (JSC::DFG::JSValueSource::JSValueSource):
      (JSC::DFG::JSValueSource::unboxedCell):
      (JSC::DFG::JSValueSource::operator!):
      (JSC::DFG::JSValueSource::isAddress):
      (JSC::DFG::JSValueSource::offset):
      (JSC::DFG::JSValueSource::base):
      (JSC::DFG::JSValueSource::gpr):
      (JSC::DFG::JSValueSource::asAddress):
      (JSC::DFG::JSValueSource::notAddress):
      (JSC::DFG::JSValueRegs::tagGPR):
      (JSC::DFG::JSValueSource::tagGPR):
      (JSC::DFG::JSValueSource::payloadGPR):
      (JSC::DFG::JSValueSource::hasKnownTag):
      (JSC::DFG::JSValueSource::tag):
      (JSC::DFG::GPRInfo::toRegister):
      (JSC::DFG::GPRInfo::toIndex):
      (JSC::DFG::GPRInfo::debugName):
      (JSC::DFG::GPRInfo::toArgumentRegister):
      * dfg/DFGGraph.cpp:
      * dfg/DFGGraph.h:
      * dfg/DFGJITCompiler.h:
      * dfg/DFGOSRExit.cpp:
      * dfg/DFGOSRExit.h:
      * dfg/DFGOSRExitCompiler.h:
      * dfg/DFGOSRExitCompilerCommon.h:
      * dfg/DFGRegisterBank.h:
      * dfg/DFGRegisterSet.h:
      * dfg/DFGRepatch.cpp:
      * dfg/DFGSilentRegisterSavePlan.h:
      * dfg/DFGThunks.cpp:
      * dfg/DFGVariableEvent.cpp:
      * ftl/FTLCArgumentGetter.h:
      (JSC::FTL::CArgumentGetter::CArgumentGetter):
      (JSC::FTL::CArgumentGetter::loadNext8):
      (JSC::FTL::CArgumentGetter::loadNext32):
      (JSC::FTL::CArgumentGetter::loadNext64):
      (JSC::FTL::CArgumentGetter::loadNextPtr):
      (JSC::FTL::CArgumentGetter::loadNextDouble):
      * ftl/FTLCompile.cpp:
      * ftl/FTLExitThunkGenerator.h:
      * ftl/FTLLink.cpp:
      * ftl/FTLThunks.cpp:
      * jit/JIT.cpp:
      (JSC::JIT::JIT):
      * jit/JIT.h:
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::stringGetByValStubGenerator):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::stringGetByValStubGenerator):
      * jit/JSInterfaceJIT.h:
      (JSC::JSInterfaceJIT::preserveReturnAddressAfterCall):
      (JSC::JSInterfaceJIT::restoreReturnAddressBeforeReturn):
      * jit/SpecializedThunkJIT.h:
      (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
      (JSC::SpecializedThunkJIT::finalize):
      * jit/ThunkGenerators.cpp:
      (JSC::linkForGenerator):
      (JSC::virtualForGenerator):
      (JSC::stringLengthTrampolineGenerator):
      (JSC::nativeForGenerator):
      (JSC::arityFixup):
      (JSC::charCodeAtThunkGenerator):
      (JSC::charAtThunkGenerator):
      (JSC::fromCharCodeThunkGenerator):
      (JSC::sqrtThunkGenerator):
      (JSC::floorThunkGenerator):
      (JSC::ceilThunkGenerator):
      (JSC::roundThunkGenerator):
      (JSC::expThunkGenerator):
      (JSC::logThunkGenerator):
      (JSC::absThunkGenerator):
      (JSC::powThunkGenerator):
      (JSC::imulThunkGenerator):
      * llint/LLIntThunks.cpp:
      (JSC::LLInt::generateThunkWithJumpTo):
      * runtime/JSCJSValue.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      63eba56c
    • fpizlo@apple.com's avatar
      Unreviewed, fix Windows build part 2. m_jitCodeMap should always be there. · bd827bbe
      fpizlo@apple.com authored
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::jitCodeMap):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bd827bbe
    • fpizlo@apple.com's avatar
      Remove some of the tautologies in DFGRepatch function naming. · 6d59f9e2
      fpizlo@apple.com authored
      Rubber stamped by Mark Hahnenberg.
              
      For example change DFG::dfgLinkFor() to be DFG::linkFor().
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::resetStubInternal):
      * dfg/DFGOperations.cpp:
      * dfg/DFGRepatch.cpp:
      (JSC::DFG::repatchCall):
      (JSC::DFG::repatchByIdSelfAccess):
      (JSC::DFG::tryCacheGetByID):
      (JSC::DFG::repatchGetByID):
      (JSC::DFG::buildGetByIDList):
      (JSC::DFG::tryCachePutByID):
      (JSC::DFG::repatchPutByID):
      (JSC::DFG::buildPutByIdList):
      (JSC::DFG::repatchIn):
      (JSC::DFG::linkFor):
      (JSC::DFG::linkSlowFor):
      (JSC::DFG::linkClosureCall):
      (JSC::DFG::resetGetByID):
      (JSC::DFG::resetPutByID):
      (JSC::DFG::resetIn):
      * dfg/DFGRepatch.h:
      (JSC::DFG::resetGetByID):
      (JSC::DFG::resetPutByID):
      (JSC::DFG::resetIn):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d59f9e2
    • fpizlo@apple.com's avatar
      Unreviewed, fix Windows build. ScratchBuffer should always be available regardless of · 994f4bf8
      fpizlo@apple.com authored
      ENABLE_DFG_JIT.
      
      * runtime/VM.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      994f4bf8
    • dbates@webkit.org's avatar
      [iOS] Add more iOS logic to the JavaScriptCore build configuration files · 2476f5cb
      dbates@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=121635
      
      Reviewed by Geoffrey Garen.
      
      Towards building JavaScriptCore for both OS X and iOS using the same
      set of configuration files, add more iOS logic.
      
      * Configurations/Base.xcconfig:
      * Configurations/JSC.xcconfig:
      * Configurations/JavaScriptCore.xcconfig:
      * Configurations/ToolExecutable.xcconfig:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2476f5cb
    • fpizlo@apple.com's avatar
      Move CCallHelpers and AssemblyHelpers into jit/ and have JSInterfaceJIT use them · 620acab5
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121637
      
      Rubber stamped by Michael Saboff.
              
      Also moved GPRInfo/FPRInfo into jit/.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/ValueRecovery.h:
      (JSC::ValueRecovery::dumpInContext):
      * dfg/DFGAssemblyHelpers.cpp: Removed.
      * dfg/DFGAssemblyHelpers.h: Removed.
      * dfg/DFGBinarySwitch.h:
      * dfg/DFGByteCodeParser.cpp:
      * dfg/DFGCCallHelpers.h: Removed.
      * dfg/DFGDisassembler.cpp:
      * dfg/DFGFPRInfo.h: Removed.
      * dfg/DFGGPRInfo.h: Removed.
      * dfg/DFGGraph.cpp:
      * dfg/DFGGraph.h:
      * dfg/DFGJITCompiler.h:
      * dfg/DFGOSRExit.cpp:
      * dfg/DFGOSRExit.h:
      * dfg/DFGOSRExitCompiler.h:
      * dfg/DFGOSRExitCompilerCommon.h:
      * dfg/DFGRegisterBank.h:
      * dfg/DFGRegisterSet.h:
      * dfg/DFGRepatch.cpp:
      * dfg/DFGSilentRegisterSavePlan.h:
      * dfg/DFGThunks.cpp:
      * dfg/DFGVariableEvent.cpp:
      * ftl/FTLCArgumentGetter.h:
      (JSC::FTL::CArgumentGetter::CArgumentGetter):
      (JSC::FTL::CArgumentGetter::loadNext8):
      (JSC::FTL::CArgumentGetter::loadNext32):
      (JSC::FTL::CArgumentGetter::loadNext64):
      (JSC::FTL::CArgumentGetter::loadNextPtr):
      (JSC::FTL::CArgumentGetter::loadNextDouble):
      * ftl/FTLCompile.cpp:
      * ftl/FTLExitThunkGenerator.h:
      * ftl/FTLLink.cpp:
      * ftl/FTLThunks.cpp:
      * jit/AssemblyHelpers.cpp: Copied from Source/JavaScriptCore/dfg/DFGAssemblyHelpers.cpp.
      * jit/AssemblyHelpers.h: Copied from Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h.
      (JSC::AssemblyHelpers::AssemblyHelpers):
      (JSC::AssemblyHelpers::debugCall):
      * jit/CCallHelpers.h: Copied from Source/JavaScriptCore/dfg/DFGCCallHelpers.h.
      * jit/FPRInfo.h: Copied from Source/JavaScriptCore/dfg/DFGFPRInfo.h.
      (WTF::printInternal):
      * jit/GPRInfo.h: Copied from Source/JavaScriptCore/dfg/DFGGPRInfo.h.
      (WTF::printInternal):
      * jit/JIT.cpp:
      (JSC::JIT::JIT):
      * jit/JIT.h:
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::stringGetByValStubGenerator):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::stringGetByValStubGenerator):
      * jit/JSInterfaceJIT.h:
      (JSC::JSInterfaceJIT::JSInterfaceJIT):
      * jit/SpecializedThunkJIT.h:
      (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
      (JSC::SpecializedThunkJIT::finalize):
      * jit/ThunkGenerators.cpp:
      (JSC::linkForGenerator):
      (JSC::virtualForGenerator):
      (JSC::stringLengthTrampolineGenerator):
      (JSC::nativeForGenerator):
      (JSC::arityFixup):
      (JSC::charCodeAtThunkGenerator):
      (JSC::charAtThunkGenerator):
      (JSC::fromCharCodeThunkGenerator):
      (JSC::sqrtThunkGenerator):
      (JSC::floorThunkGenerator):
      (JSC::ceilThunkGenerator):
      (JSC::roundThunkGenerator):
      (JSC::expThunkGenerator):
      (JSC::logThunkGenerator):
      (JSC::absThunkGenerator):
      (JSC::powThunkGenerator):
      (JSC::imulThunkGenerator):
      * llint/LLIntThunks.cpp:
      (JSC::LLInt::generateThunkWithJumpTo):
      * runtime/JSCJSValue.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      620acab5