Title: [143381] trunk/Source/_javascript_Core
Revision
143381
Author
[email protected]
Date
2013-02-19 13:53:57 -0800 (Tue, 19 Feb 2013)

Log Message

[GTK] Improve gyp build _javascript_Core code generation
https://bugs.webkit.org/show_bug.cgi?id=109969

Reviewed by Dirk Pranke.

Switch away from using DerivedSources.make when building _javascript_Core generated
sources. This bring a couple advantages, such as building the sources in parallel,
but requires us to list the generated sources more than once.

* _javascript_Core.gyp/_javascript_CoreGTK.gyp: Add rules for generating _javascript_Core sources.
* _javascript_Core.gyp/generate-derived-sources.sh: Added.
* _javascript_Core.gyp/redirect-stdout.sh: Added.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (143380 => 143381)


--- trunk/Source/_javascript_Core/ChangeLog	2013-02-19 21:51:19 UTC (rev 143380)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-02-19 21:53:57 UTC (rev 143381)
@@ -1,3 +1,18 @@
+2013-02-15  Martin Robinson  <[email protected]>
+
+        [GTK] Improve gyp build _javascript_Core code generation
+        https://bugs.webkit.org/show_bug.cgi?id=109969
+
+        Reviewed by Dirk Pranke.
+
+        Switch away from using DerivedSources.make when building _javascript_Core generated
+        sources. This bring a couple advantages, such as building the sources in parallel,
+        but requires us to list the generated sources more than once.
+
+        * _javascript_Core.gyp/_javascript_CoreGTK.gyp: Add rules for generating _javascript_Core sources.
+        * _javascript_Core.gyp/generate-derived-sources.sh: Added.
+        * _javascript_Core.gyp/redirect-stdout.sh: Added.
+
 2013-02-19  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r143348.

Modified: trunk/Source/_javascript_Core/_javascript_Core.gyp/_javascript_CoreGTK.gyp (143380 => 143381)


--- trunk/Source/_javascript_Core/_javascript_Core.gyp/_javascript_CoreGTK.gyp	2013-02-19 21:51:19 UTC (rev 143380)
+++ trunk/Source/_javascript_Core/_javascript_Core.gyp/_javascript_CoreGTK.gyp	2013-02-19 21:53:57 UTC (rev 143381)
@@ -70,13 +70,69 @@
       ],
     },
     {
+      'target_name': 'GenerateLUTs',
+      'type': 'none',
+      'sources': [
+          '../runtime/ArrayConstructor.cpp',
+          '../runtime/ArrayPrototype.cpp',
+          '../runtime/BooleanPrototype.cpp',
+          '../runtime/DateConstructor.cpp',
+          '../runtime/DatePrototype.cpp',
+          '../runtime/ErrorPrototype.cpp',
+          '../runtime/JSONObject.cpp',
+          '../runtime/JSGlobalObject.cpp',
+          '../runtime/MathObject.cpp',
+          '../runtime/NamePrototype.cpp',
+          '../runtime/NumberConstructor.cpp',
+          '../runtime/NumberPrototype.cpp',
+          '../runtime/ObjectConstructor.cpp',
+          '../runtime/ObjectPrototype.cpp',
+          '../runtime/RegExpConstructor.cpp',
+          '../runtime/RegExpPrototype.cpp',
+          '../runtime/RegExpObject.cpp',
+          '../runtime/StringConstructor.cpp',
+          '../runtime/StringPrototype.cpp',
+      ],
+      'rules' : [
+        {
+          'rule_name': 'GenerateLUT',
+          'extension': 'cpp',
+          'inputs': [ '<(_javascript_Core)/create_hash_table', ],
+          'outputs': [
+            '<(PRODUCT_DIR)/DerivedSources/_javascript_Core/<(RULE_INPUT_ROOT).lut.h',
+          ],
+          'action': [
+            './redirect-stdout.sh',
+            '<(PRODUCT_DIR)/DerivedSources/_javascript_Core/<(RULE_INPUT_ROOT).lut.h',
+            'perl', '<@(_inputs)', '<(RULE_INPUT_PATH)', '-i',
+          ],
+        }
+      ],
+      'actions': [
+        {
+          'action_name': 'GenerateLexerLUT',
+          'inputs': [
+              '<(_javascript_Core)/create_hash_table',
+              '<(_javascript_Core)/parser/Keywords.table',
+           ],
+          'outputs': [ '<(PRODUCT_DIR)/DerivedSources/_javascript_Core/Lexer.lut.h', ],
+          'action': [
+            './redirect-stdout.sh',
+            '<(PRODUCT_DIR)/DerivedSources/_javascript_Core/Lexer.lut.h',
+            'perl', '<@(_inputs)',
+          ],
+        },
+      ],
+    },
+    {
       'target_name': 'libjavascriptcoregtk',
         'type': 'shared_library',
         'dependencies': [
+          '<(Dependencies):glib',
+          '<(Dependencies):icu',
           '<(Source)/WTF/WTF.gyp/WTFGTK.gyp:wtf',
+          'GenerateLUTs',
           'LLIntOffsetExtractor',
-          '<(Dependencies):glib',
-          '<(Dependencies):icu',
         ],
         'product_extension': 'so.<@(_javascript_core_soname_version)',
         'product_name': '_javascript_coregtk-<@(api_version)',
@@ -94,17 +150,6 @@
         ],
       'actions': [
         {
-          'action_name': 'Generate Derived Sources',
-          'inputs': [
-            '<(_javascript_Core)/DerivedSources.make',
-            'generate-derived-sources.sh',
-          ],
-          'outputs': [
-            '<@(_javascript_core_derived_source_files)',
-          ],
-          'action': ['sh', 'generate-derived-sources.sh', '<@(project_dir)', '<(PRODUCT_DIR)/DerivedSources/_javascript_Core'],
-        },
-        {
           'action_name': 'llintassembly_header_generation',
           'inputs': [
             '<(_javascript_Core)/offlineasm/asm.rb',
@@ -116,6 +161,29 @@
           ],
           'action': ['ruby', '<@(_inputs)', '<@(_outputs)'],
         },
+        {
+          'action_name': 'GenerateRegExpJitTables',
+          'inputs': [ '<(_javascript_Core)/create_regex_tables', ],
+          'outputs': [ '<(PRODUCT_DIR)/DerivedSources/_javascript_Core/RegExpJitTables.h', ],
+          'action': [
+            './redirect-stdout.sh',
+            '<(PRODUCT_DIR)/DerivedSources/_javascript_Core/RegExpJitTables.h',
+            'python', '<@(_inputs)'
+          ],
+        },
+        {
+          'action_name': 'GenerateKeywordLookup',
+          'inputs': [
+            '<(_javascript_Core)/KeywordLookupGenerator.py',
+            '<(_javascript_Core)/parser/Keywords.table',
+          ],
+          'outputs': [ '<(PRODUCT_DIR)/DerivedSources/_javascript_Core/KeywordLookup.h', ],
+          'action': [
+            './redirect-stdout.sh',
+            '<(PRODUCT_DIR)/DerivedSources/_javascript_Core/KeywordLookup.h',
+            'python', '<@(_inputs)'
+          ],
+        },
       ],
     },
     {

Deleted: trunk/Source/_javascript_Core/_javascript_Core.gyp/generate-derived-sources.sh (143380 => 143381)


--- trunk/Source/_javascript_Core/_javascript_Core.gyp/generate-derived-sources.sh	2013-02-19 21:51:19 UTC (rev 143380)
+++ trunk/Source/_javascript_Core/_javascript_Core.gyp/generate-derived-sources.sh	2013-02-19 21:53:57 UTC (rev 143381)
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-abspath () {
-    case "$1" in /*)
-        printf "%s\n" "$1";;
-    *)
-        printf "%s\n" "$PWD/$1";;
-    esac;
-}
-
-_javascript_Core=`abspath $1`
-cd $2
-echo `abspath $2`
-make --no-builtin-rules -f "$_javascript_Core/DerivedSources.make" _javascript_Core=$_javascript_Core
-

Added: trunk/Source/_javascript_Core/_javascript_Core.gyp/redirect-stdout.sh (0 => 143381)


--- trunk/Source/_javascript_Core/_javascript_Core.gyp/redirect-stdout.sh	                        (rev 0)
+++ trunk/Source/_javascript_Core/_javascript_Core.gyp/redirect-stdout.sh	2013-02-19 21:53:57 UTC (rev 143381)
@@ -0,0 +1,4 @@
+#!/bin/sh
+OUTPUT_FILE=$1
+shift
+$@ > $OUTPUT_FILE
Property changes on: trunk/Source/_javascript_Core/_javascript_Core.gyp/redirect-stdout.sh
___________________________________________________________________

Added: svn:executable

Added: svn:eol-style

_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to