<!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>[190005] 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/190005">190005</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-09-18 19:18:56 -0700 (Fri, 18 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove duplicate code in the WebAssembly parser
https://bugs.webkit.org/show_bug.cgi?id=149361

Patch by Sukolsak Sakshuwong &lt;sukolsak@gmail.com&gt; on 2015-09-18
Reviewed by Saam Barati.

Refactor the methods for parsing GetLocal and GetGlobal in WebAssembly
to remove duplicate code.

* wasm/WASMFunctionParser.cpp:
(JSC::nameOfType):
(JSC::WASMFunctionParser::parseExpressionI32):
(JSC::WASMFunctionParser::parseExpressionF32):
(JSC::WASMFunctionParser::parseExpressionF64):
(JSC::WASMFunctionParser::parseUnaryExpressionF64):
(JSC::WASMFunctionParser::parseBinaryExpressionF64):
(JSC::WASMFunctionParser::parseGetLocalExpression):
(JSC::WASMFunctionParser::parseGetGlobalExpression):
(JSC::WASMFunctionParser::parseGetLocalExpressionI32): Deleted.
(JSC::WASMFunctionParser::parseGetGlobalExpressionI32): Deleted.
(JSC::WASMFunctionParser::parseGetLocalExpressionF32): Deleted.
(JSC::WASMFunctionParser::parseGetGlobalExpressionF32): Deleted.
(JSC::WASMFunctionParser::parseGetLocalExpressionF64): Deleted.
(JSC::WASMFunctionParser::parseGetGlobalExpressionF64): Deleted.
* wasm/WASMFunctionParser.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWASMFunctionParsercpp">trunk/Source/JavaScriptCore/wasm/WASMFunctionParser.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWASMFunctionParserh">trunk/Source/JavaScriptCore/wasm/WASMFunctionParser.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (190004 => 190005)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-09-19 01:26:32 UTC (rev 190004)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-09-19 02:18:56 UTC (rev 190005)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2015-09-18  Sukolsak Sakshuwong  &lt;sukolsak@gmail.com&gt;
+
+        Remove duplicate code in the WebAssembly parser
+        https://bugs.webkit.org/show_bug.cgi?id=149361
+
+        Reviewed by Saam Barati.
+
+        Refactor the methods for parsing GetLocal and GetGlobal in WebAssembly
+        to remove duplicate code.
+
+        * wasm/WASMFunctionParser.cpp:
+        (JSC::nameOfType):
+        (JSC::WASMFunctionParser::parseExpressionI32):
+        (JSC::WASMFunctionParser::parseExpressionF32):
+        (JSC::WASMFunctionParser::parseExpressionF64):
+        (JSC::WASMFunctionParser::parseUnaryExpressionF64):
+        (JSC::WASMFunctionParser::parseBinaryExpressionF64):
+        (JSC::WASMFunctionParser::parseGetLocalExpression):
+        (JSC::WASMFunctionParser::parseGetGlobalExpression):
+        (JSC::WASMFunctionParser::parseGetLocalExpressionI32): Deleted.
+        (JSC::WASMFunctionParser::parseGetGlobalExpressionI32): Deleted.
+        (JSC::WASMFunctionParser::parseGetLocalExpressionF32): Deleted.
+        (JSC::WASMFunctionParser::parseGetGlobalExpressionF32): Deleted.
+        (JSC::WASMFunctionParser::parseGetLocalExpressionF64): Deleted.
+        (JSC::WASMFunctionParser::parseGetGlobalExpressionF64): Deleted.
+        * wasm/WASMFunctionParser.h:
+
</ins><span class="cx"> 2015-09-18  Saam barati  &lt;sbarati@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Refactor common code between GetCatchHandlerFunctor and UnwindFunctor
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWASMFunctionParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WASMFunctionParser.cpp (190004 => 190005)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WASMFunctionParser.cpp        2015-09-19 01:26:32 UTC (rev 190004)
+++ trunk/Source/JavaScriptCore/wasm/WASMFunctionParser.cpp        2015-09-19 02:18:56 UTC (rev 190005)
</span><span class="lines">@@ -51,6 +51,20 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><ins>+static String nameOfType(WASMType type)
+{
+    switch (type) {
+    case WASMType::I32:
+        return &quot;int32&quot;;
+    case WASMType::F32:
+        return &quot;float32&quot;;
+    case WASMType::F64:
+        return &quot;float64&quot;;
+    default:
+        ASSERT_NOT_REACHED();
+    }
+}
+
</ins><span class="cx"> bool WASMFunctionParser::checkSyntax(JSWASMModule* module, const SourceCode&amp; source, size_t functionIndex, unsigned startOffsetInSource, unsigned&amp; endOffsetInSource, unsigned&amp; stackHeight, String&amp; errorMessage)
</span><span class="cx"> {
</span><span class="cx">     WASMFunctionParser parser(module, source, functionIndex);
</span><span class="lines">@@ -545,9 +559,9 @@
</span><span class="cx">         case WASMOpExpressionI32::Immediate:
</span><span class="cx">             return parseImmediateExpressionI32(context);
</span><span class="cx">         case WASMOpExpressionI32::GetLocal:
</span><del>-            return parseGetLocalExpressionI32(context);
</del><ins>+            return parseGetLocalExpression(context, WASMType::I32);
</ins><span class="cx">         case WASMOpExpressionI32::GetGlobal:
</span><del>-            return parseGetGlobalExpressionI32(context);
</del><ins>+            return parseGetGlobalExpression(context, WASMType::I32);
</ins><span class="cx">         case WASMOpExpressionI32::SLoad8:
</span><span class="cx">             return parseLoad(context, WASMExpressionType::I32, WASMMemoryType::I8, MemoryAccessOffsetMode::NoOffset, MemoryAccessConversion::SignExtend);
</span><span class="cx">         case WASMOpExpressionI32::SLoadWithOffset8:
</span><span class="lines">@@ -649,7 +663,7 @@
</span><span class="cx">         case WASMOpExpressionI32WithImmediate::Immediate:
</span><span class="cx">             return parseImmediateExpressionI32(context, immediate);
</span><span class="cx">         case WASMOpExpressionI32WithImmediate::GetLocal:
</span><del>-            return parseGetLocalExpressionI32(context, immediate);
</del><ins>+            return parseGetLocalExpression(context, WASMType::I32, immediate);
</ins><span class="cx">         default:
</span><span class="cx">             ASSERT_NOT_REACHED();
</span><span class="cx">         }
</span><span class="lines">@@ -687,32 +701,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template &lt;class Context&gt;
</span><del>-ContextExpression WASMFunctionParser::parseGetLocalExpressionI32(Context&amp; context, uint32_t localIndex)
-{
-    FAIL_IF_FALSE(localIndex &lt; m_localTypes.size(), &quot;The local index is incorrect.&quot;);
-    FAIL_IF_FALSE(m_localTypes[localIndex] == WASMType::I32, &quot;Expected a local of type int32.&quot;);
-    return context.buildGetLocal(localIndex, WASMType::I32);
-}
-
-template &lt;class Context&gt;
-ContextExpression WASMFunctionParser::parseGetLocalExpressionI32(Context&amp; context)
-{
-    uint32_t localIndex;
-    READ_COMPACT_UINT32_OR_FAIL(localIndex, &quot;Cannot read the local index.&quot;);
-    return parseGetLocalExpressionI32(context, localIndex);
-}
-
-template &lt;class Context&gt;
-ContextExpression WASMFunctionParser::parseGetGlobalExpressionI32(Context&amp; context)
-{
-    uint32_t globalIndex;
-    READ_COMPACT_UINT32_OR_FAIL(globalIndex, &quot;Cannot read the global index.&quot;);
-    FAIL_IF_FALSE(globalIndex &lt; m_module-&gt;globalVariableTypes().size(), &quot;The global index is incorrect.&quot;);
-    FAIL_IF_FALSE(m_module-&gt;globalVariableTypes()[globalIndex] == WASMType::I32, &quot;Expected a global variable of type int32.&quot;);
-    return context.buildGetGlobal(globalIndex, WASMType::I32);
-}
-
-template &lt;class Context&gt;
</del><span class="cx"> ContextExpression WASMFunctionParser::parseUnaryExpressionI32(Context&amp; context, WASMOpExpressionI32 op)
</span><span class="cx"> {
</span><span class="cx">     ContextExpression expression = parseExpressionI32(context);
</span><span class="lines">@@ -775,9 +763,9 @@
</span><span class="cx">         case WASMOpExpressionF32::Immediate:
</span><span class="cx">             return parseImmediateExpressionF32(context);
</span><span class="cx">         case WASMOpExpressionF32::GetLocal:
</span><del>-            return parseGetLocalExpressionF32(context);
</del><ins>+            return parseGetLocalExpression(context, WASMType::F32);
</ins><span class="cx">         case WASMOpExpressionF32::GetGlobal:
</span><del>-            return parseGetGlobalExpressionF32(context);
</del><ins>+            return parseGetGlobalExpression(context, WASMType::F32);
</ins><span class="cx">         case WASMOpExpressionF32::Load:
</span><span class="cx">             return parseLoad(context, WASMExpressionType::F32, WASMMemoryType::F32, MemoryAccessOffsetMode::NoOffset);
</span><span class="cx">         case WASMOpExpressionF32::LoadWithOffset:
</span><span class="lines">@@ -819,7 +807,7 @@
</span><span class="cx">         case WASMOpExpressionF32WithImmediate::ConstantPoolIndex:
</span><span class="cx">             return parseConstantPoolIndexExpressionF32(context, immediate);
</span><span class="cx">         case WASMOpExpressionF32WithImmediate::GetLocal:
</span><del>-            return parseGetLocalExpressionF32(context, immediate);
</del><ins>+            return parseGetLocalExpression(context, WASMType::F32, immediate);
</ins><span class="cx">         default:
</span><span class="cx">             ASSERT_NOT_REACHED();
</span><span class="cx">         }
</span><span class="lines">@@ -851,32 +839,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template &lt;class Context&gt;
</span><del>-ContextExpression WASMFunctionParser::parseGetLocalExpressionF32(Context&amp; context, uint32_t localIndex)
-{
-    FAIL_IF_FALSE(localIndex &lt; m_localTypes.size(), &quot;The local index is incorrect.&quot;);
-    FAIL_IF_FALSE(m_localTypes[localIndex] == WASMType::F32, &quot;Expected a local of type float32.&quot;);
-    return context.buildGetLocal(localIndex, WASMType::F32);
-}
-
-template &lt;class Context&gt;
-ContextExpression WASMFunctionParser::parseGetLocalExpressionF32(Context&amp; context)
-{
-    uint32_t localIndex;
-    READ_COMPACT_UINT32_OR_FAIL(localIndex, &quot;Cannot read the local index.&quot;);
-    return parseGetLocalExpressionF32(context, localIndex);
-}
-
-template &lt;class Context&gt;
-ContextExpression WASMFunctionParser::parseGetGlobalExpressionF32(Context&amp; context)
-{
-    uint32_t globalIndex;
-    READ_COMPACT_UINT32_OR_FAIL(globalIndex, &quot;Cannot read the global index.&quot;);
-    FAIL_IF_FALSE(globalIndex &lt; m_module-&gt;globalVariableTypes().size(), &quot;The global index is incorrect.&quot;);
-    FAIL_IF_FALSE(m_module-&gt;globalVariableTypes()[globalIndex] == WASMType::F32, &quot;Expected a global variable of type float32.&quot;);
-    return context.buildGetGlobal(globalIndex, WASMType::F32);
-}
-
-template &lt;class Context&gt;
</del><span class="cx"> ContextExpression WASMFunctionParser::parseUnaryExpressionF32(Context&amp; context, WASMOpExpressionF32 op)
</span><span class="cx"> {
</span><span class="cx">     ContextExpression expression = parseExpressionF32(context);
</span><span class="lines">@@ -909,9 +871,9 @@
</span><span class="cx">         case WASMOpExpressionF64::Immediate:
</span><span class="cx">             return parseImmediateExpressionF64(context);
</span><span class="cx">         case WASMOpExpressionF64::GetLocal:
</span><del>-            return parseGetLocalExpressionF64(context);
</del><ins>+            return parseGetLocalExpression(context, WASMType::F64);
</ins><span class="cx">         case WASMOpExpressionF64::GetGlobal:
</span><del>-            return parseGetGlobalExpressionF64(context);
</del><ins>+            return parseGetGlobalExpression(context, WASMType::F64);
</ins><span class="cx">         case WASMOpExpressionF64::Load:
</span><span class="cx">             return parseLoad(context, WASMExpressionType::F64, WASMMemoryType::F64, MemoryAccessOffsetMode::NoOffset);
</span><span class="cx">         case WASMOpExpressionF64::LoadWithOffset:
</span><span class="lines">@@ -968,7 +930,7 @@
</span><span class="cx">         case WASMOpExpressionF64WithImmediate::ConstantPoolIndex:
</span><span class="cx">             return parseConstantPoolIndexExpressionF64(context, immediate);
</span><span class="cx">         case WASMOpExpressionF64WithImmediate::GetLocal:
</span><del>-            return parseGetLocalExpressionF64(context, immediate);
</del><ins>+            return parseGetLocalExpression(context, WASMType::F64, immediate);
</ins><span class="cx">         default:
</span><span class="cx">             ASSERT_NOT_REACHED();
</span><span class="cx">         }
</span><span class="lines">@@ -1000,47 +962,47 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template &lt;class Context&gt;
</span><del>-ContextExpression WASMFunctionParser::parseGetLocalExpressionF64(Context&amp; context, uint32_t localIndex)
</del><ins>+ContextExpression WASMFunctionParser::parseUnaryExpressionF64(Context&amp; context, WASMOpExpressionF64 op)
</ins><span class="cx"> {
</span><del>-    FAIL_IF_FALSE(localIndex &lt; m_localTypes.size(), &quot;The local variable index is incorrect.&quot;);
-    FAIL_IF_FALSE(m_localTypes[localIndex] == WASMType::F64, &quot;Expected a local variable of type float64.&quot;);
-    return context.buildGetLocal(localIndex, WASMType::F64);
</del><ins>+    ContextExpression expression = parseExpressionF64(context);
+    PROPAGATE_ERROR();
+    return context.buildUnaryF64(expression, op);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template &lt;class Context&gt;
</span><del>-ContextExpression WASMFunctionParser::parseGetLocalExpressionF64(Context&amp; context)
</del><ins>+ContextExpression WASMFunctionParser::parseBinaryExpressionF64(Context&amp; context, WASMOpExpressionF64 op)
</ins><span class="cx"> {
</span><del>-    uint32_t localIndex;
-    READ_COMPACT_UINT32_OR_FAIL(localIndex, &quot;Cannot read the local index.&quot;);
-    return parseGetLocalExpressionF64(context, localIndex);
</del><ins>+    ContextExpression left = parseExpressionF64(context);
+    PROPAGATE_ERROR();
+    ContextExpression right = parseExpressionF64(context);
+    PROPAGATE_ERROR();
+    return context.buildBinaryF64(left, right, op);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template &lt;class Context&gt;
</span><del>-ContextExpression WASMFunctionParser::parseGetGlobalExpressionF64(Context&amp; context)
</del><ins>+ContextExpression WASMFunctionParser::parseGetLocalExpression(Context&amp; context, WASMType type, uint32_t localIndex)
</ins><span class="cx"> {
</span><del>-    uint32_t globalIndex;
-    READ_COMPACT_UINT32_OR_FAIL(globalIndex, &quot;Cannot read the global index.&quot;);
-    FAIL_IF_FALSE(globalIndex &lt; m_module-&gt;globalVariableTypes().size(), &quot;The global index is incorrect.&quot;);
-    FAIL_IF_FALSE(m_module-&gt;globalVariableTypes()[globalIndex] == WASMType::F64, &quot;Expected a global variable of type float64.&quot;);
-    return context.buildGetGlobal(globalIndex, WASMType::F64);
</del><ins>+    FAIL_IF_FALSE(localIndex &lt; m_localTypes.size(), &quot;The local index is incorrect.&quot;);
+    FAIL_IF_FALSE(m_localTypes[localIndex] == type, &quot;Expected a local of type &quot; + nameOfType(type) + '.');
+    return context.buildGetLocal(localIndex, type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template &lt;class Context&gt;
</span><del>-ContextExpression WASMFunctionParser::parseUnaryExpressionF64(Context&amp; context, WASMOpExpressionF64 op)
</del><ins>+ContextExpression WASMFunctionParser::parseGetLocalExpression(Context&amp; context, WASMType type)
</ins><span class="cx"> {
</span><del>-    ContextExpression expression = parseExpressionF64(context);
-    PROPAGATE_ERROR();
-    return context.buildUnaryF64(expression, op);
</del><ins>+    uint32_t localIndex;
+    READ_COMPACT_UINT32_OR_FAIL(localIndex, &quot;Cannot read the local index.&quot;);
+    return parseGetLocalExpression(context, type, localIndex);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template &lt;class Context&gt;
</span><del>-ContextExpression WASMFunctionParser::parseBinaryExpressionF64(Context&amp; context, WASMOpExpressionF64 op)
</del><ins>+ContextExpression WASMFunctionParser::parseGetGlobalExpression(Context&amp; context, WASMType type)
</ins><span class="cx"> {
</span><del>-    ContextExpression left = parseExpressionF64(context);
-    PROPAGATE_ERROR();
-    ContextExpression right = parseExpressionF64(context);
-    PROPAGATE_ERROR();
-    return context.buildBinaryF64(left, right, op);
</del><ins>+    uint32_t globalIndex;
+    READ_COMPACT_UINT32_OR_FAIL(globalIndex, &quot;Cannot read the global index.&quot;);
+    FAIL_IF_FALSE(globalIndex &lt; m_module-&gt;globalVariableTypes().size(), &quot;The global index is incorrect.&quot;);
+    FAIL_IF_FALSE(m_module-&gt;globalVariableTypes()[globalIndex] == type, &quot;Expected a global of type &quot; + nameOfType(type) + '.');
+    return context.buildGetGlobal(globalIndex, type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template &lt;class Context&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWASMFunctionParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WASMFunctionParser.h (190004 => 190005)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WASMFunctionParser.h        2015-09-19 01:26:32 UTC (rev 190004)
+++ trunk/Source/JavaScriptCore/wasm/WASMFunctionParser.h        2015-09-19 02:18:56 UTC (rev 190005)
</span><span class="lines">@@ -87,9 +87,6 @@
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseConstantPoolIndexExpressionI32(Context&amp;);
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseImmediateExpressionI32(Context&amp;, uint32_t immediate);
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseImmediateExpressionI32(Context&amp;);
</span><del>-    template &lt;class Context&gt; ContextExpression parseGetLocalExpressionI32(Context&amp;, uint32_t localIndex);
-    template &lt;class Context&gt; ContextExpression parseGetLocalExpressionI32(Context&amp;);
-    template &lt;class Context&gt; ContextExpression parseGetGlobalExpressionI32(Context&amp;);
</del><span class="cx">     template &lt;class Context&gt; ContextExpression parseUnaryExpressionI32(Context&amp;, WASMOpExpressionI32);
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseBinaryExpressionI32(Context&amp;, WASMOpExpressionI32);
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseRelationalI32ExpressionI32(Context&amp;, WASMOpExpressionI32);
</span><span class="lines">@@ -100,9 +97,6 @@
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseConstantPoolIndexExpressionF32(Context&amp;, uint32_t constantIndex);
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseConstantPoolIndexExpressionF32(Context&amp;);
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseImmediateExpressionF32(Context&amp;);
</span><del>-    template &lt;class Context&gt; ContextExpression parseGetLocalExpressionF32(Context&amp;, uint32_t localIndex);
-    template &lt;class Context&gt; ContextExpression parseGetLocalExpressionF32(Context&amp;);
-    template &lt;class Context&gt; ContextExpression parseGetGlobalExpressionF32(Context&amp;);
</del><span class="cx">     template &lt;class Context&gt; ContextExpression parseUnaryExpressionF32(Context&amp;, WASMOpExpressionF32);
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseBinaryExpressionF32(Context&amp;, WASMOpExpressionF32);
</span><span class="cx"> 
</span><span class="lines">@@ -110,16 +104,15 @@
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseConstantPoolIndexExpressionF64(Context&amp;, uint32_t constantIndex);
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseConstantPoolIndexExpressionF64(Context&amp;);
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseImmediateExpressionF64(Context&amp;);
</span><del>-    template &lt;class Context&gt; ContextExpression parseGetLocalExpressionF64(Context&amp;, uint32_t localIndex);
-    template &lt;class Context&gt; ContextExpression parseGetLocalExpressionF64(Context&amp;);
-    template &lt;class Context&gt; ContextExpression parseGetGlobalExpressionF64(Context&amp;);
</del><span class="cx">     template &lt;class Context&gt; ContextExpression parseUnaryExpressionF64(Context&amp;, WASMOpExpressionF64);
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseBinaryExpressionF64(Context&amp;, WASMOpExpressionF64);
</span><span class="cx"> 
</span><ins>+    template &lt;class Context&gt; ContextExpression parseGetLocalExpression(Context&amp;, WASMType, uint32_t localIndex);
+    template &lt;class Context&gt; ContextExpression parseGetLocalExpression(Context&amp;, WASMType);
+    template &lt;class Context&gt; ContextExpression parseGetGlobalExpression(Context&amp;, WASMType);
</ins><span class="cx">     template &lt;class Context&gt; ContextMemoryAddress parseMemoryAddress(Context&amp;, MemoryAccessOffsetMode);
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseLoad(Context&amp;, WASMExpressionType, WASMMemoryType, MemoryAccessOffsetMode, MemoryAccessConversion = MemoryAccessConversion::NoConversion);
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseStore(Context&amp;, WASMExpressionType, WASMMemoryType, MemoryAccessOffsetMode);
</span><del>-
</del><span class="cx">     template &lt;class Context&gt; ContextExpressionList parseCallArguments(Context&amp;, const Vector&lt;WASMType&gt;&amp; arguments);
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseCallInternal(Context&amp;, WASMExpressionType returnType);
</span><span class="cx">     template &lt;class Context&gt; ContextExpression parseCallIndirect(Context&amp;, WASMExpressionType returnType);
</span></span></pre>
</div>
</div>

</body>
</html>