Changeset 207572 in webkit


Ignore:
Timestamp:
Oct 19, 2016 3:11:11 PM (8 years ago)
Author:
jfbastien@apple.com
Message:

JavaScript WebAssembly API: baby steps

  • Expand WebAssembly constructors into their own files. This requires a lot of boilerplate, as well as adding the .lut.h files. All of the JSWebAssembly*.{h,cpp}, as well as Constructor and Prototype files, are currently the same between the 4 specified WebAssembly constructors. It'll be easy to implement individual functions on constructed objects as per the spec, and have each of these files diverge. The error constructors are also similar, except that their instance derives from ErrorInstance.
  • Use constructor macro when initializing the global object.
  • Dramatically improve testing of the WebAssembly API by checking for properties specified in the spec [*].
  • Clean up assert.js' exception testing.
  • Fix a copy-paste bug in wasm.json: floating-point const return values were swapped.

[*] https://github.com/WebAssembly/design/blob/master/JS.md

Implement more of the JavaScript WebAssembly API
https://bugs.webkit.org/show_bug.cgi?id=163571

Reviewed by Keith Miller.

JSTests:

  • wasm/assert.js:

(export.const.isUndef): add this useful helper
(export.const.throws): fold other throw checks into this one, and check message as well

  • wasm/js-api/test_basic_api.js:

(const.checkOwnPropertyDescriptor): check own property descriptor follows the spec

  • wasm/self-test/test_BuilderJSON.js:

(const.assertOpThrows): use new assert API
(CheckedOpcodeArgumentsTooMany): ditto
(CheckedOpcodeArgumentsNotEnough): ditto
(CallInvalid): ditto
(I32ConstInvalid): ditto
(F32ConstInvalid): ditto (and this caugth the JSON copy-paste bug)
(F64ConstInvalid): ditto

  • wasm/self-test/test_LowLevelBinary_varint.js: use new assert API
  • wasm/self-test/test_LowLevelBinary_varuint.js: use new assert API
  • wasm/utilities.js: add "global" object, used in basic API test (to access global.WebAssembly).
  • wasm/wasm.json: fix copy-paste

Source/JavaScriptCore:

  • CMakeLists.txt: add .lut.h generation
  • DerivedSources.make: ditto
  • JavaScriptCore.xcodeproj/project.pbxproj: add .lut.h generation and all the new files
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init): use macro to list all constructors

  • wasm/WebAssemblyObject.cpp: unboilerplate, all constructors into their own files
  • wasm/WebAssemblyObject.h: ditto
  • wasm/js/JSWebAssemblyCompileError.cpp: Added.

(JSC::JSWebAssemblyCompileError::create):
(JSC::JSWebAssemblyCompileError::createStructure):
(JSC::JSWebAssemblyCompileError::JSWebAssemblyCompileError):
(JSC::JSWebAssemblyCompileError::finishCreation):
(JSC::JSWebAssemblyCompileError::destroy):
(JSC::JSWebAssemblyCompileError::visitChildren):

  • wasm/js/JSWebAssemblyCompileError.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/JSWebAssemblyInstance.cpp: Added.

(JSC::JSWebAssemblyInstance::create):
(JSC::JSWebAssemblyInstance::createStructure):
(JSC::JSWebAssemblyInstance::JSWebAssemblyInstance):
(JSC::JSWebAssemblyInstance::finishCreation):
(JSC::JSWebAssemblyInstance::destroy):
(JSC::JSWebAssemblyInstance::visitChildren):

  • wasm/js/JSWebAssemblyInstance.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/JSWebAssemblyMemory.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::JSWebAssemblyMemory::create):
(JSC::JSWebAssemblyMemory::createStructure):
(JSC::JSWebAssemblyMemory::JSWebAssemblyMemory):
(JSC::JSWebAssemblyMemory::finishCreation):
(JSC::JSWebAssemblyMemory::destroy):
(JSC::JSWebAssemblyMemory::visitChildren):

  • wasm/js/JSWebAssemblyMemory.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/JSWebAssemblyModule.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::JSWebAssemblyModule::create):
(JSC::JSWebAssemblyModule::createStructure):
(JSC::JSWebAssemblyModule::JSWebAssemblyModule):
(JSC::JSWebAssemblyModule::finishCreation):
(JSC::JSWebAssemblyModule::destroy):
(JSC::JSWebAssemblyModule::visitChildren):

  • wasm/js/JSWebAssemblyModule.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/JSWebAssemblyRuntimeError.cpp: Added.

(JSC::JSWebAssemblyRuntimeError::create):
(JSC::JSWebAssemblyRuntimeError::createStructure):
(JSC::JSWebAssemblyRuntimeError::JSWebAssemblyRuntimeError):
(JSC::JSWebAssemblyRuntimeError::finishCreation):
(JSC::JSWebAssemblyRuntimeError::destroy):
(JSC::JSWebAssemblyRuntimeError::visitChildren):

  • wasm/js/JSWebAssemblyRuntimeError.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/JSWebAssemblyTable.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::JSWebAssemblyTable::create):
(JSC::JSWebAssemblyTable::createStructure):
(JSC::JSWebAssemblyTable::JSWebAssemblyTable):
(JSC::JSWebAssemblyTable::finishCreation):
(JSC::JSWebAssemblyTable::destroy):
(JSC::JSWebAssemblyTable::visitChildren):

  • wasm/js/JSWebAssemblyTable.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/WebAssemblyCompileErrorConstructor.cpp: Added.

(JSC::constructJSWebAssemblyCompileError):
(JSC::callJSWebAssemblyCompileError):
(JSC::WebAssemblyCompileErrorConstructor::create):
(JSC::WebAssemblyCompileErrorConstructor::createStructure):
(JSC::WebAssemblyCompileErrorConstructor::finishCreation):
(JSC::WebAssemblyCompileErrorConstructor::WebAssemblyCompileErrorConstructor):
(JSC::WebAssemblyCompileErrorConstructor::getConstructData):
(JSC::WebAssemblyCompileErrorConstructor::getCallData):
(JSC::WebAssemblyCompileErrorConstructor::visitChildren):

  • wasm/js/WebAssemblyCompileErrorConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyCompileErrorConstructor::CompileErrorStructure):

  • wasm/js/WebAssemblyCompileErrorPrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyCompileErrorPrototype::create):
(JSC::WebAssemblyCompileErrorPrototype::createStructure):
(JSC::WebAssemblyCompileErrorPrototype::finishCreation):
(JSC::WebAssemblyCompileErrorPrototype::WebAssemblyCompileErrorPrototype):

  • wasm/js/WebAssemblyCompileErrorPrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/WebAssemblyInstanceConstructor.cpp: Added.

(JSC::constructJSWebAssemblyInstance):
(JSC::callJSWebAssemblyInstance):
(JSC::WebAssemblyInstanceConstructor::create):
(JSC::WebAssemblyInstanceConstructor::createStructure):
(JSC::WebAssemblyInstanceConstructor::finishCreation):
(JSC::WebAssemblyInstanceConstructor::WebAssemblyInstanceConstructor):
(JSC::WebAssemblyInstanceConstructor::getConstructData):
(JSC::WebAssemblyInstanceConstructor::getCallData):
(JSC::WebAssemblyInstanceConstructor::visitChildren):

  • wasm/js/WebAssemblyInstanceConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyInstanceConstructor::InstanceStructure):

  • wasm/js/WebAssemblyInstancePrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyInstancePrototype::create):
(JSC::WebAssemblyInstancePrototype::createStructure):
(JSC::WebAssemblyInstancePrototype::finishCreation):
(JSC::WebAssemblyInstancePrototype::WebAssemblyInstancePrototype):

  • wasm/js/WebAssemblyInstancePrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/WebAssemblyMemoryConstructor.cpp: Added.

(JSC::constructJSWebAssemblyMemory):
(JSC::callJSWebAssemblyMemory):
(JSC::WebAssemblyMemoryConstructor::create):
(JSC::WebAssemblyMemoryConstructor::createStructure):
(JSC::WebAssemblyMemoryConstructor::finishCreation):
(JSC::WebAssemblyMemoryConstructor::WebAssemblyMemoryConstructor):
(JSC::WebAssemblyMemoryConstructor::getConstructData):
(JSC::WebAssemblyMemoryConstructor::getCallData):
(JSC::WebAssemblyMemoryConstructor::visitChildren):

  • wasm/js/WebAssemblyMemoryConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyMemoryConstructor::MemoryStructure):

  • wasm/js/WebAssemblyMemoryPrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyMemoryPrototype::create):
(JSC::WebAssemblyMemoryPrototype::createStructure):
(JSC::WebAssemblyMemoryPrototype::finishCreation):
(JSC::WebAssemblyMemoryPrototype::WebAssemblyMemoryPrototype):

  • wasm/js/WebAssemblyMemoryPrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/WebAssemblyModuleConstructor.cpp: Added.

(JSC::constructJSWebAssemblyModule):
(JSC::callJSWebAssemblyModule):
(JSC::WebAssemblyModuleConstructor::create):
(JSC::WebAssemblyModuleConstructor::createStructure):
(JSC::WebAssemblyModuleConstructor::finishCreation):
(JSC::WebAssemblyModuleConstructor::WebAssemblyModuleConstructor):
(JSC::WebAssemblyModuleConstructor::getConstructData):
(JSC::WebAssemblyModuleConstructor::getCallData):
(JSC::WebAssemblyModuleConstructor::visitChildren):

  • wasm/js/WebAssemblyModuleConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyModuleConstructor::ModuleStructure):

  • wasm/js/WebAssemblyModulePrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyModulePrototype::create):
(JSC::WebAssemblyModulePrototype::createStructure):
(JSC::WebAssemblyModulePrototype::finishCreation):
(JSC::WebAssemblyModulePrototype::WebAssemblyModulePrototype):

  • wasm/js/WebAssemblyModulePrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/WebAssemblyRuntimeErrorConstructor.cpp: Added.

(JSC::constructJSWebAssemblyRuntimeError):
(JSC::callJSWebAssemblyRuntimeError):
(JSC::WebAssemblyRuntimeErrorConstructor::create):
(JSC::WebAssemblyRuntimeErrorConstructor::createStructure):
(JSC::WebAssemblyRuntimeErrorConstructor::finishCreation):
(JSC::WebAssemblyRuntimeErrorConstructor::WebAssemblyRuntimeErrorConstructor):
(JSC::WebAssemblyRuntimeErrorConstructor::getConstructData):
(JSC::WebAssemblyRuntimeErrorConstructor::getCallData):
(JSC::WebAssemblyRuntimeErrorConstructor::visitChildren):

  • wasm/js/WebAssemblyRuntimeErrorConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyRuntimeErrorConstructor::RuntimeErrorStructure):

  • wasm/js/WebAssemblyRuntimeErrorPrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyRuntimeErrorPrototype::create):
(JSC::WebAssemblyRuntimeErrorPrototype::createStructure):
(JSC::WebAssemblyRuntimeErrorPrototype::finishCreation):
(JSC::WebAssemblyRuntimeErrorPrototype::WebAssemblyRuntimeErrorPrototype):

  • wasm/js/WebAssemblyRuntimeErrorPrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/WebAssemblyTableConstructor.cpp: Added.

(JSC::constructJSWebAssemblyTable):
(JSC::callJSWebAssemblyTable):
(JSC::WebAssemblyTableConstructor::create):
(JSC::WebAssemblyTableConstructor::createStructure):
(JSC::WebAssemblyTableConstructor::finishCreation):
(JSC::WebAssemblyTableConstructor::WebAssemblyTableConstructor):
(JSC::WebAssemblyTableConstructor::getConstructData):
(JSC::WebAssemblyTableConstructor::getCallData):
(JSC::WebAssemblyTableConstructor::visitChildren):

  • wasm/js/WebAssemblyTableConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyTableConstructor::TableStructure):

  • wasm/js/WebAssemblyTablePrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyTablePrototype::create):
(JSC::WebAssemblyTablePrototype::createStructure):
(JSC::WebAssemblyTablePrototype::finishCreation):
(JSC::WebAssemblyTablePrototype::WebAssemblyTablePrototype):

  • wasm/js/WebAssemblyTablePrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
Location:
trunk
Files:
7 added
15 edited
30 copied

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r207569 r207572  
     12016-10-19  JF Bastien  <jfbastien@apple.com>
     2
     3        JavaScript WebAssembly API: baby steps
     4
     5         - Expand WebAssembly constructors into their own files. This requires a lot of
     6           boilerplate, as well as adding the .lut.h files. All of the
     7           JSWebAssembly*.{h,cpp}, as well as Constructor and Prototype files, are
     8           currently the same between the 4 specified WebAssembly constructors. It'll be
     9           easy to implement individual functions on constructed objects as per the
     10           spec, and have each of these files diverge. The error constructors are also
     11           similar, except that their instance derives from ErrorInstance.
     12         - Use constructor macro when initializing the global object.
     13         - Dramatically improve testing of the WebAssembly API by checking for
     14           properties specified in the spec [*].
     15         - Clean up assert.js' exception testing.
     16         - Fix a copy-paste bug in wasm.json: floating-point const return values were
     17           swapped.
     18
     19        [*] https://github.com/WebAssembly/design/blob/master/JS.md
     20
     21        Implement more of the JavaScript WebAssembly API
     22        https://bugs.webkit.org/show_bug.cgi?id=163571
     23
     24        Reviewed by Keith Miller.
     25
     26        * wasm/assert.js:
     27        (export.const.isUndef): add this useful helper
     28        (export.const.throws): fold other throw checks into this one, and check message as well
     29        * wasm/js-api/test_basic_api.js:
     30        (const.checkOwnPropertyDescriptor): check own property descriptor follows the spec
     31        * wasm/self-test/test_BuilderJSON.js:
     32        (const.assertOpThrows): use new assert API
     33        (CheckedOpcodeArgumentsTooMany): ditto
     34        (CheckedOpcodeArgumentsNotEnough): ditto
     35        (CallInvalid): ditto
     36        (I32ConstInvalid): ditto
     37        (F32ConstInvalid): ditto (and this caugth the JSON copy-paste bug)
     38        (F64ConstInvalid): ditto
     39        * wasm/self-test/test_LowLevelBinary_varint.js: use new assert API
     40        * wasm/self-test/test_LowLevelBinary_varuint.js: use new assert API
     41        * wasm/utilities.js: add "global" object, used in basic API test (to access global.WebAssembly).
     42        * wasm/wasm.json: fix copy-paste
     43
    1442016-10-19  Caitlin Potter  <caitp@igalia.com>
    245
  • trunk/JSTests/wasm/assert.js

    r207363 r207572  
    2525
    2626export const notUndef = (v) => {
    27     if (v === undefined)
     27    if (typeof v === "undefined")
    2828        throw new Error("Shouldn't be undefined");
     29};
     30
     31export const isUndef = (v) => {
     32    if (typeof v !== "undefined")
     33        throw new Error("Should be undefined");
    2934};
    3035
     
    4146};
    4247
    43 export const throwsError = (opFn, message, ...args) => {
    44     if (message)
    45         message = " for " + message;
    46 
     48export const throws = (func, type, message, ...args) => {
    4749    try {
    48         opFn(...args);
     50        func(...args);
    4951    } catch (e) {
    50         if (e instanceof Error)
     52        if (e instanceof type && e.message === message)
    5153            return;
    52         throw new Error(`Expected an Error${message}, got ${e}`);
     54        throw new Error(`Expected to throw a ${type.name} with message "${message}", got ${e.name} with message "${e.message}"`);
    5355    }
    54     throw new Error(`Expected to throw an Error${message}`);
     56    throw new Error(`Expected to throw a ${type.name} with message "${message}"`);
    5557};
    56 
    57 export const throwsRangeError = (opFn, message, ...args) => {
    58     if (message)
    59         message = " for " + message;
    60 
    61     try {
    62         opFn(...args);
    63     } catch (e) {
    64         if (e instanceof RangeError)
    65             return;
    66         throw new Error(`Expected a RangeError${message}, got ${e}`);
    67     }
    68     throw new Error(`Expected to throw a RangeError${message}`);
    69 };
  • trunk/JSTests/wasm/js-api/test_basic_api.js

    r207432 r207572  
    1 if (WebAssembly === undefined)
    2     throw new Error("Couldn't find WebAssembly global object");
     1import * as assert from '../assert.js';
     2import * as utilities from '../utilities.js';
    33
    4 const functionProperties = ["validate", "compile"];
    5 const constructorProperties = ["Module", "Instance", "Memory", "Table", "CompileError"];
     4const checkOwnPropertyDescriptor = (obj, prop, expect) => {
     5    const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
     6    assert.eq(typeof descriptor.value, expect.typeofvalue);
     7    assert.eq(descriptor.writable, expect.writable);
     8    assert.eq(descriptor.configurable, expect.configurable);
     9    assert.eq(descriptor.enumerable, expect.enumerable);
     10};
    611
    7 for (const f of functionProperties)
    8     if (WebAssembly[f] === undefined)
    9         throw new Error(`Couldn't find WebAssembly function property "${f}"`);
     12const functionProperties = {
     13    "validate": { length: 1 },
     14    "compile":  { length: 1 },
     15};
     16const constructorProperties = {
     17    "Module":       { typeofvalue: "function", writable: true, configurable: true, enumerable: false, length: 1, isError: false },
     18    "Instance":     { typeofvalue: "function", writable: true, configurable: true, enumerable: false, length: 1, isError: false },
     19    "Memory":       { typeofvalue: "function", writable: true, configurable: true, enumerable: false, length: 1, isError: false },
     20    "Table":        { typeofvalue: "function", writable: true, configurable: true, enumerable: false, length: 1, isError: false },
     21    "CompileError": { typeofvalue: "function", writable: true, configurable: true, enumerable: false, length: 1, isError: true  },
     22    "RuntimeError": { typeofvalue: "function", writable: true, configurable: true, enumerable: false, length: 1, isError: true  },
     23};
    1024
    11 for (const c of constructorProperties)
    12     if (WebAssembly[c] === undefined)
    13         throw new Error(`Couldn't find WebAssembly constructor property "${c}"`);
    1425
    15 // FIXME https://bugs.webkit.org/show_bug.cgi?id=159775 Implement and test these APIs further. For now they just throw.
     26assert.notUndef(WebAssembly);
     27checkOwnPropertyDescriptor(utilities.global, "WebAssembly", { typeofvalue: "object", writable: true, configurable: true, enumerable: false });
     28assert.eq(String(WebAssembly), "[object WebAssembly]");
     29assert.isUndef(WebAssembly.length);
    1630
    17 for (const f of functionProperties) {
    18     try {
    19         WebAssembly[f]();
    20     } catch (e) {
    21         if (e instanceof Error)
    22             continue;
    23         throw new Error(`Expected WebAssembly.${f}() to throw an Error, got ${e}`);
    24     }
    25     throw new Error(`Expected WebAssembly.${f}() to throw an Error`);
     31for (const f in functionProperties) {
     32    assert.notUndef(WebAssembly[f]);
     33    assert.eq(WebAssembly[f].name, f);
     34    assert.eq(WebAssembly[f].length, functionProperties[f].length);
    2635}
    2736
    28 for (const c of constructorProperties) {
    29     try {
    30         let v = new WebAssembly[c]();
    31     } catch (e) {
    32         if (e instanceof Error)
    33             continue;
    34         throw new Error(`Expected new WebAssembly.${f}() to throw an Error, got ${e}`);
    35     }
    36     throw new Error(`Expected new WebAssembly.${f}() to throw an Error`);
     37for (const c in constructorProperties) {
     38    assert.notUndef(WebAssembly[c]);
     39    assert.eq(WebAssembly[c].name, c);
     40    assert.eq(WebAssembly[c].length, constructorProperties[c].length);
     41    checkOwnPropertyDescriptor(WebAssembly, c, constructorProperties[c]);
     42    // Check the constructor's prototype.
     43    checkOwnPropertyDescriptor(WebAssembly[c], "prototype", { typeofvalue: "object", writable: false, configurable: false, enumerable: false });
     44    assert.eq(String(WebAssembly[c].prototype), `[object WebAssembly.${c}.prototype]`);
     45    assert.throws(() => WebAssembly[c](), TypeError, `calling WebAssembly.${c} constructor without new is invalid`);
    3746}
     47
     48// FIXME Implement and test these APIs further. For now they just throw. https://bugs.webkit.org/show_bug.cgi?id=159775
     49
     50for (const f in functionProperties) {
     51    assert.throws(() => WebAssembly[f](), Error, `WebAssembly doesn't yet implement the ${f} function property`);
     52}
     53
     54for (const c in constructorProperties)
     55    assert.throws(() => new WebAssembly[c](), Error, `WebAssembly doesn't yet implement the ${c} constructor property`);
  • trunk/JSTests/wasm/self-test/test_BuilderJSON.js

    r207363 r207572  
    22import Builder from '../Builder.js';
    33
    4 const assertOpThrows = (opFn, message = "") => {
     4const assertOpThrows = (opFn, message) => {
    55    let f = (new Builder()).Code().Function();
    6     assert.throwsError(opFn, message, f);
     6    assert.throws(opFn, Error, message, f);
    77};
    88
     
    194194
    195195(function CheckedOpcodeArgumentsTooMany() {
    196     assertOpThrows(f => f.Nop("uh-oh!"));
     196    assertOpThrows(f => f.Nop("uh-oh!"), `"nop" expects 0 immediates, got 1`);
    197197})();
    198198
     
    202202
    203203(function CheckedOpcodeArgumentsNotEnough() {
    204     assertOpThrows(f => f.I32Const());
     204    assertOpThrows(f => f.I32Const(), `"i32.const" expects 1 immediates, got 0`);
    205205})();
    206206
     
    222222(function CallInvalid() {
    223223    for (let c of [-1, 0x100000000, "0", {}, Infinity, -Infinity, NaN, -NaN, null])
    224         assertOpThrows(f => f.Call(c), c);
     224        assertOpThrows(f => f.Call(c), `Invalid value on call: got "${c}", expected i32`);
    225225})();
    226226
     
    238238(function I32ConstInvalid() {
    239239    for (let c of [-1, 0x100000000, 0.1, -0.1, "0", {}, Infinity, null])
    240         assertOpThrows(f => f.I32Const(c), c);
     240        assertOpThrows(f => f.I32Const(c), `Invalid value on i32.const: got "${c}", expected i32`);
    241241})();
    242242
     
    256256(function F32ConstInvalid() {
    257257    for (let c of ["0", {}, Infinity, -Infinity, NaN, -NaN, null])
    258         assertOpThrows(f => f.F32Const(c), c);
     258        assertOpThrows(f => f.F32Const(c), `Invalid value on f32.const: got "${c}", expected f32`);
    259259})();
    260260
     
    272272(function F64ConstInvalid() {
    273273    for (let c of ["0", {}, Infinity, -Infinity, NaN, -NaN, null])
    274         assertOpThrows(f => f.F64Const(c), c);
     274        assertOpThrows(f => f.F64Const(c), `Invalid value on f64.const: got "${c}", expected f64`);
    275275})();
    276276
  • trunk/JSTests/wasm/self-test/test_LowLevelBinary_varint.js

    r207363 r207572  
    2121    for (let j = 0; j < i; ++j)
    2222        b.uint8(0x80);
    23     assert.throwsRangeError(() => b.getVarint(0));
     23    assert.throws(() => b.getVarint(0), RangeError, `[${i}, ${i+1}) is out of buffer range [0, ${i})`);
    2424}
    2525
     
    2828    b.uint8(0x80);
    2929b.uint8(0x00);
    30 assert.throwsRangeError(() => b.getVarint(0));
     30assert.throws(() => b.getVarint(0), RangeError, `Shifting too much at 6`);
  • trunk/JSTests/wasm/self-test/test_LowLevelBinary_varuint.js

    r207363 r207572  
    2020    for (let j = 0; j < i; ++j)
    2121        b.uint8(0x80);
    22     assert.throwsRangeError(() => b.getVaruint(0));
     22    assert.throws(() => b.getVarint(0), RangeError, `[${i}, ${i+1}) is out of buffer range [0, ${i})`);
    2323}
    2424
     
    2727    b.uint8(0x80);
    2828b.uint8(0x00);
    29 assert.throwsRangeError(() => b.getVaruint(0));
     29assert.throws(() => b.getVarint(0), RangeError, `Shifting too much at 6`);
  • trunk/JSTests/wasm/utilities.js

    r207363 r207572  
    3131           : "shell")));
    3232
     33let _global = (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array)
     34    ? ((typeof self !== 'undefined') ? self
     35       : (typeof window !== 'undefined') ? window
     36       : (typeof global !== 'undefined') ? global
     37       : Function('return this')())
     38    : global;
     39
    3340const _eval = x => eval.call(null, x);
    3441
     
    6168
    6269// Use underscore names to avoid clashing with builtin names.
    63 export { _eval as eval, _read as read, _load as load, _json as json };
     70export { _eval as eval, _read as read, _load as load, _json as json, _global as global };
  • trunk/JSTests/wasm/wasm.json

    r207363 r207572  
    5959        "i32.const":           { "category": "special",    "value":  16, "return": ["i32"],      "parameter": [],                       "immediate": [{"name": "value",          "type": "varint32"}],                                           "description": "a constant value interpreted as i32" },
    6060        "i64.const":           { "category": "special",    "value":  17, "return": ["i64"],      "parameter": [],                       "immediate": [{"name": "value",          "type": "varint64"}],                                           "description": "a constant value interpreted as i64" },
    61         "f64.const":           { "category": "special",    "value":  18, "return": ["f32"],      "parameter": [],                       "immediate": [{"name": "value",          "type": "uint64"}],                                             "description": "a constant value interpreted as f64" },
    62         "f32.const":           { "category": "special",    "value":  19, "return": ["f64"],      "parameter": [],                       "immediate": [{"name": "value",          "type": "uint32"}],                                             "description": "a constant value interpreted as f32" },
     61        "f64.const":           { "category": "special",    "value":  18, "return": ["f64"],      "parameter": [],                       "immediate": [{"name": "value",          "type": "uint64"}],                                             "description": "a constant value interpreted as f64" },
     62        "f32.const":           { "category": "special",    "value":  19, "return": ["f32"],      "parameter": [],                       "immediate": [{"name": "value",          "type": "uint32"}],                                             "description": "a constant value interpreted as f32" },
    6363        "get_local":           { "category": "special",    "value":  20, "return": ["local"],    "parameter": [],                       "immediate": [{"name": "local_index",    "type": "varuint32"}],                                          "description": "read a local variable or parameter" },
    6464        "set_local":           { "category": "special",    "value":  21, "return": [],           "parameter": ["local"],                "immediate": [{"name": "local_index",    "type": "varuint32"}],                                          "description": "write a local variable or parameter" },
  • trunk/Source/JavaScriptCore/CMakeLists.txt

    r207453 r207572  
    869869    wasm/WebAssemblyObject.cpp
    870870
     871    wasm/js/JSWebAssemblyCompileError.cpp
     872    wasm/js/JSWebAssemblyInstance.cpp
     873    wasm/js/JSWebAssemblyMemory.cpp
     874    wasm/js/JSWebAssemblyModule.cpp
     875    wasm/js/JSWebAssemblyRuntimeError.cpp
     876    wasm/js/JSWebAssemblyTable.cpp
     877    wasm/js/WebAssemblyCompileErrorConstructor.cpp
     878    wasm/js/WebAssemblyCompileErrorPrototype.cpp
     879    wasm/js/WebAssemblyInstanceConstructor.cpp
     880    wasm/js/WebAssemblyInstancePrototype.cpp
     881    wasm/js/WebAssemblyMemoryConstructor.cpp
     882    wasm/js/WebAssemblyMemoryPrototype.cpp
     883    wasm/js/WebAssemblyModuleConstructor.cpp
     884    wasm/js/WebAssemblyModulePrototype.cpp
     885    wasm/js/WebAssemblyRuntimeErrorConstructor.cpp
     886    wasm/js/WebAssemblyRuntimeErrorPrototype.cpp
     887    wasm/js/WebAssemblyTableConstructor.cpp
     888    wasm/js/WebAssemblyTablePrototype.cpp
     889
    871890    yarr/RegularExpression.cpp
    872891    yarr/YarrCanonicalizeUCS2.cpp
     
    919938    runtime/SymbolConstructor.cpp
    920939    runtime/SymbolPrototype.cpp
     940
     941    wasm/js/WebAssemblyCompileErrorConstructor.cpp
     942    wasm/js/WebAssemblyCompileErrorPrototype.cpp
     943    wasm/js/WebAssemblyInstanceConstructor.cpp
     944    wasm/js/WebAssemblyInstancePrototype.cpp
     945    wasm/js/WebAssemblyMemoryConstructor.cpp
     946    wasm/js/WebAssemblyMemoryPrototype.cpp
     947    wasm/js/WebAssemblyModuleConstructor.cpp
     948    wasm/js/WebAssemblyModulePrototype.cpp
     949    wasm/js/WebAssemblyRuntimeErrorConstructor.cpp
     950    wasm/js/WebAssemblyRuntimeErrorPrototype.cpp
     951    wasm/js/WebAssemblyTableConstructor.cpp
     952    wasm/js/WebAssemblyTablePrototype.cpp
    921953)
    922954
  • trunk/Source/JavaScriptCore/ChangeLog

    r207569 r207572  
     12016-10-19  JF Bastien  <jfbastien@apple.com>
     2
     3        JavaScript WebAssembly API: baby steps
     4
     5         - Expand WebAssembly constructors into their own files. This requires a lot of
     6           boilerplate, as well as adding the .lut.h files. All of the
     7           JSWebAssembly*.{h,cpp}, as well as Constructor and Prototype files, are
     8           currently the same between the 4 specified WebAssembly constructors. It'll be
     9           easy to implement individual functions on constructed objects as per the
     10           spec, and have each of these files diverge. The error constructors are also
     11           similar, except that their instance derives from ErrorInstance.
     12         - Use constructor macro when initializing the global object.
     13         - Dramatically improve testing of the WebAssembly API by checking for
     14           properties specified in the spec [*].
     15         - Clean up assert.js' exception testing.
     16         - Fix a copy-paste bug in wasm.json: floating-point const return values were
     17           swapped.
     18
     19        [*] https://github.com/WebAssembly/design/blob/master/JS.md
     20
     21        Implement more of the JavaScript WebAssembly API
     22        https://bugs.webkit.org/show_bug.cgi?id=163571
     23
     24        Reviewed by Keith Miller.
     25
     26        * CMakeLists.txt: add .lut.h generation
     27        * DerivedSources.make: ditto
     28        * JavaScriptCore.xcodeproj/project.pbxproj: add .lut.h generation and all the new files
     29        * runtime/JSGlobalObject.cpp:
     30        (JSC::JSGlobalObject::init): use macro to list all constructors
     31        * wasm/WebAssemblyObject.cpp: unboilerplate, all constructors into their own files
     32        * wasm/WebAssemblyObject.h: ditto
     33        * wasm/js/JSWebAssemblyCompileError.cpp: Added.
     34        (JSC::JSWebAssemblyCompileError::create):
     35        (JSC::JSWebAssemblyCompileError::createStructure):
     36        (JSC::JSWebAssemblyCompileError::JSWebAssemblyCompileError):
     37        (JSC::JSWebAssemblyCompileError::finishCreation):
     38        (JSC::JSWebAssemblyCompileError::destroy):
     39        (JSC::JSWebAssemblyCompileError::visitChildren):
     40        * wasm/js/JSWebAssemblyCompileError.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     41        * wasm/js/JSWebAssemblyInstance.cpp: Added.
     42        (JSC::JSWebAssemblyInstance::create):
     43        (JSC::JSWebAssemblyInstance::createStructure):
     44        (JSC::JSWebAssemblyInstance::JSWebAssemblyInstance):
     45        (JSC::JSWebAssemblyInstance::finishCreation):
     46        (JSC::JSWebAssemblyInstance::destroy):
     47        (JSC::JSWebAssemblyInstance::visitChildren):
     48        * wasm/js/JSWebAssemblyInstance.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     49        * wasm/js/JSWebAssemblyMemory.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     50        (JSC::JSWebAssemblyMemory::create):
     51        (JSC::JSWebAssemblyMemory::createStructure):
     52        (JSC::JSWebAssemblyMemory::JSWebAssemblyMemory):
     53        (JSC::JSWebAssemblyMemory::finishCreation):
     54        (JSC::JSWebAssemblyMemory::destroy):
     55        (JSC::JSWebAssemblyMemory::visitChildren):
     56        * wasm/js/JSWebAssemblyMemory.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     57        * wasm/js/JSWebAssemblyModule.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     58        (JSC::JSWebAssemblyModule::create):
     59        (JSC::JSWebAssemblyModule::createStructure):
     60        (JSC::JSWebAssemblyModule::JSWebAssemblyModule):
     61        (JSC::JSWebAssemblyModule::finishCreation):
     62        (JSC::JSWebAssemblyModule::destroy):
     63        (JSC::JSWebAssemblyModule::visitChildren):
     64        * wasm/js/JSWebAssemblyModule.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     65        * wasm/js/JSWebAssemblyRuntimeError.cpp: Added.
     66        (JSC::JSWebAssemblyRuntimeError::create):
     67        (JSC::JSWebAssemblyRuntimeError::createStructure):
     68        (JSC::JSWebAssemblyRuntimeError::JSWebAssemblyRuntimeError):
     69        (JSC::JSWebAssemblyRuntimeError::finishCreation):
     70        (JSC::JSWebAssemblyRuntimeError::destroy):
     71        (JSC::JSWebAssemblyRuntimeError::visitChildren):
     72        * wasm/js/JSWebAssemblyRuntimeError.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     73        * wasm/js/JSWebAssemblyTable.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     74        (JSC::JSWebAssemblyTable::create):
     75        (JSC::JSWebAssemblyTable::createStructure):
     76        (JSC::JSWebAssemblyTable::JSWebAssemblyTable):
     77        (JSC::JSWebAssemblyTable::finishCreation):
     78        (JSC::JSWebAssemblyTable::destroy):
     79        (JSC::JSWebAssemblyTable::visitChildren):
     80        * wasm/js/JSWebAssemblyTable.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     81        * wasm/js/WebAssemblyCompileErrorConstructor.cpp: Added.
     82        (JSC::constructJSWebAssemblyCompileError):
     83        (JSC::callJSWebAssemblyCompileError):
     84        (JSC::WebAssemblyCompileErrorConstructor::create):
     85        (JSC::WebAssemblyCompileErrorConstructor::createStructure):
     86        (JSC::WebAssemblyCompileErrorConstructor::finishCreation):
     87        (JSC::WebAssemblyCompileErrorConstructor::WebAssemblyCompileErrorConstructor):
     88        (JSC::WebAssemblyCompileErrorConstructor::getConstructData):
     89        (JSC::WebAssemblyCompileErrorConstructor::getCallData):
     90        (JSC::WebAssemblyCompileErrorConstructor::visitChildren):
     91        * wasm/js/WebAssemblyCompileErrorConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     92        (JSC::WebAssemblyCompileErrorConstructor::CompileErrorStructure):
     93        * wasm/js/WebAssemblyCompileErrorPrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     94        (JSC::WebAssemblyCompileErrorPrototype::create):
     95        (JSC::WebAssemblyCompileErrorPrototype::createStructure):
     96        (JSC::WebAssemblyCompileErrorPrototype::finishCreation):
     97        (JSC::WebAssemblyCompileErrorPrototype::WebAssemblyCompileErrorPrototype):
     98        * wasm/js/WebAssemblyCompileErrorPrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     99        * wasm/js/WebAssemblyInstanceConstructor.cpp: Added.
     100        (JSC::constructJSWebAssemblyInstance):
     101        (JSC::callJSWebAssemblyInstance):
     102        (JSC::WebAssemblyInstanceConstructor::create):
     103        (JSC::WebAssemblyInstanceConstructor::createStructure):
     104        (JSC::WebAssemblyInstanceConstructor::finishCreation):
     105        (JSC::WebAssemblyInstanceConstructor::WebAssemblyInstanceConstructor):
     106        (JSC::WebAssemblyInstanceConstructor::getConstructData):
     107        (JSC::WebAssemblyInstanceConstructor::getCallData):
     108        (JSC::WebAssemblyInstanceConstructor::visitChildren):
     109        * wasm/js/WebAssemblyInstanceConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     110        (JSC::WebAssemblyInstanceConstructor::InstanceStructure):
     111        * wasm/js/WebAssemblyInstancePrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     112        (JSC::WebAssemblyInstancePrototype::create):
     113        (JSC::WebAssemblyInstancePrototype::createStructure):
     114        (JSC::WebAssemblyInstancePrototype::finishCreation):
     115        (JSC::WebAssemblyInstancePrototype::WebAssemblyInstancePrototype):
     116        * wasm/js/WebAssemblyInstancePrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     117        * wasm/js/WebAssemblyMemoryConstructor.cpp: Added.
     118        (JSC::constructJSWebAssemblyMemory):
     119        (JSC::callJSWebAssemblyMemory):
     120        (JSC::WebAssemblyMemoryConstructor::create):
     121        (JSC::WebAssemblyMemoryConstructor::createStructure):
     122        (JSC::WebAssemblyMemoryConstructor::finishCreation):
     123        (JSC::WebAssemblyMemoryConstructor::WebAssemblyMemoryConstructor):
     124        (JSC::WebAssemblyMemoryConstructor::getConstructData):
     125        (JSC::WebAssemblyMemoryConstructor::getCallData):
     126        (JSC::WebAssemblyMemoryConstructor::visitChildren):
     127        * wasm/js/WebAssemblyMemoryConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     128        (JSC::WebAssemblyMemoryConstructor::MemoryStructure):
     129        * wasm/js/WebAssemblyMemoryPrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     130        (JSC::WebAssemblyMemoryPrototype::create):
     131        (JSC::WebAssemblyMemoryPrototype::createStructure):
     132        (JSC::WebAssemblyMemoryPrototype::finishCreation):
     133        (JSC::WebAssemblyMemoryPrototype::WebAssemblyMemoryPrototype):
     134        * wasm/js/WebAssemblyMemoryPrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     135        * wasm/js/WebAssemblyModuleConstructor.cpp: Added.
     136        (JSC::constructJSWebAssemblyModule):
     137        (JSC::callJSWebAssemblyModule):
     138        (JSC::WebAssemblyModuleConstructor::create):
     139        (JSC::WebAssemblyModuleConstructor::createStructure):
     140        (JSC::WebAssemblyModuleConstructor::finishCreation):
     141        (JSC::WebAssemblyModuleConstructor::WebAssemblyModuleConstructor):
     142        (JSC::WebAssemblyModuleConstructor::getConstructData):
     143        (JSC::WebAssemblyModuleConstructor::getCallData):
     144        (JSC::WebAssemblyModuleConstructor::visitChildren):
     145        * wasm/js/WebAssemblyModuleConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     146        (JSC::WebAssemblyModuleConstructor::ModuleStructure):
     147        * wasm/js/WebAssemblyModulePrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     148        (JSC::WebAssemblyModulePrototype::create):
     149        (JSC::WebAssemblyModulePrototype::createStructure):
     150        (JSC::WebAssemblyModulePrototype::finishCreation):
     151        (JSC::WebAssemblyModulePrototype::WebAssemblyModulePrototype):
     152        * wasm/js/WebAssemblyModulePrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     153        * wasm/js/WebAssemblyRuntimeErrorConstructor.cpp: Added.
     154        (JSC::constructJSWebAssemblyRuntimeError):
     155        (JSC::callJSWebAssemblyRuntimeError):
     156        (JSC::WebAssemblyRuntimeErrorConstructor::create):
     157        (JSC::WebAssemblyRuntimeErrorConstructor::createStructure):
     158        (JSC::WebAssemblyRuntimeErrorConstructor::finishCreation):
     159        (JSC::WebAssemblyRuntimeErrorConstructor::WebAssemblyRuntimeErrorConstructor):
     160        (JSC::WebAssemblyRuntimeErrorConstructor::getConstructData):
     161        (JSC::WebAssemblyRuntimeErrorConstructor::getCallData):
     162        (JSC::WebAssemblyRuntimeErrorConstructor::visitChildren):
     163        * wasm/js/WebAssemblyRuntimeErrorConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     164        (JSC::WebAssemblyRuntimeErrorConstructor::RuntimeErrorStructure):
     165        * wasm/js/WebAssemblyRuntimeErrorPrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     166        (JSC::WebAssemblyRuntimeErrorPrototype::create):
     167        (JSC::WebAssemblyRuntimeErrorPrototype::createStructure):
     168        (JSC::WebAssemblyRuntimeErrorPrototype::finishCreation):
     169        (JSC::WebAssemblyRuntimeErrorPrototype::WebAssemblyRuntimeErrorPrototype):
     170        * wasm/js/WebAssemblyRuntimeErrorPrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     171        * wasm/js/WebAssemblyTableConstructor.cpp: Added.
     172        (JSC::constructJSWebAssemblyTable):
     173        (JSC::callJSWebAssemblyTable):
     174        (JSC::WebAssemblyTableConstructor::create):
     175        (JSC::WebAssemblyTableConstructor::createStructure):
     176        (JSC::WebAssemblyTableConstructor::finishCreation):
     177        (JSC::WebAssemblyTableConstructor::WebAssemblyTableConstructor):
     178        (JSC::WebAssemblyTableConstructor::getConstructData):
     179        (JSC::WebAssemblyTableConstructor::getCallData):
     180        (JSC::WebAssemblyTableConstructor::visitChildren):
     181        * wasm/js/WebAssemblyTableConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     182        (JSC::WebAssemblyTableConstructor::TableStructure):
     183        * wasm/js/WebAssemblyTablePrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     184        (JSC::WebAssemblyTablePrototype::create):
     185        (JSC::WebAssemblyTablePrototype::createStructure):
     186        (JSC::WebAssemblyTablePrototype::finishCreation):
     187        (JSC::WebAssemblyTablePrototype::WebAssemblyTablePrototype):
     188        * wasm/js/WebAssemblyTablePrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
     189
    11902016-10-19  Caitlin Potter  <caitp@igalia.com>
    2191
  • trunk/Source/JavaScriptCore/DerivedSources.make

    r204330 r207572  
    2929    $(JavaScriptCore)/parser \
    3030    $(JavaScriptCore)/runtime \
    31         $(JavaScriptCore)/interpreter \
    32         $(JavaScriptCore)/jit \
    33         $(JavaScriptCore)/builtins \
     31    $(JavaScriptCore)/interpreter \
     32    $(JavaScriptCore)/jit \
     33    $(JavaScriptCore)/builtins \
     34    $(JavaScriptCore)/wasm/js \
    3435#
    3536
     
    160161    SymbolConstructor.lut.h \
    161162    SymbolPrototype.lut.h \
     163    WebAssemblyCompileErrorConstructor.lut.h \
     164    WebAssemblyCompileErrorPrototype.lut.h \
     165    WebAssemblyInstanceConstructor.lut.h \
     166    WebAssemblyInstancePrototype.lut.h \
     167    WebAssemblyMemoryConstructor.lut.h \
     168    WebAssemblyMemoryPrototype.lut.h \
     169    WebAssemblyModuleConstructor.lut.h \
     170    WebAssemblyModulePrototype.lut.h \
     171    WebAssemblyRuntimeErrorConstructor.lut.h \
     172    WebAssemblyRuntimeErrorPrototype.lut.h \
     173    WebAssemblyTableConstructor.lut.h \
     174    WebAssemblyTablePrototype.lut.h \
    162175#
    163176
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r207456 r207572  
    18821882                AD2FCB881DAEBF3C00B3E736 /* WebAssemblyObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCB861DAEBF3700B3E736 /* WebAssemblyObject.cpp */; };
    18831883                AD2FCB891DAEBF3F00B3E736 /* WebAssemblyObject.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCB871DAEBF3700B3E736 /* WebAssemblyObject.h */; };
     1884                AD2FCBE21DB58DAD00B3E736 /* JSWebAssemblyCompileError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBA61DB58DA400B3E736 /* JSWebAssemblyCompileError.cpp */; };
     1885                AD2FCBE31DB58DAD00B3E736 /* JSWebAssemblyCompileError.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBA71DB58DA400B3E736 /* JSWebAssemblyCompileError.h */; };
     1886                AD2FCBE41DB58DAD00B3E736 /* JSWebAssemblyInstance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBA81DB58DA400B3E736 /* JSWebAssemblyInstance.cpp */; };
     1887                AD2FCBE51DB58DAD00B3E736 /* JSWebAssemblyInstance.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBA91DB58DA400B3E736 /* JSWebAssemblyInstance.h */; };
     1888                AD2FCBE61DB58DAD00B3E736 /* JSWebAssemblyMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBAA1DB58DA400B3E736 /* JSWebAssemblyMemory.cpp */; };
     1889                AD2FCBE71DB58DAD00B3E736 /* JSWebAssemblyMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBAB1DB58DA400B3E736 /* JSWebAssemblyMemory.h */; };
     1890                AD2FCBE81DB58DAD00B3E736 /* JSWebAssemblyRuntimeError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBAC1DB58DA400B3E736 /* JSWebAssemblyRuntimeError.cpp */; };
     1891                AD2FCBE91DB58DAD00B3E736 /* JSWebAssemblyRuntimeError.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBAD1DB58DA400B3E736 /* JSWebAssemblyRuntimeError.h */; };
     1892                AD2FCBEA1DB58DAD00B3E736 /* JSWebAssemblyTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBAE1DB58DA400B3E736 /* JSWebAssemblyTable.cpp */; };
     1893                AD2FCBEB1DB58DAD00B3E736 /* JSWebAssemblyTable.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBAF1DB58DA400B3E736 /* JSWebAssemblyTable.h */; };
     1894                AD2FCBEC1DB58DAD00B3E736 /* WebAssemblyCompileErrorConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBB01DB58DA400B3E736 /* WebAssemblyCompileErrorConstructor.cpp */; };
     1895                AD2FCBED1DB58DAD00B3E736 /* WebAssemblyCompileErrorConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBB11DB58DA400B3E736 /* WebAssemblyCompileErrorConstructor.h */; };
     1896                AD2FCBEE1DB58DAD00B3E736 /* WebAssemblyCompileErrorPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBB21DB58DA400B3E736 /* WebAssemblyCompileErrorPrototype.cpp */; };
     1897                AD2FCBEF1DB58DAD00B3E736 /* WebAssemblyCompileErrorPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBB31DB58DA400B3E736 /* WebAssemblyCompileErrorPrototype.h */; };
     1898                AD2FCBF01DB58DAD00B3E736 /* WebAssemblyInstanceConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBB41DB58DA400B3E736 /* WebAssemblyInstanceConstructor.cpp */; };
     1899                AD2FCBF11DB58DAD00B3E736 /* WebAssemblyInstanceConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBB51DB58DA400B3E736 /* WebAssemblyInstanceConstructor.h */; };
     1900                AD2FCBF21DB58DAD00B3E736 /* WebAssemblyInstancePrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBB61DB58DA400B3E736 /* WebAssemblyInstancePrototype.cpp */; };
     1901                AD2FCBF31DB58DAD00B3E736 /* WebAssemblyInstancePrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBB71DB58DA400B3E736 /* WebAssemblyInstancePrototype.h */; };
     1902                AD2FCBF41DB58DAD00B3E736 /* WebAssemblyMemoryConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBB81DB58DA400B3E736 /* WebAssemblyMemoryConstructor.cpp */; };
     1903                AD2FCBF51DB58DAD00B3E736 /* WebAssemblyMemoryConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBB91DB58DA400B3E736 /* WebAssemblyMemoryConstructor.h */; };
     1904                AD2FCBF61DB58DAD00B3E736 /* WebAssemblyMemoryPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBBA1DB58DA400B3E736 /* WebAssemblyMemoryPrototype.cpp */; };
     1905                AD2FCBF71DB58DAD00B3E736 /* WebAssemblyMemoryPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBBB1DB58DA400B3E736 /* WebAssemblyMemoryPrototype.h */; };
     1906                AD2FCBF81DB58DAD00B3E736 /* WebAssemblyRuntimeErrorConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBBC1DB58DA400B3E736 /* WebAssemblyRuntimeErrorConstructor.cpp */; };
     1907                AD2FCBF91DB58DAD00B3E736 /* WebAssemblyRuntimeErrorConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBBD1DB58DA400B3E736 /* WebAssemblyRuntimeErrorConstructor.h */; };
     1908                AD2FCBFA1DB58DAD00B3E736 /* WebAssemblyRuntimeErrorPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBBE1DB58DA400B3E736 /* WebAssemblyRuntimeErrorPrototype.cpp */; };
     1909                AD2FCBFB1DB58DAD00B3E736 /* WebAssemblyRuntimeErrorPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBBF1DB58DA400B3E736 /* WebAssemblyRuntimeErrorPrototype.h */; };
     1910                AD2FCBFC1DB58DAD00B3E736 /* WebAssemblyTableConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBC01DB58DA400B3E736 /* WebAssemblyTableConstructor.cpp */; };
     1911                AD2FCBFD1DB58DAD00B3E736 /* WebAssemblyTableConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBC11DB58DA400B3E736 /* WebAssemblyTableConstructor.h */; };
     1912                AD2FCBFE1DB58DAD00B3E736 /* WebAssemblyTablePrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCBC21DB58DA400B3E736 /* WebAssemblyTablePrototype.cpp */; };
     1913                AD2FCBFF1DB58DAD00B3E736 /* WebAssemblyTablePrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBC31DB58DA400B3E736 /* WebAssemblyTablePrototype.h */; };
     1914                AD2FCC001DB58DAD00B3E736 /* WebAssemblyModuleConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCB981DB585A600B3E736 /* WebAssemblyModuleConstructor.cpp */; };
     1915                AD2FCC011DB58DAD00B3E736 /* WebAssemblyModuleConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCB991DB585A600B3E736 /* WebAssemblyModuleConstructor.h */; };
     1916                AD2FCC021DB58DAD00B3E736 /* WebAssemblyModulePrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCB9A1DB585A600B3E736 /* WebAssemblyModulePrototype.cpp */; };
     1917                AD2FCC031DB58DAD00B3E736 /* WebAssemblyModulePrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCB9B1DB585A600B3E736 /* WebAssemblyModulePrototype.h */; };
     1918                AD2FCC041DB58DAD00B3E736 /* JSWebAssemblyModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCB8C1DB5844000B3E736 /* JSWebAssemblyModule.cpp */; };
     1919                AD2FCC051DB58DAD00B3E736 /* JSWebAssemblyModule.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCB8D1DB5844000B3E736 /* JSWebAssemblyModule.h */; };
     1920                AD2FCC161DB59CB200B3E736 /* WebAssemblyCompileErrorConstructor.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC0A1DB59C5900B3E736 /* WebAssemblyCompileErrorConstructor.lut.h */; };
     1921                AD2FCC171DB59CB200B3E736 /* WebAssemblyCompileErrorPrototype.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC0B1DB59C5900B3E736 /* WebAssemblyCompileErrorPrototype.lut.h */; };
     1922                AD2FCC181DB59CB200B3E736 /* WebAssemblyInstanceConstructor.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC0C1DB59C5900B3E736 /* WebAssemblyInstanceConstructor.lut.h */; };
     1923                AD2FCC191DB59CB200B3E736 /* WebAssemblyInstancePrototype.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC0D1DB59C5900B3E736 /* WebAssemblyInstancePrototype.lut.h */; };
     1924                AD2FCC1A1DB59CB200B3E736 /* WebAssemblyMemoryConstructor.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC0E1DB59C5900B3E736 /* WebAssemblyMemoryConstructor.lut.h */; };
     1925                AD2FCC1B1DB59CB200B3E736 /* WebAssemblyMemoryPrototype.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC0F1DB59C5900B3E736 /* WebAssemblyMemoryPrototype.lut.h */; };
     1926                AD2FCC1C1DB59CB200B3E736 /* WebAssemblyModuleConstructor.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC101DB59C5900B3E736 /* WebAssemblyModuleConstructor.lut.h */; };
     1927                AD2FCC1D1DB59CB200B3E736 /* WebAssemblyModulePrototype.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC111DB59C5900B3E736 /* WebAssemblyModulePrototype.lut.h */; };
     1928                AD2FCC1E1DB59CB200B3E736 /* WebAssemblyRuntimeErrorConstructor.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC121DB59C5900B3E736 /* WebAssemblyRuntimeErrorConstructor.lut.h */; };
     1929                AD2FCC1F1DB59CB200B3E736 /* WebAssemblyRuntimeErrorPrototype.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC131DB59C5900B3E736 /* WebAssemblyRuntimeErrorPrototype.lut.h */; };
     1930                AD2FCC201DB59CB200B3E736 /* WebAssemblyTableConstructor.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC141DB59C5900B3E736 /* WebAssemblyTableConstructor.lut.h */; };
     1931                AD2FCC211DB59CB200B3E736 /* WebAssemblyTablePrototype.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC151DB59C5900B3E736 /* WebAssemblyTablePrototype.lut.h */; };
    18841932                AD86A93E1AA4D88D002FE77F /* WeakGCMapInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = AD86A93D1AA4D87C002FE77F /* WeakGCMapInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
    18851933                ADDB1F6318D77DBE009B58A8 /* OpaqueRootSet.h in Headers */ = {isa = PBXBuildFile; fileRef = ADDB1F6218D77DB7009B58A8 /* OpaqueRootSet.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    42144262                AD2FCB861DAEBF3700B3E736 /* WebAssemblyObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebAssemblyObject.cpp; sourceTree = "<group>"; };
    42154263                AD2FCB871DAEBF3700B3E736 /* WebAssemblyObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyObject.h; sourceTree = "<group>"; };
     4264                AD2FCB8C1DB5844000B3E736 /* JSWebAssemblyModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebAssemblyModule.cpp; path = js/JSWebAssemblyModule.cpp; sourceTree = "<group>"; };
     4265                AD2FCB8D1DB5844000B3E736 /* JSWebAssemblyModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebAssemblyModule.h; path = js/JSWebAssemblyModule.h; sourceTree = "<group>"; };
     4266                AD2FCB981DB585A600B3E736 /* WebAssemblyModuleConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebAssemblyModuleConstructor.cpp; path = js/WebAssemblyModuleConstructor.cpp; sourceTree = "<group>"; };
     4267                AD2FCB991DB585A600B3E736 /* WebAssemblyModuleConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAssemblyModuleConstructor.h; path = js/WebAssemblyModuleConstructor.h; sourceTree = "<group>"; };
     4268                AD2FCB9A1DB585A600B3E736 /* WebAssemblyModulePrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebAssemblyModulePrototype.cpp; path = js/WebAssemblyModulePrototype.cpp; sourceTree = "<group>"; };
     4269                AD2FCB9B1DB585A600B3E736 /* WebAssemblyModulePrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAssemblyModulePrototype.h; path = js/WebAssemblyModulePrototype.h; sourceTree = "<group>"; };
     4270                AD2FCBA61DB58DA400B3E736 /* JSWebAssemblyCompileError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebAssemblyCompileError.cpp; path = js/JSWebAssemblyCompileError.cpp; sourceTree = "<group>"; };
     4271                AD2FCBA71DB58DA400B3E736 /* JSWebAssemblyCompileError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebAssemblyCompileError.h; path = js/JSWebAssemblyCompileError.h; sourceTree = "<group>"; };
     4272                AD2FCBA81DB58DA400B3E736 /* JSWebAssemblyInstance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebAssemblyInstance.cpp; path = js/JSWebAssemblyInstance.cpp; sourceTree = "<group>"; };
     4273                AD2FCBA91DB58DA400B3E736 /* JSWebAssemblyInstance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebAssemblyInstance.h; path = js/JSWebAssemblyInstance.h; sourceTree = "<group>"; };
     4274                AD2FCBAA1DB58DA400B3E736 /* JSWebAssemblyMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebAssemblyMemory.cpp; path = js/JSWebAssemblyMemory.cpp; sourceTree = "<group>"; };
     4275                AD2FCBAB1DB58DA400B3E736 /* JSWebAssemblyMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebAssemblyMemory.h; path = js/JSWebAssemblyMemory.h; sourceTree = "<group>"; };
     4276                AD2FCBAC1DB58DA400B3E736 /* JSWebAssemblyRuntimeError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebAssemblyRuntimeError.cpp; path = js/JSWebAssemblyRuntimeError.cpp; sourceTree = "<group>"; };
     4277                AD2FCBAD1DB58DA400B3E736 /* JSWebAssemblyRuntimeError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebAssemblyRuntimeError.h; path = js/JSWebAssemblyRuntimeError.h; sourceTree = "<group>"; };
     4278                AD2FCBAE1DB58DA400B3E736 /* JSWebAssemblyTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebAssemblyTable.cpp; path = js/JSWebAssemblyTable.cpp; sourceTree = "<group>"; };
     4279                AD2FCBAF1DB58DA400B3E736 /* JSWebAssemblyTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebAssemblyTable.h; path = js/JSWebAssemblyTable.h; sourceTree = "<group>"; };
     4280                AD2FCBB01DB58DA400B3E736 /* WebAssemblyCompileErrorConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebAssemblyCompileErrorConstructor.cpp; path = js/WebAssemblyCompileErrorConstructor.cpp; sourceTree = "<group>"; };
     4281                AD2FCBB11DB58DA400B3E736 /* WebAssemblyCompileErrorConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAssemblyCompileErrorConstructor.h; path = js/WebAssemblyCompileErrorConstructor.h; sourceTree = "<group>"; };
     4282                AD2FCBB21DB58DA400B3E736 /* WebAssemblyCompileErrorPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebAssemblyCompileErrorPrototype.cpp; path = js/WebAssemblyCompileErrorPrototype.cpp; sourceTree = "<group>"; };
     4283                AD2FCBB31DB58DA400B3E736 /* WebAssemblyCompileErrorPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAssemblyCompileErrorPrototype.h; path = js/WebAssemblyCompileErrorPrototype.h; sourceTree = "<group>"; };
     4284                AD2FCBB41DB58DA400B3E736 /* WebAssemblyInstanceConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebAssemblyInstanceConstructor.cpp; path = js/WebAssemblyInstanceConstructor.cpp; sourceTree = "<group>"; };
     4285                AD2FCBB51DB58DA400B3E736 /* WebAssemblyInstanceConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAssemblyInstanceConstructor.h; path = js/WebAssemblyInstanceConstructor.h; sourceTree = "<group>"; };
     4286                AD2FCBB61DB58DA400B3E736 /* WebAssemblyInstancePrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebAssemblyInstancePrototype.cpp; path = js/WebAssemblyInstancePrototype.cpp; sourceTree = "<group>"; };
     4287                AD2FCBB71DB58DA400B3E736 /* WebAssemblyInstancePrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAssemblyInstancePrototype.h; path = js/WebAssemblyInstancePrototype.h; sourceTree = "<group>"; };
     4288                AD2FCBB81DB58DA400B3E736 /* WebAssemblyMemoryConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebAssemblyMemoryConstructor.cpp; path = js/WebAssemblyMemoryConstructor.cpp; sourceTree = "<group>"; };
     4289                AD2FCBB91DB58DA400B3E736 /* WebAssemblyMemoryConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAssemblyMemoryConstructor.h; path = js/WebAssemblyMemoryConstructor.h; sourceTree = "<group>"; };
     4290                AD2FCBBA1DB58DA400B3E736 /* WebAssemblyMemoryPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebAssemblyMemoryPrototype.cpp; path = js/WebAssemblyMemoryPrototype.cpp; sourceTree = "<group>"; };
     4291                AD2FCBBB1DB58DA400B3E736 /* WebAssemblyMemoryPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAssemblyMemoryPrototype.h; path = js/WebAssemblyMemoryPrototype.h; sourceTree = "<group>"; };
     4292                AD2FCBBC1DB58DA400B3E736 /* WebAssemblyRuntimeErrorConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebAssemblyRuntimeErrorConstructor.cpp; path = js/WebAssemblyRuntimeErrorConstructor.cpp; sourceTree = "<group>"; };
     4293                AD2FCBBD1DB58DA400B3E736 /* WebAssemblyRuntimeErrorConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAssemblyRuntimeErrorConstructor.h; path = js/WebAssemblyRuntimeErrorConstructor.h; sourceTree = "<group>"; };
     4294                AD2FCBBE1DB58DA400B3E736 /* WebAssemblyRuntimeErrorPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebAssemblyRuntimeErrorPrototype.cpp; path = js/WebAssemblyRuntimeErrorPrototype.cpp; sourceTree = "<group>"; };
     4295                AD2FCBBF1DB58DA400B3E736 /* WebAssemblyRuntimeErrorPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAssemblyRuntimeErrorPrototype.h; path = js/WebAssemblyRuntimeErrorPrototype.h; sourceTree = "<group>"; };
     4296                AD2FCBC01DB58DA400B3E736 /* WebAssemblyTableConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebAssemblyTableConstructor.cpp; path = js/WebAssemblyTableConstructor.cpp; sourceTree = "<group>"; };
     4297                AD2FCBC11DB58DA400B3E736 /* WebAssemblyTableConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAssemblyTableConstructor.h; path = js/WebAssemblyTableConstructor.h; sourceTree = "<group>"; };
     4298                AD2FCBC21DB58DA400B3E736 /* WebAssemblyTablePrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebAssemblyTablePrototype.cpp; path = js/WebAssemblyTablePrototype.cpp; sourceTree = "<group>"; };
     4299                AD2FCBC31DB58DA400B3E736 /* WebAssemblyTablePrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAssemblyTablePrototype.h; path = js/WebAssemblyTablePrototype.h; sourceTree = "<group>"; };
     4300                AD2FCC0A1DB59C5900B3E736 /* WebAssemblyCompileErrorConstructor.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyCompileErrorConstructor.lut.h; sourceTree = SOURCE_ROOT; };
     4301                AD2FCC0B1DB59C5900B3E736 /* WebAssemblyCompileErrorPrototype.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyCompileErrorPrototype.lut.h; sourceTree = "<group>"; };
     4302                AD2FCC0C1DB59C5900B3E736 /* WebAssemblyInstanceConstructor.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyInstanceConstructor.lut.h; sourceTree = "<group>"; };
     4303                AD2FCC0D1DB59C5900B3E736 /* WebAssemblyInstancePrototype.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyInstancePrototype.lut.h; sourceTree = "<group>"; };
     4304                AD2FCC0E1DB59C5900B3E736 /* WebAssemblyMemoryConstructor.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyMemoryConstructor.lut.h; sourceTree = "<group>"; };
     4305                AD2FCC0F1DB59C5900B3E736 /* WebAssemblyMemoryPrototype.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyMemoryPrototype.lut.h; sourceTree = "<group>"; };
     4306                AD2FCC101DB59C5900B3E736 /* WebAssemblyModuleConstructor.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyModuleConstructor.lut.h; sourceTree = "<group>"; };
     4307                AD2FCC111DB59C5900B3E736 /* WebAssemblyModulePrototype.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyModulePrototype.lut.h; sourceTree = "<group>"; };
     4308                AD2FCC121DB59C5900B3E736 /* WebAssemblyRuntimeErrorConstructor.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyRuntimeErrorConstructor.lut.h; sourceTree = "<group>"; };
     4309                AD2FCC131DB59C5900B3E736 /* WebAssemblyRuntimeErrorPrototype.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyRuntimeErrorPrototype.lut.h; sourceTree = "<group>"; };
     4310                AD2FCC141DB59C5900B3E736 /* WebAssemblyTableConstructor.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyTableConstructor.lut.h; sourceTree = "<group>"; };
     4311                AD2FCC151DB59C5900B3E736 /* WebAssemblyTablePrototype.lut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyTablePrototype.lut.h; sourceTree = "<group>"; };
    42164312                AD86A93D1AA4D87C002FE77F /* WeakGCMapInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakGCMapInlines.h; sourceTree = "<group>"; };
    42174313                ADDB1F6218D77DB7009B58A8 /* OpaqueRootSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpaqueRootSet.h; sourceTree = "<group>"; };
     
    56115707                        isa = PBXGroup;
    56125708                        children = (
     5709                                AD2FCC0A1DB59C5900B3E736 /* WebAssemblyCompileErrorConstructor.lut.h */,
     5710                                AD2FCC0B1DB59C5900B3E736 /* WebAssemblyCompileErrorPrototype.lut.h */,
     5711                                AD2FCC0C1DB59C5900B3E736 /* WebAssemblyInstanceConstructor.lut.h */,
     5712                                AD2FCC0D1DB59C5900B3E736 /* WebAssemblyInstancePrototype.lut.h */,
     5713                                AD2FCC0E1DB59C5900B3E736 /* WebAssemblyMemoryConstructor.lut.h */,
     5714                                AD2FCC0F1DB59C5900B3E736 /* WebAssemblyMemoryPrototype.lut.h */,
     5715                                AD2FCC101DB59C5900B3E736 /* WebAssemblyModuleConstructor.lut.h */,
     5716                                AD2FCC111DB59C5900B3E736 /* WebAssemblyModulePrototype.lut.h */,
     5717                                AD2FCC121DB59C5900B3E736 /* WebAssemblyRuntimeErrorConstructor.lut.h */,
     5718                                AD2FCC131DB59C5900B3E736 /* WebAssemblyRuntimeErrorPrototype.lut.h */,
     5719                                AD2FCC141DB59C5900B3E736 /* WebAssemblyTableConstructor.lut.h */,
     5720                                AD2FCC151DB59C5900B3E736 /* WebAssemblyTablePrototype.lut.h */,
    56135721                                0F6183321C45F35C0072450B /* AirOpcode.h */,
    56145722                                0F6183341C45F3B60072450B /* AirOpcodeGenerated.h */,
     
    56965804                        isa = PBXGroup;
    56975805                        children = (
     5806                                AD2FCB8A1DB5840000B3E736 /* js */,
    56985807                                AD2FCB861DAEBF3700B3E736 /* WebAssemblyObject.cpp */,
    56995808                                AD2FCB871DAEBF3700B3E736 /* WebAssemblyObject.h */,
     
    72017310                        sourceTree = "<group>";
    72027311                };
     7312                AD2FCB8A1DB5840000B3E736 /* js */ = {
     7313                        isa = PBXGroup;
     7314                        children = (
     7315                                AD2FCBA61DB58DA400B3E736 /* JSWebAssemblyCompileError.cpp */,
     7316                                AD2FCBA71DB58DA400B3E736 /* JSWebAssemblyCompileError.h */,
     7317                                AD2FCBA81DB58DA400B3E736 /* JSWebAssemblyInstance.cpp */,
     7318                                AD2FCBA91DB58DA400B3E736 /* JSWebAssemblyInstance.h */,
     7319                                AD2FCBAA1DB58DA400B3E736 /* JSWebAssemblyMemory.cpp */,
     7320                                AD2FCBAB1DB58DA400B3E736 /* JSWebAssemblyMemory.h */,
     7321                                AD2FCBAC1DB58DA400B3E736 /* JSWebAssemblyRuntimeError.cpp */,
     7322                                AD2FCBAD1DB58DA400B3E736 /* JSWebAssemblyRuntimeError.h */,
     7323                                AD2FCBAE1DB58DA400B3E736 /* JSWebAssemblyTable.cpp */,
     7324                                AD2FCBAF1DB58DA400B3E736 /* JSWebAssemblyTable.h */,
     7325                                AD2FCBB01DB58DA400B3E736 /* WebAssemblyCompileErrorConstructor.cpp */,
     7326                                AD2FCBB11DB58DA400B3E736 /* WebAssemblyCompileErrorConstructor.h */,
     7327                                AD2FCBB21DB58DA400B3E736 /* WebAssemblyCompileErrorPrototype.cpp */,
     7328                                AD2FCBB31DB58DA400B3E736 /* WebAssemblyCompileErrorPrototype.h */,
     7329                                AD2FCBB41DB58DA400B3E736 /* WebAssemblyInstanceConstructor.cpp */,
     7330                                AD2FCBB51DB58DA400B3E736 /* WebAssemblyInstanceConstructor.h */,
     7331                                AD2FCBB61DB58DA400B3E736 /* WebAssemblyInstancePrototype.cpp */,
     7332                                AD2FCBB71DB58DA400B3E736 /* WebAssemblyInstancePrototype.h */,
     7333                                AD2FCBB81DB58DA400B3E736 /* WebAssemblyMemoryConstructor.cpp */,
     7334                                AD2FCBB91DB58DA400B3E736 /* WebAssemblyMemoryConstructor.h */,
     7335                                AD2FCBBA1DB58DA400B3E736 /* WebAssemblyMemoryPrototype.cpp */,
     7336                                AD2FCBBB1DB58DA400B3E736 /* WebAssemblyMemoryPrototype.h */,
     7337                                AD2FCBBC1DB58DA400B3E736 /* WebAssemblyRuntimeErrorConstructor.cpp */,
     7338                                AD2FCBBD1DB58DA400B3E736 /* WebAssemblyRuntimeErrorConstructor.h */,
     7339                                AD2FCBBE1DB58DA400B3E736 /* WebAssemblyRuntimeErrorPrototype.cpp */,
     7340                                AD2FCBBF1DB58DA400B3E736 /* WebAssemblyRuntimeErrorPrototype.h */,
     7341                                AD2FCBC01DB58DA400B3E736 /* WebAssemblyTableConstructor.cpp */,
     7342                                AD2FCBC11DB58DA400B3E736 /* WebAssemblyTableConstructor.h */,
     7343                                AD2FCBC21DB58DA400B3E736 /* WebAssemblyTablePrototype.cpp */,
     7344                                AD2FCBC31DB58DA400B3E736 /* WebAssemblyTablePrototype.h */,
     7345                                AD2FCB981DB585A600B3E736 /* WebAssemblyModuleConstructor.cpp */,
     7346                                AD2FCB991DB585A600B3E736 /* WebAssemblyModuleConstructor.h */,
     7347                                AD2FCB9A1DB585A600B3E736 /* WebAssemblyModulePrototype.cpp */,
     7348                                AD2FCB9B1DB585A600B3E736 /* WebAssemblyModulePrototype.h */,
     7349                                AD2FCB8C1DB5844000B3E736 /* JSWebAssemblyModule.cpp */,
     7350                                AD2FCB8D1DB5844000B3E736 /* JSWebAssemblyModule.h */,
     7351                        );
     7352                        name = js;
     7353                        sourceTree = "<group>";
     7354                };
    72037355                C4703CC1192844A40013FBEA /* codegen */ = {
    72047356                        isa = PBXGroup;
     
    73147466                                FE3A06BE1C11041200390FDD /* JITLeftShiftGenerator.h in Headers */,
    73157467                                BCF605140E203EF800B9A64D /* ArgList.h in Headers */,
     7468                                AD2FCC1E1DB59CB200B3E736 /* WebAssemblyRuntimeErrorConstructor.lut.h in Headers */,
    73167469                                DCEE22091CEB9895000C2396 /* DFGBackwardsCFG.h in Headers */,
    73177470                                0FE050141AA9091100D33B33 /* ArgumentsMode.h in Headers */,
     
    73227475                                65C0285D1717966800351E35 /* ARMv7DOpcode.h in Headers */,
    73237476                                0F8335B81639C1EA001443B5 /* ArrayAllocationProfile.h in Headers */,
     7477                                AD2FCC1B1DB59CB200B3E736 /* WebAssemblyMemoryPrototype.lut.h in Headers */,
    73247478                                A7A8AF3517ADB5F3005AB174 /* ArrayBuffer.h in Headers */,
    73257479                                0FFC99D5184EE318009C10AB /* ArrayBufferNeuteringWatchpoint.h in Headers */,
     
    74167570                                4129527A1D2CF6BC00E78B89 /* builtins_generate_wrapper_implementation.py in Headers */,
    74177571                                412952771D2CF6BC00E78B89 /* builtins_generate_internals_wrapper_header.py in Headers */,
     7572                                AD2FCC011DB58DAD00B3E736 /* WebAssemblyModuleConstructor.h in Headers */,
    74187573                                FE3A06A61C10B72D00390FDD /* JITBitOrGenerator.h in Headers */,
    74197574                                99DA00A41BD5993100F4575C /* builtins_model.py in Headers */,
     
    74247579                                0FB7F39715ED8E4600F167B2 /* Butterfly.h in Headers */,
    74257580                                0FB7F39815ED8E4600F167B2 /* ButterflyInlines.h in Headers */,
     7581                                AD2FCBF11DB58DAD00B3E736 /* WebAssemblyInstanceConstructor.h in Headers */,
    74267582                                C2FCAE1117A9C24E0034C735 /* BytecodeBasicBlock.h in Headers */,
    74277583                                0F21C27F14BEAA8200ADC64B /* BytecodeConventions.h in Headers */,
     
    74547610                                0F6B8AD91C4EDDA200969052 /* B3DuplicateTails.h in Headers */,
    74557611                                0FE050261AA9095600D33B33 /* ClonedArguments.h in Headers */,
     7612                                AD2FCBFD1DB58DAD00B3E736 /* WebAssemblyTableConstructor.h in Headers */,
    74567613                                969A07970ED1D3AE00F1F681 /* CodeBlock.h in Headers */,
    74577614                                0F8F94411667633200D61971 /* CodeBlockHash.h in Headers */,
     
    75307687                                0FFB921816D02EB20055A5DB /* DFGAllocator.h in Headers */,
    75317688                                0F1E3A461534CBAF000F9456 /* DFGArgumentPosition.h in Headers */,
     7689                                AD2FCBF51DB58DAD00B3E736 /* WebAssemblyMemoryConstructor.h in Headers */,
    75327690                                0F7C5FB81D888A0C0044F5E2 /* MarkedBlockInlines.h in Headers */,
    75337691                                0F2DD8121AB3D8BE00BBB8E8 /* DFGArgumentsEliminationPhase.h in Headers */,
     
    76057763                                0F9D339717FFC4E60073C2BC /* DFGFlushedAt.h in Headers */,
    76067764                                A7D89CF817A0B8CC00773AD8 /* DFGFlushFormat.h in Headers */,
     7765                                AD2FCC161DB59CB200B3E736 /* WebAssemblyCompileErrorConstructor.lut.h in Headers */,
    76077766                                0F2DD8151AB3D8BE00BBB8E8 /* DFGForAllKills.h in Headers */,
    76087767                                79A090801D768465008B889B /* HashMapImpl.h in Headers */,
     
    76427801                                0F2BDC461522802000CD8910 /* DFGMinifiedNode.h in Headers */,
    76437802                                0F8F14361ADF090100ED792C /* DFGMovHintRemovalPhase.h in Headers */,
     7803                                AD2FCBEF1DB58DAD00B3E736 /* WebAssemblyCompileErrorPrototype.h in Headers */,
    76447804                                0FF2CD5C1B61A4F8004955A8 /* DFGMultiGetByOffsetData.h in Headers */,
    76457805                                A737810E1799EA2E00817533 /* DFGNaturalLoops.h in Headers */,
     
    76937853                                72AAF7CE1D0D31B3005E60BE /* JSCustomGetterSetterFunction.h in Headers */,
    76947854                                0F1E3A67153A21E2000F9456 /* DFGSilentRegisterSavePlan.h in Headers */,
     7855                                AD2FCC051DB58DAD00B3E736 /* JSWebAssemblyModule.h in Headers */,
    76957856                                0FFB921D16D02F300055A5DB /* DFGSlowPathGenerator.h in Headers */,
    76967857                                5341FC721DAC343C00E7E4D7 /* B3WasmBoundsCheckValue.h in Headers */,
     
    77067867                                0F63947815DCE34B006A597C /* DFGStructureAbstractValue.h in Headers */,
    77077868                                0F50AF3C193E8B3900674EE8 /* DFGStructureClobberState.h in Headers */,
     7869                                AD2FCC1A1DB59CB200B3E736 /* WebAssemblyMemoryConstructor.lut.h in Headers */,
    77087870                                FE99B2491C24C3D300C82159 /* JITNegGenerator.h in Headers */,
    77097871                                0F79085619A290B200F6310C /* DFGStructureRegistrationPhase.h in Headers */,
     
    77367898                                0FE050161AA9091100D33B33 /* DirectArgumentsOffset.h in Headers */,
    77377899                                0FF42731158EBD54004CB9FF /* Disassembler.h in Headers */,
     7900                                AD2FCBE71DB58DAD00B3E736 /* JSWebAssemblyMemory.h in Headers */,
    77387901                                A70447EE17A0BD7000F5898E /* DumpContext.h in Headers */,
    77397902                                2A83638618D7D0EE0000EBCC /* EdenGCActivityCallback.h in Headers */,
     
    77617924                                0FB105861675481200F8AB6E /* ExitKind.h in Headers */,
    77627925                                0F0B83AB14BCF5BB00885B4F /* ExpressionRangeInfo.h in Headers */,
     7926                                AD2FCBFB1DB58DAD00B3E736 /* WebAssemblyRuntimeErrorPrototype.h in Headers */,
    77637927                                0F4DE1CF1C4C1B54004D6C11 /* AirFixObviousSpills.h in Headers */,
    77647928                                A7A8AF3817ADB5F3005AB174 /* Float32Array.h in Headers */,
     
    77747938                                0FEA0A0C170513DB00BB722C /* FTLCompile.h in Headers */,
    77757939                                0F235BD417178E1C00690C7F /* FTLExitArgument.h in Headers */,
     7940                                AD2FCBF91DB58DAD00B3E736 /* WebAssemblyRuntimeErrorConstructor.h in Headers */,
    77767941                                0F338E0C1BF0276C0013C88F /* B3Compilation.h in Headers */,
    77777942                                0F235BD617178E1C00690C7F /* FTLExitArgumentForOperand.h in Headers */,
     
    78728037                                0F0332C418B01763005F979A /* GetByIdVariant.h in Headers */,
    78738038                                7964656A1B952FF0003059EE /* GetPutInfo.h in Headers */,
     8039                                AD2FCC1C1DB59CB200B3E736 /* WebAssemblyModuleConstructor.lut.h in Headers */,
    78748040                                0F24E54417EA9F5900ABB217 /* GPRInfo.h in Headers */,
    78758041                                142E3134134FF0A600AFADB5 /* Handle.h in Headers */,
     
    78888054                                2AD8932B17E3868F00668276 /* HeapIterationScope.h in Headers */,
    78898055                                A5339EC91BB4B4600054F005 /* HeapObserver.h in Headers */,
     8056                                AD2FCBEB1DB58DAD00B3E736 /* JSWebAssemblyTable.h in Headers */,
    78908057                                2A6F462617E959CE00C45C98 /* HeapOperation.h in Headers */,
    78918058                                14F97447138C853E00DA1C67 /* HeapRootVisitor.h in Headers */,
     
    79798146                                BC18C4150E16F5CD00B34460 /* JavaScriptCorePrefix.h in Headers */,
    79808147                                1429D9300ED22D7000B89619 /* JIT.h in Headers */,
     8148                                AD2FCBE91DB58DAD00B3E736 /* JSWebAssemblyRuntimeError.h in Headers */,
    79818149                                86CCEFDE0F413F8900FD7F9E /* JITCode.h in Headers */,
    79828150                                0F0776BF14FF002B00102332 /* JITCompilationEffort.h in Headers */,
     
    79908158                                0F766D2C15A8CC3A008F363E /* JITStubRoutineSet.h in Headers */,
    79918159                                0F5EF91F16878F7D003E5C25 /* JITThunks.h in Headers */,
     8160                                AD2FCC211DB59CB200B3E736 /* WebAssemblyTablePrototype.lut.h in Headers */,
    79928161                                0FC712E317CD8793008CC93C /* JITToDFGDeferredCompilationCallback.h in Headers */,
     8162                                AD2FCBE31DB58DAD00B3E736 /* JSWebAssemblyCompileError.h in Headers */,
    79938163                                840480131021A1D9008E7F01 /* JSAPIValueWrapper.h in Headers */,
    79948164                                C2CF39C216E15A8100DD69BE /* JSAPIWrapperObject.h in Headers */,
     
    80218191                                A5EA70EE19F5B5C40098F5EC /* JSContextRefInspectorSupport.h in Headers */,
    80228192                                A5D2E665195E174000A518E7 /* JSContextRefInternal.h in Headers */,
     8193                                AD2FCC031DB58DAD00B3E736 /* WebAssemblyModulePrototype.h in Headers */,
    80238194                                A5AB49DD1BEC8086007020FB /* PerGlobalObjectWrapperWorld.h in Headers */,
    80248195                                148CD1D8108CF902008163C6 /* JSContextRefPrivate.h in Headers */,
     
    80818252                                BC18C4160E16F5CD00B34460 /* JSLexicalEnvironment.h in Headers */,
    80828253                                BC18C4230E16F5CD00B34460 /* JSLock.h in Headers */,
     8254                                AD2FCC191DB59CB200B3E736 /* WebAssemblyInstancePrototype.lut.h in Headers */,
    80838255                                C25D709C16DE99F400FCA6BC /* JSManagedValue.h in Headers */,
    80848256                                2A4BB7F318A41179008A0FCD /* JSManagedValueInternal.h in Headers */,
     
    80898261                                E3D239C91B829C1C00BBEF67 /* JSModuleEnvironment.h in Headers */,
    80908262                                E318CBC11B8AEF5100A2929D /* JSModuleNamespaceObject.h in Headers */,
     8263                                AD2FCC171DB59CB200B3E736 /* WebAssemblyCompileErrorPrototype.lut.h in Headers */,
    80918264                                E39DA4A71B7E8B7C0084F33A /* JSModuleRecord.h in Headers */,
    80928265                                E33E8D1D1B9013C300346B52 /* JSNativeStdFunction.h in Headers */,
     
    81078280                                E3EF88751B66DF23003F26CB /* JSPropertyNameIterator.h in Headers */,
    81088281                                862553D216136E1A009F17D0 /* JSProxy.h in Headers */,
     8282                                AD2FCC1F1DB59CB200B3E736 /* WebAssemblyRuntimeErrorPrototype.lut.h in Headers */,
    81098283                                A552C3801ADDB8FE00139726 /* JSRemoteInspector.h in Headers */,
    81108284                                9928FF3C18AC4AEC00B8CF12 /* JSReplayInputs.h in Headers */,
     
    81288302                                BC18C4280E16F5CD00B34460 /* JSStringRef.h in Headers */,
    81298303                                43AB26C61C1A535900D82AE6 /* B3MathExtras.h in Headers */,
     8304                                AD2FCBF31DB58DAD00B3E736 /* WebAssemblyInstancePrototype.h in Headers */,
    81308305                                BC18C4290E16F5CD00B34460 /* JSStringRefCF.h in Headers */,
    81318306                                1A28D4A8177B71C80007FA3C /* JSStringRefPrivate.h in Headers */,
     
    82708445                                E328C6C91DA432F900D255FD /* RegisterAtOffset.h in Headers */,
    82718446                                65303D641447B9E100D3F904 /* ParserTokens.h in Headers */,
     8447                                AD2FCC1D1DB59CB200B3E736 /* WebAssemblyModulePrototype.lut.h in Headers */,
    82728448                                0FF9CE741B9CD6D0004EDCA6 /* PolymorphicAccess.h in Headers */,
    82738449                                0FE834181A6EF97B00D04847 /* PolymorphicCallStubRoutine.h in Headers */,
     
    83468522                                0FE050291AA9095600D33B33 /* ScopedArgumentsTable.h in Headers */,
    83478523                                0FE0502B1AA9095600D33B33 /* ScopeOffset.h in Headers */,
     8524                                AD2FCBF71DB58DAD00B3E736 /* WebAssemblyMemoryPrototype.h in Headers */,
    83488525                                0F24E55217EE274900ABB217 /* ScratchRegisterAllocator.h in Headers */,
    83498526                                A5FD0068189AFE9C00633231 /* ScriptArguments.h in Headers */,
     
    83628539                                A7299DA217D12848005F5FF9 /* SetPrototype.h in Headers */,
    83638540                                0FEE98411A8865B700754E93 /* SetupVarargsFrame.h in Headers */,
     8541                                AD2FCC181DB59CB200B3E736 /* WebAssemblyInstanceConstructor.lut.h in Headers */,
    83648542                                86AE64AA135E5E1C00963012 /* SH4Assembler.h in Headers */,
    83658543                                0F2B670517B6B5AB00A7AE3F /* SimpleTypedArrayController.h in Headers */,
     
    84148592                                53FD04D41D7AB291003287D3 /* WASMCallingConvention.h in Headers */,
    84158593                                705B41B21A6E501E00716757 /* SymbolPrototype.h in Headers */,
     8594                                AD2FCC201DB59CB200B3E736 /* WebAssemblyTableConstructor.lut.h in Headers */,
    84168595                                996B73281BDA08EF00331B84 /* SymbolPrototype.lut.h in Headers */,
    84178596                                BC18C46B0E16F5CD00B34460 /* SymbolTable.h in Headers */,
    84188597                                A784A26411D16622005776AC /* SyntaxChecker.h in Headers */,
    84198598                                70ECA6081AFDBEA200449739 /* TemplateRegistry.h in Headers */,
     8599                                AD2FCBED1DB58DAD00B3E736 /* WebAssemblyCompileErrorConstructor.h in Headers */,
    84208600                                0F5B4A331C84F0D600F1B17E /* SlowPathReturnType.h in Headers */,
    84218601                                70ECA6091AFDBEA200449739 /* TemplateRegistryKey.h in Headers */,
     
    84778657                                0F919D2615853CE3004A4E7D /* Watchpoint.h in Headers */,
    84788658                                142E313C134FF0A600AFADB5 /* Weak.h in Headers */,
     8659                                AD2FCBE51DB58DAD00B3E736 /* JSWebAssemblyInstance.h in Headers */,
    84798660                                14E84F9F14EE1ACC00D6D5D4 /* WeakBlock.h in Headers */,
    84808661                                14BFCE6910CDB1FC00364CCE /* WeakGCMap.h in Headers */,
     
    85028683                                451539B912DC994500EF7AC4 /* Yarr.h in Headers */,
    85038684                                E37AD83C1DA4928600F3D412 /* DOMJITPatchpointParams.h in Headers */,
     8685                                AD2FCBFF1DB58DAD00B3E736 /* WebAssemblyTablePrototype.h in Headers */,
    85048686                                86704B8512DBA33700A9FE7B /* YarrInterpreter.h in Headers */,
    85058687                                86704B8712DBA33700A9FE7B /* YarrJIT.h in Headers */,
     
    91149296                                14280864107EC11A0013E7B2 /* BooleanObject.cpp in Sources */,
    91159297                                14280865107EC11A0013E7B2 /* BooleanPrototype.cpp in Sources */,
     9298                                AD2FCBF61DB58DAD00B3E736 /* WebAssemblyMemoryPrototype.cpp in Sources */,
    91169299                                A7D801A41880D66E0026C39B /* BuiltinExecutables.cpp in Sources */,
    91179300                                9EA5C7A1190F084200508EBE /* BundlePath.mm in Sources */,
     
    91319314                                0F0B83B014BCF71600885B4F /* CallLinkInfo.cpp in Sources */,
    91329315                                0F93329D14CA7DC30085F3C6 /* CallLinkStatus.cpp in Sources */,
     9316                                AD2FCBFE1DB58DAD00B3E736 /* WebAssemblyTablePrototype.cpp in Sources */,
    91339317                                0F6B8ADC1C4EFAC300969052 /* B3SSACalculator.cpp in Sources */,
    91349318                                627673231B680C1E00FD9F2E /* CallMode.cpp in Sources */,
     
    92219405                                0FE8534B1723CDA500B618F5 /* DFGDesiredWatchpoints.cpp in Sources */,
    92229406                                C2981FD817BAEE4B00A3BC98 /* DFGDesiredWeakReferences.cpp in Sources */,
     9407                                AD2FCBE81DB58DAD00B3E736 /* JSWebAssemblyRuntimeError.cpp in Sources */,
    92239408                                0FF427641591A1CC004CB9FF /* DFGDisassembler.cpp in Sources */,
    92249409                                0F5A1273192D9FDF008764A3 /* DFGDoesGC.cpp in Sources */,
     
    93029487                                0FB17662196B8F9E0091052A /* DFGPureValue.cpp in Sources */,
    93039488                                0F3A1BF91A9ECB7D000DE01A /* DFGPutStackSinkingPhase.cpp in Sources */,
     9489                                AD2FCBEA1DB58DAD00B3E736 /* JSWebAssemblyTable.cpp in Sources */,
    93049490                                0F2FCCFB18A60070001A27F8 /* DFGSafepoint.cpp in Sources */,
    93059491                                86EC9DD21328DF82002B2AD7 /* DFGSpeculativeJIT.cpp in Sources */,
     
    93099495                                A7D89CFF17A0B8CC00773AD8 /* DFGSSAConversionPhase.cpp in Sources */,
    93109496                                0FC20CB918556A3500C9E954 /* DFGSSALoweringPhase.cpp in Sources */,
     9497                                AD2FCBF01DB58DAD00B3E736 /* WebAssemblyInstanceConstructor.cpp in Sources */,
    93119498                                0F9FB4F417FCB91700CB67F8 /* DFGStackLayoutPhase.cpp in Sources */,
    93129499                                0F4F29DF18B6AD1C0057BC15 /* DFGStaticExecutionCountEstimationPhase.cpp in Sources */,
     
    93349521                                0F9495871C57F47500413A48 /* B3StackSlot.cpp in Sources */,
    93359522                                0F2BDC5115228FFD00CD8910 /* DFGVariableEvent.cpp in Sources */,
     9523                                AD2FCBF21DB58DAD00B3E736 /* WebAssemblyInstancePrototype.cpp in Sources */,
    93369524                                0F2BDC4A1522809A00CD8910 /* DFGVariableEventStream.cpp in Sources */,
    93379525                                0FFFC95F14EF90BB00C72532 /* DFGVirtualRegisterAllocationPhase.cpp in Sources */,
     
    93479535                                147F39C7107EC37600427A48 /* Error.cpp in Sources */,
    93489536                                147F39C8107EC37600427A48 /* ErrorConstructor.cpp in Sources */,
     9537                                AD2FCBEC1DB58DAD00B3E736 /* WebAssemblyCompileErrorConstructor.cpp in Sources */,
    93499538                                FEB58C14187B8B160098EF0B /* ErrorHandlingScope.cpp in Sources */,
    93509539                                147F39C9107EC37600427A48 /* ErrorInstance.cpp in Sources */,
     
    94679656                                A1587D6D1B4DC14100D69849 /* IntlDateTimeFormat.cpp in Sources */,
    94689657                                A1587D6F1B4DC14100D69849 /* IntlDateTimeFormatConstructor.cpp in Sources */,
     9658                                AD2FCC041DB58DAD00B3E736 /* JSWebAssemblyModule.cpp in Sources */,
    94699659                                FE3A06BF1C11041600390FDD /* JITRightShiftGenerator.cpp in Sources */,
    94709660                                262D85B61C0D650F006ACB61 /* AirFixPartialRegisterStalls.cpp in Sources */,
     
    94899679                                0FAF7EFD165BA91B000C8455 /* JITDisassembler.cpp in Sources */,
    94909680                                0F6DB7EC1D617D1100CDBF8E /* MacroAssemblerCodeRef.cpp in Sources */,
     9681                                AD2FCBE21DB58DAD00B3E736 /* JSWebAssemblyCompileError.cpp in Sources */,
    94919682                                0F46808314BA573100BFE272 /* JITExceptions.cpp in Sources */,
    94929683                                0FB14E1E18124ACE009B6B4D /* JITInlineCacheGenerator.cpp in Sources */,
     
    95229713                                657CF45819BF6662004ACBF2 /* JSCallee.cpp in Sources */,
    95239714                                A7D801A81880D6A80026C39B /* JSCBuiltins.cpp in Sources */,
     9715                                AD2FCC001DB58DAD00B3E736 /* WebAssemblyModuleConstructor.cpp in Sources */,
    95249716                                147F39D1107EC37600427A48 /* JSCell.cpp in Sources */,
    95259717                                147F39D6107EC37600427A48 /* JSCJSValue.cpp in Sources */,
     
    95619753                                140B7D1D0DC69AF7009C42B8 /* JSLexicalEnvironment.cpp in Sources */,
    95629754                                14280875107EC13E0013E7B2 /* JSLock.cpp in Sources */,
     9755                                AD2FCBFA1DB58DAD00B3E736 /* WebAssemblyRuntimeErrorPrototype.cpp in Sources */,
    95639756                                C25D709B16DE99F400FCA6BC /* JSManagedValue.mm in Sources */,
    95649757                                A700874117CBE8EB00C3E643 /* JSMap.cpp in Sources */,
     
    95709763                                0FB387921BFD31A100E3AB1E /* FTLCompile.cpp in Sources */,
    95719764                                E33E8D1C1B9013C300346B52 /* JSNativeStdFunction.cpp in Sources */,
     9765                                AD2FCBF81DB58DAD00B3E736 /* WebAssemblyRuntimeErrorConstructor.cpp in Sources */,
    95729766                                147F39D4107EC37600427A48 /* JSObject.cpp in Sources */,
    95739767                                1482B7E40A43076000517CFC /* JSObjectRef.cpp in Sources */,
     
    96439837                                A7A4AE0817973B26005612B1 /* MacroAssemblerX86Common.cpp in Sources */,
    96449838                                FE3A06AC1C10C39E00390FDD /* JITBitOrGenerator.cpp in Sources */,
     9839                                AD2FCBFC1DB58DAD00B3E736 /* WebAssemblyTableConstructor.cpp in Sources */,
    96459840                                A700873917CBE85300C3E643 /* MapConstructor.cpp in Sources */,
    96469841                                A74DEF93182D991400522C22 /* MapIteratorPrototype.cpp in Sources */,
     
    97029897                                0FF729B3166AD35C000F5BA3 /* ProfilerOrigin.cpp in Sources */,
    97039898                                0FF729B4166AD35C000F5BA3 /* ProfilerOriginStack.cpp in Sources */,
     9899                                AD2FCBE61DB58DAD00B3E736 /* JSWebAssemblyMemory.cpp in Sources */,
    97049900                                0F9D4C0C1C3E1C11006CD984 /* FTLExceptionTarget.cpp in Sources */,
    97059901                                0FB1058B1675483100F8AB6E /* ProfilerOSRExit.cpp in Sources */,
     
    97349930                                A5BA15EC182340B400A82E69 /* RemoteConnectionToTarget.mm in Sources */,
    97359931                                A5BA15EE182340B400A82E69 /* RemoteInspectorXPCConnection.mm in Sources */,
     9932                                AD2FCBF41DB58DAD00B3E736 /* WebAssemblyMemoryConstructor.cpp in Sources */,
    97369933                                0F24E55017EE274900ABB217 /* Repatch.cpp in Sources */,
    97379934                                0F6B8AD81C4EDDA200969052 /* B3DuplicateTails.cpp in Sources */,
     
    981010007                                0FF42745158EBE91004CB9FF /* udis86_syn-att.c in Sources */,
    981110008                                0FF42746158EBE91004CB9FF /* udis86_syn-intel.c in Sources */,
     10009                                AD2FCBEE1DB58DAD00B3E736 /* WebAssemblyCompileErrorPrototype.cpp in Sources */,
    981210010                                0FF42747158EBE91004CB9FF /* udis86_syn.c in Sources */,
    981310011                                70B791961C024A28002481E2 /* GeneratorFunctionPrototype.cpp in Sources */,
     10012                                AD2FCBE41DB58DAD00B3E736 /* JSWebAssemblyInstance.cpp in Sources */,
    981410013                                0FF42732158EBD58004CB9FF /* UDis86Disassembler.cpp in Sources */,
    981510014                                A76F279415F13C9600517D67 /* UnlinkedCodeBlock.cpp in Sources */,
     
    982210021                                0F20C2591A8013AB00DA3229 /* VirtualRegister.cpp in Sources */,
    982310022                                E18E3A590DF9278C00D90B34 /* VM.cpp in Sources */,
     10023                                AD2FCC021DB58DAD00B3E736 /* WebAssemblyModulePrototype.cpp in Sources */,
    982410024                                FE5932A7183C5A2600A1ECCC /* VMEntryScope.cpp in Sources */,
    982510025                                FE187A011BFBE55E0038BBCA /* JITMulGenerator.cpp in Sources */,
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r207432 r207572  
    824824        putDirectWithoutTransition(vm, Identifier::fromString(exec, "WebAssembly"), wasm, DontEnum);
    825825        GlobalPropertyInfo extraStaticGlobals[] = {
    826             GlobalPropertyInfo(vm.propertyNames->builtinNames().ModulePrivateName(), wasm->getDirect(vm, Identifier::fromString(exec, "Module")), DontEnum | DontDelete | ReadOnly),
    827             GlobalPropertyInfo(vm.propertyNames->builtinNames().InstancePrivateName(), wasm->getDirect(vm, Identifier::fromString(exec, "Instance")), DontEnum | DontDelete | ReadOnly),
    828             GlobalPropertyInfo(vm.propertyNames->builtinNames().MemoryPrivateName(), wasm->getDirect(vm, Identifier::fromString(exec, "Memory")), DontEnum | DontDelete | ReadOnly),
    829             GlobalPropertyInfo(vm.propertyNames->builtinNames().TablePrivateName(), wasm->getDirect(vm, Identifier::fromString(exec, "Table")), DontEnum | DontDelete | ReadOnly),
    830             GlobalPropertyInfo(vm.propertyNames->builtinNames().CompileErrorPrivateName(), wasm->getDirect(vm, Identifier::fromString(exec, "CompileError")), DontEnum | DontDelete | ReadOnly),
    831             GlobalPropertyInfo(vm.propertyNames->builtinNames().RuntimeErrorPrivateName(), wasm->getDirect(vm, Identifier::fromString(exec, "RuntimeError")), DontEnum | DontDelete | ReadOnly),
     826#define REGISTER_WASM_CONSTRUCTOR_AS_GLOBAL_PROPERTY(NAME, ...) \
     827            GlobalPropertyInfo(vm.propertyNames->builtinNames().NAME ## PrivateName(), wasm->getDirect(vm, Identifier::fromString(exec, #NAME)), DontEnum | DontDelete | ReadOnly),
     828            FOR_EACH_WASM_CONSTRUCTOR_PROPERTY(REGISTER_WASM_CONSTRUCTOR_AS_GLOBAL_PROPERTY)
    832829        };
    833830        addStaticGlobals(extraStaticGlobals, WTF_ARRAY_LENGTH(extraStaticGlobals));
  • trunk/Source/JavaScriptCore/wasm/WebAssemblyObject.cpp

    r207432 r207572  
    2727#include "WebAssemblyObject.h"
    2828
    29 #include "BuiltinNames.h"
    3029#include "FunctionPrototype.h"
    31 #include "InternalFunction.h"
    3230#include "JSCInlines.h"
    33 #include "JSDestructibleObject.h"
     31#include "js/JSWebAssemblyCompileError.h"
     32#include "js/JSWebAssemblyInstance.h"
     33#include "js/JSWebAssemblyMemory.h"
     34#include "js/JSWebAssemblyModule.h"
     35#include "js/JSWebAssemblyRuntimeError.h"
     36#include "js/JSWebAssemblyTable.h"
     37#include "js/WebAssemblyCompileErrorConstructor.h"
     38#include "js/WebAssemblyCompileErrorPrototype.h"
     39#include "js/WebAssemblyInstanceConstructor.h"
     40#include "js/WebAssemblyInstancePrototype.h"
     41#include "js/WebAssemblyMemoryConstructor.h"
     42#include "js/WebAssemblyMemoryPrototype.h"
     43#include "js/WebAssemblyModuleConstructor.h"
     44#include "js/WebAssemblyModulePrototype.h"
     45#include "js/WebAssemblyRuntimeErrorConstructor.h"
     46#include "js/WebAssemblyRuntimeErrorPrototype.h"
     47#include "js/WebAssemblyTableConstructor.h"
     48#include "js/WebAssemblyTablePrototype.h"
    3449
    3550namespace JSC {
     
    3752STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(WebAssemblyObject);
    3853
    39 // Name, functionLength
    40 #define FOR_EACH_WASM_CONSTRUCTOR_PROPERTY(DO) \
    41     DO(Module, 1) \
    42     DO(Instance, 2) \
    43     DO(Memory, 1) \
    44     DO(Table, 1) \
    45     DO(CompileError, 1) \
    46     DO(RuntimeError, 1)
    47 
    48 // Name, functionLength
    49 #define FOR_EACH_WASM_FUNCTION_PROPERTY(DO) \
    50     DO(validate, 1) \
    51     DO(compile, 1)
    52 
    53 // FIXME Implement each of these in their own header file, and autogenerate *.lut.h files for *PrototypeTable. https://bugs.webkit.org/show_bug.cgi?id=161709
    54 #define DEFINE_WASM_OBJECT_CONSTRUCTOR_PROPERTY(NAME, functionLength) \
    55     class JSWebAssembly ## NAME : public JSDestructibleObject { \
    56     public: \
    57         typedef JSDestructibleObject Base; \
    58         \
    59         static JSWebAssembly ## NAME* create(VM& vm, Structure* structure) \
    60         { \
    61             auto* format = new (NotNull, allocateCell<JSWebAssembly ## NAME>(vm.heap)) JSWebAssembly ## NAME(vm, structure); \
    62             format->finishCreation(vm); \
    63             return format; \
    64         } \
    65         static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) \
    66         { \
    67             return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info()); \
    68         } \
    69         \
    70         DECLARE_INFO; \
    71         \
    72     protected: \
    73         JSWebAssembly ## NAME(VM& vm, Structure* structure) \
    74             : JSDestructibleObject(vm, structure) \
    75         { \
    76         } \
    77         void finishCreation(VM& vm) \
    78         { \
    79             Base::finishCreation(vm); \
    80             ASSERT(inherits(info())); \
    81         } \
    82     }; \
    83     const ClassInfo JSWebAssembly ## NAME::s_info = { "WebAssembly." #NAME, &Base::s_info, 0, CREATE_METHOD_TABLE(JSWebAssembly ## NAME) }; \
    84     \
    85     class WebAssembly ## NAME ## Prototype : public JSDestructibleObject { \
    86     public: \
    87         typedef JSDestructibleObject Base; \
    88         static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable; \
    89         \
    90         static WebAssembly ## NAME ## Prototype* create(VM& vm, JSGlobalObject*, Structure* structure) \
    91         { \
    92             auto* object = new (NotNull, allocateCell<WebAssembly ## NAME ## Prototype>(vm.heap)) WebAssembly ## NAME ## Prototype(vm, structure); \
    93             object->finishCreation(vm); \
    94             return object; \
    95         } \
    96         static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) \
    97         { \
    98             return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info()); \
    99         } \
    100         \
    101         DECLARE_INFO; \
    102         \
    103     protected: \
    104         void finishCreation(VM& vm) \
    105         { \
    106             Base::finishCreation(vm); \
    107         } \
    108         \
    109     private: \
    110         WebAssembly ## NAME ## Prototype(VM& vm, Structure* structure) \
    111             : JSDestructibleObject(vm, structure) \
    112         { \
    113         } \
    114     }; \
    115     static const struct CompactHashIndex NAME ## PrototypeTableIndex[] = { { 0, 0 } }; \
    116     static const struct HashTableValue NAME ## PrototypeTableValues[] = { { nullptr, 0, NoIntrinsic, { 0 } } }; \
    117     static const struct HashTable NAME ## PrototypeTable = { 0, 0, true, NAME ## PrototypeTableValues, NAME ## PrototypeTableIndex }; \
    118     const ClassInfo WebAssembly ## NAME ## Prototype::s_info = { "WebAssembly." #NAME ".prototype", &Base::s_info, &NAME ## PrototypeTable, CREATE_METHOD_TABLE(WebAssembly ## NAME ## Prototype) }; \
    119     \
    120     static EncodedJSValue JSC_HOST_CALL constructJSWebAssembly ## NAME(ExecState* state) \
    121     { \
    122         VM& vm = state->vm(); \
    123         auto scope = DECLARE_THROW_SCOPE(vm); \
    124         return JSValue::encode(throwException(state, scope, createError(state, ASCIILiteral("WebAssembly doesn't yet implement the " #NAME " constructor property")))); \
    125     } \
    126     \
    127     static EncodedJSValue JSC_HOST_CALL callJSWebAssembly ## NAME(ExecState* state) \
    128     { \
    129     VM& vm = state->vm(); \
    130     auto scope = DECLARE_THROW_SCOPE(vm); \
    131     return JSValue::encode(throwException(state, scope, createError(state, ASCIILiteral("WebAssembly doesn't yet implement the " #NAME " constructor property")))); \
    132     } \
    133     \
    134     class WebAssembly ## NAME ## Constructor : public InternalFunction { \
    135     public: \
    136         typedef InternalFunction Base; \
    137         static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable; \
    138         \
    139         static WebAssembly ## NAME ## Constructor* create(VM& vm, Structure* structure, WebAssembly ## NAME ## Prototype* NAME ## Prototype, Structure* NAME ## Structure) \
    140         { \
    141             WebAssembly ## NAME ## Constructor* constructor = new (NotNull, allocateCell<WebAssembly ## NAME ## Constructor>(vm.heap)) WebAssembly ## NAME ## Constructor(vm, structure); \
    142             constructor->finishCreation(vm, NAME ## Prototype, NAME ## Structure); \
    143             return constructor; \
    144         } \
    145         static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) \
    146         { \
    147             return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info()); \
    148         } \
    149         \
    150         DECLARE_INFO; \
    151         \
    152         Structure* NAME ## Structure() const { return m_ ## NAME ## Structure.get(); } \
    153         \
    154     protected: \
    155         void finishCreation(VM& vm, WebAssembly ## NAME ## Prototype* NAME ## Prototype, Structure* NAME ## Structure) \
    156         { \
    157             Base::finishCreation(vm, ASCIILiteral(#NAME)); \
    158             putDirectWithoutTransition(vm, vm.propertyNames->prototype, NAME ## Prototype, DontEnum | DontDelete | ReadOnly); \
    159             putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(functionLength), ReadOnly | DontEnum | DontDelete); \
    160             m_ ## NAME ## Structure.set(vm, this, NAME ## Structure); \
    161         } \
    162         \
    163     private: \
    164         WebAssembly ## NAME ## Constructor(VM& vm, Structure* structure) \
    165             : InternalFunction(vm, structure) \
    166         { \
    167         } \
    168         static ConstructType getConstructData(JSCell*, ConstructData& constructData) \
    169         { \
    170             constructData.native.function = constructJSWebAssembly ## NAME; \
    171             return ConstructType::Host; \
    172         } \
    173         static CallType getCallData(JSCell*, CallData& callData) \
    174         { \
    175             callData.native.function = callJSWebAssembly ## NAME; \
    176             return CallType::Host; \
    177         } \
    178         static void visitChildren(JSCell* cell, SlotVisitor& visitor) \
    179         { \
    180             auto* thisObject = jsCast<WebAssembly ## NAME ## Constructor*>(cell); \
    181             ASSERT_GC_OBJECT_INHERITS(thisObject, info()); \
    182             Base::visitChildren(thisObject, visitor); \
    183             visitor.append(&thisObject->m_ ## NAME ## Structure); \
    184         } \
    185         \
    186         WriteBarrier<Structure> m_ ## NAME ## Structure; \
    187     }; \
    188     static const struct CompactHashIndex NAME ## ConstructorTableIndex[] = { { 0, 0 } }; \
    189     static const struct HashTableValue NAME ## ConstructorTableValues[] = { { nullptr, 0, NoIntrinsic, { 0 } } }; \
    190     static const struct HashTable NAME ## ConstructorTable = { 0, 0, true, NAME ## ConstructorTableValues, NAME ## ConstructorTableIndex }; \
    191     const ClassInfo WebAssembly ## NAME ## Constructor::s_info = { "Function", &Base::s_info, &NAME ## ConstructorTable, CREATE_METHOD_TABLE(WebAssembly ## NAME ## Constructor) };
    192 
    193 FOR_EACH_WASM_CONSTRUCTOR_PROPERTY(DEFINE_WASM_OBJECT_CONSTRUCTOR_PROPERTY)
    194 
    195 
    19654#define DECLARE_WASM_OBJECT_FUNCTION(NAME, ...) EncodedJSValue JSC_HOST_CALL wasmObjectFunc ## NAME(ExecState*);
    19755FOR_EACH_WASM_FUNCTION_PROPERTY(DECLARE_WASM_OBJECT_FUNCTION)
    198 
    19956
    20057const ClassInfo WebAssemblyObject::s_info = { "WebAssembly", &Base::s_info, 0, CREATE_METHOD_TABLE(WebAssemblyObject) };
     
    23895}
    23996
    240 // ------------------------------ Constructors -----------------------------
    241 
    242    
    24397// ------------------------------ Functions --------------------------------
    24498
  • trunk/Source/JavaScriptCore/wasm/WebAssemblyObject.h

    r207432 r207572  
    4646};
    4747
     48// Name, functionLength
     49#define FOR_EACH_WASM_CONSTRUCTOR_PROPERTY(DO) \
     50    DO(Module, 1) \
     51    DO(Instance, 2) \
     52    DO(Memory, 1) \
     53    DO(Table, 1) \
     54    DO(CompileError, 1) \
     55    DO(RuntimeError, 1)
     56
     57// Name, functionLength
     58#define FOR_EACH_WASM_FUNCTION_PROPERTY(DO) \
     59    DO(validate, 1) \
     60    DO(compile, 1)
     61
    4862} // namespace JSC
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyCompileError.cpp

    r207571 r207572  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "JSWebAssemblyCompileError.h"
    2728
    28 #include "JSObject.h"
     29#include "JSCInlines.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
    33 public:
    34     typedef JSNonFinalObject Base;
     33JSWebAssemblyCompileError* JSWebAssemblyCompileError::create(ExecState* state, Structure* structure, const String& message, bool useCurrentFrame)
     34{
     35    auto& vm = state->vm();
     36    auto* instance = new (NotNull, allocateCell<JSWebAssemblyCompileError>(vm.heap)) JSWebAssemblyCompileError(vm, structure);
     37    instance->finishCreation(state, vm, message, useCurrentFrame);
     38    return instance;
     39}
    3540
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
    37     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
     41JSWebAssemblyCompileError::JSWebAssemblyCompileError(VM& vm, Structure* structure)
     42    : Base(vm, structure)
     43{
     44}
    3845
    39     DECLARE_INFO;
    40 
    41 protected:
    42     void finishCreation(VM&, JSGlobalObject*);
    43 
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
    46 };
     46const ClassInfo JSWebAssemblyCompileError::s_info = { "WebAssembly.CompileError", &Base::s_info, 0, CREATE_METHOD_TABLE(JSWebAssemblyCompileError) };
    4747
    4848} // namespace JSC
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyCompileError.h

    r207571 r207572  
    2626#pragma once
    2727
    28 #include "JSObject.h"
     28#include "ErrorInstance.h"
    2929
    3030namespace JSC {
    3131
    32 class WebAssemblyObject : public JSNonFinalObject {
     32class JSWebAssemblyCompileError : public ErrorInstance {
    3333public:
    34     typedef JSNonFinalObject Base;
     34    typedef ErrorInstance Base;
    3535
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
    37     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
     36    static JSWebAssemblyCompileError* create(ExecState*, Structure*, const String&, bool);
    3837
    3938    DECLARE_INFO;
    4039
    4140protected:
    42     void finishCreation(VM&, JSGlobalObject*);
    43 
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
     41    JSWebAssemblyCompileError(VM&, Structure*);
    4642};
    4743
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp

    r207571 r207572  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "JSWebAssemblyInstance.h"
    2728
    28 #include "JSObject.h"
     29#include "JSCInlines.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
    33 public:
    34     typedef JSNonFinalObject Base;
     33JSWebAssemblyInstance* JSWebAssemblyInstance::create(VM& vm, Structure* structure)
     34{
     35    auto* instance = new (NotNull, allocateCell<JSWebAssemblyInstance>(vm.heap)) JSWebAssemblyInstance(vm, structure);
     36    instance->finishCreation(vm);
     37    return instance;
     38}
    3539
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
    37     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
     40Structure* JSWebAssemblyInstance::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
     41{
     42    return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
     43}
    3844
    39     DECLARE_INFO;
     45JSWebAssemblyInstance::JSWebAssemblyInstance(VM& vm, Structure* structure)
     46    : Base(vm, structure)
     47{
     48}
    4049
    41 protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     50void JSWebAssemblyInstance::finishCreation(VM& vm)
     51{
     52    Base::finishCreation(vm);
     53    ASSERT(inherits(info()));
     54}
    4355
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
    46 };
     56void JSWebAssemblyInstance::destroy(JSCell* cell)
     57{
     58    static_cast<JSWebAssemblyInstance*>(cell)->JSWebAssemblyInstance::~JSWebAssemblyInstance();
     59}
     60
     61void JSWebAssemblyInstance::visitChildren(JSCell* cell, SlotVisitor& visitor)
     62{
     63    auto* thisObject = jsCast<JSWebAssemblyInstance*>(cell);
     64    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     65
     66    Base::visitChildren(thisObject, visitor);
     67}
     68
     69const ClassInfo JSWebAssemblyInstance::s_info = { "WebAssembly.Instance", &Base::s_info, 0, CREATE_METHOD_TABLE(JSWebAssemblyInstance) };
    4770
    4871} // namespace JSC
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "JSDestructibleObject.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class JSWebAssemblyInstance : public JSDestructibleObject {
    3334public:
    34     typedef JSNonFinalObject Base;
     35    typedef JSDestructibleObject Base;
    3536
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     37    static JSWebAssemblyInstance* create(VM&, Structure*);
    3738    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3839
     
    4041
    4142protected:
    42     void finishCreation(VM&, JSGlobalObject*);
    43 
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
     43    JSWebAssemblyInstance(VM&, Structure*);
     44    void finishCreation(VM&);
     45    static void destroy(JSCell*);
     46    static void visitChildren(JSCell*, SlotVisitor&);
    4647};
    4748
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.cpp

    r207571 r207572  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "JSWebAssemblyMemory.h"
    2728
    28 #include "JSObject.h"
     29#include "JSCInlines.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
    33 public:
    34     typedef JSNonFinalObject Base;
     33JSWebAssemblyMemory* JSWebAssemblyMemory::create(VM& vm, Structure* structure)
     34{
     35    auto* instance = new (NotNull, allocateCell<JSWebAssemblyMemory>(vm.heap)) JSWebAssemblyMemory(vm, structure);
     36    instance->finishCreation(vm);
     37    return instance;
     38}
    3539
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
    37     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
     40Structure* JSWebAssemblyMemory::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
     41{
     42    return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
     43}
    3844
    39     DECLARE_INFO;
     45JSWebAssemblyMemory::JSWebAssemblyMemory(VM& vm, Structure* structure)
     46    : Base(vm, structure)
     47{
     48}
    4049
    41 protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     50void JSWebAssemblyMemory::finishCreation(VM& vm)
     51{
     52    Base::finishCreation(vm);
     53    ASSERT(inherits(info()));
     54}
    4355
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
    46 };
     56void JSWebAssemblyMemory::destroy(JSCell* cell)
     57{
     58    static_cast<JSWebAssemblyMemory*>(cell)->JSWebAssemblyMemory::~JSWebAssemblyMemory();
     59}
     60
     61void JSWebAssemblyMemory::visitChildren(JSCell* cell, SlotVisitor& visitor)
     62{
     63    auto* thisObject = jsCast<JSWebAssemblyMemory*>(cell);
     64    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     65
     66    Base::visitChildren(thisObject, visitor);
     67}
     68
     69const ClassInfo JSWebAssemblyMemory::s_info = { "WebAssembly.Memory", &Base::s_info, 0, CREATE_METHOD_TABLE(JSWebAssemblyMemory) };
    4770
    4871} // namespace JSC
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "JSDestructibleObject.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class JSWebAssemblyMemory : public JSDestructibleObject {
    3334public:
    34     typedef JSNonFinalObject Base;
     35    typedef JSDestructibleObject Base;
    3536
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     37    static JSWebAssemblyMemory* create(VM&, Structure*);
    3738    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3839
     
    4041
    4142protected:
    42     void finishCreation(VM&, JSGlobalObject*);
    43 
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
     43    JSWebAssemblyMemory(VM&, Structure*);
     44    void finishCreation(VM&);
     45    static void destroy(JSCell*);
     46    static void visitChildren(JSCell*, SlotVisitor&);
    4647};
    4748
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.cpp

    r207571 r207572  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "JSWebAssemblyModule.h"
    2728
    28 #include "JSObject.h"
     29#include "JSCInlines.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
    33 public:
    34     typedef JSNonFinalObject Base;
     33JSWebAssemblyModule* JSWebAssemblyModule::create(VM& vm, Structure* structure)
     34{
     35    auto* instance = new (NotNull, allocateCell<JSWebAssemblyModule>(vm.heap)) JSWebAssemblyModule(vm, structure);
     36    instance->finishCreation(vm);
     37    return instance;
     38}
    3539
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
    37     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
     40Structure* JSWebAssemblyModule::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
     41{
     42    return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
     43}
    3844
    39     DECLARE_INFO;
     45JSWebAssemblyModule::JSWebAssemblyModule(VM& vm, Structure* structure)
     46    : Base(vm, structure)
     47{
     48}
    4049
    41 protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     50void JSWebAssemblyModule::finishCreation(VM& vm)
     51{
     52    Base::finishCreation(vm);
     53    ASSERT(inherits(info()));
     54}
    4355
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
    46 };
     56void JSWebAssemblyModule::destroy(JSCell* cell)
     57{
     58    static_cast<JSWebAssemblyModule*>(cell)->JSWebAssemblyModule::~JSWebAssemblyModule();
     59}
     60
     61void JSWebAssemblyModule::visitChildren(JSCell* cell, SlotVisitor& visitor)
     62{
     63    auto* thisObject = jsCast<JSWebAssemblyModule*>(cell);
     64    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     65
     66    Base::visitChildren(thisObject, visitor);
     67}
     68
     69const ClassInfo JSWebAssemblyModule::s_info = { "WebAssembly.Module", &Base::s_info, 0, CREATE_METHOD_TABLE(JSWebAssemblyModule) };
    4770
    4871} // namespace JSC
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "JSDestructibleObject.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class JSWebAssemblyModule : public JSDestructibleObject {
    3334public:
    34     typedef JSNonFinalObject Base;
     35    typedef JSDestructibleObject Base;
    3536
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     37    static JSWebAssemblyModule* create(VM&, Structure*);
    3738    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3839
     
    4041
    4142protected:
    42     void finishCreation(VM&, JSGlobalObject*);
    43 
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
     43    JSWebAssemblyModule(VM&, Structure*);
     44    void finishCreation(VM&);
     45    static void destroy(JSCell*);
     46    static void visitChildren(JSCell*, SlotVisitor&);
    4647};
    4748
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.cpp

    r207571 r207572  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "JSWebAssemblyRuntimeError.h"
    2728
    28 #include "JSObject.h"
     29#include "JSCInlines.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
    33 public:
    34     typedef JSNonFinalObject Base;
     33JSWebAssemblyRuntimeError* JSWebAssemblyRuntimeError::create(ExecState* state, Structure* structure, const String& message, bool useCurrentFrame)
     34{
     35    auto& vm = state->vm();
     36    auto* instance = new (NotNull, allocateCell<JSWebAssemblyRuntimeError>(vm.heap)) JSWebAssemblyRuntimeError(vm, structure);
     37    instance->finishCreation(state, vm, message, useCurrentFrame);
     38    return instance;
     39}
    3540
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
    37     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
     41JSWebAssemblyRuntimeError::JSWebAssemblyRuntimeError(VM& vm, Structure* structure)
     42    : Base(vm, structure)
     43{
     44}
    3845
    39     DECLARE_INFO;
    40 
    41 protected:
    42     void finishCreation(VM&, JSGlobalObject*);
    43 
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
    46 };
     46const ClassInfo JSWebAssemblyRuntimeError::s_info = { "WebAssembly.RuntimeError", &Base::s_info, 0, CREATE_METHOD_TABLE(JSWebAssemblyRuntimeError) };
    4747
    4848} // namespace JSC
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.h

    r207571 r207572  
    2626#pragma once
    2727
    28 #include "JSObject.h"
     28#include "ErrorInstance.h"
    2929
    3030namespace JSC {
    3131
    32 class WebAssemblyObject : public JSNonFinalObject {
     32class JSWebAssemblyRuntimeError : public ErrorInstance {
    3333public:
    34     typedef JSNonFinalObject Base;
     34    typedef ErrorInstance Base;
    3535
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
    37     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
     36    static JSWebAssemblyRuntimeError* create(ExecState*, Structure*, const String&, bool);
    3837
    3938    DECLARE_INFO;
    4039
    4140protected:
    42     void finishCreation(VM&, JSGlobalObject*);
    43 
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
     41    JSWebAssemblyRuntimeError(VM&, Structure*);
    4642};
    4743
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyTable.cpp

    r207571 r207572  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "JSWebAssemblyTable.h"
    2728
    28 #include "JSObject.h"
     29#include "JSCInlines.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
    33 public:
    34     typedef JSNonFinalObject Base;
     33JSWebAssemblyTable* JSWebAssemblyTable::create(VM& vm, Structure* structure)
     34{
     35    auto* instance = new (NotNull, allocateCell<JSWebAssemblyTable>(vm.heap)) JSWebAssemblyTable(vm, structure);
     36    instance->finishCreation(vm);
     37    return instance;
     38}
    3539
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
    37     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
     40Structure* JSWebAssemblyTable::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
     41{
     42    return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
     43}
    3844
    39     DECLARE_INFO;
     45JSWebAssemblyTable::JSWebAssemblyTable(VM& vm, Structure* structure)
     46    : Base(vm, structure)
     47{
     48}
    4049
    41 protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     50void JSWebAssemblyTable::finishCreation(VM& vm)
     51{
     52    Base::finishCreation(vm);
     53    ASSERT(inherits(info()));
     54}
    4355
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
    46 };
     56void JSWebAssemblyTable::destroy(JSCell* cell)
     57{
     58    static_cast<JSWebAssemblyTable*>(cell)->JSWebAssemblyTable::~JSWebAssemblyTable();
     59}
     60
     61void JSWebAssemblyTable::visitChildren(JSCell* cell, SlotVisitor& visitor)
     62{
     63    auto* thisObject = jsCast<JSWebAssemblyTable*>(cell);
     64    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     65
     66    Base::visitChildren(thisObject, visitor);
     67}
     68
     69const ClassInfo JSWebAssemblyTable::s_info = { "WebAssembly.Table", &Base::s_info, 0, CREATE_METHOD_TABLE(JSWebAssemblyTable) };
    4770
    4871} // namespace JSC
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyTable.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "JSDestructibleObject.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class JSWebAssemblyTable : public JSDestructibleObject {
    3334public:
    34     typedef JSNonFinalObject Base;
     35    typedef JSDestructibleObject Base;
    3536
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     37    static JSWebAssemblyTable* create(VM&, Structure*);
    3738    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3839
     
    4041
    4142protected:
    42     void finishCreation(VM&, JSGlobalObject*);
    43 
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
     43    JSWebAssemblyTable(VM&, Structure*);
     44    void finishCreation(VM&);
     45    static void destroy(JSCell*);
     46    static void visitChildren(JSCell*, SlotVisitor&);
    4647};
    4748
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "InternalFunction.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class WebAssemblyCompileErrorPrototype;
     34
     35class WebAssemblyCompileErrorConstructor : public InternalFunction {
    3336public:
    34     typedef JSNonFinalObject Base;
     37    typedef InternalFunction Base;
     38    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3539
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     40    static WebAssemblyCompileErrorConstructor* create(VM&, Structure*, WebAssemblyCompileErrorPrototype*, Structure*);
    3741    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3842
    3943    DECLARE_INFO;
    4044
     45    Structure* CompileErrorStructure() const { return m_CompileErrorStructure.get(); }
     46
    4147protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     48    void finishCreation(VM&, WebAssemblyCompileErrorPrototype*, Structure*);
    4349
    4450private:
    45     WebAssemblyObject(VM&, Structure*);
     51    WebAssemblyCompileErrorConstructor(VM&, Structure*);
     52    static ConstructType getConstructData(JSCell*, ConstructData&);
     53    static CallType getCallData(JSCell*, CallData&);
     54    static void visitChildren(JSCell*, SlotVisitor&);
     55
     56    WriteBarrier<Structure> m_CompileErrorStructure;
    4657};
    4758
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorPrototype.cpp

    r207571 r207572  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "WebAssemblyCompileErrorPrototype.h"
    2728
    28 #include "JSObject.h"
     29#include "FunctionPrototype.h"
     30#include "JSCInlines.h"
     31
     32#include "WebAssemblyCompileErrorPrototype.lut.h"
    2933
    3034namespace JSC {
    3135
    32 class WebAssemblyObject : public JSNonFinalObject {
    33 public:
    34     typedef JSNonFinalObject Base;
     36const ClassInfo WebAssemblyCompileErrorPrototype::s_info = { "WebAssembly.CompileError.prototype", &Base::s_info, &prototypeTableWebAssemblyCompileError, CREATE_METHOD_TABLE(WebAssemblyCompileErrorPrototype) };
    3537
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
    37     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
     38/* Source for WebAssemblyCompileErrorPrototype.lut.h
     39 @begin prototypeTableWebAssemblyCompileError
     40 @end
     41 */
    3842
    39     DECLARE_INFO;
     43WebAssemblyCompileErrorPrototype* WebAssemblyCompileErrorPrototype::create(VM& vm, JSGlobalObject*, Structure* structure)
     44{
     45    auto* object = new (NotNull, allocateCell<WebAssemblyCompileErrorPrototype>(vm.heap)) WebAssemblyCompileErrorPrototype(vm, structure);
     46    object->finishCreation(vm);
     47    return object;
     48}
    4049
    41 protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     50Structure* WebAssemblyCompileErrorPrototype::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
     51{
     52    return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
     53}
    4354
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
    46 };
     55void WebAssemblyCompileErrorPrototype::finishCreation(VM& vm)
     56{
     57    Base::finishCreation(vm);
     58}
     59
     60WebAssemblyCompileErrorPrototype::WebAssemblyCompileErrorPrototype(VM& vm, Structure* structure)
     61    : Base(vm, structure)
     62{
     63}
    4764
    4865} // namespace JSC
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorPrototype.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "JSDestructibleObject.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class WebAssemblyCompileErrorPrototype : public JSNonFinalObject {
    3334public:
    3435    typedef JSNonFinalObject Base;
     36    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3537
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     38    static WebAssemblyCompileErrorPrototype* create(VM&, JSGlobalObject*, Structure*);
    3739    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3840
     
    4042
    4143protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     44    void finishCreation(VM&);
    4345
    4446private:
    45     WebAssemblyObject(VM&, Structure*);
     47    WebAssemblyCompileErrorPrototype(VM&, Structure*);
    4648};
    4749
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "InternalFunction.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class WebAssemblyInstancePrototype;
     34
     35class WebAssemblyInstanceConstructor : public InternalFunction {
    3336public:
    34     typedef JSNonFinalObject Base;
     37    typedef InternalFunction Base;
     38    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3539
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     40    static WebAssemblyInstanceConstructor* create(VM&, Structure*, WebAssemblyInstancePrototype*, Structure*);
    3741    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3842
    3943    DECLARE_INFO;
    4044
     45    Structure* InstanceStructure() const { return m_InstanceStructure.get(); }
     46
    4147protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     48    void finishCreation(VM&, WebAssemblyInstancePrototype*, Structure*);
    4349
    4450private:
    45     WebAssemblyObject(VM&, Structure*);
     51    WebAssemblyInstanceConstructor(VM&, Structure*);
     52    static ConstructType getConstructData(JSCell*, ConstructData&);
     53    static CallType getCallData(JSCell*, CallData&);
     54    static void visitChildren(JSCell*, SlotVisitor&);
     55
     56    WriteBarrier<Structure> m_InstanceStructure;
    4657};
    4758
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyInstancePrototype.cpp

    r207571 r207572  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "WebAssemblyInstancePrototype.h"
    2728
    28 #include "JSObject.h"
     29#include "FunctionPrototype.h"
     30#include "JSCInlines.h"
     31
     32#include "WebAssemblyInstancePrototype.lut.h"
    2933
    3034namespace JSC {
    3135
    32 class WebAssemblyObject : public JSNonFinalObject {
    33 public:
    34     typedef JSNonFinalObject Base;
     36const ClassInfo WebAssemblyInstancePrototype::s_info = { "WebAssembly.Instance.prototype", &Base::s_info, &prototypeTableWebAssemblyInstance, CREATE_METHOD_TABLE(WebAssemblyInstancePrototype) };
    3537
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
    37     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
     38/* Source for WebAssemblyInstancePrototype.lut.h
     39 @begin prototypeTableWebAssemblyInstance
     40 @end
     41 */
    3842
    39     DECLARE_INFO;
     43WebAssemblyInstancePrototype* WebAssemblyInstancePrototype::create(VM& vm, JSGlobalObject*, Structure* structure)
     44{
     45    auto* object = new (NotNull, allocateCell<WebAssemblyInstancePrototype>(vm.heap)) WebAssemblyInstancePrototype(vm, structure);
     46    object->finishCreation(vm);
     47    return object;
     48}
    4049
    41 protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     50Structure* WebAssemblyInstancePrototype::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
     51{
     52    return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
     53}
    4354
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
    46 };
     55void WebAssemblyInstancePrototype::finishCreation(VM& vm)
     56{
     57    Base::finishCreation(vm);
     58}
     59
     60WebAssemblyInstancePrototype::WebAssemblyInstancePrototype(VM& vm, Structure* structure)
     61    : Base(vm, structure)
     62{
     63}
    4764
    4865} // namespace JSC
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyInstancePrototype.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "JSDestructibleObject.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class WebAssemblyInstancePrototype : public JSNonFinalObject {
    3334public:
    3435    typedef JSNonFinalObject Base;
     36    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3537
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     38    static WebAssemblyInstancePrototype* create(VM&, JSGlobalObject*, Structure*);
    3739    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3840
     
    4042
    4143protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     44    void finishCreation(VM&);
    4345
    4446private:
    45     WebAssemblyObject(VM&, Structure*);
     47    WebAssemblyInstancePrototype(VM&, Structure*);
    4648};
    4749
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "InternalFunction.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class WebAssemblyMemoryPrototype;
     34
     35class WebAssemblyMemoryConstructor : public InternalFunction {
    3336public:
    34     typedef JSNonFinalObject Base;
     37    typedef InternalFunction Base;
     38    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3539
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     40    static WebAssemblyMemoryConstructor* create(VM&, Structure*, WebAssemblyMemoryPrototype*, Structure*);
    3741    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3842
    3943    DECLARE_INFO;
    4044
     45    Structure* MemoryStructure() const { return m_MemoryStructure.get(); }
     46
    4147protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     48    void finishCreation(VM&, WebAssemblyMemoryPrototype*, Structure*);
    4349
    4450private:
    45     WebAssemblyObject(VM&, Structure*);
     51    WebAssemblyMemoryConstructor(VM&, Structure*);
     52    static ConstructType getConstructData(JSCell*, ConstructData&);
     53    static CallType getCallData(JSCell*, CallData&);
     54    static void visitChildren(JSCell*, SlotVisitor&);
     55
     56    WriteBarrier<Structure> m_MemoryStructure;
    4657};
    4758
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryPrototype.cpp

    r207571 r207572  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "WebAssemblyMemoryPrototype.h"
    2728
    28 #include "JSObject.h"
     29#include "FunctionPrototype.h"
     30#include "JSCInlines.h"
     31
     32#include "WebAssemblyMemoryPrototype.lut.h"
    2933
    3034namespace JSC {
    3135
    32 class WebAssemblyObject : public JSNonFinalObject {
    33 public:
    34     typedef JSNonFinalObject Base;
     36const ClassInfo WebAssemblyMemoryPrototype::s_info = { "WebAssembly.Memory.prototype", &Base::s_info, &prototypeTableWebAssemblyMemory, CREATE_METHOD_TABLE(WebAssemblyMemoryPrototype) };
    3537
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
    37     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
     38/* Source for WebAssemblyMemoryPrototype.lut.h
     39 @begin prototypeTableWebAssemblyMemory
     40 @end
     41 */
    3842
    39     DECLARE_INFO;
     43WebAssemblyMemoryPrototype* WebAssemblyMemoryPrototype::create(VM& vm, JSGlobalObject*, Structure* structure)
     44{
     45    auto* object = new (NotNull, allocateCell<WebAssemblyMemoryPrototype>(vm.heap)) WebAssemblyMemoryPrototype(vm, structure);
     46    object->finishCreation(vm);
     47    return object;
     48}
    4049
    41 protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     50Structure* WebAssemblyMemoryPrototype::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
     51{
     52    return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
     53}
    4354
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
    46 };
     55void WebAssemblyMemoryPrototype::finishCreation(VM& vm)
     56{
     57    Base::finishCreation(vm);
     58}
     59
     60WebAssemblyMemoryPrototype::WebAssemblyMemoryPrototype(VM& vm, Structure* structure)
     61    : Base(vm, structure)
     62{
     63}
    4764
    4865} // namespace JSC
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryPrototype.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "JSDestructibleObject.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class WebAssemblyMemoryPrototype : public JSNonFinalObject {
    3334public:
    3435    typedef JSNonFinalObject Base;
     36    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3537
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     38    static WebAssemblyMemoryPrototype* create(VM&, JSGlobalObject*, Structure*);
    3739    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3840
     
    4042
    4143protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     44    void finishCreation(VM&);
    4345
    4446private:
    45     WebAssemblyObject(VM&, Structure*);
     47    WebAssemblyMemoryPrototype(VM&, Structure*);
    4648};
    4749
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "InternalFunction.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class WebAssemblyModulePrototype;
     34
     35class WebAssemblyModuleConstructor : public InternalFunction {
    3336public:
    34     typedef JSNonFinalObject Base;
     37    typedef InternalFunction Base;
     38    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3539
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     40    static WebAssemblyModuleConstructor* create(VM&, Structure*, WebAssemblyModulePrototype*, Structure*);
    3741    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3842
    3943    DECLARE_INFO;
    4044
     45    Structure* ModuleStructure() const { return m_ModuleStructure.get(); }
     46
    4147protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     48    void finishCreation(VM&, WebAssemblyModulePrototype*, Structure*);
    4349
    4450private:
    45     WebAssemblyObject(VM&, Structure*);
     51    WebAssemblyModuleConstructor(VM&, Structure*);
     52    static ConstructType getConstructData(JSCell*, ConstructData&);
     53    static CallType getCallData(JSCell*, CallData&);
     54    static void visitChildren(JSCell*, SlotVisitor&);
     55
     56    WriteBarrier<Structure> m_ModuleStructure;
    4657};
    4758
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyModulePrototype.cpp

    r207571 r207572  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "WebAssemblyModulePrototype.h"
    2728
    28 #include "JSObject.h"
     29#include "FunctionPrototype.h"
     30#include "JSCInlines.h"
     31
     32#include "WebAssemblyModulePrototype.lut.h"
    2933
    3034namespace JSC {
    3135
    32 class WebAssemblyObject : public JSNonFinalObject {
    33 public:
    34     typedef JSNonFinalObject Base;
     36const ClassInfo WebAssemblyModulePrototype::s_info = { "WebAssembly.Module.prototype", &Base::s_info, &prototypeTableWebAssemblyModule, CREATE_METHOD_TABLE(WebAssemblyModulePrototype) };
    3537
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
    37     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
     38/* Source for WebAssemblyModulePrototype.lut.h
     39 @begin prototypeTableWebAssemblyModule
     40 @end
     41 */
    3842
    39     DECLARE_INFO;
     43WebAssemblyModulePrototype* WebAssemblyModulePrototype::create(VM& vm, JSGlobalObject*, Structure* structure)
     44{
     45    auto* object = new (NotNull, allocateCell<WebAssemblyModulePrototype>(vm.heap)) WebAssemblyModulePrototype(vm, structure);
     46    object->finishCreation(vm);
     47    return object;
     48}
    4049
    41 protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     50Structure* WebAssemblyModulePrototype::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
     51{
     52    return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
     53}
    4354
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
    46 };
     55void WebAssemblyModulePrototype::finishCreation(VM& vm)
     56{
     57    Base::finishCreation(vm);
     58}
     59
     60WebAssemblyModulePrototype::WebAssemblyModulePrototype(VM& vm, Structure* structure)
     61    : Base(vm, structure)
     62{
     63}
    4764
    4865} // namespace JSC
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyModulePrototype.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "JSDestructibleObject.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class WebAssemblyModulePrototype : public JSNonFinalObject {
    3334public:
    3435    typedef JSNonFinalObject Base;
     36    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3537
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     38    static WebAssemblyModulePrototype* create(VM&, JSGlobalObject*, Structure*);
    3739    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3840
     
    4042
    4143protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     44    void finishCreation(VM&);
    4345
    4446private:
    45     WebAssemblyObject(VM&, Structure*);
     47    WebAssemblyModulePrototype(VM&, Structure*);
    4648};
    4749
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "InternalFunction.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class WebAssemblyRuntimeErrorPrototype;
     34
     35class WebAssemblyRuntimeErrorConstructor : public InternalFunction {
    3336public:
    34     typedef JSNonFinalObject Base;
     37    typedef InternalFunction Base;
     38    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3539
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     40    static WebAssemblyRuntimeErrorConstructor* create(VM&, Structure*, WebAssemblyRuntimeErrorPrototype*, Structure*);
    3741    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3842
    3943    DECLARE_INFO;
    4044
     45    Structure* RuntimeErrorStructure() const { return m_RuntimeErrorStructure.get(); }
     46
    4147protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     48    void finishCreation(VM&, WebAssemblyRuntimeErrorPrototype*, Structure*);
    4349
    4450private:
    45     WebAssemblyObject(VM&, Structure*);
     51    WebAssemblyRuntimeErrorConstructor(VM&, Structure*);
     52    static ConstructType getConstructData(JSCell*, ConstructData&);
     53    static CallType getCallData(JSCell*, CallData&);
     54    static void visitChildren(JSCell*, SlotVisitor&);
     55
     56    WriteBarrier<Structure> m_RuntimeErrorStructure;
    4657};
    4758
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorPrototype.cpp

    r207571 r207572  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "WebAssemblyRuntimeErrorPrototype.h"
    2728
    28 #include "JSObject.h"
     29#include "FunctionPrototype.h"
     30#include "JSCInlines.h"
     31
     32#include "WebAssemblyRuntimeErrorPrototype.lut.h"
    2933
    3034namespace JSC {
    3135
    32 class WebAssemblyObject : public JSNonFinalObject {
    33 public:
    34     typedef JSNonFinalObject Base;
     36const ClassInfo WebAssemblyRuntimeErrorPrototype::s_info = { "WebAssembly.RuntimeError.prototype", &Base::s_info, &prototypeTableWebAssemblyRuntimeError, CREATE_METHOD_TABLE(WebAssemblyRuntimeErrorPrototype) };
    3537
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
    37     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
     38/* Source for WebAssemblyRuntimeErrorPrototype.lut.h
     39 @begin prototypeTableWebAssemblyRuntimeError
     40 @end
     41 */
    3842
    39     DECLARE_INFO;
     43WebAssemblyRuntimeErrorPrototype* WebAssemblyRuntimeErrorPrototype::create(VM& vm, JSGlobalObject*, Structure* structure)
     44{
     45    auto* object = new (NotNull, allocateCell<WebAssemblyRuntimeErrorPrototype>(vm.heap)) WebAssemblyRuntimeErrorPrototype(vm, structure);
     46    object->finishCreation(vm);
     47    return object;
     48}
    4049
    41 protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     50Structure* WebAssemblyRuntimeErrorPrototype::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
     51{
     52    return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
     53}
    4354
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
    46 };
     55void WebAssemblyRuntimeErrorPrototype::finishCreation(VM& vm)
     56{
     57    Base::finishCreation(vm);
     58}
     59
     60WebAssemblyRuntimeErrorPrototype::WebAssemblyRuntimeErrorPrototype(VM& vm, Structure* structure)
     61    : Base(vm, structure)
     62{
     63}
    4764
    4865} // namespace JSC
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorPrototype.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "JSDestructibleObject.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class WebAssemblyRuntimeErrorPrototype : public JSNonFinalObject {
    3334public:
    3435    typedef JSNonFinalObject Base;
     36    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3537
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     38    static WebAssemblyRuntimeErrorPrototype* create(VM&, JSGlobalObject*, Structure*);
    3739    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3840
     
    4042
    4143protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     44    void finishCreation(VM&);
    4345
    4446private:
    45     WebAssemblyObject(VM&, Structure*);
     47    WebAssemblyRuntimeErrorPrototype(VM&, Structure*);
    4648};
    4749
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "InternalFunction.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class WebAssemblyTablePrototype;
     34
     35class WebAssemblyTableConstructor : public InternalFunction {
    3336public:
    34     typedef JSNonFinalObject Base;
     37    typedef InternalFunction Base;
     38    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3539
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     40    static WebAssemblyTableConstructor* create(VM&, Structure*, WebAssemblyTablePrototype*, Structure*);
    3741    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3842
    3943    DECLARE_INFO;
    4044
     45    Structure* TableStructure() const { return m_TableStructure.get(); }
     46
    4147protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     48    void finishCreation(VM&, WebAssemblyTablePrototype*, Structure*);
    4349
    4450private:
    45     WebAssemblyObject(VM&, Structure*);
     51    WebAssemblyTableConstructor(VM&, Structure*);
     52    static ConstructType getConstructData(JSCell*, ConstructData&);
     53    static CallType getCallData(JSCell*, CallData&);
     54    static void visitChildren(JSCell*, SlotVisitor&);
     55
     56    WriteBarrier<Structure> m_TableStructure;
    4657};
    4758
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.cpp

    r207571 r207572  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "WebAssemblyTablePrototype.h"
    2728
    28 #include "JSObject.h"
     29#include "FunctionPrototype.h"
     30#include "JSCInlines.h"
     31
     32#include "WebAssemblyTablePrototype.lut.h"
    2933
    3034namespace JSC {
    3135
    32 class WebAssemblyObject : public JSNonFinalObject {
    33 public:
    34     typedef JSNonFinalObject Base;
     36const ClassInfo WebAssemblyTablePrototype::s_info = { "WebAssembly.Table.prototype", &Base::s_info, &prototypeTableWebAssemblyTable, CREATE_METHOD_TABLE(WebAssemblyTablePrototype) };
    3537
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
    37     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
     38/* Source for WebAssemblyTablePrototype.lut.h
     39 @begin prototypeTableWebAssemblyTable
     40 @end
     41 */
    3842
    39     DECLARE_INFO;
     43WebAssemblyTablePrototype* WebAssemblyTablePrototype::create(VM& vm, JSGlobalObject*, Structure* structure)
     44{
     45    auto* object = new (NotNull, allocateCell<WebAssemblyTablePrototype>(vm.heap)) WebAssemblyTablePrototype(vm, structure);
     46    object->finishCreation(vm);
     47    return object;
     48}
    4049
    41 protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     50Structure* WebAssemblyTablePrototype::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
     51{
     52    return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
     53}
    4354
    44 private:
    45     WebAssemblyObject(VM&, Structure*);
    46 };
     55void WebAssemblyTablePrototype::finishCreation(VM& vm)
     56{
     57    Base::finishCreation(vm);
     58}
     59
     60WebAssemblyTablePrototype::WebAssemblyTablePrototype(VM& vm, Structure* structure)
     61    : Base(vm, structure)
     62{
     63}
    4764
    4865} // namespace JSC
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.h

    r207571 r207572  
    2626#pragma once
    2727
     28#include "JSDestructibleObject.h"
    2829#include "JSObject.h"
    2930
    3031namespace JSC {
    3132
    32 class WebAssemblyObject : public JSNonFinalObject {
     33class WebAssemblyTablePrototype : public JSNonFinalObject {
    3334public:
    3435    typedef JSNonFinalObject Base;
     36    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3537
    36     static WebAssemblyObject* create(VM&, JSGlobalObject*, Structure*);
     38    static WebAssemblyTablePrototype* create(VM&, JSGlobalObject*, Structure*);
    3739    static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    3840
     
    4042
    4143protected:
    42     void finishCreation(VM&, JSGlobalObject*);
     44    void finishCreation(VM&);
    4345
    4446private:
    45     WebAssemblyObject(VM&, Structure*);
     47    WebAssemblyTablePrototype(VM&, Structure*);
    4648};
    4749
Note: See TracChangeset for help on using the changeset viewer.