Timeline
May 21, 2008:
- 11:21 PM Changeset in webkit [34013] by
-
- 7 edits in trunk/JavaScriptCore
2008-05-21 Kevin McCullough <kmccullough@apple.com>
Reviewed by Maciej and Geoff.
<rdar://problem/5951561> Turn on JavaScript Profiler
-As part of the effort to turn on the profiler it would be helpful if it
did not need ExecStates to represent the stack location of the currently
executing statement.
-We now create each node as necessary with a reference to the current
node and each node knows its parent so that the tree can be made without
the entire stack.
- profiler/Profile.cpp: (KJS::Profile::Profile): The current node starts at the head. (KJS::Profile::stopProfiling): The current node is cleared when profiling stops. (KJS::Profile::willExecute): The current node either adds a new child or starts and returns a reference to an already existing child if the call ID that is requested already exists. (KJS::Profile::didExecute): The current node finishes and returns its parent.
- profiler/Profile.h: Use a single callIdentifier instead of a vector since we no longer use the whole stack.
- profiler/ProfileNode.cpp: Now profile nodes keep a reference to their parent. (KJS::ProfileNode::ProfileNode): Initialize the parent. (KJS::ProfileNode::didExecute): Record the time and return the parent. (KJS::ProfileNode::addOrStartChild): If the given callIdentifier is already a child, start it and return it, otherwise create a new one and return that. (KJS::ProfileNode::stopProfiling): Same logic, just use the new function.
- profiler/ProfileNode.h: Utilize the parent. (KJS::ProfileNode::create): (KJS::ProfileNode::parent):
- profiler/Profiler.cpp: (KJS::Profiler::startProfiling): Here is the only place where the ExecState is used to figure out where in the stack the profiler is currently profiling. (KJS::dispatchFunctionToProfiles): Only send one CallIdentifier instead of a vector of them. (KJS::Profiler::willExecute): Ditto. (KJS::Profiler::didExecute): Ditto. (KJS::createCallIdentifier): Create only one CallIdentifier. (KJS::createCallIdentifierFromFunctionImp): Ditto.
- profiler/Profiler.h:
- 10:59 PM Changeset in webkit [34012] by
-
- 3 edits in trunk/WebCore
Fix Bug 19178: Inspector should support sorting resources by latency
I replaced "Sort by Time" with the following sorting options:
- Sort by Start Time
- Sort by Response Time
- Sort by End Time
- Sort by Duration
- Sort by Latency
You can no longer sort by Size when looking at the Time graph, and you
can't use any of the time-based sorting functions when looking at the
Size graph.
Reviewed by Tim Hatcher.
- page/inspector/Resource.js: (WebInspector.Resource.prototype.get duration): Added. (WebInspector.Resource.prototype.get latency): Added. (WebInspector.Resource.CompareByStartTime): Added. (WebInspector.Resource.CompareByResponseReceivedTime): Added. (WebInspector.Resource.CompareByEndTime): Added. (WebInspector.Resource.CompareByDuration): Added. (WebInspector.Resource.CompareByLatency): Added.
- page/inspector/ResourcesPanel.js:
(WebInspector.ResourcesPanel):
- Each graph sidebar item now holds a list of sorting options
- Graph sidebar items no longer have a calculator property. This is stored on the sorting options instead, to allow each kind of sorting to have a different calculator.
- The sortingSelectElement starts out empty, and is populated in _graphSelected
- The sortingFunction starts out uninitialized and is set as a side-effect of _graphSelected.
(WebInspector.ResourcesPanel.prototype.set calculator): Don't do
anything if the calculator hasn't changed.
(WebInspector.ResourcesPanel.prototype.closeVisibleResource): Use the
_lastSelectedGraphTreeElement property instead of getting the graph
element from the calculator.
(WebInspector.ResourcesPanel.prototype._graphSelected):
- Store the tree element in the _lastSelectedGraphTreeElement property
- Popuplate sortingSelectElement with the sortingOptions and select the option that was last selected
(WebInspector.ResourcesPanel.prototype._changeSortingFunction): Set
our calculator from the sorting option.
(WebInspector.ResourceTimeCalculator): Renamed from
ResourceTransferTimeCalculator. Now takes a parameter to specify
whether the bars should all start at zero.
(WebInspector.ResourceTimeCalculator.prototype.computeBarGraphPercentages):
Take this.startAtZero into account.
(WebInspector.ResourceTimeCalculator.prototype.updateBoundries):
Abstracted the lower/upper bounds of a resource into methods.
(WebInspector.ResourceTimeCalculator.prototype._lowerBound): Added.
(WebInspector.ResourceTimeCalculator.prototype._upperBound): Added.
(WebInspector.ResourceTransferTimeCalculator): Added. This is now a
subclass of ResourceTimeCalculator
(WebInspector.ResourceTransferDurationCalculator): Added.
(WebInspector.ResourceSidebarTreeElement.CompareByAscendingStartTime): Added.
(WebInspector.ResourceSidebarTreeElement.CompareByAscendingResponseReceivedTime): Added.
(WebInspector.ResourceSidebarTreeElement.CompareByAscendingEndTime): Added.
(WebInspector.ResourceSidebarTreeElement.CompareByDescendingDuration): Added.
(WebInspector.ResourceSidebarTreeElement.CompareByDescendingLatency): Added.
(WebInspector.ResourceSidebarTreeElement.CompareByDescendingSize):
Changed to call CompareBySize.
- 10:59 PM Changeset in webkit [34011] by
-
- 2 edits1 add in trunk/WebCore
Fix Bug 19173: Tool tips for Inspector debugger status bar buttons are wrong/missing
Reviewed by Tim Hatcher.
- manual-tests/inspector/debugger-status-bar-buttons-state.html: Added.
- page/inspector/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._toggleDebugging): Call _clearInterface (which updates the buttons' tool tips) after attaching/detaching the debugger so that the buttons will reflect the new state. (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton): Set the title of the pauseOnExceptionsButton, not the debuggingButton.
- 10:58 PM Changeset in webkit [34010] by
-
- 8 edits in trunk
Fix Bug 19153: Inspector should support console.debug
WebCore:
Fix Bug 19153: Inspector should support console.debug
<https://bugs.webkit.org/show_bug.cgi?id=19153>
<rdar://problem/5950856>
Reviewed by Tim Hatcher.
Test: manual-tests/inspector/console-log-formatting.html
- bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::debug): Added.
- manual-tests/inspector/console-log-formatting.html: Changed to test console.debug as well.
- page/Console.cpp: (WebCore::Console::debug): Added. Just calls through to log().
- page/Console.h:
- page/Console.idl: Added debug() declaration.
LayoutTests:
Update window-properties results for new console functions
Reviewed by Tim Hatcher.
- fast/dom/Window/window-properties-expected.txt:
- 10:19 PM Changeset in webkit [34009] by
-
- 2 edits in trunk/JavaScriptCore
2008-05-21 Darin Adler <Darin Adler>
Reviewed by Maciej.
- https://bugs.webkit.org/show_bug.cgi?id=19180 speed up the < operator for the case when both values are integers
Makes standalone SunSpider 1.022x faster.
- VM/Machine.cpp: (KJS::jsLess): Add a special case for when both are numbers that fit in a JSImmediate.
- 10:18 PM Changeset in webkit [34008] by
-
- 3 adds in trunk/LayoutTests/fast/frames
Check in files I forgot to last time.
- 10:02 PM Changeset in webkit [34007] by
-
- 6 edits in trunk
2008-05-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Oliver and Sam.
- fixed <rdar://problem/5815631> REGRESSION (r31239): Multiscope optimisation of function calls results in incorrect this value (breaks tvtv.de)
Track global this value in the scope chain so we can retrieve it
efficiently but it follows lexical scope properly.
- kjs/ExecState.h: (KJS::ExecState::globalThisValue):
- kjs/JSGlobalObject.h: (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
- kjs/function_object.cpp: (KJS::FunctionObjectImp::construct):
- kjs/scope_chain.h: (KJS::ScopeChainNode::ScopeChainNode): (KJS::ScopeChainNode::globalThisObject): (KJS::ScopeChainNode::push): (KJS::ScopeChain::ScopeChain):
LayoutTests:
2008-05-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Oliver and Sam.
- tests for <rdar://problem/5815631> REGRESSION (r31239): Multiscope optimisation of function calls results in incorrect this value (breaks tvtv.de)
- fast/frames/cross-site-this-expected.txt: Added.
- fast/frames/cross-site-this.html: Added.
- fast/frames/resources/cross-site-this-helper.html: Added.
- 9:57 PM Changeset in webkit [34006] by
-
- 10 edits in trunk
WebKit/win:
2008-05-21 Adele Peterson <adele@apple.com>
Reviewed by Adam.
WebKit part of for <rdar://problem/5787733> fast/dom/HTMLDocument/hasFocus.html fails on Windows
- WebCoreSupport/WebChromeClient.cpp: (WebChromeClient::focus): Call updateActiveState directly. Normally this would happen on a timer, but JS might need to know this earlier, so we'll update here. (WebChromeClient::unfocus): ditto.
- WebView.cpp: (WebView::updateActiveStateSoon): Added comment about why we use a timer for this.
WebKitTools:
2008-05-21 Adele Peterson <adele@apple.com>
Reviewed by Adam.
DumpRenderTree support for <rdar://problem/5787733> fast/dom/HTMLDocument/hasFocus.html fails on Windows
- DumpRenderTree/win/UIDelegate.cpp: (UIDelegate::webViewFocus): Added. (UIDelegate::webViewUnfocus): Added.
- DumpRenderTree/win/UIDelegate.h:
LayoutTests:
2008-05-21 Adele Peterson <adele@apple.com>
Reviewed by Adam.
Enhanced and enabled test for <rdar://problem/5787733> fast/dom/HTMLDocument/hasFocus.html fails on Windows
- fast/dom/HTMLDocument/hasFocus-expected.txt:
- fast/dom/HTMLDocument/hasFocus.html:
- platform/win/Skipped:
- 9:56 PM Changeset in webkit [34005] by
-
- 2 edits in trunk/WebCore
2008-05-21 Kevin McCullough <kmccullough@apple.com>
Reviewed by Adam.
<rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a
profile node.
- Expose the Profile's 'focus' ability to WebCore and the WebInspector.
- page/JavaScriptProfile.cpp: (WebCore::focus): (WebCore::profileClass):
- 9:52 PM Changeset in webkit [34004] by
-
- 2 edits in trunk/JavaScriptCore
2008-05-21 Kevin McCullough <kmccullough@apple.com>
Sadness :(
- kjs/config.h:
- 9:51 PM Changeset in webkit [34003] by
-
- 7 edits in trunk/JavaScriptCore
2008-05-21 Kevin McCullough <kmccullough@apple.com>
Reviewed by Maciej.
<rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a
profile node.
- This patch updatest the times of the visible nodes correctly, but to do so, some of the design of the ProfileNode changed.
- JavaScriptCore.exp: export focus' symbol.
- profiler/Profile.cpp: ProfileNodes now take a reference to the head of the profile tree to get up-to-date accurate total profile time. (KJS::Profile::Profile): Pass 0 for the head node. (KJS::Profile::stopProfiling): stopProfiling no longer needs the time passed into it, since it can get it from the head and it does not need to be told it is the head because it can figure it out on it's own. (KJS::Profile::willExecute): Set the head node for each created node.
- profiler/Profile.h: (KJS::Profile::focus): Instead of taking a CallIdentifier that the caller would have to create, now focus() takes a ProfileNode that they should already have a reference to and focus() can extract the CallIdentifier from it.
- profiler/ProfileNode.cpp: Create actual and visible versions fo the total and self times for focus and exclude. Also add a head node reference so that nodes can get information from their head. (KJS::ProfileNode::ProfileNode): (KJS::ProfileNode::stopProfiling): Rename the total and self time variables and set the visual ones to the actual ones, so that without any changes to the visual versions of these variables, their times will match the actual times. (KJS::ProfileNode::focus): Now focus() has a bool to force it's children to be visible if this node is visible. If this node does not match the CallIdentifier being focused then the visibleTotalTime is only updated if one or more of it's children is the CallIdentifier being focused. (KJS::ProfileNode::restoreAll): Restores all variables with respect to the visible data in the ProfileNode. (KJS::ProfileNode::endAndRecordCall): Name change. (KJS::ProfileNode::debugPrintData): Dump the new variables. (KJS::ProfileNode::debugPrintDataSampleStyle): Name change.
- profiler/ProfileNode.h: Use the new variables and reference to the head node. (KJS::ProfileNode::create): (KJS::ProfileNode::totalTime): (KJS::ProfileNode::setTotalTime): (KJS::ProfileNode::selfTime): (KJS::ProfileNode::setSelfTime): (KJS::ProfileNode::totalPercent): (KJS::ProfileNode::selfPercent): (KJS::ProfileNode::setVisible):
- 9:50 PM Changeset in webkit [34002] by
-
- 1 edit3 moves in trunk/LayoutTests
2008-05-21 Sam Weinig <sam@webkit.org>
Review by Mark Rowe.
Change test so that its result are not different all the time.
- http/tests/xmlhttprequest/access-control-basic-allow-access-control-origin-header-expected.txt: Copied from http/tests/xmlhttprequest/access-control-basic-allow-headers-expected.txt.
- http/tests/xmlhttprequest/access-control-basic-allow-access-control-origin-header.html: Copied from http/tests/xmlhttprequest/access-control-basic-allow-headers.html.
- http/tests/xmlhttprequest/access-control-basic-allow-headers-expected.txt: Removed.
- http/tests/xmlhttprequest/access-control-basic-allow-headers.html: Removed.
- http/tests/xmlhttprequest/resources/access-control-basic-allow-access-control-origin-header.cgi: Copied from http/tests/xmlhttprequest/resources/access-control-basic-allow-headers.cgi.
- http/tests/xmlhttprequest/resources/access-control-basic-allow-headers.cgi: Removed.
- 9:33 PM Changeset in webkit [34001] by
-
- 2 edits in trunk/LayoutTests
2008-05-21 Brady Eidson <beidson@apple.com>
Rubberstamped by Adam
<rdar://problem/5787763> - Hang in Storage tests on windows
Since the hang was originally noticed and investigated, no one has revisited it.
Adam and I just spent some time trying to reproduce and were unable.
Lets give the bots another go, shall we?
- platform/win/Skipped:
- 9:16 PM Changeset in webkit [34000] by
-
- 2 edits in tags/Safari-6526.7/WebKit/mac
Merge r33968.
- 9:14 PM Changeset in webkit [33999] by
-
- 4 edits in trunk
Versioning.
- 9:13 PM Changeset in webkit [33998] by
-
- 1 copy in tags/Safari-6526.7
New tag.
- 9:02 PM Changeset in webkit [33997] by
-
- 2 edits in trunk/WebKitTools
Set the pass_through flag on Getopt so that extra arguments can be passed through to Safari,
rather than trigger an unknown argument message. This allows run-webkit-tests to display results
once more.
Rubber-stamped by Stephanie Lewis.
- Scripts/run-safari:
- 8:52 PM Changeset in webkit [33996] by
-
- 2 edits in trunk/JavaScriptCore
Yet more windows builds fixes
- 8:46 PM Changeset in webkit [33995] by
-
- 2 edits in trunk/WebCore
Remove the rest of the debug code inside DEBUG_DEBUGGER_CALLBACKS
since the parts the remain aren't useful.
- page/JavaScriptDebugServer.cpp:
(WebCore::JavaScriptDebugServer::sourceParsed):
- 8:44 PM Changeset in webkit [33994] by
-
- 2 edits in trunk/JavaScriptCore
2008-05-21 Alp Toker <alp@nuanti.com>
GTK+/UNIX testkjs build fix. Include signal.h.
- kjs/testkjs.cpp:
- 8:41 PM Changeset in webkit [33993] by
-
- 2 edits in trunk/WebCore
2008-05-21 Beth Dakin <Beth Dakin>
Reviewed by Anders.
Fix for <rdar://problem/5848161> REGRESSION (r31438?): Crash
beneath ResourceHandle::setDefersLoading while running fast/loader/
simultaneous-reloads-assert.html (null CFURLConnection)
- platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::setDefersLoading): Added simple null- check.
- 8:34 PM Changeset in webkit [33992] by
-
- 2 edits in trunk/JavaScriptCore
Yet more windows build fixes
- 8:31 PM Changeset in webkit [33991] by
-
- 9 edits in trunk/WebCore
Adds the Request and Response headers to the Resource view.
<rdar://problem/5940782> REGRESSION: Resource Request and Response
headers aren't shown (18451)
Reviewed by Adam Roben.
- English.lproj/localizedStrings.js: Added new strings.
- css/view-source.css: Add comments to make sure a couple of
style rules stay in sync with inspector.css.
- page/inspector/Resource.js:
(WebInspector.Resource.prototype.set url): Dispatch an event when
this property changes.
(WebInspector.Resource.prototype.set requestHeaders): Ditto.
(WebInspector.Resource.prototype.set responseHeaders): Ditto.
- page/inspector/ResourceView.js:
(WebInspector.ResourceView): Add new elements for the headers
and a headers TreeOutline. Add event listeners for resource
property changes. Calls the three new refresh functions.
(WebInspector.ResourceView.prototype.set headersVisible): Implemented.
Toggles the headers-visible class name.
(WebInspector.ResourceView.prototype._refreshURL): Update the URL
tree element.
(WebInspector.ResourceView.prototype._refreshRequestHeaders): Call _refreshHeaders.
(WebInspector.ResourceView.prototype._refreshResponseHeaders): Ditto.
(WebInspector.ResourceView.prototype._refreshHeaders): Remove the previous
headers fromm the tree element. Loop throuh the headers and create new
tree elements and append them.
- page/inspector/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype._updateSidebarWidth): Call resize
on the visible view if it is implemented.
- page/inspector/SourceFrame.js:
(WebInspector.SourceFrame.prototype.get autoSizeToFitContentHeight):
(WebInspector.SourceFrame.prototype.set autoSizeToFitContentHeight):
(WebInspector.SourceFrame.prototype.sizeToFitContentHeight):
(WebInspector.SourceFrame.prototype._loaded):
(WebInspector.SourceFrame.prototype._windowResized):
- page/inspector/SourceView.js:
(WebInspector.SourceView): Move the SourceFrame creation so it is
available when headersVisible is set. Add a gutter element to fill
the vertical space no covered by the SourceFrame now.
(WebInspector.SourceView.prototype.set headersVisible): Set the
SourceFrame.autoSizeToFitContentHeight when this property changes.
(WebInspector.SourceView.prototype.resize): Call SourceFrame.sizeToFitContentHeight
when autoSizeToFitContentHeight is true. This happens when resizing the
Resources sidebar.
- page/inspector/inspector.css: Add a copy of webkit-line-gutter-backdrop
and a comment to keep in sync with view-source.css. Adds other styles
for the headers area of resource-view.
- 8:23 PM Changeset in webkit [33990] by
-
- 12 edits12 adds in trunk
WebCore:
2008-05-21 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
<rdar://problem/5838772> Support cross-site XMLHttpRequest
- Implement support for cross-site GET requests using the HTTP header Access-control mechanism.
Tests: http/tests/xmlhttprequest/access-control-basic-allow-headers.html
http/tests/xmlhttprequest/access-control-basic-allow.html
http/tests/xmlhttprequest/access-control-basic-denied.html
http/tests/xmlhttprequest/access-control-basic-exclude.html
- xml/AccessControlList.cpp: (WebCore::AccessControlList::checkOrigin): Implement the list check algorithm.
- xml/AccessControlList.h:
- xml/AccessItem.cpp: (WebCore::AccessItem::AccessItem): (WebCore::AccessItem::matches):
- xml/AccessItem.h: Temporarily use a SecurityOrigin as the bases of AccessItem matching. Using the isSameSchemeHostPort test of the SecurityOrigin allows for a legal subset of the AccessItem match algorithm to be used, until the complete parsing of the wildcards and optional pieces is complete.
- xml/AccessItemRule.cpp: (WebCore::matchesAny): (WebCore::AccessItemRule::allowListMatchesAny): (WebCore::AccessItemRule::excludeListMatchesAny):
- xml/AccessItemRule.h: More of the implementation of the list check algorithm. Check if any of the items in the rule match the control origin.
- xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::XMLHttpRequest): (WebCore::XMLHttpRequest::open): Don't throw a SECURITY_ERR for cross-domain requests anymore. (WebCore::XMLHttpRequest::send): Use different paths for same origin and cross-domain requests. (WebCore::XMLHttpRequest::crossSiteAccessRequest): Temporarily only support the GET method for cross-domain requests. (WebCore::XMLHttpRequest::loadRequestSynchronously): (WebCore::XMLHttpRequest::processSyncLoadResults): This can now throw an exception if a cross-domain request is denied by the access control (WebCore::XMLHttpRequest::didFinishLoading): Add support for cross-domain GET request. ASSERT temporarily that the method is GET, since we should have bailed out much earlier for non-GET methods. (WebCore::XMLHttpRequest::willSendRequest): (WebCore::XMLHttpRequest::didReceiveResponse): Do the HTTP header access-control check as soon as the headers arrive.
- xml/XMLHttpRequest.h:
LayoutTests:
2008-05-21 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
<rdar://problem/5838772> Support cross-site XMLHttpRequest
- Add tests for basic cross-domain XHR.
- http/tests/xmlhttprequest/access-control-basic-allow-expected.txt: Added.
- http/tests/xmlhttprequest/access-control-basic-allow-headers-expected.txt: Added.
- http/tests/xmlhttprequest/access-control-basic-allow-headers.html: Added.
- http/tests/xmlhttprequest/access-control-basic-allow.html: Added.
- http/tests/xmlhttprequest/access-control-basic-denied-expected.txt: Added.
- http/tests/xmlhttprequest/access-control-basic-denied.html: Added.
- http/tests/xmlhttprequest/access-control-basic-exclude-expected.txt: Added.
- http/tests/xmlhttprequest/access-control-basic-exclude.html: Added.
- http/tests/xmlhttprequest/exceptions-expected.txt:
- http/tests/xmlhttprequest/exceptions.html:
- http/tests/xmlhttprequest/resources/access-control-basic-allow-headers.cgi: Added.
- http/tests/xmlhttprequest/resources/access-control-basic-allow.cgi: Added.
- http/tests/xmlhttprequest/resources/access-control-basic-denied.cgi: Added.
- http/tests/xmlhttprequest/resources/access-control-basic-exclude.cgi: Added.
- 8:20 PM Changeset in webkit [33989] by
-
- 2 edits in trunk/JavaScriptCore
2008-05-21 Alp Toker <alp@nuanti.com>
GTK+ build fix. Add DebuggerCallFrame.cpp and take AllInOneFile.cpp
changes into account.
- GNUmakefile.am:
- 7:51 PM Changeset in webkit [33988] by
-
- 2 edits in trunk/JavaScriptCore
Fix windows build
- 7:36 PM Changeset in webkit [33987] by
-
- 3 edits in trunk/WebKitTools
2008-05-21 Stephanie Lewis <Stephanie Lewis>
Reviewed by Maciej.
arch doesn't take arguments on tiger. expand DRT timeout for guardMalloc.
- Scripts/run-webkit-tests:
- Scripts/webkitdirs.pm:
- 7:19 PM Changeset in webkit [33986] by
-
- 5 edits in trunk/WebKitTools
Improve the behavior of run-webkit-tests with 64-bit WebKit by automatically inferring whether to run 64-bit.
If --64-bit is not passed to run-webkit-tests, attempt to guess whether we should run 64-bit.
This decision is made based on the 64-bitness of the built WebKit framework if it exists, and
can be manually overridden by passing --64-bit or --no-64-bit. This removes the need to always
pass an argument to run-webkit-tests after having built with "make x86_64".
Reviewed by Stephanie Lewis.
- Scripts/gdb-safari:
- Scripts/run-safari:
- Scripts/run-webkit-tests:
- Scripts/webkitdirs.pm: Split the setting of the 64-bit flag, the determination of the
preferred architecture, and exporting of the environment variables for 'arch' out into
separate subroutines.
- 7:19 PM Changeset in webkit [33985] by
-
- 2 edits in trunk/WebKitTools
Fix "make x86_64" by adding x86_64 target to WebKitTools Makefile.
- 7:06 PM Changeset in webkit [33984] by
-
- 2 edits in trunk/JavaScriptCore
2008-05-21 Alp Toker <alp@nuanti.com>
GTK+ port build fixes following squirrelfish merge r33979.
- GNUmakefile.am:
- 7:03 PM Changeset in webkit [33983] by
-
- 2 edits in trunk/JavaScriptCore
2008-05-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- save a hash lookup wne writing to global properties 0.3% speedup on SunSpider, 7% on bitops-bitwise-and
- VM/Machine.cpp: (KJS::resolveBase): Check for being a the end of the scope chain before hash lookup.
- 6:31 PM Changeset in webkit [33982] by
-
- 4 edits in trunk
2008-05-21 Alp Toker <alp@nuanti.com>
Rubber-stamped by Maciej.
Replace non-standard #pragma marks with comments to avoid compiler
warnings.
- 6:23 PM Changeset in webkit [33981] by
-
- 1 move in branches/old/squirrelfish
Move aside the squirrelfish branch now that it has been merged.
- 6:21 PM Changeset in webkit [33980] by
-
- 6 edits in trunk
2008-05-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Mark Rowe.
Fix layout test failure in fast/dom/getter-on-window-object2 introduced in r33961.
- JavaScriptCore.exp:
- kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::defineGetter): (KJS::JSGlobalObject::defineSetter):
- kjs/JSGlobalObject.h:
- 6:20 PM Changeset in webkit [33979] by
-
- 485 edits2 moves123 adds8 deletes in trunk
Merge squirrelfish branch into trunk.
- 4:18 PM Changeset in webkit [33978] by
-
- 4 edits2 adds in trunk/WebCore
2008-05-21 Anders Carlsson <andersca@apple.com>
Reviewed by Mitz.
Add IconFetcher implementation.
- WebCore.base.exp:
- WebCore.xcodeproj/project.pbxproj:
- html/HTMLLinkElement.h: (WebCore::HTMLLinkElement::isIcon):
- loader/icon/IconFetcher.cpp: Added. (WebCore::IconLinkEntry::): (WebCore::IconLinkEntry::IconLinkEntry): (WebCore::IconLinkEntry::type): (WebCore::IconLinkEntry::url): (WebCore::IconLinkEntry::buffer): (WebCore::parseIconLink): (WebCore::IconFetcher::create): (WebCore::IconFetcher::IconFetcher): (WebCore::IconFetcher::~IconFetcher): (WebCore::IconFetcher::cancel): (WebCore::IconFetcher::createIcon): (WebCore::IconFetcher::loadEntry): (WebCore::IconFetcher::loadFailed): (WebCore::IconFetcher::didReceiveResponse): (WebCore::IconFetcher::didReceiveData): (WebCore::IconFetcher::didFinishLoading): (WebCore::IconFetcher::didFail):
- loader/icon/IconFetcher.h: Added. (WebCore::IconFetcherClient::~IconFetcherClient):
- 2:50 PM Changeset in webkit [33977] by
-
- 2 edits in trunk/WebCore
Reviewed by Dave Hyatt.
- fix https://bugs.webkit.org/show_bug.cgi?id=18352 <rdar://problem/5854517> crash loading malicious font
- platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): In the case of a custom font, there is no NSFont to base the fallback font on, so get a font based on fallback family name alone.
- 2:09 PM Changeset in webkit [33976] by
-
- 4 edits in trunk/WebCore
Adds the files and line numbers to the Profile call tree.
<rdar://problem/5952924> Inspector needs to show file and line number
in the Profile call tree
Reviewed by Geoff Garen.
- page/JavaScriptProfileNode.cpp:
(WebCore::getFunctionName): Fixes a JSStringRef leak.
(WebCore::getURL): Call ProfileNode::url.
(WebCore::getLineNumber): Call ProfileNode::lineNumber.
(WebCore::ProfileNodeClass): Add the url and lineNumber properties.
- page/inspector/ProfileView.js:
(WebInspector.ProfileDataGridNode.prototype.createCell): Overload the
DataGridNode.createCell and add the file and lineNumber to the
cell if the column is the function column.
- page/inspector/inspector.css: New styles for the file and line.
- 1:56 PM Changeset in webkit [33975] by
-
- 16 edits in branches/squirrelfish
2008-05-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Tim Hatcher.
Merged with trunk WebCore's new debugger.
- kjs/DebuggerCallFrame.cpp: (KJS::DebuggerCallFrame::evaluate): Changed this function to separate the exception value from the return value. The WebKit debugger treats them as one, but the WebCore debugger doesn't.
- kjs/DebuggerCallFrame.h: (KJS::DebuggerCallFrame::dynamicGlobalObject): Added a new accessor for the dynamic global object, since the debugger doesn't want the lexical global object.
WebCore:
2008-05-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Tim Hatcher.
Merged with trunk WebCore's new debugger.
- page/InspectorController.cpp: (WebCore::currentCallFrame): Updated to use the DebuggerCallFrame API. (WebCore::InspectorController::pauseInDebugger): Updated for name change explained below. (WebCore::InspectorController::resumeDebugger): ditto (WebCore::InspectorController::didParseSource): Fixed a bug that would produce garbled text in some cases: Don't treat JS source as null- terminated UTF8; it's UTF16.
- page/JavaScriptCallFrame.cpp:
- page/JavaScriptCallFrame.h: Changed this class to do all of its processing through a JavaScriptCore DebuggerCallFrame. We have to copy the DebuggerCallFrame because it's a temporary. (WebCore::JavaScriptCallFrame::update): Added an API for updating a call frame during execution: this is how we handle "with" and "eval".
- page/JavaScriptDebugServer.cpp: Separated "m_paused" from "m_doneProcessingDebuggerEvents", because they have different semantics: "m_paused" is the flag the debug server uses to indicate that new debugger callbacks should be ignored, because they come from the debugger's own JS code; "m_doneProcessingDebuggerEvents" is the flag the debugger UI uses to indicate that it's done processing events, and would like execution to continue. When these flags were one, the debugger would erroneously process callbacks that ocurred while unwinding from its own JS code.
(WebCore::toPage): Removed some unnecessary NULL checking. Added some
missing NULL checking.
(WebCore::JavaScriptDebugServer::pauseIfNeeded): Changed pause tracking
to track a JavaScriptCallFrame instead of an ExecState, since ExecState
is no longer a unique identifier for a call frame.
I removed the updateCurrentCallFrame scheme, and replaced it with
individual tracking inside these callbacks:
(WebCore::JavaScriptDebugServer::callEvent):
(WebCore::JavaScriptDebugServer::atStatement):
(WebCore::JavaScriptDebugServer::returnEvent):
(WebCore::JavaScriptDebugServer::exception):
The updateCurrentCallFrame scheme was just too incompatible with the
squirrelfish execution model. Everything still works as before, except
for eval, which no longer shows up as an independent call frame. We'll
need to augment our debugger callbacks to bring back support for that.
- page/inspector/ScopeChainSidebarPane.js: Updated to use the activation class's new name.
WebKit/mac:
2008-05-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Tim Hatcher.
Updated for API changes from merging with trunk WebCore's new debugger.
- WebView/WebScriptDebugDelegate.mm: (-[WebScriptCallFrame evaluateWebScript:]): Explicitly check for an exception return, since the DebuggerCallFrame no longer automatically substitutes the exception for the return value.
- WebView/WebScriptDebugger.mm: Use the dynamic global object, not the lexical global object, since the debugger attaches based on dynamic global object.
- 12:25 PM Changeset in webkit [33974] by
-
- 2 edits in trunk/WebKitTools
2008-05-21 Darin Adler <Darin Adler>
- Scripts/make-js-test-wrappers: Added another exception.
- 12:16 PM Changeset in webkit [33973] by
-
- 3 edits in trunk/JavaScriptCore
2008-05-21 Darin Adler <Darin Adler>
- try to fix the Windows build
- profiler/Profiler.cpp: (KJS::Profiler::stopProfiling): Use ptrdiff_t instead of the less-common but incredibly similar ssize_t type.
- wtf/AVLTree.h: (KJS::AVLTree::search): Added a typename for a dependent name that's a type.
- 12:15 PM Changeset in webkit [33972] by
-
- 4 edits3 adds in trunk
2008-05-21 Darin Adler <Darin Adler>
Reviewed by Anders.
- fix <rdar://problem/5952721> bug in JavaScript arguments object property lookup
Test: fast/js/arguments-bad-index.html
- kjs/function.cpp: (KJS::IndexToNameMap::IndexToNameMap): Use unsigned instead of int. (KJS::IndexToNameMap::isMapped): Use unsigned instead of int, and also use the strict version of the numeric conversion function, since we don't want to allow trailing junk. (KJS::IndexToNameMap::unMap): Ditto. (KJS::IndexToNameMap::operator[]): Ditto.
- kjs/function.h: Changed IndexToNameMap::size type from int to unsigned.
LayoutTests:
2008-05-21 Darin Adler <Darin Adler>
Reviewed by Anders.
- test for <rdar://problem/5952721> bug in JavaScript arguments object property lookup
- fast/js/arguments-bad-index-expected.txt: Added.
- fast/js/arguments-bad-index.html: Added.
- fast/js/resources/arguments-bad-index.js: Added.
- 11:34 AM Changeset in webkit [33971] by
-
- 2 edits in trunk/WebKit/mac
2008-05-21 Darin Adler <Darin Adler>
- fix build
- WebView/WebViewPrivate.h: Remove declaration of closeWithFastTeardown. We can add it back later if we want, but if we do, we should probably make some refinements like checking _private->closed and applicationIsTerminating.
- 11:16 AM Changeset in webkit [33970] by
-
- 13 edits in trunk/WebCore
Restores logging of console calls to the STDOUT
when Interpreter::shouldPrintExceptions() is true.
<rdar://problem/5636442> REGRESSION: Console.log no longer logs to
the system console or terminal
<rdar://problem/5146079> JavaScript exception logging should print
accurate file and line info when called from WebScriptObject
Reviewed by Adam Roben.
- bindings/js/JSCustomSQLStatementCallback.cpp:
(WebCore::JSCustomSQLStatementCallback::handleEvent): Remove existing
printf and check for Interpreter::shouldPrintExceptions() since there is
a call to Console::addMessage.
- bindings/js/JSCustomSQLStatementErrorCallback.cpp:
(WebCore::JSCustomSQLStatementErrorCallback::handleEvent): Ditto.
- bindings/js/JSCustomSQLTransactionCallback.cpp:
(WebCore::JSCustomSQLTransactionCallback::handleEvent): Ditto.
- bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
(WebCore::JSCustomSQLTransactionErrorCallback::handleEvent): Ditto.
- bindings/js/JSCustomVoidCallback.cpp:
(WebCore::JSCustomVoidCallback::handleEvent): Ditto.
- bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): Ditto.
- bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::printErrorMessage): Ditto.
- bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute): Ditto.
- bindings/js/kjs_events.cpp:
(WebCore::JSAbstractEventListener::handleEvent): Ditto.
- loader/FrameLoader.cpp:
(WebCore::FrameLoader::shouldAllowNavigation): Ditto.
- bindings/objc/WebScriptObject.mm:
(WebCore::addExceptionToConsole): Added helper static function that
calls Console::addMessage.
(-[WebScriptObject callWebScriptMethod:withArguments:]): Call addExceptionToConsole.
(-[WebScriptObject evaluateWebScript:]): Ditto.
(-[WebScriptObject setValue:forKey:]): Ditto.
(-[WebScriptObject valueForKey:]): Ditto.
(-[WebScriptObject removeWebScriptKey:]): Ditto.
(-[WebScriptObject webScriptValueAtIndex:]): Ditto.
(-[WebScriptObject setWebScriptValueAtIndex:value:]): Ditto.
- page/Console.cpp:
(WebCore::Console::addMessage): Print the level, message,
URL and line number to STDOUT.
(WebCore::printToStandardOut): Helper static function that
takes a prefix string, ExecState, an argument List and URL.
Prints the prefix and loops through the arguments calling
toString on each and printing the string. Finally printing
the URL and new line.
(WebCore::Console::error): Call printToStandardOut.
(WebCore::Console::info): Ditto.
(WebCore::Console::log): Ditto.
(WebCore::Console::assertCondition): Ditto.
(WebCore::Console::warn): Ditto.
- 11:16 AM Changeset in webkit [33969] by
-
- 15 edits in trunk
Changes to the ownership of Profiles and allows multiple Profiles at a time
Change the Profiler to allow multiple profiles to be running at
the same time. This can happen when you have nested console.profile()
calls. This required two changes. First, the Profiler needed to keep a
Vector of current profiles, instead of one. Second, a Profile needs
to keep track of the global ExecState it started in and the page group
identifier it is tracking.
The stopProfiling call now takes the same arguments as startProfiling.
This makes sure the correct profile is stopped. Passing a null UString
as the title will stop the last profile for the matching ExecState.
<rdar://problem/5951559> Multiple pages profiling can interfere with each other
Reviewed by Kevin McCullough.
- JavaScriptCore.exp: Added new exports. Removed old symbols.
- profiler/Profile.cpp: (KJS::Profile::Profile): New constructor arguments for the originatingGlobalExec and pageGroupIdentifier. (KJS::Profile::stopProfiling): Set the m_originatingGlobalExec to null.
- profiler/Profile.h: (KJS::Profile::create): Additional arguments. (KJS::Profile::originatingGlobalExec): Return m_originatingGlobalExec. (KJS::Profile::pageGroupIdentifier): Return m_pageGroupIdentifier.
- profiler/Profiler.cpp: (KJS::Profiler::findProfile): Added. Finds a Profile that matches the ExecState and title. (KJS::Profiler::startProfiling): Return early if there is already a Profile with the ExecState and title. If not, create a new profile and append it to m_currentProfiles. (KJS::Profiler::stopProfiling): Loops through m_currentProfiles and find the one matching the ExecState and title. If one is found call stopProfiling and return the Profile after removing it from m_currentProfiles. (KJS::dispatchFunctionToProfiles): Helper inline function to loop through m_currentProfiles and call a Profile function. (KJS::Profiler::willExecute): Call dispatchFunctionToProfiles. (KJS::Profiler::didExecute): Ditto.
- profiler/Profiler.h:
WebCore:
Changes to work with the new Profiler API. The Profile is now
stored by the InspectorController when Console.profileEnd is called.
This solves three issues with the previous design. First, we don't
keep profiles around unless the Inspector is enabled. Second, we
only show Profiles initiated by the Page in it's Inspector, not every
Profile for the whole process. Third, we now show Profiles in the
Inspector when they are created.
<rdar://problem/5951562> New profiles aren't added to the Inspector
as they finish
Reviewed by Kevin McCullough.
- bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::profileEnd): Added. Calls impl()->profileEnd() and passes the ExecState and arguments.
- page/Console.cpp: (WebCore::Console::profile): (WebCore::Console::profileEnd): Accept the optional title argument and pass it to Profilier::stopProfiling along with the ExecState. Calls InspectorController::addProfile with the result Profile.
- page/Console.h:
- page/Console.idl: Made profileEnd Custom so we can get the ExecState.
- page/InspectorController.cpp: (WebCore::profiles): Renamed from allProfiles. Uses the controller's profiles vector. (WebCore::InspectorController::addProfile): Appends to m_profiles. Calls addScriptProfile if the window is visible. (WebCore::InspectorController::windowScriptObjectAvailable): Renamed allProfiles to profiles. (WebCore::InspectorController::addScriptProfile): Calls addProfile on the JavaScript side. (WebCore::InspectorController::didCommitLoad): Clears m_profiles.
- page/InspectorController.h:
- page/inspector/ProfilesPanel.js: Populates the profiles sidebar the first time the panel is shown after a rest.
- page/inspector/inspector.js: Added addProfile, calls ProfilesPanel's addProfile function.
- 10:53 AM Changeset in webkit [33968] by
-
- 2 edits in trunk/WebKit/mac
2008-05-21 Darin Adler <Darin Adler>
Reviewed by Anders and Kevin Decker.
- fix <rdar://problem/5951130> REGRESSION: crash on quit after reopening windows from previous session
- WebView/WebView.mm: (-[WebViewPrivate dealloc]): Fix assertions to not complain when fast teardown is used. (-[WebView _closePluginDatabases]): Factored out some common code from both versions of close. (-[WebView _closeWithFastTeardown]): Added an underscore to this method's name, since it's internal. Streamlined the code a bit. Added a line of code to set _private->closed (this is the bug fix). (-[WebView _close]): Changed for new method name and to use _closePluginDatabases.
- 10:17 AM Changeset in webkit [33967] by
-
- 7 edits10 adds in trunk
Reviewed by Darin.
<rdar://problem/5908520> REGRESSION (3.1.1-r33033): Crash in WebKit when opening or
refreshing page on people.com
The problem was that STL algorithms do not work with non-conformant comparators, and the
site used sort(function() { return 0.5 - Math.random(); } to randomly shuffle an array.
https://bugs.webkit.org/show_bug.cgi?id=18687
REGRESSION(r32220): ecma/Array/15.4.4.5-3.js test now fails in GMT(BST)
Besides relying on sort stability, this test was just broken, and kept failing with the
new stable sort.
Tests: fast/js/sort-randomly.html
fast/js/sort-stability.html
fast/js/comparefn-sort-stability.html
- kjs/avl_tree.h: Added an AVL tree implementation.
- JavaScriptCore.xcodeproj/project.pbxproj:
- wtf/AVLTree.h: Added. Added an AVL tree implementation.
- kjs/array_instance.cpp: (KJS::ArrayInstance::increaseVectorLength): (KJS::ArrayInstance::sort): (KJS::AVLTreeAbstractorForArrayCompare::get_less): (KJS::AVLTreeAbstractorForArrayCompare::set_less): (KJS::AVLTreeAbstractorForArrayCompare::get_greater): (KJS::AVLTreeAbstractorForArrayCompare::set_greater): (KJS::AVLTreeAbstractorForArrayCompare::get_balance_factor): (KJS::AVLTreeAbstractorForArrayCompare::set_balance_factor): (KJS::AVLTreeAbstractorForArrayCompare::compare_key_key): (KJS::AVLTreeAbstractorForArrayCompare::compare_key_node): (KJS::AVLTreeAbstractorForArrayCompare::compare_node_node): (KJS::AVLTreeAbstractorForArrayCompare::null): (KJS::ArrayInstance::compactForSorting):
- kjs/array_instance.h: increaseVectorLength() now returns a bool to indicate whether it was successful.
- wtf/Vector.h: (WTF::Vector::Vector): (WTF::::operator=): (WTF::::fill): Make these methods fail instead instead of crash when allocation fails, matching resize() and reserveCapacity(), which already had this behavior. Callers need to check for null buffer after making any Vector call that can try to allocate.
- tests/mozilla/ecma/Array/15.4.4.5-3.js: Fixed the test to use a consistent sort function, as suggested in comments to a Mozilla bug filed about it (I'll keep tracking the bug to see what the final resolution is).
- 10:00 AM Changeset in webkit [33966] by
-
- 3 edits3 adds in trunk
Reviewed by Darin.
https://bugs.webkit.org/show_bug.cgi?id=19169
<rdar://5952342> REGRESSION: nakarte.ru searches don't work
Test: http/tests/xmlhttprequest/encode-request-url.html
- platform/KURL.cpp: (WebCore::KURL::init): Don't allow UTF-8 encoded data to be implicitly converted to String, as it will be encoded again by parse().
- 9:59 AM Changeset in webkit [33965] by
-
- 4 edits in trunk/JavaScriptCore
2008-05-20 Kevin McCullough <kmccullough@apple.com>
Reviewed by Tim.
<rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a
profile node.
- Implements focus by adding the idea of a profileNode being visible and adding the ability to reset all of the visible flags.
- profiler/Profile.h: (KJS::Profile::focus):
- profiler/ProfileNode.cpp: (KJS::ProfileNode::ProfileNode): Initialize the visible flag. (KJS::ProfileNode::setTreeVisible): Set the visibility of this node and all of its descendents. (KJS::ProfileNode::focus): Determine if this node should be visible when focusing, if the functionName matches this node's function name or if any of this node's children are visible. (KJS::ProfileNode::restoreAll): Restore all nodes' visible flag. (KJS::ProfileNode::debugPrintData):
- profiler/ProfileNode.h: (KJS::ProfileNode::visible): (KJS::ProfileNode::setVisible):
- 7:38 AM Changeset in webkit [33964] by
-
- 2 edits in trunk/WebCore
2008-05-21 Ariya Hidayat <ariya.hidayat@trolltech.com>
Reviewed by Simon.
For the Qt port, fix building with Qt for Embedded Linux.
- 7:35 AM Changeset in webkit [33963] by
-
- 3 edits in trunk/WebCore
2008-05-21 Ariya Hidayat <ariya.hidayat@trolltech.com>
Reviewed by Simon.
For the Qt port, allow building without NPAPI plugin support.
- WebCore.pro:
- plugins/PluginView.h:
- 5:51 AM Changeset in webkit [33962] by
-
- 7 edits in branches/squirrelfish/JavaScriptCore
Bug 19116: SquirrelFish shouldn't regress on variable lookups
<https://bugs.webkit.org/show_bug.cgi?id=19116>
Reviewed by Maciej
Optimise cross scope assignment, 0.4% progression in sunspider.
- 5:31 AM Changeset in webkit [33961] by
-
- 2 edits in branches/squirrelfish/JavaScriptCore
2008-05-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Oliver.
- check property map before symbol table in JSGlobalObject::getOwnPropertySlot 0.5% speedup on SunSpider
- kjs/JSGlobalObject.h: (KJS::JSGlobalObject::getOwnPropertySlot): Check property map before symbol table because symbol table access is likely to have been optimized.
- 5:16 AM Changeset in webkit [33960] by
-
- 5 edits in branches/squirrelfish/JavaScriptCore
Bug 19116: SquirrelFish shouldn't regress on variable lookups
<https://bugs.webkit.org/show_bug.cgi?id=19116>
Reviewed by Maciej
Optimise multiscope lookup of statically resolvable function calls.
SunSpider reports a 1.5% improvement, including 37% on
controlflow-recursive for some reason :D
- 3:31 AM Changeset in webkit [33959] by
-
- 10 edits in branches/squirrelfish
2008-05-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Oliver.
- give JSGlobalObject a special version of getOwnPropertySlot that tells you if the slot is directly writable (WebCore change using this is a 2.6% speedup on in-browser SunSpider).
- JavaScriptCore.exp:
- kjs/JSGlobalObject.h: (KJS::JSGlobalObject::getOwnPropertySlot):
- kjs/JSVariableObject.h: (KJS::JSVariableObject::symbolTableGet):
- kjs/object.h: (KJS::JSObject::getDirectLocation): (KJS::JSObject::getOwnPropertySlotForWrite):
- kjs/property_map.cpp: (KJS::PropertyMap::getLocation):
- kjs/property_map.h:
- kjs/property_slot.h: (KJS::PropertySlot::putValue):
WebCore:
2008-05-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Oliver.
- write directly to the slot we used to check for override properties, when possible 2.6% speedup on in-browser SunSpider
- bindings/js/JSDOMWindowCustom.h: (WebCore::JSDOMWindow::customPut):
- 1:47 AM Changeset in webkit [33958] by
-
- 8 edits in branches/squirrelfish/JavaScriptCore
Bug 19116: SquirrelFish shouldn't regress on variable lookups
<https://bugs.webkit.org/show_bug.cgi?id=19116>
Reviewed by Maciej
This restores multiscope optimisation to simple resolve, producing
a 2.6% progression in SunSpider. Have verified that none of the
sites broken by the multiscope optimisation in trunk were effected
by this change.
May 20, 2008:
- 10:47 PM Changeset in webkit [33957] by
-
- 4 edits2 moves in trunk/WebKit/wx
Reviewed by Darin Adler.
Rename wxWebFrame -> wxWebBrowserShell in preparation to introduce a WebFrame counterpart in wx port. (Frame typically means 'top level window' in wx terms.)
https://bugs.webkit.org/show_bug.cgi?id=19041
- 10:01 PM Changeset in webkit [33956] by
-
- 4 edits in branches/squirrelfish/WebCore
2008-05-20 Maciej Stachowiak <mjs@apple.com>
Reviewed by Oliver.
- inline JSDOMWindow security checks 0.9% speedup to SunSpider in-browser
- bindings/js/JSDOMWindowBase.cpp:
- bindings/js/JSDOMWindowCustom.h: (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate): (WebCore::JSDOMWindowBase::allowsAccessFrom): (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage): (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
- bindings/js/kjs_binding.cpp:
- 9:14 PM Changeset in webkit [33955] by
-
- 1 edit31 adds in trunk/WebCore
2008-05-20 Kevin McCullough <kmccullough@apple.com>
Reviewed by Tim.
Added all of my personal manual tests for the profiler.
- manual-tests/inspector/profiler-test-anonymous-event-handler.html: Added.
- manual-tests/inspector/profiler-test-anonymous-function-called-from-different-contexts.html: Added.
- manual-tests/inspector/profiler-test-anonymous-function-calls-built-in-functions.html: Added.
- manual-tests/inspector/profiler-test-anonymous-function-calls-eval.html: Added.
- manual-tests/inspector/profiler-test-apply.html: Added.
- manual-tests/inspector/profiler-test-built-in-function-calls-anonymous.html: Added.
- manual-tests/inspector/profiler-test-built-in-function-calls-user-defined-function.html: Added.
- manual-tests/inspector/profiler-test-call.html: Added.
- manual-tests/inspector/profiler-test-dead-time.html: Added.
- manual-tests/inspector/profiler-test-event-handler.html: Added.
- manual-tests/inspector/profiler-test-execution-context-and-eval-on-same-line.html: Added.
- manual-tests/inspector/profiler-test-inline-event-handler.html: Added.
- manual-tests/inspector/profiler-test-many-calls-in-the-same-scope.html: Added.
- manual-tests/inspector/profiler-test-multiple-and-different-scoped-anonymous-function-calls.html: Added.
- manual-tests/inspector/profiler-test-multiple-and-different-scoped-function-calls.html: Added.
- manual-tests/inspector/profiler-test-multiple-frames.html: Added.
- manual-tests/inspector/profiler-test-multiple-windows.html: Added.
- manual-tests/inspector/profiler-test-nested-anonymous-functon.html: Added.
- manual-tests/inspector/profiler-test-nested-start-and-stop-profiler.html: Added.
- manual-tests/inspector/profiler-test-no-execution-context.html: Added.
- manual-tests/inspector/profiler-test-one-execution-context.html: Added.
- manual-tests/inspector/profiler-test-profile-calls-in-included-file.html: Added.
- manual-tests/inspector/profiler-test-profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html: Added.
- manual-tests/inspector/profiler-test-profiling-from-a-nested-location.html: Added.
- manual-tests/inspector/profiler-test-start-and-stop-profiler-multiple-times.html: Added.
- manual-tests/inspector/profiler-test-two-execution-contexts.html: Added.
- manual-tests/inspector/profiler-test-user-defined-function-calls-built-in-functions.html: Added.
- manual-tests/inspector/resources: Added.
- manual-tests/inspector/resources/other-frame.html: Added.
- manual-tests/inspector/resources/other-window.html: Added.
- manual-tests/inspector/resources/profiler-test-JS-resources.js: Added.
- 8:06 PM Changeset in webkit [33954] by
-
- 2 edits in branches/squirrelfish/WebCore
2008-05-20 Maciej Stachowiak <mjs@apple.com>
Reviewed by Adam.
- use ALWAYS_INLINE on customGetOwnPropertySlot since it wasn't inlining 2% speedup to SunSpider in-browser
- bindings/js/JSDOMWindowCustom.h: (WebCore::JSDOMWindow::customGetOwnPropertySlot):
- 7:50 PM Changeset in webkit [33953] by
-
- 11 edits7 adds in branches/squirrelfish/WebCore
2008-05-20 Maciej Stachowiak <mjs@apple.com>
Reviewed by Adam.
- inline JSDOMWindow's customPut and customGetOwnPropertySlot methods 1.2% speedup to SunSpider in-browser
The approach here is to make the code generator include a
JS{classname}Custom.h header in the autogenerated implementation,
which we can use to provide inline versions.
- bindings/js/JSCSSStyleDeclarationCustom.cpp:
- bindings/js/JSCSSStyleDeclarationCustom.h: Added.
- bindings/js/JSDOMWindowCustom.cpp:
- bindings/js/JSDOMWindowCustom.h: (WebCore::asJSDOMWindow): (WebCore::JSDOMWindow::customGetOwnPropertySlot): (WebCore::JSDOMWindow::customPut):
- bindings/js/JSHTMLAppletElementCustom.cpp:
- bindings/js/JSHTMLAppletElementCustom.h: Added.
- bindings/js/JSHTMLEmbedElementCustom.cpp:
- bindings/js/JSHTMLEmbedElementCustom.h: Added.
- bindings/js/JSHTMLObjectElementCustom.cpp:
- bindings/js/JSHTMLObjectElementCustom.h: Added.
- bindings/js/JSHistoryCustom.cpp:
- bindings/js/JSHistoryCustom.h: Added.
- bindings/js/JSLocationCustom.cpp:
- bindings/js/JSLocationCustom.h: Added.
- bindings/js/JSStorageCustom.cpp:
- bindings/js/JSStorageCustom.h: Added.
- bindings/scripts/CodeGeneratorJS.pm:
- 6:48 PM Changeset in webkit [33952] by
-
- 3 edits in trunk/JavaScriptCore
Fixes a couple performance issues with the profiler. Also fixes
a regression where some nodes wouldn't be added to the tree.
Reviewed by Kevin McCullough.
- profiler/ProfileNode.cpp:
(KJS::ProfileNode::addChild): Compare callIdentifier instead
of functionName.
- profiler/ProfileNode.h:
(CallIdentifier.operator==): Compare the CallIdentifiers in
an order that fails sooner for non-matches.
(CallIdentifier.callIdentifier): Return the CallIdentifier by
reference to prevent making a new copy each time.
- 5:51 PM Changeset in webkit [33951] by
-
- 2 edits in trunk
2008-05-20 Jan Michael Alonzo <jmalonzo@webkit.org>
Reviewed by Alp Toker.
Fix for previous autotools change.
- configure.ac:
- 5:33 PM Changeset in webkit [33950] by
-
- 7 edits in branches/squirrelfish/JavaScriptCore
Fixerate the windows build.
Reviewed by NOBODY (Build fix)
- 5:23 PM Changeset in webkit [33949] by
-
- 2 edits in trunk/WebCore
Use KJS::List::getSlice instead of reimplementing it
Rubberstamped and suggested by Sam Weinig.
- bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::assertCondition):
- 4:38 PM Changeset in webkit [33948] by
-
- 3 edits in trunk/WebCore
2008-05-20 Kevin Calhoun <kcalhoun@apple.com>
Reviewed by Darin.
Fix <rdar://problem/5929010> Adopt new QTKit methods for <video> implementation
If the class QTVideoRendererWebKitOnly is present use it to render video,
otherwise fall back to existing use of QTMovieView/QTMovieContentView.
- platform/graphics/mac/MediaPlayerPrivateQTKit.h:
- platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate): (WebCore::MediaPlayerPrivate::createQTMovie): (WebCore::QTVideoRendererClass): (WebCore::MediaPlayerPrivate::detachQTMovieView): (WebCore::MediaPlayerPrivate::createQTVideoRenderer): (WebCore::MediaPlayerPrivate::destroyQTVideoRenderer): (WebCore::MediaPlayerPrivate::setUpVideoRendering): (WebCore::MediaPlayerPrivate::tearDownVideoRendering): (WebCore::MediaPlayerPrivate::load): (WebCore::MediaPlayerPrivate::cancelLoad): (WebCore::MediaPlayerPrivate::setVisible): (WebCore::MediaPlayerPrivate::paint): (-[WebCoreMovieObserver newImageAvailable:]):
- 4:32 PM Changeset in webkit [33947] by
-
- 8 edits in trunk/JavaScriptCore
2008-05-20 Kevin McCullough <kmccullough@apple.com>
Reviewed by Darin.
<rdar://problem/5950796> JSProfiler: dump functions are in the code
Removed dump and logging functions from the Release version of the code
and renamed them to be obviously for debugging only.
- JavaScriptCore.exp:
- profiler/Profile.cpp: (KJS::Profile::debugPrintData): (KJS::Profile::debugPrintDataSampleStyle):
- profiler/Profile.h:
- profiler/ProfileNode.cpp: (KJS::ProfileNode::debugPrintData): (KJS::ProfileNode::debugPrintDataSampleStyle):
- profiler/ProfileNode.h:
- profiler/Profiler.cpp:
- profiler/Profiler.h:
- 4:05 PM Changeset in webkit [33946] by
-
- 6 edits1 add in trunk/WebCore
Fix Bug 19134: Inspector should support console.assert
Reviewed by Tim Hatcher.
Test: manual-tests/inspector/console-assert.html
- bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::assertCondition): Added.
- bindings/scripts/CodeGeneratorJS.pm: Added parsing of the ImplementationFunction extended attribute, which allows you to override the name of the C++ function used to implement this method.
- manual-tests/inspector/console-assert.html: Added.
- page/Console.cpp: (WebCore::Console::assertCondition): Added.
- page/Console.h:
- page/Console.idl: Added assert().
- 4:05 PM Changeset in webkit [33945] by
-
- 4 edits in trunk/JavaScriptCore
2008-05-20 Kevin McCullough <kmccullough@apple.com>
Reviewed by Adam.
<rdar://problem/5950538> JSProfiler: Keep track of non-JS execution time
We now have an extra node that represents the excess non-JS time.
- Also changed "SCRIPT" and "anonymous function" to be more consistent with the debugger.
- profiler/ProfileNode.cpp: (KJS::ProfileNode::stopProfiling): If this ProfileNode is the head node create a new child that has the excess execution time. (KJS::ProfileNode::calculatePercentages): Moved calculation of the percentages into a function since it's called from multiple places.
- profiler/ProfileNode.h: Add the newly needed functions used above. (KJS::ProfileNode::setTotalTime): (KJS::ProfileNode::setSelfTime): (KJS::ProfileNode::setNumberOfCalls):
- profiler/Profiler.cpp: renamed "SCRIPT" and "anonymous function" to be consistent with the debugger and use constants that can be localized more easily. (KJS::getCallIdentifiers): (KJS::getCallIdentifierFromFunctionImp):
- 2:38 PM Changeset in webkit [33944] by
-
- 7 edits in branches/squirrelfish/JavaScriptCore
Bug 19110: SquirrelFish: Google Maps - no maps
<https://bugs.webkit.org/show_bug.cgi?id=19110>
Reviewed by Geoff
Correct a comedy of errors present in my original patch to "fix"
exceptions occurring midway through pre and post increment. This
solution is cleaner than the original, doesn't need the additional
opcodes, and as an added benefit does not break Google Maps.
Sunspider reports a 0.4% progression.
- 2:29 PM Changeset in webkit [33943] by
-
- 4 edits in trunk/JavaScriptCore
2008-05-20 Kevin McCullough <kmccullough@apple.com>
Reviewed by Tim.
<rdar://problem/5770054> JavaScript profiler (10928)
Removed only profiler-internal use of currentProfile since that concept
is changing.
- profiler/Profile.h: Now stopProfiling takes a time and bool as arguments. The time is used to calculate %s from and the bool tells if this node is the head node and should be the one calculating the time. (KJS::Profile::stopProfiling):
- profiler/ProfileNode.cpp: Ditto. (KJS::ProfileNode::stopProfiling):
- profiler/ProfileNode.h: Ditto.
- 2:02 PM Changeset in webkit [33942] by
-
- 2 edits in trunk/JavaScriptCore
2008-05-20 Kevin McCullough <kmccullough@apple.com>
Accidentally turned on the profiler.
- kjs/config.h:
- 1:59 PM Changeset in webkit [33941] by
-
- 9 edits in trunk/JavaScriptCore
2008-05-20 Kevin McCullough <kmccullough@apple.com>
Reviewed by Tim.
<rdar://problem/5770054> JavaScript profiler (10928)
Split function name into 3 parts so that the Web Inspector can link it to
the resource location from whence it came.
- kjs/ustring.cpp: Implemented operator> for UStrings (KJS::operator>):
- kjs/ustring.h:
- profiler/Profile.cpp: (KJS::Profile::Profile): Initialize all 3 values. (KJS::Profile::willExecute): Use CallIdentifier struct. (KJS::Profile::didExecute): Ditto.
- profiler/Profile.h: Ditto and remove unused function.
- profiler/ProfileNode.cpp: (KJS::ProfileNode::ProfileNode): Use CallIdentifier struct. (KJS::ProfileNode::willExecute): Ditto and fix an issue where we restarted the m_startTime even though it was already started. (KJS::ProfileNode::didExecute): Ditto. (KJS::ProfileNode::findChild): Ditto. (KJS::functionNameDescendingComparator): Ditto and use new comparator. (KJS::functionNameAscendingComparator): Ditto. (KJS::ProfileNode::printDataInspectorStyle): Use CallIdentifier struct. (KJS::ProfileNode::printDataSampleStyle): Ditto.
- profiler/ProfileNode.h: (KJS::CallIdentifier::CallIdentifier): Describe the CallIdentifier struct (KJS::CallIdentifier::operator== ): (KJS::ProfileNode::create): Use the CallIdentifier struct. (KJS::ProfileNode::callIdentifier): (KJS::ProfileNode::functionName): Now only return the function name, not the url and line number too. (KJS::ProfileNode::url): (KJS::ProfileNode::lineNumber):
- profiler/Profiler.cpp: Use the CallIdentifier struct. (KJS::Profiler::startProfiling): (KJS::Profiler::willExecute): (KJS::Profiler::didExecute): (KJS::getCallIdentifiers): (KJS::getCallIdentifierFromFunctionImp):
- 1:51 PM Changeset in webkit [33940] by
-
- 2 edits in trunk/WebCore
2008-05-20 Alice Liu <alice.liu@apple.com>
Reviewed by Brady.
fix <rdar://problem/5908580> 10A58: Dictionary Panel hangs in WebCore::Cache::pruneDeadResources()
- loader/Cache.cpp: (WebCore::Cache::requestUserCSSStyleSheet): Add a call to resourceAccessed() to more closely mirror what is done in requestResource() (WebCore::Cache::insertInLRUList): Assert that any resource in the LRU list has been accessed. This is early detection of a potential hang later when pruning resources, and also agrees with the early return in removeFromLRUList().
- 12:15 PM Changeset in webkit [33939] by
-
- 6 edits3 adds in trunk
WebCore:
Reviewed by Darin Adler.
- fix https://bugs.webkit.org/show_bug.cgi?id=17655 <rdar://problem/5778077> REGRESSION (3.1.1-TOT): Reproducible crash calling querySelector on viewless Document
Test: fast/dom/SelectorAPI/viewless-document.html
- css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): Updated to initialize the selector checker. (WebCore::CSSStyleSelector::init): Removed initialization of m_collectRulesOnly, which is now part of the selector checker. (WebCore::CSSStyleSelector::matchRules): Updated for renames and data moved into the selector checker. (WebCore::CSSStyleSelector::matchRulesForList): Ditto. (WebCore::CSSStyleSelector::initForStyleResolve): Added a PseudoId argument, which is used to initialize a data member of the selector checker. Updated for renames. Removed initialization of m_isXMLDoc because this bit is now initialized only once in the selector checker's constructor. (WebCore::CSSStyleSelector::SelectorChecker::SelectorChecker): Added. (WebCore::CSSStyleSelector::SelectorChecker::checkPseudoState): Changed into a SelectorChecker method. (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): Added. Used by querySelector() and querySelectorAll(). (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for data moved into the selector checker. (WebCore::CSSStyleSelector::matchUARules): Ditto. (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::pseudoStyleForElement): Ditto. Also removed code that set the parentStyle variable after the last place it is accessed, and changed to ensure that m_style is set early in this function. (WebCore::CSSStyleSelector::adjustRenderStyle): Updated for data moved into the selector checker. (WebCore::CSSStyleSelector::styleRulesForElement): Ditto. (WebCore::CSSStyleSelector::checkSelector): Ditto. Also changed to pass the element's style and the parent style to the selector checker, as well as the dynamic pseudo variable and the selector attributes vector. (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Added arguments for the style of the base element and its parent. When the elementStyle argument is 0, the style is fetched from the element and its parent as needed. Also changed to take a reference to the dynamic pseudo ID and a pointer to the vector of attributes affecting the match. (WebCore::CSSStyleSelector::applyProperty): Updated for data moved into the selector checker. (WebCore::CSSStyleSelector::checkForGenericFamilyChange): Ditto. (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): Ditto. (WebCore::CSSStyleSelector::fontSizeForKeyword): Ditto. (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Ditto. (WebCore::CSSStyleSelector::SelectorChecker::allVisitedStateChanged): Changed into a SelectorChecker method. (WebCore::CSSStyleSelector::SelectorChecker::visitedStateChanged): Ditto.
- css/CSSStyleSelector.h: Added a SelectorChecker class and moved data and methods used in checking selectors into it. (WebCore::CSSStyleSelector::allVisitedStateChanged): Changed to call the SelectorChecker method. (WebCore::CSSStyleSelector::visitedStateChanged): Ditto.
- dom/Node.cpp: (WebCore::Node::querySelector): Changed to use a SelectorChecker instead of the document's style selector.
- dom/SelectorNodeList.cpp: (WebCore::SelectorNodeList::SelectorNodeList): Ditto.
LayoutTests:
Reviewed by Darin Adler.
- test for https://bugs.webkit.org/show_bug.cgi?id=17655 <rdar://problem/5778077> REGRESSION (3.1.1-TOT): Reproducible crash calling querySelector on viewless Document
- fast/dom/SelectorAPI/resources/viewless-document.js: Added.
- fast/dom/SelectorAPI/viewless-document-expected.txt: Added.
- fast/dom/SelectorAPI/viewless-document.html: Added.
- 12:04 PM Changeset in webkit [33938] by
-
- 8 edits1 add in trunk/WebCore
Implements the Profiles panel and Profile view.
Reviewed by Kevin McCullough.
- English.lproj/localizedStrings.js: Added new strings.
- page/inspector/Images/profileIcon.png: Added.
- page/inspector/Images/profilesIcon.png: Changed. New icon design
that fits in with the other toolbar icons.
- page/inspector/ProfileView.js:
(WebInspector.ProfileView): Remove custom table elements
and create a DataGrid. Sorts the profile by descending total time,
since the profiles aren't sorted by default.
(WebInspector.ProfileView.prototype.refresh): Clears the DataGrid
and recreates all the nodes. The selection is preserved.
(WebInspector.ProfileView.prototype.refreshShowAsPercents): Traverse
all the children and change showTotalTimeAsPercent and showSelfTimeAsPercent
to match the ProfileView values. Then call refresh on the child.
(WebInspector.ProfileView.prototype._sortData): Determine the sort
function to call on the head profile node. Call it and then call
refresh to rebuild the DataGrid.
(WebInspector.ProfileView.prototype._mouseDownInDataGrid): Return early
if the event is not a double-click. When it is a double-click, determine
the column that was targeted and if it was total or self toggle the
show as percent property. Call refreshShowAsPercents.
(WebInspector.ProfileDataGridNode):
(WebInspector.ProfileDataGridNode.prototype.get data):
(WebInspector.ProfileDataGridNode.prototype.expand):
(WebInspector.ProfileDataGridNode.prototype.collapse):
(WebInspector.ProfileDataGridNode.prototype._populate):
- page/inspector/ProfilesPanel.js:
(WebInspector.ProfilesPanel):
(WebInspector.ProfilesPanel.prototype.show): Populate the sidebar
with all profiles. This is a workaround until the Inspector
is told about new profiles.
(WebInspector.ProfilesPanel.prototype.reset): Clear the sidebar and
profile views.
(WebInspector.ProfilesPanel.prototype.handleKeyEvent): Pass the key
event to the sidebar.
(WebInspector.ProfilesPanel.prototype.addProfile): Create a
ProfileSidebarTreeElement object and add it to the sidebar.
(WebInspector.ProfilesPanel.prototype.showProfile): Create a ProfileView
and show it.
(WebInspector.ProfilesPanel.prototype.closeVisibleView): Hide the
visible view.
(WebInspector.ProfilesPanel.prototype._startSidebarDragging): Call
WebInspector.elementDragStart.
(WebInspector.ProfilesPanel.prototype._sidebarDragging): Call _updateSidebarWidth.
(WebInspector.ProfilesPanel.prototype._endSidebarDragging):
Call WebInspector.elementDragEnd.
(WebInspector.ProfilesPanel.prototype._updateSidebarWidth): Update the
sidebar width based on the passed in value.
(WebInspector.ProfileSidebarTreeElement): Subclass WebInspector.SidebarTreeElement.
(WebInspector.ProfileSidebarTreeElement.prototype.onselect): Call ProfilesPanel.showProfile.
(WebInspector.ProfileSidebarTreeElement.prototype.get mainTitle): Return profile.title.
(WebInspector.ProfileSidebarTreeElement.prototype.set mainTitle): Do nothing.
(WebInspector.ProfileSidebarTreeElement.prototype.get subtitle): Ditto.
(WebInspector.ProfileSidebarTreeElement.prototype.set subtitle): Ditto.
- page/inspector/inspector.css: New styles for the profile sidebar
item and profile data grid columns.
- page/inspector/inspector.js:
- page/inspector/utilities.js:
(Number.secondsToString): Added a higherResolution argument
that returns fractional milliseconds.
- 11:39 AM Changeset in webkit [33937] by
-
- 4 edits in trunk/WebCore
<rdar://problem/5060458> Elements without AXActions should not return kAXErrorFailure
<rdar://problem/3438014> Might need accessibility solution for context menus in web pages
- 10:12 AM Changeset in webkit [33936] by
-
- 2 edits in trunk/WebCore
Expose the ProfileNode functionName sorting functions on
JavaScriptProfileNode.
Reviewed by Kevin McCullough.
- page/JavaScriptProfileNode.cpp:
(WebCore::sortFunctionNameDescending): Call ProfileNode.
(WebCore::sortFunctionNameAscending): Ditto.
(WebCore::ProfileNodeClass): Add static functions.
- 10:12 AM Changeset in webkit [33935] by
-
- 5 edits in trunk/JavaScriptCore
Rename sortFileName{Ascending,Descending} to
sortFunctionName{Ascending,Descending}.
Reviewed by Kevin McCullough.
- JavaScriptCore.exp:
- kjs/config.h:
- profiler/Profile.h:
- profiler/ProfileNode.cpp:
(KJS::functionNameDescendingComparator):
(KJS::ProfileNode::sortFunctionNameDescending):
(KJS::functionNameAscendingComparator):
(KJS::ProfileNode::sortFunctionNameAscending):
- profiler/ProfileNode.h:
- 9:41 AM Changeset in webkit [33934] by
-
- 12 edits in trunk/WebCore
2008-05-20 Darin Adler <Darin Adler>
Reviewed by Mitz.
- a first small step of CSS DOM refactoring -- the eventual goal is to reduce StyleBase and possibly eliminate it, since it has multiple purposes and unneccessarily ties many classes together
- css/CSSCursorImageValue.cpp: (WebCore::isSVGCursorIdentifier): Mark static so it has internal linkage. (WebCore::resourceReferencedByCursorElement): Ditto. (WebCore::CSSCursorImageValue::CSSCursorImageValue): Removed unused style argument. (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): Removed code to check if X and Y changed before changing them -- there's no reason to do that. Removed code that depended on the internals of CSSImageValue. The new code uses only protected functions rather than going right at the fields and uing internal knowledge of the base class.
- css/CSSCursorImageValue.h: Added a create function, made constructor private, removed unused style argument.
- css/CSSImageValue.cpp: (WebCore::CSSImageValue::CSSImageValue): Removed unused style argument. (WebCore::CSSImageValue::cachedImageURL): Added. A protected function for use by CSSCursorImageValue that gives the URL. (WebCore::CSSImageValue::clearCachedImage): Added. A protected function for use by CSSCursorImageValue that clears the CachedImage.
- css/CSSImageValue.h: Added create functions, made constructors protected and private, removed unused style argument, made data members private, added some protected functions for use by CSSCursorImageValue.
- css/CSSImportRule.cpp: (WebCore::CSSImportRule::setCSSStyleSheet): Changed to call checkLoaded on the parent. This is part of preparation to move the checkLoaded function from StyleBase to StyleSheet. (WebCore::CSSImportRule::insertedIntoParent): Changed code to check the URL of the style sheet to use the href function of the style sheet rather than the baseURL function. This eliminates an O(n2) algorithm here and reduces the use of baseURL, part of preparation to move it from StyleBase to CSSStyleSheet.
- css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::setImageProperty): Changed to use create function instead of a direct call to new for the CSSImageValue classes.
- css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Ditto. (WebCore::CSSParser::parseContent): Ditto. (WebCore::CSSParser::parseFillImage): Ditto. (WebCore::CSSParser::parseBorderImage): Ditto.
- css/CSSStyleSelector.cpp: Removed unneeded include of CSSImageValue.h.
- rendering/style/RenderStyle.h: Removed unneeded include of CSSCursorImageValue.h, which was causing us to rebuild the world way too often.
- xml/XSLImportRule.cpp: (WebCore::XSLImportRule::setXSLStyleSheet): See change to CSSImportRule above. (WebCore::XSLImportRule::loadSheet): Ditto.
- 8:55 AM Changeset in webkit [33933] by
-
- 2 edits in trunk/WebCore
2008-05-20 Kevin McCullough <kmccullough@apple.com>
Rubber stamped by Adam.
-Minor fix. Should not use a reference since the original may disappear.
- page/Console.cpp: (WebCore::Console::profile):
- 8:40 AM Changeset in webkit [33932] by
-
- 4 edits in trunk
wx build fixes for PluginViewWx.cpp and WebKit/wx/WebView.cpp
- 6:58 AM Changeset in webkit [33931] by
-
- 2 edits in trunk/WebCore
Expose the ProfileNode sorting functions on JavaScriptProfileNode.
Reviewed by Kevin McCullough.
- page/JavaScriptProfileNode.cpp:
(WebCore::sortTotalTimeDescending): Call ProfileNode.
(WebCore::sortTotalTimeAscending): Ditto.
(WebCore::sortSelfTimeDescending): Ditto.
(WebCore::sortSelfTimeAscending): Ditto.
(WebCore::sortCallsDescending): Ditto.
(WebCore::sortCallsAscending): Ditto.
(WebCore::ProfileNodeClass): Add static static functions.
- 6:58 AM Changeset in webkit [33930] by
-
- 4 edits in trunk/JavaScriptCore
Make the profiler use higher than millisecond resolution time-stamps.
Reviewed by Kevin McCullough.
- kjs/DateMath.cpp:
(KJS::getCurrentUTCTime): Call getCurrentUTCTimeWithMicroseconds and
floor the result.
(KJS::getCurrentUTCTimeWithMicroseconds): Copied from the previous
implementation of getCurrentUTCTime without the floor call.
- kjs/DateMath.h: Addded getCurrentUTCTimeWithMicroseconds.
- profiler/ProfileNode.cpp:
(KJS::ProfileNode::ProfileNode): Use getCurrentUTCTimeWithMicroseconds.
- 6:57 AM Changeset in webkit [33929] by
-
- 2 edits in trunk/WebCore
- page/InspectorController.cpp: Change the include for
JavaScriptProfile.h to sue double quotes instead of backets.
- 6:57 AM Changeset in webkit [33928] by
-
- 3 edits in trunk/JavaScriptCore
Fixes a bug in the profiler where call and apply would show up
and double the time spent in a function. We don't want to show call
and apply at all in the profiles. This change excludes them.
Reviewed by Kevin McCullough.
- profiler/ProfileNode.cpp:
(KJS::ProfileNode::stopProfiling): Remove a second for loop and
calculate self time in the existing loop.
- profiler/Profiler.cpp:
(KJS::shouldExcludeFunction): Helper inline function that returns
true in the current function in an InternalFunctionImp and it is
has the functionName call or apply.
(KJS::Profiler::willExecute): Call shouldExcludeFunction and return
early if if returns true.
(KJS::Profiler::didExecute): Ditto.
- 6:57 AM Changeset in webkit [33927] by
-
- 10 edits3 adds1 delete in trunk/WebCore
Adds a DataGrid object that is used for multi-column data
and can contain hierarchical content with disclosure arrows.
A lot of DataGrid was copied from treeoutline.js. This change
makes the database views use the DataGrid. It will later be
used by the ProfileView.
Reviewed by Adam Roben.
- page/inspector/DataGrid.js: Added. Most copied from treeoutline.js
and modified to work with table elements.
- page/inspector/DatabaseQueryView.js:
(WebInspector.DatabaseQueryView.prototype._queryFinished):
Call DatabasesPanel.dataGridForResult and adds the inline style to
the DataGrid element.
- page/inspector/DatabaseTableView.js:
(WebInspector.DatabaseTableView.prototype._queryFinished):
Call DatabasesPanel.dataGridForResult.
- page/inspector/DatabasesPanel.js:
(WebInspector.DatabasesPanel.prototype._tableForResult): Removed.
(WebInspector.DatabasesPanel.prototype.dataGridForResult): Added.
Similar to the previous _tableForResult function, but makes a DataGrid.
- page/inspector/inspector.css: Changes to the data-grid
style rules.
- WebCore.vcproj/WebCore.vcproj: Add DataGrid.js.
- page/inspector/WebKit.qrc: Ditto.
- page/inspector/inspector.html: Ditto.
- 4:52 AM Changeset in webkit [33926] by
-
- 2 edits in trunk
2008-05-20 Jan Michael Alonzo <jmalonzo@webkit.org>
Reviewed by Alp.
http://bugs.webkit.org/show_bug.cgi?id=18483
[Gtk] Autotools should match build-webkit default flags
- configure.ac:
- 3:02 AM Changeset in webkit [33925] by
-
- 15 edits1 add in branches/squirrelfish/WebCore
2008-05-19 Maciej Stachowiak <mjs@apple.com>
Reviewed by Anders.
- inline asDOMWindow (using a new JSDOMWindowCustom.h header) since it is just a cast 1% speedup to SunSpider in-browser
- WebCore.vcproj/WebCore.vcproj:
- WebCore.xcodeproj/project.pbxproj:
- bindings/js/JSCustomVoidCallback.cpp:
- bindings/js/JSCustomXPathNSResolver.cpp:
- bindings/js/JSDOMApplicationCacheCustom.cpp:
- bindings/js/JSDOMWindowBase.cpp:
- bindings/js/JSDOMWindowBase.h:
- bindings/js/JSDOMWindowCustom.cpp:
- bindings/js/JSDOMWindowCustom.h: Added. (WebCore::asJSDOMWindow):
- bindings/js/JSDatabaseCustom.cpp:
- bindings/js/JSDocumentCustom.cpp:
- bindings/js/JSLocationCustom.cpp:
- bindings/js/JSSQLTransactionCustom.cpp:
- bindings/js/JSXMLHttpRequestCustom.cpp:
- page/JavaScriptDebugServer.cpp:
- 2:44 AM Changeset in webkit [33924] by
-
- 2 edits in branches/squirrelfish/WebCore
2008-05-19 Maciej Stachowiak <mjs@apple.com>
Reviewed by Oliver.
- obtain current inner window of outer window in a more efficient way 1.6% speedup to SunSpider in-browser
- bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
- 2:35 AM Changeset in webkit [33923] by
-
- 3 edits in branches/squirrelfish/WebCore
2008-05-19 Maciej Stachowiak <mjs@apple.com>
Reviewed by Adam.
- make impl() method for JSWindow inline 0.6% speedup to SunSpider in-browser
- WebCore.base.exp: Remove now-inline symbol
- bindings/scripts/CodeGeneratorJS.pm: Make the codegen script inline impl() even for classes with a parent class.
- 12:59 AM Changeset in webkit [33922] by
-
- 3 edits in branches/squirrelfish/JavaScriptCore
2008-05-20 Maciej Stachowiak <mjs@apple.com>
Reviewed by Oliver.
- inline JSGlobalObject::getOwnPropertySlot 1% improvement on in-browser SunSpider (a wash command-line)
- kjs/JSGlobalObject.cpp:
- kjs/JSGlobalObject.h: (KJS::JSGlobalObject::getOwnPropertySlot):
- 12:29 AM Changeset in webkit [33921] by
-
- 1 edit in trunk/WebKitTools/ChangeLog
fix changelog
May 19, 2008:
- 11:58 PM Changeset in webkit [33920] by
-
- 3 edits3 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 Maciej
Handle exceptions thrown by toString conversion in subscript operators,
this should basically complete exception handling in SquirrelFish.
Sunspider reports no regression.
- 11:58 PM Changeset in webkit [33919] by
-
- 6 edits in branches/squirrelfish
2008-05-17 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Oliver.
Bug 18991: SquirrelFish: Major codegen issue in a.b=expr, a[b]=expr
<https://bugs.webkit.org/show_bug.cgi?id=18991>
Fix the last remaining blocking cases of this bug.
- kjs/grammar.y:
- kjs/nodes.cpp: (KJS::ReadModifyResolveNode::emitCode):
LayoutTests:
- fast/js/codegen-temporaries-expected.txt:
- fast/js/resources/codegen-temporaries.js:
- 11:58 PM Changeset in webkit [33918] by
-
- 21 edits1 copy3 adds in branches/squirrelfish
2008-05-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Behold: debugging.
SunSpider reports no change.
- JavaScriptCore.xcodeproj/project.pbxproj: Added DebuggerCallFrame.h/.cpp, and created a debugger folder.
- VM/CodeGenerator.cpp: (KJS::CodeGenerator::generate): If the debugger is attached, always generate full scope chains for its sake.
- VM/Machine.cpp: (KJS::Machine::unwindCallFrame): Notify the debugger when unwinding due to an exception, so it doesn't keep stale call frames around.
(KJS::Machine::execute): Set Callee to 0 in eval frames, so the
debugger can distinguish them from function call frames.
(KJS::Machine::debug): Simplified this function, since the debugger
doesn't actually need all the information we used to provide.
(KJS::Machine::privateExecute): Treat debugging hooks like other function
calls, so the code we hook into (the debugger UI) can be optimized.
- kjs/debugger.cpp: Nixed these default callback implementations and made the callbacks pure virtual instead, so the compiler could tell me if I made a mistake in one of the subclasses.
- kjs/debugger.h: Removed a bunch of irrelevent data from the debugger callbacks. Changed from passing an ExecState* to passing a DebuggerCallFrame*, since an ExecState* doesn't contain sufficient information anymore.
- kjs/function.cpp: (KJS::globalFuncEval): Easiest bug fix evar!
WebCore:
2008-05-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Updated for API changes in KJS::Debugger.
WebKit/mac:
2008-05-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Re-enabled previously disabled debugging functionality.
There are two major changes from how the WebKit debugger used to work:
(1) All the interesting bits are implemented down in JavaScriptCore. The
debugger just calls through to KJS::DebuggerCallFrame for everything.
(2) Instead of copyihng a pointer to an ExecState once, the debugger
copies the DebuggerCallFrame passed to it in each callback. This is
because the VM no longer maintains a fully transparent execution state
to which you can hold a pointer, and the DebuggerCallFrames it vends
are temporaries.
Also, we NULL out a WebScriptCallFrame's DebuggerCallFrame upon return
from its function. This is safer than the old method, which was to
hold a stale ExecState* and hope for the best.
- 11:58 PM Changeset in webkit [33917] by
-
- 10 edits in branches/squirrelfish
2008-05-17 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Oliver.
Bug 18991: SquirrelFish: Major codegen issue in a.b=expr, a[b]=expr
<https://bugs.webkit.org/show_bug.cgi?id=18991>
Ensure that the code generated for assignments uses temporaries whenever
necessary. This patch covers the vast majority of situations, but there
are still a few left.
This patch also adds some missing cases to CodeBlock::dump().
- VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
- VM/CodeGenerator.h: (KJS::CodeGenerator::destinationForAssignResult): (KJS::CodeGenerator::leftHandSideNeedsCopy): (KJS::CodeGenerator::emitNodeForLeftHandSide):
- kjs/NodeInfo.h:
- kjs/grammar.y:
- kjs/nodes.cpp: (KJS::AssignDotNode::emitCode): (KJS::ReadModifyDotNode::emitCode): (KJS::AssignBracketNode::emitCode): (KJS::ReadModifyBracketNode::emitCode): (KJS::ForInNode::ForInNode):
- kjs/nodes.h: (KJS::ReadModifyResolveNode::): (KJS::AssignResolveNode::): (KJS::ReadModifyBracketNode::): (KJS::AssignBracketNode::): (KJS::AssignDotNode::): (KJS::ReadModifyDotNode::):
LayoutTests:
- fast/js/codegen-temporaries-expected.txt:
- fast/js/resources/codegen-temporaries.js:
- 11:58 PM Changeset in webkit [33916] by
-
- 1 edit2 adds in branches/squirrelfish/LayoutTests
Forgot to check in the results to the activation gc tests
- 11:58 PM Changeset in webkit [33915] by
-
- 3 edits4 adds in branches/squirrelfish
Bug 19106: SquirrelFish: Activation is not marked correctly
<https://bugs.webkit.org/show_bug.cgi?id=19106>
Reviewed by Maciej
We can't rely on the symbol table for a count of the number of globals
we need to mark as that misses duplicate parameters and 'this'. Now we
use the actual local register count from the codeBlock.
- 11:57 PM Changeset in webkit [33914] by
-
- 9 edits2 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.
- 11:57 PM Changeset in webkit [33913] by
-
- 3 edits3 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.
- 11:57 PM Changeset in webkit [33912] by
-
- 3 edits6 adds in branches/squirrelfish
2008-05-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Oliver.
- fixed Bug 19044: SquirrelFish: Bogus values enter evaluation when closing over scope with parameter and var with same name https://bugs.webkit.org/show_bug.cgi?id=19044
- 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.
- fixed Bug 19044: SquirrelFish: Bogus values enter evaluation when closing over scope with parameter and var with same name https://bugs.webkit.org/show_bug.cgi?id=19044
- 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.
- 11:57 PM Changeset in webkit [33911] by
-
- 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
- 11:57 PM Changeset in webkit [33910] by
-
- 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.
- 11:57 PM Changeset in webkit [33909] by
-
- 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.
- 11:57 PM Changeset in webkit [33908] by
-
- 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:57 PM Changeset in webkit [33907] by
-
- 6 edits2 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.
- 11:57 PM Changeset in webkit [33906] by
-
- 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
- 11:57 PM Changeset in webkit [33905] by
-
- 3 edits2 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.
- 11:57 PM Changeset in webkit [33904] by
-
- 3 edits1 copy2 adds in branches/squirrelfish/LayoutTests
Split the binops tests up a bit more
RS=Geoff
- 11:57 PM Changeset in webkit [33903] by
-
- 4 edits2 adds in branches/squirrelfish
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.
- 11:57 PM Changeset in webkit [33902] by
-
- 3 edits1 copy1 add in branches/squirrelfish/LayoutTests
Splitting exception sequencing test as it was too long and made DRT unhappy
on non-MacPros.
RS=Geoff
- 11:57 PM Changeset in webkit [33901] by
-
- 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.
- 11:57 PM Changeset in webkit [33900] by
-
- 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.
- 11:57 PM Changeset in webkit [33899] by
-
- 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.
- 11:57 PM Changeset in webkit [33898] by
-
- 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:
- 11:57 PM Changeset in webkit [33897] by
-
- 12 edits in branches/squirrelfish
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.
- 11:57 PM Changeset in webkit [33896] by
-
- 5 edits2 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.
- 11:57 PM Changeset in webkit [33895] by
-
- 27 edits in branches/squirrelfish
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:
- 11:56 PM Changeset in webkit [33894] by
-
- 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:
- 11:56 PM Changeset in webkit [33893] by
-
- 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.
- 11:56 PM Changeset in webkit [33892] by
-
- 5 edits3 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:56 PM Changeset in webkit [33891] by
-
- 5 edits2 adds in branches/squirrelfish
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:56 PM Changeset in webkit [33890] by
-
- 3 edits3 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:56 PM Changeset in webkit [33889] by
-
- 1 edit1 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:56 PM Changeset in webkit [33888] by
-
- 38 edits3 copies in branches/squirrelfish
2008-05-10 Maciej Stachowiak <mjs@apple.com>
Reviewed by Oliver.
- JavaScriptCore part of fix for: "SQUIRRELFISH: function toString broken after calling" https://bugs.webkit.org/show_bug.cgi?id=18869
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.
- JavaScriptGlue part of fix for: "SQUIRRELFISH: function toString broken after calling" https://bugs.webkit.org/show_bug.cgi?id=18869
- 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.
- JavaScriptGlue part of fix for: "SQUIRRELFISH: function toString broken after calling" https://bugs.webkit.org/show_bug.cgi?id=18869
- 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.
- test changes for: "SQUIRRELFISH: function toString broken after calling" https://bugs.webkit.org/show_bug.cgi?id=18869
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:56 PM Changeset in webkit [33887] by
-
- 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:56 PM Changeset in webkit [33886] by
-
- 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:56 PM Changeset in webkit [33885] by
-
- 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog
Debug build fix
No reviewer
- 11:56 PM Changeset in webkit [33884] by
-
- 11 edits in branches/squirrelfish
Build fixes for SquirrelFish on windows.
Reviewed by Geoff
- 11:56 PM Changeset in webkit [33883] by
-
- 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:56 PM Changeset in webkit [33882] by
-
- 1 edit1 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:56 PM Changeset in webkit [33881] by
-
- 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:56 PM Changeset in webkit [33880] by
-
- 3 edits2 adds in branches/squirrelfish
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:56 PM Changeset in webkit [33879] by
-
- 4 edits4 adds in branches/squirrelfish
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:56 PM Changeset in webkit [33878] by
-
- 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:56 PM Changeset in webkit [33877] by
-
- 2 edits2 moves6 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:56 PM Changeset in webkit [33876] by
-
- 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:55 PM Changeset in webkit [33875] by
-
- 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:55 PM Changeset in webkit [33874] by
-
- 13 edits2 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:55 PM Changeset in webkit [33873] by
-
- 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:55 PM Changeset in webkit [33872] by
-
- 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:55 PM Changeset in webkit [33871] by
-
- 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:55 PM Changeset in webkit [33870] by
-
- 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:54 PM Changeset in webkit [33869] by
-
- 4 edits in branches/squirrelfish/JavaScriptCore
2008-05-06 Maciej Stachowiak <mjs@apple.com>
Reviewed by Oliver.
- fixed "SQUIRRELFISH: window.this shows up as a property, but it shouldn't" https://bugs.webkit.org/show_bug.cgi?id=18868
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:54 PM Changeset in webkit [33868] by
-
- 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:54 PM Changeset in webkit [33867] by
-
- 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.
- JavaScriptCore.exp:
- 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:54 PM Changeset in webkit [33866] by
-
- 2 edits in branches/squirrelfish/JavaScriptCore
Fix call frame set up for native -> JS function calls.
Review by Geoff
- 11:54 PM Changeset in webkit [33865] by
-
- 8 edits2 adds in branches/squirrelfish
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:54 PM Changeset in webkit [33864] by
-
- 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:54 PM Changeset in webkit [33863] by
-
- 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:54 PM Changeset in webkit [33862] by
-
- 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:54 PM Changeset in webkit [33861] by
-
- 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:54 PM Changeset in webkit [33860] by
-
- 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:54 PM Changeset in webkit [33859] by
-
- 2 edits in branches/squirrelfish/JavaScriptCore
Whoops, correctly handle properties that don't exist in the
symbol table.
Reviewed by Geoff
- 11:54 PM Changeset in webkit [33858] by
-
- 7 edits in branches/squirrelfish/JavaScriptCore
Add attribute information to SymbolTable as ground work for
various DontEnum and ReadOnly issues.
Reviewed by Geoff
- 11:54 PM Changeset in webkit [33857] by
-
- 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:54 PM Changeset in webkit [33856] by
-
- 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:54 PM Changeset in webkit [33855] by
-
- 3 edits3 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:54 PM Changeset in webkit [33854] by
-
- 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:54 PM Changeset in webkit [33853] by
-
- 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:54 PM Changeset in webkit [33852] by
-
- 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:54 PM Changeset in webkit [33851] by
-
- 2 edits2 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:54 PM Changeset in webkit [33850] by
-
- 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:54 PM Changeset in webkit [33849] by
-
- 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:53 PM Changeset in webkit [33848] by
-
- 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:53 PM Changeset in webkit [33847] by
-
- 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:53 PM Changeset in webkit [33846] by
-
- 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:53 PM Changeset in webkit [33845] by
-
- 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:53 PM Changeset in webkit [33844] by
-
- 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.
- JavaScriptCore.xcodeproj/project.pbxproj:
- kjs/AllInOneFile.cpp:
- 11:53 PM Changeset in webkit [33843] by
-
- 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:53 PM Changeset in webkit [33842] by
-
- 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:53 PM Changeset in webkit [33841] by
-
- 4 edits in branches/squirrelfish/JavaScriptCore
Rename unsafeForReentry to safeForReentry to avoid double negatives.
RS=Geoff
- 11:53 PM Changeset in webkit [33840] by
-
- 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:53 PM Changeset in webkit [33839] by
-
- 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:53 PM Changeset in webkit [33838] by
-
- 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:53 PM Changeset in webkit [33837] by
-
- 2 edits in branches/squirrelfish/JavaScriptCore
2008-04-30 Geoffrey Garen <ggaren@apple.com>
Fixed tyop.
- kjs/ExecState.h:
- 11:53 PM Changeset in webkit [33836] by
-
- 2 edits in branches/squirrelfish/JavaScriptCore
2008-04-30 Geoffrey Garen <ggaren@apple.com>
Debug build fix: export a missing symbol.
- JavaScriptCore.exp:
- 11:53 PM Changeset in webkit [33835] by
-
- 6 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:53 PM Changeset in webkit [33834] by
-
- 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:53 PM Changeset in webkit [33833] by
-
- 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:53 PM Changeset in webkit [33832] by
-
- 2 edits in branches/squirrelfish/JavaScriptCore
2008-04-30 Geoffrey Garen <ggaren@apple.com>
WebCore build fix: forward-declare ScopeChain.
- kjs/interpreter.h:
- 11:53 PM Changeset in webkit [33831] by
-
- 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:53 PM Changeset in webkit [33830] by
-
- 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:53 PM Changeset in webkit [33829] by
-
- 2 edits in branches/squirrelfish/JavaScriptCore
2008-04-30 Geoffrey Garen <ggaren@apple.com>
Build fix for JavaScriptGlue: export a missing symbol.
- JavaScriptCore.exp:
- 11:53 PM Changeset in webkit [33828] by
-
- 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:53 PM Changeset in webkit [33827] by
-
- 24 edits2 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:53 PM Changeset in webkit [33826] by
-
- 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:52 PM Changeset in webkit [33825] by
-
- 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:52 PM Changeset in webkit [33824] by
-
- 2 edits in branches/squirrelfish/JavaScriptCore
Restore base pointer when popping a global RegisterFile
Reviewed by Geoff
- 11:52 PM Changeset in webkit [33823] by
-
- 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:52 PM Changeset in webkit [33822] by
-
- 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:52 PM Changeset in webkit [33821] by
-
- 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:52 PM Changeset in webkit [33820] by
-
- 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:52 PM Changeset in webkit [33819] by
-
- 3 edits in branches/squirrelfish/JavaScriptCore
Replace unsafe use of auto_ptr in Vector with manual memory
management.
Reviewed by Geoff
- 11:52 PM Changeset in webkit [33818] by
-
- 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:52 PM Changeset in webkit [33817] by
-
- 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:52 PM Changeset in webkit [33816] by
-
- 9 edits2 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:52 PM Changeset in webkit [33815] by
-
- 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog
Fix the changelog
- 11:52 PM Changeset in webkit [33814] by
-
- 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:52 PM Changeset in webkit [33813] by
-
- 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:52 PM Changeset in webkit [33812] by
-
- 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:52 PM Changeset in webkit [33811] by
-
- 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog
Fixing the ChangeLog
- 11:52 PM Changeset in webkit [33810] by
-
- 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:52 PM Changeset in webkit [33809] by
-
- 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:52 PM Changeset in webkit [33808] by
-
- 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:52 PM Changeset in webkit [33807] by
-
- 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:52 PM Changeset in webkit [33806] by
-
- 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:52 PM Changeset in webkit [33805] by
-
- 5 edits in branches/squirrelfish/JavaScriptCore
2008-04-24 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Added support for arguments.callee.
- 11:52 PM Changeset in webkit [33804] by
-
- 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:52 PM Changeset in webkit [33803] by
-
- 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog
Fixed up ChangeLog
- 11:52 PM Changeset in webkit [33802] by
-
- 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:51 PM Changeset in webkit [33801] by
-
- 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:51 PM Changeset in webkit [33800] by
-
- 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:51 PM Changeset in webkit [33799] by
-
- 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:51 PM Changeset in webkit [33798] by
-
- 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:51 PM Changeset in webkit [33797] by
-
- 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:51 PM Changeset in webkit [33796] by
-
- 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:51 PM Changeset in webkit [33795] by
-
- 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:51 PM Changeset in webkit [33794] by
-
- 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:51 PM Changeset in webkit [33793] by
-
- 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:51 PM Changeset in webkit [33792] by
-
- 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:51 PM Changeset in webkit [33791] by
-
- 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:51 PM Changeset in webkit [33790] by
-
- 4 edits1 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:51 PM Changeset in webkit [33789] by
-
- 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:51 PM Changeset in webkit [33788] by
-
- 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:51 PM Changeset in webkit [33787] by
-
- 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:51 PM Changeset in webkit [33786] by
-
- 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:51 PM Changeset in webkit [33785] by
-
- 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:51 PM Changeset in webkit [33784] by
-
- 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:51 PM Changeset in webkit [33783] by
-
- 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:51 PM Changeset in webkit [33782] by
-
- 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog
Fixed ChangeLog
- 11:51 PM Changeset in webkit [33781] by
-
- 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:51 PM Changeset in webkit [33780] by
-
- 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:51 PM Changeset in webkit [33779] by
-
- 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:50 PM Changeset in webkit [33778] by
-
- 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:50 PM Changeset in webkit [33777] by
-
- 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:50 PM Changeset in webkit [33776] by
-
- 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:50 PM Changeset in webkit [33775] by
-
- 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:50 PM Changeset in webkit [33774] by
-
- 2 edits in branches/squirrelfish/WebKit/mac
2008-04-21 Geoffrey Garen <ggaren@apple.com>
Build fix.
- ChangeLog:
- WebView/WebScriptDebugDelegate.mm: (-[WebScriptCallFrame scopeChain]):
- 11:50 PM Changeset in webkit [33773] by
-
- 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.
- 11:50 PM Changeset in webkit [33772] by
-
- 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):
- 11:50 PM Changeset in webkit [33771] by
-
- 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.
- 11:50 PM Changeset in webkit [33770] by
-
- 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.
- 11:50 PM Changeset in webkit [33769] by
-
- 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.
- 11:50 PM Changeset in webkit [33768] by
-
- 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.
- 11:50 PM Changeset in webkit [33767] by
-
- 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):
- 11:50 PM Changeset in webkit [33766] by
-
- 2 edits in branches/squirrelfish/JavaScriptCore
Fix debug build
- 11:50 PM Changeset in webkit [33765] by
-
- 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.
- 11:50 PM Changeset in webkit [33764] by
-
- 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.
- 11:50 PM Changeset in webkit [33763] by
-
- 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog
Fixed reviewer named in old commit message
- 11:50 PM Changeset in webkit [33762] by
-
- 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.
- 11:50 PM Changeset in webkit [33761] by
-
- 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.
- 11:50 PM Changeset in webkit [33760] by
-
- 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.
- 11:50 PM Changeset in webkit [33759] by
-
- 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.
- 11:50 PM Changeset in webkit [33758] by
-
- 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):
- 11:50 PM Changeset in webkit [33757] by
-
- 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):
- 11:50 PM Changeset in webkit [33756] by
-
- 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::):
- 11:49 PM Changeset in webkit [33755] by
-
- 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
- 11:49 PM Changeset in webkit [33754] by
-
- 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.
- 11:49 PM Changeset in webkit [33753] by
-
- 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.
- 11:49 PM Changeset in webkit [33752] by
-
- 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:
- 11:49 PM Changeset in webkit [33751] by
-
- 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*.
- 11:49 PM Changeset in webkit [33750] by
-
- 5 edits in trunk/WebKitTools
2008-05-19 Stephanie Lewis <Stephanie Lewis>
Explicitly set run mode to 32bit unless overridden to avoid
confusion when running tests
- Scripts/build-dumprendertree:
- Scripts/gdb-safari:
- Scripts/run-webkit-tests:
- Scripts/webkitdirs.pm:
- 11:49 PM Changeset in webkit [33749] by
-
- 4 edits in branches/squirrelfish/JavaScriptCore
Provide "sourceURL" in exceptions
Reviewed by Maciej
- 11:49 PM Changeset in webkit [33748] by
-
- 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.
- 11:49 PM Changeset in webkit [33747] by
-
- 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.
- 11:49 PM Changeset in webkit [33746] by
-
- 2 edits in branches/squirrelfish/JavaScriptCore
Remove unnecessary files from testkjs, testapi and minidom targets.
Rubber-stamped by Oliver Hunt.
- JavaScriptCore.xcodeproj/project.pbxproj:
- 11:49 PM Changeset in webkit [33745] by
-
- 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.
- 11:49 PM Changeset in webkit [33744] by
-
- 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:
- 11:49 PM Changeset in webkit [33743] by
-
- 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.
- 11:49 PM Changeset in webkit [33742] by
-
- 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.
- 11:49 PM Changeset in webkit [33741] by
-
- 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):
- 11:49 PM Changeset in webkit [33740] by
-
- 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):
- 11:49 PM Changeset in webkit [33739] by
-
- 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):
- 11:49 PM Changeset in webkit [33738] by
-
- 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).
- 11:49 PM Changeset in webkit [33737] by
-
- 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::):
- 11:49 PM Changeset in webkit [33736] by
-
- 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):
- 11:49 PM Changeset in webkit [33735] by
-
- 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.
- 11:49 PM Changeset in webkit [33734] by
-
- 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):
- 11:49 PM Changeset in webkit [33733] by
-
- 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.
- 11:48 PM Changeset in webkit [33732] by
-
- 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.
- 11:48 PM Changeset in webkit [33731] by
-
- 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
- 11:48 PM Changeset in webkit [33730] by
-
- 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.
- 11:48 PM Changeset in webkit [33729] by
-
- 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):
- 11:48 PM Changeset in webkit [33728] by
-
- 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.
- 11:48 PM Changeset in webkit [33727] by
-
- 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:
- 11:48 PM Changeset in webkit [33726] by
-
- 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.
- 11:48 PM Changeset in webkit [33725] by
-
- 8 edits in branches/squirrelfish/JavaScriptCore
2008-04-15 Maciej Stachowiak <mjs@apple.com>
Reviewed by Oliver.
- fixed "SquirrelFish crashes due to bad scope chain on some SunSpider tests" https://bugs.webkit.org/show_bug.cgi?id=18508
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):
- 11:48 PM Changeset in webkit [33724] by
-
- 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.
- 11:48 PM Changeset in webkit [33723] by
-
- 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):
- 11:48 PM Changeset in webkit [33722] by
-
- 1 edit8 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.
- 11:48 PM Changeset in webkit [33721] by
-
- 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:
- 11:48 PM Changeset in webkit [33720] by
-
- 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.
- 11:48 PM Changeset in webkit [33719] by
-
- 12 edits in branches/squirrelfish
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>
- WebCore.pro: Add JavaScriptCore/VM into include path
- 11:48 PM Changeset in webkit [33718] by
-
- 3 edits1 add7 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
- 11:48 PM Changeset in webkit [33717] by
-
- 1 edit1 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.
- 11:48 PM Changeset in webkit [33716] by
-
- 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.
- 11:48 PM Changeset in webkit [33715] by
-
- 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.
- 11:48 PM Changeset in webkit [33714] by
-
- 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:
- 11:48 PM Changeset in webkit [33713] by
-
- 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.
- 11:48 PM Changeset in webkit [33712] by
-
- 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.
- 11:48 PM Changeset in webkit [33711] by
-
- 2 edits in branches/squirrelfish/JavaScriptCore
2008-04-10 Geoffrey Garen <ggaren@apple.com>
This time for sure.
- kjs/interpreter.cpp: (KJS::Interpreter::evaluate):
- 11:48 PM Changeset in webkit [33710] by
-
- 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):
- 11:48 PM Changeset in webkit [33709] by
-
- 2 edits in branches/squirrelfish/JavaScriptCore
Fix SquirrelFish interpreter to pass internal exceptions back to
native code correctly.
Reviewed by Geoff
- 11:47 PM Changeset in webkit [33708] by
-
- 49 edits1 copy1 add in branches/squirrelfish
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.
- 11:47 PM Changeset in webkit [33707] by
-
- 4 edits4 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.
- 11:47 PM Changeset in webkit [33706] by
-
- 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):
- 11:47 PM Changeset in webkit [33705] by
-
- 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.
- 11:47 PM Changeset in webkit [33704] by
-
- 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):
- 11:47 PM Changeset in webkit [33703] by
-
- 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):
- 11:47 PM Changeset in webkit [33702] by
-
- 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:
- 11:47 PM Changeset in webkit [33701] by
-
- 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):
- 11:47 PM Changeset in webkit [33700] by
-
- 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::):
- 11:47 PM Changeset in webkit [33699] by
-
- 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):
- 11:47 PM Changeset in webkit [33698] by
-
- 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::):
- 11:47 PM Changeset in webkit [33697] by
-
- 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):
- 11:47 PM Changeset in webkit [33696] by
-
- 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):
- 11:47 PM Changeset in webkit [33695] by
-
- 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):
- 11:47 PM Changeset in webkit [33694] by
-
- 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):
- 11:47 PM Changeset in webkit [33693] by
-
- 11 edits2 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.
- 11:47 PM Changeset in webkit [33692] by
-
- 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):
- 11:47 PM Changeset in webkit [33691] by
-
- 3 edits1 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:
- 11:47 PM Changeset in webkit [33690] by
-
- 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog
fix changelog, bokay?
- 11:47 PM Changeset in webkit [33689] by
-
- 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):
- 11:47 PM Changeset in webkit [33688] by
-
- 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.
- 11:47 PM Changeset in webkit [33687] by
-
- 12 edits2 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.
- 11:47 PM Changeset in webkit [33686] by
-
- 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.
- 11:46 PM Changeset in webkit [33685] by
-
- 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.
- 11:46 PM Changeset in webkit [33684] by
-
- 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:
- 11:46 PM Changeset in webkit [33683] by
-
- 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:
- 11:46 PM Changeset in webkit [33682] by
-
- 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:
- 11:46 PM Changeset in webkit [33681] by
-
- 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
- 11:46 PM Changeset in webkit [33680] by
-
- 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.
- 11:46 PM Changeset in webkit [33679] by
-
- 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog
Fix ChangeLog
- 11:46 PM Changeset in webkit [33678] by
-
- 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:
- 11:46 PM Changeset in webkit [33677] by
-
- 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:
- 11:46 PM Changeset in webkit [33676] by
-
- 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::):
- 11:46 PM Changeset in webkit [33675] by
-
- 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:
- 11:46 PM Changeset in webkit [33674] by
-
- 1 edit in branches/squirrelfish/JavaScriptCore/kjs/nodes.h
File I forgot in my last commit.
- 11:46 PM Changeset in webkit [33673] by
-
- 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:
- 11:46 PM Changeset in webkit [33672] by
-
- 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):
- 11:46 PM Changeset in webkit [33671] by
-
- 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).
- 11:46 PM Changeset in webkit [33670] by
-
- 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):
- 11:46 PM Changeset in webkit [33669] by
-
- 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):
- 11:46 PM Changeset in webkit [33668] by
-
- 1 edit in branches/squirrelfish/JavaScriptCore/ChangeLog
reverse order of last two ChangeLog entries (oops)
- 11:46 PM Changeset in webkit [33667] by
-
- 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):
- 11:46 PM Changeset in webkit [33666] by
-
- 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):
- 11:46 PM Changeset in webkit [33665] by
-
- 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".
- 11:46 PM Changeset in webkit [33664] by
-
- 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
- 11:46 PM Changeset in webkit [33663] by
-
- 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):
- 11:46 PM Changeset in webkit [33662] by
-
- 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:
- 11:45 PM Changeset in webkit [33661] by
-
- 12 edits1 copy1 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.
- 11:45 PM Changeset in webkit [33660] by
-
- 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):
- 11:45 PM Changeset in webkit [33659] by
-
- 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:
- 11:45 PM Changeset in webkit [33658] by
-
- 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):
- 11:45 PM Changeset in webkit [33657] by
-
- 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:
- 11:45 PM Changeset in webkit [33656] by
-
- 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.
- 11:45 PM Changeset in webkit [33655] by
-
- 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):
- 11:45 PM Changeset in webkit [33654] by
-
- 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):
- 11:45 PM Changeset in webkit [33653] by
-
- 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):
- 11:45 PM Changeset in webkit [33652] by
-
- 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:
- 11:45 PM Changeset in webkit [33651] by
-
- 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):
- 11:45 PM Changeset in webkit [33650] by
-
- 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:
- 11:45 PM Changeset in webkit [33649] by
-
- 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):
- 11:45 PM Changeset in webkit [33648] by
-
- 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:
- 11:45 PM Changeset in webkit [33647] by
-
- 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):
- 11:45 PM Changeset in webkit [33646] by
-
- 8 edits in branches/squirrelfish/JavaScriptCore
2008-03-31 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej Stachowiak.
Added op_post_dec.
- 11:45 PM Changeset in webkit [33645] by
-
- 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:
- 11:45 PM Changeset in webkit [33644] by
-
- 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):
- 11:45 PM Changeset in webkit [33643] by
-
- 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.
- 11:45 PM Changeset in webkit [33642] by
-
- 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):
- 11:45 PM Changeset in webkit [33641] by
-
- 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):
- 11:45 PM Changeset in webkit [33640] by
-
- 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:
- 11:45 PM Changeset in webkit [33639] by
-
- 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):
- 11:45 PM Changeset in webkit [33638] by
-
- 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:
- 11:45 PM Changeset in webkit [33637] by
-
- 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.
- 11:44 PM Changeset in webkit [33636] by
-
- 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:
- 11:44 PM Changeset in webkit [33635] by
-
- 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):
- 11:44 PM Changeset in webkit [33634] by
-
- 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):
- 11:44 PM Changeset in webkit [33633] by
-
- 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):
- 11:44 PM Changeset in webkit [33632] by
-
- 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).
- 11:44 PM Changeset in webkit [33631] by
-
- 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:
- 11:44 PM Changeset in webkit [33630] by
-
- 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:
- 11:44 PM Changeset in webkit [33629] by
-
- 27 edits6 adds in branches/squirrelfish
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.
- 11:44 PM Changeset in webkit [33628] by
-
- 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):
- 11:44 PM Changeset in webkit [33627] by
-
- 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):
- 11:44 PM Changeset in webkit [33626] by
-
- 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:
- 11:44 PM Changeset in webkit [33625] by
-
- 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:
- 11:44 PM Changeset in webkit [33624] by
-
- 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:
- 11:44 PM Changeset in webkit [33623] by
-
- 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.
- 11:44 PM Changeset in webkit [33622] by
-
- 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.
- 11:44 PM Changeset in webkit [33621] by
-
- 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:
- 11:44 PM Changeset in webkit [33620] by
-
- 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.
- 11:44 PM Changeset in webkit [33619] by
-
- 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:
- 11:44 PM Changeset in webkit [33618] by
-
- 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)
- 11:44 PM Changeset in webkit [33617] by
-
- 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:
- 11:44 PM Changeset in webkit [33616] by
-
- 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:
- 11:43 PM Changeset in webkit [33615] by
-
- 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):
- 11:43 PM Changeset in webkit [33614] by
-
- 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):
- 11:43 PM Changeset in webkit [33613] by
-
- 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:
- 11:43 PM Changeset in webkit [33612] by
-
- 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.
- 11:43 PM Changeset in webkit [33611] by
-
- 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:
- 11:43 PM Changeset in webkit [33610] by
-
- 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):
- 11:43 PM Changeset in webkit [33609] by
-
- 5 edits9 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:
- 11:43 PM Changeset in webkit [33608] by
-
- 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:
- 11:43 PM Changeset in webkit [33607] by
-
- 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):
- 11:43 PM Changeset in webkit [33606] by
-
- 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.
- JavaScriptCore.xcodeproj/project.pbxproj:
- 11:43 PM Changeset in webkit [33605] by
-
- 11 edits2 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.
- 11:43 PM Changeset in webkit [33604] by
-
- 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:
- 11:43 PM Changeset in webkit [33603] by
-
- 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.
- 11:43 PM Changeset in webkit [33602] by
-
- 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:
- 11:43 PM Changeset in webkit [33601] by
-
- 9 edits10 copies7 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.
- 11:31 PM Changeset in webkit [33600] by
-
- 1 copy in branches/squirrelfish
Re-create squirrelfish branch.
- 11:28 PM Changeset in webkit [33599] by
-
- 1 move in branches/old/squirrelfish-2008-05-19
Move aside squirrelfish branch in prepration for rebasing it on trunk.
- 9:00 PM Changeset in webkit [33598] by
-
- 2 edits in trunk/WebKit/win
Make WebKit.idl rebuild whenever any of its included interfaces are changed
Reviewed by Tim Hatcher.
- WebKit.vcproj/DerivedSources.make: Touch WebKit.idl whenever any other IDL file is changed. This will force VS to rebuild WebKit.idl.
- 8:42 PM Changeset in webkit [33597] by
-
- 4 edits in trunk/LayoutTests
Reviewed by Adam Roben.
- update test results following <http://trac.webkit.org/changeset/33395>
- platform/mac/fast/frames/viewsource-attribute-expected.checksum:
- platform/mac/fast/frames/viewsource-attribute-expected.png:
- platform/mac/fast/frames/viewsource-attribute-expected.txt:
- 8:31 PM Changeset in webkit [33596] by
-
- 5 edits in trunk/JavaScriptCore
2008-05-19 Kevin McCullough <kmccullough@apple.com>
Reviewed by Tim.
<rdar://problem/5770054> JavaScript profiler (10928)
- Implement sorting by function name.
- JavaScriptCore.exp:
- profiler/Profile.h: (KJS::Profile::sortFileNameDescending): (KJS::Profile::sortFileNameAscending):
- profiler/ProfileNode.cpp: (KJS::fileNameDescendingComparator): (KJS::ProfileNode::sortFileNameDescending): (KJS::fileNameAscendingComparator): (KJS::ProfileNode::sortFileNameAscending):
- profiler/ProfileNode.h:
- 8:23 PM Changeset in webkit [33595] by
-
- 5 edits in trunk/WebCore
2008-05-19 Kevin McCullough <kmccullough@apple.com>
Reviewed by Adam.
-build fix.
- bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::profile):
- page/Console.cpp: (WebCore::Console::profile):
- page/Console.h:
- page/Console.idl:
- 8:19 PM Changeset in webkit [33594] by
-
- 2 edits in trunk/WebCore
2008-05-19 Alp Toker <alp@nuanti.com>
Reviewed by Maciej.
GTK+/soup fixes:
Remove the fragment part of the URL since the file backend doesn't
deal with it.
Fix a typo in the cleanup function.
- platform/network/soup/ResourceHandleSoup.cpp: (WebCore::cleanupGioOperation): (WebCore::ResourceHandle::startGio):
- 7:03 PM Changeset in webkit [33593] by
-
- 8 edits in trunk
2008-05-19 Kevin McCullough <kmccullough@apple.com>
Reviewed by Adam.
<rdar://problem/5770054> JavaScript profiler (10928)
- Pass the exec state to profiler when calling startProfiling so that if profiling is started within an execution context that location is recorded correctly.
- JavaScriptCore.exp:
- profiler/ProfileNode.cpp: (KJS::ProfileNode::printDataInspectorStyle): Dump more info for debugging purposes.
- profiler/Profiler.cpp: (KJS::Profiler::startProfiling):
- profiler/Profiler.h:
WebCore:
2008-05-19 Kevin McCullough <kmccullough@apple.com>
Reviewed by Adam.
<rdar://problem/5770054> JavaScript profiler (10928)
- Send the executing context to the profiler so it can attribute time correctly to parent functions when calling profile() and profileEnd() while nested.
- page/Console.cpp: (WebCore::Console::profile): (WebCore::Console::profileEnd):
- page/Console.h:
- 6:14 PM Changeset in webkit [33592] by
-
- 2 edits in trunk/JavaScriptCore
2008-05-19 Kevin McCullough <kmccullough@apple.com>
Rubberstamped by Geoff.
Turn off the profiler because it is a performance regression.
- kjs/config.h:
- 6:12 PM Changeset in webkit [33591] by
-
- 8 edits3 adds in trunk
2008-05-19 Alp Toker <alp@nuanti.com>
Reviewed by Anders and Beth.
http://bugs.webkit.org/show_bug.cgi?id=16495
[GTK] Accessibility support with ATK/AT-SPI
Initial ATK/AT-SPI accessibility support for the GTK+ port.
- 5:46 PM Changeset in webkit [33590] by
-
- 5 edits1 add in trunk
WebCore:
2008-05-19 Anders Carlsson <andersca@apple.com>
Reviewed by Adam.
<rdar://problem/5946454>
Support navigator.onLine from HTML5.
Add Windows NetworkStateNotifier implementation using the IP Helper API.
- WebCore.vcproj/WebCore.vcproj:
- platform/network/NetworkStateNotifier.h: (WebCore::updateState):
- platform/network/win/NetworkStateNotifierWin.cpp: Added. (WebCore::NetworkStateNotifier::updateState): (WebCore::NetworkStateNotifier::addressChanged): (WebCore::NetworkStateNotifier::callAddressChanged): (WebCore::NetworkStateNotifier::addrChangeCallback): (WebCore::NetworkStateNotifier::registerForAddressChange): (WebCore::NetworkStateNotifier::NetworkStateNotifier):
WebKit/win:
2008-05-19 Anders Carlsson <andersca@apple.com>
Reviewed by Adam.
<rdar://problem/5946454>
Support navigator.onLine from HTML5.
Link with iphlpapi.lib, and make iphlpapi.dll a delay loaded library.
- WebKit.vcproj/WebKit.vcproj:
- 5:07 PM Changeset in webkit [33589] by
-
- 2 edits in tags/Safari-6526.6.2/WebCore
Merged fix from r33587.
- 5:02 PM Changeset in webkit [33588] by
-
- 1 copy in tags/Safari-6526.6.2
New tag.
- 5:00 PM Changeset in webkit [33587] by
-
- 2 edits in trunk/WebCore
Disable C4273, C4565 for CSSGrammar.cpp, XPathGrammar.cpp to fix build.
Reviewed by Adam Roben.
- WebCore.vcproj/WebCore.vcproj:
- 4:52 PM Changeset in webkit [33586] by
-
- 2 edits1 add in trunk/WebCore
Fix Bug 19065: Resources with a space in their URL don't get error/warning bubbles
Reviewed by Dan Bernstein.
Test: manual-tests/inspector/errors-with-space in-url.html
- manual-tests/inspector/errors-with-space in-url.html: Added.
- page/Console.cpp: (WebCore::Console::error): (WebCore::Console::info): (WebCore::Console::log): (WebCore::Console::warn): Pass the raw URL to the Inspector, not the pretty URL, to match the URL that was used when initially telling the Inspector about this resource. We continue to pass the pretty URL to the ChromeClient for backwards compatibility.
- 4:22 PM Changeset in webkit [33585] by
-
- 9 edits in trunk
2008-05-19 Stephanie Lewis <Stephanie Lewis>
Reviewed by Darin.
more fast teardown performance work
- Misc/WebDownload.m: (-[WebDownloadInternal downloadDidBegin:]): (-[WebDownloadInternal downloadDidFinish:]): (-[WebDownloadInternal download:didFailWithError:]):
- WebCoreSupport/WebChromeClient.h:
- WebCoreSupport/WebChromeClient.mm: (WebChromeClient::disableSuddenTermination): (WebChromeClient::enableSuddenTermination):
more fast teardown performance work, WebCore plumbing
- page/Chrome.cpp: (WebCore::Chrome::disableSuddenTermination): (WebCore::Chrome::enableSuddenTermination): (WebCore::ChromeClient::disableSuddenTermination): (WebCore::ChromeClient::enableSuddenTermination):
- page/Chrome.h:
- page/ChromeClient.h:
- page/Page.cpp: (WebCore::Page::changePendingUnloadEventCount): (WebCore::Page::changePendingBeforeUnloadEventCount):
- 4:06 PM Changeset in webkit [33584] by
-
- 3 edits in trunk
2008-05-19 Alp Toker <alp@nuanti.com>
GTK+ build fix for Mac/Win. Don't check for FreeType/FontConfig when
the Pango font backend is selected.
- GNUmakefile.am:
- configure.ac:
- 3:44 PM Changeset in webkit [33583] by
-
- 2 edits in trunk/WebCore
2008-05-19 Kuchhal <kuchal@yahoo.com>
Reviewed by Justin.
<rdar://problem/5863412> Crash when Ctrl C is pressed after a series of specific mouse events (18506)
- editing/markup.cpp: (WebCore::createMarkup): Null check.
- 3:17 PM Changeset in webkit [33582] by
-
- 2 edits in trunk/WebCore
<rdar://problem/5912195> CrashTracer: [USER] 1 crash in Mail at -[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]
- 3:15 PM Changeset in webkit [33581] by
-
- 5 edits in trunk/JavaScriptCore
2008-05-19 Kevin McCullough <kmccullough@apple.com>
Reviewed by Tim.
<rdar://problem/5770054> JavaScript profiler (10928)
-In an effort to make the profiler as efficient as possible instead of
prepending to a vector we keep the vector in reverse order and operate
over it backwards.
- profiler/Profile.cpp: (KJS::Profile::willExecute): (KJS::Profile::didExecute):
- profiler/ProfileNode.cpp: (KJS::ProfileNode::didExecute): (KJS::ProfileNode::endAndRecordCall):
- profiler/ProfileNode.h:
- profiler/Profiler.cpp: (KJS::getStackNames):
- 1:44 PM Changeset in webkit [33580] by
-
- 2 edits in trunk/WebKit/win
2008-05-19 Anders Carlsson <andersca@apple.com>
Reviewed by Darin, Alexey, Jess and Brady.
Set the application cache path.
- WebView.cpp: (WebKitSetApplicationCachePathIfNecessary): New function that sets the cache path.
(WebView::initWithFrame):
Set the application cache path.
- 12:55 PM Changeset in webkit [33579] by
-
- 11 edits5 adds in trunk
Added methods to get/set current cookie storage.
WebCore:
Added CookieStorageWin.h/cpp, introducing methods to get/set the current CFHTTPCookieStorageRef.
When setting cookies-related attributes in CFURLRequest, make sure we get them from the
current CFHTTPCookieStorageRef. Also, set the cookie storage in CFURLRequest.
Reviewed by Steve Falkenburg.
- WebCore.vcproj/WebCore.vcproj:
- platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::makeFinalRequest):
- platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdatePlatformRequest):
- platform/network/win/CookieJarCFNetWin.cpp: (WebCore::setCookies): (WebCore::cookies): (WebCore::cookiesEnabled):
- platform/network/win/CookieStorageWin.cpp: Added. (WebCore::currentCookieStorage): (WebCore::setCurrentCookieStorage):
- platform/network/win/CookieStorageWin.h: Added.
WebKit/win:
Added IWebCookieManager interface which allows client to set the
CFHTTPCookieStorageRef that WebCore should use.
Implement IWebCookieManager interface in WebCookieManager.
Update the cookie accept policy in the current cookie storage.
Reviewed by Steve Falkenburg.
- ForEachCoClass.h:
- Interfaces/IWebCookieManager.idl: Added.
- Interfaces/WebKit.idl:
- WebCookieManager.cpp: Added. (WebCookieManager::createInstance): (WebCookieManager::WebCookieManager): (WebCookieManager::~WebCookieManager): (WebCookieManager::QueryInterface): (WebCookieManager::AddRef): (WebCookieManager::Release): (WebCookieManager::cookieStorage): (WebCookieManager::setCookieStorage):
- WebCookieManager.h: Added.
- WebKit.vcproj/WebKit.vcproj:
- WebKitClassFactory.cpp:
- WebView.cpp: (updateSharedSettingsFromPreferencesIfNeeded):
- 12:21 PM Changeset in webkit [33578] by
-
- 3 edits6 adds in trunk
Reviewed by Darin.
http://bugs.webkit.org/show_bug.cgi?id=18308
SVG Encoding error with fill attribute
This is caused by problems with data: URL loading. Besides what is fixed by this patch,
I filed <rdar://problem/5845875> for CFNetwork.
While at it, fixed a related javascript: URL issue.
Tests: fast/loader/data-url-encoding-html.html
fast/loader/data-url-encoding-svg.html
fast/loader/javascript-url-encoding.html
- platform/KURL.cpp: (WebCore::KURL::parse): Fix a FIXME, use UTF-8 instead of dropping high bytes. This fixes javascript: URL handling. (WebCore::encodeRelativeString): Like mailto: URLs, data: ones are all UTF-8. Restructured the code to not search for "#" if both parts are to be encoded as UTF-8 anyway.
- 12:12 PM Changeset in webkit [33577] by
-
- 20 edits2 adds in trunk
Reviewed by Darin.
https://bugs.webkit.org/show_bug.cgi?id=18421
<rdar://problem/5857369> XMLHttpRequest does not properly encode & and < in outgoing messages
Test: http/tests/xmlhttprequest/serialize-document.html
- bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::send): Use createMarkup() instead of Document::toString().
- dom/Attr.cpp:
- dom/Attr.h:
- dom/Document.cpp:
- dom/Document.h:
- dom/DocumentFragment.cpp:
- dom/DocumentFragment.h:
- dom/Element.cpp:
- dom/Element.h:
- dom/Entity.cpp:
- dom/Entity.h:
- dom/EntityReference.cpp:
- dom/EntityReference.h:
- dom/Node.h:
- dom/Text.cpp:
- dom/Text.h:
- html/HTMLElement.cpp:
- html/HTMLElement.h: Removed most Node::toString() methods, which were massively wrong, and only used for XMLHttpRequest::send(). The remanining ones are still used in markup.cpp, but should probably be folded into it for consistency.
- 11:33 AM Changeset in webkit [33576] by
-
- 2 edits in trunk/WebCore
2008-05-19 Anders Carlsson <andersca@apple.com>
Fix Windows build.
- plugins/win/PluginViewWin.cpp: (WebCore::PluginView::userAgentStatic): (WebCore::PluginView::getValueStatic): (WebCore::PluginView::getValue):
- 11:22 AM Changeset in webkit [33575] by
-
- 2 edits in trunk/WebCore
<rdar://problem/5935694> AX: crash in text marker range
- 10:43 AM Changeset in webkit [33574] by
-
- 2 edits in trunk/WebCore
2008-05-19 Darin Adler <Darin Adler>
- fix WebKit build
- WebCore.xcodeproj/project.pbxproj: Make CSSReflectionDirection.h "private" instead of "project".
- 9:56 AM Changeset in webkit [33573] by
-
- 2 edits in trunk/WebCore
<rdar://problem/5700830> VO: VoiceOver should fall back to title attr if form element is not labeled
- 9:42 AM Changeset in webkit [33572] by
-
- 7 edits1 add in trunk/WebCore
2008-05-19 Darin Adler <Darin Adler>
Reviewed by Mitz.
- tweak CSSReflectValue, possibly fixing the leaks seen on the buildbot
- WebCore.vcproj/WebCore.vcproj: Added CSSReflectionDirection.h.
- WebCore.xcodeproj/project.pbxproj: Ditto.
- css/CSSReflectionDirection.h: Added.
- css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForReflection): Changed to use CSSReflectValue::create.
- css/CSSParser.cpp: (WebCore::CSSParser::parseReflect): Ditto.
- css/CSSReflectValue.h: Added a create function. Got rid of the setter functions, which had const PassRefPtr& arguments -- those probably caused the leaks although I'm not exactly sure why. Made the contructor and all the data members private.
- rendering/style/RenderStyle.h: Changed to include CSSReflectionDirection.h instead of CSSReflectValue.h so we can tweak CSSReflectValue without recompiling the world.
- 3:17 AM Changeset in webkit [33571] by
-
- 4 edits in trunk/WebCore
2008-05-19 Holger Hans Peter Freyther <zecke@selfish.org>
Rubber Stamped by Simon.
Enforce the WebKit Coding Style.
- plugins/PluginView.cpp: (WebCore::PluginView::load): (WebCore::PluginView::setValue):
- plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::setFocus): (WebCore::PluginView::show): (WebCore::PluginView::hide): (WebCore::PluginView::attachToWindow): (WebCore::PluginView::detachFromWindow): (WebCore::PluginView::getValueStatic): (WebCore::PluginView::getValue):
- plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::updateWindow): (WebCore::PluginView::detachFromWindow): (WebCore::PluginView::handlePostReadFile): (WebCore::PluginView::getValueStatic): (WebCore::PluginView::getValue):
- 3:09 AM Changeset in webkit [33570] by
-
- 7 edits in trunk/WebCore
2008-05-14 Marc Ordinas i Llopis <marc.ordinasillopis@collabora.co.uk>
Reviewed by Holger.
https://bugs.webkit.org/show_bug.cgi?id=18882
https://bugs.webkit.org/show_bug.cgi?id=18892
Based also on work by Chris Lord.
Provides support for NPAPI plugins that pass NULL as their instance
info. There are two kinds:
- Some call NPN_UserAgent and NPN_GetValue before a PluginView has been created. For those we provide static versions of those functions.
- Others call NPN_* functions with a NULL instance inside NPP_* calls, for those we've added extra currentPluginView guards.
- plugins/PluginView.cpp: Add additional currentPluginView guards and some small style changes. (WebCore::PluginView::start): (WebCore::PluginView::performRequest): (WebCore::PluginView::bindingInstance): (WebCore::PluginView::handlePost):
- plugins/PluginView.h: Added static versions of NPN_UserAgent and NPN_GetValue.
- plugins/gtk/PluginViewGtk.cpp: Add additional currentPluginView guards and some small style changes. (WebCore::PluginView::setNPWindowRect): (WebCore::PluginView::stop): (WebCore::PluginView::userAgentStatic): Added to deal with plugins that query this before having a PluginView. (WebCore::PluginView::getValueStatic): Added to deal with plugins that call this before we have created a PluginView. (WebCore::PluginView::getValue): Moved some code to getValueStatic. (WebCore::PluginView::init):
- plugins/npapi.cpp: Call PluginView::userAgentStatic and PluginView::getValueStatic if no PluginView is present. (NPN_UserAgent): (NPN_GetValue):
- plugins/qt/PluginPackageQt.cpp: (WebCore::PluginPackage::fetchInfo): Corrected split args because ignoring empty entries crashed. (WebCore::PluginPackage::load): Resolve all symbols when loading plugins to protect against XPCOM dependencies.
- plugins/qt/PluginViewQt.cpp: Add additional currentPluginView guards and some small style changes. (WebCore::PluginView::updateWindow): (WebCore::PluginView::setNPWindowRect): (WebCore::PluginView::stop): (WebCore::PluginView::userAgentStatic): Added to deal with plugins that query this before having a PluginView. (WebCore::PluginView::handlePostReadFile): (WebCore::PluginView::getValueStatic): Added to deal with plugins that call this before we have created a PluginView. (WebCore::PluginView::getValue): Moved some code to getValueStatic. (WebCore::PluginView::init): m_needsXEmbed init was moved to constructor.
- 1:59 AM Changeset in webkit [33569] by
-
- 3 edits in trunk/WebCore
2008-05-19 Alp Toker <alp@nuanti.com>
GTK+ build fix on Mac. Conditionalize XP_UNIX use.
- plugins/gtk/PluginPackageGtk.cpp: (WebCore::PluginPackage::fetchInfo): (WebCore::PluginPackage::load):
- plugins/gtk/PluginViewGtk.cpp:
May 18, 2008:
- 8:58 PM Changeset in webkit [33568] by
-
- 2 edits in trunk/WebCore
<rdar://problem/5942076> WebKit can no longer find URL links with VoiceOVer-U command (19100)
- 5:42 PM Changeset in webkit [33567] by
-
- 4 edits3 adds in trunk
WebCore:
2008-05-18 Darin Adler <Darin Adler>
Reviewed by Sam.
- fix <rdar://problem/5943569> crash due to stale ownerNode pointer
Test: fast/dom/StyleSheet/ownerNode-lifetime.html
- bindings/js/JSStyleSheetCustom.cpp: (WebCore::JSStyleSheet::mark): Added code to mark ownerNode. Includes a comment about how it would be even better to solve this in the DOM rather than just in the JavaScript binding.
- css/StyleSheet.idl: Added CustomMarkFunction attribute.
LayoutTests:
2008-05-18 Darin Adler <Darin Adler>
Reviewed by Sam.
- test for <rdar://problem/5943569> crash due to stale ownerNode pointer
- fast/dom/StyleSheet: Added.
- fast/dom/StyleSheet/ownerNode-lifetime-expected.txt: Added.
- fast/dom/StyleSheet/ownerNode-lifetime.html: Added.
- 5:36 PM Changeset in webkit [33566] by
-
- 3 edits3 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 Maciej
Handle exceptions thrown by toString conversion in subscript operators,
this should basically complete exception handling in SquirrelFish.
Sunspider reports no regression.
- 4:51 PM Changeset in webkit [33565] by
-
- 4 edits4 adds in trunk
WebCore:
2008-05-18 Brady Eidson <beidson@apple.com>
Reviewed by Sam Weinig
Fix for https://bugs.webkit.org/show_bug.cgi?id=19111
Allowdelete storage.itemName
syntax as an alias forstorage.removeItem("itemName")
Tests: storage/domstorage/localstorage/delete-removal.html
storage/domstorage/sessionstorage/delete-removal.html
- bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::deleteProperty): Only do the delete for non-built in properties
- storage/Storage.idl:
LayoutTests:
2008-05-18 Brady Eidson <beidson@apple.com>
Reviewed by Sam Weinig
Fix for https://bugs.webkit.org/show_bug.cgi?id=19111
Allowdelete storage.itemName
syntax as an alias forstorage.removeItem("itemName")
- storage/domstorage/localstorage/delete-removal-expected.txt: Added.
- storage/domstorage/localstorage/delete-removal.html: Added.
- storage/domstorage/sessionstorage/delete-removal-expected.txt: Added.
- storage/domstorage/sessionstorage/delete-removal.html: Added.
- 12:08 PM Changeset in webkit [33564] by
-
- 2 edits in trunk/WebKit/mac
Reviewed by Sam Weinig.
- fix <rdar://problem/5944596> IDNs are displayed as punycode in the authentication panel
- Panels/WebAuthenticationPanel.m: (-[WebAuthenticationPanel setUpForChallenge:]):
- 1:49 AM Changeset in webkit [33563] by
-
- 22 edits1 copy3 adds in branches/squirrelfish
Reapplying debugging support from r33553, this time with all the files.
2008-05-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Behold: debugging.
SunSpider reports no change.
- JavaScriptCore.xcodeproj/project.pbxproj: Added DebuggerCallFrame.h/.cpp, and created a debugger folder.
- VM/CodeGenerator.cpp: (KJS::CodeGenerator::generate): If the debugger is attached, always generate full scope chains for its sake.
- VM/Machine.cpp: (KJS::Machine::unwindCallFrame): Notify the debugger when unwinding due to an exception, so it doesn't keep stale call frames around.
(KJS::Machine::execute): Set Callee to 0 in eval frames, so the
debugger can distinguish them from function call frames.
(KJS::Machine::debug): Simplified this function, since the debugger
doesn't actually need all the information we used to provide.
(KJS::Machine::privateExecute): Treat debugging hooks like other function
calls, so the code we hook into (the debugger UI) can be optimized.
- kjs/debugger.cpp: Nixed these default callback implementations and made the callbacks pure virtual instead, so the compiler could tell me if I made a mistake in one of the subclasses.
- kjs/debugger.h: Removed a bunch of irrelevent data from the debugger callbacks. Changed from passing an ExecState* to passing a DebuggerCallFrame*, since an ExecState* doesn't contain sufficient information anymore.
- kjs/function.cpp: (KJS::globalFuncEval): Easiest bug fix evar!
[Previously missing files from r33553]
- kjs/DebuggerCallFrame.cpp: Copied from JavaScriptCore/profiler/FunctionCallProfile.h. (KJS::DebuggerCallFrame::functionName): (KJS::DebuggerCallFrame::thisObject): (KJS::DebuggerCallFrame::evaluateScript):
- kjs/DebuggerCallFrame.h: Copied from JavaScriptCore/VM/Register.h. (KJS::DebuggerCallFrame::DebuggerCallFrame): (KJS::DebuggerCallFrame::scopeChain): (KJS::DebuggerCallFrame::exception):
WebCore:
2008-05-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Updated for API changes in KJS::Debugger.
WebKit/mac:
2008-05-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Re-enabled previously disabled debugging functionality.
There are two major changes from how the WebKit debugger used to work:
(1) All the interesting bits are implemented down in JavaScriptCore. The
debugger just calls through to KJS::DebuggerCallFrame for everything.
(2) Instead of copyihng a pointer to an ExecState once, the debugger
copies the DebuggerCallFrame passed to it in each callback. This is
because the VM no longer maintains a fully transparent execution state
to which you can hold a pointer, and the DebuggerCallFrames it vends
are temporaries.
Also, we NULL out a WebScriptCallFrame's DebuggerCallFrame upon return
from its function. This is safer than the old method, which was to
hold a stale ExecState* and hope for the best.
May 17, 2008:
- 9:53 PM Changeset in webkit [33562] by
-
- 6 edits in branches/squirrelfish
2008-05-17 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Oliver.
Bug 18991: SquirrelFish: Major codegen issue in a.b=expr, a[b]=expr
<https://bugs.webkit.org/show_bug.cgi?id=18991>
Fix the last remaining blocking cases of this bug.
- kjs/grammar.y:
- kjs/nodes.cpp: (KJS::ReadModifyResolveNode::emitCode):
LayoutTests:
- fast/js/codegen-temporaries-expected.txt:
- fast/js/resources/codegen-temporaries.js:
- 8:41 PM Changeset in webkit [33561] by
-
- 3 edits in trunk/WebCore
2008-05-17 Sam Weinig <sam@webkit.org>
Reviewed by Mark Rowe.
Re-factor core setRequestHeader logic into setRequestHeaderInternal.
- xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::sameOriginRequest): (WebCore::XMLHttpRequest::setRequestHeader): (WebCore::XMLHttpRequest::setRequestHeaderInternal):
- xml/XMLHttpRequest.h:
- 8:00 PM Changeset in webkit [33560] by
-
- 22 edits2 deletes in branches/squirrelfish
Reverting r33553 as the patch is incomplete so breaks the build
- 6:21 PM Changeset in webkit [33559] by
-
- 10 edits in trunk
WebCore:
2008-05-17 Sam Weinig <sam@webkit.org>
Reviewed by Mark Rowe.
Differentiate between cancelation errors and generic network error in XHR.
- loader/FrameLoader.cpp: (WebCore::FrameLoader::requestFromDelegate): (WebCore::FrameLoader::cancelledError):
- platform/network/ResourceErrorBase.h: (WebCore::ResourceErrorBase::setIsCancelation): (WebCore::ResourceErrorBase::isCancelation): (WebCore::ResourceErrorBase::ResourceErrorBase): Add state that differentiates between errors created by cancelation and those made by all other generic network errors as this differentiation is needed by some specs.
- xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::open): (WebCore::XMLHttpRequest::loadRequestSynchronously): (WebCore::XMLHttpRequest::clearResponseEntityBody): (WebCore::XMLHttpRequest::genericError): (WebCore::XMLHttpRequest::networkError): (WebCore::XMLHttpRequest::abortError): (WebCore::XMLHttpRequest::didFail):
- xml/XMLHttpRequest.h:
- xml/XMLHttpRequestException.h: (WebCore::XMLHttpRequestException::):
- xml/XMLHttpRequestException.idl: Add ABORT_ERR. This error cannot be raised with the current WebKit architecture as it requires the ability to cancel a synchronous XHR, which we cannot currently do. It may be possible in the future though.
LayoutTests:
2008-05-17 Sam Weinig <sam@webkit.org>
Reviewed by Mark Rowe.
Update expected results for new ABORT_ERR.
- fast/dom/Window/window-properties-expected.txt:
- 5:47 PM Changeset in webkit [33558] by
-
- 4 edits in tags/Safari-6526.6.1
Versioning.
- 5:46 PM Changeset in webkit [33557] by
-
- 2 edits in tags/Safari-6526.6.1/WebCore
Merge r33555.
- 5:12 PM Changeset in webkit [33556] by
-
- 1 copy in tags/Safari-6526.6.1
New tag.
- 5:08 PM Changeset in webkit [33555] by
-
- 2 edits in trunk/WebCore
2008-05-17 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
Including wtf/Platform.h or using any of the macros it defines in headers that may be
included from outside of the WebKit project causes any project using those headers to
fail to build.
- page/mac/WebDashboardRegion.h:
- 3:45 PM Changeset in webkit [33554] by
-
- 3 edits in trunk/WebCore
2008-05-17 Sam Weinig <sam@webkit.org>
Reviewed by Brady Eidson.
Re-factor send() logic a little to make adding cross-site requests easier.
- xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): (WebCore::XMLHttpRequest::sameOriginRequest): (WebCore::XMLHttpRequest::loadRequestSynchronously): (WebCore::XMLHttpRequest::loadRequestAsynchronously):
- xml/XMLHttpRequest.h:
- 11:58 AM Changeset in webkit [33553] by
-
- 22 edits2 copies in branches/squirrelfish
2008-05-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Behold: debugging.
SunSpider reports no change.
- JavaScriptCore.xcodeproj/project.pbxproj: Added DebuggerCallFrame.h/.cpp, and created a debugger folder.
- VM/CodeGenerator.cpp: (KJS::CodeGenerator::generate): If the debugger is attached, always generate full scope chains for its sake.
- VM/Machine.cpp: (KJS::Machine::unwindCallFrame): Notify the debugger when unwinding due to an exception, so it doesn't keep stale call frames around.
(KJS::Machine::execute): Set Callee to 0 in eval frames, so the
debugger can distinguish them from function call frames.
(KJS::Machine::debug): Simplified this function, since the debugger
doesn't actually need all the information we used to provide.
(KJS::Machine::privateExecute): Treat debugging hooks like other function
calls, so the code we hook into (the debugger UI) can be optimized.
- kjs/debugger.cpp: Nixed these default callback implementations and made the callbacks pure virtual instead, so the compiler could tell me if I made a mistake in one of the subclasses.
- kjs/debugger.h: Removed a bunch of irrelevent data from the debugger callbacks. Changed from passing an ExecState* to passing a DebuggerCallFrame*, since an ExecState* doesn't contain sufficient information anymore.
- kjs/function.cpp: (KJS::globalFuncEval): Easiest bug fix evar!
WebCore:
2008-05-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Updated for API changes in KJS::Debugger.
WebKit/mac:
2008-05-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Re-enabled previously disabled debugging functionality.
There are two major changes from how the WebKit debugger used to work:
(1) All the interesting bits are implemented down in JavaScriptCore. The
debugger just calls through to KJS::DebuggerCallFrame for everything.
(2) Instead of copyihng a pointer to an ExecState once, the debugger
copies the DebuggerCallFrame passed to it in each callback. This is
because the VM no longer maintains a fully transparent execution state
to which you can hold a pointer, and the DebuggerCallFrames it vends
are temporaries.
Also, we NULL out a WebScriptCallFrame's DebuggerCallFrame upon return
from its function. This is safer than the old method, which was to
hold a stale ExecState* and hope for the best.
- 4:00 AM Changeset in webkit [33552] by
-
- 10 edits in branches/squirrelfish
2008-05-17 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Oliver.
Bug 18991: SquirrelFish: Major codegen issue in a.b=expr, a[b]=expr
<https://bugs.webkit.org/show_bug.cgi?id=18991>
Ensure that the code generated for assignments uses temporaries whenever
necessary. This patch covers the vast majority of situations, but there
are still a few left.
This patch also adds some missing cases to CodeBlock::dump().
- VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
- VM/CodeGenerator.h: (KJS::CodeGenerator::destinationForAssignResult): (KJS::CodeGenerator::leftHandSideNeedsCopy): (KJS::CodeGenerator::emitNodeForLeftHandSide):
- kjs/NodeInfo.h:
- kjs/grammar.y:
- kjs/nodes.cpp: (KJS::AssignDotNode::emitCode): (KJS::ReadModifyDotNode::emitCode): (KJS::AssignBracketNode::emitCode): (KJS::ReadModifyBracketNode::emitCode): (KJS::ForInNode::ForInNode):
- kjs/nodes.h: (KJS::ReadModifyResolveNode::): (KJS::AssignResolveNode::): (KJS::ReadModifyBracketNode::): (KJS::AssignBracketNode::): (KJS::AssignDotNode::): (KJS::ReadModifyDotNode::):
LayoutTests:
- fast/js/codegen-temporaries-expected.txt:
- fast/js/resources/codegen-temporaries.js:
- 1:37 AM Changeset in webkit [33551] by
-
- 1 edit2 adds in branches/squirrelfish/LayoutTests
Forgot to check in the results to the activation gc tests
- 12:22 AM Changeset in webkit [33550] by
-
- 3 edits4 adds in branches/squirrelfish
Bug 19106: SquirrelFish: Activation is not marked correctly
<https://bugs.webkit.org/show_bug.cgi?id=19106>
Reviewed by Maciej
We can't rely on the symbol table for a count of the number of globals
we need to mark as that misses duplicate parameters and 'this'. Now we
use the actual local register count from the codeBlock.