Title: [207927] trunk/Source/_javascript_Core
Revision
207927
Author
[email protected]
Date
2016-10-26 16:57:13 -0700 (Wed, 26 Oct 2016)

Log Message

WebAssembly: remove now-dead JSWasmModule
https://bugs.webkit.org/show_bug.cgi?id=164044

Reviewed by Keith Miller.

* CMakeLists.txt:
* _javascript_Core.xcodeproj/project.pbxproj:
* runtime/Executable.cpp:
(JSC::WebAssemblyExecutable::WebAssemblyExecutable):
(JSC::WebAssemblyExecutable::visitChildren):
* runtime/Executable.h:
* wasm/JSWasmModule.cpp: Removed.
* wasm/JSWasmModule.h: Removed.
* wasm/WasmModuleParser.cpp:

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/_javascript_Core/CMakeLists.txt (207926 => 207927)


--- trunk/Source/_javascript_Core/CMakeLists.txt	2016-10-26 23:19:32 UTC (rev 207926)
+++ trunk/Source/_javascript_Core/CMakeLists.txt	2016-10-26 23:57:13 UTC (rev 207927)
@@ -864,7 +864,6 @@
     tools/JSDollarVM.cpp
     tools/JSDollarVMPrototype.cpp
 
-    wasm/JSWasmModule.cpp
     wasm/JSWebAssembly.cpp
     wasm/WasmB3IRGenerator.cpp
     wasm/WasmCallingConvention.cpp

Modified: trunk/Source/_javascript_Core/ChangeLog (207926 => 207927)


--- trunk/Source/_javascript_Core/ChangeLog	2016-10-26 23:19:32 UTC (rev 207926)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-10-26 23:57:13 UTC (rev 207927)
@@ -1,3 +1,20 @@
+2016-10-26  JF Bastien  <[email protected]>
+
+        WebAssembly: remove now-dead JSWasmModule
+        https://bugs.webkit.org/show_bug.cgi?id=164044
+
+        Reviewed by Keith Miller.
+
+        * CMakeLists.txt:
+        * _javascript_Core.xcodeproj/project.pbxproj:
+        * runtime/Executable.cpp:
+        (JSC::WebAssemblyExecutable::WebAssemblyExecutable):
+        (JSC::WebAssemblyExecutable::visitChildren):
+        * runtime/Executable.h:
+        * wasm/JSWasmModule.cpp: Removed.
+        * wasm/JSWasmModule.h: Removed.
+        * wasm/WasmModuleParser.cpp:
+
 2016-10-26  Mark Lam  <[email protected]>
 
         JSGenericTypedArrayView::set() should check for exceptions.

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (207926 => 207927)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2016-10-26 23:19:32 UTC (rev 207926)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2016-10-26 23:57:13 UTC (rev 207927)
@@ -1366,8 +1366,6 @@
 		79EE0C001B4AFB85000385C9 /* VariableEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = 79EE0BFE1B4AFB85000385C9 /* VariableEnvironment.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		79F8FC1E1B9FED0F00CA66AB /* DFGMaximalFlushInsertionPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 79F8FC1C1B9FED0F00CA66AB /* DFGMaximalFlushInsertionPhase.cpp */; };
 		79F8FC1F1B9FED0F00CA66AB /* DFGMaximalFlushInsertionPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 79F8FC1D1B9FED0F00CA66AB /* DFGMaximalFlushInsertionPhase.h */; };
-		7B98D1361B60CD5F0023B1A4 /* JSWasmModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B98D1341B60CD5A0023B1A4 /* JSWasmModule.cpp */; };
-		7B98D1371B60CD620023B1A4 /* JSWasmModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B98D1351B60CD5A0023B1A4 /* JSWasmModule.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7BC547D31B6959A100959B58 /* WasmFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BC547D21B69599B00959B58 /* WasmFormat.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7C008CDA187124BB00955C24 /* JSPromiseDeferred.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C008CD8187124BB00955C24 /* JSPromiseDeferred.cpp */; };
 		7C008CDB187124BB00955C24 /* JSPromiseDeferred.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C008CD9187124BB00955C24 /* JSPromiseDeferred.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -3714,8 +3712,6 @@
 		79EE0BFE1B4AFB85000385C9 /* VariableEnvironment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VariableEnvironment.h; sourceTree = "<group>"; };
 		79F8FC1C1B9FED0F00CA66AB /* DFGMaximalFlushInsertionPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGMaximalFlushInsertionPhase.cpp; path = dfg/DFGMaximalFlushInsertionPhase.cpp; sourceTree = "<group>"; };
 		79F8FC1D1B9FED0F00CA66AB /* DFGMaximalFlushInsertionPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGMaximalFlushInsertionPhase.h; path = dfg/DFGMaximalFlushInsertionPhase.h; sourceTree = "<group>"; };
-		7B98D1341B60CD5A0023B1A4 /* JSWasmModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWasmModule.cpp; sourceTree = "<group>"; };
-		7B98D1351B60CD5A0023B1A4 /* JSWasmModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWasmModule.h; sourceTree = "<group>"; };
 		7BC547D21B69599B00959B58 /* WasmFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WasmFormat.h; sourceTree = "<group>"; };
 		7C008CD8187124BB00955C24 /* JSPromiseDeferred.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPromiseDeferred.cpp; sourceTree = "<group>"; };
 		7C008CD9187124BB00955C24 /* JSPromiseDeferred.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPromiseDeferred.h; sourceTree = "<group>"; };
@@ -5834,8 +5830,6 @@
 				AD2FCC2E1DB839F700B3E736 /* JSWebAssembly.cpp */,
 				AD2FCC2F1DB839F700B3E736 /* JSWebAssembly.h */,
 				AD2FCB8A1DB5840000B3E736 /* js */,
-				7B98D1341B60CD5A0023B1A4 /* JSWasmModule.cpp */,
-				7B98D1351B60CD5A0023B1A4 /* JSWasmModule.h */,
 				53F40E8E1D5902820099A1B6 /* WasmB3IRGenerator.cpp */,
 				53F40E921D5A4AB30099A1B6 /* WasmB3IRGenerator.h */,
 				53FD04D11D7AB187003287D3 /* WasmCallingConvention.cpp */,
@@ -8363,7 +8357,6 @@
 				BC18C42C0E16F5CD00B34460 /* JSValueRef.h in Headers */,
 				86E3C615167BABD7006D760A /* JSVirtualMachine.h in Headers */,
 				86E3C61D167BABEE006D760A /* JSVirtualMachineInternal.h in Headers */,
-				7B98D1371B60CD620023B1A4 /* JSWasmModule.h in Headers */,
 				DC605B5E1CE26EA200593718 /* ProfilerEvent.h in Headers */,
 				A7CA3AE817DA41AE006538AF /* JSWeakMap.h in Headers */,
 				A7482E93116A7CAD003B0712 /* JSWeakObjectMapRefInternal.h in Headers */,
@@ -9845,7 +9838,6 @@
 				86E3C61A167BABEE006D760A /* JSValue.mm in Sources */,
 				14BD5A320A3E91F600BAF59C /* JSValueRef.cpp in Sources */,
 				86E3C61C167BABEE006D760A /* JSVirtualMachine.mm in Sources */,
-				7B98D1361B60CD5F0023B1A4 /* JSWasmModule.cpp in Sources */,
 				A7CA3AE717DA41AE006538AF /* JSWeakMap.cpp in Sources */,
 				A7482B9411671147003B0712 /* JSWeakObjectMapRefPrivate.cpp in Sources */,
 				709FB8671AE335C60039D069 /* JSWeakSet.cpp in Sources */,

Modified: trunk/Source/_javascript_Core/runtime/Executable.cpp (207926 => 207927)


--- trunk/Source/_javascript_Core/runtime/Executable.cpp	2016-10-26 23:19:32 UTC (rev 207926)
+++ trunk/Source/_javascript_Core/runtime/Executable.cpp	2016-10-26 23:57:13 UTC (rev 207927)
@@ -31,7 +31,6 @@
 #include "Debugger.h"
 #include "JIT.h"
 #include "JSCInlines.h"
-#include "JSWasmModule.h"
 #include "LLIntEntrypoint.h"
 #include "Parser.h"
 #include "TypeProfiler.h"
@@ -747,10 +746,9 @@
 #if ENABLE(WEBASSEMBLY)
 const ClassInfo WebAssemblyExecutable::s_info = { "WebAssemblyExecutable", &ExecutableBase::s_info, 0, CREATE_METHOD_TABLE(WebAssemblyExecutable) };
 
-WebAssemblyExecutable::WebAssemblyExecutable(VM& vm, const SourceCode& source, JSWasmModule* module, unsigned functionIndex)
+WebAssemblyExecutable::WebAssemblyExecutable(VM& vm, const SourceCode& source, unsigned functionIndex)
     : ExecutableBase(vm, vm.webAssemblyExecutableStructure.get(), NUM_PARAMETERS_NOT_COMPILED, NoIntrinsic)
     , m_source(source)
-    , m_module(vm, this, module)
     , m_functionIndex(functionIndex)
 {
     ASSERT(source.provider()->sourceType() == SourceProviderSourceType::WebAssembly);
@@ -768,7 +766,6 @@
     ExecutableBase::visitChildren(thisObject, visitor);
     if (thisObject->m_codeBlockForCall)
         thisObject->m_codeBlockForCall->visitWeakly(visitor);
-    visitor.append(&thisObject->m_module);
 }
 #endif
 

Modified: trunk/Source/_javascript_Core/runtime/Executable.h (207926 => 207927)


--- trunk/Source/_javascript_Core/runtime/Executable.h	2016-10-26 23:19:32 UTC (rev 207926)
+++ trunk/Source/_javascript_Core/runtime/Executable.h	2016-10-26 23:57:13 UTC (rev 207927)
@@ -46,7 +46,6 @@
 class EvalCodeBlock;
 class FunctionCodeBlock;
 class JSScope;
-class JSWasmModule;
 class LLIntOffsetsExtractor;
 class ModuleProgramCodeBlock;
 class ProgramCodeBlock;
@@ -719,9 +718,9 @@
     typedef ExecutableBase Base;
     static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
 
-    static WebAssemblyExecutable* create(VM& vm, const SourceCode& source, JSWasmModule* module, unsigned functionIndex)
+    static WebAssemblyExecutable* create(VM& vm, const SourceCode& source, unsigned functionIndex)
     {
-        WebAssemblyExecutable* executable = new (NotNull, allocateCell<WebAssemblyExecutable>(vm.heap)) WebAssemblyExecutable(vm, source, module, functionIndex);
+        WebAssemblyExecutable* executable = new (NotNull, allocateCell<WebAssemblyExecutable>(vm.heap)) WebAssemblyExecutable(vm, source, functionIndex);
         executable->finishCreation(vm);
         return executable;
     }
@@ -744,12 +743,11 @@
 
 private:
     friend class ExecutableBase;
-    WebAssemblyExecutable(VM&, const SourceCode&, JSWasmModule*, unsigned functionIndex);
+    WebAssemblyExecutable(VM&, const SourceCode&, unsigned functionIndex);
 
     static void visitChildren(JSCell*, SlotVisitor&);
 
     SourceCode m_source;
-    WriteBarrier<JSWasmModule> m_module;
     unsigned m_functionIndex;
 
     WriteBarrier<WebAssemblyCodeBlock> m_codeBlockForCall;

Deleted: trunk/Source/_javascript_Core/wasm/JSWasmModule.cpp (207926 => 207927)


--- trunk/Source/_javascript_Core/wasm/JSWasmModule.cpp	2016-10-26 23:19:32 UTC (rev 207926)
+++ trunk/Source/_javascript_Core/wasm/JSWasmModule.cpp	2016-10-26 23:57:13 UTC (rev 207927)
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "JSWasmModule.h"
-
-#if ENABLE(WEBASSEMBLY)
-
-#include "AuxiliaryBarrierInlines.h"
-#include "HeapInlines.h"
-#include "JSArrayBuffer.h"
-#include "JSCJSValueInlines.h"
-#include "JSCellInlines.h"
-#include "JSFunction.h"
-#include "SlotVisitorInlines.h"
-#include "StructureInlines.h"
-
-namespace JSC {
-
-const ClassInfo JSWasmModule::s_info = { "WasmModule", &Base::s_info, 0, CREATE_METHOD_TABLE(JSWasmModule) };
-
-JSWasmModule::JSWasmModule(VM& vm, Structure* structure, JSArrayBuffer* arrayBuffer)
-    : Base(vm, structure)
-{
-    if (arrayBuffer)
-        m_arrayBuffer.set(vm, this, arrayBuffer);
-}
-
-void JSWasmModule::destroy(JSCell* cell)
-{
-    JSWasmModule* thisObject = jsCast<JSWasmModule*>(cell);
-    thisObject->JSWasmModule::~JSWasmModule();
-}
-
-void JSWasmModule::visitChildren(JSCell* cell, SlotVisitor& visitor)
-{
-    JSWasmModule* thisObject = jsCast<JSWasmModule*>(cell);
-    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
-    Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_arrayBuffer);
-    for (auto function : thisObject->m_functions)
-        visitor.append(&function);
-    for (auto importedFunction : thisObject->m_importedFunctions)
-        visitor.append(&importedFunction);
-}
-
-} // namespace JSC
-
-#endif // ENABLE(WEBASSEMBLY)

Deleted: trunk/Source/_javascript_Core/wasm/JSWasmModule.h (207926 => 207927)


--- trunk/Source/_javascript_Core/wasm/JSWasmModule.h	2016-10-26 23:19:32 UTC (rev 207926)
+++ trunk/Source/_javascript_Core/wasm/JSWasmModule.h	2016-10-26 23:57:13 UTC (rev 207927)
@@ -1,115 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if ENABLE(WEBASSEMBLY)
-
-#include "JSDestructibleObject.h"
-#include "WasmFormat.h"
-
-namespace JSC {
-
-class JSWasmModule : public JSDestructibleObject {
-public:
-    typedef JSDestructibleObject Base;
-
-    union GlobalVariable {
-        GlobalVariable(int32_t value)
-            : intValue(value)
-        {
-        }
-        GlobalVariable(float value)
-            : floatValue(value)
-        {
-        }
-        GlobalVariable(double value)
-            : doubleValue(value)
-        {
-        }
-
-        int32_t intValue;
-        float floatValue;
-        double doubleValue;
-    };
-
-    static JSWasmModule* create(VM& vm, Structure* structure, JSArrayBuffer* arrayBuffer)
-    {
-        JSWasmModule* module = new (NotNull, allocateCell<JSWasmModule>(vm.heap)) JSWasmModule(vm, structure, arrayBuffer);
-        module->finishCreation(vm);
-        return module;
-    }
-
-    DECLARE_INFO;
-
-    static Structure* createStructure(VM& vm, JSGlobalObject* globalObject)
-    {
-        return Structure::create(vm, globalObject, jsNull(), TypeInfo(ObjectType, StructureFlags), info());
-    }
-
-    static void destroy(JSCell*);
-    static void visitChildren(JSCell*, SlotVisitor&);
-
-    Vector<uint32_t>& i32Constants() { return m_i32Constants; }
-    Vector<float>& f32Constants() { return m_f32Constants; }
-    Vector<double>& f64Constants() { return m_f64Constants; }
-    Vector<Wasm::Signature>& signatures() { return m_signatures; }
-    Vector<Wasm::FunctionImport>& functionImports() { return m_functionImports; }
-    Vector<Wasm::FunctionImportSignature>& functionImportSignatures() { return m_functionImportSignatures; }
-    Vector<Wasm::Type>& globalVariableTypes() { return m_globalVariableTypes; }
-    Vector<Wasm::FunctionDeclaration>& functionDeclarations() { return m_functionDeclarations; }
-    Vector<Wasm::FunctionPointerTable>& functionPointerTables() { return m_functionPointerTables; }
-
-    const JSArrayBuffer* arrayBuffer() const { return m_arrayBuffer.get(); }
-    Vector<WriteBarrier<JSFunction>>& functions() { return m_functions; }
-    Vector<unsigned>& functionStartOffsetsInSource() { return m_functionStartOffsetsInSource; }
-    Vector<unsigned>& functionStackHeights() { return m_functionStackHeights; }
-    Vector<GlobalVariable>& globalVariables() { return m_globalVariables; }
-    Vector<WriteBarrier<JSFunction>>& importedFunctions() { return m_importedFunctions; }
-
-private:
-    JSWasmModule(VM&, Structure*, JSArrayBuffer*);
-
-    Vector<uint32_t> m_i32Constants;
-    Vector<float> m_f32Constants;
-    Vector<double> m_f64Constants;
-    Vector<Wasm::Signature> m_signatures;
-    Vector<Wasm::FunctionImport> m_functionImports;
-    Vector<Wasm::FunctionImportSignature> m_functionImportSignatures;
-    Vector<Wasm::Type> m_globalVariableTypes;
-    Vector<Wasm::FunctionDeclaration> m_functionDeclarations;
-    Vector<Wasm::FunctionPointerTable> m_functionPointerTables;
-
-    WriteBarrier<JSArrayBuffer> m_arrayBuffer;
-    Vector<WriteBarrier<JSFunction>> m_functions;
-    Vector<unsigned> m_functionStartOffsetsInSource;
-    Vector<unsigned> m_functionStackHeights;
-    Vector<GlobalVariable> m_globalVariables;
-    Vector<WriteBarrier<JSFunction>> m_importedFunctions;
-};
-
-} // namespace JSC
-
-#endif // ENABLE(WEBASSEMBLY)

Modified: trunk/Source/_javascript_Core/wasm/WasmModuleParser.cpp (207926 => 207927)


--- trunk/Source/_javascript_Core/wasm/WasmModuleParser.cpp	2016-10-26 23:19:32 UTC (rev 207926)
+++ trunk/Source/_javascript_Core/wasm/WasmModuleParser.cpp	2016-10-26 23:57:13 UTC (rev 207927)
@@ -28,7 +28,6 @@
 
 #if ENABLE(WEBASSEMBLY)
 
-#include "JSWasmModule.h"
 #include "WasmFormat.h"
 #include "WasmOps.h"
 #include "WasmSections.h"
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to