Ignore:
Timestamp:
May 1, 2018, 1:47:56 AM (7 years ago)
Author:
[email protected]
Message:

WebAssembly: add support for stream APIs - JavaScript API
https://bugs.webkit.org/show_bug.cgi?id=183442

Reviewed by Yusuke Suzuki and JF Bastien.

  • Source/cmake/WebKitFeatures.cmake:

LayoutTests/imported/w3c:

  • web-platform-tests/wasm/resources/incrementer.no_mime_type.wasm: Added.
  • web-platform-tests/wasm/resources/incrementer.wasm: Added.
  • web-platform-tests/wasm/resources/incrementer.wasm.headers: Added.
  • web-platform-tests/wasm/resources/incrementer.wrong_mime_type.wasm: Added.
  • web-platform-tests/wasm/resources/incrementer.wrong_mime_type.wasm.headers: Added.
  • web-platform-tests/wasm/wasm_stream_compile_test-expected.txt: Added.
  • web-platform-tests/wasm/wasm_stream_compile_test.html: Added.
  • web-platform-tests/wasm/wasm_stream_instantiate_test-expected.txt: Added.
  • web-platform-tests/wasm/wasm_stream_instantiate_test.html: Added.

Source/JavaScriptCore:

Add WebAssembly stream API. Current patch only add functions
WebAssembly.compileStreaming and WebAssembly.instantiateStreaming but,
does not add streaming way of the implementation. So in current version it
only wait for load whole module, than start to parse.

  • CMakeLists.txt:
  • Configurations/FeatureDefines.xcconfig:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/BuiltinNames.h:
  • builtins/WebAssemblyPrototype.js: Copied from Source/JavaScriptCore/wasm/js/WebAssemblyPrototype.h.

(compileStreaming):
(instantiateStreaming):

  • jsc.cpp:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObject.h:
  • runtime/Options.h:
  • runtime/PromiseDeferredTimer.cpp:

(JSC::PromiseDeferredTimer::hasPendingPromise):
(JSC::PromiseDeferredTimer::hasDependancyInPendingPromise):

  • runtime/PromiseDeferredTimer.h:
  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::webAssemblyModuleValidateAsyncInternal):
(JSC::webAssemblyCompileFunc):
(JSC::WebAssemblyPrototype::webAssemblyModuleValidateAsync):
(JSC::webAssemblyModuleInstantinateAsyncInternal):
(JSC::WebAssemblyPrototype::webAssemblyModuleInstantinateAsync):
(JSC::webAssemblyCompileStreamingInternal):
(JSC::webAssemblyInstantiateStreamingInternal):
(JSC::WebAssemblyPrototype::create):
(JSC::WebAssemblyPrototype::finishCreation):

  • wasm/js/WebAssemblyPrototype.h:

Source/WebCore:

Add WebAssembly streaming API to WebCore.

  • Configurations/FeatureDefines.xcconfig:
  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::tryAllocate):
(WebCore::isResponseCorrect):
(WebCore::handleResponseOnStreamingAction):
(WebCore::JSDOMWindowBase::compileStreaming):
(WebCore::JSDOMWindowBase::instantiateStreaming):

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSRemoteDOMWindowBase.cpp:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:

Source/WebCore/PAL:

Add WEBASSEMBLY_STREAMING_API feature flag

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Add WEBASSEMBLY_STREAMING_API feature flag

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

Add WEBASSEMBLY_STREAMINNG_API feature flag

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

Oleksandrs-MacBook-Pro:WebKit developer$ Tools/Scripts/commit-log-editor --print-log ChangeLog LayoutTests/ChangeLog LayoutTests/imported/w3c/ChangeLog Source/JavaScriptCore/ChangeLog Source/WebCore/ChangeLog Source/WebCore/PAL/ChangeLog Source/WebKit/ChangeLog Source/WebKitLegacy/mac/ChangeLog Tools/ChangeLog
WebAssembly: add support for stream APIs - JavaScript API
https://bugs.webkit.org/show_bug.cgi?id=183442

Reviewed by Yusuke Suzuki and JF Bastien.

  • Source/cmake/WebKitFeatures.cmake:

LayoutTests/imported/w3c:

  • web-platform-tests/wasm/resources/incrementer.no_mime_type.wasm: Added.
  • web-platform-tests/wasm/resources/incrementer.wasm: Added.
  • web-platform-tests/wasm/resources/incrementer.wasm.headers: Added.
  • web-platform-tests/wasm/resources/incrementer.wrong_mime_type.wasm: Added.
  • web-platform-tests/wasm/resources/incrementer.wrong_mime_type.wasm.headers: Added.
  • web-platform-tests/wasm/wasm_stream_compile_test-expected.txt: Added.
  • web-platform-tests/wasm/wasm_stream_compile_test.html: Added.
  • web-platform-tests/wasm/wasm_stream_instantiate_test-expected.txt: Added.
  • web-platform-tests/wasm/wasm_stream_instantiate_test.html: Added.

Source/JavaScriptCore:

Add WebAssembly stream API. Current patch only add functions
WebAssembly.compileStreaming and WebAssembly.instantiateStreaming but,
does not add streaming way of the implementation. So in current version it
only wait for load whole module, than start to parse.

  • CMakeLists.txt:
  • Configurations/FeatureDefines.xcconfig:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/BuiltinNames.h:
  • builtins/WebAssemblyPrototype.js: Copied from Source/JavaScriptCore/wasm/js/WebAssemblyPrototype.h.

(compileStreaming):
(instantiateStreaming):

  • jsc.cpp:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObject.h:
  • runtime/Options.h:
  • runtime/PromiseDeferredTimer.cpp:

(JSC::PromiseDeferredTimer::hasPendingPromise):
(JSC::PromiseDeferredTimer::hasDependancyInPendingPromise):

  • runtime/PromiseDeferredTimer.h:
  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::webAssemblyModuleValidateAsyncInternal):
(JSC::webAssemblyCompileFunc):
(JSC::WebAssemblyPrototype::webAssemblyModuleValidateAsync):
(JSC::webAssemblyModuleInstantinateAsyncInternal):
(JSC::WebAssemblyPrototype::webAssemblyModuleInstantinateAsync):
(JSC::webAssemblyCompileStreamingInternal):
(JSC::webAssemblyInstantiateStreamingInternal):
(JSC::WebAssemblyPrototype::create):
(JSC::WebAssemblyPrototype::finishCreation):

  • wasm/js/WebAssemblyPrototype.h:

Source/WebCore:

Add WebAssembly streaming API to WebCore.

  • Configurations/FeatureDefines.xcconfig:
  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::tryAllocate):
(WebCore::isResponseCorrect):
(WebCore::handleResponseOnStreamingAction):
(WebCore::JSDOMWindowBase::compileStreaming):
(WebCore::JSDOMWindowBase::instantiateStreaming):

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSRemoteDOMWindowBase.cpp:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:

Source/WebCore/PAL:

Add WEBASSEMBLY_STREAMING_API feature flag

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Add WEBASSEMBLY_STREAMING_API feature flag

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

Add WEBASSEMBLY_STREAMINNG_API feature flag

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

  • platform/ios-simulator/TestExpectations:
  • platform/win/TestExpectations:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jsc.cpp

    r230798 r231194  
    643643    nullptr, // promiseRejectionTracker
    644644    nullptr, // defaultLanguage
     645    nullptr, // compileStreaming
     646    nullptr, // instantinateStreaming
    645647};
    646648
Note: See TracChangeset for help on using the changeset viewer.