|
Simpler return value of HashTable::add/HashMap:add and others
The current return value of HashTable::add() is a bool paired
with an iterator object. The creation and destruction of that
iterator object contributed to code size and since it was only
used at a few places it was not worth it.
Instead, let us return a bool paired with a pointer to the stored
object. That is after all what the code using the iterator object
wanted to have. I renamed the variable iterator -> storedValue
which is 99% [magic number] of the patch. Most users of HashTable
did not access iterator and did not have to change at all.
This change saves roughly 100 KB binary size of an x64 content_shell
built with clang. Other compilers, other architectures will save
different amounts, most likely less since most are not 64 bit.
The save is both in the instantiated ::add methods that don't have
to create an iterator object, and in the callers that don't have
to copy and destroy it.
R=morrita@chromium.org
RSR=eseidel@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167217
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+242 lines, -199 lines) |
Patch |
|
|
Source/bindings/v8/DOMWrapperMap.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/bindings/v8/DOMWrapperWorld.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/bindings/v8/NPV8Object.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/core/animation/KeyframeEffectModel.cpp
|
View
|
|
1 chunk |
+7 lines, -6 lines |
0 comments
|
Download
|
|
|
Source/core/css/CSSFontFaceSource.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/css/CSSSegmentedFontFace.cpp
|
View
|
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
|
Source/core/css/CSSValuePool.cpp
|
View
|
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
|
Source/core/css/FontFaceCache.cpp
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
|
Source/core/css/PropertySetCSSStyleDeclaration.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/css/RuleFeature.cpp
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
|
Source/core/css/RuleSet.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/core/css/StyleSheetContents.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/css/resolver/MatchedPropertiesCache.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/core/css/resolver/ScopedStyleTree.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
|
Source/core/css/resolver/StyleBuilderCustom.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/core/dom/ChildListMutationScope.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/core/dom/Document.cpp
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
|
Source/core/dom/DocumentMarkerController.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/dom/DocumentOrderedMap.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/dom/Element.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/dom/ElementDataCache.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/dom/ExecutionContext.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/dom/IdTargetObserverRegistry.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/core/dom/Node.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/core/dom/NodeRareData.h
|
View
|
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
|
Source/core/dom/PresentationAttributeStyle.cpp
|
View
|
|
3 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
|
Source/core/dom/QualifiedName.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/dom/SpaceSplitString.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/dom/StyleEngine.cpp
|
View
|
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
|
Source/core/dom/custom/CustomElementScheduler.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp
|
View
|
|
1 chunk |
+5 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/core/dom/shadow/ElementShadow.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/events/EventPath.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/core/fetch/ResourceLoadPriorityOptimizer.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/html/HTMLCollection.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/html/PublicURLManager.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/html/forms/CheckedRadioButtons.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/html/forms/FormController.cpp
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
|
Source/core/inspector/AsyncCallStackTracker.cpp
|
View
|
|
1 chunk |
+8 lines, -4 lines |
0 comments
|
Download
|
|
|
Source/core/inspector/DOMPatchSupport.cpp
|
View
|
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
|
|
Source/core/inspector/InspectorConsoleAgent.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/inspector/InspectorDOMAgent.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
|
Source/core/inspector/InspectorDebuggerAgent.cpp
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/core/inspector/InspectorTimelineAgent.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/inspector/TraceEventDispatcher.cpp
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/core/page/EventHandler.cpp
|
View
|
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/core/page/TouchDisambiguation.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/page/scrolling/ScrollingCoordinator.cpp
|
View
|
|
4 chunks |
+9 lines, -5 lines |
0 comments
|
Download
|
|
|
Source/core/rendering/FastTextAutosizer.cpp
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
|
Source/core/rendering/RenderBlockLineLayout.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/core/rendering/RenderLayer.cpp
|
View
|
|
1 chunk |
+5 lines, -3 lines |
0 comments
|
Download
|
|
|
Source/core/rendering/RenderObject.cpp
|
View
|
|
1 chunk |
+6 lines, -3 lines |
0 comments
|
Download
|
|
|
Source/core/rendering/RenderRegion.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/rendering/RenderView.cpp
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
|
Source/core/rendering/shapes/ShapeInfo.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/rendering/svg/RenderSVGResourceGradient.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/rendering/svg/RenderSVGResourcePattern.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/rendering/svg/SVGResourcesCache.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/svg/SVGDocumentExtensions.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/core/svg/animation/SMILTimeContainer.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/core/svg/properties/SVGAttributeToPropertyMap.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
|
Source/core/xml/XMLHttpRequest.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/modules/webdatabase/QuotaTracker.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/modules/webdatabase/SQLTransactionCoordinator.cpp
|
View
|
|
1 chunk |
+7 lines, -4 lines |
0 comments
|
Download
|
|
|
Source/platform/exported/WebHTTPLoadInfo.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/platform/fonts/WidthCache.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/platform/fonts/harfbuzz/HarfBuzzFace.cpp
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
|
Source/platform/fonts/harfbuzz/HarfBuzzFaceSkia.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/platform/fonts/mac/SimpleFontDataCoreText.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/platform/fonts/mac/SimpleFontDataMac.mm
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/platform/fonts/skia/SimpleFontDataSkia.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/platform/fonts/win/UniscribeHelper.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/platform/graphics/ImageDecodingStore.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/platform/network/ResourceRequest.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/platform/network/ResourceResponse.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/platform/network/WebSocketHandshakeRequest.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/platform/weborigin/SecurityPolicy.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/wtf/HashCountedSet.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/wtf/HashMap.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/wtf/HashTable.h
|
View
|
|
7 chunks |
+17 lines, -13 lines |
0 comments
|
Download
|
|
|
Source/wtf/InstanceCounter.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
Source/wtf/ListHashSet.h
|
View
|
|
5 chunks |
+26 lines, -10 lines |
0 comments
|
Download
|
|
|
Source/wtf/RefPtrHashMap.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
Source/wtf/text/AtomicString.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 7 (0 generated)
|