Timeline



May 16, 2008:

11:43 PM Changeset in webkit [33549] by Stephanie Lewis
  • 6 edits in trunk

2008-05-16 Stephanie Lewis <Stephanie Lewis>

Reviewed by Steve.

Get pending unload event count from WebCore.

  • Interfaces/IWebFramePrivate.idl:
  • WebFrame.cpp: (WebFrame::pendingFrameUnloadEventCount):
  • WebFrame.h:

Print out pending unload event count. Also print out main framename to match Mac. +

  • DumpRenderTree/win/FrameLoadDelegate.cpp:

(descriptionSuitableForTestResult):
(FrameLoadDelegate::didFinishDocumentLoadForFrame):

10:34 PM Changeset in webkit [33548] by pewtermoose@webkit.org
  • 2 edits in trunk/WebKit/win

2008-05-16 Matt Lilek <webkit@mattlilek.com>

Rubber stamped by Oliver.

Remove the Drosera sub-project.

  • WebKit.vcproj/WebKit.sln:
9:21 PM Changeset in webkit [33547] by timothy@apple.com
  • 4 edits
    104 deletes in trunk/WebKitTools

Remove the Drosera project, code and resources since it has been
replaced with the Web Inspector's debugger. Removes references to
Drosera in various scripts and makefiles.

Rubber-stamped by Mark Rowe.

  • BuildSlaveSupport/build-launcher-app:
  • Drosera/DebuggerDocument.cpp: Removed.
  • Drosera/DebuggerDocument.h: Removed.
  • Drosera/Drosera.icns: Removed.
  • Drosera/DroseraWin.make: Removed.
  • Drosera/English.lproj/Debugger.nib/classes.nib: Removed.
  • Drosera/English.lproj/Debugger.nib/info.nib: Removed.
  • Drosera/English.lproj/Debugger.nib/keyedobjects.nib: Removed.
  • Drosera/English.lproj/MainMenu.nib/classes.nib: Removed.
  • Drosera/English.lproj/MainMenu.nib/info.nib: Removed.
  • Drosera/English.lproj/MainMenu.nib/keyedobjects.nib: Removed.
  • Drosera/ForwardingHeaders/wtf/Assertions.h: Removed.
  • Drosera/ForwardingHeaders/wtf/HashTraits.h: Removed.
  • Drosera/ForwardingHeaders/wtf/Noncopyable.h: Removed.
  • Drosera/ForwardingHeaders/wtf/OwnPtr.h: Removed.
  • Drosera/ForwardingHeaders/wtf/Platform.h: Removed.
  • Drosera/ForwardingHeaders/wtf/RetainPtr.h: Removed.
  • Drosera/Images/Drosera.ico: Removed.
  • Drosera/Images/SourceArrow.png: Removed.
  • Drosera/Images/SourceArrowBlank.png: Removed.
  • Drosera/Images/SourceArrowOpen.png: Removed.
  • Drosera/Images/background_stripe.png: Removed.
  • Drosera/Images/breakPoint.tif: Removed.
  • Drosera/Images/breakPointDisabled.tif: Removed.
  • Drosera/Images/breakpointeditor.png: Removed.
  • Drosera/Images/close.tif: Removed.
  • Drosera/Images/close_active.tif: Removed.
  • Drosera/Images/close_hover.tif: Removed.
  • Drosera/Images/console.png: Removed.
  • Drosera/Images/continue.tif: Removed.
  • Drosera/Images/fileIcon.jpg: Removed.
  • Drosera/Images/finishFunction.tif: Removed.
  • Drosera/Images/glossyFooterFill.tif: Removed.
  • Drosera/Images/glossyHeader.png: Removed.
  • Drosera/Images/glossyHeaderPressed.png: Removed.
  • Drosera/Images/gradientBackground.png: Removed.
  • Drosera/Images/gutter.png: Removed.
  • Drosera/Images/navLeftDisabled.png: Removed.
  • Drosera/Images/navLeftNormal.png: Removed.
  • Drosera/Images/navLeftPressed.png: Removed.
  • Drosera/Images/navRightDisabled.png: Removed.
  • Drosera/Images/navRightNormal.png: Removed.
  • Drosera/Images/navRightPressed.png: Removed.
  • Drosera/Images/pause.tif: Removed.
  • Drosera/Images/popUpArrows.png: Removed.
  • Drosera/Images/programCounter.tif: Removed.
  • Drosera/Images/programCounterBreakPoint.tif: Removed.
  • Drosera/Images/programCounterBreakPointDisabled.tif: Removed.
  • Drosera/Images/run.tif: Removed.
  • Drosera/Images/siteCollapsed.tif: Removed.
  • Drosera/Images/siteExpanded.tif: Removed.
  • Drosera/Images/siteIcon.tif: Removed.
  • Drosera/Images/small.ico: Removed.
  • Drosera/Images/splitterBar.tif: Removed.
  • Drosera/Images/splitterDimple.tif: Removed.
  • Drosera/Images/step.tif: Removed.
  • Drosera/Images/stepOut.tif: Removed.
  • Drosera/Images/stepOver.tif: Removed.
  • Drosera/Images/stop.tif: Removed.
  • Drosera/Images/toolbarBackground.png: Removed.
  • Drosera/Images/verticalSplitterBar.tiff: Removed.
  • Drosera/Images/verticalSplitterDimple.tiff: Removed.
  • Drosera/Makefile: Removed.
  • Drosera/breakpointEditor.html: Removed.
  • Drosera/config.h: Removed.
  • Drosera/console.css: Removed.
  • Drosera/console.html: Removed.
  • Drosera/console.js: Removed.
  • Drosera/debugger.css: Removed.
  • Drosera/debugger.html: Removed.
  • Drosera/debugger.js: Removed.
  • Drosera/mac/DebuggerApplication.h: Removed.
  • Drosera/mac/DebuggerApplication.mm: Removed.
  • Drosera/mac/DebuggerClient.h: Removed.
  • Drosera/mac/DebuggerClient.mm: Removed.
  • Drosera/mac/DebuggerDocumentPlatform.mm: Removed.
  • Drosera/mac/Drosera.xcodeproj/project.pbxproj: Removed.
  • Drosera/mac/Info.plist: Removed.
  • Drosera/mac/LauncherInfo.plist: Removed.
  • Drosera/mac/Makefile: Removed.
  • Drosera/mac/ServerConnection.h: Removed.
  • Drosera/mac/ServerConnection.mm: Removed.
  • Drosera/mac/launcher.m: Removed.
  • Drosera/mac/main.m: Removed.
  • Drosera/viewer.css: Removed.
  • Drosera/viewer.html: Removed.
  • Drosera/win/BaseDelegate.h: Removed.
  • Drosera/win/DebuggerClient.cpp: Removed.
  • Drosera/win/DebuggerClient.h: Removed.
  • Drosera/win/DebuggerDocumentPlatform.cpp: Removed.
  • Drosera/win/Drosera.cpp: Removed.
  • Drosera/win/Drosera.h: Removed.
  • Drosera/win/Drosera.vcproj/Drosera.rc: Removed.
  • Drosera/win/Drosera.vcproj/Drosera.vcproj: Removed.
  • Drosera/win/DroseraPrefix.cpp: Removed.
  • Drosera/win/DroseraPrefix.h: Removed.
  • Drosera/win/Info.plist: Removed.
  • Drosera/win/ServerConnection.cpp: Removed.
  • Drosera/win/ServerConnection.h: Removed.
  • Drosera/win/resource.h: Removed.
  • Makefile:
  • Scripts/build-drosera: Removed.
  • Scripts/gdb-drosera: Removed.
  • Scripts/run-drosera: Removed.
  • Scripts/run-drosera-nightly.cmd: Removed.
  • Scripts/run-drosera.cmd: Removed.
  • Scripts/webkitdirs.pm:
6:46 PM SquirrelFish edited by ggaren@apple.com
(diff)
6:46 PM Changeset in webkit [33546] by beidson@apple.com
  • 6 edits in trunk/WebKit/win

2008-05-16 Brady Eidson <beidson@apple.com>

Reviewed by Steve Falkenburg


<rdar://problem/5942624> - Get LocalStorage persistence working on Windows


  • WebPreferenceKeysPrivate.h: Add the LocalStorageDirectory defaults key


  • WebPreferences.cpp: (WebPreferences::initializeDefaultSettings): (WebPreferences::localStorageDatabasePath): (WebPreferences::setLocalStorageDatabasePath):
  • WebPreferences.h:
  • Interfaces/IWebPreferencesPrivate.idl:
  • WebView.cpp: (WebView::initWithFrame): Set the path in the WebCore::Settings after new Page creation
6:16 PM Changeset in webkit [33545] by andersca@apple.com
  • 2 edits in trunk/WebCore

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Mitz.

Copy appcache headers.


  • WebCore.vcproj/WebCore.vcproj:
5:50 PM Changeset in webkit [33544] by Antti Koivisto
  • 3 edits
    2 adds in trunk

WebCore:

2008-05-16 Antti Koivisto <Antti Koivisto>

Reviewed by Anders.


Fix <rdar://problem/5934400>
Movie controller does not update on first load of http://www.apple.com/getamac/ads/


The issue is that we execute scripts while there are still pending stylesheet loads.
If the script depends on a stylesheet having been applied it may fail.


This will make external script execution block on external stylesheet loads. A full
fix (as discussed with Hyatt) will also need to block inline script execution.

Test: http/tests/local/stylesheet-and-script-load-order-http.html

  • html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::notifyFinished):

LayoutTests:

2008-05-16 Antti Koivisto <Antti Koivisto>

Reviewed by Anders.


Test for <rdar://problem/5934400>
Movie controller does not update on first load of http://www.apple.com/getamac/ads/

  • http/tests/local/stylesheet-and-script-load-order-http-expected.txt: Added.
  • http/tests/local/stylesheet-and-script-load-order-http.html: Added.
5:36 PM Changeset in webkit [33543] by mrowe@apple.com
  • 2 edits in tags/Safari-6526.6/WebCore

Merge r33497.

5:28 PM Changeset in webkit [33542] by Chris Fleizach
  • 2 edits in trunk/WebCore

<rdar://problem/5582483> Mail compose area needs to allow AXValue to be settable

5:27 PM Changeset in webkit [33541] by oliver@apple.com
  • 9 edits
    2 adds in branches/squirrelfish

Bug 19076: SquirrelFish: RegisterFile can be corrupted if implictly reenter global scope with no declared vars
<https://bugs.webkit.org/show_bug.cgi?id=19076>

Reviewed by Geoff

Don't delay allocation of initial global RegisterFile, as we can't guarantee we will be able
to allocate the global 'this' register safely at any point after initialisation of the Global
Object.

Unfortunately this initial allocation caused a regression of 0.2-0.3%, however this patch adds
support for the static slot optimisation for the global Math object which brings it to a 0.3%
progression.

5:23 PM Changeset in webkit [33540] by mrowe@apple.com
  • 4 edits in trunk

Versioning.

5:21 PM Changeset in webkit [33539] by mrowe@apple.com
  • 1 copy in tags/Safari-6526.6

New tag.

5:18 PM Changeset in webkit [33538] by Stephanie Lewis
  • 9 edits in trunk/WebCore

2008-05-16 Stephanie Lewis <Stephanie Lewis>

Reviewed by Maciej.

track onbeforeunlaod event counts. Pretty much identical to unload event tracking.
Also rename methods from onunload tracking to be more clear.

increment/decrement event counts when onunload and onbeforeunload events are added/removed

  • dom/Document.cpp: (WebCore::Document::removeHTMLWindowEventListener): (WebCore::Document::addWindowEventListener): (WebCore::Document::removeWindowEventListener): (WebCore::Document::addPendingFrameUnloadEventCount): (WebCore::Document::removePendingFrameUnloadEventCount): (WebCore::Document::addPendingFrameBeforeUnloadEventCount): (WebCore::Document::removePendingFrameBeforeUnloadEventCount):
  • dom/Document.h:


clear onunload count after unload events are dispatched

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading):

track onunload and onbeforeunload event counts for each frame

  • page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): (WebCore::EventHandler::addPendingFrameUnloadEventCount): (WebCore::EventHandler::removePendingFrameUnloadEventCount): (WebCore::EventHandler::clearPendingFrameUnloadEventCount): (WebCore::EventHandler::pendingFrameBeforeUnloadEventCount): (WebCore::EventHandler::addPendingFrameBeforeUnloadEventCount): (WebCore::EventHandler::removePendingFrameBeforeUnloadEventCount): (WebCore::EventHandler::clearPendingFrameBeforeUnloadEventCount):
  • page/EventHandler.h:


clear unbeforeunload count after unbeforeunload events are detached

  • page/Frame.cpp: (WebCore::Frame::shouldClose):

track total event count at page level

  • page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::changePendingUnloadEventCount): (WebCore::Page::pendingBeforeUnloadEventCount): (WebCore::Page::changePendingBeforeUnloadEventCount):
  • page/Page.h:
5:07 PM Changeset in webkit [33537] by andersca@apple.com
  • 4 edits in trunk

WebCore:

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Mitz.

<rdar://problem/5787788>
REGRESSION: fast/loader/xmlhttprequest-missing-file-exception.html fails on Windows.


Replicate the Mac behavior when a sync load fails.


  • platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::loadResourceSynchronously):

LayoutTests:

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Mitz.

<rdar://problem/5787788>
REGRESSION: fast/loader/xmlhttprequest-missing-file-exception.html fails on Windows.

Remove test from skipped list.


  • platform/win/Skipped:
5:02 PM SquirrelFish edited by ggaren@apple.com
(diff)
4:26 PM Changeset in webkit [33536] by andersca@apple.com
  • 2 edits in trunk/WebCore

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Brady.

Parse and set the headers on the response.

  • loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::store): (WebCore::parseHeader): (WebCore::parseHeaders): (WebCore::ApplicationCacheStorage::loadCache):
3:53 PM Changeset in webkit [33535] by timothy@apple.com
  • 10 edits
    3 deletes in trunk/WebKit

Removes WebScriptDebugServer files and related calls. This removes
the hooks that Drosera uses for debugging. Now that the Web Inspector
has a better debugger, we don't need these anymore.

Reviewed by Sam Weinig.

  • DefaultDelegates/WebScriptDebugServer.h: Removed.
  • DefaultDelegates/WebScriptDebugServer.m: Removed.
  • DefaultDelegates/WebScriptDebugServerPrivate.h: Removed.
  • WebCoreSupport/WebFrameLoaderClient.mm:
  • WebKit.exp:
  • WebView/WebScriptDebugDelegate.mm:
  • WebView/WebScriptDebugger.mm:

(WebScriptDebugger::sourceParsed):
(WebScriptDebugger::callEvent):
(WebScriptDebugger::atStatement):
(WebScriptDebugger::returnEvent):
(WebScriptDebugger::exception):

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):

  • WebView/WebViewPrivate.h:
3:30 PM Changeset in webkit [33534] by timothy@apple.com
  • 7 edits in trunk/WebCore

Adds the "this" object to the Local scope section of the
Scope Variables pane.

<rdar://problem/5774773> Web Inspector doesn't show the "this"
object in its variables list (10438)

Reviewed by Oliver Hunt.

  • bindings/js/JSJavaScriptCallFrameCustom.cpp:

(WebCore::JSJavaScriptCallFrame::thisObject): Returns the thisObject
of the JavaScriptCallFrame impl. Returns jsNull if the impl is invalid.

  • page/JavaScriptCallFrame.cpp:

(WebCore::JavaScriptCallFrame::thisObject): Return the thisValue from
the ExecState. Return 0 if m_exec is null.

  • page/JavaScriptCallFrame.h:
  • page/JavaScriptCallFrame.idl: Add thisObject.
  • page/inspector/ObjectPropertiesSection.js:

(WebInspector.ObjectPropertiesSection): Adds two new arguments.
The ignoreHasOwnProperty tells the section to show all properties,
including inherited ones. And extraProperties is an object of
additional properties to show.
(WebInspector.ObjectPropertiesSection.prototype): Honor the
extraProperties and ignoreHasOwnProperty properties.

  • page/inspector/ScopeChainSidebarPane.js:

(WebInspector.ScopeChainSidebarPane.prototype.update): Add a this
property to an extra object that is passed to the ObjectPropertiesSection.
Also pass true for ignoreHasOwnProperty since we want to show all properties.

3:26 PM Changeset in webkit [33533] by andersca@apple.com
  • 2 edits in trunk/WebCore

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Brady.

Add mimeType and textEncodingName to the resource table.


  • loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::openDatabase): (WebCore::ApplicationCacheStorage::store): (WebCore::ApplicationCacheStorage::loadCache):
3:23 PM Changeset in webkit [33532] by kmccullough@apple.com
  • 9 edits in trunk

JavaScriptCore:

2008-05-16 Kevin McCullough <kmccullough@apple.com>

Reviewed by Tim.

<rdar://problem/5770054> JavaScript profiler (10928)
Implement sorting for the profiler.
I chose to sort the profileNodes in place since there is no reason they
need to retain their original order.

  • JavaScriptCore.exp: Export the symbols.
  • profiler/Profile.h: Add the different ways a profile can be sorted. (KJS::Profile::sortTotalTimeDescending): (KJS::Profile::sortTotalTimeAscending): (KJS::Profile::sortSelfTimeDescending): (KJS::Profile::sortSelfTimeAscending): (KJS::Profile::sortCallsDescending): (KJS::Profile::sortCallsAscending):
  • profiler/ProfileNode.cpp: Implement those ways. (KJS::totalTimeDescendingComparator): (KJS::ProfileNode::sortTotalTimeDescending): (KJS::totalTimeAscendingComparator): (KJS::ProfileNode::sortTotalTimeAscending): (KJS::selfTimeDescendingComparator): (KJS::ProfileNode::sortSelfTimeDescending): (KJS::selfTimeAscendingComparator): (KJS::ProfileNode::sortSelfTimeAscending): (KJS::callsDescendingComparator): (KJS::ProfileNode::sortCallsDescending): (KJS::callsAscendingComparator): (KJS::ProfileNode::sortCallsAscending):
  • profiler/ProfileNode.h: No longer use a Deque since it cannot be sorted by std::sort and there was no reason not to use a Vector. I previously had though I would do prepending but am not. (KJS::ProfileNode::selfTime): (KJS::ProfileNode::totalPercent): (KJS::ProfileNode::selfPercent): (KJS::ProfileNode::children):
  • profiler/Profiler.cpp: Removed these functions as they can be called directoy on the Profile object after getting the Vector of them. (KJS::getStackNames):
  • profiler/Profiler.h:

WebCore:

2008-05-16 Kevin McCullough <kmccullough@apple.com>

Reviewed by Tim.

<rdar://problem/5770054> JavaScript profiler (10928)
Use a Vector instead of a Deque since we don't use the extra capabilities
of the Deque.

  • page/JavaScriptProfileNode.cpp: (WebCore::getChildren): (WebCore::toJS):
3:19 PM Changeset in webkit [33531] by beidson@apple.com
  • 2 edits in trunk/WebKit/mac

2008-05-16 Brady Eidson <beidson@apple.com>

Reviewed by Anders

<rdar://problem/5942616> - Need to standardize LocalStorage persistence path

Took the opportunity to touch up another pref that needs the same standardization.
That pref is currently not in use on Mac.

  • WebView/WebPreferences.m: (-[WebPreferences _setFTPDirectoryTemplatePath:]): (-[WebPreferences _localStorageDatabasePath]): (-[WebPreferences _setLocalStorageDatabasePath:]): (-[WebPreferences _ftpDirectoryTemplatePath]):
2:30 PM Changeset in webkit [33530] by timothy@apple.com
  • 2 edits in trunk/WebCore

Fix the build.

2:24 PM Changeset in webkit [33529] by andersca@apple.com
  • 3 edits in trunk/WebCore

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Brady.

Add a version table to the database.

  • loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::verifySchemaVersion): (WebCore::ApplicationCacheStorage::openDatabase):
  • loader/appcache/ApplicationCacheStorage.h:
2:10 PM Changeset in webkit [33528] by timothy@apple.com
  • 1 edit in trunk/WebCore/ChangeLog

Restore some ChangeLog entries I nuked in the previous commits.

1:47 PM Changeset in webkit [33527] by timothy@apple.com
  • 7 edits in trunk

Adds the ability to evaluate expressions in the local scope
of the selected call frame.

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

Reviewed by Geoff Garen.

  • bindings/js/JSJavaScriptCallFrameCustom.cpp:

(WebCore::JSJavaScriptCallFrame::evaluate): Pass the exception
from evaluate to the calling ExecState.

  • page/JavaScriptCallFrame.cpp:

(WebCore::JavaScriptCallFrame::evaluate): Added an exception out
argument. Simplified the code by calling KJS:eval directly.

  • page/JavaScriptCallFrame.h: Change evalutate to take an exception

out argument.

  • page/inspector/Console.js: Check if the debugger is paused and

call evaluateInSelectedCallFrame on the Scripts panel.

  • page/inspector/ScriptsPanel.js: Added a paused getter and

evaluateInSelectedCallFrame which does the evaluation and updates
the scope variables pane afterwards.

1:47 PM Changeset in webkit [33526] by timothy@apple.com
  • 2 edits in trunk/WebCore

Fixed the bug where the Inspector node highlight would not show
in the correct place for nodes in frames.

<rdar://problem/5712834> Elements in iframes are highlighted incorrectly (14408)

Reviewed by John Sullivan.

  • page/InspectorController.cpp:

(WebCore::convertFromFrameToMainFrame): Helper function to convert
IntRect coordinates from one frame to the main frame.
(WebCore::InspectorController::drawNodeHighlight): Call the
convertFromFrameToMainFrame helper for all the rects we get from
the node since they are in the owner frame's coordinate space.

1:46 PM Changeset in webkit [33525] by timothy@apple.com
  • 8 edits
    1 add in trunk/WebCore

Adds an error and warning count indicator at the bottom right in the
Inspector's status bar.

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

Initial implementation by Adam Roben.
Reviewed by Sam Weinig.

Test: manual-tests/inspector/error-warning-count.html

  • English.lproj/localizedStrings.js: Added new strings.
  • manual-tests/inspector/error-warning-count.html: Added.
  • page/inspector/Console.js:

(WebInspector.Console.prototype.show): Don't do anything if visible.
(WebInspector.Console.prototype.hide): Don't do anything if hidden.
Temporally set properties and classes to mimic the post-animation
values so panels like Elements in their updateStatusBarItems call will
size things to fit the final location.

  • page/inspector/ElementsPanel.js:

(WebInspector.ElementsPanel.prototype.updateBreadcrumbSizes):
Account for the #error-warning-count width when sizing breadcrumbs.

  • page/inspector/Resource.js:

(WebInspector.Resource.prototype.set errors): Update the global error count.
(WebInspector.Resource.prototype.set warnings): Update the global warning count.

  • page/inspector/inspector.css: Make .hidden's display property

!important to ensure things really hide, and added styling for the new

  • page/inspector/inspector.html: Added an #error-warning-count div

in the #anchored-status-bar-items div.

  • page/inspector/inspector.js:

(WebInspector.get errors): Added.
(WebInspector.set errors): Added. Calls _updateErrorAndWarningCounts.
(WebInspector.get warnings): Added.
(WebInspector.set warnings): Added. Calls _updateErrorAndWarningCounts.
(WebInspector._updateErrorAndWarningCounts): Added. Update the
(WebInspector.loaded): Add a click event listener to the
_updateErrorAndWarningCounts to display the initial error/warning counts.

1:38 PM Changeset in webkit [33524] by jchaffraix@webkit.org
  • 9 edits in trunk

WebCore:

2008-05-16 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Eric.

Preparatory work for bug 9191: JS*ElementWrapperFactory should be autogenerated

Make video tags use a header guard so that make_names.pl for factory generation.

  • Add video tag guard in HTMLTagNames.in & give an extraDefines parameter to make_names.pl when generating HTMLNames.
  • Modify the different build systems to accomodate the new parameter.
  • Small make_names.pl clean up (mainly code generated coding style issue).
  • DerivedSources.make: Add HTML_FLAGS and pass it to make_names.pl if it is defined (similar to SVG)
  • GNUmakefile.am: Add HTML_FEATURES & HTML_FLAGS and pass it to make_names.pl if HTML_FLAGS is defined.
  • WebCore.pro: Pass $${DEFINES} to make_names.pl.
  • dom/make_names.pl:
  • html/HTMLElement.cpp: (WebCore::inlineTagList): Add ENABLE(VIDEO) guard.
  • html/HTMLTagNames.in: Ditto.

2008-05-16 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Eric.

Preparatory work for bug 9191: JS*ElementWrapperFactory should be autogenerated

  • configure.ac: Add HTML_FLAGS and set it when video is enabled.
12:17 PM UsingGitWithWebKit edited by ddkilzer@apple.com
(diff)
11:47 AM Changeset in webkit [33523] by andersca@apple.com
  • 2 edits in trunk/WebCore

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Mitz.

Fire progress events.


  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::startLoadingEntry):
10:28 AM Changeset in webkit [33522] by andersca@apple.com
  • 2 edits in trunk/WebKitSite

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by Jess.

Add manifest MIME type.


  • .htaccess:
10:27 AM Changeset in webkit [33521] by andersca@apple.com
  • 4 edits in trunk/WebCore

2008-05-16 Anders Carlsson <andersca@apple.com>

Reviewed by John.

Handle the case where the main resource load is cancelled while the cache attempt is in progress.


  • loader/DocumentLoader.cpp: (WebCore::DocumentLoader::mainReceivedError): Tell the group that the main resource failed to load.


  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::failedLoadingMainResource): Call cacheUpdateFailed.


(WebCore::ApplicationCacheGroup::cacheUpdateFailed):
Stop loading if the update failed.


  • loader/appcache/ApplicationCacheGroup.h:
10:26 AM Changeset in webkit [33520] by Chris Fleizach
  • 10 edits in trunk

<rdar://problem/5710317> REGRESSION:Selecting ranges of text should be possible using the keyboard (15310)

Adds support to select text ranges when enhanced accessibility is turned on

10:25 AM Changeset in webkit [33519] by andersca@apple.com
  • 2 edits in trunk/LayoutTests

2008-05-15 Anders Carlsson <andersca@apple.com>

Update test results now that navigator.onLine exists.


  • fast/dom/Window/window-properties-expected.txt:
7:25 AM Changeset in webkit [33518] by Simon Hausmann
  • 8 edits in trunk

2008-05-15 Ariya Hidayat <ariya.hidayat@trolltech.com>

Reviewed by Simon.

Since WebKitGtk is fully using autotools now, clean-up the .pro/.pri files
from gtk-port.

5:06 AM Changeset in webkit [33517] by oliver@apple.com
  • 3 edits
    3 adds in branches/squirrelfish

Bug 19098: SquirrelFish: Ref'd temporaries can be clobbered
<https://bugs.webkit.org/show_bug.cgi?id=19098>

Patch from Cameron Zwarich
Reviewed by Oliver

When doing code generation for a statement list, increase the reference
count on a register that might eventually be returned, so that it doesn't
get clobbered by a request for a new temporary.

2:51 AM Changeset in webkit [33516] by mjs@apple.com
  • 3 edits
    6 adds in branches/squirrelfish

JavaScriptCore:

2008-05-16 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.


  • kjs/JSActivation.cpp: (KJS::JSActivation::copyRegisters): Use numLocals from the code block rather than the size of the symbol table for the number of registers to copy, to account for duplicate parameters and vars with the same name as parameters (we still have potentially suboptimal codegen in that we allocate a local register for the var in the latter case but it is never used).

LayoutTests:

2008-05-16 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fast/js/duplicate-param-crash-expected.txt: Added.
  • fast/js/duplicate-param-crash.html: Added.
  • fast/js/resources/duplicate-param-crash.js: Added.
  • fast/js/resources/var-shadows-arg-crash.js: Added.
  • fast/js/var-shadows-arg-crash-expected.txt: Added.
  • fast/js/var-shadows-arg-crash.html: Added.
12:22 AM Changeset in webkit [33515] by Simon Hausmann
  • 2 edits in trunk/WebCore

Fix the Gtk build.

12:12 AM Changeset in webkit [33514] by Simon Hausmann
  • 3 edits in trunk/WebCore

Fix the Qt build.

12:10 AM Changeset in webkit [33513] by rwlbuis@webkit.org
  • 3 edits
    2 adds in trunk

Reviewed by Dave Hyatt.

https://bugs.webkit.org/show_bug.cgi?id=17433
getComputedStyle() -> clip returns empty string

Make getComputedStyle return a shape value for clip
if it is set.

Tests: fast/css/getPropertyValue-clip.html

May 15, 2008:

10:53 PM Changeset in webkit [33512] by kevino@webkit.org
  • 4 edits in trunk

wx build fix. Add rendering/style to includes dir.

10:10 PM Changeset in webkit [33511] by kmccullough@apple.com
  • 2 edits in trunk/JavaScriptCore

2008-05-15 Kevin McCullough <kmccullough@apple.com>

  • Build fix.
8:27 PM Changeset in webkit [33510] by alice.liu@apple.com
  • 15 edits in trunk/WebCore

2008-05-15 Alice Liu <alice.liu@apple.com>

Reviewed by Beth Dakin.

Fixed <rdar://problem/5882283> Implement ARIA aria-activedescendant
Also added support for aria roles listbox and option, and aria-selected,
and aria-multiselectable for listboxes

  • dom/Element.cpp: (WebCore::Element::attributeChanged):
  • dom/Element.h:
  • dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged):
  • html/HTMLAttributeNames.in:
  • page/AXObjectCache.cpp: (WebCore::AXObjectCache::handleActiveDescendantChanged):
  • page/AXObjectCache.h: (WebCore::AXObjectCache::accessibilityEnabled): (WebCore::AXObjectCache::handleActiveDescendantChanged):
  • page/AccessibilityListBox.cpp: (WebCore::AccessibilityListBox::selectedChildren): (WebCore::AccessibilityListBox::visibleChildren):
  • page/AccessibilityListBox.h:
  • page/AccessibilityListBoxOption.h: (WebCore::AccessibilityListBoxOption::selectedChildren): (WebCore::AccessibilityListBoxOption::visibleChildren):
  • page/AccessibilityObject.cpp:
  • page/AccessibilityObject.h: (WebCore::AccessibilityObject::isListBox): (WebCore::AccessibilityObject::shouldFocusActiveDescendant): (WebCore::AccessibilityObject::activeDescendant): (WebCore::AccessibilityObject::handleActiveDescendantChanged):
  • page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::title): (WebCore::AccessibilityRenderObject::accessibilityShouldUseUniqueId): (WebCore::AccessibilityRenderObject::focusedUIElement): (WebCore::AccessibilityRenderObject::shouldFocusActiveDescendant): (WebCore::AccessibilityRenderObject::activeDescendant): (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged): (WebCore::RoleEntry::): (WebCore::AccessibilityRenderObject::ariaRoleAttribute): (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren): (WebCore::AccessibilityRenderObject::selectedChildren): (WebCore::AccessibilityRenderObject::ariaListboxVisibleChildren): (WebCore::AccessibilityRenderObject::visibleChildren):
  • page/AccessibilityRenderObject.h: (WebCore::AccessibilityRenderObject::isDetached):
  • page/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
8:20 PM Changeset in webkit [33509] by timothy@apple.com
  • 3 edits
    3 adds in trunk

Fixes a bug in the view source parsing of text within <script>,
<style>, <xmp>, <textarea> and other special tags. The text was
being parsed as HTML and would be syntax highlighted if a "<"
was encountered.

<rdar://problem/5790805> Inspector's source view missing some words,
doubles others in JS source in <script> tag (17752)

Reviewed by Dave Hyatt.

Added test: fast/frames/viewsource-plain-text-tags.html

  • html/HTMLTokenizer.cpp:

(WebCore::HTMLTokenizer::scriptHandler): Set scriptCodeSize and
scriptCodeResync to zero before an early return in view source mode.
This was causing text from a previous script tag to show up in
then next style tag.
(WebCore::HTMLTokenizer::parseTag): Enter an if block in view source
mode even if n is null. The n is property guarded in other places
and not used by view source mode. Removes a redundant null check on n.
Add a new null check of n before setting scriptSrcCharset. Other code
in HTMLTokenizer is already guarded for this code path.

8:20 PM Changeset in webkit [33508] by timothy@apple.com
  • 3 edits in trunk/WebCore

Changes the Web Inspector node highlight to be less aggressive
and only highlight when hovering over the selected node in the DOM
tree or breadcrumbs. You can highlight on hover for any node if
you hold down the Alt/Option key while hovering.

Reviewed by Kevin McCullough.

  • page/inspector/ElementsPanel.js:
  • page/inspector/inspector.js:
7:51 PM Changeset in webkit [33507] by kmccullough@apple.com
  • 5 edits in trunk/JavaScriptCore

2008-05-15 Kevin McCullough <kmccullough@apple.com>

Reviewed by Tim.

<rdar://problem/5770054> JavaScript profiler (10928)

  • Cache some values to save on computing them repetitively. This will be a big savings when we sort since we won't have to walk the tree for every comparison!
  • We cache these values when we end profiling because otherwise we won't know which profile to get the totalTime for the whole profile from without retaining a reference to the head profile or looking up the profile from the list of all profiles.
  • Also it's safe to assume we won't be asked for these values while we are still profiling since the WebInspector only get's profileNodes from profiles that are in the allProfiles() list and a profile is only added to that list after it has finished and these values will no longer change.
  • JavaScriptCore.exp:
  • profiler/ProfileNode.cpp: (KJS::ProfileNode::ProfileNode): (KJS::ProfileNode::stopProfiling): (KJS::ProfileNode::printDataInspectorStyle): (KJS::ProfileNode::printDataSampleStyle): (KJS::ProfileNode::endAndRecordCall):
  • profiler/ProfileNode.h: (KJS::ProfileNode::totalTime): (KJS::ProfileNode::selfTime): (KJS::ProfileNode::totalPercent): (KJS::ProfileNode::selfPercent):
  • profiler/Profiler.cpp: (KJS::Profiler::stopProfiling):
7:37 PM Changeset in webkit [33506] by Stephanie Lewis
  • 2 edits in trunk/WebKit/mac

2008-05-15 Stephanie Lewis <Stephanie Lewis>

fix mac build

  • WebView/WebView.mm: (-[WebView closeWithFastTeardown]):
7:31 PM Changeset in webkit [33505] by Stephanie Lewis
  • 2 edits in trunk/WebCore

2008-05-15 Stephanie Lewis <Stephanie Lewis>

Fix windows build

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading):
6:07 PM Changeset in webkit [33504] by Stephanie Lewis
  • 8 edits in trunk

2008-05-15 Stephanie Lewis <Stephanie Lewis>

Reviewed by Anders.

Turn on fast teardown. I added a preference for using full teardown because
the LEAKS output will be useless without a full teardown.

preference for fullteardown

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.m: (-[WebPreferences setFullDocumentTeardownEnabled:]): (-[WebPreferences fullDocumentTeardownEnabled]):
  • WebView/WebPreferencesPrivate.h:


on application quit dispatch unload events and destroy plugins then exit

  • WebView/WebView.mm: (-[WebView closeWithFastTeardown]): (-[WebView _close]):
  • WebView/WebViewPrivate.h:

export a symbol needed for fast teardown

  • WebCore.base.exp:
5:51 PM Changeset in webkit [33503] by Stephanie Lewis
  • 25 edits in trunk

2008-05-15 Stephanie Lewis <Stephanie Lewis>

Reviewed by Anders.

Keep track on pending unload event counts

No change in behavior so no new tests, but I am dumping the
unload event count to track the new variable.

  • WebCore.base.exp:

increment/decrement the count when an event is added/removed

  • dom/Document.cpp: (WebCore::Document::removeHTMLWindowEventListener): (WebCore::Document::addWindowEventListener): (WebCore::Document::removeWindowEventListener): (WebCore::Document::setPendingFrameUnloadEventCount):
  • dom/Document.h:

set the count to 0 for each frame after the unload event has been dispatched

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading):

keep track of the number of pending unload events for the eventHandler's frame

  • page/EventHandler.cpp: (WebCore::EventHandler::EventHandler):

(WebCore::EventHandler::pendingFrameUnloadEventCount):

(WebCore::EventHandler::setPendingFrameUnloadEventCount):

  • page/EventHandler.h:

keep track of the total number of pending unload events for all of the frames

  • page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::pendingUnloadEventCount): (WebCore::Page::setPendingUnloadEventCount):

age/Page.h:

get the pending frame unload count from WebCore

  • WebView/WebFrame.mm: (-[WebFrame _pendingFrameUnloadEventCount]):
  • WebView/WebFramePrivate.h:

Dump the unload count for a frame after parsing is finished.

  • DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate webView:didFinishDocumentLoadForFrame:]):

Dump unload event counts for frames.

  • fast/dom/Window/get-set-properties-expected.txt:
  • fast/events/onunload-expected.txt:
  • fast/events/onunload-not-on-body-expected.txt:
  • fast/events/onunload-window-property-expected.txt:
  • fast/forms/button-state-restore-expected.txt:
  • fast/history/history_reload-expected.txt:
  • fast/loader/onunload-form-submit-crash-2-expected.txt:
  • fast/loader/onunload-form-submit-crash-expected.txt:
  • http/tests/xmlhttprequest/xhr-onunload-expected.txt:
  • platform/mac/fast/loader/start-load-in-unload-expected.txt:
4:40 PM Changeset in webkit [33502] by sfalken@apple.com
  • 2 edits in trunk/WebCore

2008-05-15 Steve Falkenburg <sfalken@apple.com>

Fix build.

  • WebCore.vcproj/WebCore.vcproj:
4:39 PM Changeset in webkit [33501] by sullivan@apple.com
  • 2 edits in trunk/WebKit/mac

2008-05-15 John Sullivan <sullivan@apple.com>

Reviewed by Kevin Decker


  • fixed <rdar://problem/5940275> Inspector highlighting moves to bottom-left corner of screen when new tab appears


The highlight should go away entirely, but this simple patch just makes it not jump away.
The issue with it not going away entirely is harder to fix and covered by <rdar://problem/5322306>

  • WebInspector/WebNodeHighlight.m: (-[WebNodeHighlight _repositionHighlightWindow]): Bail out if target view isn't in a window
4:37 PM Changeset in webkit [33500] by Stephanie Lewis
  • 10 edits in trunk/WebKit/mac

2008-05-15 Stephanie Lewis <Stephanie Lewis>

Reviewed by Anders.

Track views that contain plugin instances so that they can be destroyed at application
quit without walking the entire document tree.

Add/Remove Netscape plugin views from instance list. Start/stop are when netscape
plugins are created and destroyed

  • Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView start]): (-[WebBaseNetscapePluginView stop]):


Add/remove WebKit plugin views from instance list

  • Plugins/WebPluginController.mm: (-[WebPluginController addPlugin:]): (-[WebPluginController destroyPlugin:]): (-[WebPluginController destroyAllPlugins]):

Add a set of views with plugin instances to the WebPluginDatabase

  • Plugins/WebPluginDatabase.h:
  • Plugins/WebPluginDatabase.mm: (-[WebPluginDatabase init]): (-[WebPluginDatabase dealloc]): (-[WebPluginDatabase addPluginInstanceView:]): (-[WebPluginDatabase removePluginInstanceView:]): (-[WebPluginDatabase removePluginInstanceViewsFor:]): (-[WebPluginDatabase destroyAllPluginInstanceViews]):


Handle cases where plugin views are detached before the plugin is destroyed.

  • WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::detachedFromParent2): (WebFrameLoaderClient::transitionToCommittedFromCachedPage): (WebFrameLoaderClient::transitionToCommittedForNewPage):

Add plugin instances to the set in the WebPluginDatabase by way of the WebView

  • WebView/WebHTMLView.mm:


  • WebView/WebHTMLViewInternal.h:
  • WebView/WebView.mm: (-[WebView addPluginInstanceView:]): (-[WebView removePluginInstanceView:]): (-[WebView removePluginInstanceViewsFor:]):
  • WebView/WebViewInternal.h:
4:10 PM Changeset in webkit [33499] by beidson@apple.com
  • 4 edits in trunk/WebKit

WebKit/mac:

2008-05-15 Brady Eidson <beidson@apple.com>

Reviewed by Tim Hatcher

Until the settings/preferences equation can be reworked, we'll need to manually set the local storage path
before setting the page group of the new page.


  • WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): Set the LocalStorage path immediately after creating the page so it is in place for initializing the LocalStorageThread

WebKit/win:

2008-05-06 Brady Eidson <beidson@apple.com>

Reviewed by Tim Hatcher

Until the settings/preferences equation can be reworked, we'll need to manually set the local storage path
before setting the page group of the new page.

Since I still need to add the local storage path to WebPreferences on Windows, mark this with a FIXME for now.

  • WebView.cpp: (WebView::initWithFrame): Mark an important FIXME for setting the LocalStorage path as appropriate. Until this FIXME is handled, Windows will have no persistent LocalStorage
4:03 PM Changeset in webkit [33498] by sfalken@apple.com
  • 2 edits in trunk/WebCore

2008-05-15 Steve Falkenburg <sfalken@apple.com>

Fix build.

  • WebCore.vcproj/WebCore.vcproj:
3:25 PM Changeset in webkit [33497] by sfalken@apple.com
  • 2 edits in trunk/WebCore

2008-05-15 Steve Falkenburg <sfalken@apple.com>

Fix build.

  • WebCore.vcproj/WebCore.vcproj:
2:08 PM Changeset in webkit [33496] by ddkilzer@apple.com
  • 3 edits
    2 adds in trunk

WebCore:

Bug 19085: font-family: initial sets font-family differently than font: initial

<https://bugs.webkit.org/show_bug.cgi?id=19085>
<rdar://problem/5939391>

Reviewed by David Hyatt.

Test: fast/css/font-family-initial.html

  • css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Don't set family if first family of initial font description is empty.

LayoutTests:

Bug 19085: font-family: initial sets font-family differently than font: initial

<https://bugs.webkit.org/show_bug.cgi?id=19085>
<rdar://problem/5939391>

Reviewed by David Hyatt.

  • fast/css/font-family-initial-expected.txt: Added.
  • fast/css/font-family-initial.html: Added.
2:00 PM Changeset in webkit [33495] by hyatt@apple.com
  • 6 edits
    2 moves
    1 add in trunk/WebCore

2008-05-15 David Hyatt <hyatt@apple.com>

Move RenderStyle into a new subdirectory, rendering/style/, in preparation for breaking it up into
a bunch of smaller files.

Reviewed by Dan Bernstein

  • GNUmakefile.am:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • WebCoreSources.bkl:
  • rendering/RenderStyle.cpp: Removed.
  • rendering/RenderStyle.h: Removed.
  • rendering/style: Added.
  • rendering/style/RenderStyle.cpp: Copied from rendering/RenderStyle.cpp.
  • rendering/style/RenderStyle.h: Copied from rendering/RenderStyle.h.
1:42 PM Changeset in webkit [33494] by ddkilzer@apple.com
  • 2 edits in trunk/WebCore

Fix leaks when stopping a page from loading

Patch suggested by Antti. Reviewed by Antti.

  • loader/DocLoader.cpp: (WebCore::DocLoader::clearPreloads): If a resource is in m_preloads but never made it to the cache, delete it to prevent it from leaking.
12:58 PM Changeset in webkit [33493] by timothy@apple.com
  • 2 edits in trunk/WebKit/mac

Fixes the bug where the Web Inspector would flash white while resizing.
This was cause by deferring the window creation.

<rdar://problem/5873549> REGRESSION: Inspector flickers horribly while resizing (17979)

Reviewed by Darin Adler.

  • WebCoreSupport/WebInspectorClient.mm:

(-[WebInspectorWindowController window]): Don't defer the window creation.

12:49 PM Changeset in webkit [33492] by jchaffraix@webkit.org
  • 3 edits
    2 adds in trunk

WebCore:

2008-05-15 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Darin.

https://bugs.webkit.org/show_bug.cgi?id=13942
ASSERTION FAILED: !attrName.contains('/') in HTMLTokenizer.cpp:132 when loading http://bamanzi.blogeden.cn/

In HTML, when an attribute was null (for example when we parse '="somevalue"'
(attribute forgotten or there is a space between the attribute and the '=')),
the fallback was to assign the value to the attribute. However if the value was
a url or did contain a '/', we would trigger the assertion.

To avoid that, we check the value before assigning it now and do not assign it
if it means adding a '/'.

Test: fast/parser/assertion-empty-attribute.html

  • html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseTag): Add check for '/' in value before assigning it to an attribute when the attribute is null.

LayoutTests:

2008-05-15 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Darin.

Test case for https://bugs.webkit.org/show_bug.cgi?id=13942
ASSERTION FAILED: !attrName.contains('/') in HTMLTokenizer.cpp:132 when loading http://bamanzi.blogeden.cn/

  • fast/parser/assertion-empty-attribute-expected.txt: Added.
  • fast/parser/assertion-empty-attribute.html: Added.
10:22 AM Changeset in webkit [33491] by ap@webkit.org
  • 9 edits in trunk

Reviewed by Dan Bernstein.

https://bugs.webkit.org/show_bug.cgi?id=10707
DumpRenderTree should not be able to access non-local resources

  • DumpRenderTree/mac/ResourceLoadDelegate.mm: (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]): Block them, and complain.
10:02 AM Changeset in webkit [33490] by ap@webkit.org
  • 2 edits in trunk/WebKit/mac

Tiger build fix.

  • Misc/WebNSAttributedStringExtras.mm: Import WebTypesInternal.h for NSUInteger.
9:18 AM Changeset in webkit [33489] by kevino@webkit.org
  • 2 edits in trunk/WebKitTools

wx build fix. Update the version of libpng to download and instsall.

8:52 AM Changeset in webkit [33488] by kevino@webkit.org
  • 4 edits
    6 adds in trunk/WebCore

wx build fix for recent breakages. Add EventLoopWx.cpp, update the Bakefiles, and add stubs for new Plugins functions. Also move plugin functions outside of TemporaryLinkStubs.cpp so that they are more noticeable.

7:51 AM Changeset in webkit [33487] by Simon Hausmann
  • 2 edits in trunk/WebCore

2008-05-15 Adam Treat <treat@kde.org>

Reviewed by Simon.

Don't try to setCompositionMode for devices that do not support PorterDuff

6:45 AM Changeset in webkit [33486] by ap@webkit.org
  • 7 edits in trunk

2008-05-15 Adele Peterson <adele@apple.com>

Reviewed and landed by Alexey.

Use TextIterator in +[NSAttributedString _web_attributedStringFromRange:].

6:25 AM Changeset in webkit [33485] by Simon Hausmann
  • 2 edits in trunk/JavaScriptCore

Simon Hausmann <shausman@trolltech.com>

Fix compilation when compiling with MSVC and wchar_t support.

5:45 AM Changeset in webkit [33484] by oliver@apple.com
  • 11 edits in branches/squirrelfish/JavaScriptCore

Revert "Bug 18626: SQUIRRELFISH: support the "slow script" dialog"

This seems to cause a significant perf regression on some systems

2:31 AM Changeset in webkit [33483] by oliver@apple.com
  • 11 edits in branches/squirrelfish/JavaScriptCore

Bug 18626: SQUIRRELFISH: support the "slow script" dialog
<https://bugs.webkit.org/show_bug.cgi?id=18626>

Reviewed by Maciej

Support the slow script dialog for for(;;), while, and do..while
loops.

12:26 AM Changeset in webkit [33482] by Simon Hausmann
  • 2 edits in trunk/WebCore

2008-05-15 Simon Hausmann <Simon Hausmann>

Fix the Qt build by adding NetworkStateNotifier.cpp to the build.

12:14 AM Changeset in webkit [33481] by ggaren@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-05-15 Geoffrey Garen <ggaren@apple.com>

Not reviewed.


We regret to inform you that your program is crashing because you were
stupid.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Math is hard.

May 14, 2008:

11:50 PM Changeset in webkit [33480] by ggaren@apple.com
  • 10 edits in branches/squirrelfish/JavaScriptCore

2008-05-14 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

A little more debugger action: filled in op_debug. All debugger control
flow works now, but variable inspection and backtraces still don't.


SunSpider reports no change.

  • VM/CodeGenerator.cpp: Changed op_debug to accept line number parameters.
  • VM/Machine.cpp: (KJS::Machine::getFunctionAndArguments): Moved op_debug into a NEVER_INLINE function to avoid a stunning 10% performance regression. Also factored out a common function for retrieving the function and arguments from a call frame.
  • kjs/JSActivation.cpp: (KJS::JSActivation::createArgumentsObject): Use the new factored out function mentioned above.
  • kjs/Parser.cpp: (KJS::Parser::parse): Increment m_sourceId before assigning it, so the sourceId we send to the debugger matches the sourceId recorded in the node.
  • kjs/nodes.cpp: Emit debugging hooks.
11:06 PM Changeset in webkit [33479] by mrowe@apple.com
  • 9 edits in tags/Safari-6526.5

Merge r33017.

10:52 PM Changeset in webkit [33478] by mrowe@apple.com
  • 4 edits in trunk

Versioning.

10:49 PM Changeset in webkit [33477] by mrowe@apple.com
  • 1 copy in tags/Safari-6526.5

New tag.

10:49 PM Changeset in webkit [33476] by mitz@apple.com
  • 3 edits
    2 adds in trunk

WebCore:

Reviewed by Mark Rowe.

  • fix <rdar://problem/5907633> Memory corruption after closing a document that uses box-reflect

Test: fast/reflections/teardown-crash.html

  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::~RenderLayer): Changed to not call removeLayers() on the reflection if the document is being destroyed, because in that case the layer tree is not being maintained.

LayoutTests:

Reviewed by Mark Rowe.

  • test for <rdar://problem/5907633> Memory corruption after closing a document that uses box-reflect
  • fast/reflections/teardown-crash-expected.txt: Added.
  • fast/reflections/teardown-crash.html: Added.
7:36 PM Changeset in webkit [33475] by kmccullough@apple.com
  • 2 edits in trunk/JavaScriptCore

2008-05-14 Kevin McCullough <kmccullough@apple.com>

Reviewed by Tim.

<rdar://problem/5770054> JavaScript profiler (10928)

  • Turn on the profiler.
  • kjs/config.h:
7:06 PM Changeset in webkit [33474] by kmccullough@apple.com
  • 4 edits in trunk

JavaScriptCore:

2008-05-14 Kevin McCullough <kmccullough@apple.com>

Reviewed by Tim.

<rdar://problem/5770054> JavaScript profiler (10928)

WebCore:

2008-05-14 Kevin McCullough <kmccullough@apple.com>

Reviewed by Tim.

<rdar://problem/5770054> JavaScript profiler (10928)

  • page/JavaScriptProfileNode.cpp: (WebCore::getTotalPercent): (WebCore::getSelfPercent): (WebCore::ProfileNodeClass):
6:59 PM Changeset in webkit [33473] by timothy@apple.com
  • 2 edits
    1 add in trunk/WebCore

Fixes a crash in JavaScriptDebugServer::returnEvent when debugging
code that contains an eval. This change makes stepping into eval
code work as expected.

http://bugs.webkit.org/show_bug.cgi?id=19038

Reviewed by Kevin McCullough.

Tested with: manual-tests/inspector/returnEvent-crash.html

  • manual-tests/inspector/returnEvent-crash.html: Added.
  • page/JavaScriptDebugServer.cpp:

(WebCore::JavaScriptDebugServer::sourceParsed): Adds #ifdefed
debugging code to prevent the sourceID and URL.
(WebCore::updateCurrentCallFrame): Added. A helper function that
is called from all 4 of the debugger hooks below. This function will
update and/or create JavaScriptCallFrames to match the exec state,
sourceID and lineNumber passed into it. Contains #ifdefed debugging
code that was helpful while fixing this bug.
(WebCore::JavaScriptDebugServer::callEvent): Call updateCurrentCallFrame
before pauseIfNeeded.
(WebCore::JavaScriptDebugServer::atStatement): Ditto.
(WebCore::JavaScriptDebugServer::returnEvent): Ditto.
(WebCore::JavaScriptDebugServer::exception): Ditto.

6:31 PM Changeset in webkit [33472] by alp@webkit.org
  • 2 edits in trunk/WebCore

2008-05-14 Alp Toker <alp@nuanti.com>

GTK+ build fix for r33457. Add NetworkStateNotifier.cpp to the build.

  • GNUmakefile.am:
6:10 PM Changeset in webkit [33471] by kmccullough@apple.com
  • 1 edit in trunk/JavaScriptCore/ChangeLog

2008-05-14 Kevin McCullough <kmccullough@apple.com>

Giving credit where credit is due.

  • ChangeLog:
6:09 PM Changeset in webkit [33470] by kmccullough@apple.com
  • 5 edits in trunk/JavaScriptCore

2008-05-14 Kevin McCullough <kmccullough@apple.com>

Reviewed by Geoff and Sam.

<rdar://problem/5770054> JavaScript profiler (10928)
Add the ability to get percentages of total and self time for displaying
in the WebInspector.

  • profiler/Profile.h: (KJS::Profile::totalProfileTime):
  • profiler/ProfileNode.cpp: (KJS::ProfileNode::totalPercent): (KJS::ProfileNode::selfPercent):
  • profiler/ProfileNode.h:
  • profiler/Profiler.h: (KJS::Profiler::currentProfile):
6:06 PM Changeset in webkit [33469] by andersca@apple.com
  • 2 edits
    1 add in trunk/WebKitSite

2008-05-14 Anders Carlsson <andersca@apple.com>

Reviewed by Mitz.

Make our Sticky notes example an offline web app.

  • misc/DatabaseExample.html:
  • misc/DatabaseExample.manifest: Added.
6:02 PM Changeset in webkit [33468] by alp@webkit.org
  • 3 edits in trunk/WebCore

2008-05-14 Alp Toker <alp@nuanti.com>

GTK+ build fix. Include value.h from kjs, not JavaScriptCore.

  • page/JavaScriptProfile.cpp:
  • page/JavaScriptProfileNode.cpp:
5:43 PM Changeset in webkit [33467] by Adam Roben
  • 2 edits in trunk/WebCore

Windows release build fix

  • WebCore.vcproj/WebCore.vcproj: Make sure the warnings we disable on XPathGrammar.cpp are disabled for all configurations, not just Debug_Internal.
5:25 PM Changeset in webkit [33466] by kmccullough@apple.com
  • 17 edits
    5 moves in trunk

JavaScriptCore:

2008-05-14 Kevin McCullough <kmccullough@apple.com>

Reviewed by Sam.

<rdar://problem/5770054> JavaScript profiler (10928)

  • Rename FunctionCallProfile to ProfileNode.
  • GNUmakefile.am:
  • JavaScriptCore.exp:
  • JavaScriptCore.pri:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • JavaScriptCoreSources.bkl:
  • profiler/FunctionCallProfile.cpp: Removed.
  • profiler/FunctionCallProfile.h: Removed.
  • profiler/Profile.cpp: (KJS::Profile::Profile): (KJS::Profile::willExecute):
  • profiler/Profile.h: (KJS::Profile::callTree):
  • profiler/ProfileNode.cpp: Copied from profiler/FunctionCallProfile.cpp. (KJS::ProfileNode::ProfileNode): (KJS::ProfileNode::willExecute): (KJS::ProfileNode::didExecute): (KJS::ProfileNode::addChild): (KJS::ProfileNode::findChild): (KJS::ProfileNode::stopProfiling): (KJS::ProfileNode::selfTime): (KJS::ProfileNode::printDataInspectorStyle): (KJS::ProfileNode::printDataSampleStyle): (KJS::ProfileNode::endAndRecordCall):
  • profiler/ProfileNode.h: Copied from profiler/FunctionCallProfile.h. (KJS::ProfileNode::create): (KJS::ProfileNode::children):
  • profiler/Profiler.cpp:

WebCore:

2008-05-14 Kevin McCullough <kmccullough@apple.com>

Reviewed by Sam.

<rdar://problem/5770054> JavaScript profiler (10928)

  • Rename FunctionCallProfile to ProfileNode
  • ForwardingHeaders/profiler/FunctionCallProfile.h: Removed.
  • ForwardingHeaders/profiler/ProfileNode.h: Copied from ForwardingHeaders/profiler/FunctionCallProfile.h.
  • GNUmakefile.am:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • WebCoreSources.bkl:
  • page/JavaScriptFunctionCallProfile.cpp: Removed.
  • page/JavaScriptFunctionCallProfile.h: Removed.
  • page/JavaScriptProfile.cpp:
  • page/JavaScriptProfileNode.cpp: Copied from page/JavaScriptFunctionCallProfile.cpp. (WebCore::ProfileNodeCache): (WebCore::getFunctionName): (WebCore::getTotalTime): (WebCore::getSelfTime): (WebCore::getNumberOfCalls): (WebCore::getChildren): (WebCore::finalize): (WebCore::ProfileNodeClass): (WebCore::toJS):
  • page/JavaScriptProfileNode.h: Copied from page/JavaScriptFunctionCallProfile.h.
5:02 PM Changeset in webkit [33465] by Beth Dakin
  • 6 edits in trunk/WebCore

2008-05-13 Beth Dakin <Beth Dakin>

Reviewed by Brady.

This patch adds support for the ARIA progressbar role and the
following ARIA states (ie HTML attributes): aria-checked, aria-
level, aria-pressed, aria-valuenow, aria-valuemin, and aria-
valuemax.

  • html/HTMLAttributeNames.in:
  • page/AccessibilityObject.h: (WebCore::AccessibilityObject::isProgressIndicator): (WebCore::AccessibilityObject::valueForRange): (WebCore::AccessibilityObject::maxValueForRange): (WebCore::AccessibilityObject::minValueForRange):
  • page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isProgressIndicator): (WebCore::AccessibilityRenderObject::isPressed): Check the aria- pressed attribute if this is an ARIA button. (WebCore::AccessibilityRenderObject::headingLevel): Check the aria- level attribute if this is an ARIA heading. (WebCore::AccessibilityRenderObject::intValue): Check the aria- checked attribute if this is an ARIA radio button or checkbox. (WebCore::AccessibilityRenderObject::valueForRange): (WebCore::AccessibilityRenderObject::maxValueForRange): (WebCore::AccessibilityRenderObject::minValueForRange): (WebCore::RoleEntry::): (WebCore::AccessibilityRenderObject::canSetValueAttribute):
  • page/AccessibilityRenderObject.h:
  • page/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilityAttributeNames]): (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
4:02 PM Changeset in webkit [33464] by kmccullough@apple.com
  • 6 edits in trunk

JavaScriptCore:

2008-05-14 Kevin McCullough <kmccullough@apple.com>

Reviewed by John.

<rdar://problem/5770054> JavaScript profiler (10928)

  • Have each FunctionCallProfile be able to return it's total and self time.
  • JavaScriptCore.exp:
  • profiler/FunctionCallProfile.cpp: (KJS::FunctionCallProfile::selfTime):
  • profiler/FunctionCallProfile.h: (KJS::FunctionCallProfile::totalTime):

WebCore:

2008-05-14 Kevin McCullough <kmccullough@apple.com>

Reviewed by John.

-<rdar://problem/5770054> JavaScript profiler (10928)
Use the FunctionCallProfile's new total and self time functions.

  • page/JavaScriptFunctionCallProfile.cpp: (WebCore::getTotalTime): (WebCore::getSelfTime):
3:50 PM Changeset in webkit [33463] by andersca@apple.com
  • 1 edit
    1 add in trunk/LayoutTests

2008-05-14 Anders Carlsson <andersca@apple.com>

Check in the test result.


  • http/tests/appcache/manifest-with-empty-file-expected.txt: Added.
3:44 PM Changeset in webkit [33462] by andersca@apple.com
  • 3 edits
    3 adds in trunk

WebCore:

2008-05-14 Anders Carlsson <andersca@apple.com>

Reviewed by Adam.

Don't try to store the resource data if it's empty.


  • loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::store):

LayoutTests:

2008-05-14 Anders Carlsson <andersca@apple.com>

Reviewed by Adam.

Add test where a manifest references an empty file.


  • http/tests/appcache/manifest-with-empty-file.html: Added.
  • http/tests/appcache/resources/empty.txt: Added.
  • http/tests/appcache/resources/manifest-with-empty-file.manifest: Added.
3:35 PM Changeset in webkit [33461] by Adam Roben
  • 3 edits in trunk/WebCore

Windows build fix

  • platform/network/NetworkStateNotifier.cpp: Added a missing #include.
  • platform/network/NetworkStateNotifier.h: (WebCore::NetworkStateNotifier::NetworkStateNotifier): Removed 'void' return type from the constructor, and fixed the spelling of a member variable.
3:26 PM Changeset in webkit [33460] by kmccullough@apple.com
  • 7 edits
    6 adds in trunk/WebCore

2008-05-14 Kevin McCullough <kmccullough@apple.com>

Reviewed by Adam.

<rdar://problem/5770054> JavaScript profiler (10928)

  • ForwardingHeaders/profiler/FunctionCallProfile.h: Added.
  • ForwardingHeaders/profiler/Profile.h: Added.
  • GNUmakefile.am: Add the new files to all the projects.
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • WebCoreSources.bkl:
  • page/InspectorController.cpp: Add the ability to retrieve all of the profiles in JavaScript from the InspectorController. (WebCore::allProfiles): (WebCore::InspectorController::windowScriptObjectAvailable):
  • page/JavaScriptFunctionCallProfile.cpp: Added. Wrapper around the JSC FunctionCallProfile. (WebCore::functionCallProfileCache): This cache makes sure we don't needlessly create duplicate wrappers around the same FunctionCallProfile*. (WebCore::getFunctionName): Callback to return the name of the function. (WebCore::getTotalTime): Callback to return the total time spent in the function. (WebCore::getSelfTime): Callback to return the time spent in self (total
  • time in children) in the function. (WebCore::getNumberOfCalls): Callback to return the number of times this function was called. (WebCore::getChildren): Callback to return the children of this function where the children are the functions this function called. (WebCore::finalize): Cleanup. (WebCore::functionCallProfileClass): Define the JSClassRef for this object. (WebCore::toJS): Create a conversion function to make a usable JSValue to wrap the FunctionCallProfile in JSC.
  • page/JavaScriptFunctionCallProfile.h: Added.
  • page/JavaScriptProfile.cpp: Added. Wrapper around the JSC Profile. (WebCore::profileCache): This cache makes sure we don't needlessly create duplicate wrappers aroudn the same Profile*. (WebCore::getHeadCallback): Callback to return the head of the graph of the functions profiled durring this profile's run. (WebCore::finalize): (WebCore::profileClass): Define the JSClassRef for this object. (WebCore::toJS): Create a conversion function to make a usable JSValue to wrap the Profile from JSC.
  • page/JavaScriptProfile.h: Added.
3:20 PM Changeset in webkit [33459] by Adam Roben
  • 2 edits in trunk/WebKit/win

Fix Bug 18767: Inspector is currently pretty much useless on Windows

<https://bugs.webkit.org/show_bug.cgi?id=18767>

Reviewed by Tim Hatcher.

  • WebCoreSupport/WebInspectorClient.cpp: (WebInspectorClient::highlight): Only move the highlight behind the Inspector window when first creating the highlight, not every time we update it.
3:07 PM Changeset in webkit [33458] by hyatt@apple.com
  • 2 edits
    2 adds in trunk

2008-05-14 David Hyatt <hyatt@apple.com>

Fix for bug https://bugs.webkit.org/show_bug.cgi?id=16130.

Opacity, transforms, reflections and masks should not honor z-index unless the element is also
positioned. Always reset to auto if the element is not positioned (and then the following code will
adjust auto to 0 as needed).

Reviewed by Dan Bernstein

  • css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle):
2:30 PM Changeset in webkit [33457] by andersca@apple.com
  • 8 edits
    3 adds in trunk/WebCore

2008-05-14 Anders Carlsson <andersca@apple.com>

Reviewed by Brady.

<rdar://problem/5931742> Support navigator.onLine from HTML5


  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj: Add NetworkStateNotifier files.


  • dom/EventNames.h: Add offline and online events.


  • page/Navigator.cpp: (WebCore::Navigator::onLine):
  • page/Navigator.h:
  • page/Navigator.idl: Add navigator.onLine.


  • page/Page.cpp: (WebCore::networkStateChanged): Dispatch offline/online events to all frames.


(WebCore::Page::Page):
Set state change callback.


  • platform/network/NetworkStateNotifier.cpp: Added.
  • platform/network/NetworkStateNotifier.h: Added.
  • platform/network/mac/NetworkStateNotifierMac.cpp: Added. Mac network state notifier.
2:26 PM Changeset in webkit [33456] by eric@webkit.org
  • 2 edits in trunk/WebKit/mac

Reviewed by Oliver.

Add missing NULL check to match rest of file, this was found by the editing fuzzer.

  • WebView/WebResource.mm: (-[WebResource data]):
2:17 PM Changeset in webkit [33455] by Adam Roben
  • 1 edit in trunk/WebCore/ChangeLog

Add some Bugzilla URLs

2:14 PM Changeset in webkit [33454] by Adam Roben
  • 2 edits in trunk/WebCore

Fix Bug 18888: REGRESSION (r32731): console.log always prints "undefined"

Reviewed by Tim Hatcher.

Tested by pre-existing
manual-tests/inspector/console-log-formatting.html.

  • page/inspector/Console.js: (WebInspector.ConsoleMessage.prototype._format): Changed to explicitly wrap Console._format instead of using bind to do it. Using bind was causing us to pass plainText in as the first parameter instead of as the second.
1:59 PM Changeset in webkit [33453] by timothy@apple.com
  • 2 edits in trunk/WebCore

Fixes the bug where stepping out of a function would show the wrong
call stack (would look like it stepped out twice.)

Reviewed by Adam Roben.

  • page/JavaScriptDebugServer.cpp:

(WebCore::JavaScriptDebugServer::returnEvent):
Call pauseIfNeeded before setting m_currentCallFrame to the caller.

1:40 PM Changeset in webkit [33452] by Stephanie Lewis
  • 2 edits in trunk/WebCore

2008-05-14 Stephanie Lewis <Stephanie Lewis>

Fix 64bit build

  • plugins/PluginView.h:
1:36 PM Changeset in webkit [33451] by ddkilzer@apple.com
  • 6 edits in trunk

WebCore:

REGRESSION (r26474): WebKit fails jQuery test 64 core module: text(String) subtest 1 Check escaped text (createTextNode)

<https://bugs.webkit.org/show_bug.cgi?id=18976>
<rdar://problem/5924793>

Reviewed by Darin.

Tests: fast/dom/dom-parse-serialize-expected.txt:

fast/xsl/xslt-processor-expected.txt:
fast/xsl/xslt-text-expected.txt:

Commit r26474 removed escaping of '>' characters to '&gt;' in serialized
HTML content, which broke one jQuery test. This change restores that
serialization behavior to both attributes and content for consistency.

  • editing/markup.cpp: (WebCore::appendAttributeValue): Escape '>' as '&gt;'. (WebCore::escapeContentText): Ditto. (WebCore::appendEscapedContent): Ditto. This is the bug fix for the jQuery test.

LayoutTests:

REGRESSION (r26474): WebKit fails jQuery test 64 core module: text(String) subtest 1 Check escaped text (createTextNode)

<https://bugs.webkit.org/show_bug.cgi?id=18976>
<rdar://problem/5924793>

Reviewed by Darin.

Updated test results now that '>' is escaped to '&gt;' in both
attributes and content.

  • fast/xsl/xslt-processor-expected.txt:
  • fast/xsl/xslt-text-expected.txt:
  • platform/mac/fast/dom/dom-parse-serialize-expected.txt:
1:04 PM Changeset in webkit [33450] by Adam Roben
  • 3 edits in trunk/WebCore

Fix Bug 19051: REGRESSION (r33447): Assertion in JSDebugServer::removeListener closing tab with Inspector open

m_inspectedPage is now cleared when the Page is destroyed, which never
used to happen. Some of InspectorController's code was not prepared
for this.

Reviewed by Dave Hyatt.

  • page/InspectorController.cpp: (WebCore::InspectorController::~InspectorController): Removed a call to stopDebugging and added an assertion. Debugging should have already been stopped by this point. (WebCore::InspectorController::inspectedPageDestroyed): Moved here from the header file. Added a call to stopDebugging. (WebCore::InspectorController::enabled): Return false if our inspected Page has already been destroyed, since we can't really do much at this point anyway. (WebCore::InspectorController::didCommitLoad): (WebCore::InspectorController::didLoadResourceFromMemoryCache): (WebCore::InspectorController::identifierForInitialRequest): (WebCore::InspectorController::startDebuggingAndReloadInspectedPage): (WebCore::InspectorController::stopDebugging): (WebCore::InspectorController::drawNodeHighlight): Assert that m_inspectedPage hasn't been cleared.
  • page/InspectorController.h:
12:30 PM Changeset in webkit [33449] by justin.garcia@apple.com
  • 10 edits in trunk

WebCore:

2008-05-14 Justin Garcia <justin.garcia@apple.com>

Reviewed by Darin.

<rdar://problem/5914803> Improve performance of WebCore::Editor::setComposition

  • editing/Editor.cpp: (WebCore::Editor::confirmComposition): Remove the previous composition when we insert the new one, not with a separate, slower, delete operation. (WebCore::Editor::setComposition): Ditto.
  • editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::performTrivialReplace): Remove the selected text with a low level operation that doesn't perform a layout and insert the new text in a way that won't trigger a layout from the removal. (WebCore::InsertTextCommand::input): Call the optimized replace.
  • editing/InsertTextCommand.h:
  • editing/htmlediting.cpp: (WebCore::isTabSpanNode): Check to see if the node is a span, to avoid the expense of getAttribute in the common case.
  • page/Frame.cpp: (WebCore::Frame::selectionLayoutChanged): Selection::start() and end() will already be at VisiblePosition deepEquivalents. Selection::validate() ensures this.

LayoutTests:

2008-05-14 Justin Garcia <justin.garcia@apple.com>

Reviewed by Darin.

<rdar://problem/5914803> Improve performance of WebCore::Editor::setComposition


Replacing all the text in a node is now much less likely to remove it
and cause selection changes.

  • platform/mac/editing/input/text-input-controller-expected.txt:
  • platform/mac/editing/inserting/4959067-expected.txt:
  • platform/mac/editing/style/style-3681552-fix-001-expected.txt:
12:01 PM Changeset in webkit [33448] by ap@webkit.org
  • 2 edits in trunk/WebKit/mac

Reviewed by Dan Bernstein.

NPP_ValidAttributesForMarkedText should return NSArray*, not NSArray.

  • Plugins/nptextinput.h:
11:33 AM Changeset in webkit [33447] by Adam Roben
  • 4 edits in trunk/WebCore

Make the Inspector able to handle being reloaded

When Reload was selected from the context menu in the Inspector, the
Inspector window would close and never be openable again. Now it
closes, then reopens when the page finishes loading.

Reviewed by Tim Hatcher.

  • page/InspectorController.cpp: (WebCore::InspectorController::close): Removed code that cleared out m_page. This is now handled by pageDestroyed.
  • page/InspectorController.h: (WebCore::InspectorController::inspectedPageDestroyed): Added.
  • page/Page.cpp: (WebCore::Page::~Page): Fixed a bug and added a call to the new inspectedPageDestroyed. If we have a parent InspectorController, that means that we are the Page in the Inspector's window (i.e., we are the Inspector's UI), so when we are destroyed we should call InspectorController::pageDestroyed. We also need to call inspectedPageDestroyed on our own InspectorController so that it won't try to call into us.
11:21 AM Changeset in webkit [33446] by jchaffraix@webkit.org
  • 3 edits in trunk/WebKitTools

2008-05-14 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Eric.


  • isDarwin() and isCygwin() returned an empty string if the platform equality check fails. We now force the return value to be numeric.
  • Removed platform checks as it was a work around the previous issue.
  • Replaced isDarwin() by isOSX() as they have now the same behaviour.
  • Scripts/build-webkit:
  • Scripts/webkitdirs.pm:
10:55 AM Changeset in webkit [33445] by timothy@apple.com
  • 8 edits
    1 add in trunk/WebCore

Add pause on exception support to the Inspector debugger
with a toggle buttons to enable or disable it.

Reviewed by Adam Roben.

  • page/InspectorController.cpp:

(WebCore::pauseOnExceptions): Call the InspectorController.
(WebCore::setPauseOnExceptions): Ditto.
(WebCore::InspectorController::windowScriptObjectAvailable): Add the new
setPauseOnExceptions and pauseOnExceptions functions to the JS class.
(WebCore::InspectorController::pauseOnExceptions): Call JavaScriptDebugServer.
(WebCore::InspectorController::setPauseOnExceptions): Ditto.

  • page/InspectorController.h:
  • page/JavaScriptDebugServer.cpp:

(WebCore::JavaScriptDebugServer::setPauseOnExceptions): Set m_pauseOnExceptions.
(WebCore::JavaScriptDebugServer::exception): Check m_pauseOnExceptions
and set m_pauseOnNextStatement to true before calling pauseIfNeeded.

  • page/JavaScriptDebugServer.h:
  • page/inspector/Images/pauseOnExceptionButtons.png: Added.
  • page/inspector/ScriptsPanel.js: Adds a status bar button that calls

the new InspectorController functions.

  • page/inspector/inspector.css: New styles.
10:55 AM Changeset in webkit [33444] by timothy@apple.com
  • 4 edits in trunk/WebCore

Rename the Scope Chain pane to Scope Variables. Name the global
object Global. Name objects before the locals "With Block".
Name colsure scopes "Closure". Name any element or document
after Local, "Event Target" and "Event Document", respectfully.

Reviewed by Adam Roben.

  • English.lproj/localizedStrings.js: Add new strings.
  • page/inspector/ObjectPropertiesSection.js:

(WebInspector.ObjectPropertiesSection): Add a new argument that is used
for the empty placeholder text.
(WebInspector.ObjectPropertiesSection.prototype.onpopulate): Use the
empty placeholder text.

  • page/inspector/ScopeChainSidebarPane.js:

(WebInspector.ScopeChainSidebarPane): Rename Scope Chain to Scope Variables.
(WebInspector.ScopeChainSidebarPane.prototype.update): Use the object name as
the subtitle. Use "Global" for the global object title. Use "With Block" for
the title of objects before the locals. Use "No Variables" for the empty
placeholder text for locals.

9:34 AM Changeset in webkit [33443] by ap@webkit.org
  • 3 edits
    3 adds in trunk

Reviewed by Darin.

<rdar://problem/5934376> REGRESSION: A script fails because of a straw BOM character in it.

<https://bugs.webkit.org/show_bug.cgi?id=4931>
Unicode format characters (Cf) should be removed from JavaScript source

Of all Cf characters, we are only removing BOM, because this is what Firefox trunk has
settled upon, after extensive discussion and investigation.

Based on Darin's work on this bug.

Test: fast/js/removing-Cf-characters.html

  • kjs/lexer.cpp: (KJS::Lexer::setCode): Tweak formatting. Use a call to shift(4) to read in the first characters, instead of having special case code here. (KJS::Lexer::shift): Add a loop when reading a character to skip BOM characters.
9:18 AM Changeset in webkit [33442] by ap@webkit.org
  • 3 edits
    2 adds in trunk

2008-05-14 Michael A. Puls II <shadow2531@gmail.com>

Reviewed by Alexey.

Fix for https://bugs.webkit.org/show_bug.cgi?id=16923
Attr nodes with a value of "" should not have any childNodes


In Opera, Firefox and IE, when an attribute node has a value
of "", the attribute node doesn't have any childNodes. This
is true in WebKit also, but not when you assign "" to the
Attr's value when the existing value is non-empty.


Test: fast/dom/attribute-empty-value-no-children.html

  • dom/Attr.cpp: (WebCore::Attr::setValue): Use createTextChild(), which only appends a child text node if the value being assigned is not empty.
8:50 AM Changeset in webkit [33441] by jchaffraix@webkit.org
  • 10 edits in trunk/WebCore

2008-05-14 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Eric.

GCC 4.3 build fix.
Removes some compiler warnings.

  • dom/Document.h: (WebCore::FormElementKey::hashTableDeletedValue): GCC complained about the const keyword so remove it as it is only used inside FormElementKey.
  • html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Correct coding style (removes a warning too).
  • loader/appcache/ApplicationCacheResource.cpp: Include stdio.h for gcc4.3 build.
  • plugins/PluginPackage.cpp: (WebCore::PluginPackage::PluginPackage): Changed initialization order in the constructor.
  • plugins/PluginView.cpp: (WebCore::PluginView::PluginView): Ditto.
  • plugins/PluginView.h:
  • xml/AccessControlList.cpp: Include stdio.h
  • xml/AccessItem.cpp: Ditto.
  • xml/AccessItemRule.cpp: Ditto.
7:31 AM Changeset in webkit [33440] by Simon Hausmann
  • 2 edits
    1 add in trunk/WebCore

2008-05-14 Ariya Hidayat <ariya.hidayat@trolltech.com>

Reviewed by Simon.

Qt build fix. Add JSJavaScriptCallFrameCustom.cpp to the build
and implemented EventLoopQt.

5:53 AM Changeset in webkit [33439] by Simon Hausmann
  • 2 edits in trunk/WebCore

2008-05-14 Ariya Hidayat <ariya.hidayat@trolltech.com>

Reviewed by Simon.

Qt build fix. Add JavaScriptCallFrame.{idl,cpp} to the build.

5:14 AM Changeset in webkit [33438] by oliver@apple.com
  • 6 edits
    2 adds in branches/squirrelfish

Bug 19024: SQUIRRELFISH: ASSERTION FAILED: activation->isActivationObject() in Machine::unwindCallFrame
<https://bugs.webkit.org/show_bug.cgi?id=19024>

Reviewed by Maciej

This fixes a number of issues. The most important is that we now check every register
file for tainting rather than just looking for function register files as that was
insufficient. Additionally guarded against implicit re-entry into Eval code.

Also added a few additional assertions to reduce the amout of time between something
going wrong and us seeing the error.

1:45 AM Changeset in webkit [33437] by ggaren@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-05-14 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.


A little more debugger action: emit opcodes for debugger hooks. Right
now, the opcode implementation is just a stub.


SunSpider reports no change.


Some example codegen for "function f() { 1; }":

[ 0] dbg DidEnterCallFrame
[ 2] dbg WillExecuteStatement
[ 4] load tr0, 1(@k0)
[ 7] load tr0, undefined(@k1)
[ 10] dbg WillLeaveCallFrame
[ 12] ret tr0

12:25 AM Changeset in webkit [33436] by oliver@apple.com
  • 3 edits
    2 adds in branches/squirrelfish

Bug 19025: SQUIRRELFISH: malformed syntax in onload handler causes crash
<https://bugs.webkit.org/show_bug.cgi?id=19025>

Reviewed by Geoff

Simple fix -- move the use of functionBodyNode to after the null check.

12:24 AM Changeset in webkit [33435] by oliver@apple.com
  • 3 edits
    1 copy
    2 adds in branches/squirrelfish/LayoutTests

Split the binops tests up a bit more

RS=Geoff

May 13, 2008:

11:32 PM Changeset in webkit [33434] by ggaren@apple.com
  • 4 edits
    2 adds in branches/squirrelfish

JavaScriptCore:

2008-05-13 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.


Fixed a codegen crash with run-time parse errors.


SunSpider reports no change.


emitThrowError needs to return the temporary holding the error, not dst,
since dst may be NULL. In fact, emitThrowError shouldn't take a dst
parameter at all, since exceptions should not modify the destination
register.

LayoutTests:

2008-05-13 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.


Added layout test for a codegen crash with run-time parse errors.

  • fast/js/exception-codegen-crash-expected.txt: Added.
  • fast/js/exception-codegen-crash.html: Added.
10:48 PM Changeset in webkit [33433] by oliver@apple.com
  • 3 edits
    1 copy
    1 add in branches/squirrelfish/LayoutTests

Splitting exception sequencing test as it was too long and made DRT unhappy
on non-MacPros.

RS=Geoff

10:25 PM Changeset in webkit [33432] by oliver@apple.com
  • 10 edits in branches/squirrelfish

Bug 19027: SquirrelFish: Incorrect codegen for pre-increment
<https://bugs.webkit.org/show_bug.cgi?id=19027>

Reviewed by Geoff

This fixes the codegen issues for the pre-inc/decrement operators
to prevent incorrectly clobbering the destination in the event of
an exception.

10:06 PM Changeset in webkit [33431] by mitz@apple.com
  • 216 edits
    4 adds in trunk

WebCore:

Reviewed by John Sullivan.

  • Windows part of <rdar://problem/5725912> improve render quality of transformed text
  • platform/graphics/win/FontCGWin.cpp: (WebCore::Font::drawGlyphs): Added call to wkSetCGContextFontRenderingStyle().

WebKitLibraries:

Reviewed by John Sullivan.

  • WebKitSystemInterface support for <rdar://problem/5725912> improve render quality of transformed text
  • libWebKitSystemInterfaceLeopard.a: Improved glyph positioning in transformed graphics contexts.
  • win/include/WebKitSystemInterface/WebKitSystemInterface.h: Added wkSetCGContextFontRenderingStyle().
  • win/lib/WebKitSystemInterface.lib: Updated.
  • win/lib/WebKitSystemInterface_debug.lib: Updated.

LayoutTests:

Reviewed by John Sullivan.

  • updated pixel results for <rdar://problem/5725912> improve render quality of transformed text
  • platform/mac-leopard/fast/backgrounds: Added.
  • platform/mac-leopard/fast/backgrounds/repeat: Added.
  • platform/mac-leopard/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.checksum: Added.
  • platform/mac-leopard/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png: Added.
  • platform/mac-leopard/svg/W3C-SVG-1.1/animate-elem-33-t-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/animate-elem-33-t-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/animate-elem-84-t-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/animate-elem-84-t-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/coords-trans-02-t-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/coords-trans-02-t-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/coords-trans-03-t-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/coords-trans-03-t-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/coords-trans-04-t-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/coords-trans-04-t-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/coords-trans-05-t-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/coords-trans-05-t-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/coords-trans-06-t-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/coords-trans-06-t-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/filters-color-01-b-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/filters-color-01-b-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/filters-composite-02-b-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/filters-example-01-b-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/filters-example-01-b-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/metadata-example-01-b-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/metadata-example-01-b-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/paths-data-04-t-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/paths-data-04-t-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/paths-data-05-t-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/paths-data-05-t-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/paths-data-06-t-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/paths-data-06-t-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/paths-data-07-t-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/paths-data-07-t-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/paths-data-08-t-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/paths-data-08-t-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/struct-frag-02-t-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/struct-frag-02-t-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/struct-frag-03-t-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/struct-frag-03-t-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/text-path-01-b-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/text-path-01-b-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/text-text-01-b-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/text-text-01-b-expected.png:
  • platform/mac-leopard/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.checksum:
  • platform/mac-leopard/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.png:
  • platform/mac-leopard/svg/batik/text/textAnchor-expected.checksum:
  • platform/mac-leopard/svg/batik/text/textAnchor-expected.png:
  • platform/mac-leopard/svg/batik/text/textEffect3-expected.checksum:
  • platform/mac-leopard/svg/batik/text/textEffect3-expected.png:
  • platform/mac-leopard/svg/batik/text/textFeatures-expected.checksum:
  • platform/mac-leopard/svg/batik/text/textFeatures-expected.png:
  • platform/mac-leopard/svg/batik/text/textGlyphOrientationHorizontal-expected.checksum:
  • platform/mac-leopard/svg/batik/text/textGlyphOrientationHorizontal-expected.png:
  • platform/mac-leopard/svg/batik/text/textLayout-expected.checksum:
  • platform/mac-leopard/svg/batik/text/textLayout-expected.png:
  • platform/mac-leopard/svg/batik/text/textLength-expected.checksum:
  • platform/mac-leopard/svg/batik/text/textLength-expected.png:
  • platform/mac-leopard/svg/batik/text/textOnPath-expected.checksum:
  • platform/mac-leopard/svg/batik/text/textOnPath-expected.png:
  • platform/mac-leopard/svg/batik/text/textOnPath2-expected.checksum:
  • platform/mac-leopard/svg/batik/text/textOnPath2-expected.png:
  • platform/mac-leopard/svg/batik/text/textOnPath3-expected.checksum:
  • platform/mac-leopard/svg/batik/text/textOnPath3-expected.png:
  • platform/mac-leopard/svg/batik/text/textOnPathSpaces-expected.checksum:
  • platform/mac-leopard/svg/batik/text/textOnPathSpaces-expected.png:
  • platform/mac-leopard/svg/batik/text/textProperties2-expected.checksum:
  • platform/mac-leopard/svg/batik/text/textProperties2-expected.png:
  • platform/mac-leopard/svg/batik/text/verticalText-expected.checksum:
  • platform/mac-leopard/svg/batik/text/verticalText-expected.png:
  • platform/mac-leopard/svg/batik/text/verticalTextOnPath-expected.checksum:
  • platform/mac-leopard/svg/batik/text/verticalTextOnPath-expected.png:
  • platform/mac-leopard/svg/carto.net/button-expected.checksum:
  • platform/mac-leopard/svg/carto.net/button-expected.png:
  • platform/mac-leopard/svg/carto.net/colourpicker-expected.checksum:
  • platform/mac-leopard/svg/carto.net/colourpicker-expected.png:
  • platform/mac-leopard/svg/carto.net/combobox-expected.checksum:
  • platform/mac-leopard/svg/carto.net/combobox-expected.png:
  • platform/mac-leopard/svg/carto.net/scrollbar-expected.checksum:
  • platform/mac-leopard/svg/carto.net/scrollbar-expected.png:
  • platform/mac-leopard/svg/carto.net/selectionlist-expected.checksum:
  • platform/mac-leopard/svg/carto.net/selectionlist-expected.png:
  • platform/mac-leopard/svg/carto.net/slider-expected.checksum:
  • platform/mac-leopard/svg/carto.net/slider-expected.png:
  • platform/mac-leopard/svg/carto.net/textbox-expected.checksum:
  • platform/mac-leopard/svg/carto.net/textbox-expected.png:
  • platform/mac-leopard/svg/carto.net/window-expected.checksum:
  • platform/mac-leopard/svg/carto.net/window-expected.png:
  • platform/mac-leopard/svg/custom/coords-relative-units-transforms-expected.checksum:
  • platform/mac-leopard/svg/custom/coords-relative-units-transforms-expected.png:
  • platform/mac-leopard/svg/custom/feComponentTransfer-Discrete-expected.checksum:
  • platform/mac-leopard/svg/custom/feComponentTransfer-Discrete-expected.png:
  • platform/mac-leopard/svg/custom/feComponentTransfer-Gamma-expected.checksum:
  • platform/mac-leopard/svg/custom/feComponentTransfer-Gamma-expected.png:
  • platform/mac-leopard/svg/custom/feComponentTransfer-Linear-expected.checksum:
  • platform/mac-leopard/svg/custom/feComponentTransfer-Linear-expected.png:
  • platform/mac-leopard/svg/custom/feComponentTransfer-Table-expected.checksum:
  • platform/mac-leopard/svg/custom/feComponentTransfer-Table-expected.png:
  • platform/mac-leopard/svg/custom/focus-ring-expected.checksum:
  • platform/mac-leopard/svg/custom/focus-ring-expected.png:
  • platform/mac-leopard/svg/custom/font-platformDestroy-crash-expected.checksum:
  • platform/mac-leopard/svg/custom/font-platformDestroy-crash-expected.png:
  • platform/mac-leopard/svg/custom/foreign-object-skew-expected.checksum:
  • platform/mac-leopard/svg/custom/foreign-object-skew-expected.png:
  • platform/mac-leopard/svg/custom/getTransformToElement-expected.checksum:
  • platform/mac-leopard/svg/custom/getTransformToElement-expected.png:
  • platform/mac-leopard/svg/custom/invalid-css-expected.checksum:
  • platform/mac-leopard/svg/custom/invalid-css-expected.png:
  • platform/mac-leopard/svg/custom/js-late-clipPath-and-object-creation-expected.checksum:
  • platform/mac-leopard/svg/custom/js-late-clipPath-and-object-creation-expected.png:
  • platform/mac-leopard/svg/custom/js-late-clipPath-creation-expected.checksum:
  • platform/mac-leopard/svg/custom/js-late-clipPath-creation-expected.png:
  • platform/mac-leopard/svg/custom/js-late-gradient-and-object-creation-expected.checksum:
  • platform/mac-leopard/svg/custom/js-late-gradient-and-object-creation-expected.png:
  • platform/mac-leopard/svg/custom/js-late-gradient-creation-expected.checksum:
  • platform/mac-leopard/svg/custom/js-late-gradient-creation-expected.png:
  • platform/mac-leopard/svg/custom/js-late-pattern-and-object-creation-expected.checksum:
  • platform/mac-leopard/svg/custom/js-late-pattern-and-object-creation-expected.png:
  • platform/mac-leopard/svg/custom/js-late-pattern-creation-expected.checksum:
  • platform/mac-leopard/svg/custom/js-late-pattern-creation-expected.png:
  • platform/mac-leopard/svg/custom/marker-default-width-height-expected.checksum:
  • platform/mac-leopard/svg/custom/marker-default-width-height-expected.png:
  • platform/mac-leopard/svg/custom/multiple-title-elements-expected.checksum:
  • platform/mac-leopard/svg/custom/multiple-title-elements-expected.png:
  • platform/mac-leopard/svg/custom/path-textPath-simulation-expected.checksum:
  • platform/mac-leopard/svg/custom/path-textPath-simulation-expected.png:
  • platform/mac-leopard/svg/custom/preserve-aspect-ratio-syntax-expected.checksum:
  • platform/mac-leopard/svg/custom/preserve-aspect-ratio-syntax-expected.png:
  • platform/mac-leopard/svg/custom/shapes-supporting-markers-expected.checksum:
  • platform/mac-leopard/svg/custom/shapes-supporting-markers-expected.png:
  • platform/mac-leopard/svg/custom/stroked-pattern-expected.checksum:
  • platform/mac-leopard/svg/custom/stroked-pattern-expected.png:
  • platform/mac-leopard/svg/custom/struct-use-09-b-expected.checksum:
  • platform/mac-leopard/svg/custom/struct-use-09-b-expected.png:
  • platform/mac-leopard/svg/custom/tref-update-expected.checksum:
  • platform/mac-leopard/svg/custom/tref-update-expected.png:
  • platform/mac-leopard/svg/custom/use-detach-expected.checksum:
  • platform/mac-leopard/svg/custom/use-detach-expected.png:
  • platform/mac-leopard/svg/custom/use-on-disallowed-foreign-object-1-expected.checksum:
  • platform/mac-leopard/svg/custom/use-on-disallowed-foreign-object-1-expected.png:
  • platform/mac-leopard/svg/custom/use-on-disallowed-foreign-object-2-expected.checksum:
  • platform/mac-leopard/svg/custom/use-on-disallowed-foreign-object-2-expected.png:
  • platform/mac-leopard/svg/custom/use-on-disallowed-foreign-object-3-expected.checksum:
  • platform/mac-leopard/svg/custom/use-on-disallowed-foreign-object-3-expected.png:
  • platform/mac-leopard/svg/custom/use-on-disallowed-foreign-object-4-expected.checksum:
  • platform/mac-leopard/svg/custom/use-on-disallowed-foreign-object-4-expected.png:
  • platform/mac-leopard/svg/custom/use-on-disallowed-foreign-object-5-expected.checksum:
  • platform/mac-leopard/svg/custom/use-on-disallowed-foreign-object-5-expected.png:
  • platform/mac-leopard/svg/custom/use-on-disallowed-foreign-object-6-expected.checksum:
  • platform/mac-leopard/svg/custom/use-on-disallowed-foreign-object-6-expected.png:
  • platform/mac-leopard/svg/custom/use-on-non-svg-namespaced-element-expected.checksum:
  • platform/mac-leopard/svg/custom/use-on-non-svg-namespaced-element-expected.png:
  • platform/mac-leopard/svg/custom/use-referencing-nonexisting-symbol-expected.checksum:
  • platform/mac-leopard/svg/custom/use-referencing-nonexisting-symbol-expected.png:
  • platform/mac-leopard/svg/custom/viewbox-syntax-expected.checksum:
  • platform/mac-leopard/svg/custom/viewbox-syntax-expected.png:
  • platform/mac-leopard/svg/hixie/text/003-expected.checksum:
  • platform/mac-leopard/svg/hixie/text/003-expected.png:
  • platform/mac-leopard/svg/hixie/text/003b-expected.checksum:
  • platform/mac-leopard/svg/hixie/text/003b-expected.png:
  • platform/mac-leopard/svg/text/text-align-01-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-align-01-b-expected.png:
  • platform/mac-leopard/svg/text/text-align-02-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-align-02-b-expected.png:
  • platform/mac-leopard/svg/text/text-align-03-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-align-03-b-expected.png:
  • platform/mac-leopard/svg/text/text-align-04-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-align-04-b-expected.png:
  • platform/mac-leopard/svg/text/text-align-05-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-align-05-b-expected.png:
  • platform/mac-leopard/svg/text/text-align-06-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-align-06-b-expected.png:
  • platform/mac-leopard/svg/text/text-altglyph-01-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-altglyph-01-b-expected.png:
  • platform/mac-leopard/svg/text/text-deco-01-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-deco-01-b-expected.png:
  • platform/mac-leopard/svg/text/text-fonts-01-t-expected.checksum:
  • platform/mac-leopard/svg/text/text-fonts-01-t-expected.png:
  • platform/mac-leopard/svg/text/text-fonts-02-t-expected.checksum:
  • platform/mac-leopard/svg/text/text-fonts-02-t-expected.png:
  • platform/mac-leopard/svg/text/text-intro-05-t-expected.checksum:
  • platform/mac-leopard/svg/text/text-intro-05-t-expected.png:
  • platform/mac-leopard/svg/text/text-path-01-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-path-01-b-expected.png:
  • platform/mac-leopard/svg/text/text-text-01-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-text-01-b-expected.png:
  • platform/mac-leopard/svg/text/text-text-03-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-text-03-b-expected.png:
  • platform/mac-leopard/svg/text/text-text-04-t-expected.checksum:
  • platform/mac-leopard/svg/text/text-text-04-t-expected.png:
  • platform/mac-leopard/svg/text/text-text-05-t-expected.checksum:
  • platform/mac-leopard/svg/text/text-text-05-t-expected.png:
  • platform/mac-leopard/svg/text/text-text-06-t-expected.checksum:
  • platform/mac-leopard/svg/text/text-text-06-t-expected.png:
  • platform/mac-leopard/svg/text/text-text-07-t-expected.checksum:
  • platform/mac-leopard/svg/text/text-text-07-t-expected.png:
  • platform/mac-leopard/svg/text/text-text-08-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-text-08-b-expected.png:
  • platform/mac-leopard/svg/text/text-tref-01-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-tref-01-b-expected.png:
  • platform/mac-leopard/svg/text/text-tselect-01-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-tselect-01-b-expected.png:
  • platform/mac-leopard/svg/text/text-tselect-02-f-expected.checksum:
  • platform/mac-leopard/svg/text/text-tselect-02-f-expected.png:
  • platform/mac-leopard/svg/text/text-tspan-01-b-expected.checksum:
  • platform/mac-leopard/svg/text/text-tspan-01-b-expected.png:
  • platform/mac-leopard/svg/text/text-ws-01-t-expected.checksum:
  • platform/mac-leopard/svg/text/text-ws-01-t-expected.png:
  • platform/mac-leopard/svg/text/text-ws-02-t-expected.checksum:
  • platform/mac-leopard/svg/text/text-ws-02-t-expected.png:
9:57 PM Changeset in webkit [33430] by ggaren@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-05-13 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.


A little more debugger action: supply a real line number, sourceId,
and sourceURL in op_new_error.


SunSpider reports a .2% speedup. Not sure what that's about.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Use the new good stuff in op_new_error.
  • kjs/nodes.cpp: (KJS::RegExpNode::emitCode): Use the shared emitThrowError instead of rolling our own.
8:38 PM Changeset in webkit [33429] by alp@webkit.org
  • 2 edits
    1 add in trunk/WebCore

2008-05-13 Alp Toker <alp@nuanti.com>

GTK+ build fix. Implement EventLoopGtk.cpp.

  • GNUmakefile.am:
  • platform/gtk/EventLoopGtk.cpp: Added. (WebCore::EventLoop::cycle):
8:29 PM Changeset in webkit [33428] by alp@webkit.org
  • 2 edits in trunk/WebCore

2008-05-13 Alp Toker <alp@nuanti.com>

GTK+ build fix. Fix IDL filename typo and add JavaScriptCallFrame.cpp
to the build.

  • GNUmakefile.am:
8:13 PM Changeset in webkit [33427] by pewtermoose@webkit.org
  • 2 edits in trunk/WebCore

2008-05-13 Matt Lilek <webkit@mattlilek.com>

Not reviewed, partial Gtk build fix.

  • GNUmakefile.am:
8:06 PM Changeset in webkit [33426] by ggaren@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-05-13 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.


A little more debugger action: implemented the exception callback.


SunSpider reports a .2% speedup. Not sure what that's about.

  • VM/CodeBlock.h: A little refactoring here. Store a pointer to our owner ScopeNode so we can retrieve data from it. This allows us to stop storing copies of the data ourselves. Also, store a "this" register instead of a code type, since we were only using the code type to calculate the "this" register.
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::generate): Calculate the "this" register mentioned above. Also, take care of removing "this" from the symbol table after codegen is done, since relying on the timing of a destructor for correct behavior is not so good.
  • VM/Machine.cpp: (KJS::Machine::throwException): Invoke the debugger's exception callback. (KJS::Machine::privateExecute): Use the "this" register mentioned above.
6:44 PM Changeset in webkit [33425] by timothy@apple.com
  • 3 edits in trunk/WebCore

Fixes a crash when stepping out in the Inspector's debugger.

http://bugs.webkit.org/show_bug.cgi?id=19037

Reviewed by Dan Bernstein.

  • page/InspectorController.cpp:

(WebCore::currentCallFrame): Adds a null check of currentCallFrame,
since it can be null. Also returns JSNull to better signify this.

  • page/inspector/ScriptsPanel.js: Updates the debugger interface

when stepping so the currentCallFrame isn't accessed when not paused.
Adds a _clearInterface function to remove duplicate code.

6:29 PM Changeset in webkit [33424] by pewtermoose@webkit.org
  • 2 edits in trunk/JavaScriptCore

2008-05-13 Matt Lilek <webkit@mattlilek.com>

Not reviewed, build fix.

  • kjs/date_object.cpp: (KJS::DateObjectFuncImp::callAsFunction):
5:46 PM Changeset in webkit [33423] by andersca@apple.com
  • 3 edits in trunk/WebKit/mac

2008-05-13 Anders Carlsson <andersca@apple.com>

Reviewed by Sam.

Don't empty the application cache in _setCacheModel, since it will be called during initialization.
Instead, do it in [WebCache empty].


  • Misc/WebCache.mm: (+[WebCache empty]):
  • WebView/WebView.mm: (+[WebView _setCacheModel:]):
5:38 PM Changeset in webkit [33422] by andersca@apple.com
  • 3 edits in trunk/JavaScriptCore

2008-05-13 Anders Carlsson <andersca@apple.com>

Reviewed by Sam.

<rdar://problem/5933644> Implement Date.now


Implement Date.now which returns the number of milliseconds since the epoch.


  • kjs/CommonIdentifiers.h:
  • kjs/date_object.cpp: (KJS::DateObjectFuncImp::): (KJS::DateObjectImp::DateObjectImp): (KJS::DateObjectFuncImp::callAsFunction):
5:09 PM Changeset in webkit [33421] by ggaren@apple.com
  • 16 edits in branches/squirrelfish/JavaScriptCore

2008-05-13 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.


Removed some unused exception machinery.


SunSpider reports a .3% speedup.

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:
  • JavaScriptCore.exp:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/internal.cpp:
  • kjs/object.cpp:
  • kjs/object.h:
  • kjs/value.h:
4:55 PM Changeset in webkit [33420] by Chris Fleizach
  • 2 edits in trunk/WebCore

<rdar://problem/5932677> AX: Submit buttons aren't returning AXTitle

4:21 PM Changeset in webkit [33419] by ggaren@apple.com
  • 12 edits in branches/squirrelfish

JavaScriptCore:

2008-05-13 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.


A little more debugger action.

  • kjs/debugger.cpp:
  • kjs/debugger.h: Removed debuggersPresent because it was unused. Replaced AttachedGlobalObject linked list with a HashSet because HashSet is faster and simpler. Changed all functions to return void instead of bool, because no clients ever return false, and we don't want to support it.
  • kjs/nodes.cpp: Did some up-keep to avoid build bustage. (KJS::Node::handleException): (KJS::BreakpointCheckStatement::execute): (KJS::FunctionBodyNodeWithDebuggerHooks::execute):

WebCore:

2008-05-13 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Updated for API changes in KJS::Debugger.

  • page/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::callEvent): (WebCore::JavaScriptDebugServer::atStatement): (WebCore::JavaScriptDebugServer::returnEvent): (WebCore::JavaScriptDebugServer::exception):
  • page/JavaScriptDebugServer.h:

WebKit/mac:

2008-05-13 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Updated for API changes in KJS::Debugger.

  • WebView/WebFrame.mm: (-[WebFrame _attachScriptDebugger]): Changed the order of operations to fix an ASSERT that can happen when re-entering _attachScriptDebugger.
4:11 PM Changeset in webkit [33418] by Chris Fleizach
  • 4 edits in trunk/WebKit

<rdar://problem/4780592> WebKit application has its window announced as HTML content

3:58 PM Changeset in webkit [33417] by Adam Roben
  • 1 edit in trunk/WebCore/ChangeLog

Restore some ChangeLog entries that were deleted in r33395

3:31 PM Changeset in webkit [33416] by timothy@apple.com
  • 4 edits in trunk/WebCore

Adds an overlay window that covers the scripts panel and
informs the user that they need to attach the debugger.
Provides an "Attach Debugger" button below the info text.

Reviewed by Dan Bernstein.

  • English.lproj/localizedStrings.js: New strings.
  • page/inspector/ScriptsPanel.js:

(WebInspector.ScriptsPanel): Create the overlay elements and
append to the main panel element.

  • page/inspector/inspector.css: New styles for the over lay elements.
3:31 PM Changeset in webkit [33415] by timothy@apple.com
  • 3 edits in trunk/WebKit/mac

Fixes a crash seen in Xcode where CallUIDelegateReturningBoolean
was referencing a nil WebView under validateUserInterfaceItem.
The validateUserInterfaceItem methods was being called at a time
when the WebHTMLView is being torndown.

<rdar://problem/5806229> A crash occurs at CallUIDelegateReturningBoolean()
while mousing down on menu bar after Xcode News window is opened

Reviewed by Ada Chan.

  • WebView/WebHTMLView.mm:

(-[WebHTMLView validateUserInterfaceItem:]): NULL check the WebView and
return NO when it is nil. Adds a comment.

  • WebView/WebPDFView.mm:

(-[WebPDFView validateUserInterfaceItem:]): Ditto.

3:31 PM Changeset in webkit [33414] by timothy@apple.com
  • 4 edits in trunk/WebCore

Fixes the assertion and crash that would happen when inspecting a element from a frame.
This change makes JSInspectedObjectWrapper pass unwrapped objects around for global objects
that share the same page group identifier. Also returns jsUndefined() instead of 0 to prevent
crashing in release builds if the page groups don't match.

Passes all the tests in: manual-tests/inspector-wrappers

Reviewed by Adam Roben.

  • bindings/js/JSInspectedObjectWrapper.cpp:

(WebCore::JSInspectedObjectWrapper::prepareIncomingValue): Return jsUndefined() instead of 0.
Call allowsUnwrappedAccessFrom instead of unwrappedExecStateMatches.

  • bindings/js/JSQuarantinedObjectWrapper.cpp:

(WebCore::JSQuarantinedObjectWrapper::allowsUnwrappedAccessFrom): Renamed from unwrappedExecStateMatches.
Return true if the pageGroupIdentifier of both wrappers match.
(WebCore::JSQuarantinedObjectWrapper::callAsFunction): Return jsUndefined() instead of 0.

  • bindings/js/JSQuarantinedObjectWrapper.h: Renamed unwrappedExecStateMatches to allowsUnwrappedAccessFrom.
3:31 PM Changeset in webkit [33413] by timothy@apple.com
  • 2 edits in trunk/WebCore

Fixes the hang that could happen when option-clicking to expand
a disclosure triangle in the Properties pane. This change limits
the recursion depth when expanding the tree elements.

<rdar://problem/5847681> Safari hangs when option-clicking a
disclosure triangle in the Inspector's Properties pane

Reviewed by John Sullivan.

  • page/inspector/treeoutline.js:

(TreeElement.prototype.expandRecursively): Pass an empty info object to
traverseNextTreeElement to get the depthChange value. This is used to
compute a current depth. If the depth exceeds the maxDepth argument, the
item isn't expanded and children wont be populated when traverseNextTreeElement
is called until the depth goes below the maxDepth.
(TreeElement.prototype.traverseNextTreeElement): Added a new info
argument that can be optionally used to return extra info like depth change.

3:30 PM Changeset in webkit [33412] by timothy@apple.com
  • 7 edits in trunk/WebCore

Adds info text to panes and sections in the Inspector's sidebars
that would normally be empty. These help the user know why there
is nothing in these sections.

Reviewed by John Sullivan.

  • English.lproj/localizedStrings.js: Add strings.
  • page/inspector/BreakpointsSidebarPane.js: Adds "No Breakpoints".
  • page/inspector/CallStackSidebarPane.js: Adds "Not Paused".
  • page/inspector/ObjectPropertiesSection.js: Adds "No Properties".
  • page/inspector/ScopeChainSidebarPane.js: Adds "Not Paused".
  • page/inspector/inspector.css: Adds style rules for the info elements.
3:30 PM Changeset in webkit [33411] by timothy@apple.com
  • 10 edits in trunk/WebCore

Implements the rest of the Scripts panel to get the debugger
mostly working. "Basic debugging seems to work."

Reviewed by Geoff Garen.

  • English.lproj/localizedStrings.js: Adds new strings.
  • page/inspector/Resource.js:

(WebInspector.Resource.prototype.get scripts): Returns _scripts and
creates it lazily.
(WebInspector.Resource.prototype.addScript): Add the script object to the
front of the _scripts array.
(WebInspector.Resource.prototype.removeAllScripts): Removed all the scripts
and removes the resource back-reference.
(WebInspector.Resource.prototype.removeScript): Removes the script and
breaks the resource back-reference.

  • page/inspector/ResourceView.js:

(WebInspector.ResourceView): Adds a reminder comment.
(WebInspector.ResourceView.prototype.get headersVisible): Returns _headersVisible.
(WebInspector.ResourceView.prototype.set headersVisible): Stubs out
a setter that currently just sets _headersVisible. Has a comment that
points out this needs implemented when network headers are added.

  • page/inspector/ResourcesPanel.js:

(WebInspector.ResourcesPanel.prototype.show): Sets the headersVisible property of
the visible view to true and shows it again, in case it was being shown in Scripts.
(WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
Copies the headersVisible property from the old view to the new view.
(WebInspector.ResourcesPanel.prototype.showResource): Sets the headersVisible
property to true before showing.

  • page/inspector/ScriptView.js:

(WebInspector.ScriptView): Passes in _addBreakpoint for the add breakpoint delegate.
(WebInspector.ScriptView.prototype._addBreakpoint): Calls ScriptsPanel's addBreakpoint
for the current Script.sourceID and line.

  • page/inspector/ScriptsPanel.js:

(WebInspector.ScriptsPanel):
(WebInspector.ScriptsPanel.prototype.show): Sets the headersVisible property of
the visible view to false and shows it again, in case it was being shown in Resources.
(WebInspector.ScriptsPanel.prototype.addScript): Makes a new Script object and
adds it to a Resource if one is found. Registers any breakpoint that match
the new Script's source URL, and sets the sourceID of the breakpoints.
(WebInspector.ScriptsPanel.prototype.addBreakpoint): Adds the breakpoint to the
BreakpointsSidebarPane. Also adds it to _breakpointsURLMap so it can be found
later in addScript by URL. Finally adds the breakpoint to the SourceFrame that
represents the resources or script.
(WebInspector.ScriptsPanel.prototype.removeBreakpoint): Removes the breakpoint from
the BreakpointsSidebarPane, _breakpointsURLMap and SourceFrame.
(WebInspector.ScriptsPanel.prototype.debuggerPaused): Update the debugger
state variables, the buttons and the CallStackSidebarPane.
(WebInspector.ScriptsPanel.prototype.reset): Clears and resets debugger
and interface state.
(WebInspector.ScriptsPanel.prototype.get visibleView): Returns _visibleView.
(WebInspector.ScriptsPanel.prototype.set visibleView): Sets _visibleView and
calls hide on the old view and show on the new view.
(WebInspector.ScriptsPanel.prototype.showScript): Calls _showScriptOrResource.
(WebInspector.ScriptsPanel.prototype.showResource): Ditto.
(WebInspector.ScriptsPanel.prototype.scriptViewForScript): Lazily creates a
ScriptView for the Script and returns it.
(WebInspector.ScriptsPanel.prototype.sourceFrameForScript): Returns the SourceFrame
for the Script.
(WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource): Returns the
SourceFrame based on the type of object passed in.
(WebInspector.ScriptsPanel.prototype._showScriptOrResource): Shows the view based on
the type of object passed in. If the object is a resource and there are breakpoints
defined for that Resource URL, then populate the SourceFrame with the breakpoints.
(WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Adds a script to the
files menu. If the Script is part of a resource, that resource is added.
(WebInspector.ScriptsPanel.prototype._removeScriptFromFilesMenu): Remove a script from
the files menu. If that script is part of a resource and it is the last script of that
resource, then remove the whole resource.
(WebInspector.ScriptsPanel.prototype._clearCurrentExecutionLine): Clears the execution
line from the SourceFrame that is showing it.
(WebInspector.ScriptsPanel.prototype._callFrameSelected): Event listener for when the
call frame changes in the CallStackSidebarPane. Triggers updates to the ScopeChainSidebarPane
and the visible view.
(WebInspector.ScriptsPanel.prototype._changeVisibleFile): Event listener for the change state
of the files select element.
(WebInspector.ScriptsPanel.prototype._updateDebuggerButtons): Update more of the
buttons to reflect the current debugger state. Updates the status text too.
(WebInspector.ScriptsPanel.prototype._toggleDebugging): Reset the UI and state when
the debugger is attached/detached.
(WebInspector.ScriptsPanel.prototype._togglePause): Call InspectorController.resumeDebugger or
InspectorController.pauseInDebugger depending on the paused state.
(WebInspector.ScriptsPanel.prototype._stepOverClicked): Call InspectorController.stepOverStatementInDebugger.
(WebInspector.ScriptsPanel.prototype._stepIntoClicked): Call InspectorController.stepIntoStatementInDebugger.
(WebInspector.ScriptsPanel.prototype._stepOutClicked): InspectorController.stepOutOfFunctionInDebugger.

  • page/inspector/SourceView.js:

(WebInspector.SourceView): Passes in _addBreakpoint for the add breakpoint delegate.
(WebInspector.SourceView.prototype._addBreakpoint): Calls ScriptsPanel's addBreakpoint
for the nearest Script's sourceID and passed in line.

  • page/inspector/inspector.css: New style rules for the UI changes.
  • page/inspector/inspector.js:

(WebInspector.loaded): Add the ScriptsPanel to the panels list.
(WebInspector.parsedScriptSource): Call ScriptsPanel.addScript.
(WebInspector.failedToParseScriptSource): Ditto.
(WebInspector.pausedScript): Call ScriptsPanel.debuggerPaused.

3:30 PM Changeset in webkit [33410] by timothy@apple.com
  • 8 edits
    2 adds in trunk/WebCore

Adds implementations of the Scope Chain and Call Stack sidebar panes.
These panes use the JSJavaScriptCallFrame object that will be passed
to the update functions.

Reviewed by Kevin McCullough.

  • English.lproj/localizedStrings.js: Adds new strings.
  • WebCore.vcproj/WebCore.vcproj: Adds new files.
  • page/inspector/CallStackSidebarPane.js:

(WebInspector.CallStackSidebarPane.prototype.update): Walk the
caller chain of the call frame and make placards for each.
(WebInspector.CallStackSidebarPane.prototype.get selectedCallFrame):
Return _selectedCallFrame.
(WebInspector.CallStackSidebarPane.prototype.set selectedCallFrame):
Set _selectedCallFrame and dispatch the "call frame selected" event.
(WebInspector.CallStackSidebarPane.prototype._placardSelected):
Set the selectedCallFrame based on the clicked placard.

  • page/inspector/Placard.js: Added. A user interface object that can

be used to show a title and a subtitle block with a selected state.

  • page/inspector/ScopeChainSidebarPane.js: Added.

(WebInspector.ScopeChainSidebarPane): Call the base object and set the title.
(WebInspector.ScopeChainSidebarPane.prototype.update): Iterate over the
call frame's scope chain and make ObjectPropertiesSections for each.

  • page/inspector/SidebarPane.js:

(WebInspector.SidebarPane.prototype): Inherit from WebInspector.Object.

  • page/inspector/WebKit.qrc: Add new files.
  • page/inspector/inspector.css: Add placard styles.
  • page/inspector/inspector.html: Add new files.
3:30 PM Changeset in webkit [33409] by timothy@apple.com
  • 3 edits in trunk/WebCore

Fixes the bug where SourceViews would be blank if shown before
the Resource finished loading.

<rdar://problem/5807420> Safari's Web Inspector won't display the
contents of some CSS and JS files

Reviewed by Kevin McCullough.

  • page/inspector/Resource.js:

(WebInspector.Resource.prototype.set finished): Dispatch the finished event
(WebInspector.Resource.prototype): Inherit from WebInspector.Object.prototype.

  • page/inspector/SourceView.js:

(WebInspector.SourceView): Register for the finished event on the resource.
When the event fires, setup the source frame and deregister the event.

3:30 PM Changeset in webkit [33408] by timothy@apple.com
  • 7 edits
    3 adds in trunk/WebCore

Factored most of SourceView out into SourceFrame so it can be shared
by the new ScriptView. Added the ScriptView class to be used for
scripts that arn't Resources (like eval code.) Added a simple Script
object that hold the data from the debugger parsedSource hooks. A
ScriptView holds a Script object, and uses it for source data.

Added breakpoint and execution line support to the SourceFrame
where they are visually represented in the source.

Reviewed by Kevin McCullough.

  • page/inspector/inspector.js:

(WebInspector.performSearch): Change the caller of sourceFrameForResource
to use the SourceFrame result's element property.

  • page/inspector/ResourcesPanel.js: Use the new SourceFrame.
  • page/inspector/Script.js: Added.
  • page/inspector/ScriptView.js: Added.
  • page/inspector/SourceFrame.js: Added.
  • page/inspector/SourceView.js: Use the new SourceFrame.
  • WebCore.vcproj/WebCore.vcproj: Add new files.
  • page/inspector/WebKit.qrc: Ditto.
  • page/inspector/inspector.html: Ditto.
3:29 PM Changeset in webkit [33407] by timothy@apple.com
  • 5 edits
    1 copy in trunk/WebCore

Adds a Breakpoint object and basic add/remove functions on
BreakpointsSidebarPane that call the InspectorController to
add/remove the breakpoint.

Reviewed by Kevin McCullough.

  • page/inspector/Breakpoint.js:

(WebInspector.Breakpoint):
(WebInspector.Breakpoint.prototype.get enabled): Return _enabled.
(WebInspector.Breakpoint.prototype.set enabled): Set _enabled and
dispatch the enabled/disabled event to listeners.

  • page/inspector/BreakpointsSidebarPane.js:

(WebInspector.BreakpointsSidebarPane): Add a breakpoints array.
(WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
Adds the breakpoint to the breakpoints array. Registers for the disabled
and enabled event types. Call InspectorController.addBreakpoint if attached.
(WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint):
Removes the breakpoint from the breakpoints array. Deregisters for the disabled
and enabled event types. Call InspectorController.removeBreakpoint if attached.
(WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
Call InspectorController.addBreakpoint or InspectorController.removeBreakpoint
depending on the enabled state of the breakpoint.

  • WebCore.vcproj/WebCore.vcproj: Add new files.
  • page/inspector/WebKit.qrc: Ditto.
  • page/inspector/inspector.html: Ditto.
3:29 PM Changeset in webkit [33406] by timothy@apple.com
  • 3 edits in trunk/WebCore

Make addSourceToFrame not dependent on InspectorResource so it
can be used to add source of a passed in string and mime-type to
a frame. Added addResourceSourceToFrame for use by SourceView.

Also fixes an assertion because of an incorrect static_cast of identifiers
to unsigned long long, when they can be unsigned.

Reviewed by Geoff Garen.

  • page/InspectorController.cpp:

(WebCore::addSourceToFrame): Helper function used by addSourceToFrame
and addResourceSourceToFrame.
(WebCore::addSourceToFrame): Generalized to take a source and mime-type string.
(WebCore::addResourceSourceToFrame): Renamed from addSourceToFrame.
(WebCore::getResourceDocumentNode): Fixes the static_cast to be long long.
(WebCore::InspectorController::windowScriptObjectAvailable): Adds
addResourceSourceToFrame to the JavaScript class.

  • page/inspector/SourceView.js: Use the new addResourceSourceToFrame.
3:29 PM Changeset in webkit [33405] by timothy@apple.com
  • 3 edits in trunk/WebCore

Add debugger related functions to the InspectorController and
expose them to the JavaScript side of InspectorController.

Reviewed by Geoff Garen.

  • page/InspectorController.cpp:

(WebCore::jsStringRef): Added helper to convert a UString to a JSStringRef.
(WebCore::currentCallFrame): Call InspectorController::currentCallFrame.
(WebCore::pauseInDebugger): Call InspectorController::pauseInDebugger.
(WebCore::resumeDebugger): Call InspectorController::resumeDebugger.
(WebCore::stepOverStatementInDebugger): Call InspectorController::stepOverStatementInDebugger.
(WebCore::stepIntoStatementInDebugger): Call InspectorController::stepIntoStatementInDebugger.
(WebCore::stepOutOfFunctionInDebugger): Call InspectorController::stepOutOfFunctionInDebugger.
(WebCore::addBreakpoint): Call InspectorController::addBreakpoint.
(WebCore::removeBreakpoint): Call InspectorController::removeBreakpoint.
(WebCore::InspectorController::windowScriptObjectAvailable): Add the new functions to the
InspectorController JavaScript class.
(WebCore::InspectorController::startDebuggingAndReloadInspectedPage): Clear breakpoints.
(WebCore::InspectorController::currentCallFrame): Return the currentCallFrame from the
JavaScriptDebugServer.
(WebCore::InspectorController::pauseInDebugger): Call JavaScriptDebugServer's pauseOnNextStatement.
(WebCore::InspectorController::resumeDebugger): Call JavaScriptDebugServer's resume.
(WebCore::InspectorController::stepOverStatementInDebugger): Call JavaScriptDebugServer's stepOverStatement.
(WebCore::InspectorController::stepIntoStatementInDebugger): Call JavaScriptDebugServer's stepIntoStatement.
(WebCore::InspectorController::stepOutOfFunctionInDebugger): Call JavaScriptDebugServer's stepOutOfFunction.
(WebCore::InspectorController::addBreakpoint): Call JavaScriptDebugServer's addBreakpoint.
(WebCore::InspectorController::removeBreakpoint): Call JavaScriptDebugServer's removeBreakpoint.
(WebCore::InspectorController::didParseSource): Call into the Inspector's JavaScript.
(WebCore::InspectorController::failedToParseSource): Ditto.
(WebCore::InspectorController::didPause): Ditto.

  • page/InspectorController.h: Add new functions.
3:29 PM Changeset in webkit [33404] by timothy@apple.com
  • 7 edits in trunk

Implements more debugger APIs on JavaScriptDebugServer and reduces
the number of callbacks to JavaScriptDebugListeners. These changes
will better facilitate debugger optimizations when SquirrelFish merges.

Reviewed by Kevin McCullough.

  • page/InspectorController.cpp:

(WebCore::InspectorController::didParseSource): Removed the ExecState.
(WebCore::InspectorController::failedToParseSource): Ditto.
(WebCore::InspectorController::didPause): Added.

  • page/InspectorController.h: Changed the JavaScriptDebugListener functions.
  • page/JavaScriptDebugListener.h: Removed some callbacks and added didPause.
  • page/JavaScriptDebugServer.cpp:

(WebCore::JavaScriptDebugServer::JavaScriptDebugServer): Initialize new data members.
(WebCore::JavaScriptDebugServer::~JavaScriptDebugServer): Delete all values of m_breakpoints.
(WebCore::JavaScriptDebugServer::removeListener): Call resume if the last listener was removed.
(WebCore::JavaScriptDebugServer::hasListenersInterestedInPage): Returns true if there are any
global listeners or a listener for the page.
(WebCore::JavaScriptDebugServer::addBreakpoint): Adds and entry to m_breakpoints.
(WebCore::JavaScriptDebugServer::removeBreakpoint): Removes a entry in m_breakpoints.
(WebCore::JavaScriptDebugServer::hasBreakpoint): Checks if there is a breakpoint for the
sourceID and line.
(WebCore::JavaScriptDebugServer::clearBreakpoints): Removed all breakpoints.
(WebCore::JavaScriptDebugServer::pauseOnNextStatement): Sets m_pauseOnNextStatement to true.
(WebCore::JavaScriptDebugServer::resume): Sets m_paused to false.
(WebCore::JavaScriptDebugServer::stepIntoStatement): Calls resume and sets
m_pauseOnNextStatement to true.
(WebCore::JavaScriptDebugServer::stepOverStatement): Calls resume and sets m_pauseOnExecState to
the current call frame's ExecState.
(WebCore::JavaScriptDebugServer::stepOutOfFunction): Calls resume and sets m_pauseOnExecState to
the current call frame's caller ExecState.
(WebCore::JavaScriptDebugServer::currentCallFrame): Returns m_currentCallFrame if paused.
(WebCore::dispatchDidParseSource): Removed the ExecState argument.
(WebCore::dispatchFailedToParseSource): Ditto.
(WebCore::JavaScriptDebugServer::sourceParsed): Doesn't pass the ExecState to dispatchDidParseSource
or dispatchFailedToParseSource.
(WebCore::dispatchFunctionToListeners):
(WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Removes all the arguments passed
to the callback.
(WebCore::JavaScriptDebugServer::setJavaScriptPaused): Various overloaded functions
to pause parts of WebCore to prevent JavaScript execution while paused.
(WebCore::JavaScriptDebugServer::pauseIfNeeded): Decides if the debugger should pause based
on the passed in ExecState, source ID and line number. This checks for breakpoints, stepping, etc.
Calls didPause on all the listeners and spins a EventLoop until resume is called.
(WebCore::JavaScriptDebugServer::callEvent): Call pauseIfNeeded.
(WebCore::JavaScriptDebugServer::atStatement): Ditto.
(WebCore::JavaScriptDebugServer::returnEvent): Ditto.
(WebCore::JavaScriptDebugServer::exception): Ditto.

  • page/JavaScriptDebugServer.h: Added new functions.
3:29 PM Changeset in webkit [33403] by timothy@apple.com
  • 5 edits in trunk/WebCore

Change View.show to call detach if the parentNode dosen't
match before appending to the passed in parent element.
This also prevents appending to the same parent element
multiple times.

Reviewed by John Sullivan.

  • page/inspector/FontView.js:

(WebInspector.FontView.prototype.show): Pass the parent element to View.show.

  • page/inspector/ResourceView.js: Optimize the attach method to no append if

there is a parentNode already.

  • page/inspector/SourceView.js: Ditto.
  • page/inspector/View.js: Call detach before appending if the parentNode

doesn't match the passed in element.

3:28 PM Changeset in webkit [33402] by timothy@apple.com
  • 2 edits in trunk/WebCore

Optimize the panel attach method to no append if there is a
parentNode already.

Reviewed by Adam Roben.

  • page/inspector/Panel.js:

(WebInspector.Panel.prototype.attach): Don't append to main-panels
if the panel element already has a parentNode.

3:28 PM Changeset in webkit [33401] by timothy@apple.com
  • 3 edits in trunk/WebCore

Add Widget::isPluginView so the JavaScriptDebugServer can identify
plugins that need to be paused during debugging. This will be used
in a upcoming commit.

Reviewed by Kevin McCullough.

  • platform/Widget.h: Add isPluginView. Return false.
  • plugins/PluginView.h: Add isPluginView. Return true.
3:28 PM Changeset in webkit [33400] by timothy@apple.com
  • 3 edits
    3 adds in trunk/WebCore

Adds an event loop abstraction to platform. This abstraction will be
used by the JavaScriptDebugServer to implement pausing.

Reviewed by Kevin McCullough.

  • platform/EventLoop.h: Added.

(WebCore::EventLoop::EventLoop):
(WebCore::EventLoop::ended): Return m_ended.

  • platform/mac/EventLoopMac.mm: Added.

(WebCore::EventLoop::cycle): Call nextEventMatchingMask and then sendEvent.

  • platform/win/EventLoopWin.cpp: Added.

(WebCore::EventLoop::cycle): Call GetMessage, TranslateMessage and DispatchMessage.

  • WebCore.xcodeproj/project.pbxproj: Add new files.
  • WebCore.vcproj/WebCore.vcproj: Ditto.
3:28 PM Changeset in webkit [33399] by timothy@apple.com
  • 5 edits
    1 copy in trunk/WebCore

Breaks out ObjectPropertiesSection from PropertiesSidebarPane
so it can be used by the Scripts panel's Scope Chain pane.

Rubber-stamped by Adam Roben.

  • page/inspector/ObjectPropertiesSection.js: Added.
  • page/inspector/PropertiesSidebarPane.js: Moved ObjectPropertiesSection

to ObjectPropertiesSection.js.

  • WebCore.vcproj/WebCore.vcproj: Add the new file.
  • page/inspector/WebKit.qrc: Ditto.
  • page/inspector/inspector.html: Ditto.
3:28 PM Changeset in webkit [33398] by timothy@apple.com
  • 2 edits in trunk/WebCore

Add a helper function to the Inspector's Array prototype
that will remove any identical values/objects from the array.

Reviewed by Kevin McCullough.

  • page/inspector/utilities.js:

(Array.prototype.remove): Iterate over the array and strict
compare to the passed in value. If they match, splice that index
out of the array. If onlyFirst is true, return after the first splice.

3:27 PM Changeset in webkit [33397] by timothy@apple.com
  • 4 edits
    4 adds in trunk/WebCore

Adds a JavaScriptCallFrame object and JavaScript binding with an IDL.
This object will expose the stack to the Inspector's debugger.

Reviewed by Adam Roben.

  • DerivedSources.make: Add JavaScriptCallFrame.
  • bindings/js/JSJavaScriptCallFrameCustom.cpp: Added.

(WebCore::JSJavaScriptCallFrame::evaluate): Calls impl evaluate and returns the result.
(WebCore::JSJavaScriptCallFrame::scopeChain): Makes an array of the ScopeChain.

  • page/JavaScriptCallFrame.cpp: Added.

(WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
(WebCore::JavaScriptCallFrame::caller): Returns m_caller.
(WebCore::JavaScriptCallFrame::functionName): Returns the function
name from the ExecState if this is not global code or anonymous.
(WebCore::JavaScriptCallFrame::evaluate): Evaluates a script string
in the scope of the call frame.

  • page/JavaScriptCallFrame.h: Added.

(WebCore::JavaScriptCallFrame::create): Call the ctor can return in a PassRefPtr.
(WebCore::JavaScriptCallFrame::invalidate): Sets m_mexec to 0. This prevents a
stale ExecState from being accessed after the lifetime of the ExecState.
(WebCore::JavaScriptCallFrame::isValid): Checks if m_exec is 0.
(WebCore::JavaScriptCallFrame::execState): Returns m_exec.
(WebCore::JavaScriptCallFrame::sourceIdentifier): Returns m_sourceID.
(WebCore::JavaScriptCallFrame::line): Returns m_line.
(WebCore::JavaScriptCallFrame::setLine): Sets m_line.
(WebCore::JavaScriptCallFrame::scopeChain): Returns by reference m_exec->scopeChain().

  • page/JavaScriptCallFrame.idl: Added.
  • WebCore.xcodeproj/project.pbxproj: Add new files.
  • WebCore.vcproj/WebCore.vcproj: Ditto.
3:27 PM Changeset in webkit [33396] by timothy@apple.com
  • 4 edits
    1 add in trunk/WebCore

Add a new WebInspector.Object base class that will be used for
a few objects in the Web Inspector to support listeners on any
object. This will help add more abstraction to the Inspector.

Reviewed by Adam Roben.

  • page/inspector/Object.js: Added.

(WebInspector.Object): Does nothing.
(WebInspector.Object.prototype.addEventListener): Adds the listener to
the _listeners map by type. Supports a this object argument, for easy
addition of listeners without the need for bind.
(WebInspector.Object.prototype.removeEventListener): Remove the listener
from the _listeners map. If the listener is null and the thisObject was
passed, remove any listener for that thisObject.
(WebInspector.Object.prototype.dispatchEventToListeners): Sends an event
for a type to all listeners for that type. Mimics some of the DOMEvent
methods and properties for the event object passed to the listeners.

  • WebCore.vcproj/WebCore.vcproj: Add new files.
  • page/inspector/WebKit.qrc: Ditto.
  • page/inspector/inspector.html: Ditto.
3:27 PM Changeset in webkit [33395] by timothy@apple.com
  • 2 edits in trunk/WebCore

Update the view source CSS to better match the new Inspector mock-ups.

Reviewed by Kevin McCullough.

  • css/view-source.css:
2:51 PM Changeset in webkit [33394] by Adam Roben
  • 5 edits in trunk/WebKit/win

Neuter WebScriptDebugServer

Some upcoming changes to JavaScriptDebugServer and
JavaScriptDebugListener will break WebScriptDebugServer. Since Drosera
is being replaced by the Inspector's debugger, and Drosera is the only
client of WebScriptDebugServer, it makes more sense to get rid of
WebScriptDebugServer than to update it to keep it working.

We can't actually remove WebScriptDebugServer entirely yet, so I've
just made it non-functional. This will completely break Drosera, but
as stated above, Drosera's days are numbered anyway.

Reviewed by Tim Hatcher and Kevin McCullough.

  • WebCoreSupport/WebFrameLoaderClient.cpp: (WebFrameLoaderClient::dispatchDidLoadMainResource): Removed all code in this function.
  • WebKitDLL.cpp: (LocalServerDidDie): Ditto.
  • WebScriptDebugServer.cpp: Made all IWebScriptDebugServer functions return E_NOTIMPL.
  • WebScriptDebugServer.h: Removed everything but the IWebScriptDebugServer functions.
2:50 PM Changeset in webkit [33393] by oliver@apple.com
  • 5 edits
    2 adds in branches/squirrelfish

Bug 18752: SQUIRRELFISH: exceptions are not always handled by the vm
<https://bugs.webkit.org/show_bug.cgi?id=18752>

Reviewed by Darin

Replace old attempt at "branchless" exceptions as the extra information
being passed made gcc an unhappy compiler, replacing these custom toNumber
calls with ordinary toNumber logic (by relying on toNumber now preventing
side effects after an exception has been thrown) provided sufficient leeway
to add the additional checks for the remaining unchecked cases.

This leaves only toString conversions in certain contexts as possibly
misbehaving.

2:32 PM Changeset in webkit [33392] by sullivan@apple.com
  • 3 edits
    2 adds in trunk

WebCore:

2008-05-13 John Sullivan <sullivan@apple.com>

Reviewed by Dan Bernstein and Kevin Decker


  • fixed <rdar://problem/5879597> reproducible crash in HTMLSelectElement::typeAheadFind

Test: fast/forms/select-type-ahead-list-box-no-selection.html

  • html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::typeAheadFind): When there's no initially-selected element, we were accessing index -1. Check for this case and start at 0.

LayoutTests:

2008-05-13 John Sullivan <sullivan@apple.com>

Reviewed by Justin Garcia and Tim Hatcher


<rdar://problem/5879597> reproducible crash in HTMLSelectElement::typeAheadFind

  • fast/forms/select-type-ahead-list-box-no-selection-expected.txt: Added.
  • fast/forms/select-type-ahead-list-box-no-selection.html: Added.
2:25 PM Changeset in webkit [33391] by weinig@apple.com
  • 3 edits in trunk/WebCore

2008-05-13 Sam Weinig <sam@webkit.org>

Reviewed by Dan Bernstein.

Small cleanup to XMLHttpRequest in preparation for Access Control changes.

  • xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::XMLHttpRequest): (WebCore::XMLHttpRequest::~XMLHttpRequest): (WebCore::XMLHttpRequest::open): (WebCore::XMLHttpRequest::send): (WebCore::XMLHttpRequest::internalAbort): (WebCore::XMLHttpRequest::processSyncLoadResults): (WebCore::XMLHttpRequest::didFinishLoading): (WebCore::XMLHttpRequest::didReceiveResponse): (WebCore::XMLHttpRequest::didReceiveData):
  • xml/XMLHttpRequest.h:
2:23 PM Changeset in webkit [33390] by kmccullough@apple.com
  • 1 edit in trunk/JavaScriptCore/ChangeLog

2008-05-13 Kevin McCullough <kmccullough@apple.com>

Giving credit where credit is due.

  • ChangeLog:
2:23 PM Changeset in webkit [33389] by mrowe@apple.com
  • 3 edits in trunk/WebKit/mac

<rdar://problem/5926425> HIWebViewCreateWithClass declared as API in HIWebView.h but never exported from WebKit.framework

Reviewed by John Sullivan.

  • Carbon/HIWebView.h: Remove HIWebViewCreateWithClass.
  • Carbon/HIWebView.m: Ditto.

(HIWebViewCreate):
(HIWebViewConstructor):

2:18 PM Changeset in webkit [33388] by kmccullough@apple.com
  • 4 edits in trunk/JavaScriptCore

2008-05-13 Kevin McCullough <kmccullough@apple.com>

Reviewed by Geoff.

<rdar://problem/5770054> JavaScript profiler (10928)
Use PassRefPtrs instead of RefPtrs when appropriate.

  • profiler/FunctionCallProfile.cpp: (KJS::FunctionCallProfile::addChild):
  • profiler/FunctionCallProfile.h:
  • profiler/Profile.h: (KJS::Profile::callTree):
1:58 PM Changeset in webkit [33387] by Chris Fleizach
  • 2 edits in trunk/WebCore

<rdar://problem/5701210> VO: If image is missing, VoiceOver does not speak the alternative text.

If an image has an alt tag, it should not be ignored

1:57 PM Changeset in webkit [33386] by ggaren@apple.com
  • 26 edits in branches/squirrelfish

JavaScriptCore:

2008-05-13 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.


First steps toward supporting the debugger API: support the sourceParsed
callback; plus some minor fixups.

SunSpider reports no regression.

  • VM/CodeGenerator.h: Removed a misleading comment.
  • kjs/Parser.h: Changed the parser to take an ExecState*, so it can implement the sourceParsed callback -- that way, we only have to implement the callback in one place.
  • kjs/debugger.cpp: Nixed DebuggerImp, because its sole purpose in life was to demonstrate the misapplication of design patterns.
  • kjs/debugger.h: Changed sourceParsed to take a SourceProvider, to reduce copying, and not to return a value, because pausing execution after parsing is complicated, and no clients needed that ability, anyway.
  • kjs/grammar.y: Make sure never to pass a NULL SourceElements* to didFinishParsing -- that simplifies some code down the road.


  • kjs/nodes.cpp: Don't generate special AST nodes just because the debugger is attached -- that's a relic of the old AST execution model, and those nodes haven't been maintained.

WebCore:

2008-05-13 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.


Updated JavaScriptDebugServer API to accept a SourceProvider instead
of a UString, to avoid copying.

  • page/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::sourceParsed): Updated this function not to return a value.

WebKit/mac:

2008-05-13 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.


Updated WebScriptDebugger API to accept a SourceProvider instead
of a WebCore::String, to avoid copying.

(WebScriptDebugger::sourceParsed): Updated this function not to return
a value.

WebKit/win:

2008-05-13 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.


Updated for new JS debugging APIs.

  • WebScriptDebugServer.cpp: (WebScriptDebugServer::didParseSource): (WebScriptDebugServer::failedToParseSource):
  • WebScriptDebugServer.h:
1:55 PM Changeset in webkit [33385] by Chris Fleizach
  • 2 edits in trunk/WebCore

<rdar://problem/5908446> AX: webkit needs to return blockquote information for all AX objects, not just in AXTextMarker info

1:50 PM Changeset in webkit [33384] by ap@webkit.org
  • 5 edits in trunk

Reviewed by John Sullivan.

<rdar://problem/4852077> REGRESSION: The content of the HTML file which is saved as Thai
(ISO 8859-11) disappear.

<rdar://problem/5842597> Thai ISO-8859-11 should be upgraded to Windows-874

Test: fast/encoding/char-decoding.html

  • platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::registerExtendedEncodingNames): Register ISO-8859-11, which doesn't have a standard IANA name, despite following the usual 8859 naming scheme. Also, made TIS-620 map to windows-874-2000 explicitly.
1:15 PM Changeset in webkit [33383] by mjs@apple.com
  • 7 edits in branches/squirrelfish/LayoutTests

2008-05-13 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.


Update results for remainder of split-window merge. The new results are correct.

  • http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener-expected.txt:
  • http/tests/security/listener/xss-JSTargetNode-onclick-shortcut-expected.txt:
  • http/tests/security/listener/xss-XMLHttpRequest-addEventListener-expected.txt:
  • http/tests/security/listener/xss-XMLHttpRequest-shortcut-expected.txt:
  • http/tests/security/listener/xss-window-onclick-addEventListener-expected.txt:
  • http/tests/security/listener/xss-window-onclick-shortcut-expected.txt:
12:35 PM Changeset in webkit [33382] by kmccullough@apple.com
  • 7 edits in trunk/JavaScriptCore

2008-05-13 Kevin McCullough <kmccullough@apple.com>

Reviewed by Sam.

<rdar://problem/5770054> JavaScript profiler (10928)

  • Made some functions static (as per Adam) and changed from using raw pointers to RefPtr for making these JavaScript Objects.
  • profiler/FunctionCallProfile.cpp: (KJS::FunctionCallProfile::addChild): (KJS::FunctionCallProfile::findChild):
  • profiler/FunctionCallProfile.h: (KJS::FunctionCallProfile::create):
  • profiler/Profile.cpp: (KJS::Profile::Profile): (KJS::Profile::willExecute): (KJS::Profile::didExecute): (KJS::functionNameCountPairComparator):
  • profiler/Profile.h: (KJS::Profile::create): (KJS::Profile::title): (KJS::Profile::callTree):
  • profiler/Profiler.cpp: (KJS::Profiler::startProfiling):
  • profiler/Profiler.h: (KJS::Profiler::allProfiles): (KJS::Profiler::clearProfiles):
12:35 PM Changeset in webkit [33381] by Chris Fleizach
  • 2 edits in trunk/WebCore

Re: [PFR] <rdar://problem/5471973> Some AXLinks are not getting AXTitles though there is title text

11:36 AM Changeset in webkit [33380] by ap@webkit.org
  • 8 edits
    1 move
    7 adds
    1 delete in trunk

Reviewed by Eric Seidel.

https://bugs.webkit.org/show_bug.cgi?id=18681
<rdar://problem/5888130> WebKit should not remove BOM characters from content.

We were only trying to match Firefox, and it doesn't do this any more.

Tests: fast/encoding/bom-in-content.html

fast/encoding/bom-in-content-utf16.html

  • platform/text/TextDecoder.cpp: (WebCore::TextDecoder::checkForBOM): Skip the BOM if it's at the start of input stream.
  • platform/text/TextCodec.cpp:
  • platform/text/TextCodec.h:
  • platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::decode):
  • platform/text/TextCodecUTF16.cpp: (WebCore::TextCodecUTF16::decode):
  • platform/text/mac/TextCodecMac.cpp: (WebCore::TextCodecMac::decode): Don't remove the BOM.
11:25 AM Changeset in webkit [33379] by ap@webkit.org
  • 3 edits in trunk/LayoutTests

Reviewed by Dan Bernstein.

Add tests verifying that we don't mix up some similar, but incompatible encodings.

  • fast/encoding/char-decoding-expected.txt:
  • fast/encoding/char-decoding.html:
11:14 AM Changeset in webkit [33378] by andersca@apple.com
  • 4 edits
    4 adds in trunk

WebCore:

2008-05-13 Anders Carlsson <andersca@apple.com>

Reviewed by Darin.

Don't crash when a document loader is destroyed while an initial caching attempt
is in progress.

  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::~ApplicationCacheGroup): Stop loading.


(WebCore::ApplicationCacheGroup::stopLoading):
New method that stops a cache update.


(WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
Delete ourselves here.


  • loader/appcache/ApplicationCacheGroup.h:

LayoutTests:

2008-05-13 Anders Carlsson <andersca@apple.com>

Reviewed by Darin.

Add testcase.


  • http/tests/appcache/navigating-away-while-cache-attempt-in-progress-expected.txt: Added.
  • http/tests/appcache/navigating-away-while-cache-attempt-in-progress.html: Added.
  • http/tests/appcache/resources/navigating-away-while-cache-attempt-in-progress.manifest: Added.
  • http/tests/appcache/resources/slow-resource.php: Added.
9:35 AM Changeset in webkit [33377] by ap@webkit.org
  • 5 edits in trunk

Reviewed by Darin.

<rdar://problem/5841351> Turkish ISO 8859-9 encoding should be treated as windows-1254

Match IE and upgrade ISO-8859-9 to windows-1254, which is its strict superset.

Test: fast/encoding/char-decoding.html

  • platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::registerExtendedEncodingNames): Register the standard name unconditionally. Previously, we registered windows-949-2000 as a special case that lacked an IANA standard name, and got away with not registering GBK because it happened to be reported by ICU normally earlier than any encoding upgraded to it.
8:22 AM Changeset in webkit [33376] by Simon Hausmann
  • 4 edits in trunk/WebCore

2008-05-13 Tor Arne Vestbø <tavestbo@trolltech.com>

Reviewed by Simon

Fix QtWebKit build on Qt embedded.

7:24 AM Changeset in webkit [33375] by Simon Hausmann
  • 2 edits in trunk/WebCore

2008-05-13 Ariya Hidayat <ariya.hidayat@trolltech.com>

Reviewed by Simon.

For Gtk/X11 and Qt/X11, use a more extensive plug-ins scan directories set

2:46 AM Changeset in webkit [33374] by ap@webkit.org
  • 5 edits in trunk/JavaScriptCore

Reviewed by Geoffrey Garen.

<rdar://problem/4949018> JavaScriptCore API claims to work with UTF8 strings, but only works
with ASCII strings


  • kjs/ustring.h:
  • kjs/ustring.cpp: (KJS::UString::Rep::createFromUTF8): Added. Implementation adapted from JSStringCreateWithUTF8CString().
  • API/JSStringRef.cpp: (JSStringCreateWithUTF8CString):
  • API/JSClassRef.cpp: (OpaqueJSClass::OpaqueJSClass): Use UString::Rep::createFromUTF8().
1:05 AM Changeset in webkit [33373] by Simon Hausmann
  • 2 edits in trunk/WebKit/qt

2008-05-13 Andy Shaw <andy@trolltech.com>

Reviewed by Simon.

Fixes: QWebHistory::forward() should go forwards and not back

12:11 AM Changeset in webkit [33372] by oliver@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

Bug 18752: SQUIRRELFISH: exceptions are not always handled by the vm
<https://bugs.webkit.org/show_bug.cgi?id=18752>

Reviewed by Geoff

First step: prevent incorrect evaluation of valueOf/toString conversion
in right hand side of expression after earlier conversion throws.

May 12, 2008:

11:06 PM Changeset in webkit [33371] by mrowe@apple.com
  • 5 edits
    3 adds in branches/squirrelfish

Bug 18934: SQUIRRELFISH: ASSERT @ nytimes.com due to RegisterFile being clobbered
<https://bugs.webkit.org/show_bug.cgi?id=18934>

Reviewed by Geoff

Unfortunately we cannot create new statically optimised globals if there are any
tainted RegisterFiles on the RegisterFileStack. To handle this we re-introduce
(in a slightly cleaner form) the inImplicitCall concept to the RegisterFileStack.

11:06 PM Changeset in webkit [33370] by mrowe@apple.com
  • 5 edits
    2 adds in branches/squirrelfish

JavaScriptCore:

2008-05-12 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Introduced support for function.caller.

Improved support for walking interesting scopes for function introspection.

This fixes all remaining layout tests not blocked by rebasing to trunk.

SunSpider reports no change.

  • VM/Machine.cpp: (KJS::Machine::dumpRegisters): Fixed a spacing issue.

LayoutTests:

2008-05-12 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Layout test for function.arguments and function.caller in interesting
scopes.

  • fast/js/function-dot-arguments-and-caller-expected.txt: Added.
  • fast/js/function-dot-arguments-and-caller.html: Added.
11:06 PM Changeset in webkit [33369] by mrowe@apple.com
  • 3 edits
    3 adds in branches/squirrelfish

2008-05-11 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver.

Bug 18961: SQUIRRELFISH: Gmail doesn't load
<https://bugs.webkit.org/show_bug.cgi?id=18961>

Fix codegen for logical nodes so that they don't use their destination
as a temporary.

  • kjs/nodes.cpp: (KJS::LogicalAndNode::emitCode): (KJS::LogicalOrNode::emitCode):
  • fast/js/codegen-temporaries-expected.txt: Added.
  • fast/js/codegen-temporaries.html: Added.
  • fast/js/resources/codegen-temporaries.js: Added.
11:06 PM Changeset in webkit [33368] by mrowe@apple.com
  • 1 edit
    1 add in branches/squirrelfish/WebCore

2008-05-10 Maciej Stachowiak <mjs@apple.com>

Build fix.

  • add missing forwarding header
  • ForwardingHeaders/kjs/SourceProvider.h: Added.
11:06 PM Changeset in webkit [33367] by mrowe@apple.com
  • 38 edits
    3 copies in branches/squirrelfish

JavaScriptCore:

2008-05-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

Three layout tests are fixed:

fast/js/toString-elision-trailing-comma.html
fast/js/toString-prefix-postfix-preserve-parens.html
fast/js/kde/lval-exceptions.html

Functions now save a shared subrange of the original source used
to make them (so in the common case this adds no storage above the
memory cache).

  • kjs/SourceProvider.h: Added. (KJS::SourceProvider): New abstract base class for classes that provide on-demand access to the source for a JavaScript program. This allows function objects to have access to their original source without copying. (KJS::UStringSourceProvider): SourceProvider subclass backed by a KJS::UString. (KJS::UStringSourceProvider::create): (KJS::UStringSourceProvider::getRange): (KJS::UStringSourceProvider::data): (KJS::UStringSourceProvider::length): (KJS::UStringSourceProvider::UStringSourceProvider):
  • kjs/SourceRange.h: Added. (KJS::SourceRange::SourceRange): Class that holds a SourceProvider and a character range into the source, to encapsulate on-demand access to the source of a function. (KJS::SourceRange::toString):
  • VM/Machine.cpp: (KJS::eval): Pass a UStringSourceProvider to the parser.
  • kjs/Parser.cpp: (KJS::Parser::parse): Take a SourceProvider and pass it on to the lexer.
  • kjs/Parser.h: (KJS::Parser::parse): Take a SourceProvider.
  • kjs/lexer.cpp: (KJS::Lexer::setCode): Take a SourceProvider; keep it around, and use it to get the raw buffer and length.
  • kjs/lexer.h: (KJS::Lexer::sourceRange): Convenience function to get a source range based on the lexer's source provieder, and char offsets right before and after the desired range.
  • kjs/function.cpp: (KJS::globalFuncEval): Pass a UStringSourceProvider to the parser.
  • kjs/function_object.cpp: (KJS::functionProtoFuncToString): Use toSourceString to get the source. (KJS::FunctionObjectImp::construct): Give the parser a UStringSourceProvider.
  • kjs/grammar.y: When parsing a function declaration, function expression, or getter or setter, tell the function body about its SourceRange.
  • kjs/interpreter.cpp: (KJS::Interpreter::checkSyntax): Pass a SourceProvider to the parser. (KJS::Interpreter::evaluate): Pass a SourceProvider to the parser.
  • kjs/interpreter.h:
  • kjs/nodes.h: (KJS::FunctionBodyNode::setSource): Establish a SourceRange for this function. (KJS::FunctionBodyNode::toSourceString): Get the source string out of the SourceRange. (KJS::FuncExprNode::): Take a SourceRange and set it on the body. (KJS::FuncDeclNode::): ditto
  • kjs/testkjs.cpp: (prettyPrintScript): Use a SourceProvider appropriately.
  • JavaScriptCore.exp: Export new symbols.
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add new files.
  • JavaScriptCore.xcodeproj/project.pbxproj: Add new files.

JavaScriptGlue:

2008-05-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • JSRun.cpp: (JSRun::Evaluate): Use UString version of eveluate() instead of the now departed UChar*/length variant; use of the lower-level version was gratuitous in any case. (JSRun::CheckSyntax): Ditto for checkSyntax().

WebCore:

2008-05-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • bindings/js/StringSourceProvider.h: Added. SourceProvider subclass backed by a WebCore::String. (WebCore::StringSourceProvider::create): (WebCore::StringSourceProvider::getRange): (WebCore::StringSourceProvider::data): (WebCore::StringSourceProvider::length): (WebCore::StringSourceProvider::StringSourceProvider):
  • bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::evaluate): Pass a StringSourceProvider to evaluate() instead of UChar* / length.
  • html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::text): Modified to return the original string as-is when the script element contains only a single text node, to avoid excess memory use.
  • WebCore.vcproj/WebCore.vcproj: Add new file to build.
  • WebCore.xcodeproj/project.pbxproj: ditto

LayoutTests:

2008-05-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

All of these tests expected function.toString to somewhat change
things from the raw original source. They are now prepared for the
fact that this does not happen.

  • fast/js/function-decompilation-operators.html:
  • fast/js/function-names-expected.txt:
  • fast/js/function-prototype-expected.txt:
  • fast/js/function-prototype.html:
  • fast/js/function-toString-object-literals-expected.txt:
  • fast/js/function-toString-parentheses-expected.txt:
  • fast/js/kde/lval-exceptions-expected.txt:
  • fast/js/modify-non-references-expected.txt:
  • fast/js/resources/function-names.js:
  • fast/js/resources/function-toString-object-literals.js:
  • fast/js/resources/function-toString-parentheses.js:
  • fast/js/resources/modify-non-references.js:
  • fast/js/resources/toString-prefix-postfix-preserve-parens.js:
  • fast/js/toString-prefix-postfix-preserve-parens-expected.txt:
11:06 PM Changeset in webkit [33366] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

Bring back RegisterFile tainting in order to correctly handle
natively implemented getters and setters that re-enter JavaScript

Reviewed by Maciej

11:06 PM Changeset in webkit [33365] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-05-09 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • track character offsets of open and close braces, in preparation for saving function source

I verified that there is no performance regression from this change.

  • kjs/grammar.y:
  • kjs/lexer.cpp: (KJS::Lexer::lex): (KJS::Lexer::matchPunctuator):
  • kjs/lexer.h:
11:06 PM Changeset in webkit [33364] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

Debug build fix

No reviewer

11:06 PM Changeset in webkit [33363] by mrowe@apple.com
  • 12 edits in branches/squirrelfish

Build fixes for SquirrelFish on windows.

Reviewed by Geoff

11:06 PM Changeset in webkit [33362] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/LayoutTests

2008-05-09 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Restored the expected results for viewsource-empty-attribute-value.html
to what they were prior to r31100. These results expect that the
top-level name in the frame path is "" instead of "1".

It's not clear how r31100 changed the top-level frame in the frame path
to be named "1". The change definitely wasn't related to any expected
behavior in r31100, which was about default margin-bottom for form
elements in quirks mode.

It's also not clear how squirrelfish changes things back.

Sam mentioned that the test result changes intermittently on trunk.

For now, I don't think we need to think deeply about this issue,
since the "" result seems more correct than the "1" result.

  • fast/frames/viewsource-empty-attribute-value-expected.txt:
11:06 PM Changeset in webkit [33361] by mrowe@apple.com
  • 1 edit
    1 add in branches/squirrelfish/LayoutTests

2008-05-09 Geoffrey Garen <ggaren@apple.com>

Added expected results for this test.

  • fast/js/closure-inside-extra-arg-call-expected.txt: Added.
11:06 PM Changeset in webkit [33360] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/WebCore

2008-05-08 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Fixed platform/mac/plugins/bindings-test-objc.html.

I've restored -[WebScriptObject setException] and
+[WebScriptObject throwException].

Instead of mucking around in the JavaScript engine's execution state,
throwing an exception sets a global exception string, along with the
environment in which to throw it. An ObjC callback checks the global
exception string and, if it's non-nil and the environment matches the
current exceution environment, throws the global exception string as a
JS exception.

I also removed the old currentGlobalObject infrastructure: it's no longer
used.

11:06 PM Changeset in webkit [33359] by mrowe@apple.com
  • 3 edits
    2 adds in branches/squirrelfish

JavaScriptCore:

2008-05-08 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • fix activation tearoff in the case where functions are called with too many arguments

Fixes:
fast/canvas/patternfill-repeat.html
fast/dom/SelectorAPI/bug-17313.html

  • VM/Machine.cpp: (KJS::slideRegisterWindowForCall): (KJS::scopeChainForCall): (KJS::Machine::execute): (KJS::Machine::privateExecute):

LayoutTests:

2008-05-08 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

Add test cases for failures similar to the SquirrelFish failure on
fast/dom/SelectorAPI/bug-17313.html

  • fast/js/closure-inside-extra-arg-call.html: Added.
  • fast/js/resources/closure-inside-extra-arg-call.js: Added.
11:06 PM Changeset in webkit [33358] by mrowe@apple.com
  • 4 edits
    4 adds in branches/squirrelfish

JavaScriptCore:

2008-05-08 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Fixed failure in fast/canvas/canvas-pattern-behaviour.html.

SunSpider reports a small speedup. Not sure what that's about.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump): Fixed op_call_eval to dump as "op_call_eval". This helped me while debugging.
  • VM/Machine.cpp: (KJS::Machine::unwindCallFrame): When looking for an activation to tear off, don't use the scope chain. Inside eval, the scope chain doesn't belong to us; it belongs to our calling function.

Also, don't use the needsFullScopeChain flag to decide whether to tear
off the activation. "function.arguments" can create an activation
for a function whose needsFullScopeChain flag is set to false.

LayoutTests:

2008-05-08 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Added specific test cases for the root cause of squirrelfish's failure
in fast/canvas/canvas-pattern-behaviour.html.

  • fast/js/exception-thrown-from-eval-inside-closure-expected.txt: Added.
  • fast/js/exception-thrown-from-eval-inside-closure.html: Added.
  • fast/js/exception-thrown-from-function-with-lazy-activation-expected.txt: Added.
  • fast/js/exception-thrown-from-function-with-lazy-activation.html: Added.
11:05 PM Changeset in webkit [33357] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/LayoutTests

2008-05-08 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Updated test results to reflect correct behavior: The line number in
the old results was off by 2.

  • fast/js/recursion-limit-equal-expected.txt:
11:05 PM Changeset in webkit [33356] by mrowe@apple.com
  • 2 edits
    2 moves
    6 deletes in branches/squirrelfish/LayoutTests

2008-05-08 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • move frame.xhtml and iframe.xhtml into a resources dir, as they were never meant to be tests
  • dom/xhtml/level2/html/HTMLFrameElement09.xhtml-disabled:
  • dom/xhtml/level2/html/frame.xhtml: Removed.
  • dom/xhtml/level2/html/iframe.xhtml: Removed.
  • dom/xhtml/level2/html/resources/frame.xhtml: Copied from dom/xhtml/level2/html/frame.xhtml.
  • dom/xhtml/level2/html/resources/iframe.xhtml: Copied from dom/xhtml/level2/html/iframe.xhtml.
  • platform/mac/dom/xhtml/level2/html/frame-expected.checksum: Removed.
  • platform/mac/dom/xhtml/level2/html/frame-expected.png: Removed.
  • platform/mac/dom/xhtml/level2/html/frame-expected.txt: Removed.
  • platform/mac/dom/xhtml/level2/html/iframe-expected.checksum: Removed.
  • platform/mac/dom/xhtml/level2/html/iframe-expected.png: Removed.
  • platform/mac/dom/xhtml/level2/html/iframe-expected.txt: Removed.
11:05 PM Changeset in webkit [33355] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-05-08 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix function.call for calls of more than 8 arguments

Fixes svg/carto.net/button.svg

  • kjs/list.cpp: (KJS::List::getSlice): properly set up the m_buffer of the target list.
11:05 PM Changeset in webkit [33354] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-05-08 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • don't return a null RegisterID from RegExpNode in the exception case, since the caller may need a real register

Fixes:

  • fast/regex/early-acid3-86.html
  • http/tests/misc/acid3.html
  • kjs/nodes.cpp: (KJS::RegExpNode::emitCode):
11:05 PM Changeset in webkit [33353] by mrowe@apple.com
  • 13 edits
    2 adds in branches/squirrelfish/LayoutTests

o2008-05-07 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Added this test to demonstrate that, for "f(x)", it is correct to evaluate
"x" even if "f" is not a function, and therefore "f(x)" will throw an exception.

  • fast/js/function-argument-evaluation-before-exception-expected.txt: Added.
  • fast/js/function-argument-evaluation-before-exception.html: Added.

These tests now have an extra "access denied" message in them, because
of the behavior change mentioned above.

I also added try/catch clauses to eliminate the "is not object"
exception messages from the test output.

  • http/tests/security/listener/resources/targetChild-JSTargetNode-onclick-addEventListener.html:
  • http/tests/security/listener/resources/targetChild-JSTargetNode-onclick-shortcut.html:
  • http/tests/security/listener/resources/targetChild-XMLHttpRequest-addEventListener.html:
  • http/tests/security/listener/resources/targetChild-XMLHttpRequest-shortcut.html:
  • http/tests/security/listener/resources/targetChild-window-onclick-addEventListener.html:
  • http/tests/security/listener/resources/targetChild-window-onclick-shortcut.html:
  • http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener-expected.txt:
  • http/tests/security/listener/xss-JSTargetNode-onclick-shortcut-expected.txt:
  • http/tests/security/listener/xss-XMLHttpRequest-addEventListener-expected.txt:
  • http/tests/security/listener/xss-XMLHttpRequest-shortcut-expected.txt:
  • http/tests/security/listener/xss-window-onclick-addEventListener-expected.txt:
  • http/tests/security/listener/xss-window-onclick-shortcut-expected.txt:
11:05 PM Changeset in webkit [33352] by mrowe@apple.com
  • 11 edits in branches/squirrelfish/LayoutTests

2008-05-07 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Fixed up a few more tests that depended on the exact text of exception
messages.

  • In these tests, I fixed a bug in frame.html and iframe.html that caused a function to execute too many times.
  • dom/html/level2/html/HTMLFrameElement09-expected.txt:
  • dom/html/level2/html/HTMLIFrameElement11-expected.txt:
  • dom/html/level2/html/resources/frame.html:
  • dom/html/level2/html/resources/iframe.html:
  • I changed these tests to explicitly report exceptions, so their results don't depend on how the engine constructs messages for implicit exceptions:
  • dom/xhtml/level2/html/HTMLDocument17-expected.txt:
  • dom/xhtml/level2/html/HTMLDocument18-expected.txt:
  • dom/xhtml/level2/html/HTMLDocument19-expected.txt:
  • dom/xhtml/level2/html/HTMLDocument20-expected.txt:
  • dom/xhtml/level2/html/HTMLDocument21-expected.txt:
  • dom/xhtml/level2/html/selfxhtml.js:
11:05 PM Changeset in webkit [33351] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

Partial fix for current performance regressions.

Patch from Cameron Zwarich
Reviewed by Oliver

Fix a performance regression caused by the introduction of property
attributes to SymbolTable in r32859 by encoding the attributes and the
register index into a single field of SymbolTableEntry.

This leaves Node::optimizeVariableAccess() definitely broken, although
it was probably not entirely correct in SquirrelFish before this change.

11:05 PM Changeset in webkit [33350] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-05-06 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Oliver.

  • add missing ! in an assert that I failed to reverse
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::CodeGenerator):
11:05 PM Changeset in webkit [33349] by mrowe@apple.com
  • 282 edits in branches/squirrelfish/LayoutTests

2008-05-06 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

To facilitate merging between the squirrelfish branch and trunk, I
edited a bunch of layout tests to make sure their results don't depend
on the exact text of an exception message generated by the JavaScript engine.

(We do want to test JavaScript exception messages -- we just don't want
to test them 300 times over, in tests that aren't supposed to be about
JavaScript at all.)

  • I fixed bugs that were causing these tests to throw exceptions by accident, and updated results to reflect correct behavior:
  • editing/selection/contenteditable-click-inside.html:
  • platform/mac/editing/selection/contenteditable-click-inside-expected.checksum:
  • platform/mac/editing/selection/contenteditable-click-inside-expected.png:
  • platform/mac/editing/selection/contenteditable-click-inside-expected.txt:
  • editing/selection/contenteditable-click-outside.html:
  • platform/mac/editing/selection/contenteditable-click-outside-expected.checksum:
  • platform/mac/editing/selection/contenteditable-click-outside-expected.png:
  • platform/mac/editing/selection/contenteditable-click-outside-expected.txt:
  • fast/forms/selected-index-assert.html:
  • fast/forms/selected-index-assert-expected.txt:
  • tables/mozilla_expected_failures/core/captions1.html:
  • platform/mac/tables/mozilla_expected_failures/core/captions1-expected.txt:
  • I changed these tests to explicitly throw/report exceptions, so their results don't depend on how the engine constructs messages for implicit exceptions:
  • fast/xpath/nsresolver-exception.xhtml:
  • fast/xpath/nsresolver-exception-expected.txt:
  • platform/mac/fast/AppleScript/001.html:
  • platform/mac/fast/AppleScript/001-expected.txt:
  • dom/xhtml/level3/core/selfxhtml.js
  • dom/xhtml/level3/core/*expected.txt (about 280 of these changed)
11:04 PM Changeset in webkit [33348] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-05-06 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

The basic approach is to have "this" only be present in the symbol
table at compile time, not runtime.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::~CodeGenerator): Remove "this" from symbol table. (KJS::CodeGenerator::CodeGenerator): Add "this" back when re-using a symbol table.
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::execute): Don't assert that "this" is in the symbol table.
11:04 PM Changeset in webkit [33347] by mrowe@apple.com
  • 12 edits in branches/squirrelfish/WebCore

Bug 18866: SQUIRRELFISH: JS/ObjC bridge is broken <https://bugs.webkit.org/show_bug.cgi?id=18866>
Bug 18867: SQUIRRELFISH: JS/NPRuntime bridge is broken <https://bugs.webkit.org/show_bug.cgi?id=18867>

Reviewed by Maciej

This fixes function binding logic for the ObjC and NPRuntime by
replacing incorrect implementations of implementsCall (which is
no longer virtual) with implementations of getCallData.

11:04 PM Changeset in webkit [33346] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

2008-05-06 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Trivial support for function.arguments: Currently, we only support
function.arguments from within the scope of function.

This fixes the remaining Mozilla JS test failures.

SunSpider reports no change.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Separated scope chain deref from activation register copying: since it is now possible for client code to create an activation on behalf of a function that otherwise wouldn't need one, having an activation no longer necessarily means that you need to deref the scope chain.

(KJS::Machine::getCallFrame): For now, this function only examines the
current scope. Walking parent scopes requires some refactoring in the
way we track execution stacks.

  • kjs/ExecState.cpp: (KJS::ExecState::ExecState): We use a negative call frame offset to indicate that a given scope is not a function call scope.
11:04 PM Changeset in webkit [33345] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Fix call frame set up for native -> JS function calls.

Review by Geoff

11:04 PM Changeset in webkit [33344] by mrowe@apple.com
  • 8 edits
    2 adds in branches/squirrelfish

JavaScriptCore:

2008-05-05 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Fixed ecma_3/Object/8.6.2.6-001.js, and similar bugs.

SunSpider reports a .4% speedup. Not sure what that's about.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Check for exception return from equal, since toPrimitive can throw.
  • kjs/operations.cpp: (KJS::strictEqual): In response to an error I made in an earlier version of this patch, I changed strictEqual to make clear the fact that it performs no conversions and can't throw, making it slightly more efficient in the process.

LayoutTests:

2008-05-05 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Layout test for exceptions thrown from equality comparisons.

  • fast/js/exception-thrown-from-equal-expected.txt: Added.
  • fast/js/exception-thrown-from-equal.html: Added.
11:04 PM Changeset in webkit [33343] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-05-05 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix some dumb mistakes in my last patch
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitPushScope): (KJS::CodeGenerator::emitGetPropertyNames):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:04 PM Changeset in webkit [33342] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-05-05 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • document opcodes relating to jumps, scopes, and property name iteration

Documented jmp, jtrue, false, push_scope, pop_scope, get_pnames,
next_pname and jmp_scopes.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitJump): (KJS::CodeGenerator::emitJumpIfTrue): (KJS::CodeGenerator::emitJumpIfFalse): (KJS::CodeGenerator::emitPushScope): (KJS::CodeGenerator::emitNextPropertyName): (KJS::CodeGenerator::emitGetPropertyNames):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/nodes.cpp: (KJS::LogicalAndNode::emitCode): (KJS::LogicalOrNode::emitCode): (KJS::ConditionalNode::emitCode): (KJS::IfNode::emitCode): (KJS::IfElseNode::emitCode): (KJS::DoWhileNode::emitCode): (KJS::WhileNode::emitCode): (KJS::ForNode::emitCode): (KJS::ForInNode::emitCode): (KJS::WithNode::emitCode):
11:04 PM Changeset in webkit [33341] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

Bug 18749: SQUIRRELFISH: const support is broken
<https://bugs.webkit.org/show_bug.cgi?id=18749>

Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Oliver.

Adds support for const during code generation.

Fixes 2 layout tests.

11:04 PM Changeset in webkit [33340] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-05-04 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • document some more opcodes (and fix argument names)

Added docs for eq, neq, stricteq, nstriceq, less and lesseq.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitEqual): (KJS::CodeGenerator::emitNotEqual): (KJS::CodeGenerator::emitStrictEqual): (KJS::CodeGenerator::emitNotStrictEqual): (KJS::CodeGenerator::emitLess): (KJS::CodeGenerator::emitLessEq):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/nodes.cpp: (KJS::LessNode::emitCode): (KJS::GreaterNode::emitCode): (KJS::LessEqNode::emitCode): (KJS::GreaterEqNode::emitCode): (KJS::EqualNode::emitCode): (KJS::NotEqualNode::emitCode): (KJS::StrictEqualNode::emitCode): (KJS::NotStrictEqualNode::emitCode): (KJS::CaseBlockNode::emitCodeForBlock):
11:04 PM Changeset in webkit [33339] by mrowe@apple.com
  • 10 edits in branches/squirrelfish/JavaScriptCore

2008-05-04 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

More scaffolding for f.arguments.

Track the offset of the last call frame in the ExecState, so we can
produce a backtrace at any time.

Also, record numLocals, the sum of numVars + numParameters, in each code
block, to make updates to the ExecState a little cheaper than they
would be otherwise.

We now use numLocals in a bunch of places where we used to calculate
numVars + numParameters or -numVars - numParameters.

Reports are mixed, but all in all, this seems to be a wash on SunSpider.

11:04 PM Changeset in webkit [33338] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Whoops, correctly handle properties that don't exist in the
symbol table.

Reviewed by Geoff

11:03 PM Changeset in webkit [33337] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

Add attribute information to SymbolTable as ground work for
various DontEnum and ReadOnly issues.

Reviewed by Geoff

11:03 PM Changeset in webkit [33336] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-05-04 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

More scaffolding for f.arguments.

Store the register file associated with an ExecState in the ExecState.

SunSpider reports no change.

  • kjs/JSGlobalObject.h: (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): Moved registerFileStack above globalExec, so it gets initialized first. Removed remnants of old activation scheme.
11:03 PM Changeset in webkit [33335] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-05-04 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Oliver.

  • renamed a few opcodes and fixed assembly formatting to accomodate the longest opcode

equal --> eq
nequal --> neq
resolve_base_and_property --> resolve_with_base
resolve_base_and_func --> resolve_func
get_prop_id --> get_by_id
put_prop_id --> put_by_id
delete_prop_id --> del_by_id
get_prop_val --> get_by_val
put_prop_val --> put_by_val
delete_prop_val --> del_by_val
put_prop_index --> put_by_index

  • VM/CodeBlock.cpp: (KJS::printUnaryOp): (KJS::printBinaryOp): (KJS::printConditionalJump): (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitEqual): (KJS::CodeGenerator::emitNotEqual): (KJS::CodeGenerator::emitResolveWithBase): (KJS::CodeGenerator::emitResolveFunction): (KJS::CodeGenerator::emitGetById): (KJS::CodeGenerator::emitPutById): (KJS::CodeGenerator::emitDeleteById): (KJS::CodeGenerator::emitGetByVal): (KJS::CodeGenerator::emitPutByVal): (KJS::CodeGenerator::emitDeleteByVal): (KJS::CodeGenerator::emitPutByIndex):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::ArrayNode::emitCode): (KJS::PropertyListNode::emitCode): (KJS::BracketAccessorNode::emitCode): (KJS::DotAccessorNode::emitCode): (KJS::EvalFunctionCallNode::emitCode): (KJS::FunctionCallResolveNode::emitCode): (KJS::FunctionCallBracketNode::emitCode): (KJS::FunctionCallDotNode::emitCode): (KJS::PostIncResolveNode::emitCode): (KJS::PostDecResolveNode::emitCode): (KJS::PostIncBracketNode::emitCode): (KJS::PostDecBracketNode::emitCode): (KJS::PostIncDotNode::emitCode): (KJS::PostDecDotNode::emitCode): (KJS::DeleteResolveNode::emitCode): (KJS::DeleteBracketNode::emitCode): (KJS::DeleteDotNode::emitCode): (KJS::TypeOfResolveNode::emitCode): (KJS::PreIncResolveNode::emitCode): (KJS::PreDecResolveNode::emitCode): (KJS::PreIncBracketNode::emitCode): (KJS::PreDecBracketNode::emitCode): (KJS::PreIncDotNode::emitCode): (KJS::PreDecDotNode::emitCode): (KJS::ReadModifyResolveNode::emitCode): (KJS::AssignResolveNode::emitCode): (KJS::AssignDotNode::emitCode): (KJS::ReadModifyDotNode::emitCode): (KJS::AssignBracketNode::emitCode): (KJS::ReadModifyBracketNode::emitCode): (KJS::ConstDeclNode::emitCodeSingle): (KJS::ForInNode::emitCode): (KJS::TryNode::emitCode):
11:03 PM Changeset in webkit [33334] by mrowe@apple.com
  • 3 edits
    3 adds in branches/squirrelfish

Fix assertion when accessing arguments object with too many arguments provided

Reviewed by Maciej

The arguments constructor was assuming that the register offset given for argv
was an absolute offset into the registerfile, rather than the offset from the
frame. This patches corrects that issue.

11:03 PM Changeset in webkit [33333] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-05-04 Geoffrey Garen <ggaren@apple.com>

Rubber stamped by Sam Weinig.

Cleaned up Machine.cpp according to our style guidelines: moved static
data to the top of the file; moved stand-alone functions below that;
moved the Machine constructor above other Machine member functions.

11:03 PM Changeset in webkit [33332] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-05-03 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

  • fix accidental breakage from last patch
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:03 PM Changeset in webkit [33331] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-05-03 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • a bunch more opcode documentation and corresponding parameter name fixes

I renamed a few opcodes:

type_of --> typeof (that's what the JS operator is named)
instance_of --> instanceof (ditto)
create_error --> new_error (for consistency with other new_* opcodes)

I documented the following opcodes:

  • load
  • new_object
  • new_array
  • new_regexp
  • mov
  • pre_inc
  • pre_dec
  • post_inc
  • post_dec
  • to_jsnumber
  • negate
  • bitnot
  • not
  • instanceof
  • typeof
  • in
  • new_func
  • new_funcexp
  • new_error

I also fixed formatting on some existing opcode docs.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitMove): (KJS::CodeGenerator::emitNot): (KJS::CodeGenerator::emitPreInc): (KJS::CodeGenerator::emitPreDec): (KJS::CodeGenerator::emitPostInc): (KJS::CodeGenerator::emitPostDec): (KJS::CodeGenerator::emitToJSNumber): (KJS::CodeGenerator::emitNegate): (KJS::CodeGenerator::emitBitNot): (KJS::CodeGenerator::emitInstanceOf): (KJS::CodeGenerator::emitTypeOf): (KJS::CodeGenerator::emitIn): (KJS::CodeGenerator::emitLoad): (KJS::CodeGenerator::emitNewObject): (KJS::CodeGenerator::emitNewArray): (KJS::CodeGenerator::emitNewRegExp): (KJS::CodeGenerator::emitNewError):
  • VM/CodeGenerator.h: (KJS::CodeGenerator::scopeDepth): (KJS::CodeGenerator::addVar):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::Node::emitThrowError): (KJS::RegExpNode::emitCode): (KJS::TypeOfValueNode::emitCode): (KJS::UnaryPlusNode::emitCode): (KJS::NegateNode::emitCode): (KJS::BitwiseNotNode::emitCode): (KJS::LogicalNotNode::emitCode): (KJS::InstanceOfNode::emitCode): (KJS::InNode::emitCode):
11:03 PM Changeset in webkit [33330] by mrowe@apple.com
  • 2 edits
    2 adds in branches/squirrelfish/JavaScriptCore

2008-05-03 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff and Sam.

  • generate HTML bytecode docs at build time
  • DerivedSources.make:
  • docs: Added.
  • docs/make-bytecode-docs.pl: Added.
11:03 PM Changeset in webkit [33329] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-05-03 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Update ExecState::m_scopeChain when switching scope chains inside the
machine.

This fixes uses of lexicalGlobalObject, such as, in a subframe

alert(top.makeArray() instanceof Array ? "FAIL" : "PASS");

and a bunch of the security failures listed in
https://bugs.webkit.org/show_bug.cgi?id=18870. (Those tests still fail,
seemingly because of regressions in exception messages).

SunSpider reports no change.

  • VM/Machine.cpp: Factored out scope chain updating into a common function that takes care to update ExecState::m_scopeChain, too.
  • kjs/ExecState.h: I made Machine a friend of ExecState so that Machine could update ExecState::m_scopeChain, even though that value is read-only for everyone else.
  • kjs/JSGlobalObject.h: (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): Changed this client to be a little friendlier to ExecState's internal storage type for scope chain data.
11:03 PM Changeset in webkit [33328] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-05-03 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Fixed https://bugs.webkit.org/show_bug.cgi?id=18876
Squirrelfish: ScopeChainNode leak in op_jmp_scopes.

SunSpider reports no change.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Don't construct a ScopeChain object, since the direct threaded interpreter will goto across its destructor.
11:03 PM Changeset in webkit [33327] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-05-03 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

A bit more efficient fix than r32832: Don't copy globals into function
register files; instead, have the RegisterFileStack track only the base
of the last *global* register file, so the global object's register
references stay good.

SunSpider reports a .3% speedup. Not sure what that's about.

11:03 PM Changeset in webkit [33326] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

Bug 18864: SquirrelFish: Support getter and setter definition in object literals
<https://bugs.webkit.org/show_bug.cgi?id=18864>

Reviewed by Maciej

Add new opcodes to allow us to add getters and setters to an object. These are
only used by the codegen for object literals.

11:03 PM Changeset in webkit [33325] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-05-02 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • properly copy globals into and out of implicit call register files, otherwise they will fail at global lookup

Fixes fast/js/array-tostring-and-join.html layout test.

  • VM/RegisterFileStack.cpp: (KJS::RegisterFileStack::pushGlobalRegisterFile): (KJS::RegisterFileStack::popGlobalRegisterFile): (KJS::RegisterFileStack::pushFunctionRegisterFile): (KJS::RegisterFileStack::popFunctionRegisterFile):
11:03 PM Changeset in webkit [33324] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-05-02 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Fixed https://bugs.webkit.org/show_bug.cgi?id=18822
SQUIRRELFISH: incorrect eval used in some cases

Changed all code inside the machine to fetch the lexical global object
directly from the scope chain, instead of from the ExecState.

Clients who fetch the lexical global object through the ExecState
still don't work.

SunSpider reports no change.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Fetch the lexical global object from the scope chain.
  • kjs/ExecState.h: (KJS::ExecState::ExecState::lexicalGlobalObject): Moved the logic for this function into ScopeChainNode, but kept this function around to support existing clients.
11:03 PM Changeset in webkit [33323] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-05-02 Geoffrey Garen <ggaren@apple.com>

Rubber stamped by Oliver Hunt.

Removed ExecState.cpp from AllInOneFile.cpp, for a .2% speedup.

11:03 PM Changeset in webkit [33322] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/LayoutTests

2008-05-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • bump up the numbers in this test to account for our now much higher recursion capability.
  • fast/js/deep-recursion-test.html:
11:03 PM Changeset in webkit [33321] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

Bug 18827: SquirrelFish: Prevent getters and setters from destroying the current RegisterFile
<https://bugs.webkit.org/show_bug.cgi?id=18827>

Reviewed by Maciej and Geoff

Remove safe/unsafe RegisterFile concept, and instead just add additional
logic to ensure we always push/pop RegisterFiles when executing getters
and setters, similar to the logic for valueOf and toString.

11:03 PM Changeset in webkit [33320] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

Rename unsafeForReentry to safeForReentry to avoid double negatives.

RS=Geoff

11:03 PM Changeset in webkit [33319] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

Bug 18827: SquirrelFish: Prevent getters and setters from destroying the current RegisterFile
<https://bugs.webkit.org/show_bug.cgi?id=18827>

Reviewed by Maciej

This patch makes getters and setters work. It does this by
tracking whether the RegisterFile is "safe", that is whether
the interpreter is in a state that in which it can handle
the RegisterFile being reallocated.

11:03 PM Changeset in webkit [33318] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-30 Geoffrey Garen <ggaren@apple.com>

Release build fix: Always compile in "isGlobalObject", since it's
listed in our .exp file.

  • kjs/ExecState.cpp: (KJS::ExecState::isGlobalObject):
  • kjs/ExecState.h:
11:03 PM Changeset in webkit [33317] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Minor code restructuring to prepare for getters and setters,
also helps exception semantics a bit.

Reviewed by Maciej

11:03 PM Changeset in webkit [33316] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-30 Geoffrey Garen <ggaren@apple.com>

Fixed tyop.

  • kjs/ExecState.h:
11:02 PM Changeset in webkit [33315] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-30 Geoffrey Garen <ggaren@apple.com>

Debug build fix: export a missing symbol.

11:02 PM Changeset in webkit [33314] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-04-30 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

A little more ExecState refactoring: Now, only the global object creates
an ExecState.

Also inlined ExecState::lexicalGlobalObject().

SunSpider reports no change.

11:02 PM Changeset in webkit [33313] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/WebKit/mac

2008-04-30 Geoffrey Garen <ggaren@apple.com>

Build fix: #ifdef'd out some code that doesn't work anymore.

11:02 PM Changeset in webkit [33312] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/WebCore

2008-04-30 Geoffrey Garen <ggaren@apple.com>

Build fix: supply a parameter that used to be implicit to
Interpreter::evaluate.

11:02 PM Changeset in webkit [33311] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-30 Geoffrey Garen <ggaren@apple.com>

WebCore build fix: forward-declare ScopeChain.

  • kjs/interpreter.h:
11:02 PM Changeset in webkit [33310] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/WebCore

2008-04-30 Geoffrey Garen <ggaren@apple.com>

Build fix: #ifdef'd out some code that doesn't work anymore.

  • bindings/objc/WebScriptObject.mm: (+[WebScriptObject throwException:]): (-[WebScriptObject setException:]):
11:02 PM Changeset in webkit [33309] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptGlue

2008-04-30 Geoffrey Garen <ggaren@apple.com>

Build fix: supply missing parameter that used to be implicit.

  • JSRun.cpp: (JSRun::Evaluate):
11:02 PM Changeset in webkit [33308] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-30 Geoffrey Garen <ggaren@apple.com>

Build fix for JavaScriptGlue: export a missing symbol.

11:02 PM Changeset in webkit [33307] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/WebKit/mac

2008-04-30 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

#ifdef'd out some debugger code that doesn't work anymore.

  • WebView/WebScriptDebugDelegate.mm: (-[WebScriptCallFrame scopeChain]):
11:02 PM Changeset in webkit [33306] by mrowe@apple.com
  • 24 edits
    2 deletes in branches/squirrelfish/JavaScriptCore

2008-04-30 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Removed a lot of unused bits from ExecState, moving them into
OldInterpreterExecState, the fake scaffolding class.

The clutter was making it hard to see the forest from the trees.

.4% SunSpider speedup, probably because ExecState::lexicalGlobalObject()
is faster now.

11:02 PM Changeset in webkit [33305] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

Bug 18643: SQUIRRELFISH: need to support implicit function calls (valueOf, toString, getters/setters)
<https://bugs.webkit.org/show_bug.cgi?id=18643>

Reviewed by Maciej

Prevent static slot optimisation for new variables and functions in
globally re-entrant code called from an an implicit function call.

This is necessary to prevent us from needing to resize the global
slot portion of the root RegisterFile during an implicit (and hence
unguarded) function call.

11:02 PM Changeset in webkit [33304] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-29 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

In nested program code, don't propogate "this" back to the parent
register file. ("this" should remain constant in the parent register
file, regardless of the scripts it invokes.)

  • VM/RegisterFile.cpp: (KJS::RegisterFile::copyGlobals):
11:02 PM Changeset in webkit [33303] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Restore base pointer when popping a global RegisterFile

Reviewed by Geoff

11:02 PM Changeset in webkit [33302] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

Bug 18643: SQUIRRELFISH: need to support implicit function calls (valueOf, toString, getters/setters)
<https://bugs.webkit.org/show_bug.cgi?id=18643>

Reviewed by Geoff

Partial fix. This results in all implicit calls to toString or valueOf
executing in a separate RegisterFile, so ensuring that the the pointers
in the triggering interpreter don't get trashed. This still leaves the
task of preventing new global re-entry from toString and valueOf from
clobbering the RegisterFile.

11:02 PM Changeset in webkit [33301] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-28 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Simplified activation object a bit: No need to store the callee
in the activation object -- we can pull it out of the call frame
when needed, instead.

SunSpider reports no change.

11:02 PM Changeset in webkit [33300] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-28 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

RS by Oliver Hunt on moving JSArguments.cpp out of AllInOneFile.cpp.

Substantially more handling of "arguments": "arguments" works fully
now, but "f.arguments" still doesn't work.

Fixes 10 regression tests.

SunSpider reports no regression.

  • kjs/JSActivation.cpp: (KJS::JSActivation::createArgumentsObject): Reconstruct an arguments List to pass to the arguments object constructor.
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • kjs/AllInOneFile.cpp: Removed JSActivation.cpp from AllInOneFile.cpp because that seems to make GCC happy. (Previously, I had added JSActivation.cpp to AllInOneFile.cpp because *that* seemed to make GCC happy. So it goes.)
11:02 PM Changeset in webkit [33299] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-28 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Groundwork for more handling of "arguments". I'm not checking in the
actual handling of "arguments" yet, because it still needs a little
fiddling to avoid a performance regression.

SunSpider reports no change.

  • VM/Machine.cpp: (KJS::initializeCallFrame): Put argc in the register file, so the arguments object can find it later, to determine arguments.length.
  • kjs/nodes.h: (KJS::FunctionBodyNode::): Added a special code accessor for when you know the code has already been generated, and you don't have a scopeChain to supply for potential code generation. (This is the case when the activation object creates the arguments object.)
11:02 PM Changeset in webkit [33298] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

Replace unsafe use of auto_ptr in Vector with manual memory
management.

Reviewed by Geoff

11:02 PM Changeset in webkit [33297] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-27 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Bug 18746: SQUIRRELFISH: indirect eval used when direct eval should be used
<https://bugs.webkit.org/show_bug.cgi?id=18746>

Change the base to the correct value of the 'this' object after the direct
eval test instead of before.

Fixes 5 layout tests.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/nodes.cpp: (KJS::EvalFunctionCallNode::emitCode):
11:02 PM Changeset in webkit [33296] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-04-26 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • document all property getting, setting and deleting opcodes

(And fix function parameter names to match corresponding opcode parameter names.)

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitResolve): (KJS::CodeGenerator::emitResolveBase): (KJS::CodeGenerator::emitResolveBaseAndProperty): (KJS::CodeGenerator::emitResolveBaseAndFunc): (KJS::CodeGenerator::emitGetPropId): (KJS::CodeGenerator::emitPutPropId): (KJS::CodeGenerator::emitDeletePropId): (KJS::CodeGenerator::emitPutPropVal):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::resolve): (KJS::resolveBase): (KJS::resolveBaseAndProperty): (KJS::resolveBaseAndFunc): (KJS::Machine::privateExecute):
  • kjs/nodes.cpp: (KJS::ResolveNode::emitCode): (KJS::ArrayNode::emitCode): (KJS::PropertyListNode::emitCode): (KJS::BracketAccessorNode::emitCode): (KJS::EvalFunctionCallNode::emitCode): (KJS::FunctionCallResolveNode::emitCode): (KJS::FunctionCallBracketNode::emitCode): (KJS::PostIncResolveNode::emitCode): (KJS::PostDecResolveNode::emitCode): (KJS::PostIncBracketNode::emitCode): (KJS::PostDecBracketNode::emitCode): (KJS::PostIncDotNode::emitCode): (KJS::PostDecDotNode::emitCode): (KJS::DeleteResolveNode::emitCode): (KJS::TypeOfResolveNode::emitCode): (KJS::PreIncResolveNode::emitCode): (KJS::PreDecResolveNode::emitCode): (KJS::PreIncBracketNode::emitCode): (KJS::PreDecBracketNode::emitCode): (KJS::AssignResolveNode::emitCode): (KJS::AssignDotNode::emitCode): (KJS::ReadModifyDotNode::emitCode): (KJS::AssignBracketNode::emitCode): (KJS::ReadModifyBracketNode::emitCode): (KJS::ConstDeclNode::emitCodeSingle):
11:01 PM Changeset in webkit [33295] by mrowe@apple.com
  • 9 edits
    2 adds in branches/squirrelfish

Bug 18628: SQUIRRELFISH: need to support recursion limit
<https://bugs.webkit.org/show_bug.cgi?id=18628>

Reviewed by Maciej.

Basically completes recursion limiting. There is still some
tuning we may want to do to make things better in the face of
very bad code, but certainly nothing worse than anything already
possible in trunk.

Also fixes a WebKit test by fixing the exception text :D

11:01 PM Changeset in webkit [33294] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

Fix the changelog

11:01 PM Changeset in webkit [33293] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

Bug 18736: SQUIRRELFISH: switch statements with no default have incorrect codegen
<https://bugs.webkit.org/show_bug.cgi?id=18736>

Reviewed by Geoff

Put a limit on the level of reentry recursion. 128 levels of re-entrant recursion
seems reasonable as it is greater than the old eval limit, and a long way short of
the reentry depth needed to overflow the stack.

11:01 PM Changeset in webkit [33292] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-04-25 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

A tiny bit of cleanup to the regexp code.

Removed some static_cast.

Removed createRegExpImp because it's no longer used.

11:01 PM Changeset in webkit [33291] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Bug 18736: SQUIRRELFISH: switch statements with no default have incorrect codegen
<https://bugs.webkit.org/show_bug.cgi?id=18736>

Reviewed by Maciej

Ensure the "default" target is correct in the absence of an explicit default handler.

11:01 PM Changeset in webkit [33290] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

Fixing the ChangeLog

11:01 PM Changeset in webkit [33289] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

Bug 18732: SQUIRRELFISH: exceptions thrown by native constructors are ignored
<https://bugs.webkit.org/show_bug.cgi?id=18732>

Reviewed by Maciej

More bounds checking.

11:01 PM Changeset in webkit [33288] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-25 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix signal catching magic

The signal handlers are restored to _exit but are only set when
running under run-javascriptcore-tests. fprintf from a signal
handler is not safe.

  • kjs/testkjs.cpp: (main): (parseArguments):
  • tests/mozilla/jsDriver.pl:
11:01 PM Changeset in webkit [33287] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-25 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Bug 18732: SQUIRRELFISH: exceptions thrown by native constructors are ignored
<https://bugs.webkit.org/show_bug.cgi?id=18732>

Fixes another regression test.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:01 PM Changeset in webkit [33286] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-25 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Bug 18728: SQUIRRELFISH: invalid regular expression constants should throw exceptions
<https://bugs.webkit.org/show_bug.cgi?id=18728>

Fixes another regression test.

  • kjs/nodes.cpp: (KJS::RegExpNode::emitCode):
11:01 PM Changeset in webkit [33285] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-24 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Geoffrey Garen.

Bug 18735: SQUIRRELFISH: closures are sometimes given an incorrect 'this' value when called
<https://bugs.webkit.org/show_bug.cgi?id=18735>

The overloaded toThisObject method was not copied over to JSActivation.

Fixes two regression tests.

  • kjs/JSActivation.cpp: (KJS::JSActivation::toThisObject):
  • kjs/JSActivation.h:
11:01 PM Changeset in webkit [33284] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-04-24 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Added support for arguments.callee.

11:01 PM Changeset in webkit [33283] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

Bug 18628: SQUIRRELFISH: need to support recursion limit
<https://bugs.webkit.org/show_bug.cgi?id=18628>

Reviewed by Maciej

Partial fix -- this gets us some of the required bounds checking, but not
complete coverage. But it does manage to do them without regressing :D

11:01 PM Changeset in webkit [33282] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

Fixed up ChangeLog

11:01 PM Changeset in webkit [33281] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-24 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver.

Bug 18717: SQUIRRELFISH: eval returns the wrong value for a variable declaration statement
<https://bugs.webkit.org/show_bug.cgi?id=18717>

Fixes a regression test, but exposes the failure of another due to the
lack of getters and setters.

  • kjs/nodes.cpp: (KJS::ConstDeclNode::emitCodeSingle): (KJS::ConstDeclNode::emitCode): (KJS::ConstStatementNode::emitCode): (KJS::VarStatementNode::emitCode):
  • kjs/nodes.h:
11:01 PM Changeset in webkit [33280] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver.

Bug 18717: SQUIRRELFISH: eval returns the wrong value for a variable declaration statement
<https://bugs.webkit.org/show_bug.cgi?id=18717>

Fixes a regression test, but exposes the failure of another due to the
lack of getters and setters.

11:01 PM Changeset in webkit [33279] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-24 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Print a CRASH statement when crashing, so test failures are not a
mystery.

  • kjs/testkjs.cpp: (handleCrash): (main):
11:01 PM Changeset in webkit [33278] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-24 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Geoffrey Garen.

Bug 18716: SQUIRRELFISH: typeof should return undefined for an undefined variable reference
<https://bugs.webkit.org/show_bug.cgi?id=18716>

This fixes 2 more regression tests.

  • kjs/nodes.cpp: (KJS::TypeOfResolveNode::emitCode):
11:01 PM Changeset in webkit [33277] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-24 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Put the callee in the call frame.

Necessary in order to support "arguments" and "arguments.callee".

Also fixes a latent GC bug, where an executing function could be
subject to GC if the register holding it were overwritten. Here's
an example that would have caused problems:

function f()
{

Flood the machine stack to eliminate any old pointers to f.
g.call({});

Overwrite f in the register file.
f = 1;

Force a GC.
for (var i = 0; i < 5000; ++i) {

({});

}

Welcome to crash-ville.

}

function g()
{
}

f();

  • VM/Machine.h: Changed the order of arguments to execute(FunctionBodyNode*...) to match the other execute functions.
  • kjs/function.cpp: Updated to match new argument requirements from execute(FunctionBodyNode*...). Renamed newObj to thisObj to match the rest of JavaScriptCore.

SunSpider reports no change.

11:01 PM Changeset in webkit [33276] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-23 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Bug 18707: SQUIRRELFISH: eval always performs toString() on its argument
<https://bugs.webkit.org/show_bug.cgi?id=18707>

This fixes 4 more regression tests.

  • VM/Machine.cpp: (KJS::eval):
11:01 PM Changeset in webkit [33275] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-23 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix logic bug in SegmentedVector::grow which would sometimes fail to resize a segment when needed

Fixes 3 JSC tests.

  • VM/SegmentedVector.h: (KJS::SegmentedVector::grow):
11:01 PM Changeset in webkit [33274] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

2008-04-23 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Degenerate handling of "arguments" as a property of the activation
object. Currently, we just return a vanilla object.

SunSpider reports no change.

Fixes:

ecma_3/Function/regress-94506.js.

Reveals to have been secretly broken:

ecma_3/Function/15.3.4.3-1.js
ecma_3/Function/15.3.4.4-1.js

These tests were passing incorrectly. testkjs creates a global array
named "arguments" to hold command-line arguments. That array was
tricking these tests into thinking that an arguments object with length
0 had been created. Since our new vanilla object shadows the global
property named arguments, that object no longer fools these tests into
passing.

Net change: +1 failing test.

  • kjs/AllInOneFile.cpp: Had to put JSActivation.cpp into AllInOneFile.cpp to solve a surprising 8.6% regression in bitops-3bit-bits-in-byte.
11:01 PM Changeset in webkit [33273] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-23 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • save and restore callFrame
  • VM/Machine.cpp: (KJS::slideRegisterWindowForCall): (KJS::Machine::execute): (KJS::Machine::privateExecute):
  • kjs/testkjs.cpp: (main):
11:00 PM Changeset in webkit [33272] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-23 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Fixed scopes for named function expressions.

Fixes one regression test.

Two changes here:

(1) The function's name is supposed to have attributes DontDelete,
ReadOnly, regardless of the type of code executing.

(2) Push the name object on the function's scope chain, rather than
the ExecState's scope chain because, well, that's where it belongs.

11:00 PM Changeset in webkit [33271] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

2008-04-23 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Inlined JSObject::putDirect, for a .4% SunSpider speedup.

I did this as a first step toward removing nodes.cpp from
AllInOneFile.cpp, but I'm putting that larger project aside for now.

11:00 PM Changeset in webkit [33270] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-23 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Geoff.

  • add OldInterpreterExecState class and use it in dead code

This will allow removing things from the real ExecState class
without having to figure out how to remove all this code without
getting a perf regression.

  • kjs/nodes.cpp: (KJS::ExpressionNode::evaluateToNumber): (KJS::ExpressionNode::evaluateToBoolean): (KJS::ExpressionNode::evaluateToInt32): (KJS::ExpressionNode::evaluateToUInt32): (KJS::Node::setErrorCompletion): (KJS::Node::throwError): (KJS::Node::throwUndefinedVariableError): (KJS::Node::handleException): (KJS::Node::rethrowException): (KJS::BreakpointCheckStatement::execute): (KJS::BreakpointCheckStatement::optimizeVariableAccess): (KJS::NullNode::evaluate): (KJS::FalseNode::evaluate): (KJS::TrueNode::evaluate): (KJS::NumberNode::evaluate): (KJS::NumberNode::evaluateToNumber): (KJS::NumberNode::evaluateToBoolean): (KJS::NumberNode::evaluateToInt32): (KJS::NumberNode::evaluateToUInt32): (KJS::ImmediateNumberNode::evaluate): (KJS::ImmediateNumberNode::evaluateToInt32): (KJS::ImmediateNumberNode::evaluateToUInt32): (KJS::StringNode::evaluate): (KJS::StringNode::evaluateToNumber): (KJS::StringNode::evaluateToBoolean): (KJS::RegExpNode::evaluate): (KJS::ThisNode::evaluate): (KJS::ResolveNode::inlineEvaluate): (KJS::ResolveNode::evaluate): (KJS::ResolveNode::evaluateToNumber): (KJS::ResolveNode::evaluateToBoolean): (KJS::ResolveNode::evaluateToInt32): (KJS::ResolveNode::evaluateToUInt32): (KJS::getSymbolTableEntry): (KJS::ResolveNode::optimizeVariableAccess): (KJS::LocalVarAccessNode::inlineEvaluate): (KJS::LocalVarAccessNode::evaluate): (KJS::LocalVarAccessNode::evaluateToNumber): (KJS::LocalVarAccessNode::evaluateToBoolean): (KJS::LocalVarAccessNode::evaluateToInt32): (KJS::LocalVarAccessNode::evaluateToUInt32): (KJS::getNonLocalSymbol): (KJS::ScopedVarAccessNode::inlineEvaluate): (KJS::ScopedVarAccessNode::evaluate): (KJS::ScopedVarAccessNode::evaluateToNumber): (KJS::ScopedVarAccessNode::evaluateToBoolean): (KJS::ScopedVarAccessNode::evaluateToInt32): (KJS::ScopedVarAccessNode::evaluateToUInt32): (KJS::NonLocalVarAccessNode::inlineEvaluate): (KJS::NonLocalVarAccessNode::evaluate): (KJS::NonLocalVarAccessNode::evaluateToNumber): (KJS::NonLocalVarAccessNode::evaluateToBoolean): (KJS::NonLocalVarAccessNode::evaluateToInt32): (KJS::NonLocalVarAccessNode::evaluateToUInt32): (KJS::ElementNode::optimizeVariableAccess): (KJS::ElementNode::evaluate): (KJS::ArrayNode::optimizeVariableAccess): (KJS::ArrayNode::evaluate): (KJS::ObjectLiteralNode::optimizeVariableAccess): (KJS::ObjectLiteralNode::evaluate): (KJS::PropertyListNode::optimizeVariableAccess): (KJS::PropertyListNode::evaluate): (KJS::PropertyNode::optimizeVariableAccess): (KJS::PropertyNode::evaluate): (KJS::BracketAccessorNode::optimizeVariableAccess): (KJS::BracketAccessorNode::inlineEvaluate): (KJS::BracketAccessorNode::evaluate): (KJS::BracketAccessorNode::evaluateToNumber): (KJS::BracketAccessorNode::evaluateToBoolean): (KJS::BracketAccessorNode::evaluateToInt32): (KJS::BracketAccessorNode::evaluateToUInt32): (KJS::DotAccessorNode::optimizeVariableAccess): (KJS::DotAccessorNode::inlineEvaluate): (KJS::DotAccessorNode::evaluate): (KJS::DotAccessorNode::evaluateToNumber): (KJS::DotAccessorNode::evaluateToBoolean): (KJS::DotAccessorNode::evaluateToInt32): (KJS::DotAccessorNode::evaluateToUInt32): (KJS::ArgumentListNode::optimizeVariableAccess): (KJS::ArgumentListNode::evaluateList): (KJS::ArgumentsNode::optimizeVariableAccess): (KJS::NewExprNode::optimizeVariableAccess): (KJS::NewExprNode::inlineEvaluate): (KJS::NewExprNode::evaluate): (KJS::NewExprNode::evaluateToNumber): (KJS::NewExprNode::evaluateToBoolean): (KJS::NewExprNode::evaluateToInt32): (KJS::NewExprNode::evaluateToUInt32): (KJS::ExpressionNode::resolveAndCall): (KJS::EvalFunctionCallNode::optimizeVariableAccess): (KJS::EvalFunctionCallNode::evaluate): (KJS::FunctionCallValueNode::optimizeVariableAccess): (KJS::FunctionCallValueNode::evaluate): (KJS::FunctionCallResolveNode::optimizeVariableAccess): (KJS::FunctionCallResolveNode::inlineEvaluate): (KJS::FunctionCallResolveNode::evaluate): (KJS::FunctionCallResolveNode::evaluateToNumber): (KJS::FunctionCallResolveNode::evaluateToBoolean): (KJS::FunctionCallResolveNode::evaluateToInt32): (KJS::FunctionCallResolveNode::evaluateToUInt32): (KJS::LocalVarFunctionCallNode::inlineEvaluate): (KJS::LocalVarFunctionCallNode::evaluate): (KJS::LocalVarFunctionCallNode::evaluateToNumber): (KJS::LocalVarFunctionCallNode::evaluateToBoolean): (KJS::LocalVarFunctionCallNode::evaluateToInt32): (KJS::LocalVarFunctionCallNode::evaluateToUInt32): (KJS::ScopedVarFunctionCallNode::inlineEvaluate): (KJS::ScopedVarFunctionCallNode::evaluate): (KJS::ScopedVarFunctionCallNode::evaluateToNumber): (KJS::ScopedVarFunctionCallNode::evaluateToBoolean): (KJS::ScopedVarFunctionCallNode::evaluateToInt32): (KJS::ScopedVarFunctionCallNode::evaluateToUInt32): (KJS::NonLocalVarFunctionCallNode::inlineEvaluate): (KJS::NonLocalVarFunctionCallNode::evaluate): (KJS::NonLocalVarFunctionCallNode::evaluateToNumber): (KJS::NonLocalVarFunctionCallNode::evaluateToBoolean): (KJS::NonLocalVarFunctionCallNode::evaluateToInt32): (KJS::NonLocalVarFunctionCallNode::evaluateToUInt32): (KJS::FunctionCallBracketNode::optimizeVariableAccess): (KJS::FunctionCallBracketNode::evaluate): (KJS::FunctionCallDotNode::optimizeVariableAccess): (KJS::FunctionCallDotNode::inlineEvaluate): (KJS::FunctionCallDotNode::evaluate): (KJS::FunctionCallDotNode::evaluateToNumber): (KJS::FunctionCallDotNode::evaluateToBoolean): (KJS::FunctionCallDotNode::evaluateToInt32): (KJS::FunctionCallDotNode::evaluateToUInt32): (KJS::PostIncResolveNode::optimizeVariableAccess): (KJS::PostIncResolveNode::evaluate): (KJS::PostIncLocalVarNode::evaluate): (KJS::PostDecResolveNode::optimizeVariableAccess): (KJS::PostDecResolveNode::evaluate): (KJS::PostDecLocalVarNode::evaluate): (KJS::PostDecLocalVarNode::inlineEvaluateToNumber): (KJS::PostDecLocalVarNode::evaluateToNumber): (KJS::PostDecLocalVarNode::evaluateToBoolean): (KJS::PostDecLocalVarNode::evaluateToInt32): (KJS::PostDecLocalVarNode::evaluateToUInt32): (KJS::PostfixBracketNode::optimizeVariableAccess): (KJS::PostIncBracketNode::evaluate): (KJS::PostDecBracketNode::evaluate): (KJS::PostfixDotNode::optimizeVariableAccess): (KJS::PostIncDotNode::evaluate): (KJS::PostDecDotNode::evaluate): (KJS::PostfixErrorNode::evaluate): (KJS::DeleteResolveNode::optimizeVariableAccess): (KJS::DeleteResolveNode::evaluate): (KJS::LocalVarDeleteNode::evaluate): (KJS::DeleteBracketNode::optimizeVariableAccess): (KJS::DeleteBracketNode::evaluate): (KJS::DeleteDotNode::optimizeVariableAccess): (KJS::DeleteDotNode::evaluate): (KJS::DeleteValueNode::optimizeVariableAccess): (KJS::DeleteValueNode::evaluate): (KJS::VoidNode::optimizeVariableAccess): (KJS::VoidNode::evaluate): (KJS::TypeOfValueNode::optimizeVariableAccess): (KJS::TypeOfResolveNode::optimizeVariableAccess): (KJS::LocalVarTypeOfNode::evaluate): (KJS::TypeOfResolveNode::evaluate): (KJS::TypeOfValueNode::evaluate): (KJS::PreIncResolveNode::optimizeVariableAccess): (KJS::PreIncLocalVarNode::evaluate): (KJS::PreIncResolveNode::evaluate): (KJS::PreDecResolveNode::optimizeVariableAccess): (KJS::PreDecLocalVarNode::evaluate): (KJS::PreDecResolveNode::evaluate): (KJS::PreIncConstNode::evaluate): (KJS::PreDecConstNode::evaluate): (KJS::PostIncConstNode::evaluate): (KJS::PostDecConstNode::evaluate): (KJS::PrefixBracketNode::optimizeVariableAccess): (KJS::PreIncBracketNode::evaluate): (KJS::PreDecBracketNode::evaluate): (KJS::PrefixDotNode::optimizeVariableAccess): (KJS::PreIncDotNode::evaluate): (KJS::PreDecDotNode::evaluate): (KJS::PrefixErrorNode::evaluate): (KJS::UnaryPlusNode::optimizeVariableAccess): (KJS::UnaryPlusNode::evaluate): (KJS::UnaryPlusNode::evaluateToBoolean): (KJS::UnaryPlusNode::evaluateToNumber): (KJS::UnaryPlusNode::evaluateToInt32): (KJS::UnaryPlusNode::evaluateToUInt32): (KJS::NegateNode::optimizeVariableAccess): (KJS::NegateNode::evaluate): (KJS::NegateNode::evaluateToNumber): (KJS::BitwiseNotNode::optimizeVariableAccess): (KJS::BitwiseNotNode::inlineEvaluateToInt32): (KJS::BitwiseNotNode::evaluate): (KJS::BitwiseNotNode::evaluateToNumber): (KJS::BitwiseNotNode::evaluateToBoolean): (KJS::BitwiseNotNode::evaluateToInt32): (KJS::BitwiseNotNode::evaluateToUInt32): (KJS::LogicalNotNode::optimizeVariableAccess): (KJS::LogicalNotNode::evaluate): (KJS::LogicalNotNode::evaluateToBoolean): (KJS::MultNode::optimizeVariableAccess): (KJS::MultNode::inlineEvaluateToNumber): (KJS::MultNode::evaluate): (KJS::MultNode::evaluateToNumber): (KJS::MultNode::evaluateToBoolean): (KJS::MultNode::evaluateToInt32): (KJS::MultNode::evaluateToUInt32): (KJS::DivNode::optimizeVariableAccess): (KJS::DivNode::inlineEvaluateToNumber): (KJS::DivNode::evaluate): (KJS::DivNode::evaluateToNumber): (KJS::DivNode::evaluateToInt32): (KJS::DivNode::evaluateToUInt32): (KJS::ModNode::optimizeVariableAccess): (KJS::ModNode::inlineEvaluateToNumber): (KJS::ModNode::evaluate): (KJS::ModNode::evaluateToNumber): (KJS::ModNode::evaluateToBoolean): (KJS::ModNode::evaluateToInt32): (KJS::ModNode::evaluateToUInt32): (KJS::throwOutOfMemoryErrorToNumber): (KJS::addSlowCase): (KJS::addSlowCaseToNumber): (KJS::add): (KJS::addToNumber): (KJS::AddNode::optimizeVariableAccess): (KJS::AddNode::evaluate): (KJS::AddNode::inlineEvaluateToNumber): (KJS::AddNode::evaluateToNumber): (KJS::AddNode::evaluateToInt32): (KJS::AddNode::evaluateToUInt32): (KJS::AddNumbersNode::inlineEvaluateToNumber): (KJS::AddNumbersNode::evaluate): (KJS::AddNumbersNode::evaluateToNumber): (KJS::AddNumbersNode::evaluateToInt32): (KJS::AddNumbersNode::evaluateToUInt32): (KJS::AddStringsNode::evaluate): (KJS::AddStringLeftNode::evaluate): (KJS::AddStringRightNode::evaluate): (KJS::SubNode::optimizeVariableAccess): (KJS::SubNode::inlineEvaluateToNumber): (KJS::SubNode::evaluate): (KJS::SubNode::evaluateToNumber): (KJS::SubNode::evaluateToInt32): (KJS::SubNode::evaluateToUInt32): (KJS::LeftShiftNode::optimizeVariableAccess): (KJS::LeftShiftNode::inlineEvaluateToInt32): (KJS::LeftShiftNode::evaluate): (KJS::LeftShiftNode::evaluateToNumber): (KJS::LeftShiftNode::evaluateToInt32): (KJS::LeftShiftNode::evaluateToUInt32): (KJS::RightShiftNode::optimizeVariableAccess): (KJS::RightShiftNode::inlineEvaluateToInt32): (KJS::RightShiftNode::evaluate): (KJS::RightShiftNode::evaluateToNumber): (KJS::RightShiftNode::evaluateToInt32): (KJS::RightShiftNode::evaluateToUInt32): (KJS::UnsignedRightShiftNode::optimizeVariableAccess): (KJS::UnsignedRightShiftNode::inlineEvaluateToUInt32): (KJS::UnsignedRightShiftNode::evaluate): (KJS::UnsignedRightShiftNode::evaluateToNumber): (KJS::UnsignedRightShiftNode::evaluateToInt32): (KJS::UnsignedRightShiftNode::evaluateToUInt32): (KJS::lessThan): (KJS::lessThanEq): (KJS::LessNode::optimizeVariableAccess): (KJS::LessNode::inlineEvaluateToBoolean): (KJS::LessNode::evaluate): (KJS::LessNode::evaluateToBoolean): (KJS::LessNumbersNode::inlineEvaluateToBoolean): (KJS::LessNumbersNode::evaluate): (KJS::LessNumbersNode::evaluateToBoolean): (KJS::LessStringsNode::inlineEvaluateToBoolean): (KJS::LessStringsNode::evaluate): (KJS::LessStringsNode::evaluateToBoolean): (KJS::GreaterNode::optimizeVariableAccess): (KJS::GreaterNode::inlineEvaluateToBoolean): (KJS::GreaterNode::evaluate): (KJS::GreaterNode::evaluateToBoolean): (KJS::LessEqNode::optimizeVariableAccess): (KJS::LessEqNode::inlineEvaluateToBoolean): (KJS::LessEqNode::evaluate): (KJS::LessEqNode::evaluateToBoolean): (KJS::GreaterEqNode::optimizeVariableAccess): (KJS::GreaterEqNode::inlineEvaluateToBoolean): (KJS::GreaterEqNode::evaluate): (KJS::GreaterEqNode::evaluateToBoolean): (KJS::InstanceOfNode::optimizeVariableAccess): (KJS::InstanceOfNode::evaluate): (KJS::InstanceOfNode::evaluateToBoolean): (KJS::InNode::optimizeVariableAccess): (KJS::InNode::evaluate): (KJS::InNode::evaluateToBoolean): (KJS::EqualNode::optimizeVariableAccess): (KJS::EqualNode::inlineEvaluateToBoolean): (KJS::EqualNode::evaluate): (KJS::EqualNode::evaluateToBoolean): (KJS::NotEqualNode::optimizeVariableAccess): (KJS::NotEqualNode::inlineEvaluateToBoolean): (KJS::NotEqualNode::evaluate): (KJS::NotEqualNode::evaluateToBoolean): (KJS::StrictEqualNode::optimizeVariableAccess): (KJS::StrictEqualNode::inlineEvaluateToBoolean): (KJS::StrictEqualNode::evaluate): (KJS::StrictEqualNode::evaluateToBoolean): (KJS::NotStrictEqualNode::optimizeVariableAccess): (KJS::NotStrictEqualNode::inlineEvaluateToBoolean): (KJS::NotStrictEqualNode::evaluate): (KJS::NotStrictEqualNode::evaluateToBoolean): (KJS::BitAndNode::optimizeVariableAccess): (KJS::BitAndNode::evaluate): (KJS::BitAndNode::inlineEvaluateToInt32): (KJS::BitAndNode::evaluateToNumber): (KJS::BitAndNode::evaluateToBoolean): (KJS::BitAndNode::evaluateToInt32): (KJS::BitAndNode::evaluateToUInt32): (KJS::BitXOrNode::optimizeVariableAccess): (KJS::BitXOrNode::inlineEvaluateToInt32): (KJS::BitXOrNode::evaluate): (KJS::BitXOrNode::evaluateToNumber): (KJS::BitXOrNode::evaluateToBoolean): (KJS::BitXOrNode::evaluateToInt32): (KJS::BitXOrNode::evaluateToUInt32): (KJS::BitOrNode::optimizeVariableAccess): (KJS::BitOrNode::inlineEvaluateToInt32): (KJS::BitOrNode::evaluate): (KJS::BitOrNode::evaluateToNumber): (KJS::BitOrNode::evaluateToBoolean): (KJS::BitOrNode::evaluateToInt32): (KJS::BitOrNode::evaluateToUInt32): (KJS::LogicalAndNode::optimizeVariableAccess): (KJS::LogicalAndNode::evaluate): (KJS::LogicalAndNode::evaluateToBoolean): (KJS::LogicalOrNode::optimizeVariableAccess): (KJS::LogicalOrNode::evaluate): (KJS::LogicalOrNode::evaluateToBoolean): (KJS::ConditionalNode::optimizeVariableAccess): (KJS::ConditionalNode::evaluate): (KJS::ConditionalNode::evaluateToBoolean): (KJS::ConditionalNode::evaluateToNumber): (KJS::ConditionalNode::evaluateToInt32): (KJS::ConditionalNode::evaluateToUInt32): (KJS::valueForReadModifyAssignment): (KJS::ReadModifyResolveNode::optimizeVariableAccess): (KJS::AssignResolveNode::optimizeVariableAccess): (KJS::ReadModifyLocalVarNode::evaluate): (KJS::AssignLocalVarNode::evaluate): (KJS::ReadModifyConstNode::evaluate): (KJS::AssignConstNode::evaluate): (KJS::ReadModifyResolveNode::evaluate): (KJS::AssignResolveNode::evaluate): (KJS::AssignDotNode::optimizeVariableAccess): (KJS::AssignDotNode::evaluate): (KJS::ReadModifyDotNode::optimizeVariableAccess): (KJS::ReadModifyDotNode::evaluate): (KJS::AssignErrorNode::evaluate): (KJS::AssignBracketNode::optimizeVariableAccess): (KJS::AssignBracketNode::evaluate): (KJS::ReadModifyBracketNode::optimizeVariableAccess): (KJS::ReadModifyBracketNode::evaluate): (KJS::CommaNode::optimizeVariableAccess): (KJS::CommaNode::evaluate): (KJS::ConstDeclNode::optimizeVariableAccess): (KJS::ConstDeclNode::handleSlowCase): (KJS::ConstDeclNode::evaluateSingle): (KJS::ConstDeclNode::evaluate): (KJS::ConstStatementNode::optimizeVariableAccess): (KJS::ConstStatementNode::execute): (KJS::statementListExecute): (KJS::BlockNode::optimizeVariableAccess): (KJS::BlockNode::execute): (KJS::EmptyStatementNode::execute): (KJS::ExprStatementNode::optimizeVariableAccess): (KJS::ExprStatementNode::execute): (KJS::VarStatementNode::optimizeVariableAccess): (KJS::VarStatementNode::execute): (KJS::IfNode::optimizeVariableAccess): (KJS::IfNode::execute): (KJS::IfElseNode::optimizeVariableAccess): (KJS::IfElseNode::execute): (KJS::DoWhileNode::optimizeVariableAccess): (KJS::DoWhileNode::execute): (KJS::WhileNode::optimizeVariableAccess): (KJS::WhileNode::execute): (KJS::ForNode::optimizeVariableAccess): (KJS::ForNode::execute): (KJS::ForInNode::optimizeVariableAccess): (KJS::ForInNode::execute): (KJS::ContinueNode::execute): (KJS::BreakNode::execute): (KJS::ReturnNode::optimizeVariableAccess): (KJS::ReturnNode::execute): (KJS::WithNode::optimizeVariableAccess): (KJS::WithNode::execute): (KJS::CaseClauseNode::optimizeVariableAccess): (KJS::CaseClauseNode::evaluate): (KJS::CaseClauseNode::executeStatements): (KJS::ClauseListNode::optimizeVariableAccess): (KJS::CaseBlockNode::optimizeVariableAccess): (KJS::CaseBlockNode::executeBlock): (KJS::SwitchNode::optimizeVariableAccess): (KJS::SwitchNode::execute): (KJS::LabelNode::optimizeVariableAccess): (KJS::LabelNode::execute): (KJS::ThrowNode::optimizeVariableAccess): (KJS::ThrowNode::execute): (KJS::TryNode::optimizeVariableAccess): (KJS::TryNode::execute): (KJS::ProgramNode::initializeSymbolTable): (KJS::ScopeNode::optimizeVariableAccess): (KJS::ProgramNode::processDeclarations): (KJS::EvalNode::processDeclarations): (KJS::ProgramNode::execute): (KJS::EvalNode::execute): (KJS::FunctionBodyNodeWithDebuggerHooks::execute): (KJS::FuncDeclNode::execute): (KJS::FuncExprNode::evaluate):
  • kjs/nodes.h: (KJS::Node::): (KJS::FalseNode::): (KJS::TrueNode::): (KJS::ArgumentsNode::):
11:00 PM Changeset in webkit [33269] by mrowe@apple.com
  • 4 edits
    1 add in branches/squirrelfish/JavaScriptCore

Bug 18672: SQUIRRELFISH: codegen fails with a large number of temporaries
<https://bugs.webkit.org/show_bug.cgi?id=18672>

Reviewed by Geoff

Add a SegmentedVector type, which provides a Vector<T> which maintains
existing memory locations during resize. This allows dynamically sizing
local, temporary and label "vectors" in CodeGenerator.

11:00 PM Changeset in webkit [33268] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-23 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

A little refactoring in preparation for supporting 'arguments'.

Fixes 2 regression tests.

SunSpider reports no change.

We now check the activation register, instead of the codeBlock, to
determine whether we need to tear off the activation. This is to support
"f.arguments", which will create an activation/arguments pair for f,
even though the needsFullScopeChain flag is false for f's codeBlock.

The test fixes resulted from calling initializeCallFrame for re-entrant
function code, instead of initializing (not enough) parts of the call
frame by hand.

11:00 PM Changeset in webkit [33267] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-22 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

  • propagate the "this" value properly to local eval

(fixes a measly one regression test)

  • VM/CodeBlock.h: (KJS::CodeBlock::CodeBlock): (KJS::ProgramCodeBlock::ProgramCodeBlock): (KJS::EvalCodeBlock::EvalCodeBlock):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:00 PM Changeset in webkit [33266] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

2008-04-22 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Add support for function declarations in eval code.

(this fixes 12 more regression tests)

  • VM/CodeBlock.h:
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::CodeGenerator):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::execute):
  • kjs/nodes.cpp: (KJS::EvalNode::generateCode):
11:00 PM Changeset in webkit [33265] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-22 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver.

Implement LabelNode.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::pushJumpContext): (KJS::CodeGenerator::jumpContextForContinue): (KJS::CodeGenerator::jumpContextForBreak):
  • VM/CodeGenerator.h:
  • kjs/nodes.cpp: (KJS::DoWhileNode::emitCode): (KJS::WhileNode::emitCode): (KJS::ForNode::emitCode): (KJS::ForInNode::emitCode): (KJS::ContinueNode::emitCode): (KJS::BreakNode::emitCode): (KJS::SwitchNode::emitCode): (KJS::LabelNode::emitCode):
11:00 PM Changeset in webkit [33264] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-22 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Fixed crash when unwinding from exceptions inside eval.

  • VM/Machine.cpp: (KJS::Machine::unwindCallFrame): Don't assume that the top of the current call frame's scope chain is an activation: it can be the global object, instead.
11:00 PM Changeset in webkit [33263] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-22 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • kjs/testkjs.cpp: (main): Convert signals to exit codes, so that crashing tests are detected as regression test failures.
11:00 PM Changeset in webkit [33262] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-22 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt and Maciej Stachowiak.

Renamed "needsActivation" to "needsFullScopeChain" because lying will
make hair grow on the backs of your hands.

11:00 PM Changeset in webkit [33261] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

Fixed ChangeLog

11:00 PM Changeset in webkit [33260] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Fixed ScopeChainNode lifetime problems:

(1) In "with" and "catch" scopes, we would construct a ScopeChain
object and then jump across its destructor, leaking the ScopeChainNode
we had pushed.

(2) In global and eval scopes, we would fail to initially ref
"scopeChain", causing us to overrelease it later. Now that we ref
"scopeChain" properly, we also need to deref it when the script
terminates.

SunSpider reports no change.

11:00 PM Changeset in webkit [33259] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-22 Maciej Stachowiak <mjs@apple.com>

Reviewed by Alexey.

  • use global object instead of null for "this" on unqualified calls

This fixes 10 more JSC test regressions.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:00 PM Changeset in webkit [33258] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-22 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • throw proper exceptions for objects that don't implement call or construct

This fixes 21 more JSC test regressions. It is also seemingly an
0.5% progression.

  • VM/ExceptionHelpers.cpp: (KJS::createNotAnObjectError): (KJS::createNotAConstructorError): (KJS::createNotAFunctionError):
  • VM/ExceptionHelpers.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
11:00 PM Changeset in webkit [33257] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

Implement emitCode for ConstDeclNode.

Reviewed by Geoff

This fixes the crash (assertion) in js1_5/Scope/scope-001.js

11:00 PM Changeset in webkit [33256] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

  • add some support for the split window object

This fixes many layout tests.

  • VM/Machine.cpp: (KJS::resolveBaseAndFunc): Use toThisObject() to ensure we get the wrapper global, if one exists, as the "this" object.
  • kjs/function.cpp: (KJS::globalFuncEval): Use toGlobalObject() to handle the wrapper case properly.
11:00 PM Changeset in webkit [33255] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • restore ScopeChain::operator= to avoid crash on many layout tests

Otherwise, FunctionImp::setScope would cause a reference
underflow. I implemented using the copy construct and swap idiom.

  • kjs/scope_chain.h: (KJS::ScopeChain::swap): (KJS::ScopeChain::operator=):
11:00 PM Changeset in webkit [33254] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Bug 18649: SQUIRRELFISH: correctly handle exceptions in eval code
<https://bugs.webkit.org/show_bug.cgi?id=18649>

Reviewed by Geoff

Allocate a callframe for eval() and initialise with a null codeBlock to
indicate native code. This prevents the unwinder from clobbering the
register stack.

11:00 PM Changeset in webkit [33253] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/WebKit/mac

2008-04-21 Geoffrey Garen <ggaren@apple.com>

Build fix.

  • ChangeLog:
  • WebView/WebScriptDebugDelegate.mm: (-[WebScriptCallFrame scopeChain]):
11:00 PM Changeset in webkit [33252] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Removed ScopeChain::push(ScopeChain&) because it was unused. Moved
ScopeChain::print to ScopeChainNode.

ScopeChain is now nothing more than a resource-handling wrapper around
ScopeChainNode.

10:59 PM Changeset in webkit [33251] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Bug 18671: SquirrelFish: continue inside switch fails
<https://bugs.webkit.org/show_bug.cgi?id=18671>

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::jumpContextForLabel):
  • VM/CodeGenerator.h:
  • kjs/nodes.cpp: (KJS::ContinueNode::emitCode):
10:59 PM Changeset in webkit [33250] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Moved push(JSObject*) and pop() from ScopeChain to ScopeChainNode,
rearranging scope_chain.h a bit.

SunSpider reports no change.

10:59 PM Changeset in webkit [33249] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Moved bottom() from ScopeChain to ScopeChainNode, simplifying it based
on the knowledge that the ScopeChain is never empty.

SunSpider reports no change.

10:59 PM Changeset in webkit [33248] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Moved begin() and end() from ScopeChain to ScopeChainNode.

Also marked a few methods "const".

SunSpider reports no change.

10:59 PM Changeset in webkit [33247] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Turned ScopeChain::depth into a stand-alone function, and simplified it
a bit.

I also moved ScopeChain::depth to Machine.cpp because it doesn't report
the true depth of the ScopeChain -- just the Machine's perspective of
its depth within a given call frame.

SunSpider reports no change.

10:59 PM Changeset in webkit [33246] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Removed indirection in ScopeChain::ref / ScopeChain::deref.

SunSpider reports no change.

  • kjs/scope_chain.h: (KJS::ScopeChain::ScopeChain): (KJS::ScopeChain::~ScopeChain): (KJS::ScopeChain::clear):
10:59 PM Changeset in webkit [33245] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Fix debug build

10:59 PM Changeset in webkit [33244] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Bug 18664: SQUIRRELFISH: correctly throw a SyntaxError when parsing of eval code fails
<https://bugs.webkit.org/show_bug.cgi?id=18664>

Patch from Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Oliver

Correctly throw a SyntaxError when parsing of eval code fails.

10:59 PM Changeset in webkit [33243] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Partial fix for Bug 18649: SQUIRRELFISH: correctly handle exceptions in eval code

Reviewed by Geoff

Make sure we correct the register state before jumping to vm_throw.

10:59 PM Changeset in webkit [33242] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

Fixed reviewer named in old commit message

10:59 PM Changeset in webkit [33241] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Simplified ScopeChain ref/deref.

SunSpider reports a .4% speedup.

  • kjs/scope_chain.h: (KJS::ScopeChainNode::ref): Removed this function because it was nonsense. ScopeChainNodes are initialized with a refCount of 1, so the loop was guaranteed to iterate exactly once.
10:59 PM Changeset in webkit [33240] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Removed support for empty ScopeChains.

SunSpider reports no change.

10:59 PM Changeset in webkit [33239] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Removed some completely unused ScopeChain member functions.

SunSpider reports no change.

10:59 PM Changeset in webkit [33238] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Avoid creating unnecessary ScopeChain objects, to reduce refcount churn.

SunSpider reports no change.

10:59 PM Changeset in webkit [33237] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Alexey.

Add some braces.x

  • kjs/testkjs.cpp: (runWithScripts):
10:59 PM Changeset in webkit [33236] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • only print "End:" output when -d flag is passed.

This fixes half of our failing JSC regression tests.

  • kjs/testkjs.cpp: (runWithScripts):
10:59 PM Changeset in webkit [33235] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

2008-04-21 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Add support for variable declarations in eval code.

  • VM/CodeBlock.h: (KJS::EvalCodeBlock::EvalCodeBlock):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::CodeGenerator):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::execute):
  • VM/Machine.h:
  • kjs/function.cpp: (KJS::globalFuncEval):
  • kjs/nodes.cpp: (KJS::EvalNode::generateCode):
  • kjs/nodes.h: (KJS::EvalNode::):
10:58 PM Changeset in webkit [33234] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

Throw exceptions for invalid continue, break, and return statements.

Reviewed by Maciej

Simple refactoring and extension of Cameron's AssignErrorNode, etc patch

10:58 PM Changeset in webkit [33233] by mrowe@apple.com
  • 15 edits in branches/squirrelfish/JavaScriptCore

2008-04-20 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Removed Machine.cpp from AllInOneFile.cpp, and manually inlined a few
things that used to be inlined automatically.

1.9% speedup on SunSpider.

My hope is that we'll face fewer surprises in Machine.cpp codegen, now
that GCC is making fewer decisions. The speedup seems to confirm that.

10:58 PM Changeset in webkit [33232] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Bug 18642: Iterator context may get placed into the return register, leading to much badness
<https://bugs.webkit.org/show_bug.cgi?id=18642>

Reviewed by Maciej

To prevent incorrectly reusing what will become the result register for
eval and global code execution, we need to request and ref the destination
in advance of codegen. Unfortunately this may lead to unnecessary copying,
although in future we can probably limit this. Curiously SunSpider shows
a progression in a number of tests, although it comes out as a wash overall.

This also fixes one of the regressions in run-javascriptcore-tests.

10:58 PM Changeset in webkit [33231] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-04-20 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Add support for AssignErrorNode, PrefixErrorNode, and PostfixErrorNode.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitCreateError):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::PostfixErrorNode::emitCode): (KJS::PrefixErrorNode::emitCode): (KJS::AssignErrorNode::emitCode):
  • kjs/nodes.h:
10:58 PM Changeset in webkit [33230] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

Provide line number information in exceptions

Reviewed by Geoff and Mark

Simple patch, adds line number information metadata to CodeBlock
and a simple method to get the line number responsible for a given
Instruction*.

10:58 PM Changeset in webkit [33229] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

Provide "sourceURL" in exceptions

Reviewed by Maciej

10:58 PM Changeset in webkit [33228] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Don't call emitCode directly on subnodes, instead use CodeGenerator::emitNode

Reviewed by Maciej

This patch just a preparation for tracking line numbers.

10:58 PM Changeset in webkit [33227] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

Bug 18619: Support continue, break, and return in try .. finally blocks
<https://bugs.webkit.org/show_bug.cgi?id=18619>

Reviewed by Maciej

This patch replaces the current partial finally support (which uses code
duplication to achieve what it does) with a subroutine based approach.
This has a number of advantages over code duplication:

  • Reduced code size
  • Simplified exception handling as the finaliser code only exists in one place, so no "magic" is needed to get the correct handler for a finaliser.
  • When we support instruction to line number mapping we won't need to worry about the dramatic code movement caused by duplication

On the downside it is necessary to add two new opcodes, op_jsr and op_sret
to enter and exit the finaliser subroutines, happily SunSpider reports
a performance progression (gcc amazes me) and ubench reports a wash.

While jsr and sret provide a mechanism that allows us to enter and exit
any arbitrary finaliser we need to, it was still necessary to increase
the amount of information tracked when entering and exiting both finaliser
scopes and dynamic scopes ("with"). This means "scopeDepth" is now
the combination of "finaliserDepth" and "dynamicScopeDepth". We also
now use a scopeContextStack to ensure that we pop scopes and execute
finalisers in the correct order. This increases the cost of "with" nodes
during codegen, but it should not be significant enough to effect real
world performance and greatly simplifies codegen for return, break and
continue when interacting with finalisers.

10:58 PM Changeset in webkit [33226] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Remove unnecessary files from testkjs, testapi and minidom targets.

Rubber-stamped by Oliver Hunt.

10:58 PM Changeset in webkit [33225] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-17 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Fixed ASSERT seen during run-sunspider of a debug build.

  • VM/CodeGenerator.h: Made the default codegen buffers bigger. SunSpider runs all tests in one global environment, so you end up with more than 128 locals. This is just a stop-gap until we code up a real solution to arbitrary symbol and label limits.
10:58 PM Changeset in webkit [33224] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-17 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Fixed a bug in exception unwinding, where we wouldn't deref the scope
chain in global scope, so we would leak ScopeChainNodes when exceptions
were thrown inside "with" and "catch" scopes.

Also did some cleanup of the unwinding code along the way.

Scope chain reference counting is still wrong in a few ways. I thought
I would fix this portion of it first.

run-sunspider shows no change.

  • VM/Machine.cpp: (KJS::Machine::unwindCallFrame): (KJS::Machine::throwException): (KJS::Machine::privateExecute):
  • VM/Machine.h:
10:58 PM Changeset in webkit [33223] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Add more exception checking to toNumber conversions

Reviewed by Maciej

This corrects op_pre_dec, op_negate, op_mod and op_sub.

10:58 PM Changeset in webkit [33222] by mrowe@apple.com
  • 11 edits in branches/squirrelfish/JavaScriptCore

2008-04-17 Geoffrey Garen <ggaren@apple.com> and Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver Hunt.

Behold: eval.

Introduced a new opcode: op_call_eval. In the normal case, it performs
an eval. In the case where eval has been overridden in some way, it
performs a function call.

  • VM/CodeGenerator.h: Added a feature so the code generator knows not to optimized locals in eval code.
10:58 PM Changeset in webkit [33221] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-17 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Added some ASSERTs to document codegen failures in
run-javascriptcore-tests.

For all tests, program-level codegen now either succeeds, or fails with
an ASSERT.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::addVar): (KJS::CodeGenerator::CodeGenerator): (KJS::CodeGenerator::newTemporary): (KJS::CodeGenerator::newLabel):
10:58 PM Changeset in webkit [33220] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-17 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Fixed another case of a dst register being an unreferenced temporary
(caused an ASSERT when running the full sunspider suite).

  • kjs/nodes.cpp: (KJS::CaseBlockNode::emitCodeForBlock):
10:58 PM Changeset in webkit [33219] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-04-16 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • add documentation (and meaningful parameter names) for arithmetic and bitwise binary ops
  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitMul): (KJS::CodeGenerator::emitDiv): (KJS::CodeGenerator::emitMod): (KJS::CodeGenerator::emitSub): (KJS::CodeGenerator::emitLeftShift): (KJS::CodeGenerator::emitRightShift): (KJS::CodeGenerator::emitUnsignedRightShift): (KJS::CodeGenerator::emitBitAnd): (KJS::CodeGenerator::emitBitXOr): (KJS::CodeGenerator::emitBitOr):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::MultNode::emitCode): (KJS::DivNode::emitCode): (KJS::ModNode::emitCode): (KJS::SubNode::emitCode): (KJS::LeftShiftNode::emitCode): (KJS::RightShiftNode::emitCode): (KJS::UnsignedRightShiftNode::emitCode): (KJS::BitAndNode::emitCode): (KJS::BitXOrNode::emitCode): (KJS::BitOrNode::emitCode): (KJS::emitReadModifyAssignment): (KJS::ReadModifyResolveNode::emitCode):
10:58 PM Changeset in webkit [33218] by mrowe@apple.com
  • 18 edits in branches/squirrelfish/JavaScriptCore

Exception checks for toNumber in op_pre_inc

Reviewed by Geoff

This is somewhat more convoluted than the simple hadException checks
we currently use. Instead we use special toNumber conversions that
select between the exception and ordinary vPC. This allows us to
remove any branches in the common case (incrementing a number).

10:58 PM Changeset in webkit [33217] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-16 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • ensure that activations are kept in a register to protect them from GC

Also renamed OptionalCalleeScopeChain constant to OptionalCalleeActivation, since
that is what is now kept there, and there is no more need to keep the scope chain in
the register file.

  • VM/Machine.cpp: (KJS::initializeCallFrame): (KJS::scopeChainForCall):
  • VM/Machine.h: (KJS::Machine::):
10:57 PM Changeset in webkit [33216] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-16 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Made "this" work in program code / global scope.

The machine can initialize "this" prior to execution because it knows
that, for program code, "this" is always stored in lr1.

  • VM/Machine.cpp: (KJS::Machine::execute):
  • VM/Machine.h: (KJS::Machine::):
  • kjs/interpreter.cpp: (KJS::Interpreter::evaluate):
10:57 PM Changeset in webkit [33215] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-16 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Fixed a codegen bug when returning from inside a dynamic scope (a with
or catch block): we need to pop any dynamic scope(s) that have been
added so op_ret can find the activation object at the top of the scope
chain.

  • kjs/nodes.cpp: (KJS::ReturnNode::emitCode): If we're returning from inside a dynamic scope, emit a jmp_scopes to take care of popping any dynamic scope(s) and then branching to the return instruction.
10:57 PM Changeset in webkit [33214] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-04-16 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • document the add and get_prop_id opcodes

In addition to adding documentation in comments, I changed
references to register IDs or indices relating to these opcodes to
have meaningful names instead of r0 r1 r2.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitAdd):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/nodes.cpp: (KJS::DotAccessorNode::emitCode): (KJS::FunctionCallDotNode::emitCode): (KJS::PostIncDotNode::emitCode): (KJS::PostDecDotNode::emitCode): (KJS::PreIncDotNode::emitCode): (KJS::PreDecDotNode::emitCode): (KJS::AddNode::emitCode): (KJS::ReadModifyDotNode::emitCode):
10:57 PM Changeset in webkit [33213] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-15 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt and Maciej Stachowiak.

Fixed a codegen bug in with and switch, and added an ASSERT to
make sure it doesn't happen again.

emitCode() assumes that dst, if non-zero, is either referenced or
non-temporary (i.e., it assumes that newTemporary() will return a
register not equal to dst). Certain callers to emitCode() weren't
guaranteeing that to be so, so temporary register values were being
overwritten.

  • VM/CodeGenerator.h: (KJS::CodeGenerator::emitNode): ASSERT that dst is referenced or non-temporary.
  • kjs/nodes.cpp: (KJS::CommaNode::emitCode): Reference the dst we pass.

(KJS::WithNode::emitCode): No need to pass an explicit dst register.

(KJS::CaseBlockNode::emitCodeForBlock): No need to pass an explicit dst register.
(KJS::SwitchNode::emitCode): No need to pass an explicit dst register.

  • kjs/nodes.h: Made dst the last parameter to emitCodeForBlock, to match emitCode.
10:57 PM Changeset in webkit [33212] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Bug 18526: Throw exceptions when resolve fails for op_resolve_base_and_func.
<https://bugs.webkit.org/show_bug.cgi?id=18526>

Reviewed by Maciej

Very simple fix, sunspider shows a 0.7% progression, ubench shows a 0.4% regression.

10:57 PM Changeset in webkit [33211] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/SunSpider

2008-04-15 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Oliver.

  • add newly working tests to squirrelfish list
  • tests/LIST-SQUIRRELFISH: Add 3d-raytrace and string-unpack-code
10:57 PM Changeset in webkit [33210] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-15 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix incorrect result on 3d-raytrace test

Oliver found and tracked down this bug, I just typed in the fix.

  • VM/Machine.cpp: (KJS::slideRegisterWindowForCall): When setting omitted parameters to undefined, account for the space for local variables.
10:57 PM Changeset in webkit [33209] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-15 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix codegen handling of dst registers

1.006x speedup (not sure why).

Most emitCode functions take an optional "dst" parameter that says
where the output of the instruction should be written. I made some
functions for convenient handling of the dst register:

  • VM/CodeGenerator.h: (KJS::CodeGenerator::tempDestination): Takes the dst register. Returns it if it is not null and is a temporary, otherwise allocates a new temporary. This is intended for cases where an intermediate value might be written into the dst

(KJS::CodeGenerator::finalDestination): Takes the dst register and an optional
register that was used as a temp destination. Picks the right thing for the final
output. Intended to be used as the output register for the instruction that generates
the final value of a particular node.

(KJS::CodeGenerator::moveToDestinationIfNeeded): Takes dst and a
RegisterID; moves from the register to dst if dst is defined and
different from the register. This is intended for cases where the
result of a node is already in a specific register (likely a
local), and so no code needs to be generated unless a specific
destination has been requested, in which case a move is needed.

I also applied these methods throughout emitCode functions. In
some cases this was just cleanup, in other cases I fixed actual
codegen bugs. Below I have given specific comments for the cases
where I believe I fixed a codegen bug, or improved quality of codegen.

  • kjs/nodes.cpp: (KJS::NullNode::emitCode): (KJS::FalseNode::emitCode): (KJS::TrueNode::emitCode): (KJS::NumberNode::emitCode): (KJS::StringNode::emitCode): (KJS::RegExpNode::emitCode): (KJS::ThisNode::emitCode): Now avoids emitting a mov when dst is the same as the this register (the unlikely case of "this = this"); (KJS::ResolveNode::emitCode): Now avoids emitting a mov when dst is the same as the local regiester, in the local var case (the unlikely case of "x = x"); (KJS::ArrayNode::emitCode): Fixed a codegen bug where array literal element expressions may have observed an intermediate value of constructing the array. (KJS::ObjectLiteralNode::emitCode): (KJS::PropertyListNode::emitCode): Fixed a codegen bug where object literal property definition expressions may have obesrved an intermediate value of constructing the object. (KJS::BracketAccessorNode::emitCode): (KJS::DotAccessorNode::emitCode): (KJS::NewExprNode::emitCode): (KJS::FunctionCallValueNode::emitCode): (KJS::FunctionCallBracketNode::emitCode): (KJS::FunctionCallDotNode::emitCode): (KJS::PostIncResolveNode::emitCode): (KJS::PostDecResolveNode::emitCode): (KJS::PostIncBracketNode::emitCode): (KJS::PostDecBracketNode::emitCode): (KJS::PostIncDotNode::emitCode): (KJS::PostDecDotNode::emitCode): (KJS::DeleteResolveNode::emitCode): (KJS::DeleteBracketNode::emitCode): (KJS::DeleteDotNode::emitCode): (KJS::DeleteValueNode::emitCode): (KJS::VoidNode::emitCode): (KJS::TypeOfResolveNode::emitCode): (KJS::TypeOfValueNode::emitCode): (KJS::PreIncResolveNode::emitCode): Fixed a codegen bug where the final value would not be output to the dst register in the local var case. (KJS::PreDecResolveNode::emitCode): Fixed a codegen bug where the final value would not be output to the dst register in the local var case. (KJS::PreIncBracketNode::emitCode): (KJS::PreDecBracketNode::emitCode): (KJS::PreIncDotNode::emitCode): (KJS::PreDecDotNode::emitCode): (KJS::UnaryPlusNode::emitCode): (KJS::NegateNode::emitCode): (KJS::BitwiseNotNode::emitCode): (KJS::LogicalNotNode::emitCode): (KJS::MultNode::emitCode): (KJS::DivNode::emitCode): (KJS::ModNode::emitCode): (KJS::AddNode::emitCode): (KJS::SubNode::emitCode): (KJS::LeftShiftNode::emitCode): (KJS::RightShiftNode::emitCode): (KJS::UnsignedRightShiftNode::emitCode): (KJS::LessNode::emitCode): (KJS::GreaterNode::emitCode): (KJS::LessEqNode::emitCode): (KJS::GreaterEqNode::emitCode): (KJS::InstanceOfNode::emitCode): (KJS::InNode::emitCode): (KJS::EqualNode::emitCode): (KJS::NotEqualNode::emitCode): (KJS::StrictEqualNode::emitCode): (KJS::NotStrictEqualNode::emitCode): (KJS::BitAndNode::emitCode): (KJS::BitXOrNode::emitCode): (KJS::BitOrNode::emitCode): (KJS::LogicalAndNode::emitCode): (KJS::LogicalOrNode::emitCode): (KJS::ConditionalNode::emitCode): (KJS::emitReadModifyAssignment): Allow an out argument separate from the operands, needed for fixes below. (KJS::ReadModifyResolveNode::emitCode): Fixed a codegen bug where the right side of the expression may observe an intermediate value. (KJS::AssignResolveNode::emitCode): Fixed a codegen bug where the right side of the expression may observe an intermediate value. (KJS::ReadModifyDotNode::emitCode): Fixed a codegen bug where the right side of the expression may observe an intermediate value. (KJS::ReadModifyBracketNode::emitCode): Fixed a codegen bug where the right side of the expression may observe an intermediate value. (KJS::CommaNode::emitCode): Avoid writing temporary value to dst register. (KJS::ReturnNode::emitCode): Void return should return undefined, not null. (KJS::FuncExprNode::emitCode):
10:57 PM Changeset in webkit [33208] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-15 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • fix huge performance regression (from trunk) in string-unpack-code

This restores string-unpack-code performance to parity with
trunk (2.27x speedup relative to previous SquirrelFish)

  • VM/Machine.cpp: (KJS::Machine::execute): Shrink register file after call to avoid growing repeatedly.
10:57 PM Changeset in webkit [33207] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-15 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Fixed dumpCallFrame to match our new convention of passing around a
ScopeChainNode* instead of a ScopeChain*.

  • JavaScriptCore.exp:
  • VM/Machine.cpp: (KJS::Machine::dumpCallFrame):
  • VM/Machine.h:
10:57 PM Changeset in webkit [33206] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

Bug 18436: Need to throw exception on read/modify/write or similar resolve for nonexistent property
<https://bugs.webkit.org/show_bug.cgi?id=18436>

Reviewed by Maciej.

Add op_resolve_base_and_property for read/modify/write operations,
this adds a "superinstruction" to resolve the base and value of a
property simultaneously. Just using resolveBase and resolve results
in an 5% regression in ubench, 30% in loop-empty-resolve (which is
expected). 1.3% progression in sunspider, 2.1% in ubench, with a
21% gain in loop-empty-resolve. The only outlier is function-missing-args
which gets a 3% regression that I could never resolve.

10:57 PM Changeset in webkit [33205] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-04-15 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

3d-raytrace and string-unpack-code now run.

The basic approach is to pass around ScopeChainNode* instead of
ScopeChain*, which in addition to not becoming suddenly an invalid
pointer also saves an indirection.

This is an 0.4% speedup on SunSpider --squirrelfish (1.8% on --ubench)

  • VM/Machine.cpp: (KJS::resolve): (KJS::resolveBase): (KJS::resolveBaseAndFunc): (KJS::initializeCallFrame): (KJS::scopeChainForCall): (KJS::Machine::unwindCallFrame): (KJS::Machine::throwException): (KJS::Machine::execute): (KJS::Machine::privateExecute):
  • VM/Machine.h:
  • VM/Register.h: (KJS::Register::):
  • kjs/nodes.cpp: (KJS::EvalNode::generateCode): (KJS::FunctionBodyNode::generateCode): (KJS::ProgramNode::generateCode): (KJS::ProgramNode::processDeclarations): (KJS::EvalNode::processDeclarations): (KJS::FuncDeclNode::makeFunction): (KJS::FuncExprNode::makeFunction):
  • kjs/nodes.h: (KJS::ProgramNode::): (KJS::EvalNode::): (KJS::FunctionBodyNode::):
  • kjs/object.h:
  • kjs/scope_chain.h: (KJS::ScopeChainNode::ScopeChainNode): (KJS::ScopeChainNode::deref): (KJS::ScopeChainIterator::ScopeChainIterator): (KJS::ScopeChainIterator::operator*): (KJS::ScopeChainIterator::operator->): (KJS::ScopeChain::ScopeChain): (KJS::ScopeChain::node): (KJS::ScopeChain::deref): (KJS::ScopeChain::ref): (KJS::ScopeChainNode::ref): (KJS::ScopeChainNode::release): (KJS::ScopeChainNode::begin): (KJS::ScopeChainNode::end):
10:57 PM Changeset in webkit [33204] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-14 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Fixed crash when accessing registers in a torn-off activation object.

  • kjs/JSActivation.cpp: (KJS::JSActivation::copyRegisters): Update our registerOffset after copying our registers, since our offset should now be relative to our private register array, not the shared register file.
10:57 PM Changeset in webkit [33203] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-14 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix a codegen flaw that makes some tests run way too fast or way too slow

The basic problem was that FunctionCallResolveNode results in
codegen which can incorrectly write an intermediate value into the
dst register even when that is a local. I added convenience
functions to CodeGenerator for getting this right, but for now I
only fixed FunctionCallResolve.

  • VM/CodeGenerator.h: (KJS::CodeGenerator::tempDestination): (KJS::CodeGenerator::):
  • kjs/nodes.cpp: (KJS::FunctionCallResolveNode::emitCode):
10:57 PM Changeset in webkit [33202] by mrowe@apple.com
  • 1 edit
    8 adds in branches/squirrelfish/SunSpider

2008-04-14 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Oliver.

  • move ubench tests properly.
  • tests/ubench: Added.
  • tests/ubench/function-closure.js: Added.
  • tests/ubench/function-empty.js: Added.
  • tests/ubench/function-missing-args.js: Added.
  • tests/ubench/function-sum.js: Added.
  • tests/ubench/loop-empty-resolve.js: Added.
  • tests/ubench/loop-empty.js: Added.
  • tests/ubench/loop-sum.js: Added.
10:57 PM Changeset in webkit [33201] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/WebKitTools

2008-04-14 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • added support for --ubench mode
  • Scripts/run-sunspider:
10:57 PM Changeset in webkit [33200] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/SunSpider

2008-04-14 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Oliver.

  • sunspider: Don't force --runs=1 in squirrelfish mode any more.
10:57 PM Changeset in webkit [33199] by mrowe@apple.com
  • 12 edits in branches/squirrelfish

JavaScriptCore:

2008-04-14 Gabor Loki <loki@inf.u-szeged.hu>

Reviewed and slightly tweaked by Geoffrey Garen.

Bug 18489: Squirrelfish doesn't build on linux
<https://bugs.webkit.org/show_bug.cgi?id=18489>

  • JavaScriptCore.pri: Add VM into include path and its files into source set
  • VM/JSPropertyNameIterator.cpp: Fix include name
  • VM/Machine.cpp: Add UNLIKELY macro for GCC
  • VM/Machine.h: Add missing includes
  • VM/RegisterFile.cpp: Add missing include
  • kjs/testkjs.pro: Add VM into include path

WebCore:

2008-04-14 Gabor Loki <loki@inf.u-szeged.hu>

Reviewed by Geoffrey Garen.

Bug 18489: Squirrelfish doesn't build on linux
<https://bugs.webkit.org/show_bug.cgi?id=18489>

10:57 PM Changeset in webkit [33198] by mrowe@apple.com
  • 3 edits
    1 add
    7 deletes in branches/squirrelfish/SunSpider

2008-04-14 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • make --squirrelfish mode use the real harness, but a reduced set of tests

Also add a new ubench mode which runs the older squirrelfish microbenchmarks.

  • sunspider:
  • tests/LIST-SQUIRRELFISH:
  • tests/LIST-UBENCH: Added.
  • tests/squirrelfish: Moved to tests/ubench
10:57 PM Changeset in webkit [33197] by mrowe@apple.com
  • 1 edit
    1 delete in branches/squirrelfish/SunSpider

2008-04-14 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Removed an unused test.

  • tests/squirrelfish/loop-resolve.js: Removed.
10:57 PM Changeset in webkit [33196] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-14 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Restored OwnPtr in some places where I had removed it previously. We
can have an OwnPtr to an undefined class in a header as long as the
class's destructor isn't in the header.

10:57 PM Changeset in webkit [33195] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-14 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Fixed access to "this" inside dynamic scopes.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::registerForLocal): Always return a register for "this", even if we're not optimizing access to other locals. Because "this" is a keyword, it's always in a register and always accessible.
  • VM/CodeGenerator.h: (KJS::CodeGenerator::shouldOptimizeLocals): Factored out a function for determining whether we should optimize access to locals, since eval will need to make this test a little more complicated.
10:57 PM Changeset in webkit [33194] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-14 Maciej Stachowiak <mjs@apple.com>

Reviewed by Adam.

  • fix crash when running SunSpider full harness

When growing the register file's buffer to make space for new globals,
make sure to copy accounting for the fact that the new space is logically
at the beginning of the buffer in this case, instead of at the end as when
growing for a new call frame.

  • VM/RegisterFile.cpp: (KJS::RegisterFile::newBuffer): (KJS::RegisterFile::growBuffer): (KJS::RegisterFile::addGlobalSlots):
  • VM/RegisterFile.h:
10:57 PM Changeset in webkit [33193] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

2008-04-11 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Mark constant pools for global and eval code (collectively known as
"program code"). (Constant pools for function code are already marked by
their functions.)

The global object is responsible for marking program code constant
pools. Code blocks add themselves to the mark set at creation time, and
remove themselves from the mark set at destruction time.

sunspider --squirrelfish reports a 1% speedup, perhaps because
generateCode() is now non-virtual.

  • kjs/nodes.cpp: I had to use manual init and delete in this file because putting an OwnPtr into the header would have created a circular header dependency.
10:56 PM Changeset in webkit [33192] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

Bug 18231: Improve support for function call nodes in SquirrelFish
<https://bugs.webkit.org/show_bug.cgi?id=18231>

Reviewed by Maciej

Use correct value of 'this' for function calls.

10:56 PM Changeset in webkit [33191] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Geoffrey Garen <ggaren@apple.com>

This time for sure.

  • kjs/interpreter.cpp: (KJS::Interpreter::evaluate):
10:56 PM Changeset in webkit [33190] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Fixed Interpreter::execute to honor the new model for returning non-NULL
values when an exception is thrown.

  • kjs/interpreter.cpp: (KJS::Interpreter::evaluate):
10:56 PM Changeset in webkit [33189] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

Fix SquirrelFish interpreter to pass internal exceptions back to
native code correctly.

Reviewed by Geoff

10:56 PM Changeset in webkit [33188] by mrowe@apple.com
  • 49 edits
    1 copy
    1 add in branches/squirrelfish

JavaScriptCore:

2008-04-10 Sam Weinig <sam@webkit.org>

Reviewed by Geoffrey Garen.

Replace the use of getCallData in op_construct with the new
getConstructData function that replaces implementsConstruct.

  • API/JSCallbackConstructor.cpp: (KJS::JSCallbackConstructor::getConstructData):
  • API/JSCallbackConstructor.h:
  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h: (KJS::::getConstructData): (KJS::::construct):
  • API/JSObjectRef.cpp: (JSObjectIsConstructor):
  • JavaScriptCore.exp:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/CallData.h:
  • kjs/ConstructData.h: Copied from JavaScriptCore/kjs/CallData.h. (KJS::):
  • kjs/array_object.cpp: (KJS::ArrayObjectImp::getConstructData):
  • kjs/array_object.h:
  • kjs/bool_object.cpp: (KJS::BooleanObjectImp::getConstructData):
  • kjs/bool_object.h:
  • kjs/date_object.cpp: (KJS::DateObjectImp::getConstructData):
  • kjs/date_object.h:
  • kjs/error_object.cpp: (KJS::ErrorObjectImp::getConstructData): (KJS::NativeErrorImp::getConstructData):
  • kjs/error_object.h:
  • kjs/function.cpp: (KJS::FunctionImp::getCallData): (KJS::FunctionImp::getConstructData): (KJS::FunctionImp::construct):
  • kjs/function.h:
  • kjs/function_object.cpp: (KJS::FunctionObjectImp::getConstructData):
  • kjs/function_object.h:
  • kjs/nodes.cpp: (KJS::NewExprNode::inlineEvaluate):
  • kjs/number_object.cpp: (KJS::NumberObjectImp::getConstructData):
  • kjs/number_object.h:
  • kjs/object.cpp:
  • kjs/object.h:
  • kjs/object_object.cpp: (KJS::ObjectObjectImp::getConstructData):
  • kjs/object_object.h:
  • kjs/regexp_object.cpp: (KJS::RegExpObjectImp::getConstructData):
  • kjs/regexp_object.h:
  • kjs/string_object.cpp: (KJS::StringObjectImp::getConstructData):
  • kjs/string_object.h:
  • kjs/value.cpp: (KJS::JSCell::getConstructData):
  • kjs/value.h: (KJS::JSValue::getConstructData):

WebCore:

2008-04-10 Sam Weinig <sam@webkit.org>

Reviewed by Geoffrey Garen.

Adjusted WebCore JS functions to the new "getConstructData" calling convention.

10:56 PM Changeset in webkit [33187] by mrowe@apple.com
  • 4 edits
    4 adds in branches/squirrelfish/JavaScriptCore

Bug 18420: SquirrelFish: need to throw Reference and Type errors
when attempting invalid operations on JSValues

Reviewed by Geoff

Add validation and exception checks to SquirrelFish so that the
correct exceptions are thrown for undefined variables, type errors
and toObject failure. Also handle exceptions thrown by native
function calls.

10:56 PM Changeset in webkit [33186] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Pass a function body node its function's scope chain, rather than the
current execution context's scope chain, when compiling it.

This doesn't matter yet, but it will once we start using the scope
chain during compilation.

sunspider --squirrelfish notes a tiny speedup.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
10:56 PM Changeset in webkit [33185] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Fix two bugs when throwing exceptions from re-entrant JS calls:

(1) Don't shrink the register file to 0, since our caller may still
be using it.

(2) In case of exception, return jsNull() instead of 0 because,
surprisingly, some JavaScriptCore clients rely on a function's return
value being safe to operate on even if the function threw an exception.

Also:

  • Changed FunctionImp::callAsFunction to honor the new semantics of exceptions not returning 0.
  • Renamed "handlerPC" to "handlerVPC" to match other uses of "VPC".
  • Renamed "exceptionData" to "exceptionValue", because "data" seemed to imply something more than just a JSValue.
  • Merged prepareException into throwException, since throwException was its only caller, and it seemed weird that throwException didn't take an exception as an argument.

sunspider --squirrelfish does not seem to complain on my machine, but it
complains a little (.6%) on Oliver's.

10:56 PM Changeset in webkit [33184] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Fixed op_construct for CallTypeNative to reacquire "r" before setting
its return value, since registerBase can theoretically change during the
execution of arbitrary code. (Not sure if any native constructors
actually make this possible.)

sunspider --squirrelfish does not seem to complain.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
10:56 PM Changeset in webkit [33183] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt and Sam Weinig.

Re-entrant execution of function code (global code -> built-in function
-> JS function):

Miraculously, sunspider --squirrelfish does not seem to complain.

A re-entrant function call is the same as a normal function call with
one exception: the re-entrant call leaves everything except for
CallerCodeBlock in the call frame header uninitialized, since the call
doesn't need to return to JS code. (It sets CallerCodeBlock to 0, to
indicate that the call shouldn't return to JS code.)

Also fixed a few issues along the way:

  • Fixed two bugs in the read-write List implementation that caused m_size and m_buffer to go stale.
  • Changed native call code to update "r" *before* setting the return value, since the call may in turn call JS code, which changes the value of "r".
  • Migrated initialization of "r" outside of Machine::privateExecute, because global code and function code initialize "r" differently.
  • Migrated a codegen warning from Machine::privateExecute to the wiki.
  • Removed unnecessary "r" parameter from slideRegisterWindowForCall
  • VM/Machine.cpp: (KJS::slideRegisterWindowForCall): (KJS::scopeChainForCall): (KJS::Machine::execute): (KJS::Machine::privateExecute):
  • VM/Machine.h:
  • kjs/function.cpp: (KJS::FunctionImp::callAsFunction):
  • kjs/list.cpp: (KJS::List::getSlice):
  • kjs/list.h: (KJS::List::clear):
10:56 PM Changeset in webkit [33182] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/SunSpider

2008-04-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

Add newly runnable tests to --squirrelfish mode.

  • tests/LIST-SQUIRRELFISH:
10:56 PM Changeset in webkit [33181] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix problem with code generation for return with no argument

3d-cube now runs

  • kjs/nodes.cpp: (KJS::ReturnNode::emitCode):
10:56 PM Changeset in webkit [33180] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • Implement support for JS constructors

access-binary-trees and access-nbody now run.

Inexplicably a 1% speedup.

  • VM/Machine.cpp: (KJS::initializeCallFrame): (KJS::Machine::privateExecute):
  • VM/Machine.h: (KJS::Machine::):
10:56 PM Changeset in webkit [33179] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • More code cleanup in preparation for JS constructors

Factor the remaining interesting parts of JS function calls into
slideRegisterWindowForCall and scopeChainForCall.

  • VM/Machine.cpp: (KJS::slideRegisterWindowForCall): (KJS::scopeChainForCall): (KJS::Machine::privateExecute):
10:56 PM Changeset in webkit [33178] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • Code cleanup in preparation for JS constructors
  • Renamed returnInfo to callFrame.
  • Made an enum which defines what goes where in the call frame.
  • Factored out initializeCallFrame function from op_call
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitCall): (KJS::CodeGenerator::emitConstruct):
  • VM/Machine.cpp: (KJS::Machine::dumpRegisters): (KJS::initializeCallFrame): (KJS::Machine::unwindCallFrame): (KJS::Machine::execute): (KJS::Machine::privateExecute):
  • VM/Machine.h: (KJS::Machine::):
10:56 PM Changeset in webkit [33177] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-10 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Fixed two bugs in register allocation for function calls:

(1) op_call used to allocate codeBlock->numVars too many registers for
each call frame, due to duplicated math. Fixing this revealed...

(2) By unconditionally calling resize(), op_call used to truncate the
register file when calling a function whose registers fit wholly within
the register file already allocated by its caller.

sunspider --squirrelfish reports no regression.

I also threw in a little extra formatting to dumpCallFrame, because it
helped me debug these issues.

  • VM/Machine.cpp: (KJS::Machine::dumpRegisters): (KJS::Machine::execute): (KJS::Machine::privateExecute):
  • VM/RegisterFile.h: (KJS::RegisterFile::shrink): (KJS::RegisterFile::grow):
  • VM/RegisterFileStack.cpp: (KJS::RegisterFileStack::popRegisterFile):
10:56 PM Changeset in webkit [33176] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-09 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Next step toward re-entrant execution of function code (global code ->
built-in function -> JS function):

Made op_ret return from Machine::privateExecute if its calling codeBlock
is NULL.

I'm checking this in by itself to demonstrate that a more clever
mechanism is not necessary for performance.

sunspider --squirrelfish reports no regression.

  • ChangeLog:
  • VM/Machine.cpp: (KJS::Machine::execute): (KJS::Machine::privateExecute):
10:56 PM Changeset in webkit [33175] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-04-09 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Next step toward re-entrant execution of function code (global code ->
built-in function -> JS function):

Made Machine::execute return a value.

Sketched out some code for Machine::execute for functions -- still
doesn't work yet, though.

sunspider --squirrelfish reports no regression.

  • VM/Machine.cpp: (KJS::Machine::execute): (KJS::Machine::privateExecute):
  • VM/Machine.h:
  • kjs/interpreter.cpp: (KJS::Interpreter::evaluate):
  • kjs/testkjs.cpp: (runWithScripts):
10:56 PM Changeset in webkit [33174] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-09 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

First step toward re-entrant execution of function code (global code ->
built-in function -> JS function):

Tiny bit of refactoring in the Machine class.

sunspider --squirrelfish reports no regression.

  • VM/Machine.cpp: (KJS::Machine::dumpRegisters): (KJS::Machine::unwindCallFrame): (KJS::Machine::execute): (KJS::Machine::privateExecute):
  • VM/Machine.h: (KJS::Machine::isGlobalCallFrame):
  • kjs/interpreter.cpp: (KJS::Interpreter::evaluate):
10:56 PM Changeset in webkit [33173] by mrowe@apple.com
  • 11 edits
    2 copies in branches/squirrelfish/JavaScriptCore

2008-04-08 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Support for re-entrant execution of global code (global code -> built-in
function -> global code).

Keep a stack of register files instead of just one. Globals propogate
between register files as the register files enter and exit the stack.

An activation still uses its own register file's base as its
registerBase, but the global object uses the register file *stack*'s
registerBase, which updates dynamically to match the register file at
the top of the stack.

sunspider --squirrelfish reports no regression.

10:56 PM Changeset in webkit [33172] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-08 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • initial preparatory work for JS constructors

1) Allocate registers for the returnInfo block and "this" value when generating code for
op_construct. These are not used yet, but the JS branch of op_construct will use them.

2) Adjust argc and argv appropriately for native constructor calls.

3) Assign return value in a more straightforward way in op_ret since this is actually
a bit faster (and makes up for the allocation of extra registers above).

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitConstruct):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
10:55 PM Changeset in webkit [33171] by mrowe@apple.com
  • 3 edits
    1 add in branches/squirrelfish/SunSpider

2008-04-06 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

A little more love for --squirrelfish mode:

Fixed a misplaced sort. Results properly sort now.

Added a test list just for squirrelfish, and updated it to include
all currently passing SunSpider tests.

Fixed the pruning regexp to match 3d-morph.js.

  • sunspider:
10:55 PM Changeset in webkit [33170] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

fix changelog, bokay?

10:55 PM Changeset in webkit [33169] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-07 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Fixed crasing SunSpider tests.

Let's just pretend this never happened, bokay?

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::CodeGenerator):
  • VM/CodeGenerator.h:
  • VM/RegisterFile.cpp: (KJS::RegisterFile::addGlobals):
10:55 PM Changeset in webkit [33168] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-04-07 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Restored dumping of generated code as a command-line switch:
run-testkjs -d will do it.

10:55 PM Changeset in webkit [33167] by mrowe@apple.com
  • 12 edits
    2 adds in branches/squirrelfish/JavaScriptCore

2008-04-07 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Next step toward supporting re-entrant evaluation: Moved register file
maintenance code into a proper "RegisterFile" class.

There's a subtle change to the register file's internal layout: for
global code / the global object, registerOffset is always 0 now. In
other words, all register counting starts at 0, not 0 + (number of
global variables). The helps simplify accounting when the number of
global variables changes.

10:55 PM Changeset in webkit [33166] by mrowe@apple.com
  • 13 edits in branches/squirrelfish/JavaScriptCore

Bug 18338: Support exceptions in SquirrelFish <http://bugs.webkit.org/show_bug.cgi?id=18338>

Reviewed by Geoff

Initial support for exceptions in SquirrelFish, only supports finalisers in the
simple cases (eg. exceptions and non-goto/return across finaliser boundaries).
This doesn't add the required exception checks to existing code, it merely adds
support for throw, catch, and the required stack unwinding.

10:55 PM Changeset in webkit [33165] by mrowe@apple.com
  • 12 edits in branches/squirrelfish/JavaScriptCore

2008-04-06 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

First step toward supporting re-entrant evaluation: Switch register
clients from using "registers", a pointer to a register vector, to
"registerBase", an indirect pointer to the logical first entry in the
register file. (The logical first entry is the first entry that is not
a global variable).

With a vector, offsets into the register file remain good when the
underlying buffer reallocates, but they go bad when the logical
first entry moves. (The logical first entry moves when new global
variables get added to the beginning of the register file.) With an
indirect pointer to the logical first entry, offsets will remain good
regardless.

1.4% speedup on sunspider --squirrelfish. I suspect this is due to
reduced allocation when creating closures, and reduced indirection
through the register vector.

  • wtf/Vector.h: Added an accessor for an indirect pointer to the vector's buffer, which we currently use (incorrectly) for registerBase. This is temporary scaffolding to allow us to change client code without changing behavior.
10:55 PM Changeset in webkit [33164] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-06 Sam Weinig <sam@webkit.org>

Reviewed by Oliver Hunt.

Implement codegen for ReadModifyDotNode.

  • kjs/nodes.cpp: (KJS::ReadModifyDotNode::emitCode):
  • kjs/nodes.h:
10:55 PM Changeset in webkit [33163] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-06 Sam Weinig <sam@webkit.org>

Reviewed by Oliver Hunt.

Fix codegen for PostIncDotNode and implement codegen for PostIncBracketNode,
PostDecBracketNode and PostDecDotNode.

  • kjs/nodes.cpp: (KJS::PostIncBracketNode::emitCode): (KJS::PostDecBracketNode::emitCode): (KJS::PostIncDotNode::emitCode): (KJS::PostDecDotNode::emitCode):
  • kjs/nodes.h:
10:55 PM Changeset in webkit [33162] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-04-06 Sam Weinig <sam@webkit.org>

Reviewed by Geoffrey Garen.

Implement codegen for PreDecResolveNode, PreIncBracketNode, PreDecBracketNode,
PreIncDotNode and PreDecDotNode. This required adding one new op code, op_pre_dec.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitPreDec):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::PreDecResolveNode::emitCode): (KJS::PreIncBracketNode::emitCode): (KJS::PreDecBracketNode::emitCode): (KJS::PreIncDotNode::emitCode): (KJS::PreDecDotNode::emitCode):
  • kjs/nodes.h:
10:55 PM Changeset in webkit [33161] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-04-06 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Improved register dumping, plus a liberal smattering of "const". Here's
what the new format looks like:

(gdb) call (void)dumpCallFrame(codeBlock, scopeChain, registers->begin(), r)
4 instructions; 48 bytes at 0x509210; 3 locals (2 parameters); 1 temporaries

[ 0] load lr1, undefined(@k0)
[ 3] load lr1, 2(@k1)
[ 6] add tr0, lr2, lr1
[ 10] ret tr0

Constants:

k0 = undefined
k1 = 2

Register frame:

----------------------------------------

use | address | value

----------------------------------------
[return info] | 0x80ac08 | 0x5081c0
[return info] | 0x80ac0c | 0x508e90
[return info] | 0x80ac10 | 0x504acc
[return info] | 0x80ac14 | 0x2
[return info] | 0x80ac18 | 0x0
[return info] | 0x80ac1c | 0x7
[return info] | 0x80ac20 | 0x0
----------------------------------------
[param] | 0x80ac24 | 0x1
[param] | 0x80ac28 | 0x7
[var] | 0x80ac2c | 0xb
[temp] | 0x80ac30 | 0xf

10:55 PM Changeset in webkit [33160] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-04-06 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Support for evaluating multiple scripts in the same global environment.
(Still don't support re-entrant evaluation yet.)

The main changes here are:

(1) Obey the ECMA 10.1.3 rules regarding how to resolve collisions when
a given symbol is declared more than once. (This patch fixes the same
issue for function code, too.)

(2) In the case of var and/or function collisions, reuse the existing
storage slot. For global code, this is required for previously
generated instructions to continue to work. For function code, it's
more of a "nice to have": it makes register layout in the case of
collisions easier to understand, and has the added benefit of saving
memory.

(3) Allocate slots in the CodeGenerator's m_locals vector in parallel
to register indexes in the symbol table. This ensures that, given an
index in the symbol table, we can find the corresponding RegisterID
without hashing, which speeds up codegen.

I moved responsibility for emitting var and function initialization
instructions into the CodeGenerator, because bookkeeping in cases where
var, function, and/or parameter names collide requires a lot of
internal knowledge about the CodeGenerator.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::addVar): Removed responsibility for checking whether a var declaration overwrites "arguments", because the check is inappropriate for global code, which may not have a pre-existing "arguments" symbol in scope. Also changed this function to return a boolean indicating whether addVar actually created a new RegisterID, or just reused an old one.

(KJS::CodeGenerator::CodeGenerator): Split out the constructors for
function code and global code, since they're quite different now.

(KJS::CodeGenerator::registerForLocal): This function does its job
without any hashing now.

  • VM/Machine.cpp: Move old globals and update "r" before executing a new script. That way, old globals stay at a constant offset from "r", and previously optimized code still works.
  • VM/RegisterID.h: Added the ability to allocate a RegisterID before initializing its index field. We use this for parameters now.
  • kjs/JSVariableObject.h: (KJS::JSVariableObject::symbolTableGet): Changed the ungettable getter ASSERT to account for the fact that symbol indexes are all negative.
10:55 PM Changeset in webkit [33159] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

Fix ChangeLog

10:55 PM Changeset in webkit [33158] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-04-05 Sam Weinig <sam@webkit.org>

Reviewed by Geoffrey Garen.

Implement codegen for ForInNode.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitIn):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::InNode::emitCode):
  • kjs/nodes.h:
10:55 PM Changeset in webkit [33157] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-04-05 Sam Weinig <sam@webkit.org>

Reviewed by Oliver Hunt.

  • Implement codegen for DeleteResolveNode, DeleteBracketNode, DeleteDotNode and DeleteValueNode.
  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitGetPropId): (KJS::CodeGenerator::emitPutPropId): (KJS::CodeGenerator::emitDeletePropId): (KJS::CodeGenerator::emitDeletePropVal): (KJS::CodeGenerator::emitPutPropIndex):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::DeleteResolveNode::emitCode): (KJS::DeleteBracketNode::emitCode): (KJS::DeleteDotNode::emitCode): (KJS::DeleteValueNode::emitCode):
  • kjs/nodes.h:
10:55 PM Changeset in webkit [33156] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

2008-04-04 Sam Weinig <sam@webkit.org>

Reviewed by Oliver Hunt.

  • Implement codegen for Switch statements.
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::pushJumpContext): (KJS::CodeGenerator::popJumpContext): (KJS::CodeGenerator::jumpContextForLabel):
  • VM/CodeGenerator.h: Rename LoopContext to JumpContext now that it used of Switch statements in addition to loops.
  • kjs/nodes.cpp: (KJS::DoWhileNode::emitCode): (KJS::WhileNode::emitCode): (KJS::ForNode::emitCode): (KJS::ForInNode::emitCode): (KJS::ContinueNode::emitCode): (KJS::BreakNode::emitCode): (KJS::CaseBlockNode::emitCodeForBlock): (KJS::SwitchNode::emitCode):
  • kjs/nodes.h: (KJS::CaseClauseNode::expr): (KJS::CaseClauseNode::children): (KJS::CaseBlockNode::):
10:55 PM Changeset in webkit [33155] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-03 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

  • fix crash in codegen from new nodes
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitConstruct):
  • kjs/nodes.h:
10:55 PM Changeset in webkit [33154] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/kjs/nodes.h

File I forgot in my last commit.

10:55 PM Changeset in webkit [33153] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-03 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • kjs/nodes.cpp: (KJS::ReadModifyResolveNode::emitCode): (KJS::ReadModifyBracketNode::emitCode):
  • kjs/nodes.h:
10:55 PM Changeset in webkit [33152] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-02 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • take a shot at marking constant pools for global and eval code

Geoff says this won't really work in all cases but is an ok stopgap.

  • kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::mark):
10:55 PM Changeset in webkit [33151] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-02 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • fix 2x perf regression in 3d-morph
  • VM/Machine.cpp: (KJS::Machine::privateExecute): If we subbed in null for the global object, don't toObject it, since that will throw an exception (very slowly).
10:55 PM Changeset in webkit [33150] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-02 Maciej Stachowiak <mjs@apple.com>

Rubber stamped by Geoff

  • fix Release build
  • kjs/nodes.cpp: (KJS::getNonLocalSymbol):
10:55 PM Changeset in webkit [33149] by mrowe@apple.com
  • 10 edits in branches/squirrelfish/JavaScriptCore

2008-04-02 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Removed the last vestiges of LocalStorage from JSVariableObject and
JSGlobalObject.

  • kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::saveLocalStorage): Save and restore from/to registers. Use stub isReadOnly and isDontEnum methods for now, until we really implement attributes in the symbol table. (KJS::JSGlobalObject::restoreLocalStorage): (KJS::JSGlobalObject::reset):
  • kjs/JSVariableObject.cpp: (KJS::JSVariableObject::getPropertyNames): Use stub isDontEnum method for now, as above. (KJS::JSVariableObject::getPropertyAttributes): ditto
  • kjs/JSVariableObject.h: Removed LocalStorage from JSVariableObjectData. Removed mark method, because subclasses implement different strategies for marking registers. (KJS::JSVariableObject::isReadOnly): Stub method (KJS::JSVariableObject::isDontEnum): ditto

Changed the code below to ASSERT_NOT_REACHED() and return 0, since it
can no longer retrieve LocalStorage from the ExecState. (Eventually,
we'll just remove this code and all its friends, but that's a task for
later.)

  • kjs/ExecState.cpp: (KJS::ExecState::ExecState):
  • kjs/function.cpp: (KJS::ActivationImp::markChildren):
  • kjs/function.h:
  • kjs/nodes.cpp: (KJS::getNonLocalSymbol): (KJS::ScopeNode::optimizeVariableAccess): (KJS::ProgramNode::processDeclarations):
10:54 PM Changeset in webkit [33148] by mrowe@apple.com
  • 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog

reverse order of last two ChangeLog entries (oops)

10:54 PM Changeset in webkit [33147] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • mark the constant pool (at least for function code blocks)
  • VM/CodeBlock.cpp: (KJS::CodeBlock::mark):
  • VM/CodeBlock.h:
  • kjs/function.cpp: (KJS::FunctionImp::mark):
  • kjs/nodes.cpp: (KJS::ScopeNode::mark):
  • kjs/nodes.h: (KJS::FuncExprNode::body): (KJS::FuncDeclNode::body):
10:54 PM Changeset in webkit [33146] by mrowe@apple.com
  • 6 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • mark the constant pool (at least for function code blocks)
  • VM/CodeBlock.cpp: (KJS::CodeBlock::mark):
  • VM/CodeBlock.h:
  • kjs/function.cpp: (KJS::FunctionImp::mark):
  • kjs/nodes.cpp: (KJS::ScopeNode::mark):
  • kjs/nodes.h: (KJS::FuncExprNode::body): (KJS::FuncDeclNode::body):
10:54 PM Changeset in webkit [33145] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Geoffrey Garen <ggaren@apple.com>

Reviewed by Beth Dakin.

Cleaned up a few loose ends.

  • JavaScriptCore.exp: Export dumpRegisters, so it's visible to gdb even if we don't explicitly call it in the source text.
  • VM/Machine.cpp: (KJS::Machine::privateExecute): No need to call dumpRegisters anymore, since that was just a hack for gdb's sake.
  • kjs/JSActivation.h: Removed obsolete comment.
  • VM/CodeGenerator.cpp: Added ASSERTs to verify that the localCount we're given matches the number of locals actually allocated.
  • VM/CodeGenerator.h: (KJS::CodeGenerator::CodeGenerator): Changed "localCount" to include the parameter count, since we're using the word "local" to mean parameter, var, function, or "this". Renamed "m_nextLocal" to "m_nextVar", since "m_nextLocal" doesn't contrast well with "m_nextParameter".

Also moved tracking of implicit "this" parameter from here...

  • kjs/nodes.cpp: (KJS::FunctionBodyNode::generateCode): ... to here (KJS::ProgramNode::generateCode): ... and here
  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump): Added missing "\n".
10:54 PM Changeset in webkit [33144] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Oliver.

Bug 18274: ResolveNode::emitCode() doesn't make a new temporary when dst

is 0, leading to incorrect codegen

<http://bugs.webkit.org/show_bug.cgi?id=18274>

10:54 PM Changeset in webkit [33143] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • fix bug in for..in codegen (gotta use ident, not m_ident)
  • kjs/nodes.cpp: (KJS::ForInNode::emitCode):
10:54 PM Changeset in webkit [33142] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • Add suport for regexp literals
  • VM/CodeBlock.cpp: (KJS::regexpToSourceString): (KJS::regexpName): (KJS::CodeBlock::dump):
  • VM/CodeBlock.h:
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::addRegExp): (KJS::CodeGenerator::emitNewRegExp):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::RegExpNode::emitCode):
  • kjs/nodes.h:
10:54 PM Changeset in webkit [33141] by mrowe@apple.com
  • 12 edits
    1 copy
    1 add in branches/squirrelfish/JavaScriptCore

Add support for for..in nodes

Reviewed by Geoff

Added two new opcodes to get_pnames and next_pname to handle iterating
over the set of properties on an object. This iterator is explicitly
invalidated and the property name array is released on standard exit
from the loop, otherwise we rely on GC to do the clean up for us.

10:54 PM Changeset in webkit [33140] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Change CodeGenerator::emitCall() so it increments the reference count of
registers passed to it, and change its callers so they don't needlessly
increment the reference count of the registers they are passing.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitCall):
  • kjs/nodes.cpp: (KJS::FunctionCallResolveNode::emitCode): (KJS::FunctionCallDotNode::emitCode):
10:54 PM Changeset in webkit [33139] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

  • generate call for PostIncDotNode
  • kjs/nodes.cpp: (KJS::PostIncDotNode::emitCode):
  • kjs/nodes.h:
10:54 PM Changeset in webkit [33138] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Build fix.

  • fix build (not sure how this ever worked?)
  • kjs/nodes.cpp: (KJS::FunctionCallBracketNode::emitCode):
10:54 PM Changeset in webkit [33137] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • generate code for FunctionCallBracketNode
  • kjs/nodes.cpp: (KJS::FunctionCallBracketNode::emitCode):
  • kjs/nodes.h:
10:54 PM Changeset in webkit [33136] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Geoff.

  • Fix two crashing SunSpider tests
  • VM/Machine.cpp: (KJS::Machine::privateExecute): set up 'this' properly for native calls.
  • kjs/list.h: (KJS::List::List): Fix intialization of buffer and size from vector, the initialization order was wrong.
10:54 PM Changeset in webkit [33135] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Geoffrey Garen <ggaren@apple.com>

Build fix: marked ASSERT-only variables as UNUSED_PARAMs.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/JSVariableObject.h: (KJS::JSVariableObject::symbolTableInitializeVariable):
10:54 PM Changeset in webkit [33134] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Next step toward global code: Moved get, put, and initializeVariable
functionality up into JSVariableObject, and changed JSActivation to
rely on it.

  • kjs/JSActivation.cpp: (KJS::JSActivation::JSActivation): (KJS::JSActivation::getOwnPropertySlot): (KJS::JSActivation::put): (KJS::JSActivation::initializeVariable):
  • kjs/JSVariableObject.h: (KJS::JSVariableObject::valueAt): (KJS::JSVariableObject::isReadOnly): (KJS::JSVariableObject::symbolTableGet): (KJS::JSVariableObject::symbolTablePut): (KJS::JSVariableObject::symbolTableInitializeVariable):
10:54 PM Changeset in webkit [33133] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

  • fix HashTable assertion on some SunSpider tests

Don't use -1 as the deleted value for JSValue*-keyed hashtables,
since it is a valid value (it's the immediate for -1).

  • VM/CodeGenerator.h: (KJS::CodeGenerator::JSValueHashTraits::emptyValue): (KJS::CodeGenerator::JSValueHashTraits::deletedValue):
  • kjs/JSImmediate.h: (KJS::JSImmediate::impossibleValue):
10:54 PM Changeset in webkit [33132] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Sam Weinig <sam@webkit.org>

Reviewed by Maciej Stachowiak.

Add support for calling Native constructors like new Array().

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitConstruct):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::NewExprNode::emitCode):
  • kjs/nodes.h:
10:54 PM Changeset in webkit [33131] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

  • add some missing toOpbject calls to avoid crashing when calling methods on primitives
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
10:54 PM Changeset in webkit [33130] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-04-01 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Changed Machine::dumpRegisters to take a pointer instead of a reference,
so gdb understands how to call it.

  • VM/Machine.cpp: (KJS::Machine::dumpRegisters): (KJS::Machine::privateExecute):
  • VM/Machine.h:
10:54 PM Changeset in webkit [33129] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Fix CodeGenerator::addConstant() so it uses the functionExpressions
counter for function expressions, not the functions counter.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::addConstant):
10:54 PM Changeset in webkit [33128] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Sam Weinig <sam@webkit.org>

Reviewed by Geoffrey Garen.

Add emitCode support for TypeOfResolveNode and TypeOfValueNode.
Added new opcode op_type_of to handle them.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitNot): (KJS::CodeGenerator::emitInstanceOf): (KJS::CodeGenerator::emitTypeOf):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::jsTypeStringForValue): (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::TypeOfResolveNode::emitCode): (KJS::TypeOfValueNode::emitCode):
  • kjs/nodes.h:
10:54 PM Changeset in webkit [33127] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Sam Weinig <sam@webkit.org>

Reviewed by Oliver Hunt.

Fix non-computed goto version of isOpcode. op_end is a valid opcode.

  • VM/Machine.cpp: (KJS::Machine::isOpcode):
10:53 PM Changeset in webkit [33126] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Added op_post_dec.

10:53 PM Changeset in webkit [33125] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Geoffrey Garen.

Add support for FunctionCallDotNode.

  • kjs/nodes.cpp: (KJS::FunctionCallDotNode::emitCode):
  • kjs/nodes.h:
10:53 PM Changeset in webkit [33124] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Geoffrey Garen <ggaren@apple.com>

Reviewed by Beth Dakin.

Next step toward global code: Removed more obsolete API, moved
saveLocalStorage and restoreLocalStorage to JSGlobalObject subclass,
since it's only intended for use there.

  • ChangeLog:
  • JavaScriptCore.exp:
  • kjs/Activation.h:
  • kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::saveLocalStorage): (KJS::JSGlobalObject::restoreLocalStorage):
  • kjs/JSGlobalObject.h:
  • kjs/JSVariableObject.cpp:
  • kjs/JSVariableObject.h: (KJS::JSVariableObject::JSVariableObjectData::JSVariableObjectData):
  • kjs/function.cpp: (KJS::ActivationImp::ActivationImp):
10:53 PM Changeset in webkit [33123] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Geoffrey Garen <ggaren@apple.com>

Reviewed by Beth Dakin.

Next step toward global code: subclass JSActivation + JSActivationData
from JSVariableObject + JSVariableObjectData.

JSActivation now relies on JSVariableObject for access to registers and
symbol table, and for some delete functionality, but not for anything
else yet.

(KJS::JSActivation::mark): Cleaned up the style here a little bit.

10:53 PM Changeset in webkit [33122] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Geoffrey Garen <ggaren@apple.com>

Reviewed by Beth Dakin.

Next step toward global code: store "rOffset" in JSVariableObjectData.

  • kjs/JSGlobalObject.h: (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
  • kjs/JSVariableObject.h: (KJS::JSVariableObject::JSVariableObjectData::JSVariableObjectData):
10:53 PM Changeset in webkit [33121] by mrowe@apple.com
  • 4 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Next steps toward global code:

  • Moved access to the register file into JSVariableObject.
  • Added more ASSERTs to indicate obsolete APIs there are just hanging around to stave off build failures.
  • kjs/JSGlobalObject.h: (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
  • kjs/JSVariableObject.h: (KJS::JSVariableObject::registers): (KJS::JSVariableObject::JSVariableObjectData::JSVariableObjectData): (KJS::JSVariableObject::JSVariableObject):
10:53 PM Changeset in webkit [33120] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Sam Weinig <sam@webkit.org>

Reviewed by Oliver. Tweaked somewhat by Maciej.

  • implement codegen for ReadModifyResolveNode
  • kjs/nodes.cpp: (KJS::emitReadModifyAssignment): (KJS::ReadModifyResolveNode::emitCode):
  • kjs/nodes.h:
10:53 PM Changeset in webkit [33119] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Geoff.

Fix the build -- r31492 removed activation tear-off, but r31493 used it.

  • kjs/nodes.cpp: (KJS::FuncExprNode::makeFunction):
10:53 PM Changeset in webkit [33118] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Add support for FuncExprNode to SquirrelFish.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeBlock.h:
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::addConstant): (KJS::CodeGenerator::emitNewFunctionExpression):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::FuncExprNode::emitCode): (KJS::FuncExprNode::makeFunction):
  • kjs/nodes.h:
10:53 PM Changeset in webkit [33117] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

First step toward global code: removed some obsolete JSGlobalObject
APIs, changing clients to ASSERT_NOT_REACHED.

Activation tear-off and scope chain pushing is obsolete because we
statically detect whether an activation + scope node is required.

The variableObject() and activationObject() accessors are obsolete
because they haven't been maintained, and they're mostly used by
node evaluation code, anyway.

The localStorage() accessor is obsolete because everything is in
registers now, and it's mostly used by node evaluation code, anyway.

10:53 PM Changeset in webkit [33116] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Maciej Stachowiak <mjs@apple.com>

Reviewed by Darin.

  • implement codegen for bracket accessor and bracket assign
  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitGetPropVal): (KJS::CodeGenerator::emitPutPropVal):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::BracketAccessorNode::emitCode): (KJS::AssignBracketNode::emitCode):
  • kjs/nodes.h:
10:53 PM Changeset in webkit [33115] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Geoffrey Garen <ggaren@apple.com>

Not reviewed.

Removed FIXME that I just fixed.

Added ASSERT to cover an error previously only covered by a FIXME.

  • kjs/JSActivation.cpp: (KJS::JSActivation::getOwnPropertySlot):
10:53 PM Changeset in webkit [33114] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Geoffrey Garen <ggaren@apple.com>

Not reviewed.

Fixed indentation inside op_call. (I had left this code badly indented
to make the behavior-changing diff clearer.)

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
10:53 PM Changeset in webkit [33113] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Fixed up logging of jump instructions to follow the following style:

jump offset(->absoluteTarget)

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
10:53 PM Changeset in webkit [33112] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Geoffrey Garen <ggaren@apple.com>

Reviewed by Sam Weinig.

Changed the SymbolTable API to use int instead of size_t. It has been
using int internally for a while now (since squirrelfish symbols can
have negative indices).

10:53 PM Changeset in webkit [33111] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Add support for FunctionCallValueNode.

  • kjs/nodes.cpp: (KJS::FunctionCallValueNode::emitCode):
  • kjs/nodes.h:
10:53 PM Changeset in webkit [33110] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-03-31 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

1) Implemented array literals

2) Renamed op_object_get and op_object_put to op_get_prop_id and
op_put_prop_id in preparation for new variants.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitNewArray): (KJS::CodeGenerator::emitGetPropId): (KJS::CodeGenerator::emitPutPropId): (KJS::CodeGenerator::emitPutPropIndex):
  • VM/CodeGenerator.h: (KJS::CodeGenerator::CodeGenerator): (KJS::CodeGenerator::propertyNames):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::ArrayNode::emitCode): (KJS::PropertyListNode::emitCode): (KJS::DotAccessorNode::emitCode): (KJS::PostIncResolveNode::emitCode): (KJS::PreIncResolveNode::emitCode): (KJS::AssignResolveNode::emitCode): (KJS::AssignDotNode::emitCode):
  • kjs/nodes.h:
10:53 PM Changeset in webkit [33109] by mrowe@apple.com
  • 27 edits
    6 adds in branches/squirrelfish

JavaScriptCore:

2008-03-30 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Implemented native function calls. (Re-entering from native code back
to JS doesn't work yet, though.)

0.2% speedup overall, due to some inlining tweaks. 3.6% regression on
function-empty.js, since we're making a new virtual call and taking a
new branch inside every op_call.

I adjusted the JavaScriptCore calling convention to minimize overhead,
like so:

The machine calls a single virtual function, "getCallData", to get all
the data it needs for a function call. Native code still uses the old
"isObject()" check followed by an "implementsCall()" check, which
aliases to "getCallData". (We can optimize native code to use getCallData
at our leisure.)

To supply a list of arguments, the machine calls a new List constructor
that just takes a pointer and a length, without copying. Native code
still appends to the list one argument at a time. (We can optimize
native code to use the new List constructor at our leisure.)

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Changed resize() call to grow() call, to encourage the compiler to inline the Vector code.
  • kjs/CallData.h: Added. (KJS::): CallData is a union because eventually native calls will stuff a function pointer into it, to eliminate the callAsFunction virtual call.
  • kjs/function.cpp: (KJS::FunctionImp::callAsFunction): Changed this to an ASSERT since it's not implemented yet.
  • kjs/list.h: Made the List class two-faced, to support the old way and the new way during this transition phase: lists can be made read-only with just a pointer and a legnth, or you can append to them one item at a time.
  • kjs/value.h: (KJS::jsUndefined): Marked this function ALWAYS_INLINE for the benefit of a certain compiler that doesn't know what's best for it.

JavaScriptGlue:

2008-03-30 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Build fix.

  • ForwardingHeaders/wtf/UnusedParam.h: Copied from ForwardingHeaders/wtf/OwnPtr.h.

WebCore:

2008-03-30 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Adjusted WebCore JS functions to the new "getCallData" calling convention.

WebKit/mac:

2008-03-30 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Build fix.

10:53 PM Changeset in webkit [33108] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-03-30 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

Dump code that codegen can't handle yet, so it's easier to prioritize missing nodes.

  • kjs/nodes.h: (KJS::Node::emitCode):
10:53 PM Changeset in webkit [33107] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-30 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

Improve dumping of bytecode and fix coding style accordingly.

Registers are printed as lr1 for locals, tr1 for temp registers. Identifiers print as
foobar(@id0) and constants print as "foo"(@k1) or 312.4(@k2) or the like. Constant and
identifier tables are dumped for reference.

  • VM/CodeBlock.cpp: (KJS::escapeQuotes): (KJS::valueToSourceString): (KJS::registerName): (KJS::constantName): (KJS::idName): (KJS::printUnaryOp): (KJS::printBinaryOp): (KJS::CodeBlock::dump):
  • VM/Machine.cpp: (KJS::resolve): (KJS::resolveBase): (KJS::Machine::privateExecute):
10:53 PM Changeset in webkit [33106] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-30 Maciej Stachowiak <mjs@apple.com>

Reviewed by Oliver.

Implement StringNode and VoidNode (both pretty trivial).

  • kjs/nodes.cpp: (KJS::StringNode::emitCode): (KJS::VoidNode::emitCode):
  • kjs/nodes.h:
10:52 PM Changeset in webkit [33105] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-30 Maciej Stachowiak <mjs@apple.com>

Reviewed by Sam.

Implement CommaNode.

  • kjs/nodes.cpp: (KJS::CommaNode::emitCode):
  • kjs/nodes.h:
10:52 PM Changeset in webkit [33104] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-03-30 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej.

Adds support for dot notation and object literals.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitNewObject):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::ObjectLiteralNode::emitCode): (KJS::PropertyListNode::emitCode): (KJS::DotAccessorNode::emitCode): (KJS::AssignDotNode::emitCode):
  • kjs/nodes.h:
10:52 PM Changeset in webkit [33103] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-03-29 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.

Mark the register file.

It's a conservative mark for now, but once registers are typed, we can
do an exact mark.

1.4% regression regardless of whether we actually do the marking.
GCC is is worth every penny.

  • VM/Machine.cpp: (KJS::Machine::privateExecute): Most of the changes here are just for the fact that "registers" is a pointer now.
  • kjs/JSGlobalObject.cpp: The global object owns the register file now.
10:52 PM Changeset in webkit [33102] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

Bug 18204: SquirrelFish: continue/break do not correctly handle scope popping
<http://bugs.webkit.org/show_bug.cgi?id=18204>

Reviewed by Maciej.

We now track the scope depth as part of a loop context, and add an
extra instruction op_jump_scopes that is used to perform a jump across
dynamic scope boundaries.

10:52 PM Changeset in webkit [33101] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-28 Sam Weinig <sam@webkit.org>

Reviewed by Geoffrey Garen.

Add emitCode support for ConditionalNode.

  • kjs/nodes.cpp: (KJS::ConditionalNode::emitCode):
  • kjs/nodes.h:
10:52 PM Changeset in webkit [33100] by mrowe@apple.com
  • 7 edits in branches/squirrelfish/JavaScriptCore

2008-03-28 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Responding to feedback, added some comments, fixed up a few names, and
clarified that "locals" always means all local variables, functions,
and parameters.

10:52 PM Changeset in webkit [33099] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

2008-03-28 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Added support for "this".

Supply an implicit "this" value as the first argument to every function.
Alias the "this" keyword to that argument.

1% regression overall, 2.5% regression on empty function calls. Seems
like a reasonable cost for now, since we're doing more work.
(Eventually, we might decide to create a version of op_call specialized
for a known null "this" value.)

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitCall):
  • VM/CodeGenerator.h: (KJS::CodeGenerator::CodeGenerator):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • kjs/CommonIdentifiers.cpp: (KJS::CommonIdentifiers::CommonIdentifiers):
  • kjs/CommonIdentifiers.h:
  • kjs/nodes.cpp: (KJS::ThisNode::emitCode): (KJS::FunctionCallResolveNode::emitCode):
  • kjs/nodes.h:
10:52 PM Changeset in webkit [33098] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

Bug 18192: Squirrelfish needs support for break and continue
<http://bugs.webkit.org/show_bug.cgi?id=18192>

Reviewed by Geoff

Added a loop context stack to the code generator to provide the
correct jump labels for continue and goto. Added logic to the
currently implemented loop constructs to manage entry and exit
from the loop contexts. Finally, implemented codegen for break
and continue (and a pass through for LabelNode)

10:52 PM Changeset in webkit [33097] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-03-27 Sam Weinig <sam@webkit.org>

Reviewed by Geoffrey Garen.

Add emitCode support for UnaryPlusNode, NegateNode, BitwiseNotNode and LogicalNotNode.

  • VM/CodeBlock.cpp: (KJS::printUnaryOp): (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitToJSNumber): (KJS::CodeGenerator::emitNegate): (KJS::CodeGenerator::emitBitNot): (KJS::CodeGenerator::emitNot):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::UnaryPlusNode::emitCode): (KJS::NegateNode::emitCode): (KJS::BitwiseNotNode::emitCode): (KJS::LogicalNotNode::emitCode):
  • kjs/nodes.h:
10:52 PM Changeset in webkit [33096] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-27 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Maciej Stachowiak.

Add support for LogicalAndNode and LogicalOrNode.

  • kjs/nodes.cpp: (KJS::LogicalAndNode::emitCode): (KJS::LogicalOrNode::emitCode):
  • kjs/nodes.h:
10:52 PM Changeset in webkit [33095] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-27 Sam Weinig <sam@webkit.org>

Clean up code and debug output.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
10:52 PM Changeset in webkit [33094] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-03-27 Geoffrey Garen <ggaren@apple.com>

Moved an ASSERT to a more logical place.

  • VM/Machine.cpp: (KJS::Machine::privateExecute):
10:52 PM Changeset in webkit [33093] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-03-27 Sam Weinig <sam@webkit.org>

Reviewed by Oliver Hunt.

Add emitCode support for InstanceOfNode.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitInstanceOf):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::InstanceOfNode::emitCode):
  • kjs/nodes.h:
10:52 PM Changeset in webkit [33092] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

Bug 18142: squirrelfish needs to support dynamic scoping/with
<http://bugs.webkit.org/show_bug.cgi?id=18142>

Reviewed by Maciej

Add support for dynamic scoping and add code to handle 'with'
statements.

10:52 PM Changeset in webkit [33091] by mrowe@apple.com
  • 8 edits in branches/squirrelfish/JavaScriptCore

2008-03-27 Sam Weinig <sam@webkit.org>

Reviewed by Geoffrey Garen.

Add emitCode support for NullNode, FalseNode, TrueNode, IfNode, IfElseNode, DoWhileNode and WhileNode

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump): Dump op_jfalse opcode.
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitJumpIfFalse): Identical to emitJumpIfTrue except it emits the op_jfalse opcode. (KJS::CodeGenerator::emitLoad): Add and emitLoad override for booleans.
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::Machine::privateExecute): Adds execution of op_jfalse. It is identical to op_jtrue, except the the condition is reversed.
  • VM/Opcode.h: Add op_jfalse.
  • kjs/nodes.cpp: (KJS::NullNode::emitCode): Added. (KJS::FalseNode::emitCode): Added. (KJS::TrueNode::emitCode): Added. (KJS::IfNode::emitCode): Added. (KJS::IfElseNode::emitCode): Added. (KJS::DoWhileNode::emitCode): Added. (KJS::WhileNode::emitCode): Added.
  • kjs/nodes.h:
10:52 PM Changeset in webkit [33090] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-03-26 Geoffrey Garen <ggaren@apple.com>

Nixed an unused List.

The calm before my stormy war against the List class.

  • kjs/function_object.cpp: (KJS::FunctionObjectImp::construct):
10:52 PM Changeset in webkit [33089] by mrowe@apple.com
  • 5 edits
    9 adds in branches/squirrelfish

SunSpider:

2008-03-26 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

--squirrelfish mode: pared down tests for squirrelfish to chew on.

  • sunspider:
  • tests/LIST:
  • tests/squirrelfish: Added.
  • tests/squirrelfish/function-closure.js: Added.
  • tests/squirrelfish/function-empty.js: Added.
  • tests/squirrelfish/function-missing-args.js: Added.
  • tests/squirrelfish/function-sum.js: Added.
  • tests/squirrelfish/loop-empty-resolve.js: Added.
  • tests/squirrelfish/loop-empty.js: Added.
  • tests/squirrelfish/loop-resolve.js: Added.
  • tests/squirrelfish/loop-sum.js: Added.

WebKitTools:

2008-03-26 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

--squirrelfish mode: pared down tests for squirrelfish to chew on.

  • Scripts/run-sunspider:
10:52 PM Changeset in webkit [33088] by mrowe@apple.com
  • 9 edits in branches/squirrelfish/JavaScriptCore

2008-03-26 Cameron Zwarich <cwzwarich@uwaterloo.ca>

Reviewed by Geoffrey Garen.

Adds support for EqualNode, NotEqualNode, StrictEqualNode, NotStrictEqualNode,
LessEqNode, GreaterNode, GreaterEqNode, MultNode, DivNode, ModNode, SubNode,
LeftShiftNode, RightShiftNode, UnsignedRightShiftNode, BitAndNode, BitXOrNode,
and BitOrNode.

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitEqual): (KJS::CodeGenerator::emitNotEqual): (KJS::CodeGenerator::emitStrictEqual): (KJS::CodeGenerator::emitNotStrictEqual): (KJS::CodeGenerator::emitLessEq): (KJS::CodeGenerator::emitMult): (KJS::CodeGenerator::emitDiv): (KJS::CodeGenerator::emitMod): (KJS::CodeGenerator::emitSub): (KJS::CodeGenerator::emitLeftShift): (KJS::CodeGenerator::emitRightShift): (KJS::CodeGenerator::emitUnsignedRightShift): (KJS::CodeGenerator::emitBitAnd): (KJS::CodeGenerator::emitBitXOr): (KJS::CodeGenerator::emitBitOr):
  • VM/CodeGenerator.h:
  • VM/Machine.cpp: (KJS::jsLessEq): (KJS::Machine::privateExecute):
  • VM/Opcode.h:
  • kjs/nodes.cpp: (KJS::MultNode::emitCode): (KJS::DivNode::emitCode): (KJS::ModNode::emitCode): (KJS::SubNode::emitCode): (KJS::LeftShiftNode::emitCode): (KJS::RightShiftNode::emitCode): (KJS::UnsignedRightShiftNode::emitCode): (KJS::GreaterNode::emitCode): (KJS::LessEqNode::emitCode): (KJS::GreaterEqNode::emitCode): (KJS::EqualNode::emitCode): (KJS::NotEqualNode::emitCode): (KJS::StrictEqualNode::emitCode): (KJS::NotStrictEqualNode::emitCode): (KJS::BitAndNode::emitCode): (KJS::BitXOrNode::emitCode): (KJS::BitOrNode::emitCode):
  • kjs/nodes.h:
10:52 PM Changeset in webkit [33087] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-26 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Only print debug dumps in debug builds.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::generate):
  • VM/Machine.cpp: (KJS::Machine::privateExecute):
10:52 PM Changeset in webkit [33086] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-03-26 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Moved a few files around in the XCode project.

10:52 PM Changeset in webkit [33085] by mrowe@apple.com
  • 11 edits
    2 adds in branches/squirrelfish/JavaScriptCore

2008-03-26 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Made closures work.

An activation object aliases to the register file until its associated
function returns, at which point it copies the registers for locals and
parameters into an independent storage buffer.

10:51 PM Changeset in webkit [33084] by mrowe@apple.com
  • 3 edits in branches/squirrelfish/JavaScriptCore

2008-03-24 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Fixed recent 25% regression on simple for loop test. GCC seems to be
very finicky about the code that gets inlined into
Machine::privateExecute.

Everything in this patch is simply the result of experiment.

The resolve and resolve_base opcodes do not seem to have gotten slower
from this change.

  • VM/Machine.cpp: (KJS::resolve): (KJS::resolveBase): (KJS::Machine::privateExecute):
  • kjs/nodes.h:
10:51 PM Changeset in webkit [33083] by mrowe@apple.com
  • 5 edits in branches/squirrelfish/JavaScriptCore

Bug 18059: squirrelfish needs to compile on platforms without computed goto
<http://bugs.webkit.org/show_bug.cgi?id=18059>

Reviewed by Geoff Garen

"Standard" macro style support for conditionalising the use of computed goto.

10:51 PM Changeset in webkit [33082] by mrowe@apple.com
  • 2 edits in branches/squirrelfish/JavaScriptCore

2008-03-24 Geoffrey Garen <ggaren@apple.com>

Moved my notes from nodes.h to the wiki.

  • kjs/nodes.h:
10:51 PM Changeset in webkit [33081] by mrowe@apple.com
  • 9 edits
    10 copies
    7 adds in branches/squirrelfish/JavaScriptCore

2008-03-24 Geoffrey Garen <ggaren@apple.com>

Reviewed by NOBODY.

SquirrelFish lives.

Initial check-in of the code I've been carrying around. Lots of stuff
doesn't work. Plus a bunch of empty files.

10:37 PM Changeset in webkit [33080] by mrowe@apple.com
  • 1 copy in branches/squirrelfish

Re-create squirrelfish branch.

10:36 PM Changeset in webkit [33079] by mrowe@apple.com
  • 1 move in branches/old/squirrelfish-2008-05-12

Move aside squirrelfish branch in prepration for rebasing it on trunk.

7:04 PM Changeset in webkit [33078] by mitz@apple.com
  • 2 edits in trunk/WebKit/win
  • build fix
  • Interfaces/WebKit.idl: Touched.
6:11 PM Changeset in webkit [33077] by Adam Roben
  • 2 edits in trunk/WebCore

Turn on warnings as errors in WebCore.vcproj

Rubberstamped by Anders Carlsson.

  • WebCore.vcproj/WebCore.vcproj: Also let VS reformat the file as it saw fit. The important part is the removal of the WarnAsError="false" lines.
6:10 PM Changeset in webkit [33076] by Adam Roben
  • 6 edits
    3 adds in trunk

Fix a MSVC warning in PluginViewWin

WebCore:

Fix a MSVC warning in PluginViewWin

Reviewed by Anders Carlsson.

Test: http/tests/plugins/post-url-file.html

  • plugins/win/PluginViewWin.cpp: (WebCore::PluginView::handlePostReadFile): Added a missing return statement.

WebKitTools:

Support for testing NPN_PostURL

Reviewed by Anders Carlsson.

  • DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp: (toCString): Added this helper function. (testPostURLFile): Added. Writes the passed-in content to the passed-in file and calls NPN_PostURL with the passed-in URL and target. (pluginInvoke): Added a case for testPostURLFile.
  • DumpRenderTree/win/LayoutTestControllerWin.cpp: (followShortcuts): Changed to allow paths that don't yet exist.

LayoutTests:

Test that NPN_PostURL works correctly

Reviewed by Anders Carlsson.

  • http/tests/plugins/post-url-file-expected.txt: Added.
  • http/tests/plugins/post-url-file.html: Added.
  • http/tests/plugins/resources/dump-post.pl: Added.
6:10 PM Changeset in webkit [33075] by Adam Roben
  • 2 edits in trunk/WebCore

Fix a MSVC warning in GetEOTHeader

Reviewed by Dan Bernstein.

  • platform/graphics/win/GetEOTHeader.cpp: (WebCore::getEOTHeader): MSVC complains that having a 0-sized array in a struct is a non-standard extension. I've replaced the 0-sized arrays with arrays of 1 element, and replaced sizeof(structType) with offsetof(structType, arrayMember).
6:09 PM Changeset in webkit [33074] by Adam Roben
  • 2 edits in trunk/WebCore

Fix a MSVC warning in TextCodecICU

Reviewed by John Sullivan and Dan Bernstein.

  • platform/text/TextCodecICU.cpp: (WebCore::ErrorCallbackSetter::~ErrorCallbackSetter): UCNV_SUB_STOP_ON_ILLEGAL is a string literal, so using == with it doesn't really do what we want. Use strcmp instead. It's OK to pass an unknown value to strcmp here since 1) UCNV_SUB_STOP_ON_ILLEGAL is only a single character long so we're not going to ready more than 2 bytes from oldContext, and 2) we're inside an ASSERT which will cause a crash anyway if it fails.
6:09 PM Changeset in webkit [33073] by Adam Roben
  • 2 edits in trunk/WebKitLibraries

Disable a MSVC warning

Reviewed by Darin Adler.

  • win/tools/vsprops/common.vsprops: Add warning 4503 to the list of disabled warnings. It's a warning about decorated names being longer than MSVC's limit of 4096 characters. This warning doesn't indicate a correctness problem, but these truncated decorated names will be harder to recognize during debugging or when they appear in linker errors.
6:08 PM Changeset in webkit [33072] by Adam Roben
  • 2 edits in trunk/WebCore

Fix a MSVC warning in CSSComputedStyleDeclaration

Reviewed by Geoff Garen.

  • css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForRepeatRule): Removed some unreachable code.
6:08 PM Changeset in webkit [33071] by Adam Roben
  • 2 edits in trunk/WebCore

Fix a MSVC warning in InlineTextBox

Reviewed by Dan Bernstein.

  • rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): Initialize some variables that MSVC isn't smart enough to figure out will always be initialized in the cases where they are used.
6:07 PM Changeset in webkit [33070] by Adam Roben
  • 2 edits in trunk/WebCore

Fix a MSVC warning in Position

Reviewed by Darin Adler.

  • dom/Position.cpp: (WebCore::Position::getInlineBoxAndOffset): Use parentheses to make the precedence of our expressions explicit.
6:07 PM Changeset in webkit [33069] by Adam Roben
  • 2 edits in trunk/WebCore

Fix a MSVC warning in String

Reviewed by Geoff Garen.

  • platform/text/String.cpp: (WebCore::toIntegralType): Disable a bogus warning about using unary - on an unsigned value. MSVC isn't smart enough to figure out that isNegative will always be false when value is unsigned.
6:06 PM Changeset in webkit [33068] by Adam Roben
  • 2 edits in trunk/WebCore

Fix a MSVC warning in XMLHttpRequest

Reviewed by Geoff Garen.

  • xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::XMLHttpRequest): Added static_cast<unsigned long>.
5:28 PM Changeset in webkit [33067] by andersca@apple.com
  • 3 edits
    3 adds in trunk

WebCore:

2008-05-12 Anders Carlsson <andersca@apple.com>

Reviewed by Adam.

Handle the case when a resource with the same URL as the manifest is listed in the manifest.

  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::addEntry):

LayoutTests:

2008-05-12 Anders Carlsson <andersca@apple.com>

Reviewed by Adam.

Add test with a manifest file that lists itself.


  • http/tests/appcache/manifest-containing-itself-expected.txt: Added.
  • http/tests/appcache/manifest-containing-itself.html: Added.
  • http/tests/appcache/resources/manifest-containing-itself.manifest: Added.
5:23 PM Changeset in webkit [33066] by oliver@apple.com
  • 5 edits
    3 adds in branches/squirrelfish

Bug 18934: SQUIRRELFISH: ASSERT @ nytimes.com due to RegisterFile being clobbered
<https://bugs.webkit.org/show_bug.cgi?id=18934>

Reviewed by Geoff

Unfortunately we cannot create new statically optimised globals if there are any
tainted RegisterFiles on the RegisterFileStack. To handle this we re-introduce
(in a slightly cleaner form) the inImplicitCall concept to the RegisterFileStack.

5:14 PM Changeset in webkit [33065] by weinig@apple.com
  • 7 edits in trunk/WebCore

2008-05-12 Sam Weinig <sam@webkit.org>

Reviewed by Dan Bernstein.

Add parsing of AccessControlHeader and AccessItemRule.

  • xml/AccessControlList.cpp: (WebCore::AccessControlList::parseAccessControlHeader): When multiple http headers are sent in the response, the engine will concatenate them with commas separating the rules. This simply reverses that process by splitting on the commas. (WebCore::AccessControlList::show):
  • xml/AccessControlList.h:
  • xml/AccessItem.cpp: (WebCore::AccessItem::AccessItem): (WebCore::AccessItem::show):
  • xml/AccessItem.h: (WebCore::AccessItem::isValid):
  • xml/AccessItemRule.cpp: (WebCore::skipLWS): (WebCore::AccessItemRule::parseAccessItemRule): Parse the rule according to the BNF provided by the Access Control spec. (WebCore::AccessItemRule::parsePatternList): (WebCore::AccessItemRule::invalidate): (WebCore::AccessItemRule::show):
  • xml/AccessItemRule.h:
4:34 PM Changeset in webkit [33064] by ggaren@apple.com
  • 5 edits
    2 adds in branches/squirrelfish

JavaScriptCore:

2008-05-12 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.


Introduced support for function.caller.


Improved support for walking interesting scopes for function introspection.


This fixes all remaining layout tests not blocked by rebasing to trunk.


SunSpider reports no change.

  • VM/Machine.cpp: (KJS::Machine::dumpRegisters): Fixed a spacing issue.

LayoutTests:

2008-05-12 Geoffrey Garen <ggaren@apple.com>

Reviewed by Maciej Stachowiak.


Layout test for function.arguments and function.caller in interesting
scopes.

  • fast/js/function-dot-arguments-and-caller-expected.txt: Added.
  • fast/js/function-dot-arguments-and-caller.html: Added.
4:06 PM Changeset in webkit [33063] by ddkilzer@apple.com
  • 2 edits in trunk/WebCore

Fix logic error in DocLoader::clearPreloads()

Reviewed by Antti.

  • loader/DocLoader.cpp: (WebCore::DocLoader::clearPreloads): Be sure to decrease the preload count for the cached resource before trying to remove it from the cache. A non-zero preload count can prevent the resource from being removed from the cache.
3:51 PM Changeset in webkit [33062] by mrowe@apple.com
  • 2 edits in trunk/WebKitTools

Minor cleanup of the DRT Xcode project.

Reviewed by Sam Weinig.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Use GCC_OPTIMIZATION_LEVEL rather than

OPTIMIZATION_CFLAGS. Don't include Info.plist in the "Copy Bundle Resources" build phase as it does
not need to be there.

3:48 PM Changeset in webkit [33061] by andersca@apple.com
  • 3 edits
    3 adds in trunk

WebCore:

2008-05-12 Anders Carlsson <andersca@apple.com>

Reviewed by Adam.

Handle empty manifest files without crashing.


  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::startLoadingEntry):

LayoutTests:

2008-05-12 Anders Carlsson <andersca@apple.com>

Reviewed by Adam.

  • http/tests/appcache/empty-manifest-expected.txt: Added.
  • http/tests/appcache/empty-manifest.html: Added.
  • http/tests/appcache/resources/empty.manifest: Added.
3:23 PM Changeset in webkit [33060] by alp@webkit.org
  • 2 edits in trunk/WebCore

2008-05-12 Alp Toker <alp@nuanti.com>

GTK+ build fix for breakage in r33056. Include limits.h for INT_MAX.

  • platform/graphics/FontCache.h:
3:22 PM Changeset in webkit [33059] by andersca@apple.com
  • 2 edits in trunk/LayoutTests

2008-05-12 Anders Carlsson <andersca@apple.com>

Update the expected result.


  • http/tests/appcache/simple-expected.txt:
3:11 PM Changeset in webkit [33058] by andersca@apple.com
  • 3 edits in trunk/WebCore

2008-05-12 Anders Carlsson <andersca@apple.com>

Reviewed by Adam.

Add user agent to requests when loading/updating the cache.


  • loader/FrameLoader.h:
  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::update): (WebCore::ApplicationCacheGroup::startLoadingEntry):
2:11 PM Changeset in webkit [33057] by andersca@apple.com
  • 11 edits
    7 adds in trunk

WebCore:

2008-05-12 Anders Carlsson <andersca@apple.com>

Reviewed by Adam.

Make it possible to perform synchronous loads from the application cache.


  • loader/DocumentLoader.cpp: (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache): Factor out code from scheduleApplicationCacheLoad in its own method.


(WebCore::DocumentLoader::scheduleApplicationCacheLoad):
Call shouldLoadResourceFromApplicationCache here instead.


  • loader/DocumentLoader.h:


  • loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously): Call shouldLoadResourceFromApplicationCache.

WebKitTools:

2008-05-12 Anders Carlsson <andersca@apple.com>

Reviewed by Adam.

Add support for testing application caches.


  • DumpRenderTree/mac/DumpRenderTree.mm: (dumpRenderTree): Empty the cache.


(resetWebViewToConsistentStateBeforeTesting):
Turn on support for the application cache.

LayoutTests:

2008-05-12 Anders Carlsson <andersca@apple.com>

Reviewed by Adam.

Add simple appcache test.

  • http/conf/mime.types:
  • http/tests/appcache: Added.
  • http/tests/appcache/resources: Added.
  • http/tests/appcache/resources/not-in-cache.txt: Added.
  • http/tests/appcache/resources/simple.manifest: Added.
  • http/tests/appcache/resources/simple.txt: Added.
  • http/tests/appcache/simple-expected.txt: Added.
  • http/tests/appcache/simple.html: Added.
  • platform/gtk/Skipped:
  • platform/qt/Skipped:
  • platform/win/Skipped:
2:02 PM Changeset in webkit [33056] by mitz@apple.com
  • 18 edits in trunk

WebCore:

Reviewed by Ada Chan and Sam Weinig.

Added a way for clients to let the cache know that they no longer need
font data, which lets the cache release it. Changed clients to track
most of the font data they get from the cache so that they can later
release it. Some instances of font data -- namely, those used for system
font fallback -- are still not tracked and will therefore remain in the
cache indefinitely.

  • WebCore.base.exp: Added exports for WebCoreStatistics in WebKit.
  • platform/graphics/Font.cpp: (WebCore::Font::Font): Changed to use FontFallbackList::create(). (WebCore::Font::update): Ditto.
  • platform/graphics/FontCache.cpp: (WebCore::FontCache::getCachedFontData): Added code to track the number of times a SimpleFontData instance has been requested from the cache, remove requested instances from the inactive list, and purge inactive font data if the inactive list has grown above its maximum allowed size. (WebCore::FontCache::releaseFontData): Added. Called by clients to let the cache know that they no longer need the font data. Adds the font data to the inactive list if the last client has released it. (WebCore::FontCache::purgeInactiveFontData): Added. Removes inactive font data from the cache (and the inactive list). (WebCore::FontCache::fontDataCount): Added to provide statistics. (WebCore::FontCache::inactiveFontDataCount): Ditto.
  • platform/graphics/FontCache.h:
  • platform/graphics/FontData.h: (WebCore::FontData::FontData): Added a member variable to store the highest glyph page tree level in which there is a node for this FontData. This is used to limit the depth of the search when pruning glyph page trees. (WebCore::FontData::setMaxGlyphPageTreeLevel): Added this accessor. (WebCore::FontData::maxGlyphPageTreeLevel): Ditto.
  • platform/graphics/FontFallbackList.cpp: (WebCore::FontFallbackList::FontFallbackList): Changed to start with a refcount of 1. (WebCore::FontFallbackList::invalidate): Added a call to releaseFontData(). (WebCore::FontFallbackList::releaseFontData): Added. Lets the font cache know that we no longer need the FontData in our font list. (WebCore::FontFallbackList::fontDataAt): Changed to record in the font list whether the font data is a custom font data or not. (WebCore::FontFallbackList::setPlatformFont): Ditto.
  • platform/graphics/FontFallbackList.h: (WebCore::FontFallbackList::create): Added and made the constructor private. (WebCore::FontFallbackList::~FontFallbackList): Added a call to releaseFontData().
  • platform/graphics/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::treeGlyphPageCount): Added to provide statistics. (WebCore::GlyphPageTreeNode::pageCount): Ditto.

(WebCore::GlyphPageTreeNode::pruneTreeFontData): Added.
(WebCore::GlyphPageTreeNode::getChild): Added code to update the font
data's maximum glyph page tree level.
(WebCore::GlyphPageTreeNode::pruneFontData): Added.

  • platform/graphics/GlyphPageTreeNode.h:
  • platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::~SimpleFontData): Added code to let the font cache know that we no longer need the small caps font data and to prune the glyph page trees.

WebKit/mac:

Reviewed by Ada Chan.

Added font cache statistics and a function to purge inactive font data.

  • Misc/WebCoreStatistics.h:
  • Misc/WebCoreStatistics.mm: (+[WebCoreStatistics cachedFontDataCount]): (+[WebCoreStatistics cachedFontDataInactiveCount]): (+[WebCoreStatistics purgeInactiveFontData]): (+[WebCoreStatistics glyphPageCount]):

WebKit/win:

Reviewed by Ada Chan.

Added font cache statistics and a function to purge inactive font data.

  • Interfaces/IWebCoreStatistics.idl:
  • WebCoreStatistics.cpp: (WebCoreStatistics::cachedFontDataCount): (WebCoreStatistics::cachedFontDataInactiveCount): (WebCoreStatistics::purgeInactiveFontData): (WebCoreStatistics::glyphPageCount):
  • WebCoreStatistics.h:
2:01 PM Changeset in webkit [33055] by mrowe@apple.com
  • 3 edits in trunk/WebKit/mac

Decorate some deprecated delegate methods with the availability macros.

The compiler doesn't appear to warn if a delegate implements these methods, but using the availability
macros is good for consistency and documentation.

Reviewed by Tim Hatcher.

  • WebView/WebFrameLoadDelegate.h:
  • WebView/WebUIDelegate.h:
2:01 PM Changeset in webkit [33054] by mrowe@apple.com
  • 3 edits in trunk/WebKit/mac

<rdar://problem/5835604> Deprecate HIWebView

Use of HIWebView is deprecated in favor of embedding a WebView in a HICocoaView.

Reviewed by Tim Hatcher.

  • Carbon/CarbonUtils.h: Include the availability macro header and decorate the functions appropriately.
  • Carbon/HIWebView.h: Ditto.
2:01 PM Changeset in webkit [33053] by mrowe@apple.com
  • 2 edits
    1 add in trunk/JavaScriptCore

<rdar://problem/4859666> WebKit needs availability macros in order to deprecate APIs

Create WebKit availability macros that key off the Mac OS X version being targeted to
determine the WebKit version being targeted. Applications can define
WEBKIT_VERSION_MIN_REQUIRED before including WebKit headers in order to target a specific
version of WebKit.

The availability header is being added to JavaScriptCore rather than WebKit as JavaScriptCore
is the lowest-level portion of the public WebKit API.

Reviewed by Tim Hatcher.

  • API/WebKitAvailability.h: Added.
  • JavaScriptCore.xcodeproj/project.pbxproj:
1:50 PM Changeset in webkit [33052] by kdecker@apple.com
  • 7 edits in trunk/WebKit/mac

Reviewed by Anders.

Fixed: <rdar://problem/5840884>_recursive_resumeNullEventsForAllNetscapePlugins and _pauseNullEvents not defined


Re-added these SPI methods because they are needed by some clients. They were accidentally removed
in changeset <http://trac.webkit.org/changeset/31028>


  • Plugins/WebBaseNetscapePluginView.h: Added stopTimers, restartTimers to the header.
  • WebView/WebFrame.mm: (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): Re-addd. (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): Ditto.
  • WebView/WebFrameInternal.h: Ditto.
  • WebView/WebHTMLView.mm: Ditto. (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]): Ditto. (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]): Ditto.
  • WebView/WebHTMLViewInternal.h: Ditto.
  • WebView/WebHTMLViewPrivate.h: Ditto.
1:13 PM Changeset in webkit [33051] by andersca@apple.com
  • 11 edits in trunk

WebCore:

2008-05-12 Anders Carlsson <andersca@apple.com>

Reviewed by Alexey.

Add ApplicationCacheStorage::empty() method which will empty
the application cache database.


  • WebCore.base.exp:
  • loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::clearStorageID):
  • loader/appcache/ApplicationCache.h:
  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::clearStorageID):
  • loader/appcache/ApplicationCacheGroup.h:
  • loader/appcache/ApplicationCacheResource.h: (WebCore::ApplicationCacheResource::clearStorageID):
  • loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::empty):
  • loader/appcache/ApplicationCacheStorage.h:

WebKit/mac:

2008-05-12 Anders Carlsson <andersca@apple.com>

Reviewed by Alexey.

Empty the application cache when changing the cache model.


  • WebView/WebView.mm: (+[WebView _setCacheModel:]):
11:34 AM Changeset in webkit [33050] by andersca@apple.com
  • 1 edit
    8 adds in trunk/WebKitExamplePlugins

2008-05-12 Anders Carlsson <andersca@apple.com>

Reviewed by Alexey.

Add input method test plug-in.


  • NetscapeInputMethodPlugin: Added.
  • NetscapeInputMethodPlugin/English.lproj: Added.
  • NetscapeInputMethodPlugin/English.lproj/InfoPlist.strings: Added.
  • NetscapeInputMethodPlugin/Info.plist: Added.
  • NetscapeInputMethodPlugin/NetscapeInputMethodPlugin.xcodeproj: Added.
  • NetscapeInputMethodPlugin/NetscapeInputMethodPlugin.xcodeproj/project.pbxproj: Added.
  • NetscapeInputMethodPlugin/main.m: Added. (NP_Initialize): (NP_GetEntryPoints): (NP_Shutdown): (NPP_New): (NPP_Destroy): (NPP_SetWindow): (NPP_NewStream): (NPP_DestroyStream): (NPP_WriteReady): (NPP_Write): (NPP_StreamAsFile): (NPP_Print): (handleDraw): (invalidatePlugin): (handleFocusChanged): (handleMouseMoved): (handleMouseDown): (NPP_HandleEvent): (NPP_URLNotify): (selectionRange): (NPP_InsertText): (NPP_DoCommandBySelector): (markedTextAttributes): (NPP_SetMarkedText): (NPP_UnmarkText): (NPP_HasMarkedText): (NPP_AttributedSubstringFromRange): (NPP_MarkedRange): (NPP_SelectedRange): (NPP_FirstRectForCharacterRange): (pluginTextInputFuncs): (NPP_GetValue): (NPP_SetValue):
  • NetscapeInputMethodPlugin/test.html: Added.
10:41 AM Changeset in webkit [33049] by andersca@apple.com
  • 8 edits
    1 copy in trunk/WebKit

WebKit:

2008-05-09 Anders Carlsson <andersca@apple.com>

Reviewed by Oliver.

<rdar://problem/5774495> Make Unicode text input possible in Netscape-style plug-ins


Add nptextinput.h as a public header.


  • WebKit.xcodeproj/project.pbxproj:

WebKit/mac:

2008-05-12 Anders Carlsson <andersca@apple.com>

Reviewed by Oliver.

<rdar://problem/5774495> Make Unicode text input possible in Netscape-style plug-ins


  • Plugins/WebBaseNetscapePluginView.h:
  • Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView start]): Get the plug-in text input vtable pointer.


(-[WebBaseNetscapePluginView stop]):
Set the plug-in text input vtable pointer to 0.


(-[WebBaseNetscapePluginView inputContext]):
Return 0 for Carbon plug-ins since we don't want Cocoa to handle text input for them.


(-[WebBaseNetscapePluginView hasMarkedText]):
(-[WebBaseNetscapePluginView insertText:]):
(-[WebBaseNetscapePluginView markedRange]):
(-[WebBaseNetscapePluginView selectedRange]):
(-[WebBaseNetscapePluginView setMarkedText:selectedRange:]):
(-[WebBaseNetscapePluginView unmarkText]):
(-[WebBaseNetscapePluginView validAttributesForMarkedText]):
(-[WebBaseNetscapePluginView attributedSubstringFromRange:]):
(-[WebBaseNetscapePluginView characterIndexForPoint:]):
(-[WebBaseNetscapePluginView doCommandBySelector:]):
(-[WebBaseNetscapePluginView firstRectForCharacterRange:]):
(-[WebBaseNetscapePluginView conversationIdentifier]):
Implement NSTextInput and call into the plug-in text input vtable.


(browserTextInputFuncs):
New method which returns the browser input vtable.


(-[WebBaseNetscapePluginView getVariable:value:]):
Support getting the browser input vtable pointer.


  • Plugins/WebNetscapePluginEventHandlerCocoa.h:
  • Plugins/WebNetscapePluginEventHandlerCocoa.mm: (WebNetscapePluginEventHandlerCocoa::keyDown): (WebNetscapePluginEventHandlerCocoa::sendKeyEvent): If the plug-in returns 0 when a NPCocoaEventKeyDown is passed to NPP_HandleEvent, it means that the event should be passed on to the input manager.


  • Plugins/npapi.mm: (NPN_MarkedTextAbandoned): (NPN_MarkedTextSelectionChanged): Add implementations of browser input method methods.


  • Plugins/nptextinput.h: Added. Add file with new text input API.
10:29 AM Changeset in webkit [33048] by andersca@apple.com
  • 2 edits in trunk/WebCore

2008-05-12 Anders Carlsson <andersca@apple.com>

Reviewed by John.

Don't throw an exception if the string passed in is an invalid URL.


  • loader/appcache/DOMApplicationCache.cpp: (WebCore::DOMApplicationCache::remove):
10:11 AM Changeset in webkit [33047] by andersca@apple.com
  • 2 edits in trunk/WebCore

2008-05-12 Anders Carlsson <andersca@apple.com>

Reviewed by Mitz.

Add the variable enums for getting the input vtables.


  • bridge/npapi.h:
9:35 AM Changeset in webkit [33046] by Adam Roben
  • 2 edits in trunk/WebKit/win

Build fix

  • WebKitPrefix.cpp: Touch this so that it will rebuild after ENABLE_CROSS_DOCUMENT_MESSAGING was removed.
9:31 AM Changeset in webkit [33045] by Adam Roben
  • 2 edits in trunk/WebCore

Windows build fix

  • WebCorePrefix.cpp: Touched this so that it will rebuild now that ENABLE_CROSS_DOCUMENT_MESSAGING has been removed.
2:53 AM Changeset in webkit [33044] by mjs@apple.com
  • 2 edits in trunk/WebKitSite

2008-05-12 Maciej Stachowiak <mjs@apple.com>

Ooops, I made some mistakes trying to fix the validation errors. This time for sure.

  • demos/transitions-and-transforms/index.html:
2:45 AM Changeset in webkit [33043] by mjs@apple.com
  • 2 edits in trunk/WebKitSite

2008-05-12 Maciej Stachowiak <mjs@apple.com>

Make the demo valid HTML5 (according to validator.nu) and add alt text to the images.

  • demos/transitions-and-transforms/index.html:
2:10 AM Changeset in webkit [33042] by mjs@apple.com
  • 2 edits in trunk/WebKitSite

2008-05-12 Maciej Stachowiak <mjs@apple.com>

Tweaked demo visuals slightly.

  • demos/transitions-and-transforms/leopard.css:
12:43 AM Changeset in webkit [33041] by mjs@apple.com
  • 2 edits in trunk/WebKitSite

2008-05-12 Maciej Stachowiak <mjs@apple.com>

Tweak CSS to look a little better while loading.

  • demos/transitions-and-transforms/leopard.css:
12:39 AM Changeset in webkit [33040] by mjs@apple.com
  • 1 edit
    11 adds in trunk/WebKitSite

2008-05-12 Maciej Stachowiak <mjs@apple.com>

Not reviewed - new demo.


Added a demo of CSS Transforms and Transitions.

  • demos/transitions-and-transforms: Added.
  • demos/transitions-and-transforms/Finder Coverflow.png: Added.
  • demos/transitions-and-transforms/Horsehead.png: Added.
  • demos/transitions-and-transforms/Mail Stationery.png: Added.
  • demos/transitions-and-transforms/Quick Look.png: Added.
  • demos/transitions-and-transforms/Spaces.png: Added.
  • demos/transitions-and-transforms/Stacks.png: Added.
  • demos/transitions-and-transforms/Time Machine.png: Added.
  • demos/transitions-and-transforms/index.html: Added.
  • demos/transitions-and-transforms/leopard.css: Added.
  • demos/transitions-and-transforms/no-style.html: Added.
12:36 AM Changeset in webkit [33039] by ap@webkit.org
  • 2 edits in trunk/JavaScriptCore

Reviewed by Maciej.

https://bugs.webkit.org/show_bug.cgi?id=18828
Reproducible crash with PAC file

Naively moving JavaScriptCore into thread-specific data was inappropriate in the face of
exiting JavaScriptCore API clients, which expect a different therading model. Temporarily
disabling ThreadSpecific implementation until this can be sorted out.

  • wtf/ThreadSpecific.h:
12:12 AM Changeset in webkit [33038] by ap@webkit.org
  • 133 edits in trunk

Roll out recent threading changes (r32807, r32810, r32819, r32822) to simplify
SquirrelFish merging.

Note: See TracTimeline for information about the timeline view.