Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (229464 => 229465)
--- trunk/Source/_javascript_Core/ChangeLog 2018-03-09 17:59:57 UTC (rev 229464)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-03-09 18:02:49 UTC (rev 229465)
@@ -1,3 +1,19 @@
+2018-03-09 Yusuke Suzuki <[email protected]>
+
+ Unreviewed, remove WebAssemblyFunctionType
+ https://bugs.webkit.org/show_bug.cgi?id=183429
+
+ Drop WebAssemblyFunctionType since it is no longer used. This breaks
+ JSCast assumption that all the derived classes of JSFunction use
+ JSFunctionType. We also add ASSERT for JSFunction::finishCreation.
+
+ * runtime/JSFunction.cpp:
+ (JSC::JSFunction::finishCreation):
+ * runtime/JSType.h:
+ * wasm/js/WebAssemblyFunction.cpp:
+ (JSC::WebAssemblyFunction::createStructure):
+ * wasm/js/WebAssemblyFunction.h:
+
2018-03-09 Ryan Haddad <[email protected]>
Unreviewed, rolling out r229446.
Modified: trunk/Source/_javascript_Core/runtime/JSFunction.cpp (229464 => 229465)
--- trunk/Source/_javascript_Core/runtime/JSFunction.cpp 2018-03-09 17:59:57 UTC (rev 229464)
+++ trunk/Source/_javascript_Core/runtime/JSFunction.cpp 2018-03-09 18:02:49 UTC (rev 229465)
@@ -107,6 +107,7 @@
{
Base::finishCreation(vm);
ASSERT(jsDynamicCast<JSFunction*>(vm, this));
+ ASSERT(type() == JSFunctionType);
if (isBuiltinFunction() && jsExecutable()->name().isPrivateName()) {
// This is anonymous builtin function.
rareData(vm)->setHasReifiedName();
@@ -117,6 +118,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(vm, info()));
+ ASSERT(type() == JSFunctionType);
m_executable.set(vm, this, executable);
// Some NativeExecutable functions, like JSBoundFunction, decide to lazily allocate their name string.
if (!name.isNull())
Modified: trunk/Source/_javascript_Core/runtime/JSType.h (229464 => 229465)
--- trunk/Source/_javascript_Core/runtime/JSType.h 2018-03-09 17:59:57 UTC (rev 229464)
+++ trunk/Source/_javascript_Core/runtime/JSType.h 2018-03-09 18:02:49 UTC (rev 229465)
@@ -108,7 +108,6 @@
JSWeakMapType,
JSWeakSetType,
- WebAssemblyFunctionType,
WebAssemblyToJSCalleeType,
LastJSCObjectType = WebAssemblyToJSCalleeType, // This is the last "JSC" Object type. After this, we have embedder's (e.g., WebCore) extended object types.
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.cpp (229464 => 229465)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.cpp 2018-03-09 17:59:57 UTC (rev 229464)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.cpp 2018-03-09 18:02:49 UTC (rev 229465)
@@ -189,7 +189,7 @@
Structure* WebAssemblyFunction::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
ASSERT(globalObject);
- return Structure::create(vm, globalObject, prototype, TypeInfo(WebAssemblyFunctionType, StructureFlags), info());
+ return Structure::create(vm, globalObject, prototype, TypeInfo(JSFunctionType, StructureFlags), info());
}
WebAssemblyFunction::WebAssemblyFunction(VM& vm, JSGlobalObject* globalObject, Structure* structure, Wasm::Callee& jsEntrypoint, Wasm::WasmEntrypointLoadLocation wasmEntrypoint, Wasm::SignatureIndex signatureIndex)
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.h (229464 => 229465)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.h 2018-03-09 17:59:57 UTC (rev 229464)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.h 2018-03-09 18:02:49 UTC (rev 229465)
@@ -46,7 +46,7 @@
public:
using Base = WebAssemblyFunctionBase;
- const static unsigned StructureFlags = Base::StructureFlags | TypeOfShouldCallGetCallData;
+ const static unsigned StructureFlags = Base::StructureFlags;
template<typename CellType>
static IsoSubspace* subspaceFor(VM& vm)