<!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>[192250] 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/192250">192250</a></dd>
<dt>Author</dt> <dd>youenn.fablet@crf.canon.fr</dd>
<dt>Date</dt> <dd>2015-11-10 09:51:59 -0800 (Tue, 10 Nov 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove create_hash_table options and simplify build system
https://bugs.webkit.org/show_bug.cgi?id=151081

Reviewed by Darin Adler.

* CMakeLists.txt: Merged native and builtin object sources and removed create_hash_table options.
* DerivedSources.make: Ditto.
* create_hash_table: Removed -b and -i options.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreCMakeListstxt">trunk/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreDerivedSourcesmake">trunk/Source/JavaScriptCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceJavaScriptCorecreate_hash_table">trunk/Source/JavaScriptCore/create_hash_table</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/CMakeLists.txt (192249 => 192250)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2015-11-10 17:15:05 UTC (rev 192249)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2015-11-10 17:51:59 UTC (rev 192250)
</span><span class="lines">@@ -728,11 +728,14 @@
</span><span class="cx">     ${JavaScriptCore_RUNTIME_SOURCES}
</span><span class="cx"> )
</span><span class="cx"> 
</span><del>-set(JavaScriptCore_NATIVE_OBJECT_LUT_SOURCES
</del><ins>+set(JavaScriptCore_OBJECT_LUT_SOURCES
+    runtime/ArrayConstructor.cpp
+    runtime/ArrayIteratorPrototype.cpp
</ins><span class="cx">     runtime/BooleanPrototype.cpp
</span><span class="cx">     runtime/DateConstructor.cpp
</span><span class="cx">     runtime/DatePrototype.cpp
</span><span class="cx">     runtime/ErrorPrototype.cpp
</span><ins>+    runtime/InspectorInstrumentationObject.cpp
</ins><span class="cx">     runtime/IntlCollatorConstructor.cpp
</span><span class="cx">     runtime/IntlCollatorPrototype.cpp
</span><span class="cx">     runtime/IntlDateTimeFormatConstructor.cpp
</span><span class="lines">@@ -740,31 +743,22 @@
</span><span class="cx">     runtime/IntlNumberFormatConstructor.cpp
</span><span class="cx">     runtime/IntlNumberFormatPrototype.cpp
</span><span class="cx">     runtime/JSDataViewPrototype.cpp
</span><del>-    runtime/JSONObject.cpp
-    runtime/NumberConstructor.cpp
-    runtime/NumberPrototype.cpp
-    runtime/RegExpConstructor.cpp
-    runtime/RegExpPrototype.cpp
-    runtime/SymbolConstructor.cpp
-    runtime/SymbolPrototype.cpp
-)
-
-# If an object's implementation contains at least one builtin, then it must
-# be added to this section so it is generated with builtin-specific includes.
-
-set(JavaScriptCore_BUILTIN_OBJECT_LUT_SOURCES
-    runtime/ArrayConstructor.cpp
-    runtime/ArrayIteratorPrototype.cpp
-    runtime/InspectorInstrumentationObject.cpp
</del><span class="cx">     runtime/JSGlobalObject.cpp
</span><span class="cx">     runtime/JSInternalPromiseConstructor.cpp
</span><ins>+    runtime/JSONObject.cpp
</ins><span class="cx">     runtime/JSPromiseConstructor.cpp
</span><span class="cx">     runtime/JSPromisePrototype.cpp
</span><span class="cx">     runtime/ModuleLoaderObject.cpp
</span><ins>+    runtime/NumberConstructor.cpp
+    runtime/NumberPrototype.cpp
</ins><span class="cx">     runtime/ObjectConstructor.cpp
</span><span class="cx">     runtime/ReflectObject.cpp
</span><ins>+    runtime/RegExpConstructor.cpp
+    runtime/RegExpPrototype.cpp
</ins><span class="cx">     runtime/StringConstructor.cpp
</span><span class="cx">     runtime/StringIteratorPrototype.cpp
</span><ins>+    runtime/SymbolConstructor.cpp
+    runtime/SymbolPrototype.cpp
</ins><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> set(JavaScriptCore_LIBRARIES
</span><span class="lines">@@ -1034,13 +1028,12 @@
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><span class="cx"> set(HASH_LUT_GENERATOR ${CMAKE_CURRENT_SOURCE_DIR}/create_hash_table)
</span><del>-set(LUT_GENERATOR_FLAGS &quot;&quot;)
</del><span class="cx"> macro(GENERATE_HASH_LUT _input _output)
</span><span class="cx">     add_custom_command(
</span><span class="cx">         OUTPUT ${_output}
</span><span class="cx">         MAIN_DEPENDENCY ${HASH_LUT_GENERATOR}
</span><span class="cx">         DEPENDS ${_input}
</span><del>-        COMMAND ${PERL_EXECUTABLE} ${HASH_LUT_GENERATOR} ${LUT_GENERATOR_FLAGS} ${_input} &gt; ${_output}
</del><ins>+        COMMAND ${PERL_EXECUTABLE} ${HASH_LUT_GENERATOR} ${_input} &gt; ${_output}
</ins><span class="cx">         VERBATIM)
</span><span class="cx">     list(APPEND JavaScriptCore_HEADERS ${_output})
</span><span class="cx">     ADD_SOURCE_DEPENDENCIES(${_input} ${_output})
</span><span class="lines">@@ -1048,18 +1041,11 @@
</span><span class="cx"> 
</span><span class="cx"> # GENERATOR 1-A: LUT creator
</span><span class="cx"> 
</span><del>-foreach (_file ${JavaScriptCore_NATIVE_OBJECT_LUT_SOURCES})
</del><ins>+foreach (_file ${JavaScriptCore_OBJECT_LUT_SOURCES})
</ins><span class="cx">     get_filename_component(_name ${_file} NAME_WE)
</span><del>-    set(LUT_GENERATOR_FLAGS -i)
</del><span class="cx">     GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
</span><span class="cx"> endforeach ()
</span><span class="cx"> 
</span><del>-foreach (_file ${JavaScriptCore_BUILTIN_OBJECT_LUT_SOURCES})
-    get_filename_component(_name ${_file} NAME_WE)
-    set(LUT_GENERATOR_FLAGS -i -b)
-    GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
-endforeach ()
-
</del><span class="cx"> set(JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
</span><span class="cx">     API
</span><span class="cx">     assembler
</span><span class="lines">@@ -1088,7 +1074,6 @@
</span><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> # GENERATOR 1-B: particular LUT creator (for 1 file only)
</span><del>-set(LUT_GENERATOR_FLAGS )
</del><span class="cx"> GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h)
</span><span class="cx"> 
</span><span class="cx"> #GENERATOR: &quot;RegExpJitTables.h&quot;: tables used by Yarr
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (192249 => 192250)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-11-10 17:15:05 UTC (rev 192249)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-11-10 17:51:59 UTC (rev 192250)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2015-11-10  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
</span><span class="cx"> 
</span><ins>+        Remove create_hash_table options and simplify build system
+        https://bugs.webkit.org/show_bug.cgi?id=151081
+
+        Reviewed by Darin Adler.
+
+        * CMakeLists.txt: Merged native and builtin object sources and removed create_hash_table options.
+        * DerivedSources.make: Ditto.
+        * create_hash_table: Removed -b and -i options.
+
+2015-11-10  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
+
</ins><span class="cx">         create_hash_table should know whether a function is JSBuiltin or not.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=151016
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/DerivedSources.make (192249 => 192250)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/DerivedSources.make        2015-11-10 17:15:05 UTC (rev 192249)
+++ trunk/Source/JavaScriptCore/DerivedSources.make        2015-11-10 17:51:59 UTC (rev 192250)
</span><span class="lines">@@ -112,11 +112,14 @@
</span><span class="cx"> 
</span><span class="cx"> # Perfect hash lookup tables for JavaScript classes.
</span><span class="cx"> 
</span><del>-NATIVE_OBJECT_LUT_HEADERS = \
</del><ins>+OBJECT_LUT_HEADERS = \
+    ArrayConstructor.lut.h \
+    ArrayIteratorPrototype.lut.h \
</ins><span class="cx">     BooleanPrototype.lut.h \
</span><span class="cx">     DateConstructor.lut.h \
</span><span class="cx">     DatePrototype.lut.h \
</span><span class="cx">     ErrorPrototype.lut.h \
</span><ins>+    InspectorInstrumentationObject.lut.h \
</ins><span class="cx">     IntlCollatorConstructor.lut.h \
</span><span class="cx">     IntlCollatorPrototype.lut.h \
</span><span class="cx">     IntlDateTimeFormatConstructor.lut.h \
</span><span class="lines">@@ -124,40 +127,29 @@
</span><span class="cx">     IntlNumberFormatConstructor.lut.h \
</span><span class="cx">     IntlNumberFormatPrototype.lut.h \
</span><span class="cx">     JSDataViewPrototype.lut.h \
</span><del>-    JSONObject.lut.h \
-    NumberConstructor.lut.h \
-    NumberPrototype.lut.h \
-    RegExpConstructor.lut.h \
-    RegExpPrototype.lut.h \
-    SymbolConstructor.lut.h \
-    SymbolPrototype.lut.h \
-#
-
-# If an object's implementation contains at least one builtin, then it must
-# be added to this section so it is generated with builtin-specific includes.
-
-BUILTIN_OBJECT_LUT_HEADERS = \
-    ArrayConstructor.lut.h \
-    ArrayIteratorPrototype.lut.h \
-    InspectorInstrumentationObject.lut.h \
</del><span class="cx">     JSGlobalObject.lut.h \
</span><span class="cx">     JSInternalPromiseConstructor.lut.h \
</span><ins>+    JSONObject.lut.h \
</ins><span class="cx">     JSPromisePrototype.lut.h \
</span><span class="cx">     JSPromiseConstructor.lut.h \
</span><span class="cx">     ModuleLoaderObject.lut.h \
</span><ins>+    NumberConstructor.lut.h \
+    NumberPrototype.lut.h \
</ins><span class="cx">     ObjectConstructor.lut.h \
</span><span class="cx">     ReflectObject.lut.h \
</span><ins>+    RegExpConstructor.lut.h \
+    RegExpPrototype.lut.h \
</ins><span class="cx">     StringConstructor.lut.h \
</span><span class="cx">     StringIteratorPrototype.lut.h \
</span><ins>+    SymbolConstructor.lut.h \
+    SymbolPrototype.lut.h \
</ins><span class="cx"> #
</span><span class="cx"> 
</span><del>-$(NATIVE_OBJECT_LUT_HEADERS): %.lut.h : %.cpp $(JavaScriptCore)/create_hash_table
-        $(PERL) $(JavaScriptCore)/create_hash_table -i $&lt; &gt; $@
-$(BUILTIN_OBJECT_LUT_HEADERS): %.lut.h : %.cpp $(JavaScriptCore)/create_hash_table
-        $(PERL) $(JavaScriptCore)/create_hash_table -i -b $&lt; &gt; $@
</del><ins>+$(OBJECT_LUT_HEADERS): %.lut.h : %.cpp $(JavaScriptCore)/create_hash_table
+        $(PERL) $(JavaScriptCore)/create_hash_table $&lt; &gt; $@
</ins><span class="cx"> 
</span><span class="cx"> Lexer.lut.h: Keywords.table $(JavaScriptCore)/create_hash_table
</span><del>-        $(PERL) $(JavaScriptCore)/create_hash_table -i $&lt; &gt; $@
</del><ins>+        $(PERL) $(JavaScriptCore)/create_hash_table $&lt; &gt; $@
</ins><span class="cx"> 
</span><span class="cx"> # character tables for Yarr
</span><span class="cx"> 
</span><span class="lines">@@ -269,6 +261,5 @@
</span><span class="cx"> # Dynamically-defined targets are listed below. Static targets belong up top.
</span><span class="cx"> 
</span><span class="cx"> all : \
</span><del>-    $(BUILTIN_OBJECT_LUT_HEADERS) \
-    $(NATIVE_OBJECT_LUT_HEADERS) \
</del><ins>+    $(OBJECT_LUT_HEADERS) \
</ins><span class="cx"> #
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorecreate_hash_table"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/create_hash_table (192249 => 192250)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/create_hash_table        2015-11-10 17:15:05 UTC (rev 192249)
+++ trunk/Source/JavaScriptCore/create_hash_table        2015-11-10 17:51:59 UTC (rev 192250)
</span><span class="lines">@@ -25,15 +25,6 @@
</span><span class="cx"> use strict;
</span><span class="cx"> use Getopt::Long qw(:config pass_through);
</span><span class="cx"> 
</span><del>-my $includeLookup = 0;
-my $activateBuiltin = 0;
-my $includeBuiltin = 0;
-
-GetOptions('i|lookup' =&gt; \$includeLookup,    # Include &quot;Lookup.h&quot;.
-           'b|builtin' =&gt; \$activateBuiltin,  # Include JSCBuiltins.h and builtins support if needed.
-)
-or die(&quot;Unable to process command line options.&quot;);
-
</del><span class="cx"> my $file = shift @ARGV or die(&quot;Must provide source file as final argument.&quot;);
</span><span class="cx"> 
</span><span class="cx"> print STDERR &quot;Creating hashtable for $file\n&quot;;
</span><span class="lines">@@ -48,6 +39,7 @@
</span><span class="cx"> 
</span><span class="cx"> my $hasSetter = &quot;false&quot;;
</span><span class="cx"> 
</span><ins>+my $includeBuiltin = 0;
</ins><span class="cx"> my $inside = 0;
</span><span class="cx"> my $name;
</span><span class="cx"> my $pefectHashSize;
</span><span class="lines">@@ -94,7 +86,7 @@
</span><span class="cx">         push(@keys, $key);
</span><span class="cx">         push(@attrs, length($att) &gt; 0 ? $att : &quot;0&quot;);
</span><span class="cx"> 
</span><del>-        if ($activateBuiltin &amp;&amp; $val eq &quot;JSBuiltin&quot;) {
</del><ins>+        if ($val eq &quot;JSBuiltin&quot;) {
</ins><span class="cx">             $includeBuiltin = 1;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -266,7 +258,7 @@
</span><span class="cx"> 
</span><span class="cx">     print &quot;\n&quot;;
</span><span class="cx">     print &quot;#include \&quot;JSCBuiltins.h\&quot;\n&quot; if ($includeBuiltin);
</span><del>-    print &quot;#include \&quot;Lookup.h\&quot;\n&quot; if ($includeLookup);
</del><ins>+    print &quot;#include \&quot;Lookup.h\&quot;\n&quot;;
</ins><span class="cx">     print &quot;\n&quot;;
</span><span class="cx">     print &quot;namespace JSC {\n&quot;;
</span><span class="cx">     print &quot;\n&quot;;
</span><span class="lines">@@ -320,7 +312,7 @@
</span><span class="cx">             $intrinsic = &quot;RegExpTestIntrinsic&quot; if ($key eq &quot;test&quot;);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if ($values[$i]{&quot;type&quot;} eq &quot;Function&quot; &amp;&amp; $activateBuiltin &amp;&amp; $firstValue eq &quot;JSBuiltin&quot;)  {
</del><ins>+        if ($values[$i]{&quot;type&quot;} eq &quot;Function&quot; &amp;&amp; $firstValue eq &quot;JSBuiltin&quot;)  {
</ins><span class="cx">             my $tableHead = $name;
</span><span class="cx">             $tableHead =~ s/Table$//;
</span><span class="cx">             print &quot;   { \&quot;$key\&quot;, (($attrs[$i]) &amp; ~Function) | Builtin, $intrinsic, { (intptr_t)static_cast&lt;BuiltinGenerator&gt;(&quot; . $tableHead . ucfirst($key) . &quot;CodeGenerator), (intptr_t)$secondValue } },\n&quot;;
</span></span></pre>
</div>
</div>

</body>
</html>