Commit 369f05e
committed
Re-enable SharedArrayBuffer for JSC shell and Testers
https://bugs.webkit.org/show_bug.cgi?id=212069
Reviewed by Keith Miller.
JSTests:
Update tests to align to the latest spec.
* stress/SharedArrayBuffer-opt.js:
(shouldSucceed):
(idx.of.string_appeared_here.a.of.arrays.m.of.atomics):
(string_appeared_here.a.of.arrays.m.of.atomics): Deleted.
* stress/SharedArrayBuffer.js:
(shouldSucceed):
(Symbol):
* stress/array-buffer-byte-length.js:
(shouldThrow):
(Symbol):
* stress/atomics-add-uint32.js:
* stress/atomics-known-int-use.js:
* stress/atomics-neg-zero.js:
* stress/atomics-store-return.js:
* stress/lars-sab-workers.js:
(resources):
(notify):
(wake): Deleted.
* stress/regress-170473.js:
* stress/regress-189317.js:
* stress/shared-array-buffer-sort-while-different-thread-is-modifying.js: Added.
(262.agent.waitUntil):
(262.agent.start.262.agent.receiveBroadcast):
* test262/config.yaml:
* test262/expectations.yaml:
LayoutTests/imported/w3c:
* web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-failure.https.any-expected.txt:
* web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-failure.https.any.serviceworker-expected.txt:
* web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-success.any.worker-expected.txt:
* web-platform-tests/wasm/jsapi/memory/constructor.any-expected.txt:
* web-platform-tests/wasm/jsapi/memory/constructor.any.worker-expected.txt:
* web-platform-tests/workers/postMessage_block.https-expected.txt:
Source/JavaScriptCore:
This patch revives SharedArrayBuffer and Atomics and aligning them to the latest spec.
1. SharedArrayBuffer's sort should be done in JS side. C++ sort is not safe for SharedArrayBuffer since the buffer
can be modified by different threads while sorting.
2. Atomics.wait should be renamed to Atomics.notify.
3. Atomics operation should be VarArgs in DFG because DFGSSALoweringPhase assumes that they are VarArgs and they can
have another arg for CheckInBounds dependency.
4. For test262, JSC shell should support "--can-block-is-false" flag. If it is true, the main thread's [[CanBlock]] becomes false.
This means that `Atomics.wait` cannot be used.
* builtins/BuiltinNames.h:
* builtins/TypedArrayPrototype.js:
(sort):
* bytecode/LinkTimeConstant.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::mustGenerate const):
(JSC::DFG::Node::hasVarArgs const):
(JSC::DFG::Node::mustGenerate): Deleted.
* dfg/DFGNodeType.h:
* dfg/DFGSSALoweringPhase.cpp:
(JSC::DFG::SSALoweringPhase::handleNode):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileAtomicsIsLockFree):
* jsc.cpp:
(printUsageStatement):
(CommandLine::parseArguments):
(runJSC):
* runtime/AtomicsObject.cpp:
(JSC::AtomicsObject::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSC_DEFINE_JIT_OPERATION):
* runtime/CommonIdentifiers.h:
* runtime/Intrinsic.cpp:
(JSC::intrinsicName):
* runtime/Intrinsic.h:
* runtime/JSArrayBufferPrototype.cpp:
(JSC::arrayBufferSlice):
(JSC::arrayBufferByteLength):
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSArrayBufferPrototype::finishCreation):
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::toIntegerOrInfinity const):
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncReverse):
(JSC::genericTypedArrayViewPrivateFuncSort):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* runtime/JSTypedArrayViewPrototype.h:
* runtime/OptionsList.h:
* runtime/SimpleTypedArrayController.cpp:
(JSC::SimpleTypedArrayController::SimpleTypedArrayController):
(JSC::SimpleTypedArrayController::isAtomicsWaitAllowedOnCurrentThread):
* runtime/SimpleTypedArrayController.h:
* runtime/SmallStrings.cpp:
(JSC::SmallStrings::initializeCommonStrings):
(JSC::SmallStrings::visitStrongReferences):
* runtime/SmallStrings.h:
(JSC::SmallStrings::notEqualString const):
(JSC::SmallStrings::timedOutString const):
(JSC::SmallStrings::okString const):
Source/WTF:
* wtf/PlatformEnable.h:
Tools:
* Scripts/test262/Runner.pm:
(getFeatureFlags):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(main):
LayoutTests:
* webaudio/dom-exceptions-expected.txt:
Canonical link: https://commits.webkit.org/231326@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269531 268f45cc-cd09-0410-ab3c-d52691b4dbfc1 parent 9b98de9 commit 369f05e
58 files changed
Lines changed: 697 additions & 265 deletions
File tree
- JSTests
- stress
- test262
- LayoutTests
- imported/w3c
- web-platform-tests
- html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism
- wasm/jsapi/memory
- workers
- webaudio
- Source
- JavaScriptCore
- builtins
- bytecode
- dfg
- ftl
- runtime
- WTF
- wtf
- Tools
- Scripts
- test262
- webkitpy/layout_tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
1 | 36 | | |
2 | 37 | | |
3 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
| |||
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
119 | | - | |
| 123 | + | |
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
| |||
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| |||
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| |||
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| 86 | + | |
82 | 87 | | |
83 | | - | |
84 | 88 | | |
85 | 89 | | |
86 | | - | |
| 90 | + | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
| |||
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| 102 | + | |
98 | 103 | | |
99 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
100 | 120 | | |
101 | 121 | | |
102 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | | - | |
| 44 | + | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | | - | |
| 48 | + | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | | - | |
| 53 | + | |
55 | 54 | | |
56 | 55 | | |
57 | | - | |
| 56 | + | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
62 | | - | |
| 61 | + | |
63 | 62 | | |
64 | 63 | | |
65 | | - | |
| 64 | + | |
66 | 65 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
17 | | - | |
| 15 | + | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
| |||
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | | - | |
| 29 | + | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
37 | | - | |
| 35 | + | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
42 | 40 | | |
43 | | - | |
| 41 | + | |
44 | 42 | | |
45 | | - | |
| 43 | + | |
46 | 44 | | |
47 | | - | |
| 45 | + | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
| |||
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
69 | | - | |
| 67 | + | |
70 | 68 | | |
71 | 69 | | |
72 | 70 | | |
| |||
88 | 86 | | |
89 | 87 | | |
90 | 88 | | |
91 | | - | |
| 89 | + | |
92 | 90 | | |
93 | 91 | | |
94 | 92 | | |
95 | 93 | | |
96 | | - | |
| 94 | + | |
97 | 95 | | |
98 | 96 | | |
99 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
0 commit comments