<!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>[167174] 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/167174">167174</a></dd>
<dt>Author</dt> <dd>burg@cs.washington.edu</dd>
<dt>Date</dt> <dd>2014-04-11 17:25:06 -0700 (Fri, 11 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Replay: code generator should consider enclosing class when computing duplicate type names
https://bugs.webkit.org/show_bug.cgi?id=131554

Reviewed by Timothy Hatcher.

We need to prepend an enum's enclosing class, if any, so that multiple enums with the same name
can coexist without triggering a &quot;duplicate types&quot; error. Now, such enums must be referenced
by the enclosing class and enum name.

Added tests for the new syntax, and rebaselined one test to reflect a previous patch's change.

* replay/scripts/CodeGeneratorReplayInputs.py:
(Type.type_name): Prepend the enclosing class name.
(Type.type_name.is):
* replay/scripts/tests/expected/fail-on-duplicate-enum-type.json-error: Added.
* replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp: Added.
* replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.h: Added.
* replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h: Rebaseline.
* replay/scripts/tests/fail-on-duplicate-enum-type.json: Added.
* replay/scripts/tests/generate-enums-with-same-base-name.json: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayscriptsCodeGeneratorReplayInputspy">trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateinputwithvectormembersjsonTestReplayInputsh">trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorereplayscriptstestsexpectedfailonduplicateenumtypejsonerror">trunk/Source/JavaScriptCore/replay/scripts/tests/expected/fail-on-duplicate-enum-type.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateenumswithsamebasenamejsonTestReplayInputscpp">trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateenumswithsamebasenamejsonTestReplayInputsh">trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.h</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayscriptstestsfailonduplicateenumtypejson">trunk/Source/JavaScriptCore/replay/scripts/tests/fail-on-duplicate-enum-type.json</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayscriptstestsgenerateenumswithsamebasenamejson">trunk/Source/JavaScriptCore/replay/scripts/tests/generate-enums-with-same-base-name.json</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (167173 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-04-12 00:19:24 UTC (rev 167173)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-04-11  Brian J. Burg  &lt;burg@cs.washington.edu&gt;
+
+        Web Replay: code generator should consider enclosing class when computing duplicate type names
+        https://bugs.webkit.org/show_bug.cgi?id=131554
+
+        Reviewed by Timothy Hatcher.
+
+        We need to prepend an enum's enclosing class, if any, so that multiple enums with the same name
+        can coexist without triggering a &quot;duplicate types&quot; error. Now, such enums must be referenced
+        by the enclosing class and enum name.
+
+        Added tests for the new syntax, and rebaselined one test to reflect a previous patch's change.
+
+        * replay/scripts/CodeGeneratorReplayInputs.py:
+        (Type.type_name): Prepend the enclosing class name.
+        (Type.type_name.is):
+        * replay/scripts/tests/expected/fail-on-duplicate-enum-type.json-error: Added.
+        * replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp: Added.
+        * replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.h: Added.
+        * replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h: Rebaseline.
+        * replay/scripts/tests/fail-on-duplicate-enum-type.json: Added.
+        * replay/scripts/tests/generate-enums-with-same-base-name.json: Added.
+
</ins><span class="cx"> 2014-04-11  Gavin Barraclough  &lt;baraclough@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rollout - Rewrite Function.bind as a builtin
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptsCodeGeneratorReplayInputspy"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py (167173 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py        2014-04-12 00:19:24 UTC (rev 167173)
+++ trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -330,7 +330,12 @@
</span><span class="cx">         return &quot;::&quot;.join(components)
</span><span class="cx"> 
</span><span class="cx">     def type_name(self, qualified=False):
</span><del>-        return &quot;%s%s&quot; % (self.qualified_prefix(), self._name) if qualified else self._name
</del><ins>+        if qualified:
+            return &quot;%s%s&quot; % (self.qualified_prefix(), self._name)
+        elif self.enclosing_class is not None:
+            return &quot;%s::%s&quot; % (self.enclosing_class, self._name)
+        else:
+            return self._name
</ins><span class="cx"> 
</span><span class="cx">     def storage_type(self, qualified=False):
</span><span class="cx">         if self.mode == TypeModes.OWNED:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsexpectedfailonduplicateenumtypejsonerror"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/replay/scripts/tests/expected/fail-on-duplicate-enum-type.json-error (0 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/expected/fail-on-duplicate-enum-type.json-error                                (rev 0)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/expected/fail-on-duplicate-enum-type.json-error        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: Duplicate type with name: PlatformEvent::Type
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateenumswithsamebasenamejsonTestReplayInputscpp"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp (0 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp                                (rev 0)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -0,0 +1,141 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS
+ * IS&quot; 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 THE COPYRIGHT
+ * HOLDER 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-enums-with-same-base-name.json
+// by the script: JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py
+
+#include &quot;config.h&quot;
+#include &quot;generate-enums-with-same-base-name.json-TestReplayInputs.h&quot;
+
+#if ENABLE(WEB_REPLAY)
+#include &quot;InternalNamespaceImplIncludeDummy.h&quot;
+#include &lt;platform/ExternalNamespaceImplIncludeDummy.h&gt;
+
+namespace Test {
+FormCombo::FormCombo(PlatformEvent::Type eventType, FormData::Type formType)
+    : NondeterministicInput&lt;FormCombo&gt;()
+    , m_eventType(eventType)
+    , m_formType(formType)
+{
+}
+
+FormCombo::~FormCombo()
+{
+}
+} // namespace Test
+
+namespace JSC {
+const AtomicString&amp; InputTraits&lt;Test::FormCombo&gt;::type()
+{
+    static NeverDestroyed&lt;const AtomicString&gt; type(&quot;FormCombo&quot;, AtomicString::ConstructFromLiteral);
+    return type;
+}
+
+void InputTraits&lt;Test::FormCombo&gt;::encode(EncodedValue&amp; encodedValue, const Test::FormCombo&amp; input)
+{
+    encodedValue.put&lt;PlatformEvent::Type&gt;(ASCIILiteral(&quot;eventType&quot;), input.eventType());
+    encodedValue.put&lt;WebCore::FormData::Type&gt;(ASCIILiteral(&quot;formType&quot;), input.formType());
+}
+
+bool InputTraits&lt;Test::FormCombo&gt;::decode(EncodedValue&amp; encodedValue, std::unique_ptr&lt;Test::FormCombo&gt;&amp; input)
+{
+    PlatformEvent::Type eventType;
+    if (!encodedValue.get&lt;PlatformEvent::Type&gt;(ASCIILiteral(&quot;eventType&quot;), eventType))
+        return false;
+
+    WebCore::FormData::Type formType;
+    if (!encodedValue.get&lt;WebCore::FormData::Type&gt;(ASCIILiteral(&quot;formType&quot;), formType))
+        return false;
+
+    input = std::make_unique&lt;Test::FormCombo&gt;(eventType, formType);
+    return true;
+}
+EncodedValue EncodingTraits&lt;WebCore::FormData::Type&gt;::encodeValue(const WebCore::FormData::Type&amp; enumValue)
+{
+    EncodedValue encodedValue = EncodedValue::createArray();
+    if (enumValue &amp; WebCore::FormData::Text) {
+        encodedValue.append&lt;String&gt;(ASCIILiteral(&quot;Text&quot;));
+        if (enumValue == WebCore::FormData::Text)
+            return encodedValue;
+    }
+    if (enumValue &amp; WebCore::FormData::Blob) {
+        encodedValue.append&lt;String&gt;(ASCIILiteral(&quot;Blob&quot;));
+        if (enumValue == WebCore::FormData::Blob)
+            return encodedValue;
+    }
+    return encodedValue;
+}
+
+bool EncodingTraits&lt;WebCore::FormData::Type&gt;::decodeValue(EncodedValue&amp; encodedValue, WebCore::FormData::Type&amp; enumValue)
+{
+    Vector&lt;String&gt; enumStrings;
+    if (!EncodingTraits&lt;Vector&lt;String&gt;&gt;::decodeValue(encodedValue, enumStrings))
+        return false;
+
+    for (String enumString : enumStrings) {
+        if (enumString == &quot;Text&quot;)
+            enumValue = static_cast&lt;WebCore::FormData::Type&gt;(enumValue | WebCore::FormData::Text);
+        if (enumString == &quot;Blob&quot;)
+            enumValue = static_cast&lt;WebCore::FormData::Type&gt;(enumValue | WebCore::FormData::Blob);
+    }
+
+    return true;
+}
+
+EncodedValue EncodingTraits&lt;PlatformEvent::Type&gt;::encodeValue(const PlatformEvent::Type&amp; enumValue)
+{
+    EncodedValue encodedValue = EncodedValue::createArray();
+    if (enumValue &amp; PlatformEvent::Mouse) {
+        encodedValue.append&lt;String&gt;(ASCIILiteral(&quot;Mouse&quot;));
+        if (enumValue == PlatformEvent::Mouse)
+            return encodedValue;
+    }
+    if (enumValue &amp; PlatformEvent::Keyboard) {
+        encodedValue.append&lt;String&gt;(ASCIILiteral(&quot;Keyboard&quot;));
+        if (enumValue == PlatformEvent::Keyboard)
+            return encodedValue;
+    }
+    return encodedValue;
+}
+
+bool EncodingTraits&lt;PlatformEvent::Type&gt;::decodeValue(EncodedValue&amp; encodedValue, PlatformEvent::Type&amp; enumValue)
+{
+    Vector&lt;String&gt; enumStrings;
+    if (!EncodingTraits&lt;Vector&lt;String&gt;&gt;::decodeValue(encodedValue, enumStrings))
+        return false;
+
+    for (String enumString : enumStrings) {
+        if (enumString == &quot;Mouse&quot;)
+            enumValue = static_cast&lt;PlatformEvent::Type&gt;(enumValue | PlatformEvent::Mouse);
+        if (enumString == &quot;Keyboard&quot;)
+            enumValue = static_cast&lt;PlatformEvent::Type&gt;(enumValue | PlatformEvent::Keyboard);
+    }
+
+    return true;
+}
+} // namespace JSC
+
+#endif // ENABLE(WEB_REPLAY)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateenumswithsamebasenamejsonTestReplayInputshfromrev167173trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateinputwithvectormembersjsonTestReplayInputsh"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.h (from rev 167173, trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h) (0 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.h                                (rev 0)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.h        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -0,0 +1,89 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS
+ * IS&quot; 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 THE COPYRIGHT
+ * HOLDER 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-enums-with-same-base-name.json
+// by the script: JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py
+
+#ifndef generate_enums_with_same_base_name_json_TestReplayInputs_h
+#define generate_enums_with_same_base_name_json_TestReplayInputs_h
+
+#if ENABLE(WEB_REPLAY)
+#include &quot;InternalNamespaceHeaderIncludeDummy.h&quot;
+#include &lt;platform/ExternalNamespaceHeaderIncludeDummy.h&gt;
+#include &lt;replay/FormData.h&gt;
+#include &lt;replay/PlatformEvent.h&gt;
+
+
+
+namespace Test {
+class FormCombo;
+} // namespace Test
+
+namespace JSC {
+template&lt;&gt; struct InputTraits&lt;Test::FormCombo&gt; {
+    static InputQueue queue() { return InputQueue::ScriptMemoizedData; }
+    static const AtomicString&amp; type();
+
+    static void encode(JSC::EncodedValue&amp;, const Test::FormCombo&amp;);
+    static bool decode(JSC::EncodedValue&amp;, std::unique_ptr&lt;Test::FormCombo&gt;&amp;);
+};
+template&lt;&gt; struct EncodingTraits&lt;WebCore::FormData::Type&gt; {
+    typedef WebCore::FormData::Type DecodedType;
+
+    static EncodedValue encodeValue(const WebCore::FormData::Type&amp; value);
+    static bool decodeValue(EncodedValue&amp;, WebCore::FormData::Type&amp; value);
+};
+
+template&lt;&gt; struct EncodingTraits&lt;PlatformEvent::Type&gt; {
+    typedef PlatformEvent::Type DecodedType;
+
+    static EncodedValue encodeValue(const PlatformEvent::Type&amp; value);
+    static bool decodeValue(EncodedValue&amp;, PlatformEvent::Type&amp; value);
+};
+} // namespace JSC
+
+namespace Test {
+class FormCombo : public NondeterministicInput&lt;FormCombo&gt; {
+public:
+    FormCombo(PlatformEvent::Type eventType, FormData::Type formType);
+    virtual ~FormCombo();
+
+    PlatformEvent::Type eventType() const { return m_eventType; }
+    FormData::Type formType() const { return m_formType; }
+private:
+    PlatformEvent::Type m_eventType;
+    FormData::Type m_formType;
+};
+} // namespace Test
+
+#define TEST_REPLAY_INPUT_NAMES_FOR_EACH(macro) \
+    macro(FormCombo) \
+    \
+// end of TEST_REPLAY_INPUT_NAMES_FOR_EACH
+
+#endif // ENABLE(WEB_REPLAY)
+
+#endif // generate-enums-with-same-base-name.json-TestReplayInputs_h
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateinputwithvectormembersjsonTestReplayInputsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h (167173 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h        2014-04-12 00:19:24 UTC (rev 167173)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -34,15 +34,8 @@
</span><span class="cx"> #include &quot;InternalNamespaceHeaderIncludeDummy.h&quot;
</span><span class="cx"> #include &lt;platform/ExternalNamespaceHeaderIncludeDummy.h&gt;
</span><span class="cx"> 
</span><del>-namespace WebCore {
-class WebThing;
-}
</del><span class="cx"> 
</span><del>-namespace JSC {
-class JSThing;
-}
</del><span class="cx"> 
</span><del>-
</del><span class="cx"> namespace Test {
</span><span class="cx"> class ArrayOfThings;
</span><span class="cx"> } // namespace Test
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsfailonduplicateenumtypejson"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/replay/scripts/tests/fail-on-duplicate-enum-type.json (0 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/fail-on-duplicate-enum-type.json                                (rev 0)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/fail-on-duplicate-enum-type.json        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+{
+    &quot;types&quot;: {
+        &quot;JavaScriptCore&quot;: [
+            {
+                &quot;name&quot;: &quot;Type&quot;, &quot;mode&quot;: &quot;SCALAR&quot;, &quot;storage&quot;: &quot;uint64_t&quot;,
+                &quot;enclosing_class&quot;: &quot;PlatformEvent&quot;,
+                &quot;flags&quot;: [&quot;ENUM&quot;],
+                &quot;values&quot;: [&quot;Mouse&quot;, &quot;Keyboard&quot;],
+                &quot;header&quot;: &quot;replay/PlatformEvent.h&quot;
+            }
+        ],
+        &quot;WebCore&quot;: [
+            {
+                &quot;name&quot;: &quot;Type&quot;, &quot;mode&quot;: &quot;SCALAR&quot;, &quot;storage&quot;: &quot;uint64_t&quot;,
+                &quot;enclosing_class&quot;: &quot;PlatformEvent&quot;,
+                &quot;flags&quot;: [&quot;ENUM&quot;],
+                &quot;values&quot;: [&quot;Mouse&quot;, &quot;Keyboard&quot;],
+                &quot;header&quot;: &quot;replay/PlatformEvent.h&quot;
+            }
+        ]
+    },
+
+    &quot;inputs&quot;: [
+        {
+            &quot;name&quot;: &quot;FormCombo&quot;,
+            &quot;description&quot;: &quot;Combines an event type and form data type.&quot;,
+            &quot;queue&quot;: &quot;SCRIPT_MEMOIZED&quot;,
+            &quot;members&quot;: [
+                { &quot;name&quot;: &quot;eventType&quot;, &quot;type&quot;: &quot;PlatformEvent::Type&quot; }
+            ]
+        }
+    ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsgenerateenumswithsamebasenamejson"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/replay/scripts/tests/generate-enums-with-same-base-name.json (0 => 167174)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/generate-enums-with-same-base-name.json                                (rev 0)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/generate-enums-with-same-base-name.json        2014-04-12 00:25:06 UTC (rev 167174)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+{
+    &quot;types&quot;: {
+        &quot;JavaScriptCore&quot;: [
+            {
+                &quot;name&quot;: &quot;Type&quot;, &quot;mode&quot;: &quot;SCALAR&quot;, &quot;storage&quot;: &quot;uint64_t&quot;,
+                &quot;enclosing_class&quot;: &quot;PlatformEvent&quot;,
+                &quot;flags&quot;: [&quot;ENUM&quot;],
+                &quot;values&quot;: [&quot;Mouse&quot;, &quot;Keyboard&quot;],
+                &quot;header&quot;: &quot;replay/PlatformEvent.h&quot;
+            }
+        ],
+        &quot;WebCore&quot;: [
+            {
+                &quot;name&quot;: &quot;Type&quot;, &quot;mode&quot;: &quot;SCALAR&quot;, &quot;storage&quot;: &quot;uint64_t&quot;,
+                &quot;enclosing_class&quot;: &quot;FormData&quot;,
+                &quot;flags&quot;: [&quot;ENUM&quot;],
+                &quot;values&quot;: [&quot;Text&quot;, &quot;Blob&quot;],
+                &quot;header&quot;: &quot;replay/FormData.h&quot;
+            }
+        ]
+    },
+
+    &quot;inputs&quot;: [
+        {
+            &quot;name&quot;: &quot;FormCombo&quot;,
+            &quot;description&quot;: &quot;Combines an event type and form data type.&quot;,
+            &quot;queue&quot;: &quot;SCRIPT_MEMOIZED&quot;,
+            &quot;members&quot;: [
+                { &quot;name&quot;: &quot;eventType&quot;, &quot;type&quot;: &quot;PlatformEvent::Type&quot; },
+                { &quot;name&quot;: &quot;formType&quot;, &quot;type&quot;: &quot;FormData::Type&quot; }
+            ]
+        }
+    ]
+}
</ins></span></pre>
</div>
</div>

</body>
</html>