Changeset 207432 in webkit
- Timestamp:
- Oct 17, 2016 2:36:05 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r207427 r207432 1 2016-10-17 JF Bastien <jfbastien@apple.com> 2 3 WebAssembly JS API: implement basic stub 4 5 Implement the global WebAssembly JavaScript object, and its constructor + 6 function properties as described in: 7 https://github.com/WebAssembly/design/blob/master/JS.md 8 9 These don't do anything at the moment, the parent bug will take care of adding 10 more functionality and associated tests. 11 12 WebAssembly JS API: implement basic stub 13 https://bugs.webkit.org/show_bug.cgi?id=163404 14 15 Reviewed by Keith Miller. 16 17 * wasm.yaml: 18 * wasm/js-api/test_basic_api.js: Added. 19 (const.f.of.functionProperties.WebAssembly.f.undefined.throw.new.Error.Couldn.const.c.of.constructorProperties.WebAssembly.c.undefined.throw.new.Error.Couldn): 20 (const.c.of.constructorProperties.catch): 21 1 22 2016-10-17 Yusuke Suzuki <utatane.tea@gmail.com> 2 23 -
trunk/JSTests/wasm.yaml
r207363 r207432 24 24 - path: wasm/self-test/ 25 25 cmd: runWebAssembly 26 - path: wasm/js-api/ 27 cmd: runWebAssembly -
trunk/Source/JavaScriptCore/CMakeLists.txt
r207427 r207432 865 865 wasm/WASMModuleParser.cpp 866 866 wasm/WASMPlan.cpp 867 wasm/WebAssemblyObject.cpp 867 868 868 869 yarr/RegularExpression.cpp -
trunk/Source/JavaScriptCore/ChangeLog
r207430 r207432 1 2016-10-17 JF Bastien <jfbastien@apple.com> 2 3 WebAssembly JS API: implement basic stub 4 5 Implement the global WebAssembly JavaScript object, and its constructor + 6 function properties as described in: 7 https://github.com/WebAssembly/design/blob/master/JS.md 8 9 These don't do anything at the moment, the parent bug will take care of adding 10 more functionality and associated tests. 11 12 WebAssembly JS API: implement basic stub 13 https://bugs.webkit.org/show_bug.cgi?id=163404 14 15 Reviewed by Keith Miller. 16 17 * CMakeLists.txt: 18 * JavaScriptCore.xcodeproj/project.pbxproj: 19 * builtins/BuiltinNames.h: register the new WebAssembly object's name and its constructor properties 20 * jsc.cpp: remove useless include 21 * runtime/JSGlobalObject.cpp: 22 (JSC::JSGlobalObject::init): add the WebAssembly global object and its constructor properties, but only if the JSC option enables it 23 * runtime/Options.h: add the useWebAssembly (alias: enableWebAssembly) option, defaulting to false 24 * wasm/WebAssemblyObject.cpp: Added. 25 (JSC::WebAssemblyObject::create): boilerplate 26 (JSC::WebAssemblyObject::createStructure): boilerplate 27 (JSC::WebAssemblyObject::finishCreation): boilerplate 28 (JSC::WebAssemblyObject::WebAssemblyObject): boilerplate 29 (JSC::wasmObjectFuncvalidate): auto-throws for now 30 (JSC::wasmObjectFunccompile): auto-throws for now 31 * wasm/WebAssemblyObject.h: Added. 32 1 33 2016-10-17 Yusuke Suzuki <utatane.tea@gmail.com> 2 34 -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r207427 r207432 1876 1876 A7FCC26D17A0B6AA00786D1A /* FTLSwitchCase.h in Headers */ = {isa = PBXBuildFile; fileRef = A7FCC26C17A0B6AA00786D1A /* FTLSwitchCase.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1877 1877 A8A4748E151A8306004123FF /* libWTF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8A4748D151A8306004123FF /* libWTF.a */; }; 1878 AD2FCB881DAEBF3C00B3E736 /* WebAssemblyObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCB861DAEBF3700B3E736 /* WebAssemblyObject.cpp */; }; 1879 AD2FCB891DAEBF3F00B3E736 /* WebAssemblyObject.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCB871DAEBF3700B3E736 /* WebAssemblyObject.h */; }; 1878 1880 AD86A93E1AA4D88D002FE77F /* WeakGCMapInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = AD86A93D1AA4D87C002FE77F /* WeakGCMapInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1879 1881 ADDB1F6318D77DBE009B58A8 /* OpaqueRootSet.h in Headers */ = {isa = PBXBuildFile; fileRef = ADDB1F6218D77DB7009B58A8 /* OpaqueRootSet.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 4201 4203 A8E894330CD0603F00367179 /* JSGlobalObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObject.h; sourceTree = "<group>"; }; 4202 4204 AD1CF06816DCAB2D00B97123 /* PropertyTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PropertyTable.cpp; sourceTree = "<group>"; }; 4205 AD2FCB861DAEBF3700B3E736 /* WebAssemblyObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebAssemblyObject.cpp; sourceTree = "<group>"; }; 4206 AD2FCB871DAEBF3700B3E736 /* WebAssemblyObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyObject.h; sourceTree = "<group>"; }; 4203 4207 AD86A93D1AA4D87C002FE77F /* WeakGCMapInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakGCMapInlines.h; sourceTree = "<group>"; }; 4204 4208 ADDB1F6218D77DB7009B58A8 /* OpaqueRootSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpaqueRootSet.h; sourceTree = "<group>"; }; … … 5679 5683 isa = PBXGroup; 5680 5684 children = ( 5685 AD2FCB861DAEBF3700B3E736 /* WebAssemblyObject.cpp */, 5686 AD2FCB871DAEBF3700B3E736 /* WebAssemblyObject.h */, 5681 5687 7B98D1341B60CD5A0023B1A4 /* JSWASMModule.cpp */, 5682 5688 7B98D1351B60CD5A0023B1A4 /* JSWASMModule.h */, … … 7438 7444 0FD8A31417D4326C00CA2C40 /* CodeBlockSet.h in Headers */, 7439 7445 0F96EBB316676EF6008BADE3 /* CodeBlockWithJITType.h in Headers */, 7446 AD2FCB891DAEBF3F00B3E736 /* WebAssemblyObject.h in Headers */, 7440 7447 A77F1822164088B200640A47 /* CodeCache.h in Headers */, 7441 7448 99CC0B6318BE9950006CEBCC /* CodeGeneratorReplayInputs.py in Headers */, … … 9715 9722 0FE050271AA9095600D33B33 /* ScopedArguments.cpp in Sources */, 9716 9723 0FE0502F1AAA806900D33B33 /* ScopedArgumentsTable.cpp in Sources */, 9724 AD2FCB881DAEBF3C00B3E736 /* WebAssemblyObject.cpp in Sources */, 9717 9725 992ABCF91BEA9BD2006403A0 /* RemoteAutomationTarget.cpp in Sources */, 9718 9726 0FE0502A1AA9095600D33B33 /* ScopeOffset.cpp in Sources */, -
trunk/Source/JavaScriptCore/builtins/BuiltinNames.h
r206525 r207432 160 160 macro(makeBoundFunction) \ 161 161 macro(hasOwnLengthProperty) \ 162 macro(WebAssembly) \ 163 macro(Module) \ 164 macro(Instance) \ 165 macro(Memory) \ 166 macro(Table) \ 167 macro(CompileError) \ 168 macro(RuntimeError) \ 162 169 163 170 -
trunk/Source/JavaScriptCore/jsc.cpp
r207427 r207432 54 54 #include "JSString.h" 55 55 #include "JSTypedArrays.h" 56 #include "JSWASMModule.h"57 56 #include "LLIntData.h" 58 57 #include "ObjectConstructor.h" -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r206778 r207432 107 107 #include "JSTypedArrayViewPrototype.h" 108 108 #include "JSTypedArrays.h" 109 #include "JSWASMModule.h"110 109 #include "JSWeakMap.h" 111 110 #include "JSWeakSet.h" … … 156 155 #include "WeakSetConstructor.h" 157 156 #include "WeakSetPrototype.h" 157 #include "WebAssemblyObject.h" 158 158 #include <wtf/RandomNumber.h> 159 159 … … 818 818 putDirectWithoutTransition(vm, Identifier::fromString(exec, "$vm"), dollarVM, DontEnum); 819 819 } 820 821 #if ENABLE(WEBASSEMBLY) 822 if (Options::useWebAssembly()) { 823 auto* wasm = WebAssemblyObject::create(vm, this, WebAssemblyObject::createStructure(vm, this, m_objectPrototype.get())); 824 putDirectWithoutTransition(vm, Identifier::fromString(exec, "WebAssembly"), wasm, DontEnum); 825 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), 832 }; 833 addStaticGlobals(extraStaticGlobals, WTF_ARRAY_LENGTH(extraStaticGlobals)); 834 } 835 #endif // ENABLE(WEBASSEMBLY) 820 836 821 837 resetPrototype(vm, getPrototypeDirect()); -
trunk/Source/JavaScriptCore/runtime/Options.h
r206555 r207432 391 391 v(bool, useSourceProviderCache, true, Normal, "If false, the parser will not use the source provider cache. It's good to verify everything works when this is false. Because the cache is so successful, it can mask bugs.") \ 392 392 v(bool, useCodeCache, true, Normal, "If false, the unlinked byte code cache will not be used.") \ 393 \ 394 v(bool, useWebAssembly, false, Normal, "Expose the WebAssembly global object.") \ 393 395 394 396 enum OptionEquivalence { … … 428 430 v(enableOSRExitFuzz, useOSRExitFuzz, SameOption) \ 429 431 v(enableDollarVM, useDollarVM, SameOption) \ 432 v(enableWebAssembly, useWebAssembly, SameOption) \ 430 433 431 434 class Options { -
trunk/Tools/ChangeLog
r207416 r207432 1 2016-10-17 JF Bastien <jfbastien@apple.com> 2 3 WebAssembly JS API: implement basic stub 4 5 Implement the global WebAssembly JavaScript object, and its constructor + 6 function properties as described in: 7 https://github.com/WebAssembly/design/blob/master/JS.md 8 9 These don't do anything at the moment, the parent bug will take care of adding 10 more functionality and associated tests. 11 12 WebAssembly JS API: implement basic stub 13 https://bugs.webkit.org/show_bug.cgi?id=163404 14 15 Reviewed by Keith Miller. 16 17 * Scripts/run-jsc-stress-tests: use the new JSC option which exposes the WebAssembly object. 18 1 19 2016-10-17 Fujii Hironori <Hironori.Fujii@sony.com> 2 20 -
trunk/Tools/Scripts/run-jsc-stress-tests
r207363 r207432 1161 1161 prepareExtraAbsoluteFiles(WASMTESTS_PATH, ["wasm.json"]) 1162 1162 prepareExtraRelativeFiles(modules.map { |f| "../" + f }, $collection) 1163 run("default-wasm", "-m" )1163 run("default-wasm", "-m", "--useWebAssembly=1") 1164 1164 end 1165 1165
Note: See TracChangeset
for help on using the changeset viewer.