Fix the ENABLE(WEBASSEMBLY) build after r190827
authorossy@webkit.org <ossy@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Oct 2015 16:20:08 +0000 (16:20 +0000)
committerossy@webkit.org <ossy@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Oct 2015 16:20:08 +0000 (16:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150330

Reviewed by Geoffrey Garen.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock): Removed the duplicated VM argument.
* bytecode/CodeBlock.h:
(JSC::WebAssemblyCodeBlock::create): Added new parameters to finishCreation() calls.
(JSC::WebAssemblyCodeBlock::WebAssemblyCodeBlock): Change VM parameter to pointer to match *CodeBlock classes.
* runtime/Executable.cpp:
(JSC::WebAssemblyExecutable::prepareForExecution): Removed extra ")" and pass pointer as it is expected.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191291 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/CodeBlock.cpp
Source/JavaScriptCore/bytecode/CodeBlock.h
Source/JavaScriptCore/runtime/Executable.cpp

index d6d3fec..3e85a6c 100644 (file)
@@ -1,3 +1,18 @@
+2015-10-19  Csaba Osztrogon√°c  <ossy@webkit.org>
+
+        Fix the ENABLE(WEBASSEMBLY) build after r190827
+        https://bugs.webkit.org/show_bug.cgi?id=150330
+
+        Reviewed by Geoffrey Garen.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::CodeBlock): Removed the duplicated VM argument.
+        * bytecode/CodeBlock.h:
+        (JSC::WebAssemblyCodeBlock::create): Added new parameters to finishCreation() calls.
+        (JSC::WebAssemblyCodeBlock::WebAssemblyCodeBlock): Change VM parameter to pointer to match *CodeBlock classes.
+        * runtime/Executable.cpp:
+        (JSC::WebAssemblyExecutable::prepareForExecution): Removed extra ")" and pass pointer as it is expected.
+
 2015-10-19  Mark Lam  <mark.lam@apple.com>
 
         DoubleRep fails to convert SpecBoolean values.
index e0f2402..3085535 100644 (file)
@@ -2203,8 +2203,8 @@ void CodeBlock::finishCreation(VM& vm, ScriptExecutable* ownerExecutable, Unlink
 }
 
 #if ENABLE(WEBASSEMBLY)
-CodeBlock::CodeBlock(VM* vm, Structure* structure, WebAssemblyExecutable* ownerExecutable, VM& vm, JSGlobalObject* globalObject)
-    : JSCell(vm, structure)
+CodeBlock::CodeBlock(VM* vm, Structure* structure, WebAssemblyExecutable* ownerExecutable, JSGlobalObject* globalObject)
+    : JSCell(*vm, structure)
     , m_globalObject(globalObject->vm(), this, globalObject)
     , m_heap(&m_globalObject->vm().heap)
     , m_numCalleeRegisters(0)
@@ -2217,7 +2217,7 @@ CodeBlock::CodeBlock(VM* vm, Structure* structure, WebAssemblyExecutable* ownerE
     , m_steppingMode(SteppingModeDisabled)
     , m_numBreakpoints(0)
     , m_ownerExecutable(m_globalObject->vm(), this, ownerExecutable)
-    , m_vm(&vm)
+    , m_vm(vm)
     , m_isStrictMode(false)
     , m_needsActivation(false)
     , m_codeType(FunctionCode)
index 23c77c1..488071d 100644 (file)
@@ -111,7 +111,7 @@ protected:
     CodeBlock(VM*, Structure*, CopyParsedBlockTag, CodeBlock& other);
     CodeBlock(VM*, Structure*, ScriptExecutable* ownerExecutable, UnlinkedCodeBlock*, JSScope*, PassRefPtr<SourceProvider>, unsigned sourceOffset, unsigned firstLineColumnOffset);
 #if ENABLE(WEBASSEMBLY)
-    CodeBlock(VM*, Structure*, WebAssemblyExecutable* ownerExecutable, VM&, JSGlobalObject*);
+    CodeBlock(VM*, Structure*, WebAssemblyExecutable* ownerExecutable, JSGlobalObject*);
 #endif
 
     void finishCreation(VM&, CopyParsedBlockTag, CodeBlock& other);
@@ -1286,13 +1286,14 @@ private:
 #if ENABLE(WEBASSEMBLY)
 class WebAssemblyCodeBlock : public CodeBlock {
 public:
+    typedef CodeBlock Base;
     DECLARE_INFO;
 
     static WebAssemblyCodeBlock* create(VM* vm, CopyParsedBlockTag, WebAssemblyCodeBlock& other)
     {
         WebAssemblyCodeBlock* instance = new (NotNull, allocateCell<WebAssemblyCodeBlock>(vm->heap))
             WebAssemblyCodeBlock(vm, vm->webAssemblyCodeBlockStructure.get(), CopyParsedBlock, other);
-        instance->finishCreation(*vm);
+        instance->finishCreation(*vm, CopyParsedBlock, other);
         return instance;
     }
 
@@ -1300,7 +1301,7 @@ public:
     {
         WebAssemblyCodeBlock* instance = new (NotNull, allocateCell<WebAssemblyCodeBlock>(vm->heap))
             WebAssemblyCodeBlock(vm, vm->webAssemblyCodeBlockStructure.get(), ownerExecutable, globalObject);
-        instance->finishCreation(*vm);
+        instance->finishCreation(*vm, ownerExecutable, globalObject);
         return instance;
     }
 
@@ -1310,13 +1311,13 @@ public:
     }
 
 private:
-    WebAssemblyCodeBlock(VM& vm, Structure* structure, CopyParsedBlockTag, WebAssemblyCodeBlock& other)
+    WebAssemblyCodeBlock(VM* vm, Structure* structure, CopyParsedBlockTag, WebAssemblyCodeBlock& other)
         : CodeBlock(vm, structure, CopyParsedBlock, other)
     {
     }
 
-    WebAssemblyCodeBlock(VM& vm, Structure* structure, WebAssemblyExecutable* ownerExecutable, JSGlobalObject* globalObject)
-        : CodeBlock(vm, structure, ownerExecutable, vm, globalObject)
+    WebAssemblyCodeBlock(VM* vm, Structure* structure, WebAssemblyExecutable* ownerExecutable, JSGlobalObject* globalObject)
+        : CodeBlock(vm, structure, ownerExecutable, globalObject)
     {
     }
 
index 030bcc5..aaf85c4 100644 (file)
@@ -738,8 +738,8 @@ void WebAssemblyExecutable::prepareForExecution(ExecState* exec)
     VM& vm = exec->vm();
     DeferGC deferGC(vm.heap);
 
-    WebAssemblyCodeBlock* codeBlock = WebAssemblyCodeBlock::create(vm,
-        this, exec->lexicalGlobalObject()));
+    WebAssemblyCodeBlock* codeBlock = WebAssemblyCodeBlock::create(&vm,
+        this, exec->lexicalGlobalObject());
 
     WASMFunctionParser::compile(vm, codeBlock, m_module.get(), m_source, m_functionIndex);