Move DFG inline caching logic into jit/.
https://bugs.webkit.org/show_bug.cgi?id=121749.

Reviewed by Geoffrey Garen.

Relanding http://trac.webkit.org/changeset/156235 after rebasing to latest
revision and fixing build breakages on Windows.

* 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):
* ftl/FTLOSRExitCompiler.h:
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::writeBarrier):
* 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: Copied from Source/JavaScriptCore/jit/JITOperationWrappers.h.
* jit/JITOperations.cpp: Copied from Source/JavaScriptCore/jit/JITOperations.cpp.
(JSC::getHostCallReturnValueWithExecState):
* jit/JITOperations.h: Copied from Source/JavaScriptCore/jit/JITOperations.h.
* jit/RegisterSet.h: Copied from Source/JavaScriptCore/jit/RegisterSet.h.
* jit/Repatch.cpp: Copied from Source/JavaScriptCore/jit/Repatch.cpp.
(JSC::tryBuildGetByIDList):
* jit/Repatch.h: Copied from Source/JavaScriptCore/jit/Repatch.h.
* jit/ScratchRegisterAllocator.h: Copied from Source/JavaScriptCore/jit/ScratchRegisterAllocator.h.
* 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@156490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change a couple of HashMap value types from OwnPtr to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=121973

Reviewed by Andreas Kling.

Source/JavaScriptCore:

* API/JSClassRef.cpp:
(OpaqueJSClassContextData::OpaqueJSClassContextData):
(OpaqueJSClass::contextData):
* API/JSClassRef.h:
* bytecode/SamplingTool.h:
* ftl/FTLAbstractHeap.h:
* parser/Parser.cpp:
(JSC::::parseFunctionInfo):
* parser/SourceProviderCache.cpp:
(JSC::SourceProviderCache::add):
* parser/SourceProviderCache.h:
* parser/SourceProviderCacheItem.h:
(JSC::SourceProviderCacheItem::create):
* profiler/ProfilerCompilation.cpp:
(JSC::Profiler::Compilation::executionCounterFor):
(JSC::Profiler::Compilation::toJS):
* profiler/ProfilerCompilation.h:
* runtime/JSGlobalObject.h:

Source/WTF:

* wtf/RefPtrHashMap.h:
Add a missing std::forward.

* wtf/StdLibExtras.h:
(std::make_unique):
Add more overloads.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
build-webkit --inspector-frontend should copy WebInspectorUI files
https://bugs.webkit.org/show_bug.cgi?id=117851

Patch by Brian J. Burg <burg@cs.washington.edu> on 2013-09-26
Reviewed by Joseph Pecoraro.

Change the --inspector-frontend build option to additionally build/copy
WebInspectorUI by setting it as the only project that needs to be built.

* Scripts/build-webkit:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix the Windows build.

* jit/JITThunks.cpp:
(JSC::JITThunks::hostFunctionStub):
* jit/JITThunks.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout Test plugins/access-after-page-destroyed.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=121976

Reviewed by Anders Carlsson.

Clean up the test.

* plugins/access-after-page-destroyed-2-expected.txt: Added.
* plugins/access-after-page-destroyed-2.html: Copied from LayoutTests/plugins/access-after-page-destroyed.html.
This was testing two distinct issues, the second one unfittingly piled onto the first.
Split the test in two.

* plugins/access-after-page-destroyed-expected.txt:
* plugins/access-after-page-destroyed.html:
Modernized the test with js-test scripts, added a gc() call for predictability,
changed the test to fail quickly in the flaky case.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove the hash table mover
https://bugs.webkit.org/show_bug.cgi?id=121980

Reviewed by Andreas Kling.

Use std::move instead.

* wtf/HashTable.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r156464 and r156480.
http://trac.webkit.org/changeset/156464
http://trac.webkit.org/changeset/156480
https://bugs.webkit.org/show_bug.cgi?id=121981

Leaking too much and killi
ng buildbot. (Requested by xenon on
#webkit).

Source/JavaScriptCore:

* 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::FuncExprNode::emitBytecode):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createFormalParameterList):
(JSC::ASTBuilder::createForInLoop):
(JSC::ASTBuilder::addVar):
* parser/NodeConstructors.h:
(JSC::CommaNode::CommaNode):
(JSC::ParameterNode::ParameterNode):
(JSC::ForInNode::ForInNode):
* parser/Nodes.cpp:
(JSC::FunctionParameters::create):
(JSC::FunctionParameters::FunctionParameters):
(JSC::FunctionParameters::~FunctionParameters):
* parser/Nodes.h:
(JSC::CommaNode::append):
(JSC::ParameterNode::ident):
(JSC::FunctionParameters::at):
(JSC::FunctionParameters::identifiers):
* parser/Parser.cpp:
(JSC::::Parser):
(JSC::::parseVarDeclaration):
(JSC::::parseVarDeclarationList):
(JSC::::parseForStatement):
(JSC::::parseFormalParameters):
(JSC::::parseAssignmentExpression):
* parser/Parser.h:
(JSC::Scope::declareParameter):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createFormalParameterList):
(JSC::SyntaxChecker::createForInLoop):
(JSC::SyntaxChecker::operatorStackPop):
* runtime/JSONObject.cpp:
* runtime/JSONObject.h:

LayoutTests:

* js/destructuring-assignment-expected.txt: Removed.
* js/destructuring-assignment.html: Removed.
* 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: Removed.
* js/regress/destructuring-arguments-length-expected.txt: Removed.
* js/regress/destructuring-arguments-length.html: Removed.
* js/regress/destructuring-arguments.html: Removed.
* js/regress/destructuring-swap-expected.txt: Removed.
* js/regress/destructuring-swap.html: Removed.
* js/regress/script-tests/destructuring-arguments-length.js: Removed.
* js/regress/script-tests/destructuring-arguments.js: Removed.
* js/regress/script-tests/destructuring-swap.js: Removed.
* js/script-tests/destructuring-assignment.js: Removed.
* sputnik/Conformance/13_Function_Definition/S13_A5.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Pass VM instead of ExecState to many finishCreation() functions.
<https://webkit.org/b/121975>

Reviewed by Sam Weinig.

Reduce unnecessary loads by passing the VM to object creation
functions that don't need the ExecState.

There are tons of opportunities in this area, I'm just scratching
the surface.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update expected binding test results after r156498.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't mutate style in RenderCombineText
https://bugs.webkit.org/show_bug.cgi?id=121979

Reviewed by Andreas Kling.

Text renderers should always have the same style as the parent.

* rendering/InlineTextBox.cpp:
(WebCore::fontToUse):
(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::offsetForPosition):
(WebCore::InlineTextBox::positionForOffset):
        
    Select the modified font for text-combine.

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::styleDidChange):
(WebCore::RenderCombineText::combineText):
* rendering/RenderCombineText.h:
        
    Move the text-combine specific font style to a member of its own.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix build after r156487.
https://bugs.webkit.org/show_bug.cgi?id=121984

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-09-26
Reviewed by Anders Carlsson.

* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeMethod::jsObjectRef):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to fix the FTL build.

* ftl/FTLAbstractHeap.cpp:
(JSC::FTL::IndexedAbstractHeap::atSlow):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore: Work around another MSVC bug.

* runtime/PrototypeMap.cpp:
(JSC::PrototypeMap::emptyObjectStructureForPrototype):

Source/WTF: Build fixes.

Fix a paste-o.

* wtf/StdLibExtras.h:
(std::make_unique):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Expose a setting to disable hardware accelerated animations
https://bugs.webkit.org/show_bug.cgi?id=121978
<rdar://problem/15091284>

Reviewed by Eric Carlson.

Source/WebCore:

Expose acceleratedCompositedAnimationsEnabled
to disable CoreAnimation animations.

Test: LayoutTests/animations/transform-non-accelerated.html

* WebCore.exp.in: Export new method.
* page/Settings.in: Add new setting.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation): Don't go
to GraphicsLayer if the setting is false.

LayoutTests:

* animations/resources/animation-test-helpers.js: Add a callback
for when the tests finish. Minor cleanup.
(endTest):
(.else):
(runAnimationTest):
* animations/transform-non-accelerated.html: New test.
* animations/transform-non-accelerated-expected.txt: Result.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156506 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove needsDestruction from vector and hash traits
https://bugs.webkit.org/show_bug.cgi?id=121983

Reviewed by Sam Weinig.

For Vector, use std::is_trivially_destructible to determine whether to call the destructor.
For HashTable, always call the destructor; if it is trivial then no code will be generated for it and the loops will be folded away.

Removing this does break the ability to store objects with non-trivial destructors in vectors and hash maps
and have their destructors not be called when removed, but we've never used this feature in WebKit so the extra
code complexity is not worth it.

* wtf/HashTable.h:
(WTF::::deallocateTable):
* wtf/HashTraits.h:
* wtf/Vector.h:
(WTF::VectorTypeOperations::destruct):
* wtf/VectorTraits.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove Windows code
https://bugs.webkit.org/show_bug.cgi?id=121988

Reviewed by Antti Koivisto.

* Platform/CoreIPC/Connection.h:
* Platform/CoreIPC/win/ConnectionWin.cpp: Removed.
* Platform/SharedMemory.h:
* Platform/WorkQueue.h:
* Platform/win/SharedMemoryWin.cpp: Removed.
* Platform/win/WorkQueueWin.cpp: Removed.
* Shared/ChildProcess.cpp:
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::loadPluginsIfNecessary):
* WebProcess/WebProcess.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Flaky Test: transitions/cancel-transition.html
https://bugs.webkit.org/show_bug.cgi?id=114193

* platform/mac/TestExpectations: Marking as flaky. Dean says that such tests are
currently broken by design.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build fix after r156487.

Add explicit casting needed by MSVC to compile this code. Much
of this could probably be removed when we move to VS2012 or newer.

* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::jsFunction):
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Instance::createRuntimeObject):
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplyGeneric):
(WebCore::FEGaussianBlur::platformApply):
* platform/graphics/win/DIBPixelData.cpp:
(WebCore::DIBPixelData::DIBPixelData):
(WebCore::DIBPixelData::writeToFile):
* platform/graphics/win/DIBPixelData.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
VirtualRegister should be a class
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/DFGSpeculativeJIT32_64.cpp:
* 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/JITCall32_64.cpp:
* jit/JITInlines.h:
* jit/JITOpcodes.cpp:
* jit/JITOpcodes32_64.cpp:
* jit/JITPropertyAccess32_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@156511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r156510.
http://trac.webkit.org/changeset/156510
https://bugs.webkit.org/show_bug.cgi?id=121989

Landed in-progress code along with build fix. (Requested by
bfulgham on #webkit).

* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::jsFunction):
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Instance::createRuntimeObject):
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplyGeneric):
(WebCore::FEGaussianBlur::platformApply):
* platform/graphics/win/DIBPixelData.cpp:
(WebCore::DIBPixelData::writeToFile):
* platform/graphics/win/DIBPixelData.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156512 268f45cc-cd09-0410-ab3c-d52691b4dbfc