Inline allocate Arguments objects in the DFG
https://bugs.webkit.org/show_bug.cgi?id=131897

Reviewed by Geoffrey Garen.

Many libraries/frameworks depend on the arguments object for overloaded API entry points. 
This is the first step to making Arguments fast(er). We'll duplicate the logic in Arguments::create 
for now and take the slow path for complicated cases like slow arguments, tearing off for strict mode, etc.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::emitAllocateArguments):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::emitAllocateDestructibleObject):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* runtime/Arguments.h:
(JSC::Arguments::offsetOfActivation):
(JSC::Arguments::offsetOfOverrodeLength):
(JSC::Arguments::offsetOfIsStrictMode):
(JSC::Arguments::offsetOfRegisterArray):
(JSC::Arguments::offsetOfCallee):
(JSC::Arguments::allocationSize):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add HashSet::takeAny
https://bugs.webkit.org/show_bug.cgi?id=131928

Reviewed by Benjamin Poulain.

Source/WebCore:
* dom/Document.cpp:
(WebCore::Document::takeAnyMediaCanStartListener): Use HashSet::takeAny.
* dom/ScriptExecutionContext.cpp:
(WebCore::takeAny): Deleted.
(WebCore::ScriptExecutionContext::~ScriptExecutionContext): Use HashSet::takeAny.

Source/WTF:
* wtf/HashSet.h: Added an overload of take that takes an iterator,
and used it to implement both the existing take and new takeAny functions.

Tools:
* TestWebKitAPI/Tests/WTF/HashSet.cpp: Added a test for takeAny.


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