WebKit-https.git
4 years ago[MinGW] Fixed C99/C++11 format attributes in printf-like functions
annulen@yandex.ru [Sat, 5 Nov 2016 17:58:31 +0000 (17:58 +0000)]
[MinGW] Fixed C99/C++11 format attributes in printf-like functions
https://bugs.webkit.org/show_bug.cgi?id=164448

Reviewed by Michael Catanzaro.

By default MinGW uses printf-like function provided in msvcrt.dll,
however they miss support for C99/C++11 format attributes. Use MinGW
implementations instead.

.:

* Source/cmake/OptionsCommon.cmake: Define __USE_MINGW_ANSI_STDIO

Source/WTF:

* wtf/Assertions.h: Use gnu_printf format in WTF_ATTRIBUTE_PRINTF

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

4 years ago[JSCOnly] RunLoopGeneric should adopt MonotonicTime / WallTime change
utatane.tea@gmail.com [Sat, 5 Nov 2016 08:24:19 +0000 (08:24 +0000)]
[JSCOnly] RunLoopGeneric should adopt MonotonicTime / WallTime change
https://bugs.webkit.org/show_bug.cgi?id=164447

Reviewed by Csaba Osztrogonác.

Build fix for JSCOnly.

* wtf/generic/RunLoopGeneric.cpp:
(WTF::RunLoop::TimerBase::ScheduledTask::create):
(WTF::RunLoop::TimerBase::ScheduledTask::ScheduledTask):
(WTF::RunLoop::TimerBase::ScheduledTask::scheduledTimePoint):
(WTF::RunLoop::TimerBase::ScheduledTask::updateReadyTime):
(WTF::RunLoop::populateTasks):
(WTF::RunLoop::dispatchAfter):
(WTF::RunLoop::TimerBase::start):

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

4 years ago[SOUP] Layout test http/tests/misc/authentication-redirect-3/authentication-sent...
carlosgc@webkit.org [Sat, 5 Nov 2016 07:56:49 +0000 (07:56 +0000)]
[SOUP] Layout test http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html fails
https://bugs.webkit.org/show_bug.cgi?id=139358

Reviewed by Michael Catanzaro.

Source/WebKit2:

Stop putting the credentials in the URL unconditionally and ensure we only do that when provided by the URL
itself. Libsoup has its own cache of SoupAuth, so we don't need to pass user/pass in the URL for every single
request, libsoup will authenticate those automatically.

* NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::applyAuthenticationToRequest):

LayoutTests:

* platform/gtk/TestExpectations: Unskip http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html.

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

4 years agoWTF::ParkingLot should stop using std::chrono because std::chrono::duration casts...
fpizlo@apple.com [Sat, 5 Nov 2016 03:02:39 +0000 (03:02 +0000)]
WTF::ParkingLot should stop using std::chrono because std::chrono::duration casts are prone to overflows
https://bugs.webkit.org/show_bug.cgi?id=152045

Reviewed by Andy Estes.
Source/JavaScriptCore:

Probably the nicest example of why this patch is a good idea is the change in
AtomicsObject.cpp.

* jit/ICStats.cpp:
(JSC::ICStats::ICStats):
* runtime/AtomicsObject.cpp:
(JSC::atomicsFuncWait):

Source/WebCore:

No new layout tests because no new behavior. The new WTF time classes have some unit tests
in TestWebKitAPI.

* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::blobSize):
* platform/MainThreadSharedTimer.h:
* platform/SharedTimer.h:
* platform/ThreadTimers.cpp:
(WebCore::ThreadTimers::updateSharedTimer):
* platform/cf/MainThreadSharedTimerCF.cpp:
(WebCore::MainThreadSharedTimer::setFireInterval):
* platform/efl/MainThreadSharedTimerEfl.cpp:
(WebCore::MainThreadSharedTimer::setFireInterval):
* platform/glib/MainThreadSharedTimerGLib.cpp:
(WebCore::MainThreadSharedTimer::setFireInterval):
* platform/win/MainThreadSharedTimerWin.cpp:
(WebCore::MainThreadSharedTimer::setFireInterval):
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::runInMode):

Source/WebKit2:

* Platform/IPC/Connection.cpp:
(IPC::Connection::SyncMessageState::wait):
(IPC::Connection::sendMessage):
(IPC::Connection::timeoutRespectingIgnoreTimeoutsForTesting):
(IPC::Connection::waitForMessage):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::waitForSyncReply):
* Platform/IPC/Connection.h:
(IPC::Connection::sendSync):
(IPC::Connection::waitForAndDispatchImmediately):
* Platform/IPC/MessageSender.h:
(IPC::MessageSender::sendSync):
* UIProcess/ChildProcessProxy.h:
(WebKit::ChildProcessProxy::sendSync):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::applicationWillTerminate):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendProcessWillSuspendImminently):
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::applicationWillTerminate):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(-[WKOneShotDisplayLinkHandler displayLinkFired:]):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::stringSelectionForPasteboard):
(WebKit::WebPageProxy::dataSelectionForPasteboard):
(WebKit::WebPageProxy::readSelectionFromPasteboard):
(WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
(WebKit::WebPageProxy::acceptsFirstMouse):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
(WebKit::WebChromeClient::print):
(WebKit::WebChromeClient::exceededDatabaseQuota):
(WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::postSynchronousMessageForTesting):

Source/WTF:

We used to use 'double' for all time measurements. Sometimes it was milliseconds,
sometimes it was seconds. Sometimes we measured a span of time, sometimes we spoke of time
since some epoch. When we spoke of time since epoch, we either used a monotonic clock or
a wall clock. The type - always 'double' - never told us what kind of time we had, even
though there were roughly six of them (sec interval, ms interval, sec since epoch on wall,
ms since epoch on wall, sec since epoch monotonic, ms since epoch monotonic).

At some point, we thought that it would be a good idea to replace these doubles with
std::chrono. But since replacing some things with std::chrono, we found it to be terribly
inconvenient:

- Outrageous API. I never want to say std::chrono::milliseconds(blah). I never want to say
  std::chrono::steady_clock::timepoint. The syntax for duration_cast is ugly, and ideally
  duration_cast would not even be a thing.

- No overflow protection. std::chrono uses integers by default and using anything else is
  clumsy. But the integer math is done without regard for the rough edges of integer math,
  so any cast between std::chrono types risks overflow. Any comparison risks overflow
  because it may do conversions silently. We have even found bugs where some C++
  implementations had more overflows than others, which ends up being a special kind of
  hell. In many cases, the overflow also has nasal demons.

It's an error to represent time using integers. It would have been excusable back when
floating point math was not guaranteed to be supported on all platforms, but that would
have been a long time ago. Time is a continuous, infinite concept and it's a perfect fit
for floating point:

- Floating point preserves precision under multiplication in all but extreme cases, so
  using floating point for time means that unit conversions are almost completely
  lossless. This means that we don't have to think very hard about what units to use. In
  this patch, we use seconds almost everywhere. We only convert at boundaries, like an API
  boundary that wants something other than seconds.

- Floating point makes it easy to reason about infinity, which is something that time code
  wants to do a lot. Example: when would you like to timeout? Infinity please! This is the
  most elegant way of having an API support both a timeout variant and a no-timeout
  variant.

- Floating point does well-understood things when math goes wrong, and these things are
  pretty well optimized to match what a mathematician would do when computing with real
  numbers represented using scientific notation with a finite number of significant
  digits. This means that time math under floating point looks like normal math. On the
  other hand, std::chrono time math looks like garbage because you have to always check
  for multiple possible UB corners whenever you touch large integers. Integers that
  represent time are very likely to be large and you don't have to do much to overflow
  them. At this time, based on the number of bugs we have already seen due to chrono
  overflows, I am not certain that we even understand what are all of the corner cases
  that we should even check for.

This patch introduces a new set of timekeeping classes that are all based on double, and
all internally use seconds. These classes support algebraic typing. The classes are:

- Seconds: this is for measuring a duration.
- WallTime: time since epoch according to a wall clock (aka real time clock).
- MonotonicTime: time since epoch according to a monotonic clock.
- ClockType: enum that says either Wall or Monotonic.
- TimeWithDynamicClockType: a tuple of double and ClockType, which represents either a
  wall time or a monotonic time.

All of these classes behave like C++ values and are cheap to copy around since they are
very nearly POD. This supports comprehensive conversions between the various time types.
Most of this is by way of algebra. Here are just some of the rules we recognize:

WallTime = WallTime + Seconds
Seconds = WallTime - WallTime
MonotonicTime = MonotonicTime + Seconds
etc...

We support negative, infinite, and NaN times because math.

We support conversions between MonotonicTime and WallTime, like:

WallTime wt = mt.approximateWallTime()

This is called this "approximate" because the only way to do it is to get the current time
on both clocks and convert relative to that.

Many of our APIs would be happy using whatever notion of time the user wanted to use. For
those APIs, which includes Condition and ParkingLot, we have TimeWithDynamicClockType. You
can automatically convert WallTime or MonotonicTime to TimeWithDynamicClockType. This
means that if you use a WallTime with Condition::waitUntil, then Condition's internal
logic for when it should wake up makes its decision based on the current WallTime - but if
you use MonotonicTime then waitUntil will make its decision based on current
MonotonicTime. This is a greater level of flexibility than chrono allowed, since chrono
did not have the concept of a dynamic clock type.

This patch does not include conversions between std::chrono and these new time classes,
because past experience shows that we're quite bad at getting conversions between
std::chrono and anything else right. Also, I didn't need such conversion code because this
patch only converts code that transitively touches ParkingLot and Condition. It was easy
to get all of that code onto the new time classes.

* WTF.xcodeproj/project.pbxproj:
* wtf/AutomaticThread.cpp:
(WTF::AutomaticThread::start):
* wtf/CMakeLists.txt:
* wtf/ClockType.cpp: Added.
(WTF::printInternal):
* wtf/ClockType.h: Added.
* wtf/Condition.h:
(WTF::ConditionBase::waitUntil):
(WTF::ConditionBase::waitFor):
(WTF::ConditionBase::wait):
(WTF::ConditionBase::waitUntilWallClockSeconds): Deleted.
(WTF::ConditionBase::waitUntilMonotonicClockSeconds): Deleted.
(WTF::ConditionBase::waitForSeconds): Deleted.
(WTF::ConditionBase::waitForSecondsImpl): Deleted.
(WTF::ConditionBase::waitForImpl): Deleted.
(WTF::ConditionBase::absoluteFromRelative): Deleted.
* wtf/CrossThreadQueue.h:
(WTF::CrossThreadQueue<DataType>::waitForMessage):
* wtf/CurrentTime.cpp:
(WTF::sleep):
* wtf/MessageQueue.h:
(WTF::MessageQueue::infiniteTime): Deleted.
* wtf/MonotonicTime.cpp: Added.
(WTF::MonotonicTime::now):
(WTF::MonotonicTime::approximateWallTime):
(WTF::MonotonicTime::dump):
(WTF::MonotonicTime::sleep):
* wtf/MonotonicTime.h: Added.
(WTF::MonotonicTime::MonotonicTime):
(WTF::MonotonicTime::fromRawDouble):
(WTF::MonotonicTime::infinity):
(WTF::MonotonicTime::secondsSinceEpoch):
(WTF::MonotonicTime::approximateMonotonicTime):
(WTF::MonotonicTime::operator bool):
(WTF::MonotonicTime::operator+):
(WTF::MonotonicTime::operator-):
(WTF::MonotonicTime::operator+=):
(WTF::MonotonicTime::operator-=):
(WTF::MonotonicTime::operator==):
(WTF::MonotonicTime::operator!=):
(WTF::MonotonicTime::operator<):
(WTF::MonotonicTime::operator>):
(WTF::MonotonicTime::operator<=):
(WTF::MonotonicTime::operator>=):
* wtf/ParkingLot.cpp:
(WTF::ParkingLot::parkConditionallyImpl):
(WTF::ParkingLot::unparkOne):
(WTF::ParkingLot::unparkOneImpl):
(WTF::ParkingLot::unparkCount):
* wtf/ParkingLot.h:
(WTF::ParkingLot::parkConditionally):
(WTF::ParkingLot::compareAndPark):
* wtf/Seconds.cpp: Added.
(WTF::Seconds::operator+):
(WTF::Seconds::operator-):
(WTF::Seconds::dump):
(WTF::Seconds::sleep):
* wtf/Seconds.h: Added.
(WTF::Seconds::Seconds):
(WTF::Seconds::value):
(WTF::Seconds::seconds):
(WTF::Seconds::milliseconds):
(WTF::Seconds::microseconds):
(WTF::Seconds::nanoseconds):
(WTF::Seconds::fromMilliseconds):
(WTF::Seconds::fromMicroseconds):
(WTF::Seconds::fromNanoseconds):
(WTF::Seconds::infinity):
(WTF::Seconds::operator bool):
(WTF::Seconds::operator+):
(WTF::Seconds::operator-):
(WTF::Seconds::operator*):
(WTF::Seconds::operator/):
(WTF::Seconds::operator+=):
(WTF::Seconds::operator-=):
(WTF::Seconds::operator*=):
(WTF::Seconds::operator/=):
(WTF::Seconds::operator==):
(WTF::Seconds::operator!=):
(WTF::Seconds::operator<):
(WTF::Seconds::operator>):
(WTF::Seconds::operator<=):
(WTF::Seconds::operator>=):
* wtf/TimeWithDynamicClockType.cpp: Added.
(WTF::TimeWithDynamicClockType::now):
(WTF::TimeWithDynamicClockType::nowWithSameClock):
(WTF::TimeWithDynamicClockType::wallTime):
(WTF::TimeWithDynamicClockType::monotonicTime):
(WTF::TimeWithDynamicClockType::approximateWallTime):
(WTF::TimeWithDynamicClockType::approximateMonotonicTime):
(WTF::TimeWithDynamicClockType::operator-):
(WTF::TimeWithDynamicClockType::operator<):
(WTF::TimeWithDynamicClockType::operator>):
(WTF::TimeWithDynamicClockType::operator<=):
(WTF::TimeWithDynamicClockType::operator>=):
(WTF::TimeWithDynamicClockType::dump):
(WTF::TimeWithDynamicClockType::sleep):
* wtf/TimeWithDynamicClockType.h: Added.
(WTF::TimeWithDynamicClockType::TimeWithDynamicClockType):
(WTF::TimeWithDynamicClockType::fromRawDouble):
(WTF::TimeWithDynamicClockType::secondsSinceEpoch):
(WTF::TimeWithDynamicClockType::clockType):
(WTF::TimeWithDynamicClockType::withSameClockAndRawDouble):
(WTF::TimeWithDynamicClockType::operator bool):
(WTF::TimeWithDynamicClockType::operator+):
(WTF::TimeWithDynamicClockType::operator-):
(WTF::TimeWithDynamicClockType::operator+=):
(WTF::TimeWithDynamicClockType::operator-=):
(WTF::TimeWithDynamicClockType::operator==):
(WTF::TimeWithDynamicClockType::operator!=):
* wtf/WallTime.cpp: Added.
(WTF::WallTime::now):
(WTF::WallTime::approximateMonotonicTime):
(WTF::WallTime::dump):
(WTF::WallTime::sleep):
* wtf/WallTime.h: Added.
(WTF::WallTime::WallTime):
(WTF::WallTime::fromRawDouble):
(WTF::WallTime::infinity):
(WTF::WallTime::secondsSinceEpoch):
(WTF::WallTime::approximateWallTime):
(WTF::WallTime::operator bool):
(WTF::WallTime::operator+):
(WTF::WallTime::operator-):
(WTF::WallTime::operator+=):
(WTF::WallTime::operator-=):
(WTF::WallTime::operator==):
(WTF::WallTime::operator!=):
(WTF::WallTime::operator<):
(WTF::WallTime::operator>):
(WTF::WallTime::operator<=):
(WTF::WallTime::operator>=):
* wtf/threads/BinarySemaphore.cpp:
(WTF::BinarySemaphore::wait):
* wtf/threads/BinarySemaphore.h:

Tools:

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/Condition.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp:
(TestWebKitAPI::ToUpperConverter::stopProducing):
(TestWebKitAPI::ToUpperConverter::stopConsuming):
* TestWebKitAPI/Tests/WTF/Time.cpp: Added.
(WTF::operator<<):
(TestWebKitAPI::TEST):

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

4 years agoRenderFlowThread state reset cleanup.
zalan@apple.com [Sat, 5 Nov 2016 02:57:38 +0000 (02:57 +0000)]
RenderFlowThread state reset cleanup.
https://bugs.webkit.org/show_bug.cgi?id=164426

Reviewed by Simon Fraser.

RenderFlowThread state reset is spread across several functions. This patch groups them
together in RenderObject::resetFlowThreadState().

No change in functionality.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removeLeftoverAnonymousBlock):
(WebCore::RenderBlock::dropAnonymousBoxChild): This is now part of resetFlowThreadState() since resetFlowThreadState
gets called even when NotifyChildren is false.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::insertChildInternal): Initialize the thread state before we notify the child.
(WebCore::RenderElement::removeChildInternal): Reset the state even when NotifyChildren is false.
(WebCore::RenderElement::willBeRemovedFromTree): This code is moved to removeFromRenderFlowThread().
(WebCore::RenderElement::removeFromRenderFlowThread):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::initializeFlowThreadState): This is in transition for webkit.org/b/164428 (RenderFlowThread state initialization cleanup.)
(WebCore::RenderObject::resetFlowThreadState):
(WebCore::RenderObject::setParent): This was seemingly a random place to put flow state initialization.
(WebCore::RenderObject::willBeRemovedFromTree): resetFlowThreadState() takes care of it now.
* rendering/RenderObject.h:

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

4 years agotestWASM should be very sad if no options are provided
jfbastien@apple.com [Sat, 5 Nov 2016 02:48:16 +0000 (02:48 +0000)]
testWASM should be very sad if no options are provided
https://bugs.webkit.org/show_bug.cgi?id=164444

Reviewed by Saam Barati.

Detect missing or invalid options on the command line.

* testWasm.cpp:
(CommandLine::parseArguments):

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

4 years ago[DOMJIT] Add DOMJIT::Signature annotation to Document::getElementById
utatane.tea@gmail.com [Sat, 5 Nov 2016 01:15:17 +0000 (01:15 +0000)]
[DOMJIT] Add DOMJIT::Signature annotation to Document::getElementById
https://bugs.webkit.org/show_bug.cgi?id=164356

Reviewed by Filip Pizlo.

Source/WebCore:

This patch implements DOMJIT::Signature annotation for getElementById.
Since getElementById is also implemented in DocumentFragment, we implement
the branchIfDocumentFragment/branchIfNotDocumentFragment for that.

In dromaeo, we have a test like this.

test( "getElementById", function(){
    for ( var i = 0; i < num * 30; i++ ) {
        ret = document.getElementById("testA" + num).nodeType;
        ret = document.getElementById("testB" + num).nodeType;
        ret = document.getElementById("testC" + num).nodeType;
        ret = document.getElementById("testD" + num).nodeType;
        ret = document.getElementById("testE" + num).nodeType;
        ret = document.getElementById("testF" + num).nodeType;
    }
});

In the above test, JSC already knows the following things.

1. Since nodeType is now handled as CallDOMGetter, we know that it is pure.
2. getElementById look up becomes PureGetById since document is impure object. But it is kept as PureGetById. So it does not write DOMState.
3. `"testA" + num` will be converted to constant string.
4. CallDOM for getElementById said it just reads(DOMState:DOM). And it saids that it returns the same value as long as DOMState is not clobbered.
5. CheckCell leading CallDOM ensures the inlined getElementById node. (CallDOM node).

The key thing is that no node clobbers DOMState during the loop. So CallDOM & CallDOMGetter can be hoisted.
This improves dom-query significantly. Dromaeo dom-query getElementById becomes 40x faster (247796 v.s. 6197).
Dromaeo dom-query getElementById (not in document) becomes 89x faster (630317.8 v.s. 7066.).

Tests: js/dom/domjit-function-get-element-by-id-changed.html
       js/dom/domjit-function-get-element-by-id-licm.html
       js/dom/domjit-function-get-element-by-id.html

* dom/NonElementParentNode.idl:
* domjit/DOMJITCheckDOM.h:
(WebCore::DOMJIT::TypeChecker<DocumentFragment>::branchIfFail):
* domjit/DOMJITHelpers.h:
(WebCore::DOMJIT::branchIfDocumentFragment):
(WebCore::DOMJIT::branchIfNotDocumentFragment):

LayoutTests:

* js/dom/domjit-function-get-element-by-id-changed-expected.txt: Added.
* js/dom/domjit-function-get-element-by-id-changed.html: Added.
* js/dom/domjit-function-get-element-by-id-expected.txt: Added.
* js/dom/domjit-function-get-element-by-id-licm-expected.txt: Added.
* js/dom/domjit-function-get-element-by-id-licm.html: Added.
* js/dom/domjit-function-get-element-by-id.html: Added.

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

4 years agoRename unscaledUnobscuredVisibleContentSize and unscaledVisibleContentSizeIncludingOb...
simon.fraser@apple.com [Sat, 5 Nov 2016 00:55:43 +0000 (00:55 +0000)]
Rename unscaledUnobscuredVisibleContentSize and unscaledVisibleContentSizeIncludingObscuredArea for attempted clarity
https://bugs.webkit.org/show_bug.cgi?id=164438

Reviewed by Tim Horton.

unscaledUnobscuredVisibleContentSize() and unscaledVisibleContentSizeIncludingObscuredArea() were an endless source
of confusion.

Functions with "VisibleContent" in the name are usually expected to return document coordinates (affected by zooming),
so unscaledUnobscuredVisibleContentSize caused cognitive dissonance because of "unscaled" vs "visibleContent", and
"unobscured" vs "visible".

So rename:
    unscaledUnobscuredVisibleContentSize -> sizeForUnobscuredContent
    unscaledVisibleContentSizeIncludingObscuredArea -> sizeForVisibleContent

sizeForUnobscuredContent() can also be private to ScrollView.

* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::update):
* platform/ScrollView.cpp:
(WebCore::ScrollView::unobscuredContentRectInternal):
(WebCore::ScrollView::sizeForVisibleContent):
(WebCore::ScrollView::sizeForUnobscuredContent): Don't compute unscaledVisibleContentSizeIncludingObscuredArea
before testing whether we have a platform widget.
(WebCore::ScrollView::layoutSize):
(WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea): Deleted.
(WebCore::ScrollView::unscaledUnobscuredVisibleContentSize): Deleted.
* platform/ScrollView.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::ensureRootLayer):

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

4 years agoError description code should be able to handle Symbol values.
mark.lam@apple.com [Sat, 5 Nov 2016 00:48:01 +0000 (00:48 +0000)]
Error description code should be able to handle Symbol values.
https://bugs.webkit.org/show_bug.cgi?id=164436
<rdar://problem/29115583>

Reviewed by Filip Pizlo and Saam Barati.

JSTests:

* stress/error-description-on-symbols-should-not-crash.js: Added.

Source/JavaScriptCore:

Previously, we try to toString() the Symbol value, resulting in it throwing an
exception in errorDescriptionForValue() which breaks the invariant that
errorDescriptionForValue() should not throw.

We fixed this by making errorDescriptionForValue() aware of the Symbol type, and
not so a toString() on Symbol values.  Also fixed notAFunctionSourceAppender()
to build a nicer message for Symbol values.

* runtime/ExceptionHelpers.cpp:
(JSC::errorDescriptionForValue):
(JSC::notAFunctionSourceAppender):

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

4 years agoLayout viewport wrong with RTL documents
simon.fraser@apple.com [Sat, 5 Nov 2016 00:41:50 +0000 (00:41 +0000)]
Layout viewport wrong with RTL documents
https://bugs.webkit.org/show_bug.cgi?id=164434

Reviewed by Tim Horton.

Source/WebCore:

The layoutViewportRect was computed incorrectly in RTL documents, because
FrameView::unscaledMaximumScrollPosition() was wrong; it erroneously mapped
what it thought was a scrollOffset to a scrollPosition.

Unscaled scroll positions are in the same coordinate space as unscaledDocumentRect,
so we should not call scrollPositionFromOffset() in FrameView::unscaledMaximumScrollPosition().

Changed FrameView::unscaledMinimumScrollPosition() to also just grab the location of
unscaledDocumentRect, for symmetry.

Finally fixed the tiled scrolling indicator's viewport rect for zoomed RTL documents
by using the unscaled scroll origin.

Tests: fast/visual-viewport/rtl-nonzoomed-rects.html
       fast/visual-viewport/rtl-zoomed-rects.html

* page/FrameView.cpp:
(WebCore::FrameView::setLayoutViewportOrigin):
(WebCore::FrameView::unscaledScrollOrigin):
(WebCore::FrameView::unscaledMinimumScrollPosition):
(WebCore::FrameView::unscaledMaximumScrollPosition):
* page/FrameView.h:

LayoutTests:

* fast/visual-viewport/rtl-nonzoomed-rects-expected.txt: Added.
* fast/visual-viewport/rtl-nonzoomed-rects.html: Added.
* fast/visual-viewport/rtl-zoomed-rects-expected.txt: Added.
* fast/visual-viewport/rtl-zoomed-rects.html: Added.
* platform/ios-simulator/fast/visual-viewport/rtl-nonzoomed-rects-expected.txt: Added.
* platform/ios-simulator/fast/visual-viewport/rtl-zoomed-rects-expected.txt: Added.
* platform/mac-wk1/fast/visual-viewport/rtl-zoomed-rects-expected.txt: Added. WK1 and RTL are weird.

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

4 years ago[WebIDL] Add support for modern callback syntax
commit-queue@webkit.org [Sat, 5 Nov 2016 00:03:32 +0000 (00:03 +0000)]
[WebIDL] Add support for modern callback syntax
https://bugs.webkit.org/show_bug.cgi?id=164435

Patch by Sam Weinig <sam@webkit.org> on 2016-11-04
Reviewed by Chris Dumez.

Support new callback syntax:
    callback Function = void (DOMString arg1, long arg2);

This replaces "callback interface" types with a Callback=FunctionOnly
extended attribute.

* Modules/geolocation/PositionCallback.idl:
* Modules/geolocation/PositionErrorCallback.idl:
* Modules/notifications/NotificationPermissionCallback.idl:
* Modules/quota/StorageErrorCallback.idl:
* Modules/quota/StorageQuotaCallback.idl:
* Modules/quota/StorageUsageCallback.idl:
* Modules/webaudio/AudioBufferCallback.idl:
* Modules/webdatabase/DatabaseCallback.idl:
* Modules/webdatabase/SQLStatementCallback.idl:
* Modules/webdatabase/SQLStatementErrorCallback.idl:
* Modules/webdatabase/SQLTransactionCallback.idl:
* Modules/webdatabase/SQLTransactionErrorCallback.idl:
* dom/RequestAnimationFrameCallback.idl:
* dom/StringCallback.idl:
* html/VoidCallback.idl:
* page/IntersectionObserverCallback.idl:
* css/MediaQueryListListener.idl:
Update to new syntax.

* css/MediaQueryListListener.h:
* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::styleResolverChanged):
Switch to using the now required 'handleEvent' name. This is an implementation detail
that we should change.

* bindings/scripts/CodeGenerator.pm:
Update document processing to allow a callback only file. Update callback
type checks to look for a regex that matches in the new format.

* bindings/scripts/CodeGeneratorJS.pm:
(AddToImplIncludesForIDLType):
(AddToIncludesForIDLType):
(AddToImplIncludes):
(AddToIncludes):
Abstract includes functions to allow passing in an include hash.

(GenerateCallbackFunctionHeader):
(GenerateCallbackFunctionImplementation):
(GenerateCallbackInterfaceHeader):
(GenerateCallbackInterfaceImplementation):
(GenerateCallbackHeaderContent):
(GenerateCallbackImplementationContent):
Refactor callback generation code into GenerateCallbackHeaderContent and GenerateCallbackImplementationContent
to allow using it for both the new callbacks as well as the old callback interfaces.

* bindings/scripts/IDLParser.pm:
(Parse):
(applyTypedefs):
(applyTypedefsToOperation):
(parseCallbackRest):
Parse callbacks into the new IDLCallbackFunction type. Ensure that typedefs are applied as well.

* bindings/scripts/IDLAttributes.txt:
Remove support for Callback=FunctionOnly.

* bindings/scripts/test/JS/JSTestCallback.cpp: Removed.
* bindings/scripts/test/JS/JSTestCallback.h: Removed.
* bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
* bindings/scripts/test/JS/JSTestCallbackFunction.h:
* bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp: Added.
* bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h: Added.
* bindings/scripts/test/JS/JSTestCallbackInterface.cpp: Copied from Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp.
* bindings/scripts/test/JS/JSTestCallbackInterface.h: Copied from Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h.
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/TestCallback.idl: Removed.
* bindings/scripts/test/TestCallbackFunction.idl:
* bindings/scripts/test/TestCallbackFunctionWithTypedefs.idl: Added.
* bindings/scripts/test/TestCallbackInterface.idl: Copied from Source/WebCore/bindings/scripts/test/TestCallback.idl.
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestTypedefs.idl:
Update existing tests and add new ones to test callback functions specifically.

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

4 years agoMove isDefaultPortForProtocol from URLParser.cpp back to URL.cpp
achristensen@apple.com [Fri, 4 Nov 2016 23:59:03 +0000 (23:59 +0000)]
Move isDefaultPortForProtocol from URLParser.cpp back to URL.cpp
https://bugs.webkit.org/show_bug.cgi?id=164439

Reviewed by Daniel Bates.

No change in behaviour.

* platform/URL.cpp:
(WebCore::defaultPortForProtocol):
(WebCore::isDefaultPortForProtocol):
* platform/URLParser.cpp:
(WebCore::URLParser::defaultPortForProtocol):
(WebCore::URLParser::parsePort):
(WebCore::defaultPortForProtocol): Deleted.
(WebCore::isDefaultPortForProtocol): Deleted.
* platform/URLParser.h:

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

4 years agoSafari does not emit composition end if blurred for dead key / Japanese IME
wenson_hsieh@apple.com [Fri, 4 Nov 2016 23:55:00 +0000 (23:55 +0000)]
Safari does not emit composition end if blurred for dead key / Japanese IME
https://bugs.webkit.org/show_bug.cgi?id=164369
<rdar://problem/29050439>

Reviewed by Ryosuke Niwa.

Source/WebCore:

On Mac, _before_ changing selection, try to finalize the composition by calling Editor::cancelComposition early.
This is because the focused element may have changed after performing the selection change, so we would
otherwise be dispatching the `compositionend` to the new focused element (or no compositionend at all) instead
of the element with the composition.

Doing this allows us to match Chrome and Firefox behavior. After canceling the composition, we then need to also
clear the system IME state. We do this on Mac WK1/WK2 through the cancelComposition() codepath, which ends up
calling into -discardMarkedText, which resets the marked text state. Some minor refactoring was performed to
accomplish this -- currently, discardedComposition sends a CompositionWasCanceled message over to the UI process
that discards the marked text, and then updates the editor state. This patch splits this into two separate
steps -- see the WebKit2 ChangeLog for more details.

Test: fast/events/ime-compositionend-on-selection-change.html

* editing/Editor.cpp:
(WebCore::Editor::selectionWillChange):
* editing/Editor.h:
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
* editing/mac/EditorMac.mm:
(WebCore::Editor::selectionWillChange):
* loader/EmptyClients.h:
* page/EditorClient.h:

Source/WebKit/mac:

When canceling a composition, make sure that we clear the system IME state.

* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::canceledComposition):

Source/WebKit/win:

Add a stub implementation of canceledComposition.

* WebCoreSupport/WebEditorClient.cpp:
(WebEditorClient::canceledComposition):
* WebCoreSupport/WebEditorClient.h:

Source/WebKit2:

Split WebPage::discardedComposition into two steps, where we first discard marked text and then update the
editor state. This allows the codepath where we cancel the composition early (before setting the selection) to
discard marked text without also forcing an editor state update at the same time. The editor state is later
updated in WebPage::didChangeSelection.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::compositionWasCanceled):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::canceledComposition):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChangeSelection):
(WebKit::WebPage::discardedComposition):
(WebKit::WebPage::canceledComposition):
* WebProcess/WebPage/WebPage.h:

LayoutTests:

Adds a new test verifying that we dispatch `compositionend` events in various circumstances:
    1. After composing in an editable area and then focusing another editable area.
    2. After composing in an editable area and then blur()-ing.
    3. After composing in an editable area and then changing the selection.

There should be no behavior change for other platforms, so no new tests are needed there with this change.

* fast/events/ime-compositionend-on-selection-change-expected.txt: Added.
* fast/events/ime-compositionend-on-selection-change.html: Added.
* platform/ios-simulator/TestExpectations:

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

4 years agoIndexedDB 2.0: Clean up more transaction abort and exception throwing behavior from...
beidson@apple.com [Fri, 4 Nov 2016 23:27:19 +0000 (23:27 +0000)]
IndexedDB 2.0: Clean up more transaction abort and exception throwing behavior from IDBObjectStore.
https://bugs.webkit.org/show_bug.cgi?id=164424

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

This patch actually turns a handful of PASS to FAIL in the imported tests, but those are parts of the
spec in flux/under discussion.

We'll update either source or the tests as things are resolved.

* IndexedDB-private-browsing/idbcursor_advance_index7-expected.txt:
* IndexedDB-private-browsing/idbcursor_continue_index7-expected.txt:
* IndexedDB-private-browsing/idbindex_get7-expected.txt:
* IndexedDB-private-browsing/idbindex_getKey7-expected.txt:
* IndexedDB-private-browsing/idbindex_openCursor2-expected.txt:
* IndexedDB-private-browsing/idbindex_openKeyCursor3-expected.txt:
* web-platform-tests/IndexedDB/idbcursor_advance_index7-expected.txt:
* web-platform-tests/IndexedDB/idbcursor_continue_index7-expected.txt:
* web-platform-tests/IndexedDB/idbindex_get8-expected.txt:
* web-platform-tests/IndexedDB/idbindex_getKey8-expected.txt:
* web-platform-tests/IndexedDB/idbindex_openCursor3-expected.txt:
* web-platform-tests/IndexedDB/idbindex_openKeyCursor4-expected.txt:
* web-platform-tests/IndexedDB/transaction-abort-index-metadata-revert-expected.txt:
* web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt:
* web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt:

Source/WebCore:

No new tests (Covered by existing tests).

This patch actually turns a handful of PASS to FAIL in the imported tests, but those are parts of the
spec in flux/under discussion.

We'll update either source or the tests as things are resolved.

* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::rollbackInfoForVersionChangeAbort):

* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::putOrAdd):
(WebCore::IDBObjectStore::rollbackForVersionChangeAbort):

LayoutTests:

* storage/indexeddb/resources/transaction-basics.js:
* storage/indexeddb/transaction-basics-expected.txt:
* storage/indexeddb/transaction-basics-private-expected.txt:

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

4 years agoEvalCodeCache should not give up in strict mode and other cases
ggaren@apple.com [Fri, 4 Nov 2016 23:02:19 +0000 (23:02 +0000)]
EvalCodeCache should not give up in strict mode and other cases
https://bugs.webkit.org/show_bug.cgi?id=164357

Reviewed by Michael Saboff.

JSTests:

* microbenchmarks/eval-cached.js: Added. 45x faster now.
* stress/eval-cached.js: Added. Try running the same eval text in a bunch
of different scopes and verify that we access the right scope.

Source/JavaScriptCore:

EvalCodeCache gives up in non-trivial cases because generated eval code
can't soundly migrate from, for example, a let scope to a non-let scope.
The number of cases has grown over time.

Instead, let's cache eval code based on the location of the call to
eval(). That way, we never relocate the code, and it's sound to make
normal assumptions about our surrounding scope.

* bytecode/EvalCodeCache.h:
(JSC::EvalCodeCache::CacheKey::CacheKey): Use CallSiteIndex to uniquely
identify the location of our call to eval().

(JSC::EvalCodeCache::CacheKey::hash):
(JSC::EvalCodeCache::CacheKey::operator==):
(JSC::EvalCodeCache::CacheKey::Hash::equal): Use CallSiteIndex instead
of lots of other flags.

(JSC::EvalCodeCache::tryGet): No need to include details that are implied
by our CallSiteIndex.

(JSC::EvalCodeCache::getSlow): No need to skip caching in complex
situations. We promise we'll never relocate the cached code.

(JSC::EvalCodeCache::isCacheableScope): Deleted.
(JSC::EvalCodeCache::isCacheable): Deleted.

* interpreter/Interpreter.cpp:
(JSC::eval): Pass through a CallSiteIndex to uniquely identify this call
to eval().

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

4 years agoLoad stylesheets in link elements inside a connected shadow tree
rniwa@webkit.org [Fri, 4 Nov 2016 22:53:33 +0000 (22:53 +0000)]
Load stylesheets in link elements inside a connected shadow tree
https://bugs.webkit.org/show_bug.cgi?id=160683
<rdar://problem/29040652>

Reviewed by Antti Koivisto.

Source/WebCore:

Allow external stylesheets within a shadow tree by storing the appropriate style scope in HTMLLinkElement
when it's connected to a document instead of always talking to document's style scope.

Tests: fast/shadow-dom/link-element-in-shadow-tree.html
       fast/shadow-dom/selected-stylesheet-in-shadow-tree.html

       * html/HTMLLinkElement.cpp:
       (WebCore::HTMLLinkElement::HTMLLinkElement):
       (WebCore::HTMLLinkElement::~HTMLLinkElement):
       (WebCore::HTMLLinkElement::setDisabledState): Exit early when the element is not in a document as invoking
       didChangeActiveStyleSheetCandidates would require having a valid m_styleScope and process() already exits
       early when inDocument() is false.
       (WebCore::HTMLLinkElement::parseAttribute):
       (WebCore::HTMLLinkElement::process): Removed the early exit for when the element is in a shadow tree.
       (WebCore::HTMLLinkElement::insertedInto): Exit early unless this element has just become connected to
       a document instead of whenever its self-inclusive ancestor is inserted into a container.
       (WebCore::HTMLLinkElement::removedFrom): Ditto for removal. Also call removeStyleSheetCandidateNode after
       calling removePendingSheet since the latter depends on m_styleScope being not null.
       (WebCore::HTMLLinkElement::addPendingSheet):
       (WebCore::HTMLLinkElement::removePendingSheet):
       * html/HTMLLinkElement.h:
       * html/HTMLStyleElement.cpp:
       (WebCore::HTMLStyleElement::insertedInto): Only call inline style owner's insertedIntoDocument if this
       element has just become connected to a document.
       (WebCore::HTMLStyleElement::removedFrom): Ditto for the removal.
       * style/StyleScope.h:
       * svg/SVGStyleElement.cpp:
       (WebCore::SVGStyleElement::insertedInto): Ditto.
       (WebCore::SVGStyleElement::removedFrom): Ditto for the removal.

LayoutTests:

Added W3C style testharness.js tests for loading stylesheets via a link element inside a ahadow tree.

* fast/shadow-dom/link-element-in-shadow-tree-expected.txt: Added.
* fast/shadow-dom/link-element-in-shadow-tree.html: Added.
* fast/shadow-dom/resources/green-host.css: Added.
* fast/shadow-dom/selected-stylesheet-in-shadow-tree-expected.txt: Added.
* fast/shadow-dom/selected-stylesheet-in-shadow-tree.html: Added.

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

4 years agoAdd support for Wasm br_table
keith_miller@apple.com [Fri, 4 Nov 2016 22:53:21 +0000 (22:53 +0000)]
Add support for Wasm br_table
https://bugs.webkit.org/show_bug.cgi?id=164429

Reviewed by Michael Saboff.

This patch adds support for Wasm br_table. The Wasm br_table
opcode essentially directly maps to B3's switch opcode.

There are also three other minor changes:
1) all non-argument locals should be initialized to zero at function entry.
2) add new setErrorMessage member to WasmFunctionParser.h
3) return does not decode an extra immediate anymore.

* testWasm.cpp:
(runWasmTests):
* wasm/WasmB3IRGenerator.cpp:
* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser::setErrorMessage):
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):
(JSC::Wasm::FunctionParser<Context>::popExpressionStack):
* wasm/WasmValidate.cpp:
(JSC::Wasm::Validate::checkBranchTarget):
(JSC::Wasm::Validate::addBranch):
(JSC::Wasm::Validate::addSwitch):

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

4 years agoWebAssembly JS API: implement more sections
jfbastien@apple.com [Fri, 4 Nov 2016 22:12:12 +0000 (22:12 +0000)]
WebAssembly JS API: implement more sections
https://bugs.webkit.org/show_bug.cgi?id=164023

Reviewed by Keith Miller.

On the JSC side:

 - Put in parser stubs for all WebAssembly sections.
 - Parse Import, Export sections.
 - Use tryReserveCapacity instead of reserve, and bail out of the parser if it fails. This prevents the parser from bringing everything down when faced with a malicious input.
 - Encapsulate all parsed module information into its own structure, making it easier to pass around (from parser to Plan to Module to Instance).
 - Create WasmFormat.cpp to hold parsed module information's dtor to avoid including WasmMemory.h needlessly.
JSTests:

 - parseCode: avoid overflow through function size.
 - Remove all remainders of polyfill-prototype-1, and update license.
 - Add missing WasmOps.h and WasmValidateInlines.h auto-generation for cmake build.

On the Builder.js testing side:

 - Implement Type, Import (function only), Export (function only) sections.
 - Check section order and uniqueness.
 - Optionally auto-generate the Type section from subsequent Export / Import / Code entries.
 - Allow re-exporting an import.

* wasm/Builder.js: build type, import, and export sections
(const._normalizeFunctionSignature):
* wasm/Builder_WebAssemblyBinary.js: Added. Forked from Builder.js
(const.emitters.Type):
(const.emitters.Import):
(const.emitters.Function):
(const.emitters.Table):
(const.emitters.Memory):
(const.emitters.Global):
(const.emitters.Export):
(const.emitters.Start):
(const.emitters.Element):
(const.emitters.Code):
(const.emitters.Data):
(export.const.Binary):
* wasm/LowLevelBinary.js: Add a few useful outputs
(export.default.LowLevelBinary.prototype.varuint1):
(export.default.LowLevelBinary.prototype.varint7):
* wasm/WASM.js: value type and external kind helpers
* wasm/assert.js: array element-wise equality comparison
(const._eq):
* wasm/js-api/test_Module.js:
(ModuleWithImports):
* wasm/self-test/test_BuilderJSON.js: many more tests for all the new Builder APIs, and update to some older tests which now require a Type section or rejiggered Function signature
(const.assertOpThrows):
(SectionsWithSameCustomName):
(TwoTypeSections):
(EmptyImportSection):
(ImportBeforeTypeSections):
* wasm/self-test/test_BuilderWebAssembly.js: remove a test which wasn't helpful and is now obsolete
(CustomSection):

Source/JavaScriptCore:

 - Remove all remainders of polyfill-prototype-1, and update license.
 - Add missing WasmOps.h and WasmValidateInlines.h auto-generation for cmake build.

On the Builder.js testing side:

 - Implement Type, Import (function only), Export (function only) sections.
 - Check section order and uniqueness.
 - Optionally auto-generate the Type section from subsequent Export / Import / Code entries.
 - Allow re-exporting an import.

* CMakeLists.txt: missing auto-genration
* JavaScriptCore.xcodeproj/project.pbxproj: merge conflict
* testWasm.cpp: update for API changes, no functional change
(checkPlan):
(runWasmTests):
* wasm/WasmFormat.cpp: add a dtor which requires extra headers which I'd rather not include in WasmFormat.h
(JSC::Wasm::ModuleInformation::~ModuleInformation):
* wasm/WasmFormat.h: Add External, Import, Functioninformation, Export, ModuleInformation, CompiledFunction, and remove obsolete stuff which was a holdover from the first implementation (all that code is now gone, so remove its license)
(JSC::Wasm::External::isValid):
* wasm/WasmModuleParser.cpp: simplify some, make names consistent with the WebAssembly section names, check memory allocations so they can fail early
(JSC::Wasm::ModuleParser::parse):
(JSC::Wasm::ModuleParser::parseType):
(JSC::Wasm::ModuleParser::parseImport):
(JSC::Wasm::ModuleParser::parseFunction):
(JSC::Wasm::ModuleParser::parseTable):
(JSC::Wasm::ModuleParser::parseMemory):
(JSC::Wasm::ModuleParser::parseGlobal):
(JSC::Wasm::ModuleParser::parseExport):
(JSC::Wasm::ModuleParser::parseStart):
(JSC::Wasm::ModuleParser::parseElement):
(JSC::Wasm::ModuleParser::parseCode): avoid overflow through function size.
(JSC::Wasm::ModuleParser::parseData):
* wasm/WasmModuleParser.h:
(JSC::Wasm::ModuleParser::moduleInformation):
* wasm/WasmParser.h:
(JSC::Wasm::Parser::consumeUTF8String): add as required by spec
(JSC::Wasm::Parser::parseExternalKind): add as per spec
* wasm/WasmPlan.cpp:
(JSC::Wasm::Plan::Plan): fix some ownership, improve some error messages
* wasm/WasmPlan.h: fix some ownership
(JSC::Wasm::Plan::getModuleInformation):
(JSC::Wasm::Plan::getMemory):
(JSC::Wasm::Plan::compiledFunctionCount):
(JSC::Wasm::Plan::compiledFunction):
(JSC::Wasm::Plan::getCompiledFunctions):
* wasm/WasmSections.h: macroize with description, so that error messages are super pretty. This could be auto-generated.
* wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::create): take module information
(JSC::JSWebAssemblyModule::JSWebAssemblyModule): ditto
* wasm/js/JSWebAssemblyModule.h:
(JSC::JSWebAssemblyModule::moduleInformation):
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance): check that modules with imports are instantiated with an import object, as per spec. This needs to be tested.
* wasm/js/WebAssemblyMemoryConstructor.cpp:
(JSC::constructJSWebAssemblyMemory):
* wasm/js/WebAssemblyModuleConstructor.cpp:
(JSC::constructJSWebAssemblyModule):
* wasm/js/WebAssemblyTableConstructor.cpp:
(JSC::constructJSWebAssemblyTable):

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

4 years agoUnreviewed, rolling out r208293.
achristensen@apple.com [Fri, 4 Nov 2016 22:02:19 +0000 (22:02 +0000)]
Unreviewed, rolling out r208293.

asserts in API tests.

Reverted changeset:

"NetworkSession: Network process crash when converting main
resource to download"
https://bugs.webkit.org/show_bug.cgi?id=164220
http://trac.webkit.org/changeset/208293

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

4 years agoAdd a setting and preferences to enable/disable async image decoding
commit-queue@webkit.org [Fri, 4 Nov 2016 21:54:44 +0000 (21:54 +0000)]
Add a setting and preferences to enable/disable async image decoding
https://bugs.webkit.org/show_bug.cgi?id=164417

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-11-04
Reviewed by Simon Fraser.

Source/WebCore:

Add an asyncImageDecodingEnabled setting. This setting controls whether an
image "can" be asynchronously decoded on a separate thread or not. The
function ImageSource::isAsyncDecodingRequired() will be used in conjunction
with this setting to decide whether an image "should" be asynchronously
decoded or not.

* page/Settings.in:

Source/WebKit/mac:

Hook up the asyncImageDecodingEnabled setting for WebKit1.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences asyncImageDecodingEnabled]):
(-[WebPreferences setAsyncImageDecodingEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Hook up the asyncImageDecodingEnabled setting for WebKit2.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _asyncImageDecodingEnabled]):
(-[WKPreferences _setAsyncImageDecodingEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

Pref and a menu item to toggle asyncImageDecodingEnabled for WebKits 1 and 2.

* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleAsyncImageDecodingEnabled:]):
(-[SettingsController asyncImageDecodingEnabled]):
* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController didChangeSettings]):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController didChangeSettings]):

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

4 years agoApply post-landing review comments for r208347
timothy_horton@apple.com [Fri, 4 Nov 2016 21:04:28 +0000 (21:04 +0000)]
Apply post-landing review comments for r208347

* dom/Element.cpp:
(WebCore::Element::findAnchorElementForLink):
Use attributeWithoutSynchronization.

* page/PrintContext.cpp:
(WebCore::PrintContext::spoolPage):
(WebCore::PrintContext::spoolRect):
(WebCore::PrintContext::collectLinkedDestinations):
(WebCore::PrintContext::outputLinkedDestinations):
* page/PrintContext.h:
Pass Document by reference instead of Node by pointer,
use ElementTraversal instead of NodeTraversal to avoid
having to locally check the type, and null-check renderers.

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

4 years agoAdd layout test for input.setCustomValidity()
cdumez@apple.com [Fri, 4 Nov 2016 20:48:18 +0000 (20:48 +0000)]
Add layout test for input.setCustomValidity()
https://bugs.webkit.org/show_bug.cgi?id=164419

Reviewed by Simon Fraser.

Add layout test for input.setCustomValidity().

* fast/forms/validation-custom-message-expected.txt: Added.
* fast/forms/validation-custom-message.html: Added.

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

4 years agoImplement WebGL2RenderingContext::copyBufferSubData()
mmaxfield@apple.com [Fri, 4 Nov 2016 20:09:39 +0000 (20:09 +0000)]
Implement WebGL2RenderingContext::copyBufferSubData()
https://bugs.webkit.org/show_bug.cgi?id=164008

Reviewed by Dean Jackson.

Source/WebCore:

Similar to previous work regarding WebGL 2 buffers, this method implements
the ability to copy from one buffer to another without the data leaving
the GPU.

Test: fast/canvas/webgl/copyBufferSubData.html

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::copyBufferSubData):
* html/canvas/WebGLBuffer.cpp:
(WebCore::WebGLBuffer::associateCopyBufferSubData):
* html/canvas/WebGLBuffer.h:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::copyBufferSubData):

LayoutTests:

* fast/canvas/webgl/copyBufferSubData-expected.txt: Added.
* fast/canvas/webgl/copyBufferSubData.html: Added.

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

4 years agoRename some ScrollingTree/Node-related functions to reduce the number of uses of...
simon.fraser@apple.com [Fri, 4 Nov 2016 19:42:26 +0000 (19:42 +0000)]
Rename some ScrollingTree/Node-related functions to reduce the number of uses of "update"
https://bugs.webkit.org/show_bug.cgi?id=164420

Reviewed by Tim Horton.

Rename:
    commitNewTreeState -> commitTreeState ("new" was redundant)
    updateBeforeChildren -> commitStateBeforeChildren
    updateAfterChildren -> commitStateAfterChildren

Source/WebCore:

* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitTreeState):
(WebCore::ScrollingTree::updateTreeFromStateNode):
(WebCore::ScrollingTree::commitNewTreeState): Deleted.
* page/scrolling/ScrollingTree.h:
* page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren): Deleted.
* page/scrolling/ScrollingTreeFrameScrollingNode.h:
* page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::commitStateAfterChildren):
(WebCore::ScrollingTreeNode::updateAfterChildren): Deleted.
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeScrollingNode::commitStateAfterChildren):
(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): Deleted.
(WebCore::ScrollingTreeScrollingNode::updateAfterChildren): Deleted.
* page/scrolling/ScrollingTreeScrollingNode.h:
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::commitTreeState):
(WebCore::ThreadedScrollingTree::commitNewTreeState): Deleted.
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
(WebCore::ScrollingTreeFrameScrollingNodeIOS::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::commitStateAfterChildren):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::updateBeforeChildren): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeIOS::updateAfterChildren): Deleted.
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::commitNewTreeState): Deleted.
* page/scrolling/ios/ScrollingTreeIOS.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::commitTreeState):
* page/scrolling/mac/ScrollingTreeFixedNode.h:
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeFixedNode::updateBeforeChildren): Deleted.
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::updateAfterChildren): Deleted.
* page/scrolling/mac/ScrollingTreeStickyNode.h:
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeStickyNode::updateBeforeChildren): Deleted.

Source/WebKit2:

* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::commitScrollingTreeState):
(WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Deleted.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren): Deleted.
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): Deleted.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

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

4 years agoAdd new 'other' Apple Pay button style
andersca@apple.com [Fri, 4 Nov 2016 19:16:31 +0000 (19:16 +0000)]
Add new 'other' Apple Pay button style
https://bugs.webkit.org/show_bug.cgi?id=164384
rdar://problem/28302528

Reviewed by Dean Jackson.

* DerivedSources.make:
* WebCorePrefix.h:
Add extension points.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
Add ApplePayButtonType::Other.

(WebCore::CSSPrimitiveValue::operator ApplePayButtonType):
Add CSSValueOther.

* css/CSSValueKeywords.in:
Add other.

* css/parser/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
Add CSSValueOther.

* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
Add CSSValueOther.

* rendering/RenderThemeCocoa.mm:
(WebCore::toPKPaymentButtonType):
Handle ApplePayButtonType::Other.

* rendering/style/RenderStyleConstants.h:
Add ApplePayButtonType::Other.

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

4 years agoslotted() pseudo does not work with ID selector
antti@apple.com [Fri, 4 Nov 2016 18:32:45 +0000 (18:32 +0000)]
slotted() pseudo does not work with ID selector
https://bugs.webkit.org/show_bug.cgi?id=160538
<rdar://problem/28534529>

Reviewed by Andreas Kling.

Source/WebCore:

When we saw an id selector while addin rules we immediately threw it into the m_idRules
optimization bucket and bailed out. However selectors containing ::slotted must always end
up in m_slottedPseudoElementRules list no matter what else is there.

Fix by treating id like other selectors and only choosing the bucket after analysing all
the selector components.

Test: fast/shadow-dom/css-scoping-slot-with-id.html

* css/RuleSet.cpp:
(WebCore::RuleSet::addRule): Also made this use switch instead of a series of ifs.

LayoutTests:

* fast/shadow-dom/css-scoping-slot-with-id-expected.html: Added.
* fast/shadow-dom/css-scoping-slot-with-id.html: Added.

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

4 years agoIndexedDB 2.0: Handle IDBObjectStore rename behavior properly when version change...
beidson@apple.com [Fri, 4 Nov 2016 18:10:24 +0000 (18:10 +0000)]
IndexedDB 2.0: Handle IDBObjectStore rename behavior properly when version change transaction aborts.
https://bugs.webkit.org/show_bug.cgi?id=164416

Reviewed by Beth Dakin.

LayoutTests/imported/w3c:

* web-platform-tests/IndexedDB/idbobjectstore-rename-abort-expected.txt:

Source/WebCore:

No new tests (Covered by existing tests).

* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::rollbackForVersionChangeAbort):

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

4 years agoNetworkSession: Add NetworkDataTask implementation for blobs
achristensen@apple.com [Fri, 4 Nov 2016 18:08:05 +0000 (18:08 +0000)]
NetworkSession: Add NetworkDataTask implementation for blobs
https://bugs.webkit.org/show_bug.cgi?id=163939

Source/WebCore:

Patch by Keith Rollin <krollin@apple.com> on 2016-11-04
Reviewed by Alex Christensen.

* WebCore.xcodeproj/project.pbxproj: Mark HTTPParsers.h and AsyncFileStream.h as private.
* fileapi/AsyncFileStream.h: Add WEBCORE_EXPORT to AsyncFileStream class.
* platform/network/BlobData.h: Add WEBCORE_EXPORT to length().
* platform/network/HTTPParsers.h: Add WEBCORE_EXPORT to parseRange().
* platform/network/ResourceResponseBase.h: Add WEBCORE_EXPORT to setHTTPHeaderField().

Source/WebCore/platform/gtk/po:

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2016-11-04
Reviewed by Alex Christensen.

* POTFILES.in: Remove DownloadSoup.cpp

Source/WebKit2:

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2016-11-04
Reviewed by Alex Christensen.

Add NetworkDataTaskBlob to handle blobs when using NetworkSession instead of using ResourceHandle. This patch
adds more USE(NETWORK_SESSION) ifdefs to not use ResourceHandle in Downloads and NetworkLoad when NetworkSession
is enabled.

* CMakeLists.txt: Add new files to compilation.
* NetworkProcess/Downloads/BlobDownloadClient.cpp:
* NetworkProcess/Downloads/BlobDownloadClient.h:
* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::Download): Split the constructor again and remove the PlatformDownloadTaskRef
definitions. Now Cocoa specific constructor receives a NSURLSessionDownloadTask and the general constructor
reveices a NetworkDataTask and is used by Soup backend and blobs.
(WebKit::Download::~Download):
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::cancel):
(WebKit::Download::didReceiveAuthenticationChallenge):
(WebKit::Download::didReceiveData):
(WebKit::Download::didFinish):
(WebKit::Download::platformCancelNetworkLoad): Rename cancelNetworkLoad() as platformCancelNetworkLoad() since
this is now used only by Cocoa platform to cancel the NSURLSessionDownloadTask.
* NetworkProcess/Downloads/Download.h:
(WebKit::Download::Download):
(WebKit::Download::suggestedName):
(WebKit::Download::request):
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload): Remove blobs specific code when using NetworkSession.
(WebKit::DownloadManager::continueDecidePendingDownloadDestination):
* NetworkProcess/Downloads/DownloadManager.h:
* NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
(WebKit::Download::platformCancelNetworkLoad):
* NetworkProcess/Downloads/soup/DownloadSoup.cpp: Removed.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Remove blobs specific code when
using NetworkSession.
* NetworkProcess/NetworkDataTask.cpp:
(WebKit::NetworkDataTask::create): If request is a blob, create a NetworkDataTaskBlob.
* NetworkProcess/NetworkDataTask.h: Add invalidateAndCancel pure virtual method.
* NetworkProcess/NetworkDataTaskBlob.cpp: Added.
(WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
(WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
(WebKit::NetworkDataTaskBlob::clearStream):
(WebKit::NetworkDataTaskBlob::resume):
(WebKit::NetworkDataTaskBlob::suspend):
(WebKit::NetworkDataTaskBlob::cancel):
(WebKit::NetworkDataTaskBlob::invalidateAndCancel):
(WebKit::NetworkDataTaskBlob::getSizeForNext):
(WebKit::NetworkDataTaskBlob::didGetSize):
(WebKit::NetworkDataTaskBlob::seek):
(WebKit::NetworkDataTaskBlob::didReceiveResponse):
(WebKit::NetworkDataTaskBlob::read):
(WebKit::NetworkDataTaskBlob::readData):
(WebKit::NetworkDataTaskBlob::readFile):
(WebKit::NetworkDataTaskBlob::didOpen):
(WebKit::NetworkDataTaskBlob::didRead):
(WebKit::NetworkDataTaskBlob::consumeData):
(WebKit::NetworkDataTaskBlob::setPendingDownloadLocation):
(WebKit::NetworkDataTaskBlob::suggestedFilename):
(WebKit::NetworkDataTaskBlob::download):
(WebKit::NetworkDataTaskBlob::writeDownload):
(WebKit::NetworkDataTaskBlob::cleanDownloadFiles):
(WebKit::NetworkDataTaskBlob::didFailDownload):
(WebKit::NetworkDataTaskBlob::didFinishDownload):
(WebKit::NetworkDataTaskBlob::didFail):
(WebKit::NetworkDataTaskBlob::didFinish):
* NetworkProcess/NetworkDataTaskBlob.h: Added.
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::NetworkLoad): Remove blobs specific code when using NetworkSession.
(WebKit::NetworkLoad::~NetworkLoad):
(WebKit::NetworkLoad::setDefersLoading):
(WebKit::NetworkLoad::cancel):
(WebKit::NetworkLoad::continueWillSendRequest):
(WebKit::NetworkLoad::continueDidReceiveResponse):
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::invalidateAndCancel): Moved from NetworkSessionSoup, since this is now used also by blobs.
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::registerNetworkDataTask): Ditto.
(WebKit::NetworkSession::unregisterNetworkDataTask): Ditto.
* NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Add invalidateAndCancel() implementation that does nothing
because in Cocoa all tasks are invalidated and canceled by the network session.
* NetworkProcess/mac/NetworkLoadMac.mm:
* NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
(WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
(WebKit::NetworkDataTaskSoup::download):
* NetworkProcess/soup/NetworkDataTaskSoup.h:
* NetworkProcess/soup/NetworkSessionSoup.cpp:
* NetworkProcess/soup/NetworkSessionSoup.h:
* PlatformEfl.cmake: Remove DownloadSoup.cpp from compilation.
* PlatformGTK.cmake: Ditto.
* WebKit2.xcodeproj/project.pbxproj: Add new files to compilation.

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

4 years agoREGRESSION (r208349) StringHasher::hashMemory behavior changed, causing API tests...
beidson@apple.com [Fri, 4 Nov 2016 18:02:32 +0000 (18:02 +0000)]
REGRESSION (r208349) StringHasher::hashMemory behavior changed, causing API tests to fail
https://bugs.webkit.org/show_bug.cgi?id=164390

Reviewed by Geoffrey Garen.

Operating under the assumption that the behavior change is okay/desirable, this updates the test.

* TestWebKitAPI/Tests/WTF/StringHasher.cpp:
(TestWebKitAPI::TEST):

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

4 years agoIndexedDB 2.0: Use IDB-specific exceptions in places where the generic exceptions...
beidson@apple.com [Fri, 4 Nov 2016 18:02:02 +0000 (18:02 +0000)]
IndexedDB 2.0: Use IDB-specific exceptions in places where the generic exceptions are currently used.
https://bugs.webkit.org/show_bug.cgi?id=164406

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/IndexedDB/idbindex-rename-errors-expected.txt:
* web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt:

Source/WebCore:

No new tests (Covered by existing tests).

* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::setName):

* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::setName):

LayoutTests:

* storage/indexeddb/modern/index-rename-1-expected.txt:
* storage/indexeddb/modern/index-rename-1-private-expected.txt:
* storage/indexeddb/modern/objectstore-rename-1-expected.txt:
* storage/indexeddb/modern/objectstore-rename-1-private-expected.txt:

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

4 years agoAX: [ATK] Attempting to clear selection on ARIA listboxes results in crash
jdiggs@igalia.com [Fri, 4 Nov 2016 16:48:12 +0000 (16:48 +0000)]
AX: [ATK] Attempting to clear selection on ARIA listboxes results in crash
https://bugs.webkit.org/show_bug.cgi?id=164331

Reviewed by Chris Fleizach.

Source/WebCore:

The ATK code is using is<AccessibilityListBox>() to identify native listboxes.
But is<AccessibilityListBox>() returns the value of isListBox() which returns
true both for AccessibilityListBox instances as well as for AccessibilityObject
instances which have an AccessibilityRole value of ListBoxRole. Because only
native listboxes should be AccessibilityListBoxes, add isNativeListBox() so
that we can distinguish native and ARIA listboxes.

Tests: accessibility/aria-listbox-clear-selection-crash.html
       accessibility/listbox-clear-selection.html

* accessibility/AccessibilityListBox.h:
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isNativeListBox):
(WebCore::AccessibilityObject::isListBox):

Tools:

Add AccessibilityUIElement::clearSelectedChildren() to DRT and WKTR.
Implement it for ATK.

* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::clearSelectedChildren):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::clearSelectedChildren):
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::clearSelectedChildren):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::clearSelectedChildren):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::clearSelectedChildren):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::clearSelectedChildren):

LayoutTests:

Add tests to verify clearing selection works for native listboxes, and does not
crash for ARIA listboxes. These tests are being skipped for the Mac and Win ports
which do not yet implement AccessibilityUIElement::clearSelectedChildren().

* accessibility/aria-listbox-clear-selection-crash-expected.txt: Added.
* accessibility/aria-listbox-clear-selection-crash.html: Added.
* accessibility/listbox-clear-selection-expected.txt: Added.
* accessibility/listbox-clear-selection.html: Added.
* platform/mac/TestExpectations:
* platform/win/TestExpectations:

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

4 years agoIndexedDB 2.0: Throw the correct exceptions during IDBObjectStore/IDBIndex renaming.
beidson@apple.com [Fri, 4 Nov 2016 15:49:33 +0000 (15:49 +0000)]
IndexedDB 2.0: Throw the correct exceptions during IDBObjectStore/IDBIndex renaming.
https://bugs.webkit.org/show_bug.cgi?id=164405

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/IndexedDB/idbindex-rename-errors-expected.txt:
* web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt:

Source/WebCore:

No new tests (Covered by existing tests).

* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::setName):

* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::setName):

LayoutTests:

* storage/indexeddb/modern/index-rename-1-expected.txt:
* storage/indexeddb/modern/index-rename-1-private-expected.txt:
* storage/indexeddb/modern/objectstore-rename-1-expected.txt:
* storage/indexeddb/modern/objectstore-rename-1-private-expected.txt:

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

4 years ago[Readable Streams API] Implement ByteStreamController error()
commit-queue@webkit.org [Fri, 4 Nov 2016 10:39:09 +0000 (10:39 +0000)]
[Readable Streams API] Implement ByteStreamController error()
https://bugs.webkit.org/show_bug.cgi?id=164319

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-11-04
Reviewed by Youenn Fablet.

Source/WebCore:

Implemented error() method of ReadableByteStreamController.

Updated test expectations for error() and added IDL-related tests.

* Modules/streams/ReadableByteStreamController.js:
(error): Implemented.
* Modules/streams/ReadableByteStreamInternals.js:
(privateInitializeReadableByteStreamController):
(isReadableByteStreamController): Added.
(readableByteStreamControllerError): Added.
(readableByteStreamControllerClearPendingPullIntos): Added.
* Modules/streams/ReadableStream.js:
(initializeReadableStream): More detailed error message.
* Modules/streams/ReadableStreamDefaultController.js:
(error): Removed unnecessary variable declaration.
* bindings/js/WebCoreBuiltinNames.h: Added totalQueuedBytes.

LayoutTests:

Updated test expectation for error() test (previously FAIL, now PASS).
Added IDL-related tests for ReadableByteStreamController.

* streams/readable-byte-stream-controller-expected.txt:

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

4 years ago[Win] Page visibility tests are timing out.
pvollan@apple.com [Fri, 4 Nov 2016 09:35:36 +0000 (09:35 +0000)]
[Win] Page visibility tests are timing out.
https://bugs.webkit.org/show_bug.cgi?id=164363

Reviewed by Brent Fulgham.

Source/WebKit/win:

Add method to set page visibility.

* Interfaces/IWebViewPrivate.idl:
* WebView.cpp:
(WebView::QueryInterface):
(WebView::findString):
(WebView::setVisibilityState):
* WebView.h:

Tools:

Implement methods to set page visibility.

* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::resetPageVisibility):
(TestRunner::setPageVisibility):

LayoutTests:

Unskip page visibility tests.

* platform/win/TestExpectations:

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

4 years agoIndexedDB 2.0: Handle IDBIndex rename behavior properly when version change transacti...
beidson@apple.com [Fri, 4 Nov 2016 06:37:09 +0000 (06:37 +0000)]
IndexedDB 2.0: Handle IDBIndex rename behavior properly when version change transaction aborts.
https://bugs.webkit.org/show_bug.cgi?id=164403

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/IndexedDB/idbindex-rename-abort-expected.txt: Updated to passing expectations.

Source/WebCore:

No new tests (Covered by existing test).

* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::rollbackInfoForVersionChangeAbort): Only rollback the info if this index
  already existed before this version change transaction.

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

4 years ago[WebRTC] Introduce asynchronous backend createOffer API
commit-queue@webkit.org [Fri, 4 Nov 2016 06:34:46 +0000 (06:34 +0000)]
[WebRTC] Introduce asynchronous backend createOffer API
https://bugs.webkit.org/show_bug.cgi?id=164365

Patch by Youenn Fablet <youenn@apple.com> on 2016-11-03
Reviewed by Sam Weinig.

Covered by existing tests.

Removing PeerEndpointBackendClient as it is only RTCPeerConnection.
This allows removing virtual for some functions.

Moving MediaEndpointPeerClient::m_client to PeerEndpointBackendClient::m_peerConnection and making it a reference.

Implementing createOffer at PeerConnectionBackend by splitting it in four sub-functions:
- main createOffer, implemented at PeerConnectionBackend.
- doCreateOffer implemented by subclasses (MediaEndpointPeerConnection).
- createOfferSucceeded/createOfferFailed implemented by PeerConnectionBackend.

* CMakeLists.txt:
* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::createMediaEndpointPeerConnection):
(WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection):
(WebCore::MediaEndpointPeerConnection::doCreateOffer):
(WebCore::MediaEndpointPeerConnection::createOfferTask):
(WebCore::MediaEndpointPeerConnection::createAnswerTask):
(WebCore::MediaEndpointPeerConnection::setLocalDescriptionTask):
(WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask):
(WebCore::MediaEndpointPeerConnection::addIceCandidateTask):
(WebCore::MediaEndpointPeerConnection::createReceiver):
(WebCore::MediaEndpointPeerConnection::replaceTrack):
(WebCore::MediaEndpointPeerConnection::replaceTrackTask):
(WebCore::MediaEndpointPeerConnection::markAsNeedingNegotiation):
(WebCore::MediaEndpointPeerConnection::localDescriptionTypeValidForState):
(WebCore::MediaEndpointPeerConnection::remoteDescriptionTypeValidForState):
(WebCore::MediaEndpointPeerConnection::gotIceCandidate):
(WebCore::MediaEndpointPeerConnection::doneGatheringCandidates):
(WebCore::MediaEndpointPeerConnection::iceTransportStateChanged):
(WebCore::MediaEndpointPeerConnection::createOffer): Deleted.
* Modules/mediastream/MediaEndpointPeerConnection.h:
* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::createOffer):
(WebCore::PeerConnectionBackend::createOfferSucceeded):
(WebCore::PeerConnectionBackend::createOfferFailed):
(WebCore::createPeerConnectionBackend): Deleted.
* Modules/mediastream/PeerConnectionBackend.h:
(WebCore::PeerConnectionBackend::PeerConnectionBackend):
(WebCore::PeerConnectionBackendClient::~PeerConnectionBackendClient): Deleted.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection):
* Modules/mediastream/RTCPeerConnection.h:
* WebCore.xcodeproj/project.pbxproj:

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

4 years agoREGRESSION (r207717): DumpRenderTree crashed in com.apple.WebCore: WebCore::Style...
antti@apple.com [Fri, 4 Nov 2016 06:21:06 +0000 (06:21 +0000)]
REGRESSION (r207717): DumpRenderTree crashed in com.apple.WebCore: WebCore::Style::Scope::flushPendingUpdate + 16
https://bugs.webkit.org/show_bug.cgi?id=164397
<rdar://problem/29100135>

Reviewed by Ryosuke Niwa.

The problem here was that we were leaving stale pointers to Document::m_inDocumentShadowRoots set when
using fast-path document teardown.

(Patch and stories mostly by rniwa).

* dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::Document::didInsertInDocumentShadowRoot):
(WebCore::Document::didRemoveInDocumentShadowRoot):

    Improve asserts.

* dom/Element.cpp:
(WebCore::Element::removeShadowRoot):

    Remove the superfluous call to notifyChildNodeRemoved in Element::removeShadowRoot to
    avoid invoking notifyChildNodeRemoved during a document teardown, which is incorrect. It's sufficient that
    ~ShadowRoot calls ContainerNode::removeDetachedChildren(), and in turn removeDetachedChildrenInContainer()
    since the latter function tears down nodes via the deletion queue during a document destruction and use
    notifyChildNodeRemoved() on nodes that outlive the shadow root.

* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::~ShadowRoot):

    Take care to clean up inDocumentShadowRoots for fast-pathed destruction too.

(WebCore::ShadowRoot::insertedInto):
(WebCore::ShadowRoot::removedFrom):

    Improve ShadowRoot's insertedInto and removedFrom so that they only try to add and remove itself from
    m_inDocumentShadowRoots when the connected-ness changes.

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

4 years agoClonedArguments need to also support haveABadTime mode.
mark.lam@apple.com [Fri, 4 Nov 2016 06:18:01 +0000 (06:18 +0000)]
ClonedArguments need to also support haveABadTime mode.
https://bugs.webkit.org/show_bug.cgi?id=164200
<rdar://problem/27211336>

Reviewed by Geoffrey Garen.

JSTests:

* stress/have-a-bad-time-with-arguments.js: Added.

Source/JavaScriptCore:

For those who are not familiar with the parlance, "have a bad time" in the VM
means that Object.prototype has been modified in such a way that we can no longer
trivially do indexed property accesses without consulting the Object.prototype.
This defeats JIT indexed put optimizations, and hence, makes the VM "have a
bad time".

Once the VM enters haveABadTime mode, all existing objects are converted to use
slow put storage.  Thereafter, JSArrays are always created with slow put storage.
JSObjects are always created with a blank indexing type.  When a new indexed
property is put into the new object, its indexing type will be converted to the
slow put array indexing type just before we perform the put operation.  This is
how we ensure that the objects will also use slow put storage.

However, ClonedArguments is an object which was previously created unconditionally
to use contiguous storage.  Subsequently, if we try to call Object.preventExtensions()
on that ClonedArguments object, Object.preventExtensions() will:
1. make the ClonedArguments enter dictionary indexing mode, which means it will
2. first ensure that the ClonedArguments is using slow put array storage via
   JSObject::ensureArrayStorageSlow().

However, JSObject::ensureArrayStorageSlow() expects that we never see an object
with contiguous storage once we're in haveABadTime mode.  Our ClonedArguments
object did not obey this invariant.

The fix is to make the ClonedArguments factories create objects that use slow put
array storage when in haveABadTime mode.  This means:

1. JSGlobalObject::haveABadTime() now changes m_clonedArgumentsStructure to use
   its slow put version.

   Also the caching of the slow put version of m_regExpMatchesArrayStructure,
   because we only need to create it when we are having a bad time.

2. The ClonedArguments factories now allocates a butterfly with slow put array
   storage if we're in haveABadTime mode.

   Also added some assertions in ClonedArguments' factory methods to ensure that
   the created object has the slow put indexing type when it needsSlowPutIndexing().

3. DFGFixupPhase now watches the havingABadTimeWatchpoint because ClonedArguments'
   structure will change when having a bad time.

4. DFGArgumentEliminationPhase and DFGVarargsForwardingPhase need not be changed
   because it is still valid to eliminate the creation of the arguments object
   even having a bad time, as long as the arguments object does not escape.

5. The DFGAbstractInterpreterInlines now checks for haveABadTime, and sets the
   predicted type to be SpecObject.

Note: this issue does not apply to DirectArguments and ScopedArguments because
they use a blank indexing type (just like JSObject).

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArrayMode.cpp:
(JSC::DFG::ArrayMode::dump):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* runtime/ClonedArguments.cpp:
(JSC::ClonedArguments::createEmpty):
(JSC::ClonedArguments::createWithInlineFrame):
(JSC::ClonedArguments::createWithMachineFrame):
(JSC::ClonedArguments::createByCopyingFrom):
(JSC::ClonedArguments::createStructure):
(JSC::ClonedArguments::createSlowPutStructure):
* runtime/ClonedArguments.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::haveABadTime):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:

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

4 years agoDFG plays fast and loose with the shadow values of a Phi
fpizlo@apple.com [Fri, 4 Nov 2016 05:28:35 +0000 (05:28 +0000)]
DFG plays fast and loose with the shadow values of a Phi
https://bugs.webkit.org/show_bug.cgi?id=164309

Reviewed by Saam Barati.

JSTests:

This test demonstrates why the DFG needs to recognize the shadow value of a Phi.

* stress/dfg-ssa-swap.js: Added.
(foo):

Source/JavaScriptCore:

Oh boy, what an embarrassing mistake! The style of SSA I like to use avoids block/value
tuples as parameters of a Phi, thereby simplifying CFG transformations and making Phi largely
not a special case for most compiler transforms. It does this by introducing another value
called Upsilon, which stores a value into some Phi.

B3 uses this also. The easiest way to understand what Upsilon/Phi behave like is to look at
the B3->Air lowering. Air is not SSA - it has Tmps that you can assign to and use as many
times as you like. B3 allocates one Tmp per Value, and an extra "phiTmp" for Phis, so that
Phis get two Tmps total. Upsilon stores the value into the phiTmp of the Phi, while Phi moves
the value from its phiTmp to its tmp.

This is necessary to support scenarios like this:

    a: Phi()
    b: Upsilon(@x, ^a)
    c: Use(@a)

Here, we want @c to see @a's value before @b. That's a very basic requirement of SSA: that
the a value (like @a) doesn't change during its lifetime.

Unfortunately, DFG's liveness analysis, abstract interpreter, and integer range optimization
all failed to correctly model Upsilon/Phi this way. They would assume that it's accurate to
model the Upsilon as storing into the Phi directly.

Because DFG does flow analysis over SSA, making it correct means enabling it to speak of the
shadow value. This change addresses this problem by introducing the concept of a
NodeFlowProjection. This is a key that lets us speak of both a Node's primary value and its
optional "shadow" value. Liveness, AI, and integer range are now keyed by NodeFlowProjection
rather than Node*. Conceptually this turns out to be a very simple change, but it does touch
a good amount of code.

This looks to be perf-neutral.

Rolled back in after fixing the debug build.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/air/AirLiveness.h:
(JSC::B3::Air::TmpLivenessAdapter::numIndices):
(JSC::B3::Air::StackSlotLivenessAdapter::numIndices):
(JSC::B3::Air::RegLivenessAdapter::numIndices):
(JSC::B3::Air::AbstractLiveness::AbstractLiveness):
(JSC::B3::Air::TmpLivenessAdapter::maxIndex): Deleted.
(JSC::B3::Air::StackSlotLivenessAdapter::maxIndex): Deleted.
(JSC::B3::Air::RegLivenessAdapter::maxIndex): Deleted.
* dfg/DFGAbstractInterpreter.h:
(JSC::DFG::AbstractInterpreter::forNode):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::forAllValues):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::dump):
* dfg/DFGAtTailAbstractState.cpp:
(JSC::DFG::AtTailAbstractState::createValueForNode):
(JSC::DFG::AtTailAbstractState::forNode):
* dfg/DFGAtTailAbstractState.h:
* dfg/DFGBasicBlock.h:
* dfg/DFGCombinedLiveness.cpp:
(JSC::DFG::liveNodesAtHead):
* dfg/DFGCombinedLiveness.h:
* dfg/DFGFlowIndexing.cpp: Added.
(JSC::DFG::FlowIndexing::FlowIndexing):
(JSC::DFG::FlowIndexing::~FlowIndexing):
(JSC::DFG::FlowIndexing::recompute):
* dfg/DFGFlowIndexing.h: Added.
(JSC::DFG::FlowIndexing::graph):
(JSC::DFG::FlowIndexing::numIndices):
(JSC::DFG::FlowIndexing::index):
(JSC::DFG::FlowIndexing::shadowIndex):
(JSC::DFG::FlowIndexing::nodeProjection):
* dfg/DFGFlowMap.h: Added.
(JSC::DFG::FlowMap::FlowMap):
(JSC::DFG::FlowMap::resize):
(JSC::DFG::FlowMap::graph):
(JSC::DFG::FlowMap::at):
(JSC::DFG::FlowMap::atShadow):
(WTF::printInternal):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::Graph):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::abstractValuesCache): Deleted.
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::InPlaceAbstractState):
(JSC::DFG::InPlaceAbstractState::beginBasicBlock):
(JSC::DFG::setLiveValues):
(JSC::DFG::InPlaceAbstractState::endBasicBlock):
(JSC::DFG::InPlaceAbstractState::merge):
* dfg/DFGInPlaceAbstractState.h:
(JSC::DFG::InPlaceAbstractState::createValueForNode):
(JSC::DFG::InPlaceAbstractState::forNode):
* dfg/DFGIntegerRangeOptimizationPhase.cpp:
* dfg/DFGLivenessAnalysisPhase.cpp:
(JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase):
(JSC::DFG::LivenessAnalysisPhase::run):
(JSC::DFG::LivenessAnalysisPhase::processBlock):
(JSC::DFG::LivenessAnalysisPhase::addChildUse): Deleted.
* dfg/DFGNode.h:
(JSC::DFG::NodeComparator::operator()):
(JSC::DFG::nodeListDump):
(JSC::DFG::nodeMapDump):
(JSC::DFG::nodeValuePairListDump):
(JSC::DFG::nodeComparator): Deleted.
* dfg/DFGNodeAbstractValuePair.cpp: Added.
(JSC::DFG::NodeAbstractValuePair::dump):
* dfg/DFGNodeAbstractValuePair.h: Added.
(JSC::DFG::NodeAbstractValuePair::NodeAbstractValuePair):
* dfg/DFGNodeFlowProjection.cpp: Added.
(JSC::DFG::NodeFlowProjection::dump):
* dfg/DFGNodeFlowProjection.h: Added.
(JSC::DFG::NodeFlowProjection::NodeFlowProjection):
(JSC::DFG::NodeFlowProjection::operator bool):
(JSC::DFG::NodeFlowProjection::kind):
(JSC::DFG::NodeFlowProjection::node):
(JSC::DFG::NodeFlowProjection::operator*):
(JSC::DFG::NodeFlowProjection::operator->):
(JSC::DFG::NodeFlowProjection::hash):
(JSC::DFG::NodeFlowProjection::operator==):
(JSC::DFG::NodeFlowProjection::operator!=):
(JSC::DFG::NodeFlowProjection::operator<):
(JSC::DFG::NodeFlowProjection::operator>):
(JSC::DFG::NodeFlowProjection::operator<=):
(JSC::DFG::NodeFlowProjection::operator>=):
(JSC::DFG::NodeFlowProjection::isHashTableDeletedValue):
(JSC::DFG::NodeFlowProjection::isStillValid):
(JSC::DFG::NodeFlowProjection::forEach):
(JSC::DFG::NodeFlowProjectionHash::hash):
(JSC::DFG::NodeFlowProjectionHash::equal):
* dfg/DFGStoreBarrierInsertionPhase.cpp:

Source/WTF:

Made this API use size rather than maxIndex as its initialization parameter, because that's
less confusing.

* wtf/IndexSparseSet.h:
(WTF::IndexSparseSet<OverflowHandler>::IndexSparseSet):

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

4 years agoGive all the geometry classes a single-argument scale() function for consistency
simon.fraser@apple.com [Fri, 4 Nov 2016 05:11:12 +0000 (05:11 +0000)]
Give all the geometry classes a single-argument scale() function for consistency
https://bugs.webkit.org/show_bug.cgi?id=164400

Reviewed by Zalan Bujtas.
Source/WebCore:

Add single-argument scale() to FloatPoint, FloatQuad, FloatSize and LayoutPoint, as well
as adding one to GraphicsContext. Switch callers who passed the same value for sx and sy
to the new functions.

* dom/Document.cpp:
(WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale):
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::init):
(WebCore::MouseRelatedEvent::computeRelativePosition):
* dom/TreeScope.cpp:
(WebCore::TreeScope::nodeFromPoint):
* page/PrintContext.cpp:
(WebCore::PrintContext::spoolPage):
* platform/cocoa/ThemeCocoa.mm:
(WebCore::fitContextToBox):
* platform/graphics/FloatPoint.h:
(WebCore::FloatPoint::scale):
* platform/graphics/FloatQuad.h:
(WebCore::FloatQuad::scale):
* platform/graphics/FloatSize.h:
(WebCore::FloatSize::scale):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::applyDeviceScaleFactor):
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::scale):
* platform/graphics/LayoutPoint.h:
(WebCore::LayoutPoint::scale):
* platform/graphics/ca/TileCoverageMap.cpp:
(WebCore::TileCoverageMap::update):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::platformCALayerPaintContents):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::drawConsuming):
(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::drawPattern):
* platform/mac/ThemeMac.mm:
(WebCore::paintToggleButton):
(WebCore::paintButton):
(WebCore::paintStepper):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::nodeAtPoint):
* rendering/RenderMediaControls.cpp:
(WebCore::getUnzoomedRectAndAdjustCurrentContext):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMenuList):
(WebCore::RenderThemeMac::paintSliderThumb):
(WebCore::RenderThemeMac::paintSearchField):
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::paintSearchFieldResultsButton):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::selectionRectForTextFragment):
(WebCore::SVGInlineTextBox::paintDecorationWithStyle):
(WebCore::SVGInlineTextBox::paintTextWithShadows):
* svg/SVGPathBlender.cpp:
(WebCore::SVGPathBlender::blendAnimatedFloatPoint):
(WebCore::SVGPathBlender::blendArcToSegment):
* svg/SVGPathParser.cpp:
(WebCore::SVGPathParser::parseCurveToCubicSmoothSegment):
(WebCore::SVGPathParser::parseCurveToQuadraticSegment):
(WebCore::SVGPathParser::parseCurveToQuadraticSmoothSegment):
(WebCore::SVGPathParser::decomposeArcToCubic):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::localCoordinateSpaceTransform):

Source/WebKit2:

Use single-argument scale() functions.

* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::paint):
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _takeViewSnapshot]):
(-[WKWebView _scrollToContentScrollPosition:scrollOrigin:]):
(-[WKWebView _scrollByContentOffset:]):
(-[WKWebView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _didCommitLayerTree:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _updateTapHighlight]):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
(WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::scaledMagnificationOrigin):
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::renderedImage):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::snapshot):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::scrollToPoint):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSelectionSnapshot):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scalePageInViewCoordinates):
(WebKit::WebPage::scaleView):
(WebKit::WebPage::snapshotAtSize):
(WebKit::WebPage::snapshotNode):
(WebKit::WebPage::drawRectToImage):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::restorePageState):

Tools:

Test single-argument scale().

* TestWebKitAPI/Tests/WebCore/FloatPoint.cpp:
(TestWebKitAPI::TEST):

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

4 years agoSource/WebCore:
antti@apple.com [Fri, 4 Nov 2016 05:08:29 +0000 (05:08 +0000)]
Source/WebCore:
REGRESSION (r207669): Crash under media controls shadow root construction
https://bugs.webkit.org/show_bug.cgi?id=164381
<rdar://problem/28935401>

Reviewed by Simon Fraser.

The problem is that we are running a script for media control UA shadow tree in HTMLMediaElement::insertedInto.
It is not safe to run scripts in insertedInto as the tree is in inconsistent state. Instead finishedInsertingSubtree
callback should be used.

Test: media/media-controls-shadow-construction-crash.html

Seen on https://www.theguardian.com/artanddesign/video/2013/oct/14/banksy-central-park-new-york-video

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::insertedInto):
(WebCore::HTMLMediaElement::finishedInsertingSubtree):

    Move configureMediaControls() to finishedInsertingSubtree().

* html/HTMLMediaElement.h:
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveComposedTree):

    Add an assert to make the bad state easier to hit in tests.

LayoutTests:
REGRESSION (r207669): Crash under SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending
https://bugs.webkit.org/show_bug.cgi?id=164381
<rdar://problem/28935401>

Reviewed by Simon Fraser.

* media/media-controls-shadow-construction-crash-expected.txt: Added.
* media/media-controls-shadow-construction-crash.html: Added.

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

4 years agoUnreviewed, rolling out r208364.
commit-queue@webkit.org [Fri, 4 Nov 2016 04:38:58 +0000 (04:38 +0000)]
Unreviewed, rolling out r208364.
https://bugs.webkit.org/show_bug.cgi?id=164402

broke the build (Requested by smfr on #webkit).

Reverted changeset:

"DFG plays fast and loose with the shadow values of a Phi"
https://bugs.webkit.org/show_bug.cgi?id=164309
http://trac.webkit.org/changeset/208364

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

4 years agoAdd an assertion to diagnose stress GC bots test failures
rniwa@webkit.org [Fri, 4 Nov 2016 03:46:51 +0000 (03:46 +0000)]
Add an assertion to diagnose stress GC bots test failures
https://bugs.webkit.org/show_bug.cgi?id=164396

Reviewed by Antti Koivisto.

Added an assertion for calling ElementQueue::add while ElementQueue::invokeAll is in progress.
This should never happen as long as all DOM API has an appropriate CEReactions IDL attribute.

* dom/CustomElementReactionQueue.cpp:
(WebCore::CustomElementReactionStack::ElementQueue::add):
(WebCore::CustomElementReactionStack::ElementQueue::invokeAll):
* dom/CustomElementReactionQueue.h:

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

4 years agoAdd the asynchronous image decoding mode
commit-queue@webkit.org [Fri, 4 Nov 2016 02:57:49 +0000 (02:57 +0000)]
Add the asynchronous image decoding mode
https://bugs.webkit.org/show_bug.cgi?id=155546

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-11-03
Reviewed by Simon Fraser.

The asynchronous image decoding feature targets enhancing the rendering
in two scenarios: the animated images and scrolling a page which large
images. Enabling this feature for these two scenarios will be landed
separately.

The goal of the asynchronous image decoding is to have the decoded image
frame ready before it has to be drawn. Drawing an image does not have to
wait the image frame to be decoded.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::frameImageAtIndex): Use the negation of frameHasValidNativeImageAtIndex().
* platform/graphics/BitmapImage.h:
(WebCore::BitmapImage::frameIsBeingDecodedAtIndex): Answers whether a frame is being decoded.
(WebCore::BitmapImage::frameHasValidNativeImageAtIndex): Checks the validity of a frame.
(WebCore::BitmapImage::frameHasInvalidNativeImageAtIndex): Deleted.
* platform/graphics/Image.h:
(WebCore::Image::newFrameNativeImageAvailableAtIndex): Notifies the image with the availability of a frame NativeImage.
* platform/graphics/ImageFrame.h:
(WebCore::ImageFrame::isBeingDecoded): Answers whether the frame is being decoded.
(WebCore::ImageFrame::hasValidNativeImage): Checks the validity of the frame.
(WebCore::ImageFrame::hasInvalidNativeImage): Deleted.
* platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::~ImageFrameCache): Asserts the decoding loop was ended before deleting the ImageFrameCache.
(WebCore::ImageFrameCache::setFrameNativeImageAtIndex): Rename this function to matches the other which take the frame index.
(WebCore::ImageFrameCache::setFrameMetadataAtIndex): Ditto.
(WebCore::ImageFrameCache::replaceFrameNativeImageAtIndex): It setts the ImageFrame's members and updates the decoded size.
(WebCore::ImageFrameCache::cacheFrameNativeImageAtIndex): Replaces the frame NativeImage and notifies the Image with the new frame.
(WebCore::ImageFrameCache::decodingQueue): Ensures the decoding WorkQueue is created and returns it.
(WebCore::ImageFrameCache::startAsyncDecodingQueue): Starts a decoding WorkQueue which loops until m_frameRequestQueue is closed.
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex): Allows ImageSource to send a request to start asynchronous frame image decoding.
(WebCore::ImageFrameCache::stopAsyncDecodingQueue): Stops the decoding WorkQueue by closing m_frameRequestQueue.
(WebCore::ImageFrameCache::frameAtIndex): Call replaceFrameNativeImageAtIndex().
(WebCore::ImageFrameCache::frameIsBeingDecodedAtIndex): Returns true if a request for the image frame is issued but not finished yet.
(WebCore::ImageFrameCache::frameHasValidNativeImageAtIndex): Checks the validity of a frame.
(WebCore::ImageFrameCache::setFrameNativeImage): Deleted. Was renamed to be setFrameNativeImageAtIndex.
(WebCore::ImageFrameCache::setFrameMetadata): Deleted. Was renamed to be setFrameMetadataAtIndex
(WebCore::ImageFrameCache::frameHasInvalidNativeImageAtIndex): Deleted. Was renamed to be frameHasValidNativeImageAtIndex.
* platform/graphics/ImageFrameCache.h:
(WebCore::ImageFrameCache::create): The decoding queue needs to hold a reference to this class so it can stop decoding safely without blocking.
(WebCore::ImageFrameCache::hasDecodingQueue): Returns true if a decoding queue has started.
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::ImageSource): Call ImageFrameCache::create().
(WebCore::ImageSource::clear): Deleting the decoder is unnecessary for asynchronous decoding because ImageFrameCache manages all the memory.

(WebCore::ImageSource::destroyDecodedData):
(WebCore::ImageSource::destroyDecodedDataIfNecessary):
(WebCore::ImageSource::ensureDecoderAvailable):
(WebCore::ImageSource::dataChanged):
(WebCore::ImageSource::isAllDataReceived):
(WebCore::ImageSource::isAsyncDecodingRequired): Answers the question whether the async image decoding is required for this ImageSource.
(WebCore::ImageSource::frameImageAtIndex):
* platform/graphics/ImageSource.h:
(WebCore::ImageSource::decodedSize):
(WebCore::ImageSource::requestFrameAsyncDecodingAtIndex):
(WebCore::ImageSource::stopAsyncDecodingQueue):
(WebCore::ImageSource::isSizeAvailable):
(WebCore::ImageSource::frameCount):
(WebCore::ImageSource::repetitionCount):
(WebCore::ImageSource::filenameExtension):
(WebCore::ImageSource::hotSpot):
(WebCore::ImageSource::size):
(WebCore::ImageSource::sizeRespectingOrientation):
(WebCore::ImageSource::singlePixelSolidColor):
(WebCore::ImageSource::frameIsBeingDecodedAtIndex):
(WebCore::ImageSource::frameIsCompleteAtIndex):
(WebCore::ImageSource::frameHasAlphaAtIndex):
(WebCore::ImageSource::frameHasImageAtIndex):
(WebCore::ImageSource::frameSubsamplingLevelAtIndex):
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::frameBytesAtIndex):
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::frameOrientationAtIndex):
 Make m_frameCache a type Ref<ImageFrameCache>. Use '->' instead of '.' when accessing its members.

(WebCore::ImageSource::frameHasValidNativeImageAtIndex): Checks the validity of a frame.
(WebCore::ImageSource::frameHasInvalidNativeImageAtIndex): Deleted. Was renamed to be frameHasValidNativeImageAtIndex.

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

4 years agoDFG plays fast and loose with the shadow values of a Phi
fpizlo@apple.com [Fri, 4 Nov 2016 02:37:45 +0000 (02:37 +0000)]
DFG plays fast and loose with the shadow values of a Phi
https://bugs.webkit.org/show_bug.cgi?id=164309

Reviewed by Saam Barati.

JSTests:

This test demonstrates why the DFG needs to recognize the shadow value of a Phi.

* stress/dfg-ssa-swap.js: Added.
(foo):

Source/JavaScriptCore:

Oh boy, what an embarrassing mistake! The style of SSA I like to use avoids block/value
tuples as parameters of a Phi, thereby simplifying CFG transformations and making Phi largely
not a special case for most compiler transforms. It does this by introducing another value
called Upsilon, which stores a value into some Phi.

B3 uses this also. The easiest way to understand what Upsilon/Phi behave like is to look at
the B3->Air lowering. Air is not SSA - it has Tmps that you can assign to and use as many
times as you like. B3 allocates one Tmp per Value, and an extra "phiTmp" for Phis, so that
Phis get two Tmps total. Upsilon stores the value into the phiTmp of the Phi, while Phi moves
the value from its phiTmp to its tmp.

This is necessary to support scenarios like this:

    a: Phi()
    b: Upsilon(@x, ^a)
    c: Use(@a)

Here, we want @c to see @a's value before @b. That's a very basic requirement of SSA: that
the a value (like @a) doesn't change during its lifetime.

Unfortunately, DFG's liveness analysis, abstract interpreter, and integer range optimization
all failed to correctly model Upsilon/Phi this way. They would assume that it's accurate to
model the Upsilon as storing into the Phi directly.

Because DFG does flow analysis over SSA, making it correct means enabling it to speak of the
shadow value. This change addresses this problem by introducing the concept of a
NodeFlowProjection. This is a key that lets us speak of both a Node's primary value and its
optional "shadow" value. Liveness, AI, and integer range are now keyed by NodeFlowProjection
rather than Node*. Conceptually this turns out to be a very simple change, but it does touch
a good amount of code.

This looks to be perf-neutral.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/air/AirLiveness.h:
(JSC::B3::Air::TmpLivenessAdapter::numIndices):
(JSC::B3::Air::StackSlotLivenessAdapter::numIndices):
(JSC::B3::Air::RegLivenessAdapter::numIndices):
(JSC::B3::Air::AbstractLiveness::AbstractLiveness):
(JSC::B3::Air::TmpLivenessAdapter::maxIndex): Deleted.
(JSC::B3::Air::StackSlotLivenessAdapter::maxIndex): Deleted.
(JSC::B3::Air::RegLivenessAdapter::maxIndex): Deleted.
* dfg/DFGAbstractInterpreter.h:
(JSC::DFG::AbstractInterpreter::forNode):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::forAllValues):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::dump):
* dfg/DFGAtTailAbstractState.cpp:
(JSC::DFG::AtTailAbstractState::createValueForNode):
(JSC::DFG::AtTailAbstractState::forNode):
* dfg/DFGAtTailAbstractState.h:
* dfg/DFGBasicBlock.h:
* dfg/DFGCombinedLiveness.cpp:
(JSC::DFG::liveNodesAtHead):
* dfg/DFGCombinedLiveness.h:
* dfg/DFGFlowIndexing.cpp: Added.
(JSC::DFG::FlowIndexing::FlowIndexing):
(JSC::DFG::FlowIndexing::~FlowIndexing):
(JSC::DFG::FlowIndexing::recompute):
* dfg/DFGFlowIndexing.h: Added.
(JSC::DFG::FlowIndexing::graph):
(JSC::DFG::FlowIndexing::numIndices):
(JSC::DFG::FlowIndexing::index):
(JSC::DFG::FlowIndexing::shadowIndex):
(JSC::DFG::FlowIndexing::nodeProjection):
* dfg/DFGFlowMap.h: Added.
(JSC::DFG::FlowMap::FlowMap):
(JSC::DFG::FlowMap::resize):
(JSC::DFG::FlowMap::graph):
(JSC::DFG::FlowMap::at):
(JSC::DFG::FlowMap::atShadow):
(WTF::printInternal):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::Graph):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::abstractValuesCache): Deleted.
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::InPlaceAbstractState):
(JSC::DFG::InPlaceAbstractState::beginBasicBlock):
(JSC::DFG::setLiveValues):
(JSC::DFG::InPlaceAbstractState::endBasicBlock):
(JSC::DFG::InPlaceAbstractState::merge):
* dfg/DFGInPlaceAbstractState.h:
(JSC::DFG::InPlaceAbstractState::createValueForNode):
(JSC::DFG::InPlaceAbstractState::forNode):
* dfg/DFGIntegerRangeOptimizationPhase.cpp:
* dfg/DFGLivenessAnalysisPhase.cpp:
(JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase):
(JSC::DFG::LivenessAnalysisPhase::run):
(JSC::DFG::LivenessAnalysisPhase::processBlock):
(JSC::DFG::LivenessAnalysisPhase::addChildUse): Deleted.
* dfg/DFGNode.h:
(JSC::DFG::NodeComparator::operator()):
(JSC::DFG::nodeListDump):
(JSC::DFG::nodeMapDump):
(JSC::DFG::nodeValuePairListDump):
(JSC::DFG::nodeComparator): Deleted.
* dfg/DFGNodeAbstractValuePair.cpp: Added.
(JSC::DFG::NodeAbstractValuePair::dump):
* dfg/DFGNodeAbstractValuePair.h: Added.
(JSC::DFG::NodeAbstractValuePair::NodeAbstractValuePair):
* dfg/DFGNodeFlowProjection.cpp: Added.
(JSC::DFG::NodeFlowProjection::dump):
* dfg/DFGNodeFlowProjection.h: Added.
(JSC::DFG::NodeFlowProjection::NodeFlowProjection):
(JSC::DFG::NodeFlowProjection::operator bool):
(JSC::DFG::NodeFlowProjection::kind):
(JSC::DFG::NodeFlowProjection::node):
(JSC::DFG::NodeFlowProjection::operator*):
(JSC::DFG::NodeFlowProjection::operator->):
(JSC::DFG::NodeFlowProjection::hash):
(JSC::DFG::NodeFlowProjection::operator==):
(JSC::DFG::NodeFlowProjection::operator!=):
(JSC::DFG::NodeFlowProjection::operator<):
(JSC::DFG::NodeFlowProjection::operator>):
(JSC::DFG::NodeFlowProjection::operator<=):
(JSC::DFG::NodeFlowProjection::operator>=):
(JSC::DFG::NodeFlowProjection::isHashTableDeletedValue):
(JSC::DFG::NodeFlowProjection::isStillValid):
(JSC::DFG::NodeFlowProjection::forEach):
(JSC::DFG::NodeFlowProjectionHash::hash):
(JSC::DFG::NodeFlowProjectionHash::equal):
* dfg/DFGStoreBarrierInsertionPhase.cpp:

Source/WTF:

Made this API use size rather than maxIndex as its initialization parameter, because that's
less confusing.

* wtf/IndexSparseSet.h:
(WTF::IndexSparseSet<OverflowHandler>::IndexSparseSet):

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

4 years ago[WebGL2] Implement getBufferSubData()
mmaxfield@apple.com [Fri, 4 Nov 2016 01:57:15 +0000 (01:57 +0000)]
[WebGL2] Implement getBufferSubData()
https://bugs.webkit.org/show_bug.cgi?id=164111

Reviewed by Dean Jackson.

Source/WebCore:

The call exists in OpenGL 3.2 but in order to have parity with
OpenGL ES 3 we back it with glMapBufferRange() instead.

This patch simply adds surface area to GraphicsContext3D
until we can get an ANGLE implementation of it.

When testing this patch I discovered that r207649 incorrectly
interpreted arguments to bufferData() and bufferSubData() as
byte offsets. Instead, they should be element indices. This
patch fixes those functions to work correctly so that
getBufferSubData() can be tested correctly.

Tests: fast/canvas/webgl/webgl2-buffers.html
       fast/canvas/webgl/getBufferSubData-webgl1.html

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::arrayBufferViewElementSize):
(WebCore::WebGL2RenderingContext::bufferData):
(WebCore::WebGL2RenderingContext::bufferSubData):
(WebCore::WebGL2RenderingContext::getBufferSubData):
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGL2RenderingContext.idl:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::getBufferSubData):
(WebCore::GraphicsContext3D::mapBufferRange):
(WebCore::GraphicsContext3D::unmapBuffer):

LayoutTests:

Test every successful download/upload combination I can think of.

* fast/canvas/webgl/getBufferSubData-webgl1.html: Added.
* fast/canvas/webgl/getBufferSubData-webgl1-expected.txt: Added.
* fast/canvas/webgl/webgl2-buffers-expected.txt: Added.
* fast/canvas/webgl/webgl2-buffers.html: Added.

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

4 years agoUnreviewed, mark support for the 'download' attribute as 'Done'.
cdumez@apple.com [Fri, 4 Nov 2016 01:47:53 +0000 (01:47 +0000)]
Unreviewed, mark support for the 'download' attribute as 'Done'.

* features.json:

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

4 years ago[WK2][Cocoa] Implement user interface for HTML form validation
cdumez@apple.com [Fri, 4 Nov 2016 01:38:31 +0000 (01:38 +0000)]
[WK2][Cocoa] Implement user interface for HTML form validation
https://bugs.webkit.org/show_bug.cgi?id=164143
<rdar://problem/28944652>

Reviewed by Simon Fraser.

Source/WebCore:

Add ValidationBubble class to show HTML form validation messages
using native dialogs. It currently has an implementation for both
Mac and iOS. It is in WebCore under platform/ so that it can be
used by both WebKit1 and WebKit2.

Update ownership of ValidationMessageClient so that is is owned
by the Page using a unique_ptr<>, which seems to be the modern
way of handling lifetime for page clients.

Test: fast/forms/validation-messages.html

* WebCore.xcodeproj/project.pbxproj:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::focusAndShowValidationMessage):
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::updateValidationMessage):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::~Page):
* page/Page.h:
(WebCore::Page::validationMessageClient):
* page/PageConfiguration.cpp:
* page/PageConfiguration.h:
* platform/ValidationBubble.h: Copied from Tools/DumpRenderTree/mac/UIScriptControllerMac.mm.
(WebCore::ValidationBubble::message):
* platform/ios/ValidationBubbleIOS.mm: Added.
(-[WebValidationBubbleDelegate adaptivePresentationStyleForPresentationController:traitCollection:]):
(WebCore::ValidationBubble::ValidationBubble):
(WebCore::ValidationBubble::~ValidationBubble):
(WebCore::ValidationBubble::show):
(WebCore::ValidationBubble::setAnchorRect):
* platform/mac/ValidationBubbleMac.mm: Added.
(WebCore::ValidationBubble::ValidationBubble):
(WebCore::ValidationBubble::~ValidationBubble):
(WebCore::ValidationBubble::showRelativeTo):

Source/WebKit2:

Implement the ValidationMessageClient in WebKit2 and have it display
a ValidationBubble on Cocoa. ValidationBubble is implemented using
native popovers on both Mac and iOS. As a result, Mac and iOS WK2
now use native popover for HTML form validation instead of the old
Shadow DOM based UI in WebCore.

The native popover shows at the bottom (or top) of the input and it
disapears as soon as the user starts typing or interacts with the
view (e.g. tap / scroll / zoom).

The feature is still disabled at runtime.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _keyboardWillShow:]):
(-[WKWebView _keyboardDidShow:]):
(-[WKWebView _contentsOfUserInterfaceItem:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleWheelEvent):
(WebKit::WebPageProxy::setPageZoomFactor):
(WebKit::WebPageProxy::setPageAndTextZoomFactors):
(WebKit::WebPageProxy::pageDidScroll):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::hideValidationMessage):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::validationBubble):
(WebKit::WebPageProxy::setIsKeyboardAnimatingIn):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::createValidationBubble):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _willStartScrollingOrZooming]):
(-[WKContentView scrollViewWillStartPanOrPinchGesture]):
(-[WKContentView _didEndScrollingOrZooming]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::potentialTapAtPosition):
(WebKit::WebPageProxy::showValidationMessage):
(WebKit::WebPageProxy::setIsScrollingOrZooming):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createValidationBubble):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showValidationMessage):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebValidationMessageClient.cpp: Copied from Tools/DumpRenderTree/mac/UIScriptControllerMac.mm.
(WebKit::WebValidationMessageClient::WebValidationMessageClient):
(WebKit::WebValidationMessageClient::~WebValidationMessageClient):
(WebKit::WebValidationMessageClient::showValidationMessage):
(WebKit::WebValidationMessageClient::hideValidationMessage):
(WebKit::WebValidationMessageClient::isValidationMessageVisible):
* WebProcess/WebCoreSupport/WebValidationMessageClient.h: Copied from Tools/DumpRenderTree/mac/UIScriptControllerMac.mm.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_userInterfaceLayoutDirection):

Tools:

Add support for UIScriptController::contentsOfUserInterfaceItem("validationBubble")
on both Mac and iOS to retrieve the currently displayed validation message.

* DumpRenderTree/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::contentsOfUserInterfaceItem):
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::contentsOfUserInterfaceItem):
(WTR::UIScriptController::selectFormAccessoryPickerRow):
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::contentsOfUserInterfaceItem):

LayoutTests:

* fast/forms/validation-messages-expected.txt: Added.
* fast/forms/validation-messages.html: Added.
Add layout test coverage for checking that the right validation messages
are displayed when submitting forms with constraint violations. More
testing will be landed in follow up to cover other things besides the
messages (e.g. when does the bubble disappear).

* platform/mac-wk1/TestExpectations:
Skip new test on WebKit1 because the feature is WebKit2 only at the
moment.

* platform/ios-simulator-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:
Skip tests for the Shadow DOM based HTML form validation UI on
Mac and iOS WK2 now that those ports use native popovers instead.

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

4 years agoUpdate custom elements tests
rniwa@webkit.org [Fri, 4 Nov 2016 01:37:01 +0000 (01:37 +0000)]
Update custom elements tests
https://bugs.webkit.org/show_bug.cgi?id=164352

Reviewed by Antti Koivisto.
LayoutTests/imported/w3c:

Reimported the custom elements tests as of 5047c27a5c61cc12eab75ac72b86125ec3cc8527.

* web-platform-tests/custom-elements/custom-element-reaction-queue-expected.txt: Added.
* web-platform-tests/custom-elements/custom-element-reaction-queue.html: Added.
* web-platform-tests/custom-elements/htmlconstructor/newtarget.html:
* web-platform-tests/custom-elements/reactions/CSSStyleDeclaration-expected.txt: Moved from fast/custom-elements/reactions/.
* web-platform-tests/custom-elements/reactions/CSSStyleDeclaration.html: Ditto.
* web-platform-tests/custom-elements/reactions/Document.html: Updated.
* web-platform-tests/custom-elements/reactions/HTMLAnchorElement-expected.txt: Moved from fast/custom-elements/reactions/.
* web-platform-tests/custom-elements/reactions/HTMLAnchorElement.html: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLOptionElement-expected.txt: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLOptionElement.html: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLOptionsCollection-expected.txt: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLOptionsCollection.html: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLOutputElement-expected.txt: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLOutputElement.html: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLSelectElement-expected.txt: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLSelectElement.html:  Ditto.
* web-platform-tests/custom-elements/reactions/HTMLTableElement-expected.txt: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLTableElement.html: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLTableRowElement-expected.txt: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLTableRowElement.html: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLTableSectionElement-expected.txt: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLTableSectionElement.html: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLTitleElement-expected.txt: Ditto.
* web-platform-tests/custom-elements/reactions/HTMLTitleElement.html: Ditto.
* web-platform-tests/custom-elements/reactions/ShadowRoot-expected.txt: Ditto.
* web-platform-tests/custom-elements/reactions/ShadowRoot.html: Ditto.
* web-platform-tests/custom-elements/reactions/resources/reactions.js:
* web-platform-tests/custom-elements/reactions/w3c-import.log:
* web-platform-tests/custom-elements/resources/custom-elements-helpers.js:
* web-platform-tests/custom-elements/upgrading/upgrading-enqueue-reactions-expected.txt: Moved from fast/custom-elements/.
* web-platform-tests/custom-elements/upgrading/upgrading-enqueue-reactions.html: Ditto.
* web-platform-tests/custom-elements/upgrading/w3c-import.log:
* web-platform-tests/custom-elements/w3c-import.log:

LayoutTests:

Removed tests that have been back imported via web-platform-tests.

* fast/custom-elements/custom-element-reaction-queue-expected.txt: Removed.
* fast/custom-elements/custom-element-reaction-queue.html: Removed.
* fast/custom-elements/reactions-for-webkit-extensions.html:
* fast/custom-elements/reactions/: Removed.
* fast/custom-elements/resources/additional-helpers.js: Removed.
* fast/custom-elements/upgrading-enqueue-reactions-expected.txt: Removed.
* fast/custom-elements/upgrading-enqueue-reactions.html: Removed.

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

4 years agoIndexedDB 2.0: Rename IDBKeyRange.contains to IDBKeyRange.includes.
beidson@apple.com [Fri, 4 Nov 2016 01:08:55 +0000 (01:08 +0000)]
IndexedDB 2.0: Rename IDBKeyRange.contains to IDBKeyRange.includes.
https://bugs.webkit.org/show_bug.cgi?id=164383

Reviewed by Beth Dakin.

LayoutTests/imported/w3c:

* web-platform-tests/IndexedDB/idbkeyrange-includes-expected.txt:

Source/WebCore:

No new tests (Updated existing tests).

* Modules/indexeddb/IDBKeyRange.cpp:
(WebCore::IDBKeyRange::includes):
(WebCore::IDBKeyRange::contains): Deleted.
* Modules/indexeddb/IDBKeyRange.h:
* Modules/indexeddb/IDBKeyRange.idl:

LayoutTests:

* storage/indexeddb/resources/keyrange.js:

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

4 years agoMarking two inspector/sampling-profiler tests as flaky.
ryanhaddad@apple.com [Thu, 3 Nov 2016 23:57:27 +0000 (23:57 +0000)]
Marking two inspector/sampling-profiler tests as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164388

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 years agoFixes to build JSCOnly on macOS
annulen@yandex.ru [Thu, 3 Nov 2016 23:49:43 +0000 (23:49 +0000)]
Fixes to build JSCOnly on macOS
https://bugs.webkit.org/show_bug.cgi?id=164379

Reviewed by Michael Catanzaro.

.:

* Source/cmake/OptionsJSCOnly.cmake: Define BUILDING_JSCONLY__, use
system ICU libraries on macOS
* Source/cmake/WebKitMacros.cmake: Fixed WEBKIT_FRAMEWORK macro for
static JSC

Source/WTF:

* wtf/Platform.h: JSCOnly port should not provide any PLATFORM() macro

Tools:

* TestWebKitAPI/PlatformJSCOnly.cmake: Moved BUILDING_JSCONLY__
definition to OptionsJSCOnly.cmake

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

4 years agoUnreviewed, rolling out r208302.
ryanhaddad@apple.com [Thu, 3 Nov 2016 23:18:01 +0000 (23:18 +0000)]
Unreviewed, rolling out r208302.

This change causes LayoutTest crashes under GuardMalloc.

Reverted changeset:

"Load stylesheets in link elements inside a connected shadow
tree"
https://bugs.webkit.org/show_bug.cgi?id=160683
http://trac.webkit.org/changeset/208302

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

4 years agoUnreviewed, add HTML5 specification for HTML Interactive Form Validation feature.
cdumez@apple.com [Thu, 3 Nov 2016 23:10:53 +0000 (23:10 +0000)]
Unreviewed, add HTML5 specification for HTML Interactive Form Validation feature.

* features.json:

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

4 years agoUnreviewed, add HTML Interactive Form Validation to features.json
cdumez@apple.com [Thu, 3 Nov 2016 23:06:51 +0000 (23:06 +0000)]
Unreviewed, add HTML Interactive Form Validation to features.json

* features.json:

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

4 years agoUnreviewed, rolling out due to crash in Amazon web site
utatane.tea@gmail.com [Thu, 3 Nov 2016 22:24:36 +0000 (22:24 +0000)]
Unreviewed, rolling out due to crash in Amazon web site
https://bugs.webkit.org/show_bug.cgi?id=164380
<rdar://problem/29094221>

Source/WebCore:

* dom/Node.idl:
* domjit/JSNodeDOMJIT.cpp:
(WebCore::NodeOwnerDocumentDOMJIT::checkDOM): Deleted.
(WebCore::NodeOwnerDocumentDOMJIT::callDOMGetter): Deleted.

LayoutTests:

* js/dom/domjit-accessor-owner-document-expected.txt: Removed.
* js/dom/domjit-accessor-owner-document.html: Removed.

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

4 years ago[cmake][MinGW] Don't use MS bitfield layout to reduce sizes of data structures
annulen@yandex.ru [Thu, 3 Nov 2016 22:23:21 +0000 (22:23 +0000)]
[cmake][MinGW] Don't use MS bitfield layout to reduce sizes of data structures
https://bugs.webkit.org/show_bug.cgi?id=164026

Reviewed by Michael Catanzaro.

With MS bitfileds RegisterAtOffset becomes wider than ptrdiff_t because of
different alignment requirements, invoking static_assert. Instead of
muting assert for MinGW like it's done for MSVC, it's a better choice to
use more dense layout, as bitfields are not used in public APIs.

Also, suppress MinGW warnings from "#pragma warning" which it doesn't
understand.

* Source/cmake/OptionsCommon.cmake:

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

4 years agoIndexedDB 2.0: Support binary keys.
beidson@apple.com [Thu, 3 Nov 2016 21:47:21 +0000 (21:47 +0000)]
IndexedDB 2.0: Support binary keys.
<rdar://problem/28806927> and https://bugs.webkit.org/show_bug.cgi?id=164359

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/IndexedDB/idb_binary_key_conversion-expected.txt:
* web-platform-tests/IndexedDB/idbfactory_cmp3-expected.txt:
* web-platform-tests/IndexedDB/idbfactory_cmp4-expected.txt:

Source/WebCore:

Tests: storage/indexeddb/modern/binary-keys-1-private.html
       storage/indexeddb/modern/binary-keys-1.html
       Changes to other existing tests.

* Modules/indexeddb/IDBKey.cpp:
(WebCore::IDBKey::createBinary):
(WebCore::IDBKey::IDBKey):
(WebCore::IDBKey::compare):
* Modules/indexeddb/IDBKey.h:
(WebCore::IDBKey::binary):
(WebCore::compareBinaryKeyData):

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::maybeCreateIDBKey):
(WebCore::IDBKeyData::isolatedCopy):
(WebCore::IDBKeyData::encode):
(WebCore::IDBKeyData::decode):
(WebCore::IDBKeyData::compare):
(WebCore::IDBKeyData::loggingString):
(WebCore::IDBKeyData::operator==):
* Modules/indexeddb/IDBKeyData.h:
(WebCore::IDBKeyData::hash):
(WebCore::IDBKeyData::encode):
(WebCore::IDBKeyData::decode):

* Modules/indexeddb/IndexedDB.h: Add new enum for the new key type.

* bindings/js/IDBBindingUtilities.cpp:
(WebCore::toJS):
(WebCore::createIDBKeyFromValue):

* platform/ThreadSafeDataBuffer.h:
(WebCore::ThreadSafeDataBufferImpl::ThreadSafeDataBufferImpl):
(WebCore::ThreadSafeDataBuffer::copyData):
(WebCore::ThreadSafeDataBuffer::size):
(WebCore::ThreadSafeDataBuffer::operator==):
(WebCore::ThreadSafeDataBuffer::ThreadSafeDataBuffer):

Source/WTF:

* wtf/Hasher.h:
(WTF::StringHasher::hashMemory): Teach hashMemory() to handle buffers with odd lengths.

LayoutTests:

* storage/indexeddb/factory-cmp-expected.txt:
* storage/indexeddb/factory-cmp-private-expected.txt:
* storage/indexeddb/key-type-binary-expected.txt:
* storage/indexeddb/key-type-binary-private-expected.txt:
* storage/indexeddb/modern/binary-keys-1-expected.txt: Added.
* storage/indexeddb/modern/binary-keys-1-private-expected.txt: Added.
* storage/indexeddb/modern/binary-keys-1-private.html: Added.
* storage/indexeddb/modern/binary-keys-1.html: Added.
* storage/indexeddb/modern/resources/binary-keys-1.js: Added.
* storage/indexeddb/resources/factory-cmp.js:
* storage/indexeddb/resources/key-type-binary.js:

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

4 years agoWeb Inspector: Stack overflow when searching a timeline recording for JS function...
nvasilyev@apple.com [Thu, 3 Nov 2016 21:20:12 +0000 (21:20 +0000)]
Web Inspector: Stack overflow when searching a timeline recording for JS function names
https://bugs.webkit.org/show_bug.cgi?id=161784
<rdar://problem/28219498>

Reviewed by Timothy Hatcher.

_populate method of ProfileNodeDataGridNode and ProfileDataGridNode traverses
all children of a given node. makeVisible function of DataGrid#_applyFiltersToNode
traverses all its parents to expand them. This creates an infinite recursion.
Remove "populate" event before appending child nodes to prevent it.

* UserInterface/Views/ProfileDataGridNode.js:
(WebInspector.ProfileDataGridNode.prototype._populate):
(WebInspector.ProfileDataGridNode):
* UserInterface/Views/ProfileNodeDataGridNode.js:
(WebInspector.ProfileNodeDataGridNode.prototype._populate):
(WebInspector.ProfileNodeDataGridNode):

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

4 years agoPrinting to PDF should produce internal links when HTML has internal links
timothy_horton@apple.com [Thu, 3 Nov 2016 21:07:51 +0000 (21:07 +0000)]
Printing to PDF should produce internal links when HTML has internal links
https://bugs.webkit.org/show_bug.cgi?id=112081
<rdar://problem/5955705>

Reviewed by Simon Fraser.
Patch originally by David Lattimore.

No new tests, as it's unclear how to test PDF output.

* dom/Element.cpp:
(WebCore::Element::findAnchorElementForLink):
* dom/Element.h:
Add findAnchorElementForLink, which looks up the anchor element corresponding
to the current element's href, and also returns the fragment name as an out parameter.

* page/PrintContext.cpp:
(WebCore::PrintContext::PrintContext):
(WebCore::PrintContext::spoolPage):
(WebCore::PrintContext::spoolRect):
(WebCore::PrintContext::end):
(WebCore::PrintContext::collectLinkedDestinations):
(WebCore::PrintContext::outputLinkedDestinations):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::addPDFURLRect):
Plumb internal links (fragment links) through to GraphicsContext, using
the fragment name from the page.

* page/PrintContext.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::supportsInternalLinks):
(WebCore::GraphicsContext::setDestinationForRect):
(WebCore::GraphicsContext::addDestinationAtPoint):
* platform/graphics/GraphicsContext.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::supportsInternalLinks):
(WebCore::GraphicsContext::setDestinationForRect):
(WebCore::GraphicsContext::addDestinationAtPoint):
Plumb internal links through to the CGContext. Apply the CTM, because
these functions expect positions in global coordinates.

* platform/graphics/win/GraphicsContextDirect2D.cpp:
(WebCore::GraphicsContext::setURLForRect):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setURLForRect):
Adjust setURLForRect to take a FloatRect, like everything else, and
stop rounding.

* UIProcess/mac/WKPrintingView.h:
* UIProcess/mac/WKPrintingView.mm:
(linkDestinationName):
(-[WKPrintingView _drawPDFDocument:page:atPoint:]):
Propagate link-to-destination annotations (and each page's destinations)
into the printed PDF.
Generate a unique destination name based on the page and position, because
we have lost the fragment name information.

(-[WKPrintingView drawRect:]):
Compute all of the destinations for every page, so that we can add them
to the context as we paint the pages (we need the page CTM in order to add them).

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

4 years agoUnreviewed, rolling out r208298.
achristensen@apple.com [Thu, 3 Nov 2016 21:06:31 +0000 (21:06 +0000)]
Unreviewed, rolling out r208298.
Source/WebCore:

https://bugs.webkit.org/show_bug.cgi?id=163939

caused asan crashes

Reverted changeset:

"NetworkSession: Add NetworkDataTask implementation for blobs"
https://bugs.webkit.org/show_bug.cgi?id=163939
http://trac.webkit.org/changeset/208298

Source/WebCore/platform/gtk/po:

caused

Reverted changeset:

"NetworkSession: Add NetworkDataTask implementation for blobs"
https://bugs.webkit.org/show_bug.cgi?id=163939
http://trac.webkit.org/changeset/208298

Source/WebKit2:

https://bugs.webkit.org/show_bug.cgi?id=163939

caused asan crashes

Reverted changeset:

"NetworkSession: Add NetworkDataTask implementation for blobs"
https://bugs.webkit.org/show_bug.cgi?id=163939
http://trac.webkit.org/changeset/208298

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

4 years agoUnreviewed, changelog fix due to failed git rebase..
keith_miller@apple.com [Thu, 3 Nov 2016 20:53:27 +0000 (20:53 +0000)]
Unreviewed, changelog fix due to failed git rebase..

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

4 years agoUnreviewed, rolling out r208330.
ryanhaddad@apple.com [Thu, 3 Nov 2016 20:53:00 +0000 (20:53 +0000)]
Unreviewed, rolling out r208330.

This change appears to have caused two editing tests to fail
on macOS.

Reverted changeset:

"Reduce PassRefPtr use in WebKit2"
https://bugs.webkit.org/show_bug.cgi?id=164360
http://trac.webkit.org/changeset/208330

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

4 years agoAsking for a value profile prediction should be defensive against not finding a value...
keith_miller@apple.com [Thu, 3 Nov 2016 20:47:57 +0000 (20:47 +0000)]
Asking for a value profile prediction should be defensive against not finding a value profile
https://bugs.webkit.org/show_bug.cgi?id=164306

Patch by Saam Barati <sbarati@apple.com> on 2016-11-03
Reviewed by Mark Lam.

Currently, the code that calls CodeBlock::valueProfilePredictionForBytecodeOffset
in the DFG assumes it will always be at a value producing node. However, this isn't
true if we tail call from an inlined setter. When we're at a tail call, we try
to find the first caller that isn't a tail call to see what value the
tail_call produces. If we inline a setter, however, we will end up finding
the put_by_id as our first non-tail-called "caller", and that won't have a
value profile associated with it since it's not a value producing node.
CodeBlock::valueProfilePredictionForBytecodeOffset should be defensive
against finding a null value profile.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::valueProfilePredictionForBytecodeOffset):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):

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

4 years agoWKWebView’s _observedRenderingProgressEvents not restored after web process crash
mitz@apple.com [Thu, 3 Nov 2016 19:31:07 +0000 (19:31 +0000)]
WKWebView’s _observedRenderingProgressEvents not restored after web process crash
https://bugs.webkit.org/show_bug.cgi?id=164368
<rdar://problem/29091954>

Reviewed by Anders Carlsson.

Source/WebKit2:

Test: TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Encode new observedLayoutMilestones member.
(WebKit::WebPageCreationParameters::decode): Decode it.
* Shared/WebPageCreationParameters.h: Declared new observedLayoutMilestones member variable.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Removed initializer for
  m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
(WebKit::WebPageProxy::listenForLayoutMilestones): Update new m_observedLayoutMilestones
  member variable. Don’t update m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
(WebKit::WebPageProxy::creationParameters): Set the observedLayoutMilestones member in the
  creation parameters.

* UIProcess/WebPageProxy.h: Declared new member variable, deleted
  m_wantsSessionRestorationRenderTreeSizeThresholdEvent declaration.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree): Rather than using
  m_wantsSessionRestorationRenderTreeSizeThresholdEvent, use m_observedLayoutMilestones.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Add the observed layout milestones from the creation parameters.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm: Added.
(TEST):

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

4 years ago[Win][Direct2D] Native Windows widgets are drawn upside-down
bfulgham@apple.com [Thu, 3 Nov 2016 19:09:42 +0000 (19:09 +0000)]
[Win][Direct2D] Native Windows widgets are drawn upside-down
https://bugs.webkit.org/show_bug.cgi?id=164370

Reviewed by Alex Christensen.

When we return from drawing in GDI code, we need to flip the resulting
bitmap so that it draws in the proper orientation in Direct2D.

Tested by existing widget tests.

* platform/graphics/win/GraphicsContextDirect2D.cpp:
(WebCore::GraphicsContext::releaseWindowsContext): Flip before drawing
to our Direct2D context.

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

4 years agoPurge PassRefPtr from Tools
commit-queue@webkit.org [Thu, 3 Nov 2016 18:47:09 +0000 (18:47 +0000)]
Purge PassRefPtr from Tools
https://bugs.webkit.org/show_bug.cgi?id=164358

Patch by Alex Christensen <achristensen@webkit.org> on 2016-11-03
Reviewed by Michael Catanzaro.

* ImageDiff/efl/ImageDiff.cpp:
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitAccessibility.cpp:
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
(WTR::AccessibilityController::create):
(WTR::AccessibilityController::rootElement):
(WTR::AccessibilityController::focusedElement):
(WTR::AccessibilityController::elementAtPoint):
(WTR::AccessibilityController::addNotificationListener): Deleted.
(WTR::AccessibilityController::removeNotificationListener): Deleted.
(WTR::AccessibilityController::accessibleElementById): Deleted.
(WTR::AccessibilityController::logAccessibilityEvents): Deleted.
(WTR::AccessibilityController::resetToConsistentState): Deleted.
(WTR::AccessibilityController::platformName): Deleted.
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
(WTR::AccessibilityController::logAccessibilityEvents):
* WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp:
(WTR::AccessibilityTextMarker::create):
* WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.h:
* WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp:
(WTR::AccessibilityTextMarkerRange::create):
* WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.h:
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::create):
(WTR::AccessibilityUIElement::linkedElement):
(WTR::AccessibilityUIElement::headerElementAtIndex):
(WTR::AccessibilityUIElement::fieldsetAncestorElement):
(WTR::AccessibilityUIElement::characterAtOffset):
(WTR::AccessibilityUIElement::wordAtOffset):
(WTR::AccessibilityUIElement::lineAtOffset):
(WTR::AccessibilityUIElement::sentenceAtOffset):
(WTR::AccessibilityUIElement::selectedTextMarkerRange):
(WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::AccessibilityUIElement): Deleted.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Deleted.
(WTR::AccessibilityUIElement::isEqual): Deleted.
(WTR::AccessibilityUIElement::elementAtPoint): Deleted.
(WTR::AccessibilityUIElement::childAtIndex): Deleted.
(WTR::AccessibilityUIElement::indexOfChild): Deleted.
(WTR::AccessibilityUIElement::childrenCount): Deleted.
(WTR::AccessibilityUIElement::titleUIElement): Deleted.
(WTR::AccessibilityUIElement::parentElement): Deleted.
(WTR::AccessibilityUIElement::takeFocus): Deleted.
(WTR::AccessibilityUIElement::takeSelection): Deleted.
(WTR::AccessibilityUIElement::addSelection): Deleted.
(WTR::AccessibilityUIElement::removeSelection): Deleted.
(WTR::AccessibilityUIElement::allAttributes): Deleted.
(WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Deleted.
(WTR::AccessibilityUIElement::linkedUIElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::attributesOfDocumentLinks): Deleted.
(WTR::AccessibilityUIElement::attributesOfChildren): Deleted.
(WTR::AccessibilityUIElement::parameterizedAttributeNames): Deleted.
(WTR::AccessibilityUIElement::increment): Deleted.
(WTR::AccessibilityUIElement::decrement): Deleted.
(WTR::AccessibilityUIElement::showMenu): Deleted.
(WTR::AccessibilityUIElement::press): Deleted.
(WTR::AccessibilityUIElement::stringAttributeValue): Deleted.
(WTR::AccessibilityUIElement::uiElementArrayAttributeValue): Deleted.
(WTR::AccessibilityUIElement::uiElementAttributeValue): Deleted.
(WTR::AccessibilityUIElement::numberAttributeValue): Deleted.
(WTR::AccessibilityUIElement::boolAttributeValue): Deleted.
(WTR::AccessibilityUIElement::isAttributeSupported): Deleted.
(WTR::AccessibilityUIElement::isAttributeSettable): Deleted.
(WTR::AccessibilityUIElement::isPressActionSupported): Deleted.
(WTR::AccessibilityUIElement::isIncrementActionSupported): Deleted.
(WTR::AccessibilityUIElement::isDecrementActionSupported): Deleted.
(WTR::AccessibilityUIElement::role): Deleted.
(WTR::AccessibilityUIElement::subrole): Deleted.
(WTR::AccessibilityUIElement::roleDescription): Deleted.
(WTR::AccessibilityUIElement::computedRoleString): Deleted.
(WTR::AccessibilityUIElement::title): Deleted.
(WTR::AccessibilityUIElement::description): Deleted.
(WTR::AccessibilityUIElement::language): Deleted.
(WTR::AccessibilityUIElement::stringValue): Deleted.
(WTR::AccessibilityUIElement::accessibilityValue): Deleted.
(WTR::AccessibilityUIElement::helpText): Deleted.
(WTR::AccessibilityUIElement::orientation): Deleted.
(WTR::AccessibilityUIElement::x): Deleted.
(WTR::AccessibilityUIElement::y): Deleted.
(WTR::AccessibilityUIElement::width): Deleted.
(WTR::AccessibilityUIElement::height): Deleted.
(WTR::AccessibilityUIElement::intValue): Deleted.
(WTR::AccessibilityUIElement::minValue): Deleted.
(WTR::AccessibilityUIElement::maxValue): Deleted.
(WTR::AccessibilityUIElement::valueDescription): Deleted.
(WTR::AccessibilityUIElement::insertionPointLineNumber): Deleted.
(WTR::AccessibilityUIElement::selectedTextRange): Deleted.
(WTR::AccessibilityUIElement::isEnabled): Deleted.
(WTR::AccessibilityUIElement::isRequired): Deleted.
(WTR::AccessibilityUIElement::isFocused): Deleted.
(WTR::AccessibilityUIElement::isFocusable): Deleted.
(WTR::AccessibilityUIElement::isSelected): Deleted.
(WTR::AccessibilityUIElement::isSelectedOptionActive): Deleted.
(WTR::AccessibilityUIElement::isSelectable): Deleted.
(WTR::AccessibilityUIElement::isMultiSelectable): Deleted.
(WTR::AccessibilityUIElement::setSelectedChild): Deleted.
(WTR::AccessibilityUIElement::setSelectedChildAtIndex): Deleted.
(WTR::AccessibilityUIElement::removeSelectionAtIndex): Deleted.
(WTR::AccessibilityUIElement::selectedChildrenCount): Deleted.
(WTR::AccessibilityUIElement::selectedChildAtIndex): Deleted.
(WTR::AccessibilityUIElement::isExpanded): Deleted.
(WTR::AccessibilityUIElement::isChecked): Deleted.
(WTR::AccessibilityUIElement::isIndeterminate): Deleted.
(WTR::AccessibilityUIElement::isVisible): Deleted.
(WTR::AccessibilityUIElement::isOffScreen): Deleted.
(WTR::AccessibilityUIElement::isCollapsed): Deleted.
(WTR::AccessibilityUIElement::isIgnored): Deleted.
(WTR::AccessibilityUIElement::hasPopup): Deleted.
(WTR::AccessibilityUIElement::hierarchicalLevel): Deleted.
(WTR::AccessibilityUIElement::clickPointX): Deleted.
(WTR::AccessibilityUIElement::clickPointY): Deleted.
(WTR::AccessibilityUIElement::documentEncoding): Deleted.
(WTR::AccessibilityUIElement::documentURI): Deleted.
(WTR::AccessibilityUIElement::url): Deleted.
(WTR::AccessibilityUIElement::speak): Deleted.
(WTR::AccessibilityUIElement::attributesOfColumnHeaders): Deleted.
(WTR::AccessibilityUIElement::attributesOfRowHeaders): Deleted.
(WTR::AccessibilityUIElement::attributesOfColumns): Deleted.
(WTR::AccessibilityUIElement::attributesOfRows): Deleted.
(WTR::AccessibilityUIElement::attributesOfVisibleCells): Deleted.
(WTR::AccessibilityUIElement::attributesOfHeader): Deleted.
(WTR::AccessibilityUIElement::indexInTable): Deleted.
(WTR::AccessibilityUIElement::rowIndexRange): Deleted.
(WTR::AccessibilityUIElement::columnIndexRange): Deleted.
(WTR::AccessibilityUIElement::rowCount): Deleted.
(WTR::AccessibilityUIElement::columnCount): Deleted.
(WTR::AccessibilityUIElement::rowHeaders): Deleted.
(WTR::AccessibilityUIElement::columnHeaders): Deleted.
(WTR::AccessibilityUIElement::selectedRowAtIndex): Deleted.
(WTR::AccessibilityUIElement::disclosedByRow): Deleted.
(WTR::AccessibilityUIElement::disclosedRowAtIndex): Deleted.
(WTR::AccessibilityUIElement::rowAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaOwnsElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaFlowToElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaControlsElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaIsGrabbed): Deleted.
(WTR::AccessibilityUIElement::ariaDropEffects): Deleted.
(WTR::AccessibilityUIElement::classList): Deleted.
(WTR::AccessibilityUIElement::lineForIndex): Deleted.
(WTR::AccessibilityUIElement::rangeForLine): Deleted.
(WTR::AccessibilityUIElement::rangeForPosition): Deleted.
(WTR::AccessibilityUIElement::boundsForRange): Deleted.
(WTR::AccessibilityUIElement::setSelectedTextRange): Deleted.
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
(WTR::AccessibilityUIElement::stringForRange): Deleted.
(WTR::AccessibilityUIElement::attributedStringForRange): Deleted.
(WTR::AccessibilityUIElement::attributedStringRangeIsMisspelled): Deleted.
(WTR::AccessibilityUIElement::uiElementCountForSearchPredicate): Deleted.
(WTR::AccessibilityUIElement::uiElementForSearchPredicate): Deleted.
(WTR::AccessibilityUIElement::selectTextWithCriteria): Deleted.
(WTR::AccessibilityUIElement::cellForColumnAndRow): Deleted.
(WTR::AccessibilityUIElement::horizontalScrollbar): Deleted.
(WTR::AccessibilityUIElement::verticalScrollbar): Deleted.
(WTR::AccessibilityUIElement::addNotificationListener): Deleted.
(WTR::AccessibilityUIElement::removeNotificationListener): Deleted.
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Deleted.
(WTR::AccessibilityUIElement::textMarkerRangeForElement): Deleted.
(WTR::AccessibilityUIElement::textMarkerRangeLength): Deleted.
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Deleted.
(WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::accessibilityElementForTextMarker): Deleted.
(WTR::AccessibilityUIElement::endTextMarkerForBounds): Deleted.
(WTR::AccessibilityUIElement::startTextMarkerForBounds): Deleted.
(WTR::AccessibilityUIElement::textMarkerForPoint): Deleted.
(WTR::AccessibilityUIElement::previousTextMarker): Deleted.
(WTR::AccessibilityUIElement::nextTextMarker): Deleted.
(WTR::AccessibilityUIElement::startTextMarker): Deleted.
(WTR::AccessibilityUIElement::endTextMarker): Deleted.
(WTR::AccessibilityUIElement::stringForTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute): Deleted.
(WTR::AccessibilityUIElement::indexForTextMarker): Deleted.
(WTR::AccessibilityUIElement::isTextMarkerValid): Deleted.
(WTR::AccessibilityUIElement::textMarkerForIndex): Deleted.
(WTR::AccessibilityUIElement::scrollToMakeVisible): Deleted.
(WTR::AccessibilityUIElement::scrollToGlobalPoint): Deleted.
(WTR::AccessibilityUIElement::scrollToMakeVisibleWithSubFocus): Deleted.
(WTR::AccessibilityUIElement::supportedActions): Deleted.
(WTR::AccessibilityUIElement::mathPostscriptsDescription): Deleted.
(WTR::AccessibilityUIElement::mathPrescriptsDescription): Deleted.
(WTR::AccessibilityUIElement::pathDescription): Deleted.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::create):
* WebKitTestRunner/InjectedBundle/EventSendingController.h:
* WebKitTestRunner/InjectedBundle/GCController.cpp:
(WTR::GCController::create):
* WebKitTestRunner/InjectedBundle/GCController.h:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::create):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/InjectedBundle/TextInputController.cpp:
(WTR::TextInputController::create):
* WebKitTestRunner/InjectedBundle/TextInputController.h:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
(WTR::AccessibilityController::accessibleElementById):
(WTR::AccessibilityController::rootElement):
(WTR::AccessibilityController::focusedElement):
(WTR::AccessibilityController::logAccessibilityEvents): Deleted.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.h:
(WTR::AccessibilityNotificationHandler::create):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::elementAtPoint):
(WTR::AccessibilityUIElement::childAtIndex):
(WTR::accessibilityElementAtIndex):
(WTR::AccessibilityUIElement::linkedUIElementAtIndex):
(WTR::AccessibilityUIElement::ariaOwnsElementAtIndex):
(WTR::AccessibilityUIElement::ariaFlowToElementAtIndex):
(WTR::AccessibilityUIElement::ariaControlsElementAtIndex):
(WTR::AccessibilityUIElement::disclosedRowAtIndex):
(WTR::AccessibilityUIElement::rowAtIndex):
(WTR::AccessibilityUIElement::selectedChildAtIndex):
(WTR::AccessibilityUIElement::selectedRowAtIndex):
(WTR::AccessibilityUIElement::titleUIElement):
(WTR::AccessibilityUIElement::parentElement):
(WTR::AccessibilityUIElement::disclosedByRow):
(WTR::AccessibilityUIElement::uiElementAttributeValue):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
(WTR::AccessibilityUIElement::cellForColumnAndRow):
(WTR::AccessibilityUIElement::horizontalScrollbar):
(WTR::AccessibilityUIElement::verticalScrollbar):
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::textMarkerRangeForElement):
(WTR::AccessibilityUIElement::previousTextMarker):
(WTR::AccessibilityUIElement::nextTextMarker):
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers):
(WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange):
(WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange):
(WTR::AccessibilityUIElement::endTextMarkerForBounds):
(WTR::AccessibilityUIElement::startTextMarkerForBounds):
(WTR::AccessibilityUIElement::textMarkerForPoint):
(WTR::AccessibilityUIElement::accessibilityElementForTextMarker):
(WTR::AccessibilityUIElement::textMarkerForIndex):
(WTR::AccessibilityUIElement::startTextMarker):
(WTR::AccessibilityUIElement::endTextMarker):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:
(WTR::AccessibilityController::accessibleElementById):
(WTR::AccessibilityController::logAccessibilityEvents): Deleted.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::headerElementAtIndex):
(WTR::AccessibilityUIElement::linkedElement):
(WTR::AccessibilityUIElement::elementAtPoint):
(WTR::AccessibilityUIElement::childAtIndex):
(WTR::AccessibilityUIElement::linkedUIElementAtIndex):
(WTR::AccessibilityUIElement::ariaOwnsElementAtIndex):
(WTR::AccessibilityUIElement::ariaFlowToElementAtIndex):
(WTR::AccessibilityUIElement::ariaControlsElementAtIndex):
(WTR::AccessibilityUIElement::disclosedRowAtIndex):
(WTR::AccessibilityUIElement::rowAtIndex):
(WTR::AccessibilityUIElement::selectedChildAtIndex):
(WTR::AccessibilityUIElement::selectedRowAtIndex):
(WTR::AccessibilityUIElement::titleUIElement):
(WTR::AccessibilityUIElement::parentElement):
(WTR::AccessibilityUIElement::disclosedByRow):
(WTR::AccessibilityUIElement::uiElementArrayAttributeValue):
(WTR::AccessibilityUIElement::uiElementAttributeValue):
(WTR::AccessibilityUIElement::rangeForLine):
(WTR::AccessibilityUIElement::rangeForPosition):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
(WTR::AccessibilityUIElement::fieldsetAncestorElement):
(WTR::AccessibilityUIElement::cellForColumnAndRow):
(WTR::AccessibilityUIElement::horizontalScrollbar):
(WTR::AccessibilityUIElement::verticalScrollbar):
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::textMarkerRangeForElement):
(WTR::AccessibilityUIElement::previousTextMarker):
(WTR::AccessibilityUIElement::nextTextMarker):
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers):
(WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange):
(WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange):
(WTR::AccessibilityUIElement::endTextMarkerForBounds):
(WTR::AccessibilityUIElement::startTextMarkerForBounds):
(WTR::AccessibilityUIElement::textMarkerForPoint):
(WTR::AccessibilityUIElement::accessibilityElementForTextMarker):
(WTR::AccessibilityUIElement::textMarkerForIndex):
(WTR::AccessibilityUIElement::startTextMarker):
(WTR::AccessibilityUIElement::endTextMarker):
(WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::mathPostscriptsDescription):
(WTR::AccessibilityUIElement::mathPrescriptsDescription):
(WTR::AccessibilityUIElement::supportedActions):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
(WTR::AccessibilityController::accessibleElementById):
(WTR::AccessibilityController::logAccessibilityEvents): Deleted.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:
(makeValueRefForValue):
(-[AccessibilityNotificationHandler _notificationReceived:]):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::elementAtPoint):
(WTR::AccessibilityUIElement::childAtIndex):
(WTR::AccessibilityUIElement::linkedUIElementAtIndex):
(WTR::AccessibilityUIElement::ariaOwnsElementAtIndex):
(WTR::AccessibilityUIElement::ariaFlowToElementAtIndex):
(WTR::AccessibilityUIElement::ariaControlsElementAtIndex):
(WTR::AccessibilityUIElement::disclosedRowAtIndex):
(WTR::AccessibilityUIElement::rowAtIndex):
(WTR::AccessibilityUIElement::selectedChildAtIndex):
(WTR::AccessibilityUIElement::selectedRowAtIndex):
(WTR::AccessibilityUIElement::titleUIElement):
(WTR::AccessibilityUIElement::parentElement):
(WTR::AccessibilityUIElement::disclosedByRow):
(WTR::AccessibilityUIElement::uiElementAttributeValue):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
(WTR::AccessibilityUIElement::cellForColumnAndRow):
(WTR::AccessibilityUIElement::horizontalScrollbar):
(WTR::AccessibilityUIElement::verticalScrollbar):
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::textMarkerRangeForElement):
(WTR::AccessibilityUIElement::previousTextMarker):
(WTR::AccessibilityUIElement::nextTextMarker):
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers):
(WTR::AccessibilityUIElement::selectedTextMarkerRange):
(WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange):
(WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange):
(WTR::AccessibilityUIElement::endTextMarkerForBounds):
(WTR::AccessibilityUIElement::startTextMarkerForBounds):
(WTR::AccessibilityUIElement::textMarkerForPoint):
(WTR::AccessibilityUIElement::accessibilityElementForTextMarker):
(WTR::AccessibilityUIElement::textMarkerForIndex):
(WTR::AccessibilityUIElement::startTextMarker):
(WTR::AccessibilityUIElement::endTextMarker):
(WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker):
* WebKitTestRunner/efl/EventSenderProxyEfl.cpp:
(WTR::keyPadName):
(WTR::keyName):

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

4 years agoWeb Inspector: Modify FolderTreeElement to have a Collection as a its represented...
commit-queue@webkit.org [Thu, 3 Nov 2016 18:42:12 +0000 (18:42 +0000)]
Web Inspector: Modify FolderTreeElement to have a Collection as a its represented object
https://bugs.webkit.org/show_bug.cgi?id=164349

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-11-03
Reviewed by Matt Baker.

* UserInterface/Views/FolderTreeElement.js:
(WebInspector.FolderTreeElement):
Now accepts a representedObject parameter, which must be a WebInspector.Collection.

* UserInterface/Views/FolderizedTreeElement.js:
(WebInspector.FolderizedTreeElement.prototype.registerFolderizeSettings):
(WebInspector.FolderizedTreeElement.prototype.updateParentStatus):
(WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject):
(WebInspector.FolderizedTreeElement.prototype._settingsForRepresentedObject):
(WebInspector.FolderizedTreeElement.prototype._shouldGroupIntoFolders):
(WebInspector.FolderizedTreeElement):
Rework the logic for creating WebInspector.FolderTreeElement so that items for the
representedObject parameter may be passed in via registerFolderizeSettings.

* UserInterface/Views/FrameTreeElement.js:
(WebInspector.FrameTreeElement):
(WebInspector.FrameTreeElement.): Deleted.
(WebInspector.FrameTreeElement.makeChildCountCallback): Deleted.
Rework logic for calling registerFolderizeSettings to support the representedObject
parameter.  Also changed calls to WebInspector.Frame to support the
WebInspector.Collection class.

* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
(WebInspector.ResourceSidebarPanel.prototype._scriptsCleared):
Create WebInspector.Collection instances of Script model objects for additional folders
created by the Resources sidebar:
 - Anonymous Scripts
 - Extension Scripts
 - Extra Scripts

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

4 years agoReduce PassRefPtr use in WebKit2
achristensen@apple.com [Thu, 3 Nov 2016 17:47:37 +0000 (17:47 +0000)]
Reduce PassRefPtr use in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=164360

Reviewed by Tim Horton.

* Shared/API/APISecurityOrigin.h:
(API::SecurityOrigin::SecurityOrigin):
* Shared/API/APISerializedScriptValue.h:
(API::SerializedScriptValue::create):
(API::SerializedScriptValue::SerializedScriptValue):
* Shared/API/c/WKSharedAPICast.h:
(WebKit::ProxyingRefPtr::ProxyingRefPtr):
(WebKit::toAPI):
* Shared/APIWebArchive.h:
* Shared/APIWebArchive.mm:
(API::WebArchive::create):
(API::WebArchive::WebArchive):
* UIProcess/API/APIHitTestResult.cpp:
(API::HitTestResult::create):
* UIProcess/API/APIHitTestResult.h:
* UIProcess/API/APIUIClient.h:
(API::UIClient::createNewPage):
* UIProcess/API/C/WKPage.cpp:
(WebKit::RunBeforeUnloadConfirmPanelResultListener::create):
(WebKit::RunBeforeUnloadConfirmPanelResultListener::RunBeforeUnloadConfirmPanelResultListener):
(WebKit::RunJavaScriptAlertResultListener::create):
(WebKit::RunJavaScriptAlertResultListener::RunJavaScriptAlertResultListener):
(WebKit::RunJavaScriptConfirmResultListener::create):
(WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener):
(WebKit::RunJavaScriptPromptResultListener::create):
(WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener):
(WKPageSetPageUIClient):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _takeViewSnapshot]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
* UIProcess/ios/WKGeolocationProviderIOS.mm:
(-[WKWebAllowDenyPolicyListener initWithPermissionRequestProxy:]):
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _webHitTestResult]):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(contextMenuItems):
(WKBundlePageCopyContextMenuItems):
(WKBundlePageCopyContextMenuAtPointInWindow):
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserMessageHandlerDescriptorProxy::create):
* WebProcess/WebPage/WebUndoStep.cpp:
(WebKit::WebUndoStep::create):
* WebProcess/WebPage/WebUndoStep.h:
(WebKit::WebUndoStep::WebUndoStep):

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

4 years agoRemove PageThrottler & all related code
barraclough@apple.com [Thu, 3 Nov 2016 16:34:33 +0000 (16:34 +0000)]
Remove PageThrottler & all related code
https://bugs.webkit.org/show_bug.cgi?id=164302

Reviewed by Ryosuke Niwa.

All relevant information now available from the ActivityState.

Source/WebCore:

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted):
(WebCore::HTMLMediaElement::updateVolume):
(WebCore::HTMLMediaElement::updatePlayState):
(WebCore::HTMLMediaElement::updateAudioAssertionState): Deleted.
* html/HTMLMediaElement.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::completed):
(WebCore::FrameLoader::started):
* loader/FrameLoader.h:
* page/ChromeClient.h:
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore::Page::pageActivityStateChanged): Deleted.
(WebCore::Page::pageThrottler): Deleted.
* page/PageThrottler.cpp: Removed.
* page/PageThrottler.h: Removed.

Source/WebKit2:

* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::PluginProcess):
(WebKit::PluginProcess::createWebProcessConnection):
(WebKit::PluginProcess::audioHardwareDidBecomeActive): Deleted.
(WebKit::PluginProcess::audioHardwareDidBecomeInactive): Deleted.
* PluginProcess/PluginProcess.h:
(): Deleted.
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::audioHardwareDidBecomeActive): Deleted.
(WebKit::WebProcessConnection::audioHardwareDidBecomeInactive): Deleted.
* PluginProcess/WebProcessConnection.h:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::evaluate):
* WebProcess/Plugins/Plugin.h:
(WebKit::Plugin::audioHardwareActivity): Deleted.
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::PluginProcessConnection):
(WebKit::PluginProcessConnection::didReceiveMessage):
(WebKit::PluginProcessConnection::audioHardwareDidBecomeActive): Deleted.
(WebKit::PluginProcessConnection::audioHardwareDidBecomeInactive): Deleted.
* WebProcess/Plugins/PluginProcessConnection.h:
(WebKit::PluginProcessConnection::supportsAsynchronousPluginInitialization):
(WebKit::PluginProcessConnection::audioHardwareActivity): Deleted.
* WebProcess/Plugins/PluginProcessConnection.messages.in:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::audioHardwareActivity): Deleted.
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::audioHardwareActivity): Deleted.
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/WebPage.cpp:

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

4 years agoREGRESSION (r206247): Painting milestones can be delayed until the next layer flush
mitz@apple.com [Thu, 3 Nov 2016 16:19:48 +0000 (16:19 +0000)]
REGRESSION (r206247): Painting milestones can be delayed until the next layer flush
https://bugs.webkit.org/show_bug.cgi?id=164340
<rdar://problem/29074344>

Reviewed by Tim Horton.

Source/WebCore:

To give WebKit a chance to deliver the painting milestones to its client after the commit,
we must tell it about them before or during the commit. To that end, we should not defer
the call to firePaintRelatedMilestonesIfNeeded until after the commit.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor): Removed
  m_paintRelatedMilestonesTimer initializer.
(WebCore::RenderLayerCompositor::didPaintBacking): Call
  FrameView::firePaintRelatedMilestonesIfNeeded directly from here.
(WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired): Deleted.
* rendering/RenderLayerCompositor.h:

Source/WebKit2:

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Declared new helper function.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::sendPendingNewlyReachedLayoutMilestones): Helper
  function that sends the message to the UI process and resets
  m_pendingNewlyReachedLayoutMilestones.
(WebKit::TiledCoreAnimationDrawingArea::flushLayers): Wait until after the commit to get the
  pending milestones and send them to the UI process. This way we don’t miss milestones that
  fire during the commit.

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

4 years agoimported/mozilla/svg/paint-order-01.svg and imported/mozilla/svg/paint-order-02.svg...
antti@apple.com [Thu, 3 Nov 2016 15:51:52 +0000 (15:51 +0000)]
imported/mozilla/svg/paint-order-01.svg and imported/mozilla/svg/paint-order-02.svg are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=164355

Reviewed by Ryosuke Niwa.

Revert one change from https://trac.webkit.org/changeset/207669 to see if it is causing flakiness in
some XML based tests.

* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::end):

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

4 years agoAsking for a value profile prediction should be defensive against not finding a value...
sbarati@apple.com [Thu, 3 Nov 2016 14:39:47 +0000 (14:39 +0000)]
Asking for a value profile prediction should be defensive against not finding a value profile
https://bugs.webkit.org/show_bug.cgi?id=164306

Reviewed by Mark Lam.

JSTests:

* stress/inlined-tail-call-in-inlined-setter-should-not-crash-when-getting-value-profile.js: Added.
(let.o.set foo):
(bar):

Source/JavaScriptCore:

Currently, the code that calls CodeBlock::valueProfilePredictionForBytecodeOffset
in the DFG assumes it will always be at a value producing node. However, this isn't
true if we tail call from an inlined setter. When we're at a tail call, we try
to find the first caller that isn't a tail call to see what value the
tail_call produces. If we inline a setter, however, we will end up finding
the put_by_id as our first non-tail-called "caller", and that won't have a
value profile associated with it since it's not a value producing node.
CodeBlock::valueProfilePredictionForBytecodeOffset should be defensive
against finding a null value profile.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::valueProfilePredictionForBytecodeOffset):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):

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

4 years agoUnreviewed, fix CLoop build after r208320.
utatane.tea@gmail.com [Thu, 3 Nov 2016 04:21:30 +0000 (04:21 +0000)]
Unreviewed, fix CLoop build after r208320.
https://bugs.webkit.org/show_bug.cgi?id=162980

Source/JavaScriptCore:

Add required forward declarations.

* domjit/DOMJITHeapRange.cpp:
* domjit/DOMJITSignature.h:
* runtime/VM.h:

Source/WebCore:

Guard with ENABLE(JIT).

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:

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

4 years agoExpand upon IndexedDB status in features.json.
beidson@apple.com [Thu, 3 Nov 2016 04:06:33 +0000 (04:06 +0000)]
Expand upon IndexedDB status in features.json.

* features.json:

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

4 years agoCSS.supports("font-variation-settings", "'wght' 500") erroneously returns false
mmaxfield@apple.com [Thu, 3 Nov 2016 03:25:28 +0000 (03:25 +0000)]
CSS.supports("font-variation-settings", "'wght' 500") erroneously returns false
https://bugs.webkit.org/show_bug.cgi?id=164244

Reviewed by Michael Catanzaro.

Source/WebCore:

Because we weren't passing a Document into CSSParserContext's constructor,
there was no way for our parser to know whether the runtime switch was on
or not. Instead, we can use the CallWith attribute in the IDL file to pass
in a Document.

Test: fast/text/variations/css-supports-runtime-switch.html

* css/DOMCSSNamespace.cpp:
(WebCore::DOMCSSNamespace::supports):
* css/DOMCSSNamespace.h:
* css/DOMCSSNamespace.idl:

LayoutTests:

* fast/text/variations/css-supports-runtime-switch-expected.txt: Added.
* fast/text/variations/css-supports-runtime-switch.html: Added.

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

4 years ago[DOMJIT] Add DOMJIT::Signature
utatane.tea@gmail.com [Thu, 3 Nov 2016 03:20:53 +0000 (03:20 +0000)]
[DOMJIT] Add DOMJIT::Signature
https://bugs.webkit.org/show_bug.cgi?id=162980

Reviewed by Saam Barati and Sam Weinig.

Source/JavaScriptCore:

This patch introduces a new mechanism called DOMJIT::Signature. We can annotate the function with DOMJIT::Signature.
DOMJIT::Signature has type information of that function. And it also maintains the effect of the function and the
pointer to the unsafe function. The unsafe function means the function without type and argument count checks.
By using these information, we can separate type and argument count checks from the function. And we can emit
these things as DFG checks and convert the function call itself to CallDOM node. CallDOM node can call the unsafe
function directly without any checks. Furthermore, this CallDOM node can represent its own clobberizing rules based
on DOMJIT::Effect maintained by DOMJIT::Signature. It allows us to make opaque Call node to a CallDOM node that
merely reads some part of heap. These changes (1) can drop duplicate type checks in DFG, (2) offer ability to move
CallDOM node to somewhere, and (3) track more detailed heap reads and writes of CallDOM nodes.

We first emit Call node with DOMJIT::Signature in DFGByteCodeParser. And in the fixup phase, we attempt to lower
Call node to CallDOM node with checks & edge filters. This is because we do not know the type predictions in
DFGByteCodeParser phase. If we always emit CallDOM node in DFGByteCodeParser, if we evaluate `div.getAttribute(true)`
thingy, the Uncountable OSR exits repeatedly happen because AI figures out the abstract value is cleared.

Currently, DOMJIT signature only allows the types that can reside in GPR. This is because the types of the unsafe
function arguments are represented as the sequence of void*. In the future, we will extend to accept other types like
float, double etc.

We annotate several functions in Element. In particular, we annotate Element::getAttribute. This allows us to perform
LICM in Dromaeo dom-attr test. In the Dromaeo dom-attr getAttribute test, we can see 32x improvement. (134974.8 v.s. 4203.4)

* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CallVariant.h:
(JSC::CallVariant::functionExecutable):
(JSC::CallVariant::nativeExecutable):
(JSC::CallVariant::signatureFor):
* bytecode/SpeculatedType.h:
(JSC::isNotStringSpeculation):
(JSC::isNotInt32Speculation):
(JSC::isNotBooleanSpeculation):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addCall):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::attemptToInlineCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::handleDOMJITCall):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::attemptToMakeCallDOM):
(JSC::DFG::FixupPhase::fixupCheckDOM):
(JSC::DFG::FixupPhase::fixupCallDOM):
* dfg/DFGNode.cpp:
(JSC::DFG::Node::convertToCallDOM):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::shouldSpeculateNotInt32):
(JSC::DFG::Node::shouldSpeculateNotBoolean):
(JSC::DFG::Node::shouldSpeculateNotString):
(JSC::DFG::Node::hasSignature):
(JSC::DFG::Node::signature):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCallDOM):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* domjit/DOMJITEffect.h:
(JSC::DOMJIT::Effect::Effect):
(JSC::DOMJIT::Effect::forWrite):
(JSC::DOMJIT::Effect::forRead):
(JSC::DOMJIT::Effect::forReadWrite):
(JSC::DOMJIT::Effect::forPure):
(JSC::DOMJIT::Effect::forDef):
(JSC::DOMJIT::Effect::mustGenerate):
In clang, we cannot make this Effect constructor constexpr if we use Optional<HeapRange>.
So we use HeapRange::top() for Nullopt def now.

* domjit/DOMJITHeapRange.h:
(JSC::DOMJIT::HeapRange::fromRaw):
(JSC::DOMJIT::HeapRange::operator bool):
(JSC::DOMJIT::HeapRange::operator==):
(JSC::DOMJIT::HeapRange::operator!=):
(JSC::DOMJIT::HeapRange::fromConstant):
* domjit/DOMJITSignature.h: Copied from Source/JavaScriptCore/domjit/DOMJITEffect.h.
(JSC::DOMJIT::Signature::Signature):
(JSC::DOMJIT::Signature::argumentCount):
(JSC::DOMJIT::Signature::checkDOM):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileCallDOM):
* jit/JITOperations.h:
* jit/JITThunks.cpp:
(JSC::JITThunks::hostFunctionStub):
* jit/JITThunks.h:
* runtime/JSBoundFunction.cpp:
(JSC::JSBoundFunction::create):
* runtime/JSCell.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::create):
* runtime/JSFunction.h:
* runtime/JSNativeStdFunction.cpp:
(JSC::JSNativeStdFunction::create):
* runtime/JSObject.cpp:
(JSC::JSObject::putDirectNativeFunction):
* runtime/JSObject.h:
* runtime/Lookup.h:
(JSC::HashTableValue::functionLength):
(JSC::HashTableValue::signature):
(JSC::reifyStaticProperty):
* runtime/NativeExecutable.cpp:
(JSC::NativeExecutable::create):
(JSC::NativeExecutable::NativeExecutable):
* runtime/NativeExecutable.h:
* runtime/PropertySlot.h:
* runtime/VM.cpp:
(JSC::VM::getHostFunction):
* runtime/VM.h:

Source/WebCore:

We introduce DOMJIT::Signature. This signature object is automatically generated by IDL code generator.
It holds (1) types, (2) pointer to the unsafe function (the function without checks), and (3) the effect
of the function. We use constexpr to initialize DOMJIT::Signature without invoking global constructors.
Thus the content is embedded into the binary as the constant values.

We also clean up the IDL code generator related to DOMJIT part. Instead of switching things inside IDL
code generator, we use C++ template to dispatch things at compile time. This template meta programming
is highly utilized in IDL these days.

To make DOMJIT::Signature constexpr, we also need to define DOMJIT abstract heap things in the build time.
To do so, we introduce a tiny Ruby script to calculate the range of abstract heaps. We can offer the abstract
heap tree as YAML format and the script will produce a C++ header holding the calculated abstract heap ranges

* CMakeLists.txt:
* DerivedSources.make:
* ForwardingHeaders/bytecode/SpeculatedType.h: Renamed from Source/WebCore/domjit/DOMJITAbstractHeapRepository.h.
* ForwardingHeaders/domjit/DOMJITSignature.h: Renamed from Source/WebCore/domjit/DOMJITAbstractHeapRepository.cpp.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMGlobalObject.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GeneratePropertiesHashTable):
(GetUnsafeArgumentType):
(GetArgumentTypeFilter):
(GetResultTypeFilter):
(GenerateImplementation):
(UnsafeToNative):
(GenerateHashTableValueArray):
(ComputeFunctionSpecial):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
(WebCore::BindingCaller<JSTestDOMJIT>::castForOperation):
(WebCore::TestDOMJITAnyAttrDOMJIT::TestDOMJITAnyAttrDOMJIT):
(WebCore::TestDOMJITBooleanAttrDOMJIT::TestDOMJITBooleanAttrDOMJIT):
(WebCore::TestDOMJITByteAttrDOMJIT::TestDOMJITByteAttrDOMJIT):
(WebCore::TestDOMJITOctetAttrDOMJIT::TestDOMJITOctetAttrDOMJIT):
(WebCore::TestDOMJITShortAttrDOMJIT::TestDOMJITShortAttrDOMJIT):
(WebCore::TestDOMJITUnsignedShortAttrDOMJIT::TestDOMJITUnsignedShortAttrDOMJIT):
(WebCore::TestDOMJITLongAttrDOMJIT::TestDOMJITLongAttrDOMJIT):
(WebCore::TestDOMJITUnsignedLongAttrDOMJIT::TestDOMJITUnsignedLongAttrDOMJIT):
(WebCore::TestDOMJITLongLongAttrDOMJIT::TestDOMJITLongLongAttrDOMJIT):
(WebCore::TestDOMJITUnsignedLongLongAttrDOMJIT::TestDOMJITUnsignedLongLongAttrDOMJIT):
(WebCore::TestDOMJITFloatAttrDOMJIT::TestDOMJITFloatAttrDOMJIT):
(WebCore::TestDOMJITUnrestrictedFloatAttrDOMJIT::TestDOMJITUnrestrictedFloatAttrDOMJIT):
(WebCore::TestDOMJITDoubleAttrDOMJIT::TestDOMJITDoubleAttrDOMJIT):
(WebCore::TestDOMJITUnrestrictedDoubleAttrDOMJIT::TestDOMJITUnrestrictedDoubleAttrDOMJIT):
(WebCore::TestDOMJITDomStringAttrDOMJIT::TestDOMJITDomStringAttrDOMJIT):
(WebCore::TestDOMJITByteStringAttrDOMJIT::TestDOMJITByteStringAttrDOMJIT):
(WebCore::TestDOMJITUsvStringAttrDOMJIT::TestDOMJITUsvStringAttrDOMJIT):
(WebCore::TestDOMJITNodeAttrDOMJIT::TestDOMJITNodeAttrDOMJIT):
(WebCore::TestDOMJITBooleanNullableAttrDOMJIT::TestDOMJITBooleanNullableAttrDOMJIT):
(WebCore::TestDOMJITByteNullableAttrDOMJIT::TestDOMJITByteNullableAttrDOMJIT):
(WebCore::TestDOMJITOctetNullableAttrDOMJIT::TestDOMJITOctetNullableAttrDOMJIT):
(WebCore::TestDOMJITShortNullableAttrDOMJIT::TestDOMJITShortNullableAttrDOMJIT):
(WebCore::TestDOMJITUnsignedShortNullableAttrDOMJIT::TestDOMJITUnsignedShortNullableAttrDOMJIT):
(WebCore::TestDOMJITLongNullableAttrDOMJIT::TestDOMJITLongNullableAttrDOMJIT):
(WebCore::TestDOMJITUnsignedLongNullableAttrDOMJIT::TestDOMJITUnsignedLongNullableAttrDOMJIT):
(WebCore::TestDOMJITLongLongNullableAttrDOMJIT::TestDOMJITLongLongNullableAttrDOMJIT):
(WebCore::TestDOMJITUnsignedLongLongNullableAttrDOMJIT::TestDOMJITUnsignedLongLongNullableAttrDOMJIT):
(WebCore::TestDOMJITFloatNullableAttrDOMJIT::TestDOMJITFloatNullableAttrDOMJIT):
(WebCore::TestDOMJITUnrestrictedFloatNullableAttrDOMJIT::TestDOMJITUnrestrictedFloatNullableAttrDOMJIT):
(WebCore::TestDOMJITDoubleNullableAttrDOMJIT::TestDOMJITDoubleNullableAttrDOMJIT):
(WebCore::TestDOMJITUnrestrictedDoubleNullableAttrDOMJIT::TestDOMJITUnrestrictedDoubleNullableAttrDOMJIT):
(WebCore::TestDOMJITDomStringNullableAttrDOMJIT::TestDOMJITDomStringNullableAttrDOMJIT):
(WebCore::TestDOMJITByteStringNullableAttrDOMJIT::TestDOMJITByteStringNullableAttrDOMJIT):
(WebCore::TestDOMJITUsvStringNullableAttrDOMJIT::TestDOMJITUsvStringNullableAttrDOMJIT):
(WebCore::TestDOMJITNodeNullableAttrDOMJIT::TestDOMJITNodeNullableAttrDOMJIT):
(WebCore::jsTestDOMJITPrototypeFunctionGetAttribute):
(WebCore::jsTestDOMJITPrototypeFunctionGetAttributeCaller):
(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetAttribute):
(WebCore::jsTestDOMJITPrototypeFunctionItem):
(WebCore::jsTestDOMJITPrototypeFunctionItemCaller):
(WebCore::unsafeJsTestDOMJITPrototypeFunctionItem):
(WebCore::jsTestDOMJITPrototypeFunctionHasAttribute):
(WebCore::jsTestDOMJITPrototypeFunctionHasAttributeCaller):
(WebCore::unsafeJsTestDOMJITPrototypeFunctionHasAttribute):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementById):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdCaller):
(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetElementById):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementsByName):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameCaller):
(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetElementsByName):
* bindings/scripts/test/TestDOMJIT.idl:
* dom/Element.idl:
* domjit/DOMJITAbstractHeapRepository.yaml: Added.
* domjit/DOMJITIDLConvert.h: Added.
(WebCore::DOMJIT::DirectConverter<IDLDOMString>::directConvert<StringConversionConfiguration::Normal>):
* domjit/DOMJITIDLType.h: Added.
* domjit/DOMJITIDLTypeFilter.h: Added.
* domjit/JSDocumentDOMJIT.cpp:
(WebCore::DocumentDocumentElementDOMJIT::callDOMGetter):
* domjit/JSNodeDOMJIT.cpp:
(WebCore::NodeFirstChildDOMJIT::callDOMGetter):
(WebCore::NodeLastChildDOMJIT::callDOMGetter):
(WebCore::NodeNextSiblingDOMJIT::callDOMGetter):
(WebCore::NodePreviousSiblingDOMJIT::callDOMGetter):
(WebCore::NodeParentNodeDOMJIT::callDOMGetter):
(WebCore::NodeOwnerDocumentDOMJIT::callDOMGetter):
* domjit/generate-abstract-heap.rb: Added.

LayoutTests:

* js/dom/domjit-accessor-licm.html:
* js/dom/domjit-function-effect-should-overlap-with-call-expected.txt: Added.
* js/dom/domjit-function-effect-should-overlap-with-call.html: Added.
* js/dom/domjit-function-expected.txt: Added.
* js/dom/domjit-function-licm-expected.txt: Added.
* js/dom/domjit-function-licm.html: Copied from LayoutTests/js/dom/domjit-accessor-licm.html.
* js/dom/domjit-function-type-contradiction-expected.txt: Added.
* js/dom/domjit-function-type-contradiction.html: Copied from LayoutTests/js/dom/domjit-accessor-licm.html.
* js/dom/domjit-function-type-failure-expected.txt: Added.
* js/dom/domjit-function-type-failure.html: Copied from LayoutTests/js/dom/domjit-accessor-licm.html.
* js/dom/domjit-function.html: Added.

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

4 years agoFollowup after r208314.
simon.fraser@apple.com [Thu, 3 Nov 2016 02:43:15 +0000 (02:43 +0000)]
Followup after r208314.

The style created for reflections contains transforms and a mask, so needs to get explicit
z-index on it. This doesn't change rendering, since this layer has no children.

Fixes assertions in various reflection tests.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):

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

4 years agoMarking imported/mozilla/svg/paint-order-01.svg and imported/mozilla/svg/paint-order...
ryanhaddad@apple.com [Thu, 3 Nov 2016 01:13:40 +0000 (01:13 +0000)]
Marking imported/mozilla/svg/paint-order-01.svg and imported/mozilla/svg/paint-order-02.svg as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164355

Unreviewed test gardening.

* TestExpectations:

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

4 years agoMarkedSpace should have specialized size classes for popular engine objects.
akling@apple.com [Thu, 3 Nov 2016 00:44:42 +0000 (00:44 +0000)]
MarkedSpace should have specialized size classes for popular engine objects.
<https://webkit.org/b/164345>

Reviewed by Filip Pizlo.

The MarkedSpace size classes were recently reworked to minimize wasted space
at the end of MarkedBlocks.

However, we know that some specific objects will be allocated in very high volume.
Adding specialized size classes for those object sizes achieves greater utilization
since we're basically guaranteed to allocate them all the time.

Inject specialized size classes for these four objects:

    - FunctionCodeBlock
        560 bytes instead of 624
        28 per block instead of 26 (+2)

    - FunctionExecutable
        176 bytes instead of 224
        92 per block instead of 72 (+20)

    - UnlinkedFunctionCodeBlock
        256 bytes instead of 320
        63 per block instead of 50 (+13)

    - UnlinkedFunctionExecutable
        192 bytes instead of 224
        84 per block instead of 72 (+12)

* heap/MarkedSpace.cpp:

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

4 years agoMarking fast/css/attribute-for-content-property-style-update-xhtml.xhtml as flaky.
ryanhaddad@apple.com [Thu, 3 Nov 2016 00:37:19 +0000 (00:37 +0000)]
Marking fast/css/attribute-for-content-property-style-update-xhtml.xhtml as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164162

Unreviewed test gardening.

* TestExpectations:

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

4 years agoMarking svg/wicd/test-rightsizing-a.xhtml and svg/wicd/test-rightsizing-b.xhtml as...
ryanhaddad@apple.com [Thu, 3 Nov 2016 00:33:32 +0000 (00:33 +0000)]
Marking svg/wicd/test-rightsizing-a.xhtml and svg/wicd/test-rightsizing-b.xhtml as flaky on mac.
https://bugs.webkit.org/show_bug.cgi?id=163915

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 years agoREGRESSION (r208025) GraphicsContext state stack assertions loading webkit.org
simon.fraser@apple.com [Thu, 3 Nov 2016 00:19:54 +0000 (00:19 +0000)]
REGRESSION (r208025) GraphicsContext state stack assertions loading webkit.org
https://bugs.webkit.org/show_bug.cgi?id=164350
rdar://problem/29053414

Reviewed by Dean Jackson.

Source/WebCore:

After r208025 it as possible for KeyframeAnimation::animate() to produce a RenderStyle
with a non-1 opacity, but without the explicit z-index that triggers stacking context.
This confused the RenderLayer paintWithTransparency code, triggering mismsatched GraphicsContext
save/restores.

This occurred when the runningOrFillingForwards state was mis-computed. keyframeAnim->animate()
can spit out a new style when in the StartWaitTimer sometimes, so "!keyframeAnim->waitingToStart() && !keyframeAnim->postActive()"
gave the wrong answser.

Rather than depend on the super-confusing animation state, use a bool out param from animate() to say
when it actually produced a new style, and when true, do the setZIndex(0).

Test: animations/stacking-during-opacity-animation.html

* page/animation/AnimationBase.h:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimation::blendProperties): Log after blending so the log shows the blended style.
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::animate):
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::animate):
* page/animation/ImplicitAnimation.h:
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::animate):
* page/animation/KeyframeAnimation.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::restore):
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayer::drawLayerContents): No functional change, but created scope for the
GraphicsContext so that it didn't outlive the CGContextRestoreGState(context).
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::beginTransparencyLayers): New assertion that catches the problem earlier.

LayoutTests:

Test was reduced from webkit.org.

* animations/stacking-during-opacity-animation-expected.txt: Added.
* animations/stacking-during-opacity-animation.html: Added.

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

4 years ago[iOS] [WebGL] Multisample resolve step may operate on stale data
mmaxfield@apple.com [Thu, 3 Nov 2016 00:05:12 +0000 (00:05 +0000)]
[iOS] [WebGL] Multisample resolve step may operate on stale data
https://bugs.webkit.org/show_bug.cgi?id=164347

Reviewed by Dean Jackson.

Source/WebCore:

When antialiasing is enabled, WebKit internally creates a multisampled FBO
and uses that as the target of all the drawing commands. Then, just before
we actually put the image on the glass, we perform a “resolve” step which
averages all the samples to create the final image. However, it appears
that this resolve step only waits for commands to complete which were
already submitted to the hardware. OpenGL is allowed (indeed, expected) to
batch up drawing commands in main memory so it can submit them to the
hardware in fewer batches, but this means that the hardware may not know
about all the commands that the application submitted. Because of this,
the data the resolve step saw is the result of only some of the previous
draw calls - not all of them.

This doesn’t occur on macOS because we have a different code path there
for performing the resolve step. On iOS 9 and below, WebKit didn’t
implement multisampling in WebGL at all, which explains why this only
occurs on iOS 10.

Luckily, the OpenGL command glFlush() is exactly designed to submit any
pending commands to the hardware.

Test: fast/canvas/webgl/multisample-resolve-consistency.html

* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary):

LayoutTests:

Issue many draw calls into a multisampled context, and then use glReadPixels()
to make sure that all the commands completed.

* fast/canvas/webgl/multisample-resolve-consistency-expected.txt: Added.
* fast/canvas/webgl/multisample-resolve-consistency.html: Added.

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

4 years agoOne file per class for UnlinkedCodeBlock.h/.cpp
ggaren@apple.com [Wed, 2 Nov 2016 23:30:16 +0000 (23:30 +0000)]
One file per class for UnlinkedCodeBlock.h/.cpp
https://bugs.webkit.org/show_bug.cgi?id=164348

Reviewed by Saam Barati.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/FunctionCodeBlock.h:
* bytecode/ModuleProgramCodeBlock.h:
* bytecode/ProgramCodeBlock.h:
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedProgramCodeBlock::visitChildren): Deleted.
(JSC::UnlinkedModuleProgramCodeBlock::visitChildren): Deleted.
(JSC::UnlinkedProgramCodeBlock::destroy): Deleted.
(JSC::UnlinkedModuleProgramCodeBlock::destroy): Deleted.
(JSC::UnlinkedEvalCodeBlock::destroy): Deleted.
(JSC::UnlinkedFunctionCodeBlock::destroy): Deleted.
(JSC::UnlinkedFunctionExecutable::destroy): Deleted.
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock): Deleted.
* bytecode/UnlinkedEvalCodeBlock.cpp: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp.
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): Deleted.
(JSC::UnlinkedCodeBlock::visitChildren): Deleted.
(JSC::UnlinkedCodeBlock::estimatedSize): Deleted.
(JSC::UnlinkedCodeBlock::lineNumberForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::getLineAndColumn): Deleted.
(JSC::dumpLineColumnEntry): Deleted.
(JSC::UnlinkedCodeBlock::dumpExpressionRangeInfo): Deleted.
(JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::addExpressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::addTypeProfilerExpressionInfo): Deleted.
(JSC::UnlinkedProgramCodeBlock::visitChildren): Deleted.
(JSC::UnlinkedModuleProgramCodeBlock::visitChildren): Deleted.
(JSC::UnlinkedCodeBlock::~UnlinkedCodeBlock): Deleted.
(JSC::UnlinkedProgramCodeBlock::destroy): Deleted.
(JSC::UnlinkedModuleProgramCodeBlock::destroy): Deleted.
(JSC::UnlinkedFunctionCodeBlock::destroy): Deleted.
(JSC::UnlinkedFunctionExecutable::destroy): Deleted.
(JSC::UnlinkedCodeBlock::setInstructions): Deleted.
(JSC::UnlinkedCodeBlock::instructions): Deleted.
(JSC::UnlinkedCodeBlock::handlerForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::handlerForIndex): Deleted.
(JSC::UnlinkedCodeBlock::applyModification): Deleted.
* bytecode/UnlinkedEvalCodeBlock.h: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h.
(JSC::UnlinkedStringJumpTable::offsetForValue): Deleted.
(JSC::UnlinkedSimpleJumpTable::add): Deleted.
(JSC::UnlinkedInstruction::UnlinkedInstruction): Deleted.
(JSC::UnlinkedCodeBlock::isConstructor): Deleted.
(JSC::UnlinkedCodeBlock::isStrictMode): Deleted.
(JSC::UnlinkedCodeBlock::usesEval): Deleted.
(JSC::UnlinkedCodeBlock::parseMode): Deleted.
(JSC::UnlinkedCodeBlock::isArrowFunction): Deleted.
(JSC::UnlinkedCodeBlock::derivedContextType): Deleted.
(JSC::UnlinkedCodeBlock::evalContextType): Deleted.
(JSC::UnlinkedCodeBlock::isArrowFunctionContext): Deleted.
(JSC::UnlinkedCodeBlock::isClassContext): Deleted.
(JSC::UnlinkedCodeBlock::hasExpressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::expressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::setThisRegister): Deleted.
(JSC::UnlinkedCodeBlock::setScopeRegister): Deleted.
(JSC::UnlinkedCodeBlock::usesGlobalObject): Deleted.
(JSC::UnlinkedCodeBlock::setGlobalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::globalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::setNumParameters): Deleted.
(JSC::UnlinkedCodeBlock::addParameter): Deleted.
(JSC::UnlinkedCodeBlock::numParameters): Deleted.
(JSC::UnlinkedCodeBlock::addRegExp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfRegExps): Deleted.
(JSC::UnlinkedCodeBlock::regexp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfIdentifiers): Deleted.
(JSC::UnlinkedCodeBlock::addIdentifier): Deleted.
(JSC::UnlinkedCodeBlock::identifier): Deleted.
(JSC::UnlinkedCodeBlock::identifiers): Deleted.
(JSC::UnlinkedCodeBlock::addConstant): Deleted.
(JSC::UnlinkedCodeBlock::registerIndexForLinkTimeConstant): Deleted.
(JSC::UnlinkedCodeBlock::constantRegisters): Deleted.
(JSC::UnlinkedCodeBlock::constantRegister): Deleted.
(JSC::UnlinkedCodeBlock::isConstantRegisterIndex): Deleted.
(JSC::UnlinkedCodeBlock::constantsSourceCodeRepresentation): Deleted.
(JSC::UnlinkedCodeBlock::numberOfJumpTargets): Deleted.
(JSC::UnlinkedCodeBlock::addJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::jumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::lastJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::isBuiltinFunction): Deleted.
(JSC::UnlinkedCodeBlock::constructorKind): Deleted.
(JSC::UnlinkedCodeBlock::superBinding): Deleted.
(JSC::UnlinkedCodeBlock::scriptMode): Deleted.
(JSC::UnlinkedCodeBlock::shrinkToFit): Deleted.
(JSC::UnlinkedCodeBlock::numCalleeLocals): Deleted.
(JSC::UnlinkedCodeBlock::numberOfSwitchJumpTables): Deleted.
(JSC::UnlinkedCodeBlock::addSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::switchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::numberOfStringSwitchJumpTables): Deleted.
(JSC::UnlinkedCodeBlock::addStringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::stringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionDecl): Deleted.
(JSC::UnlinkedCodeBlock::functionDecl): Deleted.
(JSC::UnlinkedCodeBlock::numberOfFunctionDecls): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionExpr): Deleted.
(JSC::UnlinkedCodeBlock::functionExpr): Deleted.
(JSC::UnlinkedCodeBlock::numberOfFunctionExprs): Deleted.
(JSC::UnlinkedCodeBlock::numberOfExceptionHandlers): Deleted.
(JSC::UnlinkedCodeBlock::addExceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::exceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::addArrayProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfArrayProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addArrayAllocationProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfArrayAllocationProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addObjectAllocationProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfObjectAllocationProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addValueProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfValueProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addLLIntCallLinkInfo): Deleted.
(JSC::UnlinkedCodeBlock::numberOfLLintCallLinkInfos): Deleted.
(JSC::UnlinkedCodeBlock::codeType): Deleted.
(JSC::UnlinkedCodeBlock::thisRegister): Deleted.
(JSC::UnlinkedCodeBlock::scopeRegister): Deleted.
(JSC::UnlinkedCodeBlock::addPropertyAccessInstruction): Deleted.
(JSC::UnlinkedCodeBlock::numberOfPropertyAccessInstructions): Deleted.
(JSC::UnlinkedCodeBlock::propertyAccessInstructions): Deleted.
(JSC::UnlinkedCodeBlock::constantBufferCount): Deleted.
(JSC::UnlinkedCodeBlock::addConstantBuffer): Deleted.
(JSC::UnlinkedCodeBlock::constantBuffer): Deleted.
(JSC::UnlinkedCodeBlock::hasRareData): Deleted.
(JSC::UnlinkedCodeBlock::recordParse): Deleted.
(JSC::UnlinkedCodeBlock::sourceURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::sourceMappingURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::setSourceURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::setSourceMappingURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::codeFeatures): Deleted.
(JSC::UnlinkedCodeBlock::hasCapturedVariables): Deleted.
(JSC::UnlinkedCodeBlock::firstLine): Deleted.
(JSC::UnlinkedCodeBlock::lineCount): Deleted.
(JSC::UnlinkedCodeBlock::startColumn): Deleted.
(JSC::UnlinkedCodeBlock::endColumn): Deleted.
(JSC::UnlinkedCodeBlock::addOpProfileControlFlowBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets): Deleted.
(JSC::UnlinkedCodeBlock::hasOpProfileControlFlowBytecodeOffsets): Deleted.
(JSC::UnlinkedCodeBlock::wasCompiledWithDebuggingOpcodes): Deleted.
(JSC::UnlinkedCodeBlock::didOptimize): Deleted.
(JSC::UnlinkedCodeBlock::setDidOptimize): Deleted.
(JSC::UnlinkedCodeBlock::finishCreation): Deleted.
(JSC::UnlinkedCodeBlock::createRareDataIfNecessary): Deleted.
(JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock): Deleted.
* bytecode/UnlinkedFunctionCodeBlock.cpp: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp.
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): Deleted.
(JSC::UnlinkedCodeBlock::visitChildren): Deleted.
(JSC::UnlinkedCodeBlock::estimatedSize): Deleted.
(JSC::UnlinkedCodeBlock::lineNumberForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::getLineAndColumn): Deleted.
(JSC::dumpLineColumnEntry): Deleted.
(JSC::UnlinkedCodeBlock::dumpExpressionRangeInfo): Deleted.
(JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::addExpressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::addTypeProfilerExpressionInfo): Deleted.
(JSC::UnlinkedProgramCodeBlock::visitChildren): Deleted.
(JSC::UnlinkedModuleProgramCodeBlock::visitChildren): Deleted.
(JSC::UnlinkedCodeBlock::~UnlinkedCodeBlock): Deleted.
(JSC::UnlinkedProgramCodeBlock::destroy): Deleted.
(JSC::UnlinkedModuleProgramCodeBlock::destroy): Deleted.
(JSC::UnlinkedEvalCodeBlock::destroy): Deleted.
(JSC::UnlinkedFunctionExecutable::destroy): Deleted.
(JSC::UnlinkedCodeBlock::setInstructions): Deleted.
(JSC::UnlinkedCodeBlock::instructions): Deleted.
(JSC::UnlinkedCodeBlock::handlerForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::handlerForIndex): Deleted.
(JSC::UnlinkedCodeBlock::applyModification): Deleted.
* bytecode/UnlinkedFunctionCodeBlock.h: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h.
(JSC::UnlinkedStringJumpTable::offsetForValue): Deleted.
(JSC::UnlinkedSimpleJumpTable::add): Deleted.
(JSC::UnlinkedInstruction::UnlinkedInstruction): Deleted.
(JSC::UnlinkedCodeBlock::isConstructor): Deleted.
(JSC::UnlinkedCodeBlock::isStrictMode): Deleted.
(JSC::UnlinkedCodeBlock::usesEval): Deleted.
(JSC::UnlinkedCodeBlock::parseMode): Deleted.
(JSC::UnlinkedCodeBlock::isArrowFunction): Deleted.
(JSC::UnlinkedCodeBlock::derivedContextType): Deleted.
(JSC::UnlinkedCodeBlock::evalContextType): Deleted.
(JSC::UnlinkedCodeBlock::isArrowFunctionContext): Deleted.
(JSC::UnlinkedCodeBlock::isClassContext): Deleted.
(JSC::UnlinkedCodeBlock::hasExpressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::expressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::setThisRegister): Deleted.
(JSC::UnlinkedCodeBlock::setScopeRegister): Deleted.
(JSC::UnlinkedCodeBlock::usesGlobalObject): Deleted.
(JSC::UnlinkedCodeBlock::setGlobalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::globalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::setNumParameters): Deleted.
(JSC::UnlinkedCodeBlock::addParameter): Deleted.
(JSC::UnlinkedCodeBlock::numParameters): Deleted.
(JSC::UnlinkedCodeBlock::addRegExp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfRegExps): Deleted.
(JSC::UnlinkedCodeBlock::regexp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfIdentifiers): Deleted.
(JSC::UnlinkedCodeBlock::addIdentifier): Deleted.
(JSC::UnlinkedCodeBlock::identifier): Deleted.
(JSC::UnlinkedCodeBlock::identifiers): Deleted.
(JSC::UnlinkedCodeBlock::addConstant): Deleted.
(JSC::UnlinkedCodeBlock::registerIndexForLinkTimeConstant): Deleted.
(JSC::UnlinkedCodeBlock::constantRegisters): Deleted.
(JSC::UnlinkedCodeBlock::constantRegister): Deleted.
(JSC::UnlinkedCodeBlock::isConstantRegisterIndex): Deleted.
(JSC::UnlinkedCodeBlock::constantsSourceCodeRepresentation): Deleted.
(JSC::UnlinkedCodeBlock::numberOfJumpTargets): Deleted.
(JSC::UnlinkedCodeBlock::addJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::jumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::lastJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::isBuiltinFunction): Deleted.
(JSC::UnlinkedCodeBlock::constructorKind): Deleted.
(JSC::UnlinkedCodeBlock::superBinding): Deleted.
(JSC::UnlinkedCodeBlock::scriptMode): Deleted.
(JSC::UnlinkedCodeBlock::shrinkToFit): Deleted.
(JSC::UnlinkedCodeBlock::numCalleeLocals): Deleted.
(JSC::UnlinkedCodeBlock::numberOfSwitchJumpTables): Deleted.
(JSC::UnlinkedCodeBlock::addSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::switchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::numberOfStringSwitchJumpTables): Deleted.
(JSC::UnlinkedCodeBlock::addStringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::stringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionDecl): Deleted.
(JSC::UnlinkedCodeBlock::functionDecl): Deleted.
(JSC::UnlinkedCodeBlock::numberOfFunctionDecls): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionExpr): Deleted.
(JSC::UnlinkedCodeBlock::functionExpr): Deleted.
(JSC::UnlinkedCodeBlock::numberOfFunctionExprs): Deleted.
(JSC::UnlinkedCodeBlock::numberOfExceptionHandlers): Deleted.
(JSC::UnlinkedCodeBlock::addExceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::exceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::addArrayProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfArrayProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addArrayAllocationProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfArrayAllocationProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addObjectAllocationProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfObjectAllocationProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addValueProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfValueProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addLLIntCallLinkInfo): Deleted.
(JSC::UnlinkedCodeBlock::numberOfLLintCallLinkInfos): Deleted.
(JSC::UnlinkedCodeBlock::codeType): Deleted.
(JSC::UnlinkedCodeBlock::thisRegister): Deleted.
(JSC::UnlinkedCodeBlock::scopeRegister): Deleted.
(JSC::UnlinkedCodeBlock::addPropertyAccessInstruction): Deleted.
(JSC::UnlinkedCodeBlock::numberOfPropertyAccessInstructions): Deleted.
(JSC::UnlinkedCodeBlock::propertyAccessInstructions): Deleted.
(JSC::UnlinkedCodeBlock::constantBufferCount): Deleted.
(JSC::UnlinkedCodeBlock::addConstantBuffer): Deleted.
(JSC::UnlinkedCodeBlock::constantBuffer): Deleted.
(JSC::UnlinkedCodeBlock::hasRareData): Deleted.
(JSC::UnlinkedCodeBlock::recordParse): Deleted.
(JSC::UnlinkedCodeBlock::sourceURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::sourceMappingURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::setSourceURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::setSourceMappingURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::codeFeatures): Deleted.
(JSC::UnlinkedCodeBlock::hasCapturedVariables): Deleted.
(JSC::UnlinkedCodeBlock::firstLine): Deleted.
(JSC::UnlinkedCodeBlock::lineCount): Deleted.
(JSC::UnlinkedCodeBlock::startColumn): Deleted.
(JSC::UnlinkedCodeBlock::endColumn): Deleted.
(JSC::UnlinkedCodeBlock::addOpProfileControlFlowBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets): Deleted.
(JSC::UnlinkedCodeBlock::hasOpProfileControlFlowBytecodeOffsets): Deleted.
(JSC::UnlinkedCodeBlock::wasCompiledWithDebuggingOpcodes): Deleted.
(JSC::UnlinkedCodeBlock::didOptimize): Deleted.
(JSC::UnlinkedCodeBlock::setDidOptimize): Deleted.
(JSC::UnlinkedCodeBlock::finishCreation): Deleted.
(JSC::UnlinkedCodeBlock::createRareDataIfNecessary): Deleted.
(JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock): Deleted.
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::destroy):
* bytecode/UnlinkedGlobalCodeBlock.h: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h.
(JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock):
(JSC::UnlinkedStringJumpTable::offsetForValue): Deleted.
(JSC::UnlinkedSimpleJumpTable::add): Deleted.
(JSC::UnlinkedInstruction::UnlinkedInstruction): Deleted.
(): Deleted.
(JSC::UnlinkedCodeBlock::isConstructor): Deleted.
(JSC::UnlinkedCodeBlock::isStrictMode): Deleted.
(JSC::UnlinkedCodeBlock::usesEval): Deleted.
(JSC::UnlinkedCodeBlock::parseMode): Deleted.
(JSC::UnlinkedCodeBlock::isArrowFunction): Deleted.
(JSC::UnlinkedCodeBlock::derivedContextType): Deleted.
(JSC::UnlinkedCodeBlock::evalContextType): Deleted.
(JSC::UnlinkedCodeBlock::isArrowFunctionContext): Deleted.
(JSC::UnlinkedCodeBlock::isClassContext): Deleted.
(JSC::UnlinkedCodeBlock::hasExpressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::expressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::setThisRegister): Deleted.
(JSC::UnlinkedCodeBlock::setScopeRegister): Deleted.
(JSC::UnlinkedCodeBlock::usesGlobalObject): Deleted.
(JSC::UnlinkedCodeBlock::setGlobalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::globalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::setNumParameters): Deleted.
(JSC::UnlinkedCodeBlock::addParameter): Deleted.
(JSC::UnlinkedCodeBlock::numParameters): Deleted.
(JSC::UnlinkedCodeBlock::addRegExp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfRegExps): Deleted.
(JSC::UnlinkedCodeBlock::regexp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfIdentifiers): Deleted.
(JSC::UnlinkedCodeBlock::addIdentifier): Deleted.
(JSC::UnlinkedCodeBlock::identifier): Deleted.
(JSC::UnlinkedCodeBlock::identifiers): Deleted.
(JSC::UnlinkedCodeBlock::addConstant): Deleted.
(JSC::UnlinkedCodeBlock::registerIndexForLinkTimeConstant): Deleted.
(JSC::UnlinkedCodeBlock::constantRegisters): Deleted.
(JSC::UnlinkedCodeBlock::constantRegister): Deleted.
(JSC::UnlinkedCodeBlock::isConstantRegisterIndex): Deleted.
(JSC::UnlinkedCodeBlock::constantsSourceCodeRepresentation): Deleted.
(JSC::UnlinkedCodeBlock::numberOfJumpTargets): Deleted.
(JSC::UnlinkedCodeBlock::addJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::jumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::lastJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::isBuiltinFunction): Deleted.
(JSC::UnlinkedCodeBlock::constructorKind): Deleted.
(JSC::UnlinkedCodeBlock::superBinding): Deleted.
(JSC::UnlinkedCodeBlock::scriptMode): Deleted.
(JSC::UnlinkedCodeBlock::shrinkToFit): Deleted.
(JSC::UnlinkedCodeBlock::numCalleeLocals): Deleted.
(JSC::UnlinkedCodeBlock::numberOfSwitchJumpTables): Deleted.
(JSC::UnlinkedCodeBlock::addSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::switchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::numberOfStringSwitchJumpTables): Deleted.
(JSC::UnlinkedCodeBlock::addStringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::stringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionDecl): Deleted.
(JSC::UnlinkedCodeBlock::functionDecl): Deleted.
(JSC::UnlinkedCodeBlock::numberOfFunctionDecls): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionExpr): Deleted.
(JSC::UnlinkedCodeBlock::functionExpr): Deleted.
(JSC::UnlinkedCodeBlock::numberOfFunctionExprs): Deleted.
(JSC::UnlinkedCodeBlock::numberOfExceptionHandlers): Deleted.
(JSC::UnlinkedCodeBlock::addExceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::exceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::addArrayProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfArrayProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addArrayAllocationProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfArrayAllocationProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addObjectAllocationProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfObjectAllocationProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addValueProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfValueProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addLLIntCallLinkInfo): Deleted.
(JSC::UnlinkedCodeBlock::numberOfLLintCallLinkInfos): Deleted.
(JSC::UnlinkedCodeBlock::codeType): Deleted.
(JSC::UnlinkedCodeBlock::thisRegister): Deleted.
(JSC::UnlinkedCodeBlock::scopeRegister): Deleted.
(JSC::UnlinkedCodeBlock::addPropertyAccessInstruction): Deleted.
(JSC::UnlinkedCodeBlock::numberOfPropertyAccessInstructions): Deleted.
(JSC::UnlinkedCodeBlock::propertyAccessInstructions): Deleted.
(JSC::UnlinkedCodeBlock::constantBufferCount): Deleted.
(JSC::UnlinkedCodeBlock::addConstantBuffer): Deleted.
(JSC::UnlinkedCodeBlock::constantBuffer): Deleted.
(JSC::UnlinkedCodeBlock::hasRareData): Deleted.
(JSC::UnlinkedCodeBlock::recordParse): Deleted.
(JSC::UnlinkedCodeBlock::sourceURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::sourceMappingURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::setSourceURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::setSourceMappingURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::codeFeatures): Deleted.
(JSC::UnlinkedCodeBlock::hasCapturedVariables): Deleted.
(JSC::UnlinkedCodeBlock::firstLine): Deleted.
(JSC::UnlinkedCodeBlock::lineCount): Deleted.
(JSC::UnlinkedCodeBlock::startColumn): Deleted.
(JSC::UnlinkedCodeBlock::endColumn): Deleted.
(JSC::UnlinkedCodeBlock::addOpProfileControlFlowBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets): Deleted.
(JSC::UnlinkedCodeBlock::hasOpProfileControlFlowBytecodeOffsets): Deleted.
(JSC::UnlinkedCodeBlock::wasCompiledWithDebuggingOpcodes): Deleted.
(JSC::UnlinkedCodeBlock::didOptimize): Deleted.
(JSC::UnlinkedCodeBlock::setDidOptimize): Deleted.
(JSC::UnlinkedCodeBlock::finishCreation): Deleted.
(JSC::UnlinkedCodeBlock::createRareDataIfNecessary): Deleted.
* bytecode/UnlinkedModuleProgramCodeBlock.cpp: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp.
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): Deleted.
(JSC::UnlinkedCodeBlock::visitChildren): Deleted.
(JSC::UnlinkedCodeBlock::estimatedSize): Deleted.
(JSC::UnlinkedCodeBlock::lineNumberForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::getLineAndColumn): Deleted.
(JSC::dumpLineColumnEntry): Deleted.
(JSC::UnlinkedCodeBlock::dumpExpressionRangeInfo): Deleted.
(JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::addExpressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::addTypeProfilerExpressionInfo): Deleted.
(JSC::UnlinkedProgramCodeBlock::visitChildren): Deleted.
(JSC::UnlinkedCodeBlock::~UnlinkedCodeBlock): Deleted.
(JSC::UnlinkedProgramCodeBlock::destroy): Deleted.
(JSC::UnlinkedEvalCodeBlock::destroy): Deleted.
(JSC::UnlinkedFunctionCodeBlock::destroy): Deleted.
(JSC::UnlinkedFunctionExecutable::destroy): Deleted.
(JSC::UnlinkedCodeBlock::setInstructions): Deleted.
(JSC::UnlinkedCodeBlock::instructions): Deleted.
(JSC::UnlinkedCodeBlock::handlerForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::handlerForIndex): Deleted.
(JSC::UnlinkedCodeBlock::applyModification): Deleted.
* bytecode/UnlinkedModuleProgramCodeBlock.h: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h.
(JSC::UnlinkedStringJumpTable::offsetForValue): Deleted.
(JSC::UnlinkedSimpleJumpTable::add): Deleted.
(JSC::UnlinkedInstruction::UnlinkedInstruction): Deleted.
(JSC::UnlinkedCodeBlock::isConstructor): Deleted.
(JSC::UnlinkedCodeBlock::isStrictMode): Deleted.
(JSC::UnlinkedCodeBlock::usesEval): Deleted.
(JSC::UnlinkedCodeBlock::parseMode): Deleted.
(JSC::UnlinkedCodeBlock::isArrowFunction): Deleted.
(JSC::UnlinkedCodeBlock::derivedContextType): Deleted.
(JSC::UnlinkedCodeBlock::evalContextType): Deleted.
(JSC::UnlinkedCodeBlock::isArrowFunctionContext): Deleted.
(JSC::UnlinkedCodeBlock::isClassContext): Deleted.
(JSC::UnlinkedCodeBlock::hasExpressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::expressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::setThisRegister): Deleted.
(JSC::UnlinkedCodeBlock::setScopeRegister): Deleted.
(JSC::UnlinkedCodeBlock::usesGlobalObject): Deleted.
(JSC::UnlinkedCodeBlock::setGlobalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::globalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::setNumParameters): Deleted.
(JSC::UnlinkedCodeBlock::addParameter): Deleted.
(JSC::UnlinkedCodeBlock::numParameters): Deleted.
(JSC::UnlinkedCodeBlock::addRegExp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfRegExps): Deleted.
(JSC::UnlinkedCodeBlock::regexp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfIdentifiers): Deleted.
(JSC::UnlinkedCodeBlock::addIdentifier): Deleted.
(JSC::UnlinkedCodeBlock::identifier): Deleted.
(JSC::UnlinkedCodeBlock::identifiers): Deleted.
(JSC::UnlinkedCodeBlock::addConstant): Deleted.
(JSC::UnlinkedCodeBlock::registerIndexForLinkTimeConstant): Deleted.
(JSC::UnlinkedCodeBlock::constantRegisters): Deleted.
(JSC::UnlinkedCodeBlock::constantRegister): Deleted.
(JSC::UnlinkedCodeBlock::isConstantRegisterIndex): Deleted.
(JSC::UnlinkedCodeBlock::constantsSourceCodeRepresentation): Deleted.
(JSC::UnlinkedCodeBlock::numberOfJumpTargets): Deleted.
(JSC::UnlinkedCodeBlock::addJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::jumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::lastJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::isBuiltinFunction): Deleted.
(JSC::UnlinkedCodeBlock::constructorKind): Deleted.
(JSC::UnlinkedCodeBlock::superBinding): Deleted.
(JSC::UnlinkedCodeBlock::scriptMode): Deleted.
(JSC::UnlinkedCodeBlock::shrinkToFit): Deleted.
(JSC::UnlinkedCodeBlock::numCalleeLocals): Deleted.
(JSC::UnlinkedCodeBlock::numberOfSwitchJumpTables): Deleted.
(JSC::UnlinkedCodeBlock::addSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::switchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::numberOfStringSwitchJumpTables): Deleted.
(JSC::UnlinkedCodeBlock::addStringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::stringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionDecl): Deleted.
(JSC::UnlinkedCodeBlock::functionDecl): Deleted.
(JSC::UnlinkedCodeBlock::numberOfFunctionDecls): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionExpr): Deleted.
(JSC::UnlinkedCodeBlock::functionExpr): Deleted.
(JSC::UnlinkedCodeBlock::numberOfFunctionExprs): Deleted.
(JSC::UnlinkedCodeBlock::numberOfExceptionHandlers): Deleted.
(JSC::UnlinkedCodeBlock::addExceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::exceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::addArrayProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfArrayProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addArrayAllocationProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfArrayAllocationProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addObjectAllocationProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfObjectAllocationProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addValueProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfValueProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addLLIntCallLinkInfo): Deleted.
(JSC::UnlinkedCodeBlock::numberOfLLintCallLinkInfos): Deleted.
(JSC::UnlinkedCodeBlock::codeType): Deleted.
(JSC::UnlinkedCodeBlock::thisRegister): Deleted.
(JSC::UnlinkedCodeBlock::scopeRegister): Deleted.
(JSC::UnlinkedCodeBlock::addPropertyAccessInstruction): Deleted.
(JSC::UnlinkedCodeBlock::numberOfPropertyAccessInstructions): Deleted.
(JSC::UnlinkedCodeBlock::propertyAccessInstructions): Deleted.
(JSC::UnlinkedCodeBlock::constantBufferCount): Deleted.
(JSC::UnlinkedCodeBlock::addConstantBuffer): Deleted.
(JSC::UnlinkedCodeBlock::constantBuffer): Deleted.
(JSC::UnlinkedCodeBlock::hasRareData): Deleted.
(JSC::UnlinkedCodeBlock::recordParse): Deleted.
(JSC::UnlinkedCodeBlock::sourceURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::sourceMappingURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::setSourceURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::setSourceMappingURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::codeFeatures): Deleted.
(JSC::UnlinkedCodeBlock::hasCapturedVariables): Deleted.
(JSC::UnlinkedCodeBlock::firstLine): Deleted.
(JSC::UnlinkedCodeBlock::lineCount): Deleted.
(JSC::UnlinkedCodeBlock::startColumn): Deleted.
(JSC::UnlinkedCodeBlock::endColumn): Deleted.
(JSC::UnlinkedCodeBlock::addOpProfileControlFlowBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets): Deleted.
(JSC::UnlinkedCodeBlock::hasOpProfileControlFlowBytecodeOffsets): Deleted.
(JSC::UnlinkedCodeBlock::wasCompiledWithDebuggingOpcodes): Deleted.
(JSC::UnlinkedCodeBlock::didOptimize): Deleted.
(JSC::UnlinkedCodeBlock::setDidOptimize): Deleted.
(JSC::UnlinkedCodeBlock::finishCreation): Deleted.
(JSC::UnlinkedCodeBlock::createRareDataIfNecessary): Deleted.
(JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock): Deleted.
* bytecode/UnlinkedProgramCodeBlock.cpp: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp.
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): Deleted.
(JSC::UnlinkedCodeBlock::visitChildren): Deleted.
(JSC::UnlinkedCodeBlock::estimatedSize): Deleted.
(JSC::UnlinkedCodeBlock::lineNumberForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::getLineAndColumn): Deleted.
(JSC::dumpLineColumnEntry): Deleted.
(JSC::UnlinkedCodeBlock::dumpExpressionRangeInfo): Deleted.
(JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::addExpressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::addTypeProfilerExpressionInfo): Deleted.
(JSC::UnlinkedModuleProgramCodeBlock::visitChildren): Deleted.
(JSC::UnlinkedCodeBlock::~UnlinkedCodeBlock): Deleted.
(JSC::UnlinkedModuleProgramCodeBlock::destroy): Deleted.
(JSC::UnlinkedEvalCodeBlock::destroy): Deleted.
(JSC::UnlinkedFunctionCodeBlock::destroy): Deleted.
(JSC::UnlinkedFunctionExecutable::destroy): Deleted.
(JSC::UnlinkedCodeBlock::setInstructions): Deleted.
(JSC::UnlinkedCodeBlock::instructions): Deleted.
(JSC::UnlinkedCodeBlock::handlerForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::handlerForIndex): Deleted.
(JSC::UnlinkedCodeBlock::applyModification): Deleted.
* bytecode/UnlinkedProgramCodeBlock.h: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h.
(JSC::UnlinkedStringJumpTable::offsetForValue): Deleted.
(JSC::UnlinkedSimpleJumpTable::add): Deleted.
(JSC::UnlinkedInstruction::UnlinkedInstruction): Deleted.
(JSC::UnlinkedCodeBlock::isConstructor): Deleted.
(JSC::UnlinkedCodeBlock::isStrictMode): Deleted.
(JSC::UnlinkedCodeBlock::usesEval): Deleted.
(JSC::UnlinkedCodeBlock::parseMode): Deleted.
(JSC::UnlinkedCodeBlock::isArrowFunction): Deleted.
(JSC::UnlinkedCodeBlock::derivedContextType): Deleted.
(JSC::UnlinkedCodeBlock::evalContextType): Deleted.
(JSC::UnlinkedCodeBlock::isArrowFunctionContext): Deleted.
(JSC::UnlinkedCodeBlock::isClassContext): Deleted.
(JSC::UnlinkedCodeBlock::hasExpressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::expressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::setThisRegister): Deleted.
(JSC::UnlinkedCodeBlock::setScopeRegister): Deleted.
(JSC::UnlinkedCodeBlock::usesGlobalObject): Deleted.
(JSC::UnlinkedCodeBlock::setGlobalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::globalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::setNumParameters): Deleted.
(JSC::UnlinkedCodeBlock::addParameter): Deleted.
(JSC::UnlinkedCodeBlock::numParameters): Deleted.
(JSC::UnlinkedCodeBlock::addRegExp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfRegExps): Deleted.
(JSC::UnlinkedCodeBlock::regexp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfIdentifiers): Deleted.
(JSC::UnlinkedCodeBlock::addIdentifier): Deleted.
(JSC::UnlinkedCodeBlock::identifier): Deleted.
(JSC::UnlinkedCodeBlock::identifiers): Deleted.
(JSC::UnlinkedCodeBlock::addConstant): Deleted.
(JSC::UnlinkedCodeBlock::registerIndexForLinkTimeConstant): Deleted.
(JSC::UnlinkedCodeBlock::constantRegisters): Deleted.
(JSC::UnlinkedCodeBlock::constantRegister): Deleted.
(JSC::UnlinkedCodeBlock::isConstantRegisterIndex): Deleted.
(JSC::UnlinkedCodeBlock::constantsSourceCodeRepresentation): Deleted.
(JSC::UnlinkedCodeBlock::numberOfJumpTargets): Deleted.
(JSC::UnlinkedCodeBlock::addJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::jumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::lastJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::isBuiltinFunction): Deleted.
(JSC::UnlinkedCodeBlock::constructorKind): Deleted.
(JSC::UnlinkedCodeBlock::superBinding): Deleted.
(JSC::UnlinkedCodeBlock::scriptMode): Deleted.
(JSC::UnlinkedCodeBlock::shrinkToFit): Deleted.
(JSC::UnlinkedCodeBlock::numCalleeLocals): Deleted.
(JSC::UnlinkedCodeBlock::numberOfSwitchJumpTables): Deleted.
(JSC::UnlinkedCodeBlock::addSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::switchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::numberOfStringSwitchJumpTables): Deleted.
(JSC::UnlinkedCodeBlock::addStringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::stringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionDecl): Deleted.
(JSC::UnlinkedCodeBlock::functionDecl): Deleted.
(JSC::UnlinkedCodeBlock::numberOfFunctionDecls): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionExpr): Deleted.
(JSC::UnlinkedCodeBlock::functionExpr): Deleted.
(JSC::UnlinkedCodeBlock::numberOfFunctionExprs): Deleted.
(JSC::UnlinkedCodeBlock::numberOfExceptionHandlers): Deleted.
(JSC::UnlinkedCodeBlock::addExceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::exceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::addArrayProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfArrayProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addArrayAllocationProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfArrayAllocationProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addObjectAllocationProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfObjectAllocationProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addValueProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfValueProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addLLIntCallLinkInfo): Deleted.
(JSC::UnlinkedCodeBlock::numberOfLLintCallLinkInfos): Deleted.
(JSC::UnlinkedCodeBlock::codeType): Deleted.
(JSC::UnlinkedCodeBlock::thisRegister): Deleted.
(JSC::UnlinkedCodeBlock::scopeRegister): Deleted.
(JSC::UnlinkedCodeBlock::addPropertyAccessInstruction): Deleted.
(JSC::UnlinkedCodeBlock::numberOfPropertyAccessInstructions): Deleted.
(JSC::UnlinkedCodeBlock::propertyAccessInstructions): Deleted.
(JSC::UnlinkedCodeBlock::constantBufferCount): Deleted.
(JSC::UnlinkedCodeBlock::addConstantBuffer): Deleted.
(JSC::UnlinkedCodeBlock::constantBuffer): Deleted.
(JSC::UnlinkedCodeBlock::hasRareData): Deleted.
(JSC::UnlinkedCodeBlock::recordParse): Deleted.
(JSC::UnlinkedCodeBlock::sourceURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::sourceMappingURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::setSourceURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::setSourceMappingURLDirective): Deleted.
(JSC::UnlinkedCodeBlock::codeFeatures): Deleted.
(JSC::UnlinkedCodeBlock::hasCapturedVariables): Deleted.
(JSC::UnlinkedCodeBlock::firstLine): Deleted.
(JSC::UnlinkedCodeBlock::lineCount): Deleted.
(JSC::UnlinkedCodeBlock::startColumn): Deleted.
(JSC::UnlinkedCodeBlock::endColumn): Deleted.
(JSC::UnlinkedCodeBlock::addOpProfileControlFlowBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets): Deleted.
(JSC::UnlinkedCodeBlock::hasOpProfileControlFlowBytecodeOffsets): Deleted.
(JSC::UnlinkedCodeBlock::wasCompiledWithDebuggingOpcodes): Deleted.
(JSC::UnlinkedCodeBlock::didOptimize): Deleted.
(JSC::UnlinkedCodeBlock::setDidOptimize): Deleted.
(JSC::UnlinkedCodeBlock::finishCreation): Deleted.
(JSC::UnlinkedCodeBlock::createRareDataIfNecessary): Deleted.
(JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock): Deleted.
* bytecompiler/BytecodeGenerator.cpp:
* runtime/CodeCache.cpp:
* runtime/EvalExecutable.h:
* runtime/JSModuleRecord.cpp:

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

4 years agoAllocation elimination of rest parameter doesn't take into account indexed properties...
sbarati@apple.com [Wed, 2 Nov 2016 23:15:33 +0000 (23:15 +0000)]
Allocation elimination of rest parameter doesn't take into account indexed properties on Array.prototype/Object.prototype
https://bugs.webkit.org/show_bug.cgi?id=164301

Reviewed by Geoffrey Garen.

JSTests:

* stress/rest-parameter-allocation-elimination-watchpoints-2.js: Added.
(assert):
(foo):
* stress/rest-parameter-allocation-elimination-watchpoints-3.js: Added.
(assert):
(foo):
* stress/rest-parameter-allocation-elimination-watchpoints-4.js: Added.
(assert):
(foo):
* stress/rest-parameter-allocation-elimination-watchpoints-5.js: Added.
(assert):
(foo):
* stress/rest-parameter-allocation-elimination-watchpoints-6.js: Added.
(assert):
(foo):
* stress/rest-parameter-allocation-elimination-watchpoints.js: Added.
(assert):
(foo):

Source/JavaScriptCore:

We weren't taking into account indexed properties on the __proto__
of the rest parameter. This made the code for doing out of bound
accesses incorrect since it just assumed it's safe for the result of
an out of bound access to be undefined. This broke the semantics
of JS code when there was an indexed property on the Array.prototype
or Object.prototype.

This patch makes sure we set up the proper watchpoints for making
sure out of bound accesses are safe to return undefined.

* dfg/DFGArgumentsEliminationPhase.cpp:

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

4 years agoGive IDBKey(Data) a WTF::Variant overhaul.
beidson@apple.com [Wed, 2 Nov 2016 23:04:22 +0000 (23:04 +0000)]
Give IDBKey(Data) a WTF::Variant overhaul.
https://bugs.webkit.org/show_bug.cgi?id=164332

Reviewed by Alex Christensen and Andy Estes.

No new tests (Refactor, no behavior change).

* Modules/indexeddb/IDBKey.cpp:
(WebCore::IDBKey::IDBKey):
(WebCore::IDBKey::isValid):
(WebCore::IDBKey::compare):
* Modules/indexeddb/IDBKey.h:
(WebCore::IDBKey::array):
(WebCore::IDBKey::string):
(WebCore::IDBKey::date):
(WebCore::IDBKey::number):
(WebCore::IDBKey::IDBKey): Deleted.

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::maybeCreateIDBKey):
(WebCore::IDBKeyData::isolatedCopy):
(WebCore::IDBKeyData::encode):
(WebCore::IDBKeyData::decode):
(WebCore::IDBKeyData::compare):
(WebCore::IDBKeyData::loggingString):
(WebCore::IDBKeyData::setArrayValue):
(WebCore::IDBKeyData::setStringValue):
(WebCore::IDBKeyData::setDateValue):
(WebCore::IDBKeyData::setNumberValue):
(WebCore::IDBKeyData::operator==):
* Modules/indexeddb/IDBKeyData.h:
(WebCore::IDBKeyData::hash):
(WebCore::IDBKeyData::string):
(WebCore::IDBKeyData::date):
(WebCore::IDBKeyData::number):
(WebCore::IDBKeyData::array):
(WebCore::IDBKeyData::encode):
(WebCore::IDBKeyData::decode):

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

4 years agoOne file per class for CodeBlock.h/.cpp
ggaren@apple.com [Wed, 2 Nov 2016 22:19:39 +0000 (22:19 +0000)]
One file per class for CodeBlock.h/.cpp
https://bugs.webkit.org/show_bug.cgi?id=164343

Reviewed by Andreas Kling.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CallLinkInfo.cpp:
* bytecode/CodeBlock.cpp:
(JSC::FunctionCodeBlock::destroy): Deleted.
(JSC::WebAssemblyCodeBlock::destroy): Deleted.
(JSC::ProgramCodeBlock::destroy): Deleted.
(JSC::ModuleProgramCodeBlock::destroy): Deleted.
(JSC::EvalCodeBlock::destroy): Deleted.
* bytecode/CodeBlock.h:
(JSC::GlobalCodeBlock::GlobalCodeBlock): Deleted.
(JSC::ProgramCodeBlock::create): Deleted.
(JSC::ProgramCodeBlock::createStructure): Deleted.
(JSC::ProgramCodeBlock::ProgramCodeBlock): Deleted.
(JSC::ModuleProgramCodeBlock::create): Deleted.
(JSC::ModuleProgramCodeBlock::createStructure): Deleted.
(JSC::ModuleProgramCodeBlock::ModuleProgramCodeBlock): Deleted.
(JSC::EvalCodeBlock::create): Deleted.
(JSC::EvalCodeBlock::createStructure): Deleted.
(JSC::EvalCodeBlock::variable): Deleted.
(JSC::EvalCodeBlock::numVariables): Deleted.
(JSC::EvalCodeBlock::EvalCodeBlock): Deleted.
(JSC::EvalCodeBlock::unlinkedEvalCodeBlock): Deleted.
(JSC::FunctionCodeBlock::create): Deleted.
(JSC::FunctionCodeBlock::createStructure): Deleted.
(JSC::FunctionCodeBlock::FunctionCodeBlock): Deleted.
(JSC::WebAssemblyCodeBlock::create): Deleted.
(JSC::WebAssemblyCodeBlock::createStructure): Deleted.
(JSC::WebAssemblyCodeBlock::WebAssemblyCodeBlock): Deleted.
(JSC::ScriptExecutable::forEachCodeBlock): Deleted.
* bytecode/EvalCodeBlock.cpp: Copied from Source/JavaScriptCore/bytecode/CodeBlock.cpp.
(JSC::FunctionCodeBlock::destroy): Deleted.
(JSC::WebAssemblyCodeBlock::destroy): Deleted.
(JSC::ProgramCodeBlock::destroy): Deleted.
(JSC::ModuleProgramCodeBlock::destroy): Deleted.
(JSC::CodeBlock::inferredName): Deleted.
(JSC::CodeBlock::hasHash): Deleted.
(JSC::CodeBlock::isSafeToComputeHash): Deleted.
(JSC::CodeBlock::hash): Deleted.
(JSC::CodeBlock::sourceCodeForTools): Deleted.
(JSC::CodeBlock::sourceCodeOnOneLine): Deleted.
(JSC::CodeBlock::hashAsStringIfPossible): Deleted.
(JSC::CodeBlock::dumpAssumingJITType): Deleted.
(JSC::CodeBlock::dump): Deleted.
(JSC::idName): Deleted.
(JSC::CodeBlock::registerName): Deleted.
(JSC::CodeBlock::constantName): Deleted.
(JSC::regexpToSourceString): Deleted.
(JSC::regexpName): Deleted.
(JSC::debugHookName): Deleted.
(JSC::CodeBlock::printUnaryOp): Deleted.
(JSC::CodeBlock::printBinaryOp): Deleted.
(JSC::CodeBlock::printConditionalJump): Deleted.
(JSC::CodeBlock::printGetByIdOp): Deleted.
(JSC::dumpStructure): Deleted.
(JSC::dumpChain): Deleted.
(JSC::CodeBlock::printGetByIdCacheStatus): Deleted.
(JSC::CodeBlock::printPutByIdCacheStatus): Deleted.
(JSC::CodeBlock::printCallOp): Deleted.
(JSC::CodeBlock::printPutByIdOp): Deleted.
(JSC::CodeBlock::dumpSource): Deleted.
(JSC::CodeBlock::dumpBytecode): Deleted.
(JSC::CodeBlock::dumpExceptionHandlers): Deleted.
(JSC::CodeBlock::beginDumpProfiling): Deleted.
(JSC::CodeBlock::dumpValueProfiling): Deleted.
(JSC::CodeBlock::dumpArrayProfiling): Deleted.
(JSC::CodeBlock::dumpRareCaseProfile): Deleted.
(JSC::CodeBlock::dumpArithProfile): Deleted.
(JSC::CodeBlock::printLocationAndOp): Deleted.
(JSC::CodeBlock::printLocationOpAndRegisterOperand): Deleted.
(JSC::sizeInBytes): Deleted.
(JSC::CodeBlock::CodeBlock): Deleted.
(JSC::CodeBlock::finishCreation): Deleted.
(JSC::CodeBlock::~CodeBlock): Deleted.
(JSC::CodeBlock::setConstantRegisters): Deleted.
(JSC::CodeBlock::setAlternative): Deleted.
(JSC::CodeBlock::setNumParameters): Deleted.
(JSC::EvalCodeCache::visitAggregate): Deleted.
(JSC::CodeBlock::specialOSREntryBlockOrNull): Deleted.
(JSC::CodeBlock::visitWeakly): Deleted.
(JSC::CodeBlock::estimatedSize): Deleted.
(JSC::CodeBlock::visitChildren): Deleted.
(JSC::CodeBlock::shouldVisitStrongly): Deleted.
(JSC::CodeBlock::shouldJettisonDueToWeakReference): Deleted.
(JSC::timeToLive): Deleted.
(JSC::CodeBlock::shouldJettisonDueToOldAge): Deleted.
(JSC::shouldMarkTransition): Deleted.
(JSC::CodeBlock::propagateTransitions): Deleted.
(JSC::CodeBlock::determineLiveness): Deleted.
(JSC::CodeBlock::WeakReferenceHarvester::visitWeakReferences): Deleted.
(JSC::CodeBlock::clearLLIntGetByIdCache): Deleted.
(JSC::CodeBlock::finalizeLLIntInlineCaches): Deleted.
(JSC::CodeBlock::finalizeBaselineJITInlineCaches): Deleted.
(JSC::CodeBlock::UnconditionalFinalizer::finalizeUnconditionally): Deleted.
(JSC::CodeBlock::getStubInfoMap): Deleted.
(JSC::CodeBlock::getCallLinkInfoMap): Deleted.
(JSC::CodeBlock::getByValInfoMap): Deleted.
(JSC::CodeBlock::addStubInfo): Deleted.
(JSC::CodeBlock::addJITAddIC): Deleted.
(JSC::CodeBlock::addJITMulIC): Deleted.
(JSC::CodeBlock::addJITSubIC): Deleted.
(JSC::CodeBlock::addJITNegIC): Deleted.
(JSC::CodeBlock::findStubInfo): Deleted.
(JSC::CodeBlock::addByValInfo): Deleted.
(JSC::CodeBlock::addCallLinkInfo): Deleted.
(JSC::CodeBlock::getCallLinkInfoForBytecodeIndex): Deleted.
(JSC::CodeBlock::resetJITData): Deleted.
(JSC::CodeBlock::visitOSRExitTargets): Deleted.
(JSC::CodeBlock::stronglyVisitStrongReferences): Deleted.
(JSC::CodeBlock::stronglyVisitWeakReferences): Deleted.
(JSC::CodeBlock::baselineAlternative): Deleted.
(JSC::CodeBlock::baselineVersion): Deleted.
(JSC::CodeBlock::hasOptimizedReplacement): Deleted.
(JSC::CodeBlock::handlerForBytecodeOffset): Deleted.
(JSC::CodeBlock::handlerForIndex): Deleted.
(JSC::CodeBlock::newExceptionHandlingCallSiteIndex): Deleted.
(JSC::CodeBlock::removeExceptionHandlerForCallSite): Deleted.
(JSC::CodeBlock::lineNumberForBytecodeOffset): Deleted.
(JSC::CodeBlock::columnNumberForBytecodeOffset): Deleted.
(JSC::CodeBlock::expressionRangeForBytecodeOffset): Deleted.
(JSC::CodeBlock::hasOpDebugForLineAndColumn): Deleted.
(JSC::CodeBlock::shrinkToFit): Deleted.
(JSC::CodeBlock::linkIncomingCall): Deleted.
(JSC::CodeBlock::linkIncomingPolymorphicCall): Deleted.
(JSC::CodeBlock::unlinkIncomingCalls): Deleted.
(JSC::CodeBlock::newReplacement): Deleted.
(JSC::CodeBlock::replacement): Deleted.
(JSC::CodeBlock::computeCapabilityLevel): Deleted.
(JSC::CodeBlock::jettison): Deleted.
(JSC::CodeBlock::globalObjectFor): Deleted.
(JSC::RecursionCheckFunctor::RecursionCheckFunctor): Deleted.
(JSC::RecursionCheckFunctor::operator()): Deleted.
(JSC::RecursionCheckFunctor::didRecurse): Deleted.
(JSC::CodeBlock::noticeIncomingCall): Deleted.
(JSC::CodeBlock::reoptimizationRetryCounter): Deleted.
(JSC::CodeBlock::setCalleeSaveRegisters): Deleted.
(JSC::roundCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::calleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::countReoptimization): Deleted.
(JSC::CodeBlock::numberOfDFGCompiles): Deleted.
(JSC::CodeBlock::codeTypeThresholdMultiplier): Deleted.
(JSC::CodeBlock::optimizationThresholdScalingFactor): Deleted.
(JSC::clipThreshold): Deleted.
(JSC::CodeBlock::adjustedCounterValue): Deleted.
(JSC::CodeBlock::checkIfOptimizationThresholdReached): Deleted.
(JSC::CodeBlock::optimizeNextInvocation): Deleted.
(JSC::CodeBlock::dontOptimizeAnytimeSoon): Deleted.
(JSC::CodeBlock::optimizeAfterWarmUp): Deleted.
(JSC::CodeBlock::optimizeAfterLongWarmUp): Deleted.
(JSC::CodeBlock::optimizeSoon): Deleted.
(JSC::CodeBlock::forceOptimizationSlowPathConcurrently): Deleted.
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult): Deleted.
(JSC::CodeBlock::adjustedExitCountThreshold): Deleted.
(JSC::CodeBlock::exitCountThresholdForReoptimization): Deleted.
(JSC::CodeBlock::exitCountThresholdForReoptimizationFromLoop): Deleted.
(JSC::CodeBlock::shouldReoptimizeNow): Deleted.
(JSC::CodeBlock::shouldReoptimizeFromLoopNow): Deleted.
(JSC::CodeBlock::getArrayProfile): Deleted.
(JSC::CodeBlock::addArrayProfile): Deleted.
(JSC::CodeBlock::getOrAddArrayProfile): Deleted.
(JSC::CodeBlock::codeOrigins): Deleted.
(JSC::CodeBlock::numberOfDFGIdentifiers): Deleted.
(JSC::CodeBlock::identifier): Deleted.
(JSC::CodeBlock::updateAllPredictionsAndCountLiveness): Deleted.
(JSC::CodeBlock::updateAllValueProfilePredictions): Deleted.
(JSC::CodeBlock::updateAllArrayPredictions): Deleted.
(JSC::CodeBlock::updateAllPredictions): Deleted.
(JSC::CodeBlock::shouldOptimizeNow): Deleted.
(JSC::CodeBlock::tallyFrequentExitSites): Deleted.
(JSC::CodeBlock::dumpValueProfiles): Deleted.
(JSC::CodeBlock::frameRegisterCount): Deleted.
(JSC::CodeBlock::stackPointerOffset): Deleted.
(JSC::CodeBlock::predictedMachineCodeSize): Deleted.
(JSC::CodeBlock::usesOpcode): Deleted.
(JSC::CodeBlock::nameForRegister): Deleted.
(JSC::CodeBlock::valueProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::validate): Deleted.
(JSC::CodeBlock::beginValidationDidFail): Deleted.
(JSC::CodeBlock::endValidationDidFail): Deleted.
(JSC::CodeBlock::addBreakpoint): Deleted.
(JSC::CodeBlock::setSteppingMode): Deleted.
(JSC::CodeBlock::addRareCaseProfile): Deleted.
(JSC::CodeBlock::rareCaseProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::rareCaseProfileCountForBytecodeOffset): Deleted.
(JSC::CodeBlock::arithProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::arithProfileForPC): Deleted.
(JSC::CodeBlock::couldTakeSpecialFastCase): Deleted.
(JSC::CodeBlock::capabilityLevel): Deleted.
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler): Deleted.
(JSC::CodeBlock::setPCToCodeOriginMap): Deleted.
(JSC::CodeBlock::findPC): Deleted.
(JSC::CodeBlock::bytecodeOffsetFromCallSiteIndex): Deleted.
(JSC::CodeBlock::thresholdForJIT): Deleted.
(JSC::CodeBlock::jitAfterWarmUp): Deleted.
(JSC::CodeBlock::jitSoon): Deleted.
(JSC::CodeBlock::dumpMathICStats): Deleted.
(JSC::CodeBlock::livenessAnalysisSlow): Deleted.
* bytecode/EvalCodeBlock.h: Copied from Source/JavaScriptCore/bytecode/CodeBlock.h.
(): Deleted.
(JSC::CodeBlock::unlinkedCodeBlock): Deleted.
(JSC::CodeBlock::numParameters): Deleted.
(JSC::CodeBlock::numCalleeLocals): Deleted.
(JSC::CodeBlock::addressOfNumParameters): Deleted.
(JSC::CodeBlock::offsetOfNumParameters): Deleted.
(JSC::CodeBlock::alternative): Deleted.
(JSC::CodeBlock::forEachRelatedCodeBlock): Deleted.
(JSC::CodeBlock::specializationKind): Deleted.
(JSC::CodeBlock::isStrictMode): Deleted.
(JSC::CodeBlock::ecmaMode): Deleted.
(JSC::CodeBlock::isKnownNotImmediate): Deleted.
(JSC::CodeBlock::isTemporaryRegisterIndex): Deleted.
(JSC::CodeBlock::stubInfoBegin): Deleted.
(JSC::CodeBlock::stubInfoEnd): Deleted.
(JSC::CodeBlock::callLinkInfosBegin): Deleted.
(JSC::CodeBlock::callLinkInfosEnd): Deleted.
(JSC::CodeBlock::setJITCodeMap): Deleted.
(JSC::CodeBlock::jitCodeMap): Deleted.
(JSC::CodeBlock::bytecodeOffset): Deleted.
(JSC::CodeBlock::numberOfInstructions): Deleted.
(JSC::CodeBlock::instructions): Deleted.
(JSC::CodeBlock::instructionCount): Deleted.
(JSC::CodeBlock::setJITCode): Deleted.
(JSC::CodeBlock::jitCode): Deleted.
(JSC::CodeBlock::jitCodeOffset): Deleted.
(JSC::CodeBlock::jitType): Deleted.
(JSC::CodeBlock::hasBaselineJITProfiling): Deleted.
(JSC::CodeBlock::capabilityLevelState): Deleted.
(JSC::CodeBlock::ownerExecutable): Deleted.
(JSC::CodeBlock::ownerScriptExecutable): Deleted.
(JSC::CodeBlock::vm): Deleted.
(JSC::CodeBlock::setThisRegister): Deleted.
(JSC::CodeBlock::thisRegister): Deleted.
(JSC::CodeBlock::usesEval): Deleted.
(JSC::CodeBlock::setScopeRegister): Deleted.
(JSC::CodeBlock::scopeRegister): Deleted.
(JSC::CodeBlock::codeType): Deleted.
(JSC::CodeBlock::putByIdContext): Deleted.
(JSC::CodeBlock::source): Deleted.
(JSC::CodeBlock::sourceOffset): Deleted.
(JSC::CodeBlock::firstLineColumnOffset): Deleted.
(JSC::CodeBlock::numberOfJumpTargets): Deleted.
(JSC::CodeBlock::jumpTarget): Deleted.
(JSC::CodeBlock::numberOfArgumentValueProfiles): Deleted.
(JSC::CodeBlock::valueProfileForArgument): Deleted.
(JSC::CodeBlock::numberOfValueProfiles): Deleted.
(JSC::CodeBlock::valueProfile): Deleted.
(JSC::CodeBlock::valueProfilePredictionForBytecodeOffset): Deleted.
(JSC::CodeBlock::totalNumberOfValueProfiles): Deleted.
(JSC::CodeBlock::getFromAllValueProfiles): Deleted.
(JSC::CodeBlock::numberOfRareCaseProfiles): Deleted.
(JSC::CodeBlock::likelyToTakeSlowCase): Deleted.
(JSC::CodeBlock::couldTakeSlowCase): Deleted.
(JSC::CodeBlock::numberOfArrayProfiles): Deleted.
(JSC::CodeBlock::arrayProfiles): Deleted.
(JSC::CodeBlock::numberOfExceptionHandlers): Deleted.
(JSC::CodeBlock::exceptionHandler): Deleted.
(JSC::CodeBlock::hasExpressionInfo): Deleted.
(JSC::CodeBlock::hasCodeOrigins): Deleted.
(JSC::CodeBlock::canGetCodeOrigin): Deleted.
(JSC::CodeBlock::codeOrigin): Deleted.
(JSC::CodeBlock::addFrequentExitSite): Deleted.
(JSC::CodeBlock::hasExitSite): Deleted.
(JSC::CodeBlock::exitProfile): Deleted.
(JSC::CodeBlock::lazyOperandValueProfiles): Deleted.
(JSC::CodeBlock::numberOfIdentifiers): Deleted.
(JSC::CodeBlock::identifier): Deleted.
(JSC::CodeBlock::constants): Deleted.
(JSC::CodeBlock::constantsSourceCodeRepresentation): Deleted.
(JSC::CodeBlock::addConstant): Deleted.
(JSC::CodeBlock::addConstantLazily): Deleted.
(JSC::CodeBlock::constantRegister): Deleted.
(JSC::CodeBlock::isConstantRegisterIndex): Deleted.
(JSC::CodeBlock::getConstant): Deleted.
(JSC::CodeBlock::constantSourceCodeRepresentation): Deleted.
(JSC::CodeBlock::functionDecl): Deleted.
(JSC::CodeBlock::numberOfFunctionDecls): Deleted.
(JSC::CodeBlock::functionExpr): Deleted.
(JSC::CodeBlock::regexp): Deleted.
(JSC::CodeBlock::numberOfConstantBuffers): Deleted.
(JSC::CodeBlock::addConstantBuffer): Deleted.
(JSC::CodeBlock::constantBufferAsVector): Deleted.
(JSC::CodeBlock::constantBuffer): Deleted.
(JSC::CodeBlock::heap): Deleted.
(JSC::CodeBlock::globalObject): Deleted.
(JSC::CodeBlock::livenessAnalysis): Deleted.
(JSC::CodeBlock::numberOfSwitchJumpTables): Deleted.
(JSC::CodeBlock::addSwitchJumpTable): Deleted.
(JSC::CodeBlock::switchJumpTable): Deleted.
(JSC::CodeBlock::clearSwitchJumpTables): Deleted.
(JSC::CodeBlock::numberOfStringSwitchJumpTables): Deleted.
(JSC::CodeBlock::addStringSwitchJumpTable): Deleted.
(JSC::CodeBlock::stringSwitchJumpTable): Deleted.
(JSC::CodeBlock::evalCodeCache): Deleted.
(JSC::CodeBlock::checkIfJITThresholdReached): Deleted.
(JSC::CodeBlock::dontJITAnytimeSoon): Deleted.
(JSC::CodeBlock::llintExecuteCounter): Deleted.
(JSC::CodeBlock::llintGetByIdWatchpointMap): Deleted.
(JSC::CodeBlock::numberOfLLIntBaselineCalleeSaveRegisters): Deleted.
(JSC::CodeBlock::addressOfJITExecuteCounter): Deleted.
(JSC::CodeBlock::offsetOfJITExecuteCounter): Deleted.
(JSC::CodeBlock::offsetOfJITExecutionActiveThreshold): Deleted.
(JSC::CodeBlock::offsetOfJITExecutionTotalCount): Deleted.
(JSC::CodeBlock::jitExecuteCounter): Deleted.
(JSC::CodeBlock::optimizationDelayCounter): Deleted.
(JSC::CodeBlock::osrExitCounter): Deleted.
(JSC::CodeBlock::countOSRExit): Deleted.
(JSC::CodeBlock::addressOfOSRExitCounter): Deleted.
(JSC::CodeBlock::offsetOfOSRExitCounter): Deleted.
(JSC::CodeBlock::calleeSaveRegisters): Deleted.
(JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::optimizeAfterWarmUp): Deleted.
(JSC::CodeBlock::numberOfDFGCompiles): Deleted.
(JSC::CodeBlock::hasDebuggerRequests): Deleted.
(JSC::CodeBlock::debuggerRequestsAddress): Deleted.
(JSC::CodeBlock::removeBreakpoint): Deleted.
(JSC::CodeBlock::clearDebuggerRequests): Deleted.
(JSC::CodeBlock::wasCompiledWithDebuggingOpcodes): Deleted.
(JSC::CodeBlock::clearExceptionHandlers): Deleted.
(JSC::CodeBlock::appendExceptionHandler): Deleted.
(JSC::CodeBlock::tallyFrequentExitSites): Deleted.
(JSC::CodeBlock::replaceConstant): Deleted.
(JSC::CodeBlock::timeSinceCreation): Deleted.
(JSC::CodeBlock::createRareDataIfNecessary): Deleted.
(JSC::GlobalCodeBlock::GlobalCodeBlock): Deleted.
(JSC::ProgramCodeBlock::create): Deleted.
(JSC::ProgramCodeBlock::createStructure): Deleted.
(JSC::ProgramCodeBlock::ProgramCodeBlock): Deleted.
(JSC::ModuleProgramCodeBlock::create): Deleted.
(JSC::ModuleProgramCodeBlock::createStructure): Deleted.
(JSC::ModuleProgramCodeBlock::ModuleProgramCodeBlock): Deleted.
(JSC::FunctionCodeBlock::create): Deleted.
(JSC::FunctionCodeBlock::createStructure): Deleted.
(JSC::FunctionCodeBlock::FunctionCodeBlock): Deleted.
(JSC::WebAssemblyCodeBlock::create): Deleted.
(JSC::WebAssemblyCodeBlock::createStructure): Deleted.
(JSC::WebAssemblyCodeBlock::WebAssemblyCodeBlock): Deleted.
(JSC::ExecState::r): Deleted.
(JSC::ExecState::uncheckedR): Deleted.
(JSC::CodeBlock::clearVisitWeaklyHasBeenCalled): Deleted.
(JSC::ScriptExecutable::forEachCodeBlock): Deleted.
(JSC::ScriptExecutable::prepareForExecution): Deleted.
* bytecode/FunctionCodeBlock.cpp: Copied from Source/JavaScriptCore/bytecode/CodeBlock.cpp.
(JSC::WebAssemblyCodeBlock::destroy): Deleted.
(JSC::ProgramCodeBlock::destroy): Deleted.
(JSC::ModuleProgramCodeBlock::destroy): Deleted.
(JSC::EvalCodeBlock::destroy): Deleted.
(JSC::CodeBlock::inferredName): Deleted.
(JSC::CodeBlock::hasHash): Deleted.
(JSC::CodeBlock::isSafeToComputeHash): Deleted.
(JSC::CodeBlock::hash): Deleted.
(JSC::CodeBlock::sourceCodeForTools): Deleted.
(JSC::CodeBlock::sourceCodeOnOneLine): Deleted.
(JSC::CodeBlock::hashAsStringIfPossible): Deleted.
(JSC::CodeBlock::dumpAssumingJITType): Deleted.
(JSC::CodeBlock::dump): Deleted.
(JSC::idName): Deleted.
(JSC::CodeBlock::registerName): Deleted.
(JSC::CodeBlock::constantName): Deleted.
(JSC::regexpToSourceString): Deleted.
(JSC::regexpName): Deleted.
(JSC::debugHookName): Deleted.
(JSC::CodeBlock::printUnaryOp): Deleted.
(JSC::CodeBlock::printBinaryOp): Deleted.
(JSC::CodeBlock::printConditionalJump): Deleted.
(JSC::CodeBlock::printGetByIdOp): Deleted.
(JSC::dumpStructure): Deleted.
(JSC::dumpChain): Deleted.
(JSC::CodeBlock::printGetByIdCacheStatus): Deleted.
(JSC::CodeBlock::printPutByIdCacheStatus): Deleted.
(JSC::CodeBlock::printCallOp): Deleted.
(JSC::CodeBlock::printPutByIdOp): Deleted.
(JSC::CodeBlock::dumpSource): Deleted.
(JSC::CodeBlock::dumpBytecode): Deleted.
(JSC::CodeBlock::dumpExceptionHandlers): Deleted.
(JSC::CodeBlock::beginDumpProfiling): Deleted.
(JSC::CodeBlock::dumpValueProfiling): Deleted.
(JSC::CodeBlock::dumpArrayProfiling): Deleted.
(JSC::CodeBlock::dumpRareCaseProfile): Deleted.
(JSC::CodeBlock::dumpArithProfile): Deleted.
(JSC::CodeBlock::printLocationAndOp): Deleted.
(JSC::CodeBlock::printLocationOpAndRegisterOperand): Deleted.
(JSC::sizeInBytes): Deleted.
(JSC::CodeBlock::CodeBlock): Deleted.
(JSC::CodeBlock::finishCreation): Deleted.
(JSC::CodeBlock::~CodeBlock): Deleted.
(JSC::CodeBlock::setConstantRegisters): Deleted.
(JSC::CodeBlock::setAlternative): Deleted.
(JSC::CodeBlock::setNumParameters): Deleted.
(JSC::EvalCodeCache::visitAggregate): Deleted.
(JSC::CodeBlock::specialOSREntryBlockOrNull): Deleted.
(JSC::CodeBlock::visitWeakly): Deleted.
(JSC::CodeBlock::estimatedSize): Deleted.
(JSC::CodeBlock::visitChildren): Deleted.
(JSC::CodeBlock::shouldVisitStrongly): Deleted.
(JSC::CodeBlock::shouldJettisonDueToWeakReference): Deleted.
(JSC::timeToLive): Deleted.
(JSC::CodeBlock::shouldJettisonDueToOldAge): Deleted.
(JSC::shouldMarkTransition): Deleted.
(JSC::CodeBlock::propagateTransitions): Deleted.
(JSC::CodeBlock::determineLiveness): Deleted.
(JSC::CodeBlock::WeakReferenceHarvester::visitWeakReferences): Deleted.
(JSC::CodeBlock::clearLLIntGetByIdCache): Deleted.
(JSC::CodeBlock::finalizeLLIntInlineCaches): Deleted.
(JSC::CodeBlock::finalizeBaselineJITInlineCaches): Deleted.
(JSC::CodeBlock::UnconditionalFinalizer::finalizeUnconditionally): Deleted.
(JSC::CodeBlock::getStubInfoMap): Deleted.
(JSC::CodeBlock::getCallLinkInfoMap): Deleted.
(JSC::CodeBlock::getByValInfoMap): Deleted.
(JSC::CodeBlock::addStubInfo): Deleted.
(JSC::CodeBlock::addJITAddIC): Deleted.
(JSC::CodeBlock::addJITMulIC): Deleted.
(JSC::CodeBlock::addJITSubIC): Deleted.
(JSC::CodeBlock::addJITNegIC): Deleted.
(JSC::CodeBlock::findStubInfo): Deleted.
(JSC::CodeBlock::addByValInfo): Deleted.
(JSC::CodeBlock::addCallLinkInfo): Deleted.
(JSC::CodeBlock::getCallLinkInfoForBytecodeIndex): Deleted.
(JSC::CodeBlock::resetJITData): Deleted.
(JSC::CodeBlock::visitOSRExitTargets): Deleted.
(JSC::CodeBlock::stronglyVisitStrongReferences): Deleted.
(JSC::CodeBlock::stronglyVisitWeakReferences): Deleted.
(JSC::CodeBlock::baselineAlternative): Deleted.
(JSC::CodeBlock::baselineVersion): Deleted.
(JSC::CodeBlock::hasOptimizedReplacement): Deleted.
(JSC::CodeBlock::handlerForBytecodeOffset): Deleted.
(JSC::CodeBlock::handlerForIndex): Deleted.
(JSC::CodeBlock::newExceptionHandlingCallSiteIndex): Deleted.
(JSC::CodeBlock::removeExceptionHandlerForCallSite): Deleted.
(JSC::CodeBlock::lineNumberForBytecodeOffset): Deleted.
(JSC::CodeBlock::columnNumberForBytecodeOffset): Deleted.
(JSC::CodeBlock::expressionRangeForBytecodeOffset): Deleted.
(JSC::CodeBlock::hasOpDebugForLineAndColumn): Deleted.
(JSC::CodeBlock::shrinkToFit): Deleted.
(JSC::CodeBlock::linkIncomingCall): Deleted.
(JSC::CodeBlock::linkIncomingPolymorphicCall): Deleted.
(JSC::CodeBlock::unlinkIncomingCalls): Deleted.
(JSC::CodeBlock::newReplacement): Deleted.
(JSC::CodeBlock::replacement): Deleted.
(JSC::CodeBlock::computeCapabilityLevel): Deleted.
(JSC::CodeBlock::jettison): Deleted.
(JSC::CodeBlock::globalObjectFor): Deleted.
(JSC::RecursionCheckFunctor::RecursionCheckFunctor): Deleted.
(JSC::RecursionCheckFunctor::operator()): Deleted.
(JSC::RecursionCheckFunctor::didRecurse): Deleted.
(JSC::CodeBlock::noticeIncomingCall): Deleted.
(JSC::CodeBlock::reoptimizationRetryCounter): Deleted.
(JSC::CodeBlock::setCalleeSaveRegisters): Deleted.
(JSC::roundCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::calleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::countReoptimization): Deleted.
(JSC::CodeBlock::numberOfDFGCompiles): Deleted.
(JSC::CodeBlock::codeTypeThresholdMultiplier): Deleted.
(JSC::CodeBlock::optimizationThresholdScalingFactor): Deleted.
(JSC::clipThreshold): Deleted.
(JSC::CodeBlock::adjustedCounterValue): Deleted.
(JSC::CodeBlock::checkIfOptimizationThresholdReached): Deleted.
(JSC::CodeBlock::optimizeNextInvocation): Deleted.
(JSC::CodeBlock::dontOptimizeAnytimeSoon): Deleted.
(JSC::CodeBlock::optimizeAfterWarmUp): Deleted.
(JSC::CodeBlock::optimizeAfterLongWarmUp): Deleted.
(JSC::CodeBlock::optimizeSoon): Deleted.
(JSC::CodeBlock::forceOptimizationSlowPathConcurrently): Deleted.
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult): Deleted.
(JSC::CodeBlock::adjustedExitCountThreshold): Deleted.
(JSC::CodeBlock::exitCountThresholdForReoptimization): Deleted.
(JSC::CodeBlock::exitCountThresholdForReoptimizationFromLoop): Deleted.
(JSC::CodeBlock::shouldReoptimizeNow): Deleted.
(JSC::CodeBlock::shouldReoptimizeFromLoopNow): Deleted.
(JSC::CodeBlock::getArrayProfile): Deleted.
(JSC::CodeBlock::addArrayProfile): Deleted.
(JSC::CodeBlock::getOrAddArrayProfile): Deleted.
(JSC::CodeBlock::codeOrigins): Deleted.
(JSC::CodeBlock::numberOfDFGIdentifiers): Deleted.
(JSC::CodeBlock::identifier): Deleted.
(JSC::CodeBlock::updateAllPredictionsAndCountLiveness): Deleted.
(JSC::CodeBlock::updateAllValueProfilePredictions): Deleted.
(JSC::CodeBlock::updateAllArrayPredictions): Deleted.
(JSC::CodeBlock::updateAllPredictions): Deleted.
(JSC::CodeBlock::shouldOptimizeNow): Deleted.
(JSC::CodeBlock::tallyFrequentExitSites): Deleted.
(JSC::CodeBlock::dumpValueProfiles): Deleted.
(JSC::CodeBlock::frameRegisterCount): Deleted.
(JSC::CodeBlock::stackPointerOffset): Deleted.
(JSC::CodeBlock::predictedMachineCodeSize): Deleted.
(JSC::CodeBlock::usesOpcode): Deleted.
(JSC::CodeBlock::nameForRegister): Deleted.
(JSC::CodeBlock::valueProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::validate): Deleted.
(JSC::CodeBlock::beginValidationDidFail): Deleted.
(JSC::CodeBlock::endValidationDidFail): Deleted.
(JSC::CodeBlock::addBreakpoint): Deleted.
(JSC::CodeBlock::setSteppingMode): Deleted.
(JSC::CodeBlock::addRareCaseProfile): Deleted.
(JSC::CodeBlock::rareCaseProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::rareCaseProfileCountForBytecodeOffset): Deleted.
(JSC::CodeBlock::arithProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::arithProfileForPC): Deleted.
(JSC::CodeBlock::couldTakeSpecialFastCase): Deleted.
(JSC::CodeBlock::capabilityLevel): Deleted.
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler): Deleted.
(JSC::CodeBlock::setPCToCodeOriginMap): Deleted.
(JSC::CodeBlock::findPC): Deleted.
(JSC::CodeBlock::bytecodeOffsetFromCallSiteIndex): Deleted.
(JSC::CodeBlock::thresholdForJIT): Deleted.
(JSC::CodeBlock::jitAfterWarmUp): Deleted.
(JSC::CodeBlock::jitSoon): Deleted.
(JSC::CodeBlock::dumpMathICStats): Deleted.
(JSC::CodeBlock::livenessAnalysisSlow): Deleted.
* bytecode/FunctionCodeBlock.h: Copied from Source/JavaScriptCore/bytecode/CodeBlock.h.
(): Deleted.
(JSC::CodeBlock::unlinkedCodeBlock): Deleted.
(JSC::CodeBlock::numParameters): Deleted.
(JSC::CodeBlock::numCalleeLocals): Deleted.
(JSC::CodeBlock::addressOfNumParameters): Deleted.
(JSC::CodeBlock::offsetOfNumParameters): Deleted.
(JSC::CodeBlock::alternative): Deleted.
(JSC::CodeBlock::forEachRelatedCodeBlock): Deleted.
(JSC::CodeBlock::specializationKind): Deleted.
(JSC::CodeBlock::isStrictMode): Deleted.
(JSC::CodeBlock::ecmaMode): Deleted.
(JSC::CodeBlock::isKnownNotImmediate): Deleted.
(JSC::CodeBlock::isTemporaryRegisterIndex): Deleted.
(JSC::CodeBlock::stubInfoBegin): Deleted.
(JSC::CodeBlock::stubInfoEnd): Deleted.
(JSC::CodeBlock::callLinkInfosBegin): Deleted.
(JSC::CodeBlock::callLinkInfosEnd): Deleted.
(JSC::CodeBlock::setJITCodeMap): Deleted.
(JSC::CodeBlock::jitCodeMap): Deleted.
(JSC::CodeBlock::bytecodeOffset): Deleted.
(JSC::CodeBlock::numberOfInstructions): Deleted.
(JSC::CodeBlock::instructions): Deleted.
(JSC::CodeBlock::instructionCount): Deleted.
(JSC::CodeBlock::setJITCode): Deleted.
(JSC::CodeBlock::jitCode): Deleted.
(JSC::CodeBlock::jitCodeOffset): Deleted.
(JSC::CodeBlock::jitType): Deleted.
(JSC::CodeBlock::hasBaselineJITProfiling): Deleted.
(JSC::CodeBlock::capabilityLevelState): Deleted.
(JSC::CodeBlock::ownerExecutable): Deleted.
(JSC::CodeBlock::ownerScriptExecutable): Deleted.
(JSC::CodeBlock::vm): Deleted.
(JSC::CodeBlock::setThisRegister): Deleted.
(JSC::CodeBlock::thisRegister): Deleted.
(JSC::CodeBlock::usesEval): Deleted.
(JSC::CodeBlock::setScopeRegister): Deleted.
(JSC::CodeBlock::scopeRegister): Deleted.
(JSC::CodeBlock::codeType): Deleted.
(JSC::CodeBlock::putByIdContext): Deleted.
(JSC::CodeBlock::source): Deleted.
(JSC::CodeBlock::sourceOffset): Deleted.
(JSC::CodeBlock::firstLineColumnOffset): Deleted.
(JSC::CodeBlock::numberOfJumpTargets): Deleted.
(JSC::CodeBlock::jumpTarget): Deleted.
(JSC::CodeBlock::numberOfArgumentValueProfiles): Deleted.
(JSC::CodeBlock::valueProfileForArgument): Deleted.
(JSC::CodeBlock::numberOfValueProfiles): Deleted.
(JSC::CodeBlock::valueProfile): Deleted.
(JSC::CodeBlock::valueProfilePredictionForBytecodeOffset): Deleted.
(JSC::CodeBlock::totalNumberOfValueProfiles): Deleted.
(JSC::CodeBlock::getFromAllValueProfiles): Deleted.
(JSC::CodeBlock::numberOfRareCaseProfiles): Deleted.
(JSC::CodeBlock::likelyToTakeSlowCase): Deleted.
(JSC::CodeBlock::couldTakeSlowCase): Deleted.
(JSC::CodeBlock::numberOfArrayProfiles): Deleted.
(JSC::CodeBlock::arrayProfiles): Deleted.
(JSC::CodeBlock::numberOfExceptionHandlers): Deleted.
(JSC::CodeBlock::exceptionHandler): Deleted.
(JSC::CodeBlock::hasExpressionInfo): Deleted.
(JSC::CodeBlock::hasCodeOrigins): Deleted.
(JSC::CodeBlock::canGetCodeOrigin): Deleted.
(JSC::CodeBlock::codeOrigin): Deleted.
(JSC::CodeBlock::addFrequentExitSite): Deleted.
(JSC::CodeBlock::hasExitSite): Deleted.
(JSC::CodeBlock::exitProfile): Deleted.
(JSC::CodeBlock::lazyOperandValueProfiles): Deleted.
(JSC::CodeBlock::numberOfIdentifiers): Deleted.
(JSC::CodeBlock::identifier): Deleted.
(JSC::CodeBlock::constants): Deleted.
(JSC::CodeBlock::constantsSourceCodeRepresentation): Deleted.
(JSC::CodeBlock::addConstant): Deleted.
(JSC::CodeBlock::addConstantLazily): Deleted.
(JSC::CodeBlock::constantRegister): Deleted.
(JSC::CodeBlock::isConstantRegisterIndex): Deleted.
(JSC::CodeBlock::getConstant): Deleted.
(JSC::CodeBlock::constantSourceCodeRepresentation): Deleted.
(JSC::CodeBlock::functionDecl): Deleted.
(JSC::CodeBlock::numberOfFunctionDecls): Deleted.
(JSC::CodeBlock::functionExpr): Deleted.
(JSC::CodeBlock::regexp): Deleted.
(JSC::CodeBlock::numberOfConstantBuffers): Deleted.
(JSC::CodeBlock::addConstantBuffer): Deleted.
(JSC::CodeBlock::constantBufferAsVector): Deleted.
(JSC::CodeBlock::constantBuffer): Deleted.
(JSC::CodeBlock::heap): Deleted.
(JSC::CodeBlock::globalObject): Deleted.
(JSC::CodeBlock::livenessAnalysis): Deleted.
(JSC::CodeBlock::numberOfSwitchJumpTables): Deleted.
(JSC::CodeBlock::addSwitchJumpTable): Deleted.
(JSC::CodeBlock::switchJumpTable): Deleted.
(JSC::CodeBlock::clearSwitchJumpTables): Deleted.
(JSC::CodeBlock::numberOfStringSwitchJumpTables): Deleted.
(JSC::CodeBlock::addStringSwitchJumpTable): Deleted.
(JSC::CodeBlock::stringSwitchJumpTable): Deleted.
(JSC::CodeBlock::evalCodeCache): Deleted.
(JSC::CodeBlock::checkIfJITThresholdReached): Deleted.
(JSC::CodeBlock::dontJITAnytimeSoon): Deleted.
(JSC::CodeBlock::llintExecuteCounter): Deleted.
(JSC::CodeBlock::llintGetByIdWatchpointMap): Deleted.
(JSC::CodeBlock::numberOfLLIntBaselineCalleeSaveRegisters): Deleted.
(JSC::CodeBlock::addressOfJITExecuteCounter): Deleted.
(JSC::CodeBlock::offsetOfJITExecuteCounter): Deleted.
(JSC::CodeBlock::offsetOfJITExecutionActiveThreshold): Deleted.
(JSC::CodeBlock::offsetOfJITExecutionTotalCount): Deleted.
(JSC::CodeBlock::jitExecuteCounter): Deleted.
(JSC::CodeBlock::optimizationDelayCounter): Deleted.
(JSC::CodeBlock::osrExitCounter): Deleted.
(JSC::CodeBlock::countOSRExit): Deleted.
(JSC::CodeBlock::addressOfOSRExitCounter): Deleted.
(JSC::CodeBlock::offsetOfOSRExitCounter): Deleted.
(JSC::CodeBlock::calleeSaveRegisters): Deleted.
(JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::optimizeAfterWarmUp): Deleted.
(JSC::CodeBlock::numberOfDFGCompiles): Deleted.
(JSC::CodeBlock::hasDebuggerRequests): Deleted.
(JSC::CodeBlock::debuggerRequestsAddress): Deleted.
(JSC::CodeBlock::removeBreakpoint): Deleted.
(JSC::CodeBlock::clearDebuggerRequests): Deleted.
(JSC::CodeBlock::wasCompiledWithDebuggingOpcodes): Deleted.
(JSC::CodeBlock::clearExceptionHandlers): Deleted.
(JSC::CodeBlock::appendExceptionHandler): Deleted.
(JSC::CodeBlock::tallyFrequentExitSites): Deleted.
(JSC::CodeBlock::replaceConstant): Deleted.
(JSC::CodeBlock::timeSinceCreation): Deleted.
(JSC::CodeBlock::createRareDataIfNecessary): Deleted.
(JSC::GlobalCodeBlock::GlobalCodeBlock): Deleted.
(JSC::ProgramCodeBlock::create): Deleted.
(JSC::ProgramCodeBlock::createStructure): Deleted.
(JSC::ProgramCodeBlock::ProgramCodeBlock): Deleted.
(JSC::ModuleProgramCodeBlock::create): Deleted.
(JSC::ModuleProgramCodeBlock::createStructure): Deleted.
(JSC::ModuleProgramCodeBlock::ModuleProgramCodeBlock): Deleted.
(JSC::EvalCodeBlock::create): Deleted.
(JSC::EvalCodeBlock::createStructure): Deleted.
(JSC::EvalCodeBlock::variable): Deleted.
(JSC::EvalCodeBlock::numVariables): Deleted.
(JSC::EvalCodeBlock::EvalCodeBlock): Deleted.
(JSC::EvalCodeBlock::unlinkedEvalCodeBlock): Deleted.
(JSC::WebAssemblyCodeBlock::create): Deleted.
(JSC::WebAssemblyCodeBlock::createStructure): Deleted.
(JSC::WebAssemblyCodeBlock::WebAssemblyCodeBlock): Deleted.
(JSC::ExecState::r): Deleted.
(JSC::ExecState::uncheckedR): Deleted.
(JSC::CodeBlock::clearVisitWeaklyHasBeenCalled): Deleted.
(JSC::ScriptExecutable::forEachCodeBlock): Deleted.
(JSC::ScriptExecutable::prepareForExecution): Deleted.
* bytecode/GlobalCodeBlock.h: Copied from Source/JavaScriptCore/bytecode/CodeBlock.h.
(): Deleted.
(JSC::CodeBlock::unlinkedCodeBlock): Deleted.
(JSC::CodeBlock::numParameters): Deleted.
(JSC::CodeBlock::numCalleeLocals): Deleted.
(JSC::CodeBlock::addressOfNumParameters): Deleted.
(JSC::CodeBlock::offsetOfNumParameters): Deleted.
(JSC::CodeBlock::alternative): Deleted.
(JSC::CodeBlock::forEachRelatedCodeBlock): Deleted.
(JSC::CodeBlock::specializationKind): Deleted.
(JSC::CodeBlock::isStrictMode): Deleted.
(JSC::CodeBlock::ecmaMode): Deleted.
(JSC::CodeBlock::isKnownNotImmediate): Deleted.
(JSC::CodeBlock::isTemporaryRegisterIndex): Deleted.
(JSC::CodeBlock::stubInfoBegin): Deleted.
(JSC::CodeBlock::stubInfoEnd): Deleted.
(JSC::CodeBlock::callLinkInfosBegin): Deleted.
(JSC::CodeBlock::callLinkInfosEnd): Deleted.
(JSC::CodeBlock::setJITCodeMap): Deleted.
(JSC::CodeBlock::jitCodeMap): Deleted.
(JSC::CodeBlock::bytecodeOffset): Deleted.
(JSC::CodeBlock::numberOfInstructions): Deleted.
(JSC::CodeBlock::instructions): Deleted.
(JSC::CodeBlock::instructionCount): Deleted.
(JSC::CodeBlock::setJITCode): Deleted.
(JSC::CodeBlock::jitCode): Deleted.
(JSC::CodeBlock::jitCodeOffset): Deleted.
(JSC::CodeBlock::jitType): Deleted.
(JSC::CodeBlock::hasBaselineJITProfiling): Deleted.
(JSC::CodeBlock::capabilityLevelState): Deleted.
(JSC::CodeBlock::ownerExecutable): Deleted.
(JSC::CodeBlock::ownerScriptExecutable): Deleted.
(JSC::CodeBlock::vm): Deleted.
(JSC::CodeBlock::setThisRegister): Deleted.
(JSC::CodeBlock::thisRegister): Deleted.
(JSC::CodeBlock::usesEval): Deleted.
(JSC::CodeBlock::setScopeRegister): Deleted.
(JSC::CodeBlock::scopeRegister): Deleted.
(JSC::CodeBlock::codeType): Deleted.
(JSC::CodeBlock::putByIdContext): Deleted.
(JSC::CodeBlock::source): Deleted.
(JSC::CodeBlock::sourceOffset): Deleted.
(JSC::CodeBlock::firstLineColumnOffset): Deleted.
(JSC::CodeBlock::numberOfJumpTargets): Deleted.
(JSC::CodeBlock::jumpTarget): Deleted.
(JSC::CodeBlock::numberOfArgumentValueProfiles): Deleted.
(JSC::CodeBlock::valueProfileForArgument): Deleted.
(JSC::CodeBlock::numberOfValueProfiles): Deleted.
(JSC::CodeBlock::valueProfile): Deleted.
(JSC::CodeBlock::valueProfilePredictionForBytecodeOffset): Deleted.
(JSC::CodeBlock::totalNumberOfValueProfiles): Deleted.
(JSC::CodeBlock::getFromAllValueProfiles): Deleted.
(JSC::CodeBlock::numberOfRareCaseProfiles): Deleted.
(JSC::CodeBlock::likelyToTakeSlowCase): Deleted.
(JSC::CodeBlock::couldTakeSlowCase): Deleted.
(JSC::CodeBlock::numberOfArrayProfiles): Deleted.
(JSC::CodeBlock::arrayProfiles): Deleted.
(JSC::CodeBlock::numberOfExceptionHandlers): Deleted.
(JSC::CodeBlock::exceptionHandler): Deleted.
(JSC::CodeBlock::hasExpressionInfo): Deleted.
(JSC::CodeBlock::hasCodeOrigins): Deleted.
(JSC::CodeBlock::canGetCodeOrigin): Deleted.
(JSC::CodeBlock::codeOrigin): Deleted.
(JSC::CodeBlock::addFrequentExitSite): Deleted.
(JSC::CodeBlock::hasExitSite): Deleted.
(JSC::CodeBlock::exitProfile): Deleted.
(JSC::CodeBlock::lazyOperandValueProfiles): Deleted.
(JSC::CodeBlock::numberOfIdentifiers): Deleted.
(JSC::CodeBlock::identifier): Deleted.
(JSC::CodeBlock::constants): Deleted.
(JSC::CodeBlock::constantsSourceCodeRepresentation): Deleted.
(JSC::CodeBlock::addConstant): Deleted.
(JSC::CodeBlock::addConstantLazily): Deleted.
(JSC::CodeBlock::constantRegister): Deleted.
(JSC::CodeBlock::isConstantRegisterIndex): Deleted.
(JSC::CodeBlock::getConstant): Deleted.
(JSC::CodeBlock::constantSourceCodeRepresentation): Deleted.
(JSC::CodeBlock::functionDecl): Deleted.
(JSC::CodeBlock::numberOfFunctionDecls): Deleted.
(JSC::CodeBlock::functionExpr): Deleted.
(JSC::CodeBlock::regexp): Deleted.
(JSC::CodeBlock::numberOfConstantBuffers): Deleted.
(JSC::CodeBlock::addConstantBuffer): Deleted.
(JSC::CodeBlock::constantBufferAsVector): Deleted.
(JSC::CodeBlock::constantBuffer): Deleted.
(JSC::CodeBlock::heap): Deleted.
(JSC::CodeBlock::globalObject): Deleted.
(JSC::CodeBlock::livenessAnalysis): Deleted.
(JSC::CodeBlock::numberOfSwitchJumpTables): Deleted.
(JSC::CodeBlock::addSwitchJumpTable): Deleted.
(JSC::CodeBlock::switchJumpTable): Deleted.
(JSC::CodeBlock::clearSwitchJumpTables): Deleted.
(JSC::CodeBlock::numberOfStringSwitchJumpTables): Deleted.
(JSC::CodeBlock::addStringSwitchJumpTable): Deleted.
(JSC::CodeBlock::stringSwitchJumpTable): Deleted.
(JSC::CodeBlock::evalCodeCache): Deleted.
(JSC::CodeBlock::checkIfJITThresholdReached): Deleted.
(JSC::CodeBlock::dontJITAnytimeSoon): Deleted.
(JSC::CodeBlock::llintExecuteCounter): Deleted.
(JSC::CodeBlock::llintGetByIdWatchpointMap): Deleted.
(JSC::CodeBlock::numberOfLLIntBaselineCalleeSaveRegisters): Deleted.
(JSC::CodeBlock::addressOfJITExecuteCounter): Deleted.
(JSC::CodeBlock::offsetOfJITExecuteCounter): Deleted.
(JSC::CodeBlock::offsetOfJITExecutionActiveThreshold): Deleted.
(JSC::CodeBlock::offsetOfJITExecutionTotalCount): Deleted.
(JSC::CodeBlock::jitExecuteCounter): Deleted.
(JSC::CodeBlock::optimizationDelayCounter): Deleted.
(JSC::CodeBlock::osrExitCounter): Deleted.
(JSC::CodeBlock::countOSRExit): Deleted.
(JSC::CodeBlock::addressOfOSRExitCounter): Deleted.
(JSC::CodeBlock::offsetOfOSRExitCounter): Deleted.
(JSC::CodeBlock::calleeSaveRegisters): Deleted.
(JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::optimizeAfterWarmUp): Deleted.
(JSC::CodeBlock::numberOfDFGCompiles): Deleted.
(JSC::CodeBlock::hasDebuggerRequests): Deleted.
(JSC::CodeBlock::debuggerRequestsAddress): Deleted.
(JSC::CodeBlock::removeBreakpoint): Deleted.
(JSC::CodeBlock::clearDebuggerRequests): Deleted.
(JSC::CodeBlock::wasCompiledWithDebuggingOpcodes): Deleted.
(JSC::CodeBlock::clearExceptionHandlers): Deleted.
(JSC::CodeBlock::appendExceptionHandler): Deleted.
(JSC::CodeBlock::tallyFrequentExitSites): Deleted.
(JSC::CodeBlock::replaceConstant): Deleted.
(JSC::CodeBlock::timeSinceCreation): Deleted.
(JSC::CodeBlock::createRareDataIfNecessary): Deleted.
(JSC::ProgramCodeBlock::create): Deleted.
(JSC::ProgramCodeBlock::createStructure): Deleted.
(JSC::ProgramCodeBlock::ProgramCodeBlock): Deleted.
(JSC::ModuleProgramCodeBlock::create): Deleted.
(JSC::ModuleProgramCodeBlock::createStructure): Deleted.
(JSC::ModuleProgramCodeBlock::ModuleProgramCodeBlock): Deleted.
(JSC::EvalCodeBlock::create): Deleted.
(JSC::EvalCodeBlock::createStructure): Deleted.
(JSC::EvalCodeBlock::variable): Deleted.
(JSC::EvalCodeBlock::numVariables): Deleted.
(JSC::EvalCodeBlock::EvalCodeBlock): Deleted.
(JSC::EvalCodeBlock::unlinkedEvalCodeBlock): Deleted.
(JSC::FunctionCodeBlock::create): Deleted.
(JSC::FunctionCodeBlock::createStructure): Deleted.
(JSC::FunctionCodeBlock::FunctionCodeBlock): Deleted.
(JSC::WebAssemblyCodeBlock::create): Deleted.
(JSC::WebAssemblyCodeBlock::createStructure): Deleted.
(JSC::WebAssemblyCodeBlock::WebAssemblyCodeBlock): Deleted.
(JSC::ExecState::r): Deleted.
(JSC::ExecState::uncheckedR): Deleted.
(JSC::CodeBlock::clearVisitWeaklyHasBeenCalled): Deleted.
(JSC::ScriptExecutable::forEachCodeBlock): Deleted.
(JSC::ScriptExecutable::prepareForExecution): Deleted.
* bytecode/ModuleProgramCodeBlock.cpp: Copied from Source/JavaScriptCore/bytecode/CodeBlock.cpp.
(JSC::FunctionCodeBlock::destroy): Deleted.
(JSC::WebAssemblyCodeBlock::destroy): Deleted.
(JSC::ProgramCodeBlock::destroy): Deleted.
(JSC::EvalCodeBlock::destroy): Deleted.
(JSC::CodeBlock::inferredName): Deleted.
(JSC::CodeBlock::hasHash): Deleted.
(JSC::CodeBlock::isSafeToComputeHash): Deleted.
(JSC::CodeBlock::hash): Deleted.
(JSC::CodeBlock::sourceCodeForTools): Deleted.
(JSC::CodeBlock::sourceCodeOnOneLine): Deleted.
(JSC::CodeBlock::hashAsStringIfPossible): Deleted.
(JSC::CodeBlock::dumpAssumingJITType): Deleted.
(JSC::CodeBlock::dump): Deleted.
(JSC::idName): Deleted.
(JSC::CodeBlock::registerName): Deleted.
(JSC::CodeBlock::constantName): Deleted.
(JSC::regexpToSourceString): Deleted.
(JSC::regexpName): Deleted.
(JSC::debugHookName): Deleted.
(JSC::CodeBlock::printUnaryOp): Deleted.
(JSC::CodeBlock::printBinaryOp): Deleted.
(JSC::CodeBlock::printConditionalJump): Deleted.
(JSC::CodeBlock::printGetByIdOp): Deleted.
(JSC::dumpStructure): Deleted.
(JSC::dumpChain): Deleted.
(JSC::CodeBlock::printGetByIdCacheStatus): Deleted.
(JSC::CodeBlock::printPutByIdCacheStatus): Deleted.
(JSC::CodeBlock::printCallOp): Deleted.
(JSC::CodeBlock::printPutByIdOp): Deleted.
(JSC::CodeBlock::dumpSource): Deleted.
(JSC::CodeBlock::dumpBytecode): Deleted.
(JSC::CodeBlock::dumpExceptionHandlers): Deleted.
(JSC::CodeBlock::beginDumpProfiling): Deleted.
(JSC::CodeBlock::dumpValueProfiling): Deleted.
(JSC::CodeBlock::dumpArrayProfiling): Deleted.
(JSC::CodeBlock::dumpRareCaseProfile): Deleted.
(JSC::CodeBlock::dumpArithProfile): Deleted.
(JSC::CodeBlock::printLocationAndOp): Deleted.
(JSC::CodeBlock::printLocationOpAndRegisterOperand): Deleted.
(JSC::sizeInBytes): Deleted.
(JSC::CodeBlock::CodeBlock): Deleted.
(JSC::CodeBlock::finishCreation): Deleted.
(JSC::CodeBlock::~CodeBlock): Deleted.
(JSC::CodeBlock::setConstantRegisters): Deleted.
(JSC::CodeBlock::setAlternative): Deleted.
(JSC::CodeBlock::setNumParameters): Deleted.
(JSC::EvalCodeCache::visitAggregate): Deleted.
(JSC::CodeBlock::specialOSREntryBlockOrNull): Deleted.
(JSC::CodeBlock::visitWeakly): Deleted.
(JSC::CodeBlock::estimatedSize): Deleted.
(JSC::CodeBlock::visitChildren): Deleted.
(JSC::CodeBlock::shouldVisitStrongly): Deleted.
(JSC::CodeBlock::shouldJettisonDueToWeakReference): Deleted.
(JSC::timeToLive): Deleted.
(JSC::CodeBlock::shouldJettisonDueToOldAge): Deleted.
(JSC::shouldMarkTransition): Deleted.
(JSC::CodeBlock::propagateTransitions): Deleted.
(JSC::CodeBlock::determineLiveness): Deleted.
(JSC::CodeBlock::WeakReferenceHarvester::visitWeakReferences): Deleted.
(JSC::CodeBlock::clearLLIntGetByIdCache): Deleted.
(JSC::CodeBlock::finalizeLLIntInlineCaches): Deleted.
(JSC::CodeBlock::finalizeBaselineJITInlineCaches): Deleted.
(JSC::CodeBlock::UnconditionalFinalizer::finalizeUnconditionally): Deleted.
(JSC::CodeBlock::getStubInfoMap): Deleted.
(JSC::CodeBlock::getCallLinkInfoMap): Deleted.
(JSC::CodeBlock::getByValInfoMap): Deleted.
(JSC::CodeBlock::addStubInfo): Deleted.
(JSC::CodeBlock::addJITAddIC): Deleted.
(JSC::CodeBlock::addJITMulIC): Deleted.
(JSC::CodeBlock::addJITSubIC): Deleted.
(JSC::CodeBlock::addJITNegIC): Deleted.
(JSC::CodeBlock::findStubInfo): Deleted.
(JSC::CodeBlock::addByValInfo): Deleted.
(JSC::CodeBlock::addCallLinkInfo): Deleted.
(JSC::CodeBlock::getCallLinkInfoForBytecodeIndex): Deleted.
(JSC::CodeBlock::resetJITData): Deleted.
(JSC::CodeBlock::visitOSRExitTargets): Deleted.
(JSC::CodeBlock::stronglyVisitStrongReferences): Deleted.
(JSC::CodeBlock::stronglyVisitWeakReferences): Deleted.
(JSC::CodeBlock::baselineAlternative): Deleted.
(JSC::CodeBlock::baselineVersion): Deleted.
(JSC::CodeBlock::hasOptimizedReplacement): Deleted.
(JSC::CodeBlock::handlerForBytecodeOffset): Deleted.
(JSC::CodeBlock::handlerForIndex): Deleted.
(JSC::CodeBlock::newExceptionHandlingCallSiteIndex): Deleted.
(JSC::CodeBlock::removeExceptionHandlerForCallSite): Deleted.
(JSC::CodeBlock::lineNumberForBytecodeOffset): Deleted.
(JSC::CodeBlock::columnNumberForBytecodeOffset): Deleted.
(JSC::CodeBlock::expressionRangeForBytecodeOffset): Deleted.
(JSC::CodeBlock::hasOpDebugForLineAndColumn): Deleted.
(JSC::CodeBlock::shrinkToFit): Deleted.
(JSC::CodeBlock::linkIncomingCall): Deleted.
(JSC::CodeBlock::linkIncomingPolymorphicCall): Deleted.
(JSC::CodeBlock::unlinkIncomingCalls): Deleted.
(JSC::CodeBlock::newReplacement): Deleted.
(JSC::CodeBlock::replacement): Deleted.
(JSC::CodeBlock::computeCapabilityLevel): Deleted.
(JSC::CodeBlock::jettison): Deleted.
(JSC::CodeBlock::globalObjectFor): Deleted.
(JSC::RecursionCheckFunctor::RecursionCheckFunctor): Deleted.
(JSC::RecursionCheckFunctor::operator()): Deleted.
(JSC::RecursionCheckFunctor::didRecurse): Deleted.
(JSC::CodeBlock::noticeIncomingCall): Deleted.
(JSC::CodeBlock::reoptimizationRetryCounter): Deleted.
(JSC::CodeBlock::setCalleeSaveRegisters): Deleted.
(JSC::roundCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::calleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::countReoptimization): Deleted.
(JSC::CodeBlock::numberOfDFGCompiles): Deleted.
(JSC::CodeBlock::codeTypeThresholdMultiplier): Deleted.
(JSC::CodeBlock::optimizationThresholdScalingFactor): Deleted.
(JSC::clipThreshold): Deleted.
(JSC::CodeBlock::adjustedCounterValue): Deleted.
(JSC::CodeBlock::checkIfOptimizationThresholdReached): Deleted.
(JSC::CodeBlock::optimizeNextInvocation): Deleted.
(JSC::CodeBlock::dontOptimizeAnytimeSoon): Deleted.
(JSC::CodeBlock::optimizeAfterWarmUp): Deleted.
(JSC::CodeBlock::optimizeAfterLongWarmUp): Deleted.
(JSC::CodeBlock::optimizeSoon): Deleted.
(JSC::CodeBlock::forceOptimizationSlowPathConcurrently): Deleted.
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult): Deleted.
(JSC::CodeBlock::adjustedExitCountThreshold): Deleted.
(JSC::CodeBlock::exitCountThresholdForReoptimization): Deleted.
(JSC::CodeBlock::exitCountThresholdForReoptimizationFromLoop): Deleted.
(JSC::CodeBlock::shouldReoptimizeNow): Deleted.
(JSC::CodeBlock::shouldReoptimizeFromLoopNow): Deleted.
(JSC::CodeBlock::getArrayProfile): Deleted.
(JSC::CodeBlock::addArrayProfile): Deleted.
(JSC::CodeBlock::getOrAddArrayProfile): Deleted.
(JSC::CodeBlock::codeOrigins): Deleted.
(JSC::CodeBlock::numberOfDFGIdentifiers): Deleted.
(JSC::CodeBlock::identifier): Deleted.
(JSC::CodeBlock::updateAllPredictionsAndCountLiveness): Deleted.
(JSC::CodeBlock::updateAllValueProfilePredictions): Deleted.
(JSC::CodeBlock::updateAllArrayPredictions): Deleted.
(JSC::CodeBlock::updateAllPredictions): Deleted.
(JSC::CodeBlock::shouldOptimizeNow): Deleted.
(JSC::CodeBlock::tallyFrequentExitSites): Deleted.
(JSC::CodeBlock::dumpValueProfiles): Deleted.
(JSC::CodeBlock::frameRegisterCount): Deleted.
(JSC::CodeBlock::stackPointerOffset): Deleted.
(JSC::CodeBlock::predictedMachineCodeSize): Deleted.
(JSC::CodeBlock::usesOpcode): Deleted.
(JSC::CodeBlock::nameForRegister): Deleted.
(JSC::CodeBlock::valueProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::validate): Deleted.
(JSC::CodeBlock::beginValidationDidFail): Deleted.
(JSC::CodeBlock::endValidationDidFail): Deleted.
(JSC::CodeBlock::addBreakpoint): Deleted.
(JSC::CodeBlock::setSteppingMode): Deleted.
(JSC::CodeBlock::addRareCaseProfile): Deleted.
(JSC::CodeBlock::rareCaseProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::rareCaseProfileCountForBytecodeOffset): Deleted.
(JSC::CodeBlock::arithProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::arithProfileForPC): Deleted.
(JSC::CodeBlock::couldTakeSpecialFastCase): Deleted.
(JSC::CodeBlock::capabilityLevel): Deleted.
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler): Deleted.
(JSC::CodeBlock::setPCToCodeOriginMap): Deleted.
(JSC::CodeBlock::findPC): Deleted.
(JSC::CodeBlock::bytecodeOffsetFromCallSiteIndex): Deleted.
(JSC::CodeBlock::thresholdForJIT): Deleted.
(JSC::CodeBlock::jitAfterWarmUp): Deleted.
(JSC::CodeBlock::jitSoon): Deleted.
(JSC::CodeBlock::dumpMathICStats): Deleted.
(JSC::CodeBlock::livenessAnalysisSlow): Deleted.
* bytecode/ModuleProgramCodeBlock.h: Copied from Source/JavaScriptCore/bytecode/CodeBlock.h.
(): Deleted.
(JSC::CodeBlock::unlinkedCodeBlock): Deleted.
(JSC::CodeBlock::numParameters): Deleted.
(JSC::CodeBlock::numCalleeLocals): Deleted.
(JSC::CodeBlock::addressOfNumParameters): Deleted.
(JSC::CodeBlock::offsetOfNumParameters): Deleted.
(JSC::CodeBlock::alternative): Deleted.
(JSC::CodeBlock::forEachRelatedCodeBlock): Deleted.
(JSC::CodeBlock::specializationKind): Deleted.
(JSC::CodeBlock::isStrictMode): Deleted.
(JSC::CodeBlock::ecmaMode): Deleted.
(JSC::CodeBlock::isKnownNotImmediate): Deleted.
(JSC::CodeBlock::isTemporaryRegisterIndex): Deleted.
(JSC::CodeBlock::stubInfoBegin): Deleted.
(JSC::CodeBlock::stubInfoEnd): Deleted.
(JSC::CodeBlock::callLinkInfosBegin): Deleted.
(JSC::CodeBlock::callLinkInfosEnd): Deleted.
(JSC::CodeBlock::setJITCodeMap): Deleted.
(JSC::CodeBlock::jitCodeMap): Deleted.
(JSC::CodeBlock::bytecodeOffset): Deleted.
(JSC::CodeBlock::numberOfInstructions): Deleted.
(JSC::CodeBlock::instructions): Deleted.
(JSC::CodeBlock::instructionCount): Deleted.
(JSC::CodeBlock::setJITCode): Deleted.
(JSC::CodeBlock::jitCode): Deleted.
(JSC::CodeBlock::jitCodeOffset): Deleted.
(JSC::CodeBlock::jitType): Deleted.
(JSC::CodeBlock::hasBaselineJITProfiling): Deleted.
(JSC::CodeBlock::capabilityLevelState): Deleted.
(JSC::CodeBlock::ownerExecutable): Deleted.
(JSC::CodeBlock::ownerScriptExecutable): Deleted.
(JSC::CodeBlock::vm): Deleted.
(JSC::CodeBlock::setThisRegister): Deleted.
(JSC::CodeBlock::thisRegister): Deleted.
(JSC::CodeBlock::usesEval): Deleted.
(JSC::CodeBlock::setScopeRegister): Deleted.
(JSC::CodeBlock::scopeRegister): Deleted.
(JSC::CodeBlock::codeType): Deleted.
(JSC::CodeBlock::putByIdContext): Deleted.
(JSC::CodeBlock::source): Deleted.
(JSC::CodeBlock::sourceOffset): Deleted.
(JSC::CodeBlock::firstLineColumnOffset): Deleted.
(JSC::CodeBlock::numberOfJumpTargets): Deleted.
(JSC::CodeBlock::jumpTarget): Deleted.
(JSC::CodeBlock::numberOfArgumentValueProfiles): Deleted.
(JSC::CodeBlock::valueProfileForArgument): Deleted.
(JSC::CodeBlock::numberOfValueProfiles): Deleted.
(JSC::CodeBlock::valueProfile): Deleted.
(JSC::CodeBlock::valueProfilePredictionForBytecodeOffset): Deleted.
(JSC::CodeBlock::totalNumberOfValueProfiles): Deleted.
(JSC::CodeBlock::getFromAllValueProfiles): Deleted.
(JSC::CodeBlock::numberOfRareCaseProfiles): Deleted.
(JSC::CodeBlock::likelyToTakeSlowCase): Deleted.
(JSC::CodeBlock::couldTakeSlowCase): Deleted.
(JSC::CodeBlock::numberOfArrayProfiles): Deleted.
(JSC::CodeBlock::arrayProfiles): Deleted.
(JSC::CodeBlock::numberOfExceptionHandlers): Deleted.
(JSC::CodeBlock::exceptionHandler): Deleted.
(JSC::CodeBlock::hasExpressionInfo): Deleted.
(JSC::CodeBlock::hasCodeOrigins): Deleted.
(JSC::CodeBlock::canGetCodeOrigin): Deleted.
(JSC::CodeBlock::codeOrigin): Deleted.
(JSC::CodeBlock::addFrequentExitSite): Deleted.
(JSC::CodeBlock::hasExitSite): Deleted.
(JSC::CodeBlock::exitProfile): Deleted.
(JSC::CodeBlock::lazyOperandValueProfiles): Deleted.
(JSC::CodeBlock::numberOfIdentifiers): Deleted.
(JSC::CodeBlock::identifier): Deleted.
(JSC::CodeBlock::constants): Deleted.
(JSC::CodeBlock::constantsSourceCodeRepresentation): Deleted.
(JSC::CodeBlock::addConstant): Deleted.
(JSC::CodeBlock::addConstantLazily): Deleted.
(JSC::CodeBlock::constantRegister): Deleted.
(JSC::CodeBlock::isConstantRegisterIndex): Deleted.
(JSC::CodeBlock::getConstant): Deleted.
(JSC::CodeBlock::constantSourceCodeRepresentation): Deleted.
(JSC::CodeBlock::functionDecl): Deleted.
(JSC::CodeBlock::numberOfFunctionDecls): Deleted.
(JSC::CodeBlock::functionExpr): Deleted.
(JSC::CodeBlock::regexp): Deleted.
(JSC::CodeBlock::numberOfConstantBuffers): Deleted.
(JSC::CodeBlock::addConstantBuffer): Deleted.
(JSC::CodeBlock::constantBufferAsVector): Deleted.
(JSC::CodeBlock::constantBuffer): Deleted.
(JSC::CodeBlock::heap): Deleted.
(JSC::CodeBlock::globalObject): Deleted.
(JSC::CodeBlock::livenessAnalysis): Deleted.
(JSC::CodeBlock::numberOfSwitchJumpTables): Deleted.
(JSC::CodeBlock::addSwitchJumpTable): Deleted.
(JSC::CodeBlock::switchJumpTable): Deleted.
(JSC::CodeBlock::clearSwitchJumpTables): Deleted.
(JSC::CodeBlock::numberOfStringSwitchJumpTables): Deleted.
(JSC::CodeBlock::addStringSwitchJumpTable): Deleted.
(JSC::CodeBlock::stringSwitchJumpTable): Deleted.
(JSC::CodeBlock::evalCodeCache): Deleted.
(JSC::CodeBlock::checkIfJITThresholdReached): Deleted.
(JSC::CodeBlock::dontJITAnytimeSoon): Deleted.
(JSC::CodeBlock::llintExecuteCounter): Deleted.
(JSC::CodeBlock::llintGetByIdWatchpointMap): Deleted.
(JSC::CodeBlock::numberOfLLIntBaselineCalleeSaveRegisters): Deleted.
(JSC::CodeBlock::addressOfJITExecuteCounter): Deleted.
(JSC::CodeBlock::offsetOfJITExecuteCounter): Deleted.
(JSC::CodeBlock::offsetOfJITExecutionActiveThreshold): Deleted.
(JSC::CodeBlock::offsetOfJITExecutionTotalCount): Deleted.
(JSC::CodeBlock::jitExecuteCounter): Deleted.
(JSC::CodeBlock::optimizationDelayCounter): Deleted.
(JSC::CodeBlock::osrExitCounter): Deleted.
(JSC::CodeBlock::countOSRExit): Deleted.
(JSC::CodeBlock::addressOfOSRExitCounter): Deleted.
(JSC::CodeBlock::offsetOfOSRExitCounter): Deleted.
(JSC::CodeBlock::calleeSaveRegisters): Deleted.
(JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::optimizeAfterWarmUp): Deleted.
(JSC::CodeBlock::numberOfDFGCompiles): Deleted.
(JSC::CodeBlock::hasDebuggerRequests): Deleted.
(JSC::CodeBlock::debuggerRequestsAddress): Deleted.
(JSC::CodeBlock::removeBreakpoint): Deleted.
(JSC::CodeBlock::clearDebuggerRequests): Deleted.
(JSC::CodeBlock::wasCompiledWithDebuggingOpcodes): Deleted.
(JSC::CodeBlock::clearExceptionHandlers): Deleted.
(JSC::CodeBlock::appendExceptionHandler): Deleted.
(JSC::CodeBlock::tallyFrequentExitSites): Deleted.
(JSC::CodeBlock::replaceConstant): Deleted.
(JSC::CodeBlock::timeSinceCreation): Deleted.
(JSC::CodeBlock::createRareDataIfNecessary): Deleted.
(JSC::GlobalCodeBlock::GlobalCodeBlock): Deleted.
(JSC::ProgramCodeBlock::create): Deleted.
(JSC::ProgramCodeBlock::createStructure): Deleted.
(JSC::ProgramCodeBlock::ProgramCodeBlock): Deleted.
(JSC::EvalCodeBlock::create): Deleted.
(JSC::EvalCodeBlock::createStructure): Deleted.
(JSC::EvalCodeBlock::variable): Deleted.
(JSC::EvalCodeBlock::numVariables): Deleted.
(JSC::EvalCodeBlock::EvalCodeBlock): Deleted.
(JSC::EvalCodeBlock::unlinkedEvalCodeBlock): Deleted.
(JSC::FunctionCodeBlock::create): Deleted.
(JSC::FunctionCodeBlock::createStructure): Deleted.
(JSC::FunctionCodeBlock::FunctionCodeBlock): Deleted.
(JSC::WebAssemblyCodeBlock::create): Deleted.
(JSC::WebAssemblyCodeBlock::createStructure): Deleted.
(JSC::WebAssemblyCodeBlock::WebAssemblyCodeBlock): Deleted.
(JSC::ExecState::r): Deleted.
(JSC::ExecState::uncheckedR): Deleted.
(JSC::CodeBlock::clearVisitWeaklyHasBeenCalled): Deleted.
(JSC::ScriptExecutable::forEachCodeBlock): Deleted.
(JSC::ScriptExecutable::prepareForExecution): Deleted.
* bytecode/ProgramCodeBlock.cpp: Copied from Source/JavaScriptCore/bytecode/CodeBlock.cpp.
(JSC::FunctionCodeBlock::destroy): Deleted.
(JSC::WebAssemblyCodeBlock::destroy): Deleted.
(JSC::ModuleProgramCodeBlock::destroy): Deleted.
(JSC::EvalCodeBlock::destroy): Deleted.
(JSC::CodeBlock::inferredName): Deleted.
(JSC::CodeBlock::hasHash): Deleted.
(JSC::CodeBlock::isSafeToComputeHash): Deleted.
(JSC::CodeBlock::hash): Deleted.
(JSC::CodeBlock::sourceCodeForTools): Deleted.
(JSC::CodeBlock::sourceCodeOnOneLine): Deleted.
(JSC::CodeBlock::hashAsStringIfPossible): Deleted.
(JSC::CodeBlock::dumpAssumingJITType): Deleted.
(JSC::CodeBlock::dump): Deleted.
(JSC::idName): Deleted.
(JSC::CodeBlock::registerName): Deleted.
(JSC::CodeBlock::constantName): Deleted.
(JSC::regexpToSourceString): Deleted.
(JSC::regexpName): Deleted.
(JSC::debugHookName): Deleted.
(JSC::CodeBlock::printUnaryOp): Deleted.
(JSC::CodeBlock::printBinaryOp): Deleted.
(JSC::CodeBlock::printConditionalJump): Deleted.
(JSC::CodeBlock::printGetByIdOp): Deleted.
(JSC::dumpStructure): Deleted.
(JSC::dumpChain): Deleted.
(JSC::CodeBlock::printGetByIdCacheStatus): Deleted.
(JSC::CodeBlock::printPutByIdCacheStatus): Deleted.
(JSC::CodeBlock::printCallOp): Deleted.
(JSC::CodeBlock::printPutByIdOp): Deleted.
(JSC::CodeBlock::dumpSource): Deleted.
(JSC::CodeBlock::dumpBytecode): Deleted.
(JSC::CodeBlock::dumpExceptionHandlers): Deleted.
(JSC::CodeBlock::beginDumpProfiling): Deleted.
(JSC::CodeBlock::dumpValueProfiling): Deleted.
(JSC::CodeBlock::dumpArrayProfiling): Deleted.
(JSC::CodeBlock::dumpRareCaseProfile): Deleted.
(JSC::CodeBlock::dumpArithProfile): Deleted.
(JSC::CodeBlock::printLocationAndOp): Deleted.
(JSC::CodeBlock::printLocationOpAndRegisterOperand): Deleted.
(JSC::sizeInBytes): Deleted.
(JSC::CodeBlock::CodeBlock): Deleted.
(JSC::CodeBlock::finishCreation): Deleted.
(JSC::CodeBlock::~CodeBlock): Deleted.
(JSC::CodeBlock::setConstantRegisters): Deleted.
(JSC::CodeBlock::setAlternative): Deleted.
(JSC::CodeBlock::setNumParameters): Deleted.
(JSC::EvalCodeCache::visitAggregate): Deleted.
(JSC::CodeBlock::specialOSREntryBlockOrNull): Deleted.
(JSC::CodeBlock::visitWeakly): Deleted.
(JSC::CodeBlock::estimatedSize): Deleted.
(JSC::CodeBlock::visitChildren): Deleted.
(JSC::CodeBlock::shouldVisitStrongly): Deleted.
(JSC::CodeBlock::shouldJettisonDueToWeakReference): Deleted.
(JSC::timeToLive): Deleted.
(JSC::CodeBlock::shouldJettisonDueToOldAge): Deleted.
(JSC::shouldMarkTransition): Deleted.
(JSC::CodeBlock::propagateTransitions): Deleted.
(JSC::CodeBlock::determineLiveness): Deleted.
(JSC::CodeBlock::WeakReferenceHarvester::visitWeakReferences): Deleted.
(JSC::CodeBlock::clearLLIntGetByIdCache): Deleted.
(JSC::CodeBlock::finalizeLLIntInlineCaches): Deleted.
(JSC::CodeBlock::finalizeBaselineJITInlineCaches): Deleted.
(JSC::CodeBlock::UnconditionalFinalizer::finalizeUnconditionally): Deleted.
(JSC::CodeBlock::getStubInfoMap): Deleted.
(JSC::CodeBlock::getCallLinkInfoMap): Deleted.
(JSC::CodeBlock::getByValInfoMap): Deleted.
(JSC::CodeBlock::addStubInfo): Deleted.
(JSC::CodeBlock::addJITAddIC): Deleted.
(JSC::CodeBlock::addJITMulIC): Deleted.
(JSC::CodeBlock::addJITSubIC): Deleted.
(JSC::CodeBlock::addJITNegIC): Deleted.
(JSC::CodeBlock::findStubInfo): Deleted.
(JSC::CodeBlock::addByValInfo): Deleted.
(JSC::CodeBlock::addCallLinkInfo): Deleted.
(JSC::CodeBlock::getCallLinkInfoForBytecodeIndex): Deleted.
(JSC::CodeBlock::resetJITData): Deleted.
(JSC::CodeBlock::visitOSRExitTargets): Deleted.
(JSC::CodeBlock::stronglyVisitStrongReferences): Deleted.
(JSC::CodeBlock::stronglyVisitWeakReferences): Deleted.
(JSC::CodeBlock::baselineAlternative): Deleted.
(JSC::CodeBlock::baselineVersion): Deleted.
(JSC::CodeBlock::hasOptimizedReplacement): Deleted.
(JSC::CodeBlock::handlerForBytecodeOffset): Deleted.
(JSC::CodeBlock::handlerForIndex): Deleted.
(JSC::CodeBlock::newExceptionHandlingCallSiteIndex): Deleted.
(JSC::CodeBlock::removeExceptionHandlerForCallSite): Deleted.
(JSC::CodeBlock::lineNumberForBytecodeOffset): Deleted.
(JSC::CodeBlock::columnNumberForBytecodeOffset): Deleted.
(JSC::CodeBlock::expressionRangeForBytecodeOffset): Deleted.
(JSC::CodeBlock::hasOpDebugForLineAndColumn): Deleted.
(JSC::CodeBlock::shrinkToFit): Deleted.
(JSC::CodeBlock::linkIncomingCall): Deleted.
(JSC::CodeBlock::linkIncomingPolymorphicCall): Deleted.
(JSC::CodeBlock::unlinkIncomingCalls): Deleted.
(JSC::CodeBlock::newReplacement): Deleted.
(JSC::CodeBlock::replacement): Deleted.
(JSC::CodeBlock::computeCapabilityLevel): Deleted.
(JSC::CodeBlock::jettison): Deleted.
(JSC::CodeBlock::globalObjectFor): Deleted.
(JSC::RecursionCheckFunctor::RecursionCheckFunctor): Deleted.
(JSC::RecursionCheckFunctor::operator()): Deleted.
(JSC::RecursionCheckFunctor::didRecurse): Deleted.
(JSC::CodeBlock::noticeIncomingCall): Deleted.
(JSC::CodeBlock::reoptimizationRetryCounter): Deleted.
(JSC::CodeBlock::setCalleeSaveRegisters): Deleted.
(JSC::roundCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::calleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::countReoptimization): Deleted.
(JSC::CodeBlock::numberOfDFGCompiles): Deleted.
(JSC::CodeBlock::codeTypeThresholdMultiplier): Deleted.
(JSC::CodeBlock::optimizationThresholdScalingFactor): Deleted.
(JSC::clipThreshold): Deleted.
(JSC::CodeBlock::adjustedCounterValue): Deleted.
(JSC::CodeBlock::checkIfOptimizationThresholdReached): Deleted.
(JSC::CodeBlock::optimizeNextInvocation): Deleted.
(JSC::CodeBlock::dontOptimizeAnytimeSoon): Deleted.
(JSC::CodeBlock::optimizeAfterWarmUp): Deleted.
(JSC::CodeBlock::optimizeAfterLongWarmUp): Deleted.
(JSC::CodeBlock::optimizeSoon): Deleted.
(JSC::CodeBlock::forceOptimizationSlowPathConcurrently): Deleted.
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult): Deleted.
(JSC::CodeBlock::adjustedExitCountThreshold): Deleted.
(JSC::CodeBlock::exitCountThresholdForReoptimization): Deleted.
(JSC::CodeBlock::exitCountThresholdForReoptimizationFromLoop): Deleted.
(JSC::CodeBlock::shouldReoptimizeNow): Deleted.
(JSC::CodeBlock::shouldReoptimizeFromLoopNow): Deleted.
(JSC::CodeBlock::getArrayProfile): Deleted.
(JSC::CodeBlock::addArrayProfile): Deleted.
(JSC::CodeBlock::getOrAddArrayProfile): Deleted.
(JSC::CodeBlock::codeOrigins): Deleted.
(JSC::CodeBlock::numberOfDFGIdentifiers): Deleted.
(JSC::CodeBlock::identifier): Deleted.
(JSC::CodeBlock::updateAllPredictionsAndCountLiveness): Deleted.
(JSC::CodeBlock::updateAllValueProfilePredictions): Deleted.
(JSC::CodeBlock::updateAllArrayPredictions): Deleted.
(JSC::CodeBlock::updateAllPredictions): Deleted.
(JSC::CodeBlock::shouldOptimizeNow): Deleted.
(JSC::CodeBlock::tallyFrequentExitSites): Deleted.
(JSC::CodeBlock::dumpValueProfiles): Deleted.
(JSC::CodeBlock::frameRegisterCount): Deleted.
(JSC::CodeBlock::stackPointerOffset): Deleted.
(JSC::CodeBlock::predictedMachineCodeSize): Deleted.
(JSC::CodeBlock::usesOpcode): Deleted.
(JSC::CodeBlock::nameForRegister): Deleted.
(JSC::CodeBlock::valueProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::validate): Deleted.
(JSC::CodeBlock::beginValidationDidFail): Deleted.
(JSC::CodeBlock::endValidationDidFail): Deleted.
(JSC::CodeBlock::addBreakpoint): Deleted.
(JSC::CodeBlock::setSteppingMode): Deleted.
(JSC::CodeBlock::addRareCaseProfile): Deleted.
(JSC::CodeBlock::rareCaseProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::rareCaseProfileCountForBytecodeOffset): Deleted.
(JSC::CodeBlock::arithProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::arithProfileForPC): Deleted.
(JSC::CodeBlock::couldTakeSpecialFastCase): Deleted.
(JSC::CodeBlock::capabilityLevel): Deleted.
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler): Deleted.
(JSC::CodeBlock::setPCToCodeOriginMap): Deleted.
(JSC::CodeBlock::findPC): Deleted.
(JSC::CodeBlock::bytecodeOffsetFromCallSiteIndex): Deleted.
(JSC::CodeBlock::thresholdForJIT): Deleted.
(JSC::CodeBlock::jitAfterWarmUp): Deleted.
(JSC::CodeBlock::jitSoon): Deleted.
(JSC::CodeBlock::dumpMathICStats): Deleted.
(JSC::CodeBlock::livenessAnalysisSlow): Deleted.
* bytecode/ProgramCodeBlock.h: Copied from Source/JavaScriptCore/bytecode/CodeBlock.h.
(): Deleted.
(JSC::CodeBlock::unlinkedCodeBlock): Deleted.
(JSC::CodeBlock::numParameters): Deleted.
(JSC::CodeBlock::numCalleeLocals): Deleted.
(JSC::CodeBlock::addressOfNumParameters): Deleted.
(JSC::CodeBlock::offsetOfNumParameters): Deleted.
(JSC::CodeBlock::alternative): Deleted.
(JSC::CodeBlock::forEachRelatedCodeBlock): Deleted.
(JSC::CodeBlock::specializationKind): Deleted.
(JSC::CodeBlock::isStrictMode): Deleted.
(JSC::CodeBlock::ecmaMode): Deleted.
(JSC::CodeBlock::isKnownNotImmediate): Deleted.
(JSC::CodeBlock::isTemporaryRegisterIndex): Deleted.
(JSC::CodeBlock::stubInfoBegin): Deleted.
(JSC::CodeBlock::stubInfoEnd): Deleted.
(JSC::CodeBlock::callLinkInfosBegin): Deleted.
(JSC::CodeBlock::callLinkInfosEnd): Deleted.
(JSC::CodeBlock::setJITCodeMap): Deleted.
(JSC::CodeBlock::jitCodeMap): Deleted.
(JSC::CodeBlock::bytecodeOffset): Deleted.
(JSC::CodeBlock::numberOfInstructions): Deleted.
(JSC::CodeBlock::instructions): Deleted.
(JSC::CodeBlock::instructionCount): Deleted.
(JSC::CodeBlock::setJITCode): Deleted.
(JSC::CodeBlock::jitCode): Deleted.
(JSC::CodeBlock::jitCodeOffset): Deleted.
(JSC::CodeBlock::jitType): Deleted.
(JSC::CodeBlock::hasBaselineJITProfiling): Deleted.
(JSC::CodeBlock::capabilityLevelState): Deleted.
(JSC::CodeBlock::ownerExecutable): Deleted.
(JSC::CodeBlock::ownerScriptExecutable): Deleted.
(JSC::CodeBlock::vm): Deleted.
(JSC::CodeBlock::setThisRegister): Deleted.
(JSC::CodeBlock::thisRegister): Deleted.
(JSC::CodeBlock::usesEval): Deleted.
(JSC::CodeBlock::setScopeRegister): Deleted.
(JSC::CodeBlock::scopeRegister): Deleted.
(JSC::CodeBlock::codeType): Deleted.
(JSC::CodeBlock::putByIdContext): Deleted.
(JSC::CodeBlock::source): Deleted.
(JSC::CodeBlock::sourceOffset): Deleted.
(JSC::CodeBlock::firstLineColumnOffset): Deleted.
(JSC::CodeBlock::numberOfJumpTargets): Deleted.
(JSC::CodeBlock::jumpTarget): Deleted.
(JSC::CodeBlock::numberOfArgumentValueProfiles): Deleted.
(JSC::CodeBlock::valueProfileForArgument): Deleted.
(JSC::CodeBlock::numberOfValueProfiles): Deleted.
(JSC::CodeBlock::valueProfile): Deleted.
(JSC::CodeBlock::valueProfilePredictionForBytecodeOffset): Deleted.
(JSC::CodeBlock::totalNumberOfValueProfiles): Deleted.
(JSC::CodeBlock::getFromAllValueProfiles): Deleted.
(JSC::CodeBlock::numberOfRareCaseProfiles): Deleted.
(JSC::CodeBlock::likelyToTakeSlowCase): Deleted.
(JSC::CodeBlock::couldTakeSlowCase): Deleted.
(JSC::CodeBlock::numberOfArrayProfiles): Deleted.
(JSC::CodeBlock::arrayProfiles): Deleted.
(JSC::CodeBlock::numberOfExceptionHandlers): Deleted.
(JSC::CodeBlock::exceptionHandler): Deleted.
(JSC::CodeBlock::hasExpressionInfo): Deleted.
(JSC::CodeBlock::hasCodeOrigins): Deleted.
(JSC::CodeBlock::canGetCodeOrigin): Deleted.
(JSC::CodeBlock::codeOrigin): Deleted.
(JSC::CodeBlock::addFrequentExitSite): Deleted.
(JSC::CodeBlock::hasExitSite): Deleted.
(JSC::CodeBlock::exitProfile): Deleted.
(JSC::CodeBlock::lazyOperandValueProfiles): Deleted.
(JSC::CodeBlock::numberOfIdentifiers): Deleted.
(JSC::CodeBlock::identifier): Deleted.
(JSC::CodeBlock::constants): Deleted.
(JSC::CodeBlock::constantsSourceCodeRepresentation): Deleted.
(JSC::CodeBlock::addConstant): Deleted.
(JSC::CodeBlock::addConstantLazily): Deleted.
(JSC::CodeBlock::constantRegister): Deleted.
(JSC::CodeBlock::isConstantRegisterIndex): Deleted.
(JSC::CodeBlock::getConstant): Deleted.
(JSC::CodeBlock::constantSourceCodeRepresentation): Deleted.
(JSC::CodeBlock::functionDecl): Deleted.
(JSC::CodeBlock::numberOfFunctionDecls): Deleted.
(JSC::CodeBlock::functionExpr): Deleted.
(JSC::CodeBlock::regexp): Deleted.
(JSC::CodeBlock::numberOfConstantBuffers): Deleted.
(JSC::CodeBlock::addConstantBuffer): Deleted.
(JSC::CodeBlock::constantBufferAsVector): Deleted.
(JSC::CodeBlock::constantBuffer): Deleted.
(JSC::CodeBlock::heap): Deleted.
(JSC::CodeBlock::globalObject): Deleted.
(JSC::CodeBlock::livenessAnalysis): Deleted.
(JSC::CodeBlock::numberOfSwitchJumpTables): Deleted.
(JSC::CodeBlock::addSwitchJumpTable): Deleted.
(JSC::CodeBlock::switchJumpTable): Deleted.
(JSC::CodeBlock::clearSwitchJumpTables): Deleted.
(JSC::CodeBlock::numberOfStringSwitchJumpTables): Deleted.
(JSC::CodeBlock::addStringSwitchJumpTable): Deleted.
(JSC::CodeBlock::stringSwitchJumpTable): Deleted.
(JSC::CodeBlock::evalCodeCache): Deleted.
(JSC::CodeBlock::checkIfJITThresholdReached): Deleted.
(JSC::CodeBlock::dontJITAnytimeSoon): Deleted.
(JSC::CodeBlock::llintExecuteCounter): Deleted.
(JSC::CodeBlock::llintGetByIdWatchpointMap): Deleted.
(JSC::CodeBlock::numberOfLLIntBaselineCalleeSaveRegisters): Deleted.
(JSC::CodeBlock::addressOfJITExecuteCounter): Deleted.
(JSC::CodeBlock::offsetOfJITExecuteCounter): Deleted.
(JSC::CodeBlock::offsetOfJITExecutionActiveThreshold): Deleted.
(JSC::CodeBlock::offsetOfJITExecutionTotalCount): Deleted.
(JSC::CodeBlock::jitExecuteCounter): Deleted.
(JSC::CodeBlock::optimizationDelayCounter): Deleted.
(JSC::CodeBlock::osrExitCounter): Deleted.
(JSC::CodeBlock::countOSRExit): Deleted.
(JSC::CodeBlock::addressOfOSRExitCounter): Deleted.
(JSC::CodeBlock::offsetOfOSRExitCounter): Deleted.
(JSC::CodeBlock::calleeSaveRegisters): Deleted.
(JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::optimizeAfterWarmUp): Deleted.
(JSC::CodeBlock::numberOfDFGCompiles): Deleted.
(JSC::CodeBlock::hasDebuggerRequests): Deleted.
(JSC::CodeBlock::debuggerRequestsAddress): Deleted.
(JSC::CodeBlock::removeBreakpoint): Deleted.
(JSC::CodeBlock::clearDebuggerRequests): Deleted.
(JSC::CodeBlock::wasCompiledWithDebuggingOpcodes): Deleted.
(JSC::CodeBlock::clearExceptionHandlers): Deleted.
(JSC::CodeBlock::appendExceptionHandler): Deleted.
(JSC::CodeBlock::tallyFrequentExitSites): Deleted.
(JSC::CodeBlock::replaceConstant): Deleted.
(JSC::CodeBlock::timeSinceCreation): Deleted.
(JSC::CodeBlock::createRareDataIfNecessary): Deleted.
(JSC::GlobalCodeBlock::GlobalCodeBlock): Deleted.
(JSC::ModuleProgramCodeBlock::create): Deleted.
(JSC::ModuleProgramCodeBlock::createStructure): Deleted.
(JSC::ModuleProgramCodeBlock::ModuleProgramCodeBlock): Deleted.
(JSC::EvalCodeBlock::create): Deleted.
(JSC::EvalCodeBlock::createStructure): Deleted.
(JSC::EvalCodeBlock::variable): Deleted.
(JSC::EvalCodeBlock::numVariables): Deleted.
(JSC::EvalCodeBlock::EvalCodeBlock): Deleted.
(JSC::EvalCodeBlock::unlinkedEvalCodeBlock): Deleted.
(JSC::FunctionCodeBlock::create): Deleted.
(JSC::FunctionCodeBlock::createStructure): Deleted.
(JSC::FunctionCodeBlock::FunctionCodeBlock): Deleted.
(JSC::WebAssemblyCodeBlock::create): Deleted.
(JSC::WebAssemblyCodeBlock::createStructure): Deleted.
(JSC::WebAssemblyCodeBlock::WebAssemblyCodeBlock): Deleted.
(JSC::ExecState::r): Deleted.
(JSC::ExecState::uncheckedR): Deleted.
(JSC::CodeBlock::clearVisitWeaklyHasBeenCalled): Deleted.
(JSC::ScriptExecutable::forEachCodeBlock): Deleted.
(JSC::ScriptExecutable::prepareForExecution): Deleted.
* bytecode/WebAssemblyCodeBlock.cpp: Copied from Source/JavaScriptCore/bytecode/CodeBlock.cpp.
(JSC::FunctionCodeBlock::destroy): Deleted.
(JSC::ProgramCodeBlock::destroy): Deleted.
(JSC::ModuleProgramCodeBlock::destroy): Deleted.
(JSC::EvalCodeBlock::destroy): Deleted.
(JSC::CodeBlock::inferredName): Deleted.
(JSC::CodeBlock::hasHash): Deleted.
(JSC::CodeBlock::isSafeToComputeHash): Deleted.
(JSC::CodeBlock::hash): Deleted.
(JSC::CodeBlock::sourceCodeForTools): Deleted.
(JSC::CodeBlock::sourceCodeOnOneLine): Deleted.
(JSC::CodeBlock::hashAsStringIfPossible): Deleted.
(JSC::CodeBlock::dumpAssumingJITType): Deleted.
(JSC::CodeBlock::dump): Deleted.
(JSC::idName): Deleted.
(JSC::CodeBlock::registerName): Deleted.
(JSC::CodeBlock::constantName): Deleted.
(JSC::regexpToSourceString): Deleted.
(JSC::regexpName): Deleted.
(JSC::debugHookName): Deleted.
(JSC::CodeBlock::printUnaryOp): Deleted.
(JSC::CodeBlock::printBinaryOp): Deleted.
(JSC::CodeBlock::printConditionalJump): Deleted.
(JSC::CodeBlock::printGetByIdOp): Deleted.
(JSC::dumpStructure): Deleted.
(JSC::dumpChain): Deleted.
(JSC::CodeBlock::printGetByIdCacheStatus): Deleted.
(JSC::CodeBlock::printPutByIdCacheStatus): Deleted.
(JSC::CodeBlock::printCallOp): Deleted.
(JSC::CodeBlock::printPutByIdOp): Deleted.
(JSC::CodeBlock::dumpSource): Deleted.
(JSC::CodeBlock::dumpBytecode): Deleted.
(JSC::CodeBlock::dumpExceptionHandlers): Deleted.
(JSC::CodeBlock::beginDumpProfiling): Deleted.
(JSC::CodeBlock::dumpValueProfiling): Deleted.
(JSC::CodeBlock::dumpArrayProfiling): Deleted.
(JSC::CodeBlock::dumpRareCaseProfile): Deleted.
(JSC::CodeBlock::dumpArithProfile): Deleted.
(JSC::CodeBlock::printLocationAndOp): Deleted.
(JSC::CodeBlock::printLocationOpAndRegisterOperand): Deleted.
(JSC::sizeInBytes): Deleted.
(JSC::CodeBlock::CodeBlock): Deleted.
(JSC::CodeBlock::finishCreation): Deleted.
(JSC::CodeBlock::~CodeBlock): Deleted.
(JSC::CodeBlock::setConstantRegisters): Deleted.
(JSC::CodeBlock::setAlternative): Deleted.
(JSC::CodeBlock::setNumParameters): Deleted.
(JSC::EvalCodeCache::visitAggregate): Deleted.
(JSC::CodeBlock::specialOSREntryBlockOrNull): Deleted.
(JSC::CodeBlock::visitWeakly): Deleted.
(JSC::CodeBlock::estimatedSize): Deleted.
(JSC::CodeBlock::visitChildren): Deleted.
(JSC::CodeBlock::shouldVisitStrongly): Deleted.
(JSC::CodeBlock::shouldJettisonDueToWeakReference): Deleted.
(JSC::timeToLive): Deleted.
(JSC::CodeBlock::shouldJettisonDueToOldAge): Deleted.
(JSC::shouldMarkTransition): Deleted.
(JSC::CodeBlock::propagateTransitions): Deleted.
(JSC::CodeBlock::determineLiveness): Deleted.
(JSC::CodeBlock::WeakReferenceHarvester::visitWeakReferences): Deleted.
(JSC::CodeBlock::clearLLIntGetByIdCache): Deleted.
(JSC::CodeBlock::finalizeLLIntInlineCaches): Deleted.
(JSC::CodeBlock::finalizeBaselineJITInlineCaches): Deleted.
(JSC::CodeBlock::UnconditionalFinalizer::finalizeUnconditionally): Deleted.
(JSC::CodeBlock::getStubInfoMap): Deleted.
(JSC::CodeBlock::getCallLinkInfoMap): Deleted.
(JSC::CodeBlock::getByValInfoMap): Deleted.
(JSC::CodeBlock::addStubInfo): Deleted.
(JSC::CodeBlock::addJITAddIC): Deleted.
(JSC::CodeBlock::addJITMulIC): Deleted.
(JSC::CodeBlock::addJITSubIC): Deleted.
(JSC::CodeBlock::addJITNegIC): Deleted.
(JSC::CodeBlock::findStubInfo): Deleted.
(JSC::CodeBlock::addByValInfo): Deleted.
(JSC::CodeBlock::addCallLinkInfo): Deleted.
(JSC::CodeBlock::getCallLinkInfoForBytecodeIndex): Deleted.
(JSC::CodeBlock::resetJITData): Deleted.
(JSC::CodeBlock::visitOSRExitTargets): Deleted.
(JSC::CodeBlock::stronglyVisitStrongReferences): Deleted.
(JSC::CodeBlock::stronglyVisitWeakReferences): Deleted.
(JSC::CodeBlock::baselineAlternative): Deleted.
(JSC::CodeBlock::baselineVersion): Deleted.
(JSC::CodeBlock::hasOptimizedReplacement): Deleted.
(JSC::CodeBlock::handlerForBytecodeOffset): Deleted.
(JSC::CodeBlock::handlerForIndex): Deleted.
(JSC::CodeBlock::newExceptionHandlingCallSiteIndex): Deleted.
(JSC::CodeBlock::removeExceptionHandlerForCallSite): Deleted.
(JSC::CodeBlock::lineNumberForBytecodeOffset): Deleted.
(JSC::CodeBlock::columnNumberForBytecodeOffset): Deleted.
(JSC::CodeBlock::expressionRangeForBytecodeOffset): Deleted.
(JSC::CodeBlock::hasOpDebugForLineAndColumn): Deleted.
(JSC::CodeBlock::shrinkToFit): Deleted.
(JSC::CodeBlock::linkIncomingCall): Deleted.
(JSC::CodeBlock::linkIncomingPolymorphicCall): Deleted.
(JSC::CodeBlock::unlinkIncomingCalls): Deleted.
(JSC::CodeBlock::newReplacement): Deleted.
(JSC::CodeBlock::replacement): Deleted.
(JSC::CodeBlock::computeCapabilityLevel): Deleted.
(JSC::CodeBlock::jettison): Deleted.
(JSC::CodeBlock::globalObjectFor): Deleted.
(JSC::RecursionCheckFunctor::RecursionCheckFunctor): Deleted.
(JSC::RecursionCheckFunctor::operator()): Deleted.
(JSC::RecursionCheckFunctor::didRecurse): Deleted.
(JSC::CodeBlock::noticeIncomingCall): Deleted.
(JSC::CodeBlock::reoptimizationRetryCounter): Deleted.
(JSC::CodeBlock::setCalleeSaveRegisters): Deleted.
(JSC::roundCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::calleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::countReoptimization): Deleted.
(JSC::CodeBlock::numberOfDFGCompiles): Deleted.
(JSC::CodeBlock::codeTypeThresholdMultiplier): Deleted.
(JSC::CodeBlock::optimizationThresholdScalingFactor): Deleted.
(JSC::clipThreshold): Deleted.
(JSC::CodeBlock::adjustedCounterValue): Deleted.
(JSC::CodeBlock::checkIfOptimizationThresholdReached): Deleted.
(JSC::CodeBlock::optimizeNextInvocation): Deleted.
(JSC::CodeBlock::dontOptimizeAnytimeSoon): Deleted.
(JSC::CodeBlock::optimizeAfterWarmUp): Deleted.
(JSC::CodeBlock::optimizeAfterLongWarmUp): Deleted.
(JSC::CodeBlock::optimizeSoon): Deleted.
(JSC::CodeBlock::forceOptimizationSlowPathConcurrently): Deleted.
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult): Deleted.
(JSC::CodeBlock::adjustedExitCountThreshold): Deleted.
(JSC::CodeBlock::exitCountThresholdForReoptimization): Deleted.
(JSC::CodeBlock::exitCountThresholdForReoptimizationFromLoop): Deleted.
(JSC::CodeBlock::shouldReoptimizeNow): Deleted.
(JSC::CodeBlock::shouldReoptimizeFromLoopNow): Deleted.
(JSC::CodeBlock::getArrayProfile): Deleted.
(JSC::CodeBlock::addArrayProfile): Deleted.
(JSC::CodeBlock::getOrAddArrayProfile): Deleted.
(JSC::CodeBlock::codeOrigins): Deleted.
(JSC::CodeBlock::numberOfDFGIdentifiers): Deleted.
(JSC::CodeBlock::identifier): Deleted.
(JSC::CodeBlock::updateAllPredictionsAndCountLiveness): Deleted.
(JSC::CodeBlock::updateAllValueProfilePredictions): Deleted.
(JSC::CodeBlock::updateAllArrayPredictions): Deleted.
(JSC::CodeBlock::updateAllPredictions): Deleted.
(JSC::CodeBlock::shouldOptimizeNow): Deleted.
(JSC::CodeBlock::tallyFrequentExitSites): Deleted.
(JSC::CodeBlock::dumpValueProfiles): Deleted.
(JSC::CodeBlock::frameRegisterCount): Deleted.
(JSC::CodeBlock::stackPointerOffset): Deleted.
(JSC::CodeBlock::predictedMachineCodeSize): Deleted.
(JSC::CodeBlock::usesOpcode): Deleted.
(JSC::CodeBlock::nameForRegister): Deleted.
(JSC::CodeBlock::valueProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::validate): Deleted.
(JSC::CodeBlock::beginValidationDidFail): Deleted.
(JSC::CodeBlock::endValidationDidFail): Deleted.
(JSC::CodeBlock::addBreakpoint): Deleted.
(JSC::CodeBlock::setSteppingMode): Deleted.
(JSC::CodeBlock::addRareCaseProfile): Deleted.
(JSC::CodeBlock::rareCaseProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::rareCaseProfileCountForBytecodeOffset): Deleted.
(JSC::CodeBlock::arithProfileForBytecodeOffset): Deleted.
(JSC::CodeBlock::arithProfileForPC): Deleted.
(JSC::CodeBlock::couldTakeSpecialFastCase): Deleted.
(JSC::CodeBlock::capabilityLevel): Deleted.
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler): Deleted.
(JSC::CodeBlock::setPCToCodeOriginMap): Deleted.
(JSC::CodeBlock::findPC): Deleted.
(JSC::CodeBlock::bytecodeOffsetFromCallSiteIndex): Deleted.
(JSC::CodeBlock::thresholdForJIT): Deleted.
(JSC::CodeBlock::jitAfterWarmUp): Deleted.
(JSC::CodeBlock::jitSoon): Deleted.
(JSC::CodeBlock::dumpMathICStats): Deleted.
(JSC::CodeBlock::livenessAnalysisSlow): Deleted.
* bytecode/WebAssemblyCodeBlock.h: Copied from Source/JavaScriptCore/bytecode/CodeBlock.h.
(): Deleted.
(JSC::CodeBlock::unlinkedCodeBlock): Deleted.
(JSC::CodeBlock::numParameters): Deleted.
(JSC::CodeBlock::numCalleeLocals): Deleted.
(JSC::CodeBlock::addressOfNumParameters): Deleted.
(JSC::CodeBlock::offsetOfNumParameters): Deleted.
(JSC::CodeBlock::alternative): Deleted.
(JSC::CodeBlock::forEachRelatedCodeBlock): Deleted.
(JSC::CodeBlock::specializationKind): Deleted.
(JSC::CodeBlock::isStrictMode): Deleted.
(JSC::CodeBlock::ecmaMode): Deleted.
(JSC::CodeBlock::isKnownNotImmediate): Deleted.
(JSC::CodeBlock::isTemporaryRegisterIndex): Deleted.
(JSC::CodeBlock::stubInfoBegin): Deleted.
(JSC::CodeBlock::stubInfoEnd): Deleted.
(JSC::CodeBlock::callLinkInfosBegin): Deleted.
(JSC::CodeBlock::callLinkInfosEnd): Deleted.
(JSC::CodeBlock::setJITCodeMap): Deleted.
(JSC::CodeBlock::jitCodeMap): Deleted.
(JSC::CodeBlock::bytecodeOffset): Deleted.
(JSC::CodeBlock::numberOfInstructions): Deleted.
(JSC::CodeBlock::instructions): Deleted.
(JSC::CodeBlock::instructionCount): Deleted.
(JSC::CodeBlock::setJITCode): Deleted.
(JSC::CodeBlock::jitCode): Deleted.
(JSC::CodeBlock::jitCodeOffset): Deleted.
(JSC::CodeBlock::jitType): Deleted.
(JSC::CodeBlock::hasBaselineJITProfiling): Deleted.
(JSC::CodeBlock::capabilityLevelState): Deleted.
(JSC::CodeBlock::ownerExecutable): Deleted.
(JSC::CodeBlock::ownerScriptExecutable): Deleted.
(JSC::CodeBlock::vm): Deleted.
(JSC::CodeBlock::setThisRegister): Deleted.
(JSC::CodeBlock::thisRegister): Deleted.
(JSC::CodeBlock::usesEval): Deleted.
(JSC::CodeBlock::setScopeRegister): Deleted.
(JSC::CodeBlock::scopeRegister): Deleted.
(JSC::CodeBlock::codeType): Deleted.
(JSC::CodeBlock::putByIdContext): Deleted.
(JSC::CodeBlock::source): Deleted.
(JSC::CodeBlock::sourceOffset): Deleted.
(JSC::CodeBlock::firstLineColumnOffset): Deleted.
(JSC::CodeBlock::numberOfJumpTargets): Deleted.
(JSC::CodeBlock::jumpTarget): Deleted.
(JSC::CodeBlock::numberOfArgumentValueProfiles): Deleted.
(JSC::CodeBlock::valueProfileForArgument): Deleted.
(JSC::CodeBlock::numberOfValueProfiles): Deleted.
(JSC::CodeBlock::valueProfile): Deleted.
(JSC::CodeBlock::valueProfilePredictionForBytecodeOffset): Deleted.
(JSC::CodeBlock::totalNumberOfValueProfiles): Deleted.
(JSC::CodeBlock::getFromAllValueProfiles): Deleted.
(JSC::CodeBlock::numberOfRareCaseProfiles): Deleted.
(JSC::CodeBlock::likelyToTakeSlowCase): Deleted.
(JSC::CodeBlock::couldTakeSlowCase): Deleted.
(JSC::CodeBlock::numberOfArrayProfiles): Deleted.
(JSC::CodeBlock::arrayProfiles): Deleted.
(JSC::CodeBlock::numberOfExceptionHandlers): Deleted.
(JSC::CodeBlock::exceptionHandler): Deleted.
(JSC::CodeBlock::hasExpressionInfo): Deleted.
(JSC::CodeBlock::hasCodeOrigins): Deleted.
(JSC::CodeBlock::canGetCodeOrigin): Deleted.
(JSC::CodeBlock::codeOrigin): Deleted.
(JSC::CodeBlock::addFrequentExitSite): Deleted.
(JSC::CodeBlock::hasExitSite): Deleted.
(JSC::CodeBlock::exitProfile): Deleted.
(JSC::CodeBlock::lazyOperandValueProfiles): Deleted.
(JSC::CodeBlock::numberOfIdentifiers): Deleted.
(JSC::CodeBlock::identifier): Deleted.
(JSC::CodeBlock::constants): Deleted.
(JSC::CodeBlock::constantsSourceCodeRepresentation): Deleted.
(JSC::CodeBlock::addConstant): Deleted.
(JSC::CodeBlock::addConstantLazily): Deleted.
(JSC::CodeBlock::constantRegister): Deleted.
(JSC::CodeBlock::isConstantRegisterIndex): Deleted.
(JSC::CodeBlock::getConstant): Deleted.
(JSC::CodeBlock::constantSourceCodeRepresentation): Deleted.
(JSC::CodeBlock::functionDecl): Deleted.
(JSC::CodeBlock::numberOfFunctionDecls): Deleted.
(JSC::CodeBlock::functionExpr): Deleted.
(JSC::CodeBlock::regexp): Deleted.
(JSC::CodeBlock::numberOfConstantBuffers): Deleted.
(JSC::CodeBlock::addConstantBuffer): Deleted.
(JSC::CodeBlock::constantBufferAsVector): Deleted.
(JSC::CodeBlock::constantBuffer): Deleted.
(JSC::CodeBlock::heap): Deleted.
(JSC::CodeBlock::globalObject): Deleted.
(JSC::CodeBlock::livenessAnalysis): Deleted.
(JSC::CodeBlock::numberOfSwitchJumpTables): Deleted.
(JSC::CodeBlock::addSwitchJumpTable): Deleted.
(JSC::CodeBlock::switchJumpTable): Deleted.
(JSC::CodeBlock::clearSwitchJumpTables): Deleted.
(JSC::CodeBlock::numberOfStringSwitchJumpTables): Deleted.
(JSC::CodeBlock::addStringSwitchJumpTable): Deleted.
(JSC::CodeBlock::stringSwitchJumpTable): Deleted.
(JSC::CodeBlock::evalCodeCache): Deleted.
(JSC::CodeBlock::checkIfJITThresholdReached): Deleted.
(JSC::CodeBlock::dontJITAnytimeSoon): Deleted.
(JSC::CodeBlock::llintExecuteCounter): Deleted.
(JSC::CodeBlock::llintGetByIdWatchpointMap): Deleted.
(JSC::CodeBlock::numberOfLLIntBaselineCalleeSaveRegisters): Deleted.
(JSC::CodeBlock::addressOfJITExecuteCounter): Deleted.
(JSC::CodeBlock::offsetOfJITExecuteCounter): Deleted.
(JSC::CodeBlock::offsetOfJITExecutionActiveThreshold): Deleted.
(JSC::CodeBlock::offsetOfJITExecutionTotalCount): Deleted.
(JSC::CodeBlock::jitExecuteCounter): Deleted.
(JSC::CodeBlock::optimizationDelayCounter): Deleted.
(JSC::CodeBlock::osrExitCounter): Deleted.
(JSC::CodeBlock::countOSRExit): Deleted.
(JSC::CodeBlock::addressOfOSRExitCounter): Deleted.
(JSC::CodeBlock::offsetOfOSRExitCounter): Deleted.
(JSC::CodeBlock::calleeSaveRegisters): Deleted.
(JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters): Deleted.
(JSC::CodeBlock::optimizeAfterWarmUp): Deleted.
(JSC::CodeBlock::numberOfDFGCompiles): Deleted.
(JSC::CodeBlock::hasDebuggerRequests): Deleted.
(JSC::CodeBlock::debuggerRequestsAddress): Deleted.
(JSC::CodeBlock::removeBreakpoint): Deleted.
(JSC::CodeBlock::clearDebuggerRequests): Deleted.
(JSC::CodeBlock::wasCompiledWithDebuggingOpcodes): Deleted.
(JSC::CodeBlock::clearExceptionHandlers): Deleted.
(JSC::CodeBlock::appendExceptionHandler): Deleted.
(JSC::CodeBlock::tallyFrequentExitSites): Deleted.
(JSC::CodeBlock::replaceConstant): Deleted.
(JSC::CodeBlock::timeSinceCreation): Deleted.
(JSC::CodeBlock::createRareDataIfNecessary): Deleted.
(JSC::GlobalCodeBlock::GlobalCodeBlock): Deleted.
(JSC::ProgramCodeBlock::create): Deleted.
(JSC::ProgramCodeBlock::createStructure): Deleted.
(JSC::ProgramCodeBlock::ProgramCodeBlock): Deleted.
(JSC::ModuleProgramCodeBlock::create): Deleted.
(JSC::ModuleProgramCodeBlock::createStructure): Deleted.
(JSC::ModuleProgramCodeBlock::ModuleProgramCodeBlock): Deleted.
(JSC::EvalCodeBlock::create): Deleted.
(JSC::EvalCodeBlock::createStructure): Deleted.
(JSC::EvalCodeBlock::variable): Deleted.
(JSC::EvalCodeBlock::numVariables): Deleted.
(JSC::EvalCodeBlock::EvalCodeBlock): Deleted.
(JSC::EvalCodeBlock::unlinkedEvalCodeBlock): Deleted.
(JSC::FunctionCodeBlock::create): Deleted.
(JSC::FunctionCodeBlock::createStructure): Deleted.
(JSC::FunctionCodeBlock::FunctionCodeBlock): Deleted.
(JSC::ExecState::r): Deleted.
(JSC::ExecState::uncheckedR): Deleted.
(JSC::CodeBlock::clearVisitWeaklyHasBeenCalled): Deleted.
(JSC::ScriptExecutable::forEachCodeBlock): Deleted.
(JSC::ScriptExecutable::prepareForExecution): Deleted.
* dfg/DFGByteCodeParser.cpp:
* interpreter/Interpreter.cpp:
* jit/JITOperations.cpp:
* jit/Repatch.cpp:
* llint/LLIntSlowPaths.cpp:
* runtime/CommonSlowPaths.h:
* runtime/EvalExecutable.cpp:
* runtime/ExecutableBase.cpp:
* runtime/FunctionExecutable.cpp:
* runtime/FunctionExecutableDump.cpp:
* runtime/ModuleProgramExecutable.cpp:
* runtime/ProgramExecutable.cpp:
* runtime/ScriptExecutable.cpp:
* runtime/ScriptExecutable.h:
* runtime/TestRunnerUtils.cpp:
* runtime/VM.cpp:
* runtime/WebAssemblyExecutable.cpp:
* tools/JSDollarVMPrototype.cpp:

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

4 years ago[WebIDL] Move interfaces and typed arrays over to JSDOMConvert
weinig@apple.com [Wed, 2 Nov 2016 22:15:14 +0000 (22:15 +0000)]
[WebIDL] Move interfaces and typed arrays over to JSDOMConvert
https://bugs.webkit.org/show_bug.cgi?id=164256

Reviewed by Alex Christensen.

Source/JavaScriptCore:

* runtime/JSArrayBuffer.h:
(JSC::JSArrayBuffer::toWrapped):
Change return type to ArrayBuffer* to match WebCore's expectation.

Source/WebCore:

- Add the ability to pass an "exception thrower" functor to the convert functions.
  This is only implemented for convert<IDLInterface<T>> and convert<IDLNullable<IDLInterface<T>>>
  for now, but can be extended for more types as necessary to improve exception messages.
- Add support for using toJSNewlyCreated in JSDOMConvert.

* bindings/generic/IDLTypes.h:
(WebCore::IDLString::extractValueFromNullable):
Use forwarding to simplify extraction function.

(WebCore::IDLInterface::nullValue):
Update nullValue to work for both RefPtr<T> and T*.

(WebCore::IDLInterface::extractValueFromNullable):
Use forwarding to simplify extraction function.

* bindings/js/JSDOMConvert.h:
(WebCore::DefaultExceptionThrower::operator()):
Add a default "exception thrower" which throws a normal type error.

(WebCore::convert):
Add an overload of convert which takes an "exception thrower".

(WebCore::toJSNewlyCreated):
Add new overloaded function toJSNewlyCreated, matching the toJS overload set,
which will return "newly created" values. This only works for types that implement
a toJSNewlyCreated function for themselves.

(WebCore::Converter<IDLNullable<T>>::convert):
Fix the return type of Converter<IDLNullable<T>> to be specialized when
T is an IDLInterface. In that case, we want to match the return type of
inner converter.

Also add implementation of convert overload that takes an "exception thrower".

(WebCore::JSConverter<IDLNullable<T>>::convert):
(WebCore::JSConverter<IDLNullable<T>>::convertNewlyCreated):
Reimplement conversion to use forwarding of the value.

(WebCore::Converter<IDLInterface<T>>::convert):
Add support for an "exception thrower".

(WebCore::Detail::getPtrOrRef):
Add helper functions that extract either a pointer or reference, depending on the type,
and const_casts it allowing the value to be used with toJS functions.

(WebCore::JSConverter<IDLInterface<T>>::convert):
Re-implement to support more varied input values.

(WebCore::JSConverter<IDLInterface<T>>::convertNewlyCreated):
Added. Forwards to overloaded toJSNewlyCreated functions.

* bindings/scripts/CodeGeneratorJS.pm:
(AddToImplIncludesForIDLType):
Add support for adding the right includes for SerializedScriptValue and Dictionary.

(GetArgumentExceptionThrower):
(GetAttributeExceptionThrower):
Add helpers to generate "exception thrower" lambdas for wrappers and typed arrays
being passed to setters and functions.

(GenerateParametersCheck):
Move around special cases so it is clear that it's not wrappers and typed arrays that
need specialization here, it is now just EventListener and XPathNSResolver.

(GetIDLInterfaceName):
Add helper to get the InterfaceName for use in IDLInterface template.

(GetBaseIDLType):
Use new GetIDLInterfaceName helper.

(IsValidContextForJSValueToNative):
Remove IDLOperation as a valid context. It is not.

(JSValueToNative):
Move JSDOMConvert based conversion to the bottom, to show that everything above it
is a special case that should be fixed. I have used explicit c-style if-statements
to make it clear what the types of the exceptional cases are.

(NativeToJSValueDOMConvertNeedsState):
(NativeToJSValueDOMConvertNeedsGlobalObject):
Add wrapper types and typed arrays to the list needing state and globalObject.

(NativeToJSValue):
Move JSDOMConvert based conversion to the bottom, to show that everything above it
is a special case that should be fixed. I have used explicit c-style if-statements
to make it clear what the types of the exceptional cases are.

(JSValueToNativeIsHandledByDOMConvert): Deleted.
(NativeToJSValueIsHandledByDOMConvert): Deleted.
Remove predicates protecting use of JSDOMConvert now that it is the default.

* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCEReactions.cpp:
* bindings/scripts/test/JS/JSTestCallback.cpp:
* bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestSerialization.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
Update test results.

LayoutTests:

* svg/custom/polyline-points-crash-expected.txt:
* svg/dom/SVGLengthList-basics-expected.txt:
* svg/dom/SVGNumberList-basics-expected.txt:
* svg/dom/SVGPointList-basics-expected.txt:
* svg/dom/SVGTransformList-basics-expected.txt:
* svg/dom/SVGTransformList-expected.txt:
Update test results for improved error messages.

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

4 years agoBug 164333: Add logging for "WebKit encountered an internal error" messages due to...
ddkilzer@apple.com [Wed, 2 Nov 2016 22:12:19 +0000 (22:12 +0000)]
Bug 164333: Add logging for "WebKit encountered an internal error" messages due to Network process crashes
<https://webkit.org/b/164333>
<rdar://problem/29072727>

Reviewed by Alex Christensen.

Source/WebCore:

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::networkProcessCrashedKey):
- Add implementation for new key method.
* page/DiagnosticLoggingKeys.h:
(WebCore::DiagnosticLoggingKeys::networkProcessCrashedKey):
- Add declaration for new key method.

Source/WebKit2:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::logDiagnosticMessageForNetworkProcessCrash):
Add private method to log diagnostic message.
(WebKit::WebProcess::networkProcessConnectionClosed):
Call logDiagnosticMessageForNetworkProcessCrash().
* WebProcess/WebProcess.h:
(WebKit::WebProcess::logDiagnosticMessageForNetworkProcessCrash):
Declare new method.

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

4 years agoThe GC should be in a thread
fpizlo@apple.com [Wed, 2 Nov 2016 22:01:04 +0000 (22:01 +0000)]
The GC should be in a thread
https://bugs.webkit.org/show_bug.cgi?id=163562

Reviewed by Geoffrey Garen and Andreas Kling.
Source/JavaScriptCore:

In a concurrent GC, the work of collecting happens on a separate thread. This patch
implements this, and schedules the thread the way that a concurrent GC thread would be
scheduled. But, the GC isn't actually concurrent yet because it calls stopTheWorld() before
doing anything and calls resumeTheWorld() after it's done with everything. The next step will
be to make it really concurrent by basically calling stopTheWorld()/resumeTheWorld() around
bounded snippets of work while making most of the work happen with the world running. Our GC
will probably always have stop-the-world phases because the semantics of JSC weak references
call for it.

This implements concurrent GC scheduling. This means that there is no longer a
Heap::collect() API. Instead, you can call collectAsync() which makes sure that a GC is
scheduled (it will do nothing if one is scheduled or ongoing) or you can call collectSync()
to schedule a GC and wait for it to happen. I made our debugging stuff call collectSync().
It should be a goal to never call collectSync() except for debugging or benchmark harness
hacks.

The collector thread is an AutomaticThread, so it won't linger when not in use. It works on
a ticket-based system, like you would see at the DMV. A ticket is a 64-bit integer. There are
two ticket counters: last granted and last served. When you request a collection, last
granted is incremented and its new value given to you. When a collection completes, last
served is incremented. collectSync() waits until last served catches up to what last granted
had been at the time you requested a GC. This means that if you request a sync GC in the
middle of an async GC, you will wait for that async GC to finish and then you will request
and wait for your sync GC.

The synchronization between the collector thread and the main threads is complex. The
collector thread needs to be able to ask the main thread to stop. It needs to be able to do
some post-GC clean-up, like the synchronous CodeBlock and LargeAllocation sweeps, on the main
thread. The collector needs to be able to ask the main thread to execute a cross-modifying
code fence before running any JIT code, since the GC might aid the JIT worklist and run JIT
finalization. It's possible for the GC to want the main thread to run something at the same
time that the main thread wants to wait for the GC. The main thread needs to be able to run
non-JSC stuff without causing the GC to completely stall. The main thread needs to be able
to query its own state (is there a request to stop?) and change it (running JSC versus not)
quickly, since this may happen on hot paths. This kind of intertwined system of requests,
notifications, and state changes requires a combination of lock-free algorithms and waiting.
So, this is all implemented using a Atomic<unsigned> Heap::m_worldState, which has bits to
represent things being requested by the collector and the heap access state of the mutator. I
am borrowing a lot of terms that I've seen in other VMs that I've worked on. Here's what they
mean:

- Stop the world: make sure that either the mutator is not running, or that it's not running
  code that could mess with the heap.

- Heap access: the mutator is said to have heap access if it could mess with the heap.

If you stop the world and the mutator doesn't have heap access, all you're doing is making
sure that it will block when it tries to acquire heap access. This means that our GC is
already fully concurrent in cases where the GC is requested while the mutator has no heap
access. This probably won't happen, but if it did then it should just work. Usually, stopping
the world means that we state our shouldStop request with m_worldState, and a future call
to Heap::stopIfNecessary() will go to slow path and stop. The act of stopping or waiting to
acquire heap access is managed by using ParkingLot API directly on m_worldState. This works
out great because it would be very awkward to get the same functionality using locks and
condition variables, since we want stopIfNecessary/acquireAccess/requestAccess fast paths
that are single atomic instructions (load/CAS/CAS, respectively). The mutator will call these
things frequently. Currently we have Heap::stopIfNecessary() polling on every allocator slow
path, but we may want to make it even more frequent than that.

Currently only JSC API clients benefit from the heap access optimization. The DOM forces us
to assume that heap access is permanently on, since DOM manipulation doesn't always hold the
JSLock. We could still allow the GC to proceed when the runloop is idle by having the GC put
a task on the runloop that just calls stopIfNecessary().

This is perf neutral. The only behavior change that clients ought to observe is that marking
and the weak fixpoint happen on a separate thread. Marking was already parallel so it already
handled multiple threads, but now it _never_ runs on the main thread. The weak fixpoint
needed some help to be able to run on another thread - mostly because there was some code in
IndexedDB that was using thread specifics in the weak fixpoint.

* API/JSBase.cpp:
(JSSynchronousEdenCollectForDebugging):
* API/JSManagedValue.mm:
(-[JSManagedValue initWithValue:]):
* heap/EdenGCActivityCallback.cpp:
(JSC::EdenGCActivityCallback::doCollection):
* heap/FullGCActivityCallback.cpp:
(JSC::FullGCActivityCallback::doCollection):
* heap/Heap.cpp:
(JSC::Heap::Thread::Thread):
(JSC::Heap::Heap):
(JSC::Heap::lastChanceToFinalize):
(JSC::Heap::markRoots):
(JSC::Heap::gatherStackRoots):
(JSC::Heap::deleteUnmarkedCompiledCode):
(JSC::Heap::collectAllGarbage):
(JSC::Heap::collectAsync):
(JSC::Heap::collectSync):
(JSC::Heap::shouldCollectInThread):
(JSC::Heap::collectInThread):
(JSC::Heap::stopTheWorld):
(JSC::Heap::resumeTheWorld):
(JSC::Heap::stopIfNecessarySlow):
(JSC::Heap::acquireAccessSlow):
(JSC::Heap::releaseAccessSlow):
(JSC::Heap::handleDidJIT):
(JSC::Heap::handleNeedFinalize):
(JSC::Heap::setDidJIT):
(JSC::Heap::setNeedFinalize):
(JSC::Heap::waitWhileNeedFinalize):
(JSC::Heap::finalize):
(JSC::Heap::requestCollection):
(JSC::Heap::waitForCollection):
(JSC::Heap::didFinishCollection):
(JSC::Heap::canCollect):
(JSC::Heap::shouldCollectHeuristic):
(JSC::Heap::shouldCollect):
(JSC::Heap::collectIfNecessaryOrDefer):
(JSC::Heap::collectAccordingToDeferGCProbability):
(JSC::Heap::collect): Deleted.
(JSC::Heap::collectWithoutAnySweep): Deleted.
(JSC::Heap::collectImpl): Deleted.
* heap/Heap.h:
(JSC::Heap::ReleaseAccessScope::ReleaseAccessScope):
(JSC::Heap::ReleaseAccessScope::~ReleaseAccessScope):
* heap/HeapInlines.h:
(JSC::Heap::acquireAccess):
(JSC::Heap::releaseAccess):
(JSC::Heap::stopIfNecessary):
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::gatherConservativeRoots):
(JSC::MachineThreads::gatherFromCurrentThread): Deleted.
* heap/MachineStackMarker.h:
* jit/JITWorklist.cpp:
(JSC::JITWorklist::completeAllForVM):
* jit/JITWorklist.h:
* jsc.cpp:
(functionFullGC):
(functionEdenGC):
* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):
* runtime/JSLock.cpp:
(JSC::JSLock::didAcquireLock):
(JSC::JSLock::unlock):
(JSC::JSLock::willReleaseLock):
* tools/JSDollarVMPrototype.cpp:
(JSC::JSDollarVMPrototype::edenGC):

Source/WebCore:

No new tests because existing tests cover this.

We now need to be more careful about using JSLock. This fixes some places that were not
holding it. New assertions in the GC are more likely to catch this than before.

* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::WorkerScriptController):

Source/WTF:

This fixes some bugs and adds a few features.

* wtf/Atomics.h: The GC may do work on behalf of the JIT. If it does, the main thread needs to execute a cross-modifying code fence. This is cpuid on x86 and I believe it's isb on ARM. It would have been an isync on PPC and I think that isb is the ARM equivalent.
(WTF::arm_isb):
(WTF::crossModifyingCodeFence):
(WTF::x86_ortop):
(WTF::x86_cpuid):
* wtf/AutomaticThread.cpp: I accidentally had AutomaticThreadCondition inherit from ThreadSafeRefCounted<AutomaticThread> [sic]. This never crashed before because all of our prior AutomaticThreadConditions were immortal.
(WTF::AutomaticThread::AutomaticThread):
(WTF::AutomaticThread::~AutomaticThread):
(WTF::AutomaticThread::start):
* wtf/AutomaticThread.h:
* wtf/MainThread.cpp: Need to allow initializeGCThreads() to be called separately because it's now more than just a debugging thing.
(WTF::initializeGCThreads):

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

4 years agoClean wrong comment about compositing on the UI process.
clopez@igalia.com [Wed, 2 Nov 2016 21:57:51 +0000 (21:57 +0000)]
Clean wrong comment about compositing on the UI process.
https://bugs.webkit.org/show_bug.cgi?id=164339

Reviewed by Michael Catanzaro.

* wtf/Platform.h: The comment about compositing on the UI process
was added on r109302 but was not removed properly when the Qt port
was removed from trunk.
USE_PROTECTION_SPACE_AUTH_CALLBACK has nothing to do with it.

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

4 years agoWeb Inspector: Include DebuggerAgent in Workers - see, pause, and step through scripts
joepeck@webkit.org [Wed, 2 Nov 2016 21:51:36 +0000 (21:51 +0000)]
Web Inspector: Include DebuggerAgent in Workers - see, pause, and step through scripts
https://bugs.webkit.org/show_bug.cgi?id=164136
<rdar://problem/29028462>

Reviewed by Brian Burg.
Source/WebCore:

Tests: inspector/worker/debugger-pause.html
       inspector/worker/debugger-scripts.html

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
New file.

* inspector/PageDebuggerAgent.h:
* inspector/WorkerDebuggerAgent.cpp: Added.
(WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
(WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
(WebCore::WorkerDebuggerAgent::breakpointActionLog):
(WebCore::WorkerDebuggerAgent::injectedScriptForEval):
* inspector/WorkerDebuggerAgent.h: Added.
DebuggerAgent customizations for Workers.

* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
Add the new agent.

* inspector/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
Implement the nested run loop for Workers.

Source/WebInspectorUI:

By implementing DebuggerAgent, Workers will inform the frontend about
Scripts that evaluate in the Worker's VM and the Worker VM can pause
and send the pausing CallFrames to the frontend. This means that
WebInspector.Script and WebInspector.CallFrame will need to be made
target aware. This also means that each Target will have its own
set of debugger data, such as the list of scripts and pause data
like the pause reason / call frames. Previously all this data was
managed by DebuggerManager.

With this change we split that data out of DebuggerManager to be
per-target DebuggerData. DebuggerManager keeps `activeCallFrame`
but the list of scripts and pause data have moved into `DebuggerData`
which is per-target, accessed through DebuggerManager's new
dataForTarget(target) method.

Finally we make a few changes to the UserInterface to make Workers
and their scripts, appear grouped together. The Resources sidebar
previously had a single top level item for the Main Frame, which
has all its resources as its children (potentially grouped into
folders). With this change, each Worker gets its own top level
item as well, and the Worker's subresources (imported scripts)
become its children.

We also now associate a single mainResource with Targets. In the
case of Workers, we assume and assert that this is a Script. If
this were to ever change we would need to adjust the assumptions.

* UserInterface/Main.html:
* UserInterface/Test.html:
New files.

* UserInterface/Base/Main.js:
* UserInterface/Test/Test.js:
Add WebInspector.assumingMainTarget to fill in all the places where
we assume the main target right now, but would need to handle non-main
targets as other agents are implemented in workers. For example profile
data that assumes the main target right now could be worker targets
when we implement ScriptProfiler / Heap agents.

* UserInterface/Protocol/Connection.js:
(InspectorBackend.WorkerConnection):
* UserInterface/Protocol/Target.js:
(WebInspector.Target):
(WebInspector.Target.prototype.get DebuggerAgent):
(WebInspector.Target.prototype.get mainResource):
(WebInspector.Target.prototype.set mainResource):
(WebInspector.WorkerTarget.prototype.initialize):
(WebInspector.WorkerTarget):
Include DebuggerAgent in Targets.
Include a mainResource for Worker Targets.

* UserInterface/Protocol/DebuggerObserver.js:
(WebInspector.DebuggerObserver.prototype.scriptParsed):
(WebInspector.DebuggerObserver.prototype.breakpointResolved):
(WebInspector.DebuggerObserver.prototype.paused):
(WebInspector.DebuggerObserver.prototype.resumed):
Pass the target on to managers when necessary.

* UserInterface/Models/DebuggerData.js: Added.
(WebInspector.DebuggerData):
(WebInspector.DebuggerData.prototype.get target):
(WebInspector.DebuggerData.prototype.get callFrames):
(WebInspector.DebuggerData.prototype.get pauseReason):
(WebInspector.DebuggerData.prototype.get pauseData):
(WebInspector.DebuggerData.prototype.get scripts):
(WebInspector.DebuggerData.prototype.scriptForIdentifier):
(WebInspector.DebuggerData.prototype.scriptsForURL):
(WebInspector.DebuggerData.prototype.reset):
(WebInspector.DebuggerData.prototype.addScript):
(WebInspector.DebuggerData.prototype.pause):
(WebInspector.DebuggerData.prototype.unpause):
Extract per-target data from DebuggerManager. This includes the list
of scripts evaluated in a Target, and any pause data for this target
such as the pause reason and call frames.

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.dataForTarget):
(WebInspector.DebuggerManager.prototype.get pauseReason): Deleted.
(WebInspector.DebuggerManager.prototype.get pauseData): Deleted.
(WebInspector.DebuggerManager.prototype.get callFrames): Deleted.
(WebInspector.DebuggerManager.prototype.reset):
New way to access per-target debugger data.

(WebInspector.DebuggerManager.prototype.initializeTarget):
When a new Target is created, synchronize frontend state with the target.
Things like the list of breakpoints and global breakpoint states.

(WebInspector.DebuggerManager.prototype.scriptForIdentifier):
(WebInspector.DebuggerManager.prototype.scriptsForURL):
Convenience accessors for scripts must now provide a Target.

(WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
This is a convenience accessors for a list of all scripts across all targets
so this handles getting the list across all targets.

(WebInspector.DebuggerManager.prototype.pause):
(WebInspector.DebuggerManager.prototype.resume):
(WebInspector.DebuggerManager.prototype.stepOver):
(WebInspector.DebuggerManager.prototype.stepInto):
(WebInspector.DebuggerManager.prototype.stepOut):
(WebInspector.DebuggerManager.prototype.continueToLocation):
Stepping commands affect the current target with the active call frame.
Eventually we will change Pause and Resume behavior to affect all targets.

(WebInspector.DebuggerManager.prototype.addBreakpoint):
(WebInspector.DebuggerManager.prototype.breakpointResolved):
(WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
(WebInspector.DebuggerManager.prototype._setBreakpoint):
(WebInspector.DebuggerManager.prototype._removeBreakpoint):
Breakpoints should be set on all targets, but we need a way
to set them on a specific target, when initializing an
individual target when we want to inform that single target
of all of the breakpoints.

(WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
(WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState):
Changing global breakpoint state should inform all targets.

(WebInspector.DebuggerManager.prototype.scriptDidParse):
Associate Scripts with a Target. Identify the main resource of a
Worker Target and set it as soon as we can.

(WebInspector.DebuggerManager.prototype.debuggerDidPause):
(WebInspector.DebuggerManager.prototype.debuggerDidResume):
(WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload):
(WebInspector.DebuggerManager.prototype._scopeChainFromPayload):
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
(WebInspector.DebuggerManager.prototype._mainResourceDidChange):
(WebInspector.DebuggerManager.prototype._didResumeInternal):
Pausing and resuming now happens per-target, so associate
created model objects (CallFrame, ScopeChain objects) and any
other necessary data with the target.

* UserInterface/Models/Breakpoint.js:
(WebInspector.Breakpoint):
(WebInspector.Breakpoint.prototype.get target):
(WebInspector.Breakpoint.prototype.get info):
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame):
(WebInspector.CallFrame.prototype.get target):
(WebInspector.CallFrame.fromDebuggerPayload):
(WebInspector.CallFrame.fromPayload):
* UserInterface/Models/ConsoleMessage.js:
(WebInspector.ConsoleMessage):
* UserInterface/Models/Script.js:
(WebInspector.Script):
(WebInspector.Script.prototype.get target):
(WebInspector.Script.prototype.isMainResource):
(WebInspector.Script.prototype.requestContentFromBackend):
(WebInspector.Script.prototype._resolveResource):
* UserInterface/Models/StackTrace.js:
(WebInspector.StackTrace.fromPayload):
(WebInspector.StackTrace.fromString):
* UserInterface/Models/ProbeManager.js:
(WebInspector.ProbeManager.prototype.didSampleProbe):
* UserInterface/Models/Probe.js:
(WebInspector.ProbeSample):
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendLocationLink):
(WebInspector.ConsoleMessageView.prototype._formatParameterAsString):
Associate model objects with a specific target where necessary.

* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
Use target specific DebuggerAgent where necessary.

* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._callFramesFromPayload):
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeFromPayload):
* UserInterface/Views/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
(WebInspector.EventListenerSectionGroup):
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode.node.shortestGCRootPath.):
(WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populateWindowPreview):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
* UserInterface/Views/ProfileDataGridNode.js:
(WebInspector.ProfileDataGridNode.prototype.iconClassName):
(WebInspector.ProfileDataGridNode.prototype.filterableDataForColumn):
(WebInspector.ProfileDataGridNode.prototype._displayContent):
Use assumed main target and audit these when the Worker gets more Agents.

* UserInterface/Controllers/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype._initiatorSourceCodeLocationFromPayload):
This will always be the main target because only the main target
has access to the DOM.

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.get target):
(WebInspector.SourceCodeTextEditor.prototype.customPerformSearch):
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression.populate):
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
Update target specific actions to use the proper target's agents.

* UserInterface/Views/TargetTreeElement.js: Added.
(WebInspector.TargetTreeElement):
(WebInspector.TargetTreeElement.prototype.get target):
(WebInspector.TargetTreeElement.prototype.onexpand):
(WebInspector.TargetTreeElement.prototype.oncollapse):
Add a new tree element for a Target. We currently assume that the
main resource for a Target will be a Script right now, as is the
case for Web Workers. This simply remembers its expanded or
collapsed state and has a better icon.

* UserInterface/Views/ResourceIcons.css:
(body:matches(.mac-platform, .windows-platform) .script.worker-icon .icon):
(body:matches(.mac-platform, .windows-platform) .large .script.worker-icon .icon):
* UserInterface/Images/WorkerScript.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocument.png.
* UserInterface/Images/WorkerScript@2x.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocument@2x.png.
* UserInterface/Images/WorkerScriptLarge.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocumentLarge.png.
* UserInterface/Images/WorkerScriptLarge@2x.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocumentLarge@2x.png.
Improve icon for a Worker's main resource script.

* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
(WebInspector.ResourceSidebarPanel.prototype._scriptsCleared):
(WebInspector.ResourceSidebarPanel.prototype._addScriptForNonMainTarget):
(WebInspector.ResourceSidebarPanel.prototype._addTargetWithMainResource):
(WebInspector.ResourceSidebarPanel.prototype._targetRemoved):
* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts):
(WebInspector.SearchSidebarPanel.prototype._searchTreeElementForScript):
* UserInterface/Views/OpenResourceDialog.js:
(WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline.createTreeElement):
(WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
(WebInspector.OpenResourceDialog.prototype.didDismissDialog):
(WebInspector.OpenResourceDialog.prototype.didPresentDialog):
(WebInspector.OpenResourceDialog.prototype._addResourcesForFrame):
(WebInspector.OpenResourceDialog.prototype._addScriptsForTarget):
(WebInspector.OpenResourceDialog.prototype._scriptAdded):
(WebInspector.OpenResourceDialog):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToTreeOutline):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
Include scripts from non-main targets in sidebars.

LayoutTests:

* inspector/worker/debugger-pause-expected.txt: Added.
* inspector/worker/debugger-pause.html: Added.
* inspector/worker/debugger-scripts-expected.txt: Added.
* inspector/worker/debugger-scripts.html: Added.
* inspector/worker/resources/worker-debugger-pause.js: Added.
* inspector/worker/resources/worker-import-1.js: Added.
* inspector/worker/resources/worker-scripts.js: Added.
New tests for Debugger features in a Worker.

* inspector/debugger/break-on-exception-throw-in-promise.html:
* inspector/debugger/break-on-exception.html:
* inspector/debugger/break-on-uncaught-exception.html:
* inspector/debugger/evaluateOnCallFrame-CommandLineAPI.html:
* inspector/debugger/pause-reason.html:
* inspector/debugger/paused-scopes.html:
* inspector/debugger/resources/log-pause-location.js:
* inspector/debugger/stepping/stepInto.html:
* inspector/debugger/stepping/stepOut.html:
* inspector/debugger/stepping/stepOver.html:
* inspector/debugger/stepping/stepping-through-autoContinue-breakpoint.html:
* inspector/debugger/tail-deleted-frames-from-vm-entry.html:
* inspector/debugger/tail-deleted-frames-this-value.html:
* inspector/debugger/tail-deleted-frames.html:
* inspector/debugger/tail-recursion.html:
Most debugger data moved from DebuggerManager into DebuggerData for a target.
Update tests that access such data like pauseReason / pauseData / callFrames.

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

4 years agoAdd Battery Status to features.json, marked as "Removed".
simon.fraser@apple.com [Wed, 2 Nov 2016 21:37:55 +0000 (21:37 +0000)]
Add Battery Status to features.json, marked as "Removed".

* features.json:

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

4 years agoLoad stylesheets in link elements inside a connected shadow tree
rniwa@webkit.org [Wed, 2 Nov 2016 21:34:58 +0000 (21:34 +0000)]
Load stylesheets in link elements inside a connected shadow tree
https://bugs.webkit.org/show_bug.cgi?id=160683
<rdar://problem/29040652>

Reviewed by Antti Koivisto.

Source/WebCore:

Allow external stylesheets within a shadow tree by storing the appropriate style scope in HTMLLinkElement
when it's connected to a document instead of always talking to document's style scope.

Also improve ShadowRoot's insertedInto and removedFrom so that they only try to add and remove itself from
m_inDocumentShadowRoots when the connected-ness changes.

This patch also removes the superfluous call to notifyChildNodeRemoved in Element::removeShadowRoot to
avoid invoking notifyChildNodeRemoved during a document teardown, which is incorrect. It's sufficient that
~ShadowRoot calls ContainerNode::removeDetachedChildren(), and in turn removeDetachedChildrenInContainer()
since the latter function tears down nodes via the deletion queue during a document destruction and use
notifyChildNodeRemoved() on nodes that outlive the shadow root.

Tests: fast/shadow-dom/link-element-in-shadow-tree.html
       fast/shadow-dom/selected-stylesheet-in-shadow-tree.html

       * dom/Document.cpp:
       (WebCore::Document::didInsertInDocumentShadowRoot): Assert that the shadow root is not in the set.
       (WebCore::Document::didRemoveInDocumentShadowRoot): Assert that the shadow root is not in the document as
       this function is now called after Node::removedFrom in ShadowRoot::removedFrom.
       * dom/Element.cpp:
       (WebCore::Element::removeShadowRoot): See the description above.
       * dom/ShadowRoot.cpp:
       (WebCore::ShadowRoot::insertedInto): Only call didInsertInDocumentShadowRoot when the this shadow root is
       newly connected to a document so we can add assertions in didInsertInDocumentShadowRoot.
       (WebCore::ShadowRoot::removedFrom): Ditto for the removal.
       * html/HTMLLinkElement.cpp:
       (WebCore::HTMLLinkElement::HTMLLinkElement):
       (WebCore::HTMLLinkElement::~HTMLLinkElement):
       (WebCore::HTMLLinkElement::setDisabledState): Exit early when the element is not in a document as invoking
       didChangeActiveStyleSheetCandidates would require having a valid m_styleScope and process() already exits
       early when inDocument() is false.
       (WebCore::HTMLLinkElement::parseAttribute):
       (WebCore::HTMLLinkElement::process): Removed the early exit for when the element is in a shadow tree.
       (WebCore::HTMLLinkElement::insertedInto): Exit early unless this element has just become connected to
       a document instead of whenever its self-inclusive ancestor is inserted into a container.
       (WebCore::HTMLLinkElement::removedFrom): Ditto for removal. Also call removeStyleSheetCandidateNode after
       calling removePendingSheet since the latter depends on m_styleScope being not null.
       (WebCore::HTMLLinkElement::addPendingSheet):
       (WebCore::HTMLLinkElement::removePendingSheet):
       * html/HTMLLinkElement.h:
       * html/HTMLStyleElement.cpp:
       (WebCore::HTMLStyleElement::insertedInto): Only call inline style owner's insertedIntoDocument if this
       element has just become connected to a document.
       (WebCore::HTMLStyleElement::removedFrom): Ditto for the removal.
       * style/StyleScope.h:
       * svg/SVGStyleElement.cpp:
       (WebCore::SVGStyleElement::insertedInto): Ditto.
       (WebCore::SVGStyleElement::removedFrom): Ditto for the removal.

LayoutTests:

Added W3C style testharness.js tests for loading stylesheets via a link element inside a ahadow tree.

* fast/shadow-dom/link-element-in-shadow-tree-expected.txt: Added.
* fast/shadow-dom/link-element-in-shadow-tree.html: Added.
* fast/shadow-dom/resources/green-host.css: Added.
* fast/shadow-dom/selected-stylesheet-in-shadow-tree-expected.txt: Added.
* fast/shadow-dom/selected-stylesheet-in-shadow-tree.html: Added.

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

4 years ago[CSS Parser] Clean up new parser's grid layout ifdefs/runtime checking
hyatt@apple.com [Wed, 2 Nov 2016 21:30:58 +0000 (21:30 +0000)]
[CSS Parser] Clean up new parser's grid layout ifdefs/runtime checking
https://bugs.webkit.org/show_bug.cgi?id=164341

Reviewed by Dean Jackson.

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeGridTrackRepeatFunction):
(WebCore::consumeGridTrackList):
(WebCore::CSSPropertyParser::parseSingleValue):

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

4 years agoRemove Battery Status API from the tree
achristensen@apple.com [Wed, 2 Nov 2016 21:29:43 +0000 (21:29 +0000)]
Remove Battery Status API from the tree
https://bugs.webkit.org/show_bug.cgi?id=164213

Reviewed by Sam Weinig.

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/WebCore:

* CMakeLists.txt:
* DerivedSources.cpp:
* Modules/battery: Removed.
* Modules/battery/BatteryClient.h: Removed.
* Modules/battery/BatteryController.cpp: Removed.
* Modules/battery/BatteryController.h: Removed.
* Modules/battery/BatteryManager.cpp: Removed.
* Modules/battery/BatteryManager.h: Removed.
* Modules/battery/BatteryManager.idl: Removed.
* Modules/battery/BatteryStatus.cpp: Removed.
* Modules/battery/BatteryStatus.h: Removed.
* Modules/battery/NavigatorBattery.cpp: Removed.
* Modules/battery/NavigatorBattery.h: Removed.
* Modules/battery/NavigatorBattery.idl: Removed.
* PlatformEfl.cmake:
* dom/EventTargetFactory.in:
* platform/efl/BatteryProviderEfl.cpp: Removed.
* platform/efl/BatteryProviderEfl.h: Removed.
* platform/efl/BatteryProviderEflClient.h: Removed.
* platform/glib/BatteryProviderUPower.cpp: Removed.
* platform/glib/BatteryProviderUPower.h: Removed.
* platform/glib/BatteryProviderUPowerClient.h: Removed.
* testing/Internals.cpp:
(WebCore::Internals::setBatteryStatus): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

* CMakeLists.txt:
* PlatformEfl.cmake:
* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* Shared/WebBatteryStatus.cpp: Removed.
* Shared/WebBatteryStatus.h: Removed.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKBatteryManager.cpp: Removed.
* UIProcess/API/C/WKBatteryManager.h: Removed.
* UIProcess/API/C/WKBatteryStatus.cpp: Removed.
* UIProcess/API/C/WKBatteryStatus.h: Removed.
* UIProcess/API/C/WKContext.cpp:
(WKContextGetBatteryManager): Deleted.
* UIProcess/API/C/WKContext.h:
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/ewk_main.cpp:
(WebKit::EwkMain::initialize):
(WebKit::EwkMain::finalize):
(WebKit::EwkMain::shutdownInitializedEFLModules):
* UIProcess/API/gtk/WebKitBatteryProvider.cpp: Removed.
* UIProcess/API/gtk/WebKitBatteryProvider.h: Removed.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed):
* UIProcess/WebBatteryManagerProxy.cpp: Removed.
* UIProcess/WebBatteryManagerProxy.h: Removed.
* UIProcess/WebBatteryManagerProxy.messages.in: Removed.
* UIProcess/WebBatteryProvider.cpp: Removed.
* UIProcess/WebBatteryProvider.h: Removed.
* UIProcess/WebProcessPool.cpp:
(WebKit::m_hiddenPageThrottlingTimer):
* UIProcess/efl/BatteryProvider.cpp: Removed.
* UIProcess/efl/BatteryProvider.h: Removed.
* WebProcess/Battery: Removed.
* WebProcess/Battery/WebBatteryManager.cpp: Removed.
* WebProcess/Battery/WebBatteryManager.h: Removed.
* WebProcess/Battery/WebBatteryManager.messages.in: Removed.
* WebProcess/WebCoreSupport/WebBatteryClient.cpp: Removed.
* WebProcess/WebCoreSupport/WebBatteryClient.h: Removed.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_userInterfaceLayoutDirection):
* WebProcess/WebProcess.cpp:
(WebKit::m_resourceLoadStatisticsStorage):

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:
* Scripts/webkitpy/common/config/watchlist:

LayoutTests:

* batterystatus: Removed.
* batterystatus/add-listener-from-callback-expected.txt: Removed.
* batterystatus/add-listener-from-callback.html: Removed.
* batterystatus/basic-all-types-of-events-expected.txt: Removed.
* batterystatus/basic-all-types-of-events.html: Removed.
* batterystatus/basic-operation-expected.txt: Removed.
* batterystatus/basic-operation.html: Removed.
* batterystatus/event-after-navigation-expected.txt: Removed.
* batterystatus/event-after-navigation.html: Removed.
* batterystatus/multiple-frames-expected.txt: Removed.
* batterystatus/multiple-frames.html: Removed.
* batterystatus/resources: Removed.
* batterystatus/resources/event-after-navigation-new.html: Removed.
* batterystatus/script-tests: Removed.
* batterystatus/script-tests/add-listener-from-callback.js: Removed.
* batterystatus/script-tests/basic-all-types-of-events.js: Removed.
* batterystatus/script-tests/basic-operation.js: Removed.
* batterystatus/script-tests/event-after-navigation.js: Removed.
* batterystatus/script-tests/multiple-frames.js: Removed.
* batterystatus/script-tests/updates.js: Removed.
* batterystatus/script-tests/window-property.js: Removed.
* batterystatus/updates-expected.txt: Removed.
* batterystatus/updates.html: Removed.
* batterystatus/window-property-expected.txt: Removed.
* batterystatus/window-property.html: Removed.
* fast/dom/event-handler-attributes.html:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:

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

4 years agoCrash beneath SlotVisitor::drain @ cooksillustrated.com
msaboff@apple.com [Wed, 2 Nov 2016 21:09:35 +0000 (21:09 +0000)]
Crash beneath SlotVisitor::drain @ cooksillustrated.com
https://bugs.webkit.org/show_bug.cgi?id=164304

Reviewed by Mark Lam.

Added back write barrier for the base cell of put-by_id in the LLInt when the structure is
changed.  Also removed the unused macro "storeStructureWithTypeInfo".

* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

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

4 years agoNetworkSession: Add NetworkDataTask implementation for blobs
achristensen@apple.com [Wed, 2 Nov 2016 20:38:23 +0000 (20:38 +0000)]
NetworkSession: Add NetworkDataTask implementation for blobs
https://bugs.webkit.org/show_bug.cgi?id=163939

Source/WebCore:

Patch by Keith Rollin <krollin@apple.com> on 2016-11-02
Reviewed by Alex Christensen.

* WebCore.xcodeproj/project.pbxproj: Mark HTTPParsers.h and AsyncFileStream.h as private.
* fileapi/AsyncFileStream.h: Add WEBCORE_EXPORT to AsyncFileStream class.
* platform/network/BlobData.h: Add WEBCORE_EXPORT to length().
* platform/network/HTTPParsers.h: Add WEBCORE_EXPORT to parseRange().
* platform/network/ResourceResponseBase.h: Add WEBCORE_EXPORT to setHTTPHeaderField().

Source/WebCore/platform/gtk/po:

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2016-11-02
Reviewed by Alex Christensen.

* POTFILES.in: Remove DownloadSoup.cpp

Source/WebKit2:

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2016-11-02
Reviewed by Alex Christensen.

Add NetworkDataTaskBlob to handle blobs when using NetworkSession instead of using ResourceHandle. This patch
adds more USE(NETWORK_SESSION) ifdefs to not use ResourceHandle in Downloads and NetworkLoad when NetworkSession
is enabled.

* CMakeLists.txt: Add new files to compilation.
* NetworkProcess/Downloads/BlobDownloadClient.cpp:
* NetworkProcess/Downloads/BlobDownloadClient.h:
* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::Download): Split the constructor again and remove the PlatformDownloadTaskRef
definitions. Now Cocoa specific constructor receives a NSURLSessionDownloadTask and the general constructor
reveices a NetworkDataTask and is used by Soup backend and blobs.
(WebKit::Download::~Download):
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::cancel):
(WebKit::Download::didReceiveAuthenticationChallenge):
(WebKit::Download::didReceiveData):
(WebKit::Download::didFinish):
(WebKit::Download::platformCancelNetworkLoad): Rename cancelNetworkLoad() as platformCancelNetworkLoad() since
this is now used only by Cocoa platform to cancel the NSURLSessionDownloadTask.
* NetworkProcess/Downloads/Download.h:
(WebKit::Download::Download):
(WebKit::Download::suggestedName):
(WebKit::Download::request):
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload): Remove blobs specific code when using NetworkSession.
(WebKit::DownloadManager::continueDecidePendingDownloadDestination):
* NetworkProcess/Downloads/DownloadManager.h:
* NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
(WebKit::Download::platformCancelNetworkLoad):
* NetworkProcess/Downloads/soup/DownloadSoup.cpp: Removed.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Remove blobs specific code when
using NetworkSession.
* NetworkProcess/NetworkDataTask.cpp:
(WebKit::NetworkDataTask::create): If request is a blob, create a NetworkDataTaskBlob.
* NetworkProcess/NetworkDataTask.h: Add invalidateAndCancel pure virtual method.
* NetworkProcess/NetworkDataTaskBlob.cpp: Added.
(WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
(WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
(WebKit::NetworkDataTaskBlob::clearStream):
(WebKit::NetworkDataTaskBlob::resume):
(WebKit::NetworkDataTaskBlob::suspend):
(WebKit::NetworkDataTaskBlob::cancel):
(WebKit::NetworkDataTaskBlob::invalidateAndCancel):
(WebKit::NetworkDataTaskBlob::getSizeForNext):
(WebKit::NetworkDataTaskBlob::didGetSize):
(WebKit::NetworkDataTaskBlob::seek):
(WebKit::NetworkDataTaskBlob::didReceiveResponse):
(WebKit::NetworkDataTaskBlob::read):
(WebKit::NetworkDataTaskBlob::readData):
(WebKit::NetworkDataTaskBlob::readFile):
(WebKit::NetworkDataTaskBlob::didOpen):
(WebKit::NetworkDataTaskBlob::didRead):
(WebKit::NetworkDataTaskBlob::consumeData):
(WebKit::NetworkDataTaskBlob::setPendingDownloadLocation):
(WebKit::NetworkDataTaskBlob::suggestedFilename):
(WebKit::NetworkDataTaskBlob::download):
(WebKit::NetworkDataTaskBlob::writeDownload):
(WebKit::NetworkDataTaskBlob::cleanDownloadFiles):
(WebKit::NetworkDataTaskBlob::didFailDownload):
(WebKit::NetworkDataTaskBlob::didFinishDownload):
(WebKit::NetworkDataTaskBlob::didFail):
(WebKit::NetworkDataTaskBlob::didFinish):
* NetworkProcess/NetworkDataTaskBlob.h: Added.
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::NetworkLoad): Remove blobs specific code when using NetworkSession.
(WebKit::NetworkLoad::~NetworkLoad):
(WebKit::NetworkLoad::setDefersLoading):
(WebKit::NetworkLoad::cancel):
(WebKit::NetworkLoad::continueWillSendRequest):
(WebKit::NetworkLoad::continueDidReceiveResponse):
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::invalidateAndCancel): Moved from NetworkSessionSoup, since this is now used also by blobs.
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::registerNetworkDataTask): Ditto.
(WebKit::NetworkSession::unregisterNetworkDataTask): Ditto.
* NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Add invalidateAndCancel() implementation that does nothing
because in Cocoa all tasks are invalidated and canceled by the network session.
* NetworkProcess/mac/NetworkLoadMac.mm:
* NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
(WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
(WebKit::NetworkDataTaskSoup::download):
* NetworkProcess/soup/NetworkDataTaskSoup.h:
* NetworkProcess/soup/NetworkSessionSoup.cpp:
* NetworkProcess/soup/NetworkSessionSoup.h:
* PlatformEfl.cmake: Remove DownloadSoup.cpp from compilation.
* PlatformGTK.cmake: Ditto.
* WebKit2.xcodeproj/project.pbxproj: Add new files to compilation.

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

4 years ago[GTK] Use libgcrypt instead of GnuTLS for CryptoDigest and SubtleCrypto HMAC implemen...
commit-queue@webkit.org [Wed, 2 Nov 2016 20:05:41 +0000 (20:05 +0000)]
[GTK] Use libgcrypt instead of GnuTLS for CryptoDigest and SubtleCrypto HMAC implementation
https://bugs.webkit.org/show_bug.cgi?id=163125

Patch by Olivier Blin <olivier.blin@softathome.com> on 2016-11-02
Reviewed by Michael Catanzaro.

.:

* Source/cmake/OptionsGTK.cmake: Updated to use libgcrypt files instead of gnutls.
At least version 1.6.0 is needed for the HMAC APIs.
libgcrypt is now needed unconditionally for CryptoDigest, used by CSP.

Source/WebCore:

No new tests, already covered by existing SubtleCrypto tests.

* PlatformGTK.cmake: Use libgcrypt instead of gnutls.
* crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp: Added. Adapted from the GnuTLS backend.
(WebCore::getGCryptDigestAlgorithm):
(WebCore::calculateSignature):
(WebCore::CryptoAlgorithmHMAC::platformSign):
(WebCore::CryptoAlgorithmHMAC::platformVerify):
* platform/crypto/gcrypt/CryptoDigestGCrypt.cpp: Added. Adapted from the GnuTLS backend.
(WebCore::CryptoDigest::CryptoDigest):
(WebCore::CryptoDigest::~CryptoDigest):
(WebCore::CryptoDigest::create):
(WebCore::CryptoDigest::addBytes):
(WebCore::CryptoDigest::computeHash):

Tools:

* gtk/install-dependencies: List libgcrypt for WebKitGTK+ build, and gnutls for jhbuild only.
gnutls is useful for glib-networking in jhbuild.

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