Timeline
Jan 2, 2017:
- 6:56 PM Changeset in webkit [210231] by
-
- 2 edits in trunk/Source/WebCore
Unreviewed, follow-up fix for r210227
https://bugs.webkit.org/show_bug.cgi?id=166586
Suggested in the above bug.
- bindings/scripts/StaticString.pm:
(GenerateStrings):
- 6:40 PM Changeset in webkit [210230] by
-
- 5 edits in trunk
Leverage Substring to create new AtomicStringImpl for StaticStringImpl and SymbolImpl
https://bugs.webkit.org/show_bug.cgi?id=166636
Reviewed by Darin Adler.
Source/WTF:
Previously we always create the full atomic string if we need to create the same string
based on the given value. For example, when generating AtomicStringImpl from the SymbolImpl,
we need to create a new AtomicStringImpl since SymbolImpl never becomesisAtomic() == true.
But it is costly.
This patch leverages the substring system of StringImpl. Instead of allocating the completely
duplicate string, we create a substring StringImpl that shares the same content with the
base string.
- wtf/text/AtomicStringImpl.cpp:
(WTF::stringTable):
(WTF::addToStringTable):
(WTF::addSubstring):
(WTF::AtomicStringImpl::addSlowCase):
(WTF::AtomicStringImpl::remove):
(WTF::AtomicStringImpl::lookUpSlowCase):
- wtf/text/StringImpl.h:
(WTF::StringImpl::StaticStringImpl::operator StringImpl&):
Tools:
- TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::TEST):
- 5:57 PM Changeset in webkit [210229] by
-
- 41 edits1 copy2 adds in trunk
WebAssembly: handle and optimize wasm export → wasm import calls
https://bugs.webkit.org/show_bug.cgi?id=165282
Reviewed by Saam Barati.
JSTests:
- wasm/Builder.js: Add a Proxy to Builder.js, which intercepts
unknown property lookups. This creates way better error messages
on typos than 'undefined is not a function', which happens
semi-frequently as I typo opcode names (and which one is a typo is
hard to find because we chain builders).
(const._isValidValue):
(get target):
(const._importFunctionContinuation):
(const._importMemoryContinuation):
(const._importTableContinuation):
(const._exportFunctionContinuation):
(export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
(export.default.Builder.prototype._registerSectionBuilders.this.Unknown):
- wasm/LowLevelBinary.js: Add limited support for var{u}int64 (only the 32-bit values)
(export.default.LowLevelBinary.prototype.varint32):
(export.default.LowLevelBinary.prototype.varuint64):
(export.default.LowLevelBinary.prototype.varint64):
- wasm/function-tests/exceptions.js: update error message
- wasm/function-tests/trap-load.js: update error message
- wasm/function-tests/trap-store.js: update error message
- wasm/js-api/wasm-to-wasm-bad-signature.js: Added. Test a bunch of bad wasm->wasm import signatures
(const.makeImportee.signature.switch):
(BadSignatureDropStartParams):
- wasm/js-api/wasm-to-wasm.js: Added. Test 64-bit wasm->wasm import calls
(const.callerModule):
(const.calleeModule):
(WasmToWasm):
Source/JavaScriptCore:
- Add a new JSType for WebAssemblyFunction, and use it when creating its structure. This will is used to quickly detect from wasm whether the import call is to another wasm module, or whether it's to JS.
- Generate two stubs from the import stub generator: one for wasm->JS and one for wasm -> wasm. This is done at Module time. Which is called will only be known at Instance time, once we've received the import object. We want to avoid codegen at Instance time, so having both around is great.
- Restore the WebAssembly global state (VM top Instance, and pinned registers) after call / call_indirect, and in the JS->wasm entry stub.
- Pinned registers are now a global thing, not per-Memory, because the wasm -> wasm stubs are generated at Module time where we don't really have enough information to do the right thing (doing so would generate too much code).
- CMakeLists.txt:
- JavaScriptCore.xcodeproj/project.pbxproj:
- runtime/JSType.h: add WebAssemblyFunctionType as a JSType
- wasm/WasmB3IRGenerator.cpp: significantly rework how calls which
could be external work, and how we save / restore global state:
VM's top Instance, and pinned registers
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::getMemoryBaseAndSize):
(JSC::Wasm::restoreWebAssemblyGlobalState):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):
- wasm/WasmB3IRGenerator.h:
- wasm/WasmBinding.cpp:
(JSC::Wasm::materializeImportJSCell):
(JSC::Wasm::wasmToJS):
(JSC::Wasm::wasmToWasm): the main goal of this patch was adding this function
(JSC::Wasm::exitStubGenerator):
- wasm/WasmBinding.h:
- wasm/WasmFormat.h: Get rid of much of the function index space:
we already have all of its information elsewhere, and as-is it
provides no extra efficiency.
(JSC::Wasm::ModuleInformation::functionIndexSpaceSize):
(JSC::Wasm::ModuleInformation::isImportedFunctionFromFunctionIndexSpace):
(JSC::Wasm::ModuleInformation::signatureIndexFromFunctionIndexSpace):
- wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::FunctionParser):
- wasm/WasmMemory.cpp: Add some logging.
(JSC::Wasm::Memory::dump): this was nice when debugging
(JSC::Wasm::Memory::makeString):
(JSC::Wasm::Memory::Memory):
(JSC::Wasm::Memory::~Memory):
(JSC::Wasm::Memory::grow):
- wasm/WasmMemory.h: don't use extra indirection, it wasn't
needed. Reorder some of the fields which are looked up at runtime
so they're more cache-friendly.
(JSC::Wasm::Memory::Memory):
(JSC::Wasm::Memory::mode):
(JSC::Wasm::Memory::offsetOfSize):
- wasm/WasmMemoryInformation.cpp: Pinned registers are now a
global thing for all of JSC, not a per-Memory thing
anymore. wasm->wasm calls are more complex otherwise: they have to
figure out how to bridge between the caller and callee's
special-snowflake pinning.
(JSC::Wasm::PinnedRegisterInfo::get):
(JSC::Wasm::PinnedRegisterInfo::PinnedRegisterInfo):
(JSC::Wasm::MemoryInformation::MemoryInformation):
- wasm/WasmMemoryInformation.h:
- wasm/WasmModuleParser.cpp:
- wasm/WasmModuleParser.h:
- wasm/WasmPageCount.cpp: Copied from Source/JavaScriptCore/wasm/WasmBinding.h.
(JSC::Wasm::PageCount::dump): nice for debugging
- wasm/WasmPageCount.h:
- wasm/WasmPlan.cpp:
(JSC::Wasm::Plan::parseAndValidateModule):
(JSC::Wasm::Plan::run):
- wasm/WasmPlan.h:
(JSC::Wasm::Plan::takeWasmExitStubs):
- wasm/WasmSignature.cpp:
(JSC::Wasm::Signature::toString):
(JSC::Wasm::Signature::dump):
- wasm/WasmSignature.h:
- wasm/WasmValidate.cpp:
(JSC::Wasm::validateFunction):
- wasm/WasmValidate.h:
- wasm/js/JSWebAssemblyInstance.h:
(JSC::JSWebAssemblyInstance::offsetOfTable):
(JSC::JSWebAssemblyInstance::offsetOfImportFunctions):
(JSC::JSWebAssemblyInstance::offsetOfImportFunction):
- wasm/js/JSWebAssemblyMemory.cpp:
(JSC::JSWebAssemblyMemory::create):
(JSC::JSWebAssemblyMemory::JSWebAssemblyMemory):
(JSC::JSWebAssemblyMemory::buffer):
(JSC::JSWebAssemblyMemory::grow):
- wasm/js/JSWebAssemblyMemory.h:
(JSC::JSWebAssemblyMemory::memory):
(JSC::JSWebAssemblyMemory::offsetOfMemory):
(JSC::JSWebAssemblyMemory::offsetOfSize):
- wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::create):
(JSC::JSWebAssemblyModule::JSWebAssemblyModule):
- wasm/js/JSWebAssemblyModule.h:
(JSC::JSWebAssemblyModule::signatureIndexFromFunctionIndexSpace):
(JSC::JSWebAssemblyModule::functionImportCount):
- wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction):
(JSC::WebAssemblyFunction::create):
(JSC::WebAssemblyFunction::createStructure):
(JSC::WebAssemblyFunction::WebAssemblyFunction):
(JSC::WebAssemblyFunction::finishCreation):
- wasm/js/WebAssemblyFunction.h:
(JSC::WebAssemblyFunction::wasmEntrypoint):
(JSC::WebAssemblyFunction::offsetOfInstance):
(JSC::WebAssemblyFunction::offsetOfWasmEntryPointCode):
- wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance): always start with a dummy
memory, so wasm->wasm calls don't need to null-check
- wasm/js/WebAssemblyMemoryConstructor.cpp:
(JSC::constructJSWebAssemblyMemory):
- wasm/js/WebAssemblyModuleConstructor.cpp:
(JSC::WebAssemblyModuleConstructor::createModule):
- wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):
- wasm/js/WebAssemblyModuleRecord.h:
- 4:32 PM Changeset in webkit [210228] by
-
- 4 edits1 add in trunk
WebAssembly: Some loads don't take into account the offset
https://bugs.webkit.org/show_bug.cgi?id=166616
<rdar://problem/29841541>
Reviewed by Keith Miller.
JSTests:
- wasm/function-tests/load-offset.js: Added.
Source/JavaScriptCore:
- wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::emitLoadOp):
- 1:22 PM Changeset in webkit [210227] by
-
- 8 edits in trunk/Source
Use StaticStringImpl instead of StaticASCIILiteral
https://bugs.webkit.org/show_bug.cgi?id=166586
Reviewed by Darin Adler.
Source/WebCore:
- bindings/scripts/StaticString.pm:
(GenerateStrings):
Source/WTF:
It is more handy way to define static StringImpl. It calculates the length
and hash value by using the constexpr constructor and function. So we do
not need to calculate these things in Perl script.
And it allows us to use StaticStringImpl in the hand written C++ code.
Previously, we need to calculate the length and hash value by hand if we
would like to use StaticASCIILiteral in the hand written C++ code, and it
meant that we cannot use it at all in the hand written C++ code.
- wtf/text/AtomicStringImpl.cpp:
(WTF::AtomicStringImpl::addSlowCase):
(WTF::AtomicStringImpl::lookUpSlowCase):
- wtf/text/AtomicStringImpl.h:
- wtf/text/StringImpl.h:
- wtf/text/SymbolImpl.h:
- wtf/text/UniquedStringImpl.h:
- 1:20 PM WebInspectorCodingStyleGuide edited by
- (diff)
- 1:16 PM Changeset in webkit [210226] by
-
- 8 edits in trunk/Source/WebCore
Drop the render tree for documents in the page cache.
<https://webkit.org/b/121798>
Reviewed by Antti Koivisto.
To save memory and reduce complexity, have documents tear down their render tree
when entering the page cache. I've wanted to do this for a long time and it seems
like we can actually do it now.
This patch will enable a number of clean-ups since it's no longer valid for renderers
to exist while the document is in page cache.
- dom/Document.cpp:
(WebCore::Document::destroyRenderTree): Remove assertion that we're not in the page cache
since we will now be tearing down render trees right as they enter the page cache.
- dom/PageCache.cpp:
(WebCore::destroyRenderTree):
(WebCore::PageCache::addIfCacheable): Tear down the render tree right before setting
the in-cache flag. The render tree is destroyed in bottom-up order to ensure that the
main frame renderers die last.
- history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
- page/FrameView.h:
- page/FrameView.cpp:
(WebCore::FrameView::didRestoreFromPageCache): Update the scollable area set after restoring
a frame from the page cache. This dirties the scrolling tree, which was covered by tests.
- page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::setNeedsStyleRecalc):
- page/animation/AnimationController.cpp:
(WebCore::AnimationController::cancelAnimations): Make these no-ops if called
while the render tree is being torn down. This fixes some assertion failures
on layout tests and avoids pointless style invalidation.
- 8:41 AM Changeset in webkit [210225] by
-
- 2 edits in trunk/Tools
[GTK] WebCore/CSSParser unit test is not being built
https://bugs.webkit.org/show_bug.cgi?id=166492
Reviewed by Michael Catanzaro.
This test was introduced in r175930, but we were not building
it on GTK+ port since r176015.
This patch marks the test to be built again on GTK+.
JFTR, the test is passing right now.
- TestWebKitAPI/PlatformGTK.cmake: Add CSSParser.cpp test file and use
ADD_WHOLE_ARCHIVE_TO_LIBRARIES to avoid linking errors.
- 7:36 AM Changeset in webkit [210224] by
-
- 9 edits in trunk/Source
Discard media controls JS/CSS caches under memory pressure.
<https://webkit.org/b/166639>
Reviewed by Antti Koivisto.
Source/WebCore:
Add a RenderTheme::purgeCaches() virtual and teach the iOS and macOS implementations
to drop their cached media controls JS/CSS strings there. The strings are only cleared
if nothing else is referencing them, which gives us a decent "weak cache" behavior.
This sheds ~300kB memory on iOS with the current media controls.
- page/MemoryRelease.cpp:
(WebCore::releaseNoncriticalMemory):
- rendering/RenderTheme.h:
(WebCore::RenderTheme::purgeCaches):
- rendering/RenderThemeIOS.h:
- rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::purgeCaches):
- rendering/RenderThemeMac.h:
- rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::purgeCaches):
Source/WTF:
- wtf/text/WTFString.h:
(WTF::String::clearImplIfNotShared): Add a helper for clearing a String if the underlying
StringImpl is not referenced by anyone else.
- 5:54 AM Changeset in webkit [210223] by
-
- 2 edits in trunk/Source/WebCore
[GTK] Since the memory pressure relief has been activated, my disk has a high usage and the desktop stalls
https://bugs.webkit.org/show_bug.cgi?id=164052
Reviewed by Michael Catanzaro.
Check how much memory is freed by the memory pressure handler and wait for a long time if we didn't free that
much.
- platform/linux/MemoryPressureHandlerLinux.cpp:
(WebCore::MemoryPressureHandler::EventFDPoller::EventFDPoller):
- 1:02 AM Changeset in webkit [210222] by
-
- 9 edits2 adds in trunk
AX: Expose block quote level to iOS API
https://bugs.webkit.org/show_bug.cgi?id=166629
<rdar://problem/29834793>
Reviewed by Darin Adler.
Source/WebCore:
Expose the blockquote level to iOS Accessbility API.
Change the return type of blockquote level to unsigned.
Test: accessibility/ios-simulator/blockquote-level.html
- accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::blockquoteLevel):
- accessibility/AccessibilityObject.h:
- accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityBlockquoteLevel]):
- accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
Tools:
- DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::numberAttributeValue):
- WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::numberAttributeValue):
LayoutTests:
- accessibility/ios-simulator/blockquote-level-expected.txt: Added.
- accessibility/ios-simulator/blockquote-level.html: Added.
Jan 1, 2017:
- 12:23 PM Changeset in webkit [210221] by
-
- 19 edits in trunk
Update user-visible copyright strings to include 2017
https://bugs.webkit.org/show_bug.cgi?id=166278
Reviewed by Dan Bernstein.
Source/JavaScriptCore:
- Info.plist:
Source/WebCore:
- Info.plist:
Source/WebKit/mac:
- Info.plist:
Source/WebKit2:
- DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist:
- Info.plist:
- NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist:
- NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
- NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist:
- PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist:
- PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
- WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist:
- WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
- WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
WebKitLibraries:
- win/tools/scripts/COPYRIGHT-END-YEAR:
- 8:46 AM Changeset in webkit [210220] by
-
- 2 edits in trunk/Source/WebCore
GraphicsContextCairo: setMiterLimit() is missing the DisplayListRecorder diversion
https://bugs.webkit.org/show_bug.cgi?id=166539
Reviewed by Michael Catanzaro.
- platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setMiterLimit): Call the setMiterLimit() method on the
m_displayListRecorder object when the GraphicsContext object is in recording mode.
- 8:15 AM Changeset in webkit [210219] by
-
- 4 edits in trunk/Source/WebCore
Clean up GraphicsContext3D forward declarations, header inclusion
https://bugs.webkit.org/show_bug.cgi?id=166537
Reviewed by Alex Christensen.
Remove two unnecessary GraphicsContext3D forward declarations from the
EmptyClients and ChromeClient header files, and remove the unnecessary
GraphicsContext3D.h header inclusion from RenderLayerBacking.
No changes in behavior.
- loader/EmptyClients.h:
- page/ChromeClient.h:
- rendering/RenderLayerBacking.cpp: