<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[214695] trunk/Source/JavaScriptCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/214695">214695</a></dd>
<dt>Author</dt> <dd>sbarati@apple.com</dd>
<dt>Date</dt> <dd>2017-03-31 16:06:20 -0700 (Fri, 31 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>WebAssembly: Strip WasmParser and WasmFunctionParser from knowing about VM
https://bugs.webkit.org/show_bug.cgi?id=170312

Reviewed by Mark Lam.

This is another step towards PIC-ifying Wasm. This patch removes
the VM field that is no longer used.

* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::parseAndCompile):
* wasm/WasmB3IRGenerator.h:
* wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser&lt;Context&gt;::FunctionParser):
* wasm/WasmModuleParser.h:
(JSC::Wasm::ModuleParser::ModuleParser):
* wasm/WasmParser.h:
(JSC::Wasm::Parser&lt;SuccessType&gt;::Parser):
* wasm/WasmPlan.cpp:
(JSC::Wasm::Plan::parseAndValidateModule):
(JSC::Wasm::Plan::compileFunctions):
* wasm/WasmValidate.cpp:
(JSC::Wasm::validateFunction):
* wasm/WasmValidate.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmB3IRGeneratorcpp">trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmB3IRGeneratorh">trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.h</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmFunctionParserh">trunk/Source/JavaScriptCore/wasm/WasmFunctionParser.h</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmModuleParserh">trunk/Source/JavaScriptCore/wasm/WasmModuleParser.h</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmParserh">trunk/Source/JavaScriptCore/wasm/WasmParser.h</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmPlancpp">trunk/Source/JavaScriptCore/wasm/WasmPlan.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmValidatecpp">trunk/Source/JavaScriptCore/wasm/WasmValidate.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmValidateh">trunk/Source/JavaScriptCore/wasm/WasmValidate.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (214694 => 214695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2017-03-31 22:50:47 UTC (rev 214694)
+++ trunk/Source/JavaScriptCore/ChangeLog        2017-03-31 23:06:20 UTC (rev 214695)
</span><span class="lines">@@ -1,5 +1,31 @@
</span><span class="cx"> 2017-03-31  Saam Barati  &lt;sbarati@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        WebAssembly: Strip WasmParser and WasmFunctionParser from knowing about VM
+        https://bugs.webkit.org/show_bug.cgi?id=170312
+
+        Reviewed by Mark Lam.
+
+        This is another step towards PIC-ifying Wasm. This patch removes
+        the VM field that is no longer used.
+
+        * wasm/WasmB3IRGenerator.cpp:
+        (JSC::Wasm::parseAndCompile):
+        * wasm/WasmB3IRGenerator.h:
+        * wasm/WasmFunctionParser.h:
+        (JSC::Wasm::FunctionParser&lt;Context&gt;::FunctionParser):
+        * wasm/WasmModuleParser.h:
+        (JSC::Wasm::ModuleParser::ModuleParser):
+        * wasm/WasmParser.h:
+        (JSC::Wasm::Parser&lt;SuccessType&gt;::Parser):
+        * wasm/WasmPlan.cpp:
+        (JSC::Wasm::Plan::parseAndValidateModule):
+        (JSC::Wasm::Plan::compileFunctions):
+        * wasm/WasmValidate.cpp:
+        (JSC::Wasm::validateFunction):
+        * wasm/WasmValidate.h:
+
+2017-03-31  Saam Barati  &lt;sbarati@apple.com&gt;
+
</ins><span class="cx">         WebAssembly: Ref count Signature and SignatureInformation should not care about VM
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=170316
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmB3IRGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp (214694 => 214695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp        2017-03-31 22:50:47 UTC (rev 214694)
+++ trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp        2017-03-31 23:06:20 UTC (rev 214695)
</span><span class="lines">@@ -1263,7 +1263,7 @@
</span><span class="cx">     return bitwise_cast&lt;Origin&gt;(OpcodeOrigin(m_parser-&gt;currentOpcode(), m_parser-&gt;currentOpcodeStartingOffset()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Expected&lt;std::unique_ptr&lt;WasmInternalFunction&gt;, String&gt; parseAndCompile(VM&amp; vm, CompilationContext&amp; compilationContext, const uint8_t* functionStart, size_t functionLength, const Signature&amp; signature, Vector&lt;UnlinkedWasmToWasmCall&gt;&amp; unlinkedWasmToWasmCalls, const ModuleInformation&amp; info, const Vector&lt;SignatureIndex&gt;&amp; moduleSignatureIndicesToUniquedSignatureIndices, MemoryMode mode, unsigned optLevel)
</del><ins>+Expected&lt;std::unique_ptr&lt;WasmInternalFunction&gt;, String&gt; parseAndCompile(CompilationContext&amp; compilationContext, const uint8_t* functionStart, size_t functionLength, const Signature&amp; signature, Vector&lt;UnlinkedWasmToWasmCall&gt;&amp; unlinkedWasmToWasmCalls, const ModuleInformation&amp; info, const Vector&lt;SignatureIndex&gt;&amp; moduleSignatureIndicesToUniquedSignatureIndices, MemoryMode mode, unsigned optLevel)
</ins><span class="cx"> {
</span><span class="cx">     auto result = std::make_unique&lt;WasmInternalFunction&gt;();
</span><span class="cx"> 
</span><span class="lines">@@ -1278,7 +1278,7 @@
</span><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     B3IRGenerator context(info, procedure, result.get(), unlinkedWasmToWasmCalls, mode);
</span><del>-    FunctionParser&lt;B3IRGenerator&gt; parser(&amp;vm, context, functionStart, functionLength, signature, info, moduleSignatureIndicesToUniquedSignatureIndices);
</del><ins>+    FunctionParser&lt;B3IRGenerator&gt; parser(context, functionStart, functionLength, signature, info, moduleSignatureIndicesToUniquedSignatureIndices);
</ins><span class="cx">     WASM_FAIL_IF_HELPER_FAILS(parser.parse());
</span><span class="cx"> 
</span><span class="cx">     context.insertConstants();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmB3IRGeneratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.h (214694 => 214695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.h        2017-03-31 22:50:47 UTC (rev 214694)
+++ trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.h        2017-03-31 23:06:20 UTC (rev 214695)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> #include &quot;B3Common.h&quot;
</span><span class="cx"> #include &quot;B3Compilation.h&quot;
</span><span class="cx"> #include &quot;CCallHelpers.h&quot;
</span><del>-#include &quot;VM.h&quot;
</del><span class="cx"> #include &quot;WasmFormat.h&quot;
</span><span class="cx"> #include &quot;WasmMemory.h&quot;
</span><span class="cx"> #include &lt;wtf/Expected.h&gt;
</span><span class="lines">@@ -49,7 +48,7 @@
</span><span class="cx">     CCallHelpers::Call jsEntrypointToWasmEntrypointCall;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-Expected&lt;std::unique_ptr&lt;WasmInternalFunction&gt;, String&gt; parseAndCompile(VM&amp;, CompilationContext&amp;, const uint8_t*, size_t, const Signature&amp;, Vector&lt;UnlinkedWasmToWasmCall&gt;&amp;, const ModuleInformation&amp;, const Vector&lt;SignatureIndex&gt;&amp;, MemoryMode, unsigned optLevel = B3::defaultOptLevel());
</del><ins>+Expected&lt;std::unique_ptr&lt;WasmInternalFunction&gt;, String&gt; parseAndCompile(CompilationContext&amp;, const uint8_t*, size_t, const Signature&amp;, Vector&lt;UnlinkedWasmToWasmCall&gt;&amp;, const ModuleInformation&amp;, const Vector&lt;SignatureIndex&gt;&amp;, MemoryMode, unsigned optLevel = B3::defaultOptLevel());
</ins><span class="cx"> 
</span><span class="cx"> } } // namespace JSC::Wasm
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmFunctionParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmFunctionParser.h (214694 => 214695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmFunctionParser.h        2017-03-31 22:50:47 UTC (rev 214694)
+++ trunk/Source/JavaScriptCore/wasm/WasmFunctionParser.h        2017-03-31 23:06:20 UTC (rev 214695)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">     typedef typename Context::ControlType ControlType;
</span><span class="cx">     typedef typename Context::ExpressionList ExpressionList;
</span><span class="cx"> 
</span><del>-    FunctionParser(VM*, Context&amp;, const uint8_t* functionStart, size_t functionLength, const Signature&amp;, const ModuleInformation&amp;, const Vector&lt;SignatureIndex&gt;&amp;);
</del><ins>+    FunctionParser(Context&amp;, const uint8_t* functionStart, size_t functionLength, const Signature&amp;, const ModuleInformation&amp;, const Vector&lt;SignatureIndex&gt;&amp;);
</ins><span class="cx"> 
</span><span class="cx">     Result WARN_UNUSED_RETURN parse();
</span><span class="cx"> 
</span><span class="lines">@@ -95,8 +95,8 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template&lt;typename Context&gt;
</span><del>-FunctionParser&lt;Context&gt;::FunctionParser(VM* vm, Context&amp; context, const uint8_t* functionStart, size_t functionLength, const Signature&amp; signature, const ModuleInformation&amp; info, const Vector&lt;SignatureIndex&gt;&amp; moduleSignatureIndicesToUniquedSignatureIndices)
-    : Parser(vm, functionStart, functionLength)
</del><ins>+FunctionParser&lt;Context&gt;::FunctionParser(Context&amp; context, const uint8_t* functionStart, size_t functionLength, const Signature&amp; signature, const ModuleInformation&amp; info, const Vector&lt;SignatureIndex&gt;&amp; moduleSignatureIndicesToUniquedSignatureIndices)
+    : Parser(functionStart, functionLength)
</ins><span class="cx">     , m_context(context)
</span><span class="cx">     , m_signature(signature)
</span><span class="cx">     , m_info(info)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmModuleParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmModuleParser.h (214694 => 214695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmModuleParser.h        2017-03-31 22:50:47 UTC (rev 214694)
+++ trunk/Source/JavaScriptCore/wasm/WasmModuleParser.h        2017-03-31 23:06:20 UTC (rev 214695)
</span><span class="lines">@@ -45,8 +45,8 @@
</span><span class="cx"> public:
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-    ModuleParser(VM* vm, const uint8_t* sourceBuffer, size_t sourceLength)
-        : Parser(vm, sourceBuffer, sourceLength)
</del><ins>+    ModuleParser(const uint8_t* sourceBuffer, size_t sourceLength)
+        : Parser(sourceBuffer, sourceLength)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmParser.h (214694 => 214695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmParser.h        2017-03-31 22:50:47 UTC (rev 214694)
+++ trunk/Source/JavaScriptCore/wasm/WasmParser.h        2017-03-31 23:06:20 UTC (rev 214695)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">     typedef Expected&lt;SuccessType, ErrorType&gt; Result;
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    Parser(VM*, const uint8_t*, size_t);
</del><ins>+    Parser(const uint8_t*, size_t);
</ins><span class="cx"> 
</span><span class="cx">     bool WARN_UNUSED_RETURN consumeCharacter(char);
</span><span class="cx">     bool WARN_UNUSED_RETURN consumeString(const char*);
</span><span class="lines">@@ -81,7 +81,6 @@
</span><span class="cx">     const uint8_t* source() const { return m_source; }
</span><span class="cx">     size_t length() const { return m_sourceLength; }
</span><span class="cx"> 
</span><del>-    VM* m_vm;
</del><span class="cx">     size_t m_offset = 0;
</span><span class="cx"> 
</span><span class="cx">     template &lt;typename ...Args&gt;
</span><span class="lines">@@ -107,9 +106,8 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template&lt;typename SuccessType&gt;
</span><del>-ALWAYS_INLINE Parser&lt;SuccessType&gt;::Parser(VM* vm, const uint8_t* sourceBuffer, size_t sourceLength)
-    : m_vm(vm)
-    , m_source(sourceBuffer)
</del><ins>+ALWAYS_INLINE Parser&lt;SuccessType&gt;::Parser(const uint8_t* sourceBuffer, size_t sourceLength)
+    : m_source(sourceBuffer)
</ins><span class="cx">     , m_sourceLength(sourceLength)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmPlancpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmPlan.cpp (214694 => 214695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmPlan.cpp        2017-03-31 22:50:47 UTC (rev 214694)
+++ trunk/Source/JavaScriptCore/wasm/WasmPlan.cpp        2017-03-31 23:06:20 UTC (rev 214695)
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx">         startTime = MonotonicTime::now();
</span><span class="cx"> 
</span><span class="cx">     {
</span><del>-        ModuleParser moduleParser(&amp;m_vm, m_source, m_sourceLength);
</del><ins>+        ModuleParser moduleParser(m_source, m_sourceLength);
</ins><span class="cx">         auto parseResult = moduleParser.parse();
</span><span class="cx">         if (!parseResult) {
</span><span class="cx">             fail(holdLock(m_lock), WTFMove(parseResult.error()));
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx">         SignatureIndex signatureIndex = m_moduleInformation-&gt;internalFunctionSignatureIndices[functionIndex];
</span><span class="cx">         const Signature&amp; signature = SignatureInformation::get(signatureIndex);
</span><span class="cx"> 
</span><del>-        auto validationResult = validateFunction(&amp;m_vm, functionStart, functionLength, signature, *m_moduleInformation, m_moduleSignatureIndicesToUniquedSignatureIndices);
</del><ins>+        auto validationResult = validateFunction(functionStart, functionLength, signature, *m_moduleInformation, m_moduleSignatureIndicesToUniquedSignatureIndices);
</ins><span class="cx">         if (!validationResult) {
</span><span class="cx">             if (verbose) {
</span><span class="cx">                 for (unsigned i = 0; i &lt; functionLength; ++i)
</span><span class="lines">@@ -242,10 +242,10 @@
</span><span class="cx">         const Signature&amp; signature = SignatureInformation::get(signatureIndex);
</span><span class="cx">         unsigned functionIndexSpace = m_wasmExitStubs.size() + functionIndex;
</span><span class="cx">         ASSERT_UNUSED(functionIndexSpace, m_moduleInformation-&gt;signatureIndexFromFunctionIndexSpace(functionIndexSpace) == signatureIndex);
</span><del>-        ASSERT(validateFunction(&amp;m_vm, functionStart, functionLength, signature, *m_moduleInformation, m_moduleSignatureIndicesToUniquedSignatureIndices));
</del><ins>+        ASSERT(validateFunction(functionStart, functionLength, signature, *m_moduleInformation, m_moduleSignatureIndicesToUniquedSignatureIndices));
</ins><span class="cx"> 
</span><span class="cx">         m_unlinkedWasmToWasmCalls[functionIndex] = Vector&lt;UnlinkedWasmToWasmCall&gt;();
</span><del>-        auto parseAndCompileResult = parseAndCompile(m_vm, m_compilationContexts[functionIndex], functionStart, functionLength, signature, m_unlinkedWasmToWasmCalls[functionIndex], *m_moduleInformation, m_moduleSignatureIndicesToUniquedSignatureIndices, m_mode);
</del><ins>+        auto parseAndCompileResult = parseAndCompile(m_compilationContexts[functionIndex], functionStart, functionLength, signature, m_unlinkedWasmToWasmCalls[functionIndex], *m_moduleInformation, m_moduleSignatureIndicesToUniquedSignatureIndices, m_mode);
</ins><span class="cx"> 
</span><span class="cx">         if (UNLIKELY(!parseAndCompileResult)) {
</span><span class="cx">             auto locker = holdLock(m_lock);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmValidatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmValidate.cpp (214694 => 214695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmValidate.cpp        2017-03-31 22:50:47 UTC (rev 214694)
+++ trunk/Source/JavaScriptCore/wasm/WasmValidate.cpp        2017-03-31 23:06:20 UTC (rev 214695)
</span><span class="lines">@@ -382,10 +382,10 @@
</span><span class="cx">     dataLogLn();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Expected&lt;void, String&gt; validateFunction(VM* vm, const uint8_t* source, size_t length, const Signature&amp; signature, const ModuleInformation&amp; module, const Vector&lt;SignatureIndex&gt;&amp; moduleSignatureIndicesToUniquedSignatureIndices)
</del><ins>+Expected&lt;void, String&gt; validateFunction(const uint8_t* source, size_t length, const Signature&amp; signature, const ModuleInformation&amp; module, const Vector&lt;SignatureIndex&gt;&amp; moduleSignatureIndicesToUniquedSignatureIndices)
</ins><span class="cx"> {
</span><span class="cx">     Validate context(module);
</span><del>-    FunctionParser&lt;Validate&gt; validator(vm, context, source, length, signature, module, moduleSignatureIndicesToUniquedSignatureIndices);
</del><ins>+    FunctionParser&lt;Validate&gt; validator(context, source, length, signature, module, moduleSignatureIndicesToUniquedSignatureIndices);
</ins><span class="cx">     WASM_FAIL_IF_HELPER_FAILS(validator.parse());
</span><span class="cx">     return { };
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmValidateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmValidate.h (214694 => 214695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmValidate.h        2017-03-31 22:50:47 UTC (rev 214694)
+++ trunk/Source/JavaScriptCore/wasm/WasmValidate.h        2017-03-31 23:06:20 UTC (rev 214695)
</span><span class="lines">@@ -32,11 +32,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-class VM;
-
</del><span class="cx"> namespace Wasm {
</span><span class="cx"> 
</span><del>-Expected&lt;void, String&gt; validateFunction(VM*, const uint8_t*, size_t, const Signature&amp;, const ModuleInformation&amp;, const Vector&lt;SignatureIndex&gt;&amp;);
</del><ins>+Expected&lt;void, String&gt; validateFunction(const uint8_t*, size_t, const Signature&amp;, const ModuleInformation&amp;, const Vector&lt;SignatureIndex&gt;&amp;);
</ins><span class="cx"> 
</span><span class="cx"> } } // namespace JSC::Wasm
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>