Title: [281438] trunk
Revision
281438
Author
ysuz...@apple.com
Date
2021-08-22 23:28:16 -0700 (Sun, 22 Aug 2021)

Log Message

[JSC] Remove already-shipped wasm option flags
https://bugs.webkit.org/show_bug.cgi?id=229386

Reviewed by Ross Kirsling.

JSTests:

* wasm/references/element_active_mod.js:
* wasm/references/element_parsing.js:
* wasm/references/externref_globals.js:
* wasm/references/externref_modules.js:
* wasm/references/externref_table.js:
* wasm/references/externref_table_import.js:
* wasm/references/func_ref.js:
* wasm/references/globals.js:
* wasm/references/is_null.js:
* wasm/references/memory_copy.js:
* wasm/references/memory_copy_shared.js:
* wasm/references/memory_fill_shared.js:
* wasm/references/multitable.js:
* wasm/references/parse_unreachable.js:
* wasm/references/table_js_api.js:
* wasm/references/table_misc.js:
* wasm/references/validation.js:
* wasm/stress/immutable-globals.js:
* wasm/stress/local-ref.js:
* wasm/stress/mutable-globals.js:
* wasm/stress/table-grow-table-size.js:

Source/_javascript_Core:

This patch removes some wasm option flags which are already shipped.

* runtime/OptionsList.h:
* wasm/WasmFormat.h:
(JSC::Wasm::isValueType):
* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):
* wasm/WasmOperations.cpp:
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):
* wasm/WasmParser.h:
(JSC::Wasm::Parser<SuccessType>::parseBlockSignature):
* wasm/WasmSectionParser.cpp:
(JSC::Wasm::SectionParser::parseType):
(JSC::Wasm::SectionParser::parseElement):
(JSC::Wasm::SectionParser::parseData):
(JSC::Wasm::SectionParser::parseDataCount):
* wasm/js/JSWebAssembly.cpp:
(JSC::JSWebAssembly::finishCreation):
* wasm/js/WebAssemblyGlobalConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* wasm/js/WebAssemblyTableConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* wasm/js/WebAssemblyTablePrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):

Tools:

* Scripts/run-jsc-stress-tests:

LayoutTests:

* workers/wasm-references.html:

Modified Paths

Diff

Modified: trunk/JSTests/ChangeLog (281437 => 281438)


--- trunk/JSTests/ChangeLog	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/ChangeLog	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,5 +1,34 @@
 2021-08-22  Yusuke Suzuki  <ysuz...@apple.com>
 
+        [JSC] Remove already-shipped wasm option flags
+        https://bugs.webkit.org/show_bug.cgi?id=229386
+
+        Reviewed by Ross Kirsling.
+
+        * wasm/references/element_active_mod.js:
+        * wasm/references/element_parsing.js:
+        * wasm/references/externref_globals.js:
+        * wasm/references/externref_modules.js:
+        * wasm/references/externref_table.js:
+        * wasm/references/externref_table_import.js:
+        * wasm/references/func_ref.js:
+        * wasm/references/globals.js:
+        * wasm/references/is_null.js:
+        * wasm/references/memory_copy.js:
+        * wasm/references/memory_copy_shared.js:
+        * wasm/references/memory_fill_shared.js:
+        * wasm/references/multitable.js:
+        * wasm/references/parse_unreachable.js:
+        * wasm/references/table_js_api.js:
+        * wasm/references/table_misc.js:
+        * wasm/references/validation.js:
+        * wasm/stress/immutable-globals.js:
+        * wasm/stress/local-ref.js:
+        * wasm/stress/mutable-globals.js:
+        * wasm/stress/table-grow-table-size.js:
+
+2021-08-22  Yusuke Suzuki  <ysuz...@apple.com>
+
         [JSC] Remove already-shipped JS feature flags
         https://bugs.webkit.org/show_bug.cgi?id=229387
 

Modified: trunk/JSTests/wasm/references/element_active_mod.js (281437 => 281438)


--- trunk/JSTests/wasm/references/element_active_mod.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/element_active_mod.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 
 function module(bytes, valid = true) {

Modified: trunk/JSTests/wasm/references/element_parsing.js (281437 => 281438)


--- trunk/JSTests/wasm/references/element_parsing.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/element_parsing.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 
 function module(bytes, valid = true) {

Modified: trunk/JSTests/wasm/references/externref_globals.js (281437 => 281438)


--- trunk/JSTests/wasm/references/externref_globals.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/externref_globals.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 import Builder from '../Builder.js';
 

Modified: trunk/JSTests/wasm/references/externref_modules.js (281437 => 281438)


--- trunk/JSTests/wasm/references/externref_modules.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/externref_modules.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 import Builder from '../Builder.js';
 

Modified: trunk/JSTests/wasm/references/externref_table.js (281437 => 281438)


--- trunk/JSTests/wasm/references/externref_table.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/externref_table.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 import Builder from '../Builder.js';
 

Modified: trunk/JSTests/wasm/references/externref_table_import.js (281437 => 281438)


--- trunk/JSTests/wasm/references/externref_table_import.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/externref_table_import.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 import Builder from '../Builder.js';
 

Modified: trunk/JSTests/wasm/references/func_ref.js (281437 => 281438)


--- trunk/JSTests/wasm/references/func_ref.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/func_ref.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 import Builder from '../Builder.js';
 

Modified: trunk/JSTests/wasm/references/globals.js (281437 => 281438)


--- trunk/JSTests/wasm/references/globals.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/globals.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 import { instantiate } from "../wabt-wrapper.js";
 

Modified: trunk/JSTests/wasm/references/is_null.js (281437 => 281438)


--- trunk/JSTests/wasm/references/is_null.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/is_null.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 import Builder from '../Builder.js';
 

Modified: trunk/JSTests/wasm/references/memory_copy.js (281437 => 281438)


--- trunk/JSTests/wasm/references/memory_copy.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/memory_copy.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 import { instantiate } from "../wabt-wrapper.js";
 

Modified: trunk/JSTests/wasm/references/memory_copy_shared.js (281437 => 281438)


--- trunk/JSTests/wasm/references/memory_copy_shared.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/memory_copy_shared.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 import { instantiate } from "../wabt-wrapper.js";
 

Modified: trunk/JSTests/wasm/references/memory_fill_shared.js (281437 => 281438)


--- trunk/JSTests/wasm/references/memory_fill_shared.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/memory_fill_shared.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 import { instantiate } from "../wabt-wrapper.js";
 

Modified: trunk/JSTests/wasm/references/multitable.js (281437 => 281438)


--- trunk/JSTests/wasm/references/multitable.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/multitable.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,5 +1,4 @@
 //@ skip if $memoryLimited
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 import Builder from '../Builder.js';
 

Modified: trunk/JSTests/wasm/references/parse_unreachable.js (281437 => 281438)


--- trunk/JSTests/wasm/references/parse_unreachable.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/parse_unreachable.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 
 function module(bytes, valid = true) {

Modified: trunk/JSTests/wasm/references/table_js_api.js (281437 => 281438)


--- trunk/JSTests/wasm/references/table_js_api.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/table_js_api.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 import { instantiate } from "../wabt-wrapper.js";
 

Modified: trunk/JSTests/wasm/references/table_misc.js (281437 => 281438)


--- trunk/JSTests/wasm/references/table_misc.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/table_misc.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 import Builder from '../Builder.js';
 

Modified: trunk/JSTests/wasm/references/validation.js (281437 => 281438)


--- trunk/JSTests/wasm/references/validation.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/references/validation.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ runWebAssemblySuite("--useWebAssemblyReferences=true")
 import * as assert from '../assert.js';
 import Builder from '../Builder.js';
 

Modified: trunk/JSTests/wasm/spec-tests/data.wast.js (281437 => 281438)


--- trunk/JSTests/wasm/spec-tests/data.wast.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/spec-tests/data.wast.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -126,10 +126,12 @@
 assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x0b\x06\x01\x01\x41\x00\x0b\x00");
 
 // data.wast:315
-assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x03\x01\x00\x00\x0b\x44\x01\x01\x41\x00\x0b\x3e\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d");
+// After wasm reference spec is introduced, this is no longer a malformed module.
+// assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x03\x01\x00\x00\x0b\x44\x01\x01\x41\x00\x0b\x3e\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d");
 
 // data.wast:336
-assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x0b\x44\x01\x01\x41\x00\x0b\x3e\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d");
+// After wasm reference spec is introduced, this is no longer a malformed module.
+// assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x0b\x44\x01\x01\x41\x00\x0b\x3e\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d");
 
 // data.wast:354
 assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x0b\x86\x80\x80\x80\x00\x01\x00\x42\x00\x0b\x00");

Modified: trunk/JSTests/wasm/stress/immutable-globals.js (281437 => 281438)


--- trunk/JSTests/wasm/stress/immutable-globals.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/stress/immutable-globals.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ requireOptions("--useWebAssemblyReferences=1")
 import Builder from '../Builder.js'
 import * as assert from '../assert.js'
 

Modified: trunk/JSTests/wasm/stress/local-ref.js (281437 => 281438)


--- trunk/JSTests/wasm/stress/local-ref.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/stress/local-ref.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ requireOptions("--useWebAssemblyReferences=1")
 import * as assert from '../assert.js';
 import { instantiate } from "../wabt-wrapper.js";
 

Modified: trunk/JSTests/wasm/stress/mutable-globals.js (281437 => 281438)


--- trunk/JSTests/wasm/stress/mutable-globals.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/stress/mutable-globals.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ requireOptions("--useWebAssemblyReferences=1")
 import Builder from '../Builder.js'
 import * as assert from '../assert.js'
 

Modified: trunk/JSTests/wasm/stress/table-grow-table-size.js (281437 => 281438)


--- trunk/JSTests/wasm/stress/table-grow-table-size.js	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/JSTests/wasm/stress/table-grow-table-size.js	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-//@ requireOptions("--useWebAssemblyReferences=1")
 import { instantiate } from "../wabt-wrapper.js";
 import * as assert from "../assert.js";
 

Modified: trunk/LayoutTests/ChangeLog (281437 => 281438)


--- trunk/LayoutTests/ChangeLog	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/LayoutTests/ChangeLog	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,3 +1,12 @@
+2021-08-22  Yusuke Suzuki  <ysuz...@apple.com>
+
+        [JSC] Remove already-shipped wasm option flags
+        https://bugs.webkit.org/show_bug.cgi?id=229386
+
+        Reviewed by Ross Kirsling.
+
+        * workers/wasm-references.html:
+
 2021-08-22  Alan Bujtas  <za...@apple.com>
 
         [iOS] Unreviewed test gardening.

Modified: trunk/LayoutTests/workers/wasm-references.html (281437 => 281438)


--- trunk/LayoutTests/workers/wasm-references.html	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/LayoutTests/workers/wasm-references.html	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,4 +1,3 @@
-<!-- webkit-test-runner [ jscOptions=--useWebAssemblyReferences=true ] -->
 <html>
 <head>
 <script src=""

Modified: trunk/Source/_javascript_Core/ChangeLog (281437 => 281438)


--- trunk/Source/_javascript_Core/ChangeLog	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,5 +1,38 @@
 2021-08-22  Yusuke Suzuki  <ysuz...@apple.com>
 
+        [JSC] Remove already-shipped wasm option flags
+        https://bugs.webkit.org/show_bug.cgi?id=229386
+
+        Reviewed by Ross Kirsling.
+
+        This patch removes some wasm option flags which are already shipped.
+
+        * runtime/OptionsList.h:
+        * wasm/WasmFormat.h:
+        (JSC::Wasm::isValueType):
+        * wasm/WasmFunctionParser.h:
+        (JSC::Wasm::FunctionParser<Context>::parseExpression):
+        (JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):
+        * wasm/WasmOperations.cpp:
+        (JSC::Wasm::JSC_DEFINE_JIT_OPERATION):
+        * wasm/WasmParser.h:
+        (JSC::Wasm::Parser<SuccessType>::parseBlockSignature):
+        * wasm/WasmSectionParser.cpp:
+        (JSC::Wasm::SectionParser::parseType):
+        (JSC::Wasm::SectionParser::parseElement):
+        (JSC::Wasm::SectionParser::parseData):
+        (JSC::Wasm::SectionParser::parseDataCount):
+        * wasm/js/JSWebAssembly.cpp:
+        (JSC::JSWebAssembly::finishCreation):
+        * wasm/js/WebAssemblyGlobalConstructor.cpp:
+        (JSC::JSC_DEFINE_HOST_FUNCTION):
+        * wasm/js/WebAssemblyTableConstructor.cpp:
+        (JSC::JSC_DEFINE_HOST_FUNCTION):
+        * wasm/js/WebAssemblyTablePrototype.cpp:
+        (JSC::JSC_DEFINE_HOST_FUNCTION):
+
+2021-08-22  Yusuke Suzuki  <ysuz...@apple.com>
+
         [JSC] Remove already-shipped JS feature flags
         https://bugs.webkit.org/show_bug.cgi?id=229387
 

Modified: trunk/Source/_javascript_Core/runtime/OptionsList.h (281437 => 281438)


--- trunk/Source/_javascript_Core/runtime/OptionsList.h	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/Source/_javascript_Core/runtime/OptionsList.h	2021-08-23 06:28:16 UTC (rev 281438)
@@ -531,10 +531,7 @@
     \
     /* Feature Flags */\
     \
-    v(Bool, useWebAssemblyStreaming, true, Normal, "Allow to run WebAssembly's Streaming API") \
-    v(Bool, useWebAssemblyReferences, true, Normal, "Allow types from the wasm references spec.") \
     v(Bool, useWebAssemblyTypedFunctionReferences, false, Normal, "Allow function types from the wasm typed function references spec.") \
-    v(Bool, useWebAssemblyMultiValues, true, Normal, "Allow types from the wasm mulit-values spec.") \
     v(Bool, useWebAssemblyThreading, true, Normal, "Allow instructions from the wasm threading spec.") \
     v(Bool, useAtMethod, true, Normal, "Expose the at() method on Array, %TypedArray%, and String.") \
     v(Bool, useSharedArrayBuffer, false, Normal, nullptr) \

Modified: trunk/Source/_javascript_Core/wasm/WasmFormat.h (281437 => 281438)


--- trunk/Source/_javascript_Core/wasm/WasmFormat.h	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/Source/_javascript_Core/wasm/WasmFormat.h	2021-08-23 06:28:16 UTC (rev 281438)
@@ -65,10 +65,9 @@
     case TypeKind::I64:
     case TypeKind::F32:
     case TypeKind::F64:
-        return true;
     case TypeKind::Externref:
     case TypeKind::Funcref:
-        return Options::useWebAssemblyReferences();
+        return true;
     case TypeKind::TypeIdx:
         return Options::useWebAssemblyTypedFunctionReferences();
     default:

Modified: trunk/Source/_javascript_Core/wasm/WasmFunctionParser.h (281437 => 281438)


--- trunk/Source/_javascript_Core/wasm/WasmFunctionParser.h	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/Source/_javascript_Core/wasm/WasmFunctionParser.h	2021-08-23 06:28:16 UTC (rev 281438)
@@ -736,8 +736,7 @@
         WASM_TRY_POP_EXPRESSION_STACK_INTO(zero, "select zero");
         WASM_TRY_POP_EXPRESSION_STACK_INTO(nonZero, "select non-zero");
 
-        if (Options::useWebAssemblyReferences())
-            WASM_PARSER_FAIL_IF(isRefType(nonZero.type()) || isRefType(nonZero.type()), "can't use ref-types with unannotated select");
+        WASM_PARSER_FAIL_IF(isRefType(nonZero.type()) || isRefType(nonZero.type()), "can't use ref-types with unannotated select");
 
         WASM_VALIDATOR_FAIL_IF(!condition.type().isI32(), "select condition must be i32, got ", condition.type().kind);
         WASM_VALIDATOR_FAIL_IF(nonZero.type() != zero.type(), "select result types must match, got ", nonZero.type().kind, " and ", zero.type().kind);
@@ -750,8 +749,6 @@
     }
 
     case AnnotatedSelect: {
-        WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
         AnnotatedSelectImmediates immediates;
         WASM_FAIL_IF_HELPER_FAILS(parseAnnotatedSelectImmediates(immediates));
 
@@ -811,7 +808,6 @@
     }
 
     case TableGet: {
-        WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
         unsigned tableIndex;
         WASM_PARSER_FAIL_IF(!parseVarUInt32(tableIndex), "can't parse table index");
         WASM_VALIDATOR_FAIL_IF(tableIndex >= m_info.tableCount(), "table index ", tableIndex, " is invalid, limit is ", m_info.tableCount());
@@ -828,7 +824,6 @@
     }
 
     case TableSet: {
-        WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
         unsigned tableIndex;
         WASM_PARSER_FAIL_IF(!parseVarUInt32(tableIndex), "can't parse table index");
         WASM_VALIDATOR_FAIL_IF(tableIndex >= m_info.tableCount(), "table index ", tableIndex, " is invalid, limit is ", m_info.tableCount());
@@ -850,8 +845,6 @@
         Ext1OpType op = static_cast<Ext1OpType>(extOp);
         switch (op) {
         case Ext1OpType::TableInit: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
             TableInitImmediates immediates;
             WASM_FAIL_IF_HELPER_FAILS(parseTableInitImmediates(immediates));
 
@@ -870,8 +863,6 @@
             break;
         }
         case Ext1OpType::ElemDrop: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
             unsigned elementIndex;
             WASM_FAIL_IF_HELPER_FAILS(parseElementIndex(elementIndex));
 
@@ -879,8 +870,6 @@
             break;
         }
         case Ext1OpType::TableSize: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
             unsigned tableIndex;
             WASM_FAIL_IF_HELPER_FAILS(parseTableIndex(tableIndex));
 
@@ -890,8 +879,6 @@
             break;
         }
         case Ext1OpType::TableGrow: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
             unsigned tableIndex;
             WASM_FAIL_IF_HELPER_FAILS(parseTableIndex(tableIndex));
 
@@ -910,8 +897,6 @@
             break;
         }
         case Ext1OpType::TableFill: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
             unsigned tableIndex;
             WASM_FAIL_IF_HELPER_FAILS(parseTableIndex(tableIndex));
 
@@ -929,8 +914,6 @@
             break;
         }
         case Ext1OpType::TableCopy: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
             TableCopyImmediates immediates;
             WASM_FAIL_IF_HELPER_FAILS(parseTableCopyImmediates(immediates));
 
@@ -953,8 +936,6 @@
             break;
         }
         case Ext1OpType::MemoryFill: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
             WASM_FAIL_IF_HELPER_FAILS(parseMemoryFillImmediate());
 
             WASM_VALIDATOR_FAIL_IF(!m_info.memoryCount(), "memory must be present");
@@ -975,8 +956,6 @@
             break;
         }
         case Ext1OpType::MemoryCopy: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
             WASM_FAIL_IF_HELPER_FAILS(parseMemoryCopyImmediates());
 
             WASM_VALIDATOR_FAIL_IF(!m_info.memoryCount(), "memory must be present");
@@ -997,8 +976,6 @@
             break;
         }
         case Ext1OpType::MemoryInit: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
             MemoryInitImmediates immediates;
             WASM_FAIL_IF_HELPER_FAILS(parseMemoryInitImmediates(immediates));
 
@@ -1017,8 +994,6 @@
             break;
         }
         case Ext1OpType::DataDrop: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
             unsigned dataSegmentIndex;
             WASM_FAIL_IF_HELPER_FAILS(parseDataSegmentIndex(dataSegmentIndex));
 
@@ -1078,7 +1053,6 @@
     }
 
     case RefNull: {
-        WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
         Type typeOfNull;
         WASM_PARSER_FAIL_IF(!parseRefType(m_info, typeOfNull), "ref.null type must be a reference type");
         m_expressionStack.constructAndAppend(typeOfNull, m_context.addConstant(typeOfNull, JSValue::encode(jsNull())));
@@ -1086,7 +1060,6 @@
     }
 
     case RefIsNull: {
-        WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
         TypedExpression value;
         WASM_TRY_POP_EXPRESSION_STACK_INTO(value, "ref.is_null");
         WASM_VALIDATOR_FAIL_IF(!isRefType(value.type()), "ref.is_null to type ", value.type().kind, " expected a reference type");
@@ -1097,8 +1070,6 @@
     }
 
     case RefFunc: {
-        WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
         uint32_t index;
         WASM_PARSER_FAIL_IF(!parseVarUInt32(index), "can't get index for ref.func");
         WASM_VALIDATOR_FAIL_IF(index >= m_info.functionIndexSpaceSize(), "ref.func index ", index, " is too large, max is ", m_info.functionIndexSpaceSize());
@@ -1630,13 +1601,11 @@
 
         switch (static_cast<Ext1OpType>(extOp)) {
         case Ext1OpType::TableInit: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
             TableInitImmediates immediates;
             WASM_FAIL_IF_HELPER_FAILS(parseTableInitImmediates(immediates));
             return { };
         }
         case Ext1OpType::ElemDrop: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
             unsigned elementIndex;
             WASM_FAIL_IF_HELPER_FAILS(parseElementIndex(elementIndex));
             return { };
@@ -1644,35 +1613,29 @@
         case Ext1OpType::TableSize:
         case Ext1OpType::TableGrow:
         case Ext1OpType::TableFill: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
             unsigned tableIndex;
             WASM_FAIL_IF_HELPER_FAILS(parseTableIndex(tableIndex));
             return { };
         }
         case Ext1OpType::TableCopy: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
             TableCopyImmediates immediates;
             WASM_FAIL_IF_HELPER_FAILS(parseTableCopyImmediates(immediates));
             return { };
         }
         case Ext1OpType::MemoryFill: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
             WASM_FAIL_IF_HELPER_FAILS(parseMemoryFillImmediate());
             return { };
         }
         case Ext1OpType::MemoryCopy: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
             WASM_FAIL_IF_HELPER_FAILS(parseMemoryCopyImmediates());
             return { };
         }
         case Ext1OpType::MemoryInit: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
             MemoryInitImmediates immediates;
             WASM_FAIL_IF_HELPER_FAILS(parseMemoryInitImmediates(immediates));
             return { };
         }
         case Ext1OpType::DataDrop: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
             unsigned dataSegmentIndex;
             WASM_FAIL_IF_HELPER_FAILS(parseDataSegmentIndex(dataSegmentIndex));
             return { };
@@ -1690,8 +1653,6 @@
     }
 
     case AnnotatedSelect: {
-        WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
         AnnotatedSelectImmediates immediates;
         WASM_FAIL_IF_HELPER_FAILS(parseAnnotatedSelectImmediates(immediates));
         return { };
@@ -1705,7 +1666,6 @@
     }
     case RefIsNull:
     case RefNull: {
-        WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
         return { };
     }
 
@@ -1712,7 +1672,6 @@
     case RefFunc: {
         uint32_t unused;
         WASM_PARSER_FAIL_IF(!parseVarUInt32(unused), "can't get immediate for ", m_currentOpcode, " in unreachable context");
-        WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
         return { };
     }
 

Modified: trunk/Source/_javascript_Core/wasm/WasmOperations.cpp (281437 => 281438)


--- trunk/Source/_javascript_Core/wasm/WasmOperations.cpp	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/Source/_javascript_Core/wasm/WasmOperations.cpp	2021-08-23 06:28:16 UTC (rev 281438)
@@ -569,7 +569,6 @@
             FALLTHROUGH;
         case TypeKind::Externref:
             unboxedValue = bitwise_cast<uint64_t>(value);
-            RELEASE_ASSERT(Options::useWebAssemblyReferences());
             break;
         default:
             RELEASE_ASSERT_NOT_REACHED();

Modified: trunk/Source/_javascript_Core/wasm/WasmParser.h (281437 => 281438)


--- trunk/Source/_javascript_Core/wasm/WasmParser.h	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/Source/_javascript_Core/wasm/WasmParser.h	2021-08-23 06:28:16 UTC (rev 281438)
@@ -284,8 +284,6 @@
         return { };
     }
 
-    WASM_PARSER_FAIL_IF(!Options::useWebAssemblyMultiValues(), "Type table indices for block signatures are not supported yet");
-
     int64_t index;
     WASM_PARSER_FAIL_IF(!parseVarInt64(index), "Block-like instruction doesn't return value type but can't decode type section index");
     WASM_PARSER_FAIL_IF(index < 0, "Block-like instruction signature index is negative");

Modified: trunk/Source/_javascript_Core/wasm/WasmSectionParser.cpp (281437 => 281438)


--- trunk/Source/_javascript_Core/wasm/WasmSectionParser.cpp	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/Source/_javascript_Core/wasm/WasmSectionParser.cpp	2021-08-23 06:28:16 UTC (rev 281438)
@@ -66,7 +66,6 @@
 
         uint32_t returnCount;
         WASM_PARSER_FAIL_IF(!parseVarUInt32(returnCount), "can't get ", i, "th Type's return count");
-        WASM_PARSER_FAIL_IF(returnCount > 1 && !Options::useWebAssemblyMultiValues(), "Signatures cannot have more than one result type yet.");
 
         Vector<Type, 1> returnTypes;
         WASM_PARSER_FAIL_IF(!returnTypes.tryReserveCapacity(argumentCount), "can't allocate enough memory for Type section's ", i, "th signature");
@@ -410,8 +409,6 @@
             break;
         }
         case 0x01: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
             uint8_t elementKind;
             WASM_FAIL_IF_HELPER_FAILS(parseElementKind(elementKind));
 
@@ -447,8 +444,6 @@
             break;
         }
         case 0x03: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
             uint8_t elementKind;
             WASM_FAIL_IF_HELPER_FAILS(parseElementKind(elementKind));
 
@@ -462,7 +457,6 @@
             break;
         }
         case 0x04: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
             constexpr uint32_t tableIndex = 0;
             WASM_FAIL_IF_HELPER_FAILS(validateElementTableIdx(tableIndex));
 
@@ -481,7 +475,6 @@
             break;
         }
         case 0x05: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
             Type refType;
             WASM_PARSER_FAIL_IF(!parseRefType(m_info, refType), "can't parse reftype in elem section");
             WASM_PARSER_FAIL_IF(!refType.isFuncref(), "reftype in element section should be funcref");
@@ -497,8 +490,6 @@
             break;
         }
         case 0x06: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
             uint32_t tableIndex;
             WASM_PARSER_FAIL_IF(!parseVarUInt32(tableIndex), "can't get ", elementNum, "th Element table index");
             WASM_FAIL_IF_HELPER_FAILS(validateElementTableIdx(tableIndex));
@@ -522,8 +513,6 @@
             break;
         }
         case 0x07: {
-            WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
-
             Type refType;
             WASM_PARSER_FAIL_IF(!parseRefType(m_info, refType), "can't parse reftype in elem section");
             WASM_PARSER_FAIL_IF(!refType.isFuncref(), "reftype in element section should be funcref");
@@ -750,7 +739,7 @@
         uint32_t memoryIndexOrDataFlag = UINT32_MAX;
         WASM_PARSER_FAIL_IF(!parseVarUInt32(memoryIndexOrDataFlag), "can't get ", segmentNumber, "th Data segment's flag");
 
-        if (!Options::useWebAssemblyReferences() || !memoryIndexOrDataFlag) {
+        if (!memoryIndexOrDataFlag) {
             const uint32_t memoryIndex = memoryIndexOrDataFlag;
             WASM_PARSER_FAIL_IF(memoryIndex >= m_info->memoryCount(), segmentNumber, "th Data segment has index ", memoryIndex, " which exceeds the number of Memories ", m_info->memoryCount());
 
@@ -772,8 +761,6 @@
             continue;
         }
 
-        ASSERT(Options::useWebAssemblyReferences());
-
         const uint32_t dataFlag = memoryIndexOrDataFlag;
         if (dataFlag == 0x01) {
             uint32_t dataByteLength;
@@ -823,7 +810,6 @@
 
 auto SectionParser::parseDataCount() -> PartialResult
 {
-    WASM_PARSER_FAIL_IF(!Options::useWebAssemblyReferences(), "references are not enabled");
     uint32_t numberOfDataSegments;
     WASM_PARSER_FAIL_IF(!parseVarUInt32(numberOfDataSegments), "can't get Data Count section's count");
 

Modified: trunk/Source/_javascript_Core/wasm/js/JSWebAssembly.cpp (281437 => 281438)


--- trunk/Source/_javascript_Core/wasm/js/JSWebAssembly.cpp	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/Source/_javascript_Core/wasm/js/JSWebAssembly.cpp	2021-08-23 06:28:16 UTC (rev 281438)
@@ -108,12 +108,10 @@
     Base::finishCreation(vm);
     ASSERT(inherits(vm, info()));
     JSC_TO_STRING_TAG_WITHOUT_TRANSITION();
-    if (Options::useWebAssemblyStreaming()) {
-        if (globalObject->globalObjectMethodTable()->compileStreaming)
-            JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("compileStreaming", webAssemblyCompileStreamingCodeGenerator, static_cast<unsigned>(0));
-        if (globalObject->globalObjectMethodTable()->instantiateStreaming)
-            JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("instantiateStreaming", webAssemblyInstantiateStreamingCodeGenerator, static_cast<unsigned>(0));
-    }
+    if (globalObject->globalObjectMethodTable()->compileStreaming)
+        JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("compileStreaming", webAssemblyCompileStreamingCodeGenerator, static_cast<unsigned>(0));
+    if (globalObject->globalObjectMethodTable()->instantiateStreaming)
+        JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("instantiateStreaming", webAssemblyInstantiateStreamingCodeGenerator, static_cast<unsigned>(0));
 }
 
 JSWebAssembly::JSWebAssembly(VM& vm, Structure* structure)

Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyGlobalConstructor.cpp (281437 => 281438)


--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyGlobalConstructor.cpp	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyGlobalConstructor.cpp	2021-08-23 06:28:16 UTC (rev 281438)
@@ -94,9 +94,9 @@
             type = Wasm::Types::F32;
         else if (valueString == "f64"_s)
             type = Wasm::Types::F64;
-        else if (Options::useWebAssemblyReferences() && (valueString == "anyfunc"_s || valueString == "funcref"_s))
+        else if (valueString == "anyfunc"_s || valueString == "funcref"_s)
             type = Wasm::Types::Funcref;
-        else if (Options::useWebAssemblyReferences() && valueString == "externref"_s)
+        else if (valueString == "externref"_s)
             type = Wasm::Types::Externref;
         else
             return JSValue::encode(throwException(globalObject, throwScope, createTypeError(globalObject, "WebAssembly.Global expects its 'value' field to be the string 'i32', 'i64', 'f32', 'f64', 'anyfunc', 'funcref', or 'externref'"_s)));
@@ -138,7 +138,6 @@
         break;
     }
     case Wasm::TypeKind::Funcref: {
-        ASSERT(Options::useWebAssemblyReferences());
         if (argument.isUndefined())
             argument = defaultValueForReferenceType(type);
         if (!isWebAssemblyHostFunction(vm, argument) && !argument.isNull()) {
@@ -149,7 +148,6 @@
         break;
     }
     case Wasm::TypeKind::Externref: {
-        ASSERT(Options::useWebAssemblyReferences());
         if (argument.isUndefined())
             argument = defaultValueForReferenceType(type);
         initialValue = JSValue::encode(argument);

Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyTableConstructor.cpp (281437 => 281438)


--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyTableConstructor.cpp	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyTableConstructor.cpp	2021-08-23 06:28:16 UTC (rev 281438)
@@ -118,21 +118,19 @@
     JSWebAssemblyTable* jsWebAssemblyTable = JSWebAssemblyTable::tryCreate(globalObject, vm, webAssemblyTableStructure, wasmTable.releaseNonNull());
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
 
-    if (Options::useWebAssemblyReferences()) {
-        JSValue defaultValue = callFrame->argumentCount() < 2
-            ? defaultValueForReferenceType(jsWebAssemblyTable->table()->wasmType())
-            : callFrame->uncheckedArgument(1);
-        WebAssemblyFunction* wasmFunction = nullptr;
-        WebAssemblyWrapperFunction* wasmWrapperFunction = nullptr;
-        if (jsWebAssemblyTable->table()->isFuncrefTable() && !defaultValue.isNull() && !isWebAssemblyHostFunction(vm, defaultValue, wasmFunction, wasmWrapperFunction))
-            return throwVMTypeError(globalObject, throwScope, "WebAssembly.Table.prototype.constructor expects the second argument to be null or an instance of WebAssembly.Function"_s);
-        for (uint32_t tableIndex = 0; tableIndex < initial; ++tableIndex) {
-            if (jsWebAssemblyTable->table()->isFuncrefTable() && wasmFunction)
-                jsWebAssemblyTable->set(tableIndex, wasmFunction);
-            if (jsWebAssemblyTable->table()->isExternrefTable())
-                jsWebAssemblyTable->set(tableIndex, defaultValue);
-            RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
-        }
+    JSValue defaultValue = callFrame->argumentCount() < 2
+        ? defaultValueForReferenceType(jsWebAssemblyTable->table()->wasmType())
+        : callFrame->uncheckedArgument(1);
+    WebAssemblyFunction* wasmFunction = nullptr;
+    WebAssemblyWrapperFunction* wasmWrapperFunction = nullptr;
+    if (jsWebAssemblyTable->table()->isFuncrefTable() && !defaultValue.isNull() && !isWebAssemblyHostFunction(vm, defaultValue, wasmFunction, wasmWrapperFunction))
+        return throwVMTypeError(globalObject, throwScope, "WebAssembly.Table.prototype.constructor expects the second argument to be null or an instance of WebAssembly.Function"_s);
+    for (uint32_t tableIndex = 0; tableIndex < initial; ++tableIndex) {
+        if (jsWebAssemblyTable->table()->isFuncrefTable() && wasmFunction)
+            jsWebAssemblyTable->set(tableIndex, wasmFunction);
+        if (jsWebAssemblyTable->table()->isExternrefTable())
+            jsWebAssemblyTable->set(tableIndex, defaultValue);
+        RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     }
 
     RELEASE_AND_RETURN(throwScope, JSValue::encode(jsWebAssemblyTable));

Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyTablePrototype.cpp (281437 => 281438)


--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyTablePrototype.cpp	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyTablePrototype.cpp	2021-08-23 06:28:16 UTC (rev 281438)
@@ -94,12 +94,11 @@
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
 
     JSValue defaultValue = jsNull();
-    if (Options::useWebAssemblyReferences()) {
-        if (callFrame->argumentCount() < 2)
-            defaultValue = defaultValueForReferenceType(table->table()->wasmType());
-        else
-            defaultValue = callFrame->uncheckedArgument(1);
-    }
+    if (callFrame->argumentCount() < 2)
+        defaultValue = defaultValueForReferenceType(table->table()->wasmType());
+    else
+        defaultValue = callFrame->uncheckedArgument(1);
+
     if (table->table()->isFuncrefTable() && !defaultValue.isNull() && !isWebAssemblyHostFunction(vm, defaultValue))
         return throwVMTypeError(globalObject, throwScope, "WebAssembly.Table.prototype.grow expects the second argument to be null or an instance of WebAssembly.Function"_s);
     uint32_t oldLength = table->length();
@@ -141,7 +140,7 @@
         return throwVMRangeError(globalObject, throwScope, "WebAssembly.Table.prototype.set expects an integer less than the length of the table"_s);
 
     JSValue value = callFrame->argument(1);
-    if (Options::useWebAssemblyReferences() && callFrame->argumentCount() < 2)
+    if (callFrame->argumentCount() < 2)
         value = defaultValueForReferenceType(table->table()->wasmType());
 
     if (table->table()->asFuncrefTable()) {

Modified: trunk/Tools/ChangeLog (281437 => 281438)


--- trunk/Tools/ChangeLog	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/Tools/ChangeLog	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1,3 +1,12 @@
+2021-08-22  Yusuke Suzuki  <ysuz...@apple.com>
+
+        [JSC] Remove already-shipped wasm option flags
+        https://bugs.webkit.org/show_bug.cgi?id=229386
+
+        Reviewed by Ross Kirsling.
+
+        * Scripts/run-jsc-stress-tests:
+
 2021-08-22  Lauro Moura  <lmo...@igalia.com>
 
         [WPE][WebDriver] Basic fullscreen support for the headless backend

Modified: trunk/Tools/Scripts/run-jsc-stress-tests (281437 => 281438)


--- trunk/Tools/Scripts/run-jsc-stress-tests	2021-08-23 06:22:37 UTC (rev 281437)
+++ trunk/Tools/Scripts/run-jsc-stress-tests	2021-08-23 06:28:16 UTC (rev 281438)
@@ -1312,11 +1312,11 @@
 end
 
 def runWebAssemblySpecTest(mode)
-    runWebAssemblySpecTestBase(mode, "spec-harness", "--useWebAssemblyReferences=false")
+    runWebAssemblySpecTestBase(mode, "spec-harness")
 end
 
 def runWebAssemblyReferenceSpecTest(mode)
-    runWebAssemblySpecTestBase(mode, "ref-spec-harness", "--useWebAssemblyReferences=true")
+    runWebAssemblySpecTestBase(mode, "ref-spec-harness")
 end
 
 def runWebAssemblyLowExecutableMemory(*optionalTestSpecificOptions)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to