1. 04 Dec, 2002 1 commit
  2. 03 Dec, 2002 3 commits
  3. 27 Nov, 2002 1 commit
  4. 26 Nov, 2002 5 commits
    • sheridan's avatar
      Alex-34 stamp · 28b2189d
      sheridan authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      Change ActivationImp to be allocated via the garbage collector · 0e6b4f09
      mjs authored
      	again instead of on the stack. This fixes the following four
      	regressions but sadly it causes a 6% performance hit. It's
      	probably possibly to reduce the hit a bit by being smarter about
      	inlining and the way the marking list variant is implemented, but
      	I'll look into that later.
      	- fixed 3111500 - REGRESSION: crash in "KJS::ScopeChain::mark()" on www.posci.com
      	- fixed 3111145 - REGRESSION: reproducible crash in KJS hashtable lookup at time.com
      	- fixed 3110897 - REGRESSION: javascript crasher on http://bmwgallery.tripod.com/
      	- fixed 3109987 - REGRESSION: Reproducible crash in KJS ObjectImp at live365.com
      	- improved DEBUG_COLLECTOR mode a bit by never giving memory back
      	to the system.
              * kjs/collector.cpp:
              * kjs/context.h:
              * kjs/function.cpp:
              * kjs/function.h:
              * kjs/internal.cpp:
              * kjs/list.cpp:
              * kjs/list.h:
              * kjs/value.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      * kjs/property_map.cpp: · 13d73dc6
      darin authored
      	(PropertyMap::save): Look at the attributes the same way in the single hash entry
      	case as in the actual hash table case. Change the rule for which attributes to save
      	to "attributes that don't have the ReadOnly, DontEnum, or Function bit set".
              Also fix bug where saving an empty property map would leave the count set to the old value.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • rjw's avatar
      JavaScriptCore · 3f05b75a
      rjw authored
              Remove debugging code.  Could be cause of performance regresssion.
              * kjs/nodes.cpp:
              Restire attributes correctly.
              * kjs/property_map.cpp:
      WebKit        Only cache page if the load has completed.
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _setState:]):
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • rjw's avatar
      JavaScriptCore · e67107bd
      rjw authored
              Use delete[] (not delete) operator to delete array.
              * kjs/property_map.cpp:
              Use cleaned up API to enable/disable page cache.
              * Debug/DebugUtilities.m:
              (-[BrowserDocument toggleBackForwardEnabled:]):
              Cleanup up leaking objects in page cache.
              * kwq/KWQKHTMLPart.mm:
              * kwq/WebCoreBridge.mm:
              (-[KWQPageState initWithDocument:DOM::URL:windowProperties:KJS::locationProperties:KJS::]):
              (-[KWQPageState dealloc]):
              Cleanup leaking objects in page cache.
              Cleaned up API a bit.
              * History.subproj/WebBackForwardList.h:
              * History.subproj/WebBackForwardList.m:
              (-[WebBackForwardList dealloc]):
              (+[WebBackForwardList setUsesPageCache:]):
              (+[WebBackForwardList usesPageCache]):
              (+[WebBackForwardList setPageCacheSize:]):
              (+[WebBackForwardList pageCacheSize]):
              * History.subproj/WebHistoryItem.h:
              * History.subproj/WebHistoryItem.m:
              (-[WebHistoryItem setHasPageCache:]):
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge saveDocumentToPageCache:]):
              * WebKit.exp:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _canCachePage]):
              (-[WebFrame _purgePageCache]):
              (-[WebFrame _setState:]):
              (-[WebFrame _continueLoadRequestAfterNavigationPolicy:request:]):
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  5. 25 Nov, 2002 3 commits
    • rjw's avatar
      i Added a debug menu to turn back/forward cache on and off. · 683c446f
      rjw authored
              Off by default.  Use with discretion.  Still leaks like
              a sieve.  Useful to provide a sense of potential speed up.
              * Debug/DebugUtilities.m:
              (-[DebugUtilities createDebugMenu]):
              (-[BrowserDocument validate_showDOMTree:]):
              (-[BrowserDocument toggleBackForwardEnabled:]):
              Changes fro back/forward cache.
              * History.subproj/WebHistoryItem.h:
              * History.subproj/WebHistoryItem.m:
              (+[WebHistoryItem setUsePageCache:]):
              (+[WebHistoryItem usePageCache]):
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge saveDocumentToPageCache:]):
              * WebView.subproj/WebFramePrivate.h:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _detachFromParent]):
              (-[WebFrame _canCachePage]):
              (-[WebFrame _setState:]):
              Tweaked some debugging info.
              * khtml/xml/dom_docimpl.cpp:
              Added debugging info.  Fixed property map save function.
              * kjs/nodes.cpp:
              * kjs/property_map.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • rjw's avatar
      Changes for back/forward. Currently disabled. · b0eb2ac5
      rjw authored
              * History.subproj/WebHistoryItem.h:
              * History.subproj/WebHistoryItem.m:
              (-[WebHistoryItem dealloc]):
              (-[WebHistoryItem setPageCacheEnabled:]):
              (-[WebHistoryItem pageCache]):
              * Misc.subproj/WebKitLogging.h:
              * Misc.subproj/WebKitLogging.m:
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge saveDocumentToPageCache:]):
              * WebView.subproj/WebDataSource.m:
              (-[WebDataSource startLoading]):
              * WebView.subproj/WebDataSourcePrivate.h:
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSource _startLoading:]):
              (-[WebDataSource _startLoading]):
              (-[WebDataSource _commitIfReady:]):
              (-[WebDataSource _commitIfReady]):
              (-[WebDataSource _setStoredInPageCache:]):
              (-[WebDataSource _storedInPageCache]):
              * WebView.subproj/WebFramePrivate.h:
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _transitionToCommitted:]):
              (-[WebFrame _canCachePage]):
              (-[WebFrame _purgePageCache]):
              (-[WebFrame _setState:]):
              (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]):
              (-[WebFrame _continueLoadRequestAfterNavigationPolicy:request:]):
              Changes for back/forward.  Currently disabled.
              * ForwardingHeaders/kjs/property_map.h: Added.
              * khtml/ecma/kjs_window.cpp:
              * khtml/ecma/kjs_window.h:
              * khtml/khtmlpart_p.h:
              * khtml/xml/dom_docimpl.cpp:
              * khtml/xml/dom_docimpl.h:
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
              * kwq/WebCoreBridge.h:
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):
              (-[WebCoreBridge saveDocumentToPageCache]):
              (-[WebCoreBridge canCachePage]):
              (-[KWQPageState initWithDocument:DOM::URL:windowProperties:KJS::locationProperties:KJS::]):
              (-[KWQPageState dealloc]):
              (-[KWQPageState DOM::]):
              (-[KWQPageState URL]):
              (-[KWQPageState KJS::]):
              Changes for back/forward.  Currently disabled.
              * kjs/property_map.cpp:
              * kjs/property_map.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2863 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      JavaScriptCore: · d4ca2268
      darin authored
              * kjs/property_map.cpp: Rearrange code a little bit and tweak indentation.
      	This might provide a tiny speedup because we don't look at the single entry
      	any more in cases where the _table pointer is non-0.
      	- fixed a problem I discovered in testing where multiple identical bookmarks confuse us
              * Bookmarks.subproj/WebBookmarkList.m:
              (-[WebBookmarkList removeChild:]): Use indexOfObjectIdenticalTo: and removeObjectIdenticalTo:
      	instead of containsObject: and removeObject:.
              (-[WebBookmarkList insertChild:atIndex:]): Use indexOfObjectIdenticalTo: instead of
      	containsObject: in the assertion.
              - fixed 3042781 -- slidey animation sometimes draws partial item behind overflow indicator
              - fixed 3090845 -- would be nice to be able to drop bookmarks into folders using the bookmark toolbar
              - fixed 3107422 -- bookmark in toolbar gets stuck highlighted if window is moved by the stacking code
              - fixed problem where you would get an overflow indicator even if there was room for the last bookmark
              - fixed problem where the cursor could change to an I-beam during a constrained drag
              * FavoriteButton.h: Add canAcceptDroppedBookmark, setHighlighted, and
      	acceptDroppedBookmark methods for use when doing a constrained drag that
      	drop items into folders. Also add a category on NSView to be used to pause
      	animation when over a button that will accept a drop.
              * FavoriteButton.m:
              (-[FavoriteButton registerForDraggedTypes]): Accept DraggedFavoriteButtonPboardType.
              (-[FavoriteButton initTrackingRect]): Add an observer so we update the tracking rect
      	when the window moves too. This fixes bug 3107422.
              (-[FavoriteButton bookmarksFromPasteboard:]): Added. Helper method that accepts drag
      	from DraggedFavoriteButtonPboardType as well as the other bookmark pasteboard types,
      	but only within the same superview.
              (-[FavoriteButton determineDragOperation:]): Call [self bookmarksFromPasteboard:]
      	instead of [WebBookmark bookmarksFromPasteboard].
              (-[FavoriteButton draggingEntered:]): Pause animation when we enter a button that can
      	accept a dropped bookmark. This makes sure that the button doesn't slide out from under
      	the mouse.
              (-[FavoriteButton draggingUpdated:]): Don't do any highlighting here because it's not
              (-[FavoriteButton draggingExited:]): Resume the animation in case we paused it.
              (-[FavoriteButton performDragOperation:]): Call [self bookmarksFromPasteboard:]
      	instead of [WebBookmark bookmarksFromPasteboard]. Also resume the animation in case we
      	paused it.
              (-[FavoriteButton canAcceptDroppedBookmark]): Added. Returns YES if the bookmark's type
      	is WebBookmarkTypeList.
              (-[FavoriteButton setHighlighted:]): Added. Calls setHighlighted: on the button's cell.
              (-[FavoriteButton acceptDroppedBookmark:]): Added. Does the same work that performDragOperation
      	does for the case of moving a button within the same bar.
              (-[FavoriteButton _hitTest:dragTypes:]): Don't accept drags at the edges of the button.
      	This makes space between buttons so there's room to put new buttons between two old ones, even
      	if the old ones are both for folders.
              (-[NSView pauseAnimation]): Added. Passes the call up the superview chain.
              (-[NSView resumeAnimation]): Added. Passes the call up the superview chain.
              * FavoritesBar.m:
              (-[FavoritesBar maxButtonXWithoutClipIndicator]): Added. Leaves a margin,
      	currently 3 pixels.
              (-[FavoritesBar maxButtonXWithClipIndicator]): Added. Leaves a margin,
      	currently 3 pixels.
              (-[FavoritesBar maxButtonX]): Modified to call either maxButtonXWithoutClipIndicator
      	or maxButtonXWithClipIndicator depending on whether the clip indicator is showing.
              (-[FavoritesBar slideButtonsIntoPlace]): Slide buttons off the right side of the bar
      	if they are going to be clipped out. Allow the last button to go all the way to the
      	right, using the space that would otherwise be used by the clip indicator. Make the
      	clip indicator disappear if buttons are going to slide past it to the left or the right.
              (-[FavoritesBar _layOutButtons]): Include the smarts about leaving space for the
      	item to be dropped and about leaving out the currently dragged item that was formerly
      	only in slideButtonsIntoPlace. Also include the smarts about positioning mentioned
      	above, and do positioning here, rather than in _refreshButtons. To allow calling this
      	during constrained dragging, add the dragged item after adding all the other items.
              (-[FavoritesBar finishedSlidingAnimation:]): Added. Calls _layOutButtons. This is used
      	to make the clip indicator reappear in case slideButtonsIntoPlace made it disappear.
              (-[FavoritesBar addButtonForBookmark:]): Removed left edge parameter. This no method longer
              tries to position bookmarks at all.
              (-[FavoritesBar _refreshButtons]): Get rid of code that attempts to position the buttons.
      	We now do that in _layOutButtons.
              (-[FavoritesBar initWithView:]): Initialize _dragSourceIndexIfMoving to NSNotFound.
      	Make us the animation's delegate so we get a finishedSlidingAnimation:.
              (-[FavoritesBar performDragOperation:]): Check for drags within the favorites bar by
      	checking _dragSourceIndexIfMoving rather than looking for DraggedFavoriteButtonPboardType.
      	Also reset _dropIndex since _layOutButtons now looks at it.
              (-[FavoritesBar draggingEnded:]): Reset _dragSourceIndexIfMoving since _layOutButtons
      	now looks at it.
              (-[FavoritesBar reorderFavoriteButton:fromMouseDownEvent:]): Disable cursor rectangles and
      	set the cursor to the arrow cursor during the reorder process. Add hit testing so that the
      	constrained dragging can drop items in FavoriteButtons that are folders. Pause animation
      	when over such a FavoriteButton, and resume it when not over it.
              (-[FavoritesBar pauseAnimation]): Added.
              (-[FavoritesBar resumeAnimation]): Added.
              * FavoritesBarView.h: Add pauseAnimation and resumeAnimation methods to the delegate.
              * FavoritesBarView.m:
              (-[FavoritesBarView pauseAnimation]): Pass call on to the delegate.
              (-[FavoritesBarView resumeAnimation]): Ditto.
              * SlidingAnimation.h: Add delegate, setDelegate method, pause and resume methods, and
      	finishedSlidingAnimation: method for the delegate.
              * SlidingAnimation.m:
              (-[SlidingAnimation updateTimer]): Take the paused state into account, and also call the
      	finishedSlidingAnimation: method when the animation completes.
              (-[SlidingAnimation showNextFrame]): Simplify by using a call to updateTimer to do most
      	of the work.
              (-[SlidingAnimation setDelegate:]): Added. Just sets the delegate field.
              (-[SlidingAnimation pause]): Added. Just sets the paused state and calls updateTimer.
              (-[SlidingAnimation resume]): Added. Just sets the paused state and calls updateTimer.
      	- fixed a problem I discovered in testing where multiple identical bookmarks confuse us
              * BookmarksViewController.m:
              ([BookmarksViewController anyAncestorOfBookmark:inArray:]): Use indexOfObjectIdenticalTo:
      	instead of containsObject:, because we want to use identity on bookmarks, not equality
      	([BookmarksViewController bookmarkOrAnyAncestor:inArray:]): Ditto.
      	([BookmarksViewController newContentItemWithTitle:URLString:type:positionIgnoresSelection:]): Ditto.
      	([BookmarksViewController sourceRowForBookmark:]): Ditto.
      	([BookmarksViewController outlineView:validateDrop:proposedItem:proposedChildIndex:]): Ditto.
      	([BookmarksViewController paste:]): Ditto.
      	([UndoRemoveInfo initWithBookmark:]): Ditto.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  6. 24 Nov, 2002 4 commits
    • darin's avatar
      JavaScriptCore: · 8d450d34
      darin authored
      	- changed ScopeChain to not ref each item in the chain, and use
              marking instead; gains 1% on JavaScript iBench
              * kjs/context.h: Return chain by reference.
              * kjs/internal.cpp: (ContextImp::mark): Mark the scope chain.
              * kjs/interpreter.cpp: (Context::scopeChain): Return chain by reference.
              * kjs/interpreter.h: Make some Context methods inline.
              * kjs/nodes.cpp:
              (ThisNode::evaluate): Get at ContextImp directly.
              (ResolveNode::evaluateReference): Ditto.
              (VarDeclNode::evaluate): Ditto.
              (VarDeclNode::processVarDecls): Ditto.
              (FuncDeclNode::processFuncDecl): Pass ScopeChain directly to avoid copying.
              (FuncExprNode::evaluate): Ditto.
              * kjs/object.cpp: Make scope and setScope inline.
              * kjs/object.h: Make scope return a chain by reference. Make scope and
      	setScope both be inline. Use a normal ScopeChain instead of NoRefScopeChain
      	since they are now one and the same.
              * kjs/scope_chain.cpp: Remove all the code to ref and deref objects.
      	Merge NoRefScopeChain in with ScopeChain since they both work this way now.
              * kjs/scope_chain.h: Remove NoRefScopeChain and simplify the ref counts.
      	Make more functions inline.
              * force-js-clean-timestamp: Touch for ScopeChain change.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      - fixed 3098356 - Hard hang on movie search at www.movietickets.com · c082d008
      mjs authored
              * kjs/string_object.cpp:
              (StringProtoFuncImp::call): When doing a regexp replacement that
      	results in an empty match, always move on to the next character
      	after doing the replacement. The previous code would hit an
      	infinite loop if an initial empty match was replaced with the
      	empty string.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      - fixed 3095446 - Crash on AppleScript page due to very long argument list · 219ed0ac
      mjs authored
              * kjs/grammar.y: Don't try to construct the argument list in the
      	right order, since that blows out the parser stack.
      	* kjs/nodes.cpp:
              (ArgumentsNode::ArgumentsNode): Instead reverse the argument list
              * kjs/nodes.h: Make ArgumentsNode a friend of ArgumentListNode.
              * kjs/grammar.cpp: Updated from grammar.y.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      - completed Darin's mostly-fix for 3037795 - Resource use · 1a9f113f
      mjs authored
      	increases when accessing very high index value in array
      	The two missing pieces were handling sparse properties when
      	shrinking the array, and when sorting. Thse are now both taken
      	care of.
              * kjs/array_instance.h:
              * kjs/array_object.cpp:
              * kjs/identifier.h:
              * kjs/object.h:
              * kjs/property_map.cpp:
              * kjs/property_map.h:
              * kjs/reference_list.cpp:
              * kjs/reference_list.h:
              * kjs/ustring.cpp:
              * kjs/ustring.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  7. 23 Nov, 2002 2 commits
    • mjs's avatar
      Numerous collector changes for a net gain of 3% on JS ibench: · 5a7a3882
      mjs authored
      	- Replaced per-block bitmap with free list.
      	- Increased number of empty blocks kept around to 2.
      	- Doubled block size.
      	- When scanning heap in collector, skip scanning the rest of a
      	block as soon as we see as many live cells as the the number of
      	used cells it had originally.
      	Also the following collector changes unrelated to performance:
      	- Made constants `const int' instead of `static const int'.
      	- Miscellaneous code cleanup.
              * kjs/collector.cpp:
      	- Added debugging mode enabled by defining DEBUG_GC which asserts
      	when a destroyed ValueImp
              * kjs/internal.cpp:
              * kjs/value.cpp:
              * kjs/value.h:
      	* kjs/config.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      JavaScriptCore: · ff399e06
      darin authored
      	- replaced List class with a vector rather than a linked list, changed it
      	to use a pool of instances instead of all the nodes allocated off of the
      	heap; gives 10% gain on iBench
              * kjs/list.h: Complete rewrite.
              * kjs/list.cpp: Ditto.
              * kjs/array_object.cpp: (compareWithCompareFunctionForQSort): Go back to
      	doing a clear and two appends here. Fast with the new list implementation.
              * kjs/collector.h: Remove _COLLECTOR hack and just make rootObjectClasses
      	return a const void *.
              * kjs/collector.cpp: Remove _COLLECTOR hack, and various other minor tweaks.
              * khtml/ecma/kjs_window.cpp: Remove _COLLECTOR hack.
              * kwq/WebCoreJavaScript.h:
              * kwq/WebCoreJavaScript.mm:
              (+[WebCoreJavaScript rootObjectClasses]):
      	Update for name change -- root object classes, not all live object classes.
              * force-js-clean-timestamp: Make sure we don't have more build problems.
              * Misc.subproj/WebCoreStatistics.h:
              * Misc.subproj/WebCoreStatistics.m:
              (+[WebCoreStatistics javaScriptRootObjectClasses]):
      	Update for name change -- root object classes, not all live object classes.
              * Debug/CacheController.m: (-[CacheController refreshJavaScriptStatisticsMatrix]):
      	Update for name change -- root object classes, not all live object classes.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  8. 22 Nov, 2002 4 commits
    • darin's avatar
      - prepare to reimplement KJS::List; move to its own file, add statistics · 6afbb079
      darin authored
              * kjs/function_object.cpp: (FunctionProtoFuncImp::call): Use new copyTail()
      	function rather than copy() and removeFirst().
              * kjs/identifier.cpp: Add statistics, off by default.
              * kjs/property_map.cpp: Add statistics, off by default.
              * kjs/list.cpp: Added. Moved code here. To be rewritten.
              * kjs/list.h: Added. Moved interface here. To be rewritten.
              * kjs/types.cpp: Removed.
              * kjs/types.h: Now just an empty header that includes other headers.
              * JavaScriptCore.pbproj/project.pbxproj: Add new files, rearrange.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      - reduce cell size to 56 bytes from 64, now that nearly all · db3db8e9
      mjs authored
      	objects fit in that size. .5% speed gain and probably some
      	footprint gain.
              * kjs/collector.cpp: Change CELL_SIZE from 64 to 56.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      JavaScriptCore: · 7b978750
      darin authored
      	- change ScopeChain to be a singly linked list shares tails, gives 11% gain on iBench
              * kjs/context.h:
              (ContextImp::pushScope): Make inline, use push instead of prepend, and pass imp pointer.
              (ContextImp::popScope): Make inline, use pop instead of removeFirst.
              * kjs/function.cpp: (DeclaredFunctionImp::DeclaredFunctionImp): No need to copy.
              * kjs/function_object.cpp: (FunctionObjectImp::construct): Use push instead of
      	prepend, and pass imp pointer.
              * kjs/internal.cpp: (ContextImp::ContextImp): Use clear, push instead of prepend,
      	and pass imp pointers.
              * kjs/nodes.cpp: (ResolveNode::evaluateReference): Use isEmpty, pop, and top instead
      	of ScopeChainIterator.
              * kjs/object.h: Change _scope to be a NoRefScopeChain.
              * kjs/object.cpp: No need to initialize _scope any more, since it's not a NoRefScopeChain.
              * kjs/scope_chain.h: Rewrite, different implementation and interface.
              * kjs/scope_chain.cpp: More of the same.
              * khtml/ecma/kjs_dom.cpp: (DOMNode::pushEventHandlerScope): Change to push handlers
      	on an existing scope chain rather than returning one. Name change too.
              * khtml/ecma/kjs_dom.h: More of the same.
              * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::pushEventHandlerScope): And here.
              * khtml/ecma/kjs_html.h: And here.
              * khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): Use the pushEventHandlerScope
      	function, and also don't worry about optimizing the "no change" case, because that already
      	works pretty efficiently.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      - a simple change for .4% gain on ibench - instead of unmarking · f67a9641
      mjs authored
      	all objects at the start of collection, instead unmark as part of
      	the sweep phase
              * kjs/collector.cpp:
              (Collector::collect): Remove separate unmarking pass and instead
      	unmark the objects that don't get collected during the sweep
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  9. 21 Nov, 2002 9 commits
    • darin's avatar
      top level: · 36614a72
      darin authored
              * Site/Internal/Design/CFURL.rtf: Added.
              * Scripts/last-update: Added. Script for Trey that tells you when
      	you last did a cvs update, based on most-recently updated ChangeLog.
      	- stop garbage collecting the ActivationImp objects, gets 3% on iBench
      	- pave the way to separate the argument lists from scope chains
              * kjs/context.h: Added. Moved ContextImp here so it can use things defined
      	in function.h
              * kjs/scope_chain.h: Added. Starting as a copy of List, to be improved.
              * kjs/scope_chain.cpp: Added. Starting as a copy of List, to be improved.
              * JavaScriptCore.pbproj/project.pbxproj: Rearranged things, added context.h.
              * kjs/function.cpp:
              (FunctionImp::call): Pass InterpreterImp, not ExecState, to ContextImp.
              (DeclaredFunctionImp::DeclaredFunctionImp): List -> ScopeChain.
              (ActivationImp::createArgumentsObject): ArgumentList -> List.
              (GlobalFuncImp::call): Pass InterpreterImp, not an ExecState, to ContextImp.
              * kjs/function.h: List -> ScopeChain.
              * kjs/function_object.cpp: (FunctionObjectImp::construct): List -> ScopeChain.
              * kjs/internal.cpp:
              (ContextImp::ContextImp): Set the context in the interpreter.
              (ContextImp::~ContextImp): Set the context in the interpreter to the caller.
              (ContextImp::mark): Mark all the activation objects.
              (InterpreterImp::InterpreterImp): Initialize context to 0.
              (InterpreterImp::mark): Mark the top context.
              (InterpreterImp::evaluate): Pass InterpreterImp to ContextImp.
              * kjs/internal.h: Move ContextImp to its own header. Add setContext to InterpreterImp.
              * kjs/interpreter.cpp: (Context::scopeChain): List -> ScopeChain.
              * kjs/interpreter.h: List -> ScopeChain.
              * kjs/nodes.cpp:
              (ResolveNode::evaluateReference): List -> ScopeChain.
              (FuncDeclNode::processFuncDecl): List -> ScopeChain.
              (FuncExprNode::evaluate): List -> ScopeChain.
              * kjs/object.cpp: List -> ScopeChain.
              * kjs/object.h: List -> ScopeChain.
              * kjs/types.h: Remove needsMarking features from List.
              * kjs/types.cpp: Ditto.
              * khtml/ecma/kjs_dom.cpp: (DOMNode::eventHandlerScope): List -> ScopeChain.
              * khtml/ecma/kjs_dom.h: List -> ScopeChain.
              * khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): List -> ScopeChain.
              * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::eventHandlerScope): List -> ScopeChain.
              * khtml/ecma/kjs_html.h: List -> ScopeChain.
              * force-js-clean-timestamp: Not sure this is required, but better safe than sorry.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      - reduced the size of PropertyMap by storing sizes and such in the · bb46f898
      mjs authored
      	dynamically allocated part of the object to reduce the size of
      	ObjectImp - .5% speed improvement on JS iBench.
              * kjs/property_map.cpp:
              * kjs/property_map.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      Tools: · 1549b911
      mjs authored
              * CommitLogEditor/Makefile.am: Pass symroots for this tree to pbxbuild.
              * HotSpotFinder/Makefile.am: Pass symroots for this tree to pbxbuild.
              * Makefile.am: Pass symroots for this tree to pbxbuild.
              * ObjcUnit/Makefile.am: Pass symroots for this tree to pbxbuild.
              * TestPlugin/Makefile.am: Pass symroots for this tree to pbxbuild.
              * WebFoundation-CacheLoader/Makefile.am: Pass symroots for this tree to pbxbuild.
              * Makefile.am: Pass symroots for this tree to pbxbuild.
              * Makefile.am: Pass symroots for this tree to pbxbuild.
              * Makefile.am: Pass symroots for this tree to pbxbuild.
              * Makefile.am: Pass symroots for this tree to pbxbuild.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • sheridan's avatar
      Alex-33 stamp · 96195948
      sheridan authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      JavaScriptCore: · 32782811
      darin authored
              * kjs/property_map.cpp: More assertions.
              * force-js-clean-timestamp: Trigger a rebuild because of the
      	size change in ValueImp.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2804 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      * kjs/property_map.cpp: Turn that consistency check back off. · 591c3909
      darin authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      - someone somewhere must be defining a macro named check, causing a compile failure in WebCore · e56c6da0
      darin authored
      	Rename check() to checkConsistency().
              * kjs/property_map.h: Rename.
              * kjs/property_map.cpp: Yes, rename.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      - add self-check to property map in hopes of finding the cnet.com bug · d579f5b7
      darin authored
              * kjs/property_map.h: Add check() function.
              * kjs/property_map.cpp: Add the checking, controlled by DO_CONSISTENCY_CHECK.
      	 - fixed UChar interface so it's not so slow in debug builds
              * kjs/ustring.h: Nothing in UChar needs to be private.
              * kjs/function.cpp: (GlobalFuncImp::call):
              * kjs/function_object.cpp: (FunctionObjectImp::construct):
              * kjs/identifier.cpp:
              * kjs/lexer.cpp: (Lexer::setCode), (Lexer::shift):
              * kjs/lookup.cpp: (keysMatch):
              * kjs/ustring.cpp: (UString::Rep::computeHash), (KJS::compare):
      	Use the "uc" field instead of the "unicode()" inline function.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      - fixed a null-dereference I ran into while trying to reproduce bug 3107351 · 8488c964
      darin authored
              * kjs/function.h: Change ActivationImp constructor to take context parameter.
              * kjs/function.cpp: (ActivationImp::ActivationImp): Take context parameter,
      	not execution state parameter.
              * kjs/internal.cpp: (ContextImp::ContextImp): Initialize activation object
      	from context, not execution state, because the new context is not yet in the
      	execution state.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  10. 20 Nov, 2002 8 commits
    • darin's avatar
      - added a feature for Richard to use in his back/forward cache · 57017199
      darin authored
              * kjs/object.h: Added save/restoreProperties.
              * kjs/property_map.h: Here too.
              * kjs/property_map.cpp: Here too.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      - created argument list objects only on demand for a 7.5% speedup · 5b1e7b71
      darin authored
              * kjs/function.h: Change ActivationImp around.
              * kjs/function.cpp:
              (FunctionImp::call): Pass a pointer to the arguments list to avoid ref/unref.
              (FunctionImp::get): Get the function pointer from the context directly,
      	not the activation object.
              (ArgumentsImp::ArgumentsImp): Add an overload that takes no arguments.
              (ActivationImp::ActivationImp): Store a context pointer and an arguments object pointer.
              (ActivationImp::get): Special case for arguments, create it and return it.
              (ActivationImp::put): Special case for arguments, can't be set.
              (ActivationImp::hasProperty): Special case for arguments, return true.
              (ActivationImp::deleteProperty): Special case for arguments, refuse to delete.
              (ActivationImp::mark): Mark the arguments object.
              (ActivationImp::createArgumentsObject): Do the work of actually creating it.
              (GlobalFuncImp::call): Use stack-based objects for the ContextImp and ExecState.
              * kjs/internal.h: Keep function and arguments pointer in the context.
              * kjs/internal.cpp:
              (ContextImp::ContextImp): Don't pass in the func and args when making an ActivationImp.
              (InterpreterImp::evaluate): Use stack-based objects here.
              * kjs/types.h: Add ArgumentList as a synonym for List, soon to be separate.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      Reduced the size of ValueImp by 8 bytes for a .5% speedup. · c562dc6b
      mjs authored
              * kjs/value.h: Removed destructed flag. Made refcount and flag 16
      	bits each.
              * kjs/value.cpp:
              (ValueImp::~ValueImp): Don't set destructed flag.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      * kjs/types.cpp: Keep ref count for the whole lists of nodes. · 20330f77
      darin authored
      	Doesn't speed things up much, less than 1%.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2789 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      * kjs/collector.cpp: · 4debf737
      mjs authored
              (Collector::allocate): Clear the flags on newly allocated objects.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      - oops, checked in big regression instead of 5% speedup · 1a208841
      darin authored
              * kjs/function.cpp: (ActivationImp::ActivationImp): Make a marking
      	list, not a refing list.
      	- a cut at the sparse array implementation
              * kjs/array_instance.h: Keep storageLength separate from length.
              * kjs/array_object.cpp:
              (ArrayInstanceImp::ArrayInstanceImp): Start with storageLength == length.
              (ArrayInstanceImp::get): Check against storage length.
              (ArrayInstanceImp::put): Ditto.
              (ArrayInstanceImp::hasProperty): Ditto.
              (ArrayInstanceImp::deleteProperty): Ditto.
              (ArrayInstanceImp::setLength): Only enlarge storage length up to a cutoff.
              (ArrayInstanceImp::mark): Use storageLength.
              (ArrayInstanceImp::pushUndefinedObjectsToEnd): Added FIXME.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      - decrease ref/deref -- 5% speedup in iBench · c758b286
      darin authored
              * JavaScriptCore.pbproj/project.pbxproj: Added array_instance.h
              * kjs/array_instance.h: Added so it can be shared by function.h.
              * kjs/array_object.cpp:
              * kjs/array_object.h:
              * kjs/bool_object.cpp:
              * kjs/bool_object.h:
              * kjs/collector.cpp:
              * kjs/date_object.cpp:
              * kjs/date_object.h:
              * kjs/error_object.cpp:
              * kjs/function.cpp:
              * kjs/function.h:
              * kjs/function_object.cpp:
              * kjs/internal.cpp:
              * kjs/internal.h:
              * kjs/math_object.cpp:
              * kjs/nodes.cpp:
              * kjs/number_object.cpp:
              * kjs/object.cpp:
              * kjs/object.h:
              * kjs/object_object.cpp:
              * kjs/property_map.cpp:
              * kjs/reference.cpp:
              * kjs/reference.h:
              * kjs/regexp_object.cpp:
              * kjs/string_object.cpp:
              * kjs/string_object.h:
              * kjs/value.cpp:
              * kjs/value.h:
      	Switched lots of interfaces so they don't require ref/deref.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs's avatar
      Fixed the two most obvious problems with the new GC for another 6% · 3d0d1816
      mjs authored
              * kjs/collector.cpp:
              (Collector::allocate): Don't bother doing the bit tests on a bitmap word if
      	all it's bits are on.
              (Collector::collect): Track memoryFull boolean.
              * kjs/collector.h: Inlined outOfMemory since it was showing up on profiles.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2781 268f45cc-cd09-0410-ab3c-d52691b4dbfc