Diff
Modified: trunk/Source/_javascript_Core/CMakeLists.txt (187253 => 187254)
--- trunk/Source/_javascript_Core/CMakeLists.txt 2015-07-23 21:19:28 UTC (rev 187253)
+++ trunk/Source/_javascript_Core/CMakeLists.txt 2015-07-23 21:26:42 UTC (rev 187254)
@@ -26,6 +26,7 @@
"${_javascript_CORE_DIR}/replay"
"${_javascript_CORE_DIR}/runtime"
"${_javascript_CORE_DIR}/tools"
+ "${_javascript_CORE_DIR}/wasm"
"${_javascript_CORE_DIR}/yarr"
"${WTF_DIR}"
"${DERIVED_SOURCES_DIR}"
@@ -409,6 +410,8 @@
tools/JSDollarVM.cpp
tools/JSDollarVMPrototype.cpp
+ wasm/JSWASMModule.cpp
+
yarr/RegularExpression.cpp
yarr/YarrCanonicalizeUCS2.cpp
yarr/YarrInterpreter.cpp
Modified: trunk/Source/_javascript_Core/ChangeLog (187253 => 187254)
--- trunk/Source/_javascript_Core/ChangeLog 2015-07-23 21:19:28 UTC (rev 187253)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-07-23 21:26:42 UTC (rev 187254)
@@ -1,3 +1,22 @@
+2015-07-23 Sukolsak Sakshuwong <[email protected]>
+
+ Implement WebAssembly modules
+ https://bugs.webkit.org/show_bug.cgi?id=147222
+
+ Reviewed by Mark Lam.
+
+ Introducing the boilerplate data structure for the WebAssembly module.
+ WebAssembly functionality will be added in a subsequent patch.
+
+ * CMakeLists.txt:
+ * _javascript_Core.xcodeproj/project.pbxproj:
+ * wasm/JSWASMModule.cpp: Added.
+ (JSC::JSWASMModule::visitChildren):
+ * wasm/JSWASMModule.h: Added.
+ (JSC::JSWASMModule::create):
+ (JSC::JSWASMModule::createStructure):
+ (JSC::JSWASMModule::JSWASMModule):
+
2015-07-23 Devin Rousso <[email protected]>
Web Inspector: Add a function to CSSCompletions to get a list of supported system fonts
Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (187253 => 187254)
--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2015-07-23 21:19:28 UTC (rev 187253)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2015-07-23 21:26:42 UTC (rev 187254)
@@ -1023,6 +1023,8 @@
70ECA6091AFDBEA200449739 /* TemplateRegistryKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 70ECA6041AFDBEA200449739 /* TemplateRegistryKey.h */; settings = {ATTRIBUTES = (Private, ); }; };
79EE0BFF1B4AFB85000385C9 /* VariableEnvironment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 79EE0BFD1B4AFB85000385C9 /* VariableEnvironment.cpp */; };
79EE0C001B4AFB85000385C9 /* VariableEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = 79EE0BFE1B4AFB85000385C9 /* VariableEnvironment.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 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, ); }; };
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, ); }; };
7C008CE7187631B600955C24 /* Microtask.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C008CE5187631B600955C24 /* Microtask.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -2767,6 +2769,8 @@
70ECA6041AFDBEA200449739 /* TemplateRegistryKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TemplateRegistryKey.h; sourceTree = "<group>"; };
79EE0BFD1B4AFB85000385C9 /* VariableEnvironment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VariableEnvironment.cpp; sourceTree = "<group>"; };
79EE0BFE1B4AFB85000385C9 /* VariableEnvironment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VariableEnvironment.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>"; };
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>"; };
7C008CE5187631B600955C24 /* Microtask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Microtask.h; sourceTree = "<group>"; };
@@ -3621,6 +3625,7 @@
7EF6E0BB0EB7A1EC0079AFAF /* runtime */,
141211000A48772600480255 /* tests */,
8603CEF014C753EF00AE59E3 /* tools */,
+ 7B98D1331B60CD1E0023B1A4 /* wasm */,
86EAC48C0F93E8B9008EC948 /* yarr */,
);
name = _javascript_Core;
@@ -4283,6 +4288,15 @@
path = disassembler/ARMv7;
sourceTree = "<group>";
};
+ 7B98D1331B60CD1E0023B1A4 /* wasm */ = {
+ isa = PBXGroup;
+ children = (
+ 7B98D1341B60CD5A0023B1A4 /* JSWASMModule.cpp */,
+ 7B98D1351B60CD5A0023B1A4 /* JSWASMModule.h */,
+ );
+ path = wasm;
+ sourceTree = "<group>";
+ };
7E39D81D0EC38EFA003AF11A /* bytecompiler */ = {
isa = PBXGroup;
children = (
@@ -6265,6 +6279,7 @@
0F0FC45A14BD15F500B81154 /* LLIntCallLinkInfo.h in Headers */,
0FC3CD0019ADA410006AC72A /* DFGBlockWorklist.h in Headers */,
0FE050181AA9091100D33B33 /* DirectArguments.h in Headers */,
+ 7B98D1371B60CD620023B1A4 /* JSWASMModule.h in Headers */,
FE20CE9E15F04A9500DF3430 /* LLIntCLoop.h in Headers */,
0F04396E1B03DC0B009598B7 /* DFGCombinedLiveness.h in Headers */,
0F4680CA14BBB16C00BFE272 /* LLIntCommon.h in Headers */,
@@ -7631,6 +7646,7 @@
FE5932A7183C5A2600A1ECCC /* VMEntryScope.cpp in Sources */,
FED94F2E171E3E2300BE77A4 /* Watchdog.cpp in Sources */,
FED94F30171E3E2300BE77A4 /* WatchdogMac.cpp in Sources */,
+ 7B98D1361B60CD5F0023B1A4 /* JSWASMModule.cpp in Sources */,
0F919D2515853CE0004A4E7D /* Watchpoint.cpp in Sources */,
1ACF7377171CA6FB00C9BB1E /* Weak.cpp in Sources */,
0F6FC750196110A800E1D02D /* ComplexGetStatus.cpp in Sources */,
Added: trunk/Source/_javascript_Core/wasm/JSWASMModule.cpp (0 => 187254)
--- trunk/Source/_javascript_Core/wasm/JSWASMModule.cpp (rev 0)
+++ trunk/Source/_javascript_Core/wasm/JSWASMModule.cpp 2015-07-23 21:26:42 UTC (rev 187254)
@@ -0,0 +1,49 @@
+/*
+ * 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 "JSFunction.h"
+#include "SlotVisitorInlines.h"
+
+namespace JSC {
+
+const ClassInfo JSWASMModule::s_info = { "WASMModule", &Base::s_info, 0, CREATE_METHOD_TABLE(JSWASMModule) };
+
+void JSWASMModule::visitChildren(JSCell* cell, SlotVisitor& visitor)
+{
+ JSWASMModule* thisObject = jsCast<JSWASMModule*>(cell);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+ Base::visitChildren(thisObject, visitor);
+ for (auto function : thisObject->m_functions)
+ visitor.append(&function);
+}
+
+} // namespace JSC
+
+#endif // ENABLE(WEBASSEMBLY)
Added: trunk/Source/_javascript_Core/wasm/JSWASMModule.h (0 => 187254)
--- trunk/Source/_javascript_Core/wasm/JSWASMModule.h (rev 0)
+++ trunk/Source/_javascript_Core/wasm/JSWASMModule.h 2015-07-23 21:26:42 UTC (rev 187254)
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ */
+
+#ifndef JSWASMModule_h
+#define JSWASMModule_h
+
+#if ENABLE(WEBASSEMBLY)
+
+#include "JSObject.h"
+
+namespace JSC {
+
+class JSWASMModule : public JSNonFinalObject {
+public:
+ typedef JSNonFinalObject Base;
+
+ static JSWASMModule* create(VM& vm, Structure* structure)
+ {
+ JSWASMModule* module = new (NotNull, allocateCell<JSWASMModule>(vm.heap)) JSWASMModule(vm, structure);
+ 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 visitChildren(JSCell*, SlotVisitor&);
+
+private:
+ JSWASMModule(VM& vm, Structure* structure)
+ : Base(vm, structure)
+ {
+ }
+
+ Vector<WriteBarrier<JSFunction>> m_functions;
+};
+
+} // namespace JSC
+
+#endif // ENABLE(WEBASSEMBLY)
+
+#endif // JSWASMModule_h