Ignore:
Timestamp:
Dec 20, 2016, 12:20:05 PM (8 years ago)
Author:
[email protected]
Message:

WebAssembly API: implement WebAssembly.LinkError
https://bugs.webkit.org/show_bug.cgi?id=165805
<rdar://problem/29747874>

JSTests:

Reviewed by Mark lam.

Update all exception sites which now throw WebAssembly.LinkError.

  • wasm/js-api/element-data.js:
  • wasm/js-api/element.js:

(assert.throws):

  • wasm/js-api/global-error.js:

(new.Number):

  • wasm/js-api/table.js:

(assert.throws):
(new.WebAssembly.Table):

  • wasm/js-api/test_Data.js:
  • wasm/js-api/test_basic_api.js:

(const.c.in.constructorProperties.switch):

  • wasm/js-api/test_memory.js:

(test):
(test.testMemImportError): Deleted.

Source/JavaScriptCore:

Reviewed by Mark Lam.

As described here: https://github.com/WebAssembly/design/pull/901
Some TypeError and RangeError are now converted to WebAssembly.LinkError.

  • CMakeLists.txt: add files
  • DerivedSources.make: add autoget .lut.h files
  • JavaScriptCore.xcodeproj/project.pbxproj: add files
  • builtins/BuiltinNames.h: new name LinkError
  • runtime/JSGlobalObject.h: auto-register LinkError using existing macro magic
  • wasm/JSWebAssembly.h: make the new includes available
  • wasm/js/JSWebAssemblyLinkError.cpp: Copied from Source/JavaScriptCore/wasm/JSWebAssemblyCompileError.cpp.

(JSC::JSWebAssemblyLinkError::create):
(JSC::JSWebAssemblyLinkError::JSWebAssemblyLinkError):
(JSC::createWebAssemblyLinkError):

  • wasm/js/JSWebAssemblyLinkError.h: Copied from Source/JavaScriptCore/wasm/JSWebAssemblyCompileError.h.

(JSC::JSWebAssemblyLinkError::create):

  • wasm/js/WebAssemblyInstanceConstructor.cpp: update as per spec change

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyLinkErrorConstructor.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyCompileErrorConstructor.cpp.

(JSC::constructJSWebAssemblyLinkError):
(JSC::callJSWebAssemblyLinkError):
(JSC::WebAssemblyLinkErrorConstructor::create):
(JSC::WebAssemblyLinkErrorConstructor::createStructure):
(JSC::WebAssemblyLinkErrorConstructor::finishCreation):
(JSC::WebAssemblyLinkErrorConstructor::WebAssemblyLinkErrorConstructor):
(JSC::WebAssemblyLinkErrorConstructor::getConstructData):
(JSC::WebAssemblyLinkErrorConstructor::getCallData):

  • wasm/js/WebAssemblyLinkErrorConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyCompileErrorConstructor.h.
  • wasm/js/WebAssemblyLinkErrorPrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyCompileErrorPrototypr.cpp.

(JSC::WebAssemblyLinkErrorPrototype::create):
(JSC::WebAssemblyLinkErrorPrototype::createStructure):
(JSC::WebAssemblyLinkErrorPrototype::finishCreation):
(JSC::WebAssemblyLinkErrorPrototype::WebAssemblyLinkErrorPrototype):

  • wasm/js/WebAssemblyLinkErrorPrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyCompileErrorPrototypr.h.
  • wasm/js/WebAssemblyModuleRecord.cpp: update as per spec change

(JSC::dataSegmentFail):
(JSC::WebAssemblyModuleRecord::evaluate):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/DerivedSources.make

    r208821 r210028  
    170170    WebAssemblyInstanceConstructor.lut.h \
    171171    WebAssemblyInstancePrototype.lut.h \
     172    WebAssemblyLinkErrorConstructor.lut.h \
     173    WebAssemblyLinkErrorPrototype.lut.h \
    172174    WebAssemblyMemoryConstructor.lut.h \
    173175    WebAssemblyMemoryPrototype.lut.h \
Note: See TracChangeset for help on using the changeset viewer.