builtins directory causes name conflict on Python 3
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Sep 2018 15:16:09 +0000 (15:16 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Sep 2018 15:16:09 +0000 (15:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189552

Patch by Mike Gorse <mgorse@suse.com> on 2018-09-14
Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

* CMakeLists.txt: builtins -> wkbuiltins.
* DerivedSources.make: builtins -> wkbuiltins.
* Scripts/generate-js-builtins.py: import wkbuiltins, rather than
  builtins.
* Scripts/wkbuiltins/__init__.py: Renamed from Source/JavaScriptCore/Scripts/builtins/__init__.py.
* Scripts/wkbuiltins/builtins_generate_combined_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py.
* Scripts/wkbuiltins/builtins_generate_internals_wrapper_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_implementation.py.
* Scripts/wkbuiltins/builtins_generate_separate_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py.
* Scripts/wkbuiltins/builtins_generate_separate_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py.
* Scripts/wkbuiltins/builtins_generate_wrapper_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_header.py.
* Scripts/wkbuiltins/builtins_generate_wrapper_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_implementation.py.
* Scripts/wkbuiltins/builtins_generator.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generator.py.
* Scripts/wkbuiltins/builtins_model.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_model.py.
* Scripts/wkbuiltins/builtins_templates.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_templates.py.
* Scripts/wkbuiltins/wkbuiltins.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins.py.
* JavaScriptCore.xcodeproj/project.pbxproj: Update for the renaming.

Source/WebCore:

No new tests (No behavior change).

* CMakeLists.txt: builtins -> wkbuiltins.
* DerivedSources.make: builtins -> wkbuiltins.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236005 268f45cc-cd09-0410-ab3c-d52691b4dbfc

21 files changed:
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/DerivedSources.make
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/Scripts/generate-js-builtins.py
Source/JavaScriptCore/Scripts/wkbuiltins/__init__.py [moved from Source/JavaScriptCore/Scripts/builtins/__init__.py with 72% similarity]
Source/JavaScriptCore/Scripts/wkbuiltins/builtins_generate_combined_header.py [moved from Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py with 100% similarity, mode: 0644]
Source/JavaScriptCore/Scripts/wkbuiltins/builtins_generate_combined_implementation.py [moved from Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_implementation.py with 100% similarity]
Source/JavaScriptCore/Scripts/wkbuiltins/builtins_generate_internals_wrapper_header.py [moved from Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_header.py with 100% similarity, mode: 0644]
Source/JavaScriptCore/Scripts/wkbuiltins/builtins_generate_internals_wrapper_implementation.py [moved from Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_implementation.py with 100% similarity, mode: 0644]
Source/JavaScriptCore/Scripts/wkbuiltins/builtins_generate_separate_header.py [moved from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py with 100% similarity, mode: 0644]
Source/JavaScriptCore/Scripts/wkbuiltins/builtins_generate_separate_implementation.py [moved from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py with 100% similarity]
Source/JavaScriptCore/Scripts/wkbuiltins/builtins_generate_wrapper_header.py [moved from Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_header.py with 100% similarity, mode: 0644]
Source/JavaScriptCore/Scripts/wkbuiltins/builtins_generate_wrapper_implementation.py [moved from Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_implementation.py with 100% similarity, mode: 0644]
Source/JavaScriptCore/Scripts/wkbuiltins/builtins_generator.py [moved from Source/JavaScriptCore/Scripts/builtins/builtins_generator.py with 100% similarity]
Source/JavaScriptCore/Scripts/wkbuiltins/builtins_model.py [moved from Source/JavaScriptCore/Scripts/builtins/builtins_model.py with 100% similarity, mode: 0644]
Source/JavaScriptCore/Scripts/wkbuiltins/builtins_templates.py [moved from Source/JavaScriptCore/Scripts/builtins/builtins_templates.py with 100% similarity]
Source/JavaScriptCore/Scripts/wkbuiltins/wkbuiltins.py [moved from Source/JavaScriptCore/Scripts/builtins/builtins.py with 87% similarity]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make

index 2fe7619..96e33a2 100644 (file)
@@ -136,7 +136,8 @@ set(JavaScriptCore_SCRIPTS_SOURCES_DIR "${JAVASCRIPTCORE_DIR}/Scripts")
 set(JavaScriptCore_SCRIPTS_SOURCES_PATHS
     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.pl
     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.py
-    ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/builtins/builtins*.py
+    ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/wkbuiltins/builtins*.py
+    ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/wkbuiltins/wkbuiltins.py
 )
 
 # Force JavaScriptCore to run scripts from the same staging path as WebCore.
@@ -1088,7 +1089,7 @@ add_custom_command(
 # JSCBuiltins
 
 set(BUILTINS_GENERATOR_SCRIPTS
-    ${JavaScriptCore_SCRIPTS_DIR}/builtins.py
+    ${JavaScriptCore_SCRIPTS_DIR}/wkbuiltins.py
     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generator.py
     ${JavaScriptCore_SCRIPTS_DIR}/builtins_model.py
     ${JavaScriptCore_SCRIPTS_DIR}/builtins_templates.py
index e7d4857..9b408ef 100644 (file)
@@ -1,3 +1,27 @@
+2018-09-14  Mike Gorse  <mgorse@suse.com>
+
+        builtins directory causes name conflict on Python 3
+        https://bugs.webkit.org/show_bug.cgi?id=189552
+
+        Reviewed by Michael Catanzaro.
+
+        * CMakeLists.txt: builtins -> wkbuiltins.
+        * DerivedSources.make: builtins -> wkbuiltins.
+        * Scripts/generate-js-builtins.py: import wkbuiltins, rather than
+          builtins.
+        * Scripts/wkbuiltins/__init__.py: Renamed from Source/JavaScriptCore/Scripts/builtins/__init__.py.
+        * Scripts/wkbuiltins/builtins_generate_combined_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py.
+        * Scripts/wkbuiltins/builtins_generate_internals_wrapper_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_implementation.py.
+        * Scripts/wkbuiltins/builtins_generate_separate_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py.
+        * Scripts/wkbuiltins/builtins_generate_separate_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py.
+        * Scripts/wkbuiltins/builtins_generate_wrapper_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_header.py.
+        * Scripts/wkbuiltins/builtins_generate_wrapper_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_implementation.py.
+        * Scripts/wkbuiltins/builtins_generator.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generator.py.
+        * Scripts/wkbuiltins/builtins_model.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_model.py.
+        * Scripts/wkbuiltins/builtins_templates.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_templates.py.
+        * Scripts/wkbuiltins/wkbuiltins.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins.py.
+        * JavaScriptCore.xcodeproj/project.pbxproj: Update for the renaming.
+
 2018-09-13  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
 
         [WebAssembly] Inline WasmContext accessor functions
index 6e3b42c..d1745c3 100644 (file)
@@ -73,19 +73,19 @@ all : \
 # JavaScript builtins.
 
 BUILTINS_GENERATOR_SCRIPTS = \
-    $(JavaScriptCore_SCRIPTS_DIR)/builtins/__init__.py \
-    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins.py \
-    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generator.py \
-    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_model.py \
-    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_templates.py \
-    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generate_combined_header.py \
-    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generate_combined_implementation.py \
-    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generate_separate_header.py \
-    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generate_separate_implementation.py \
-    ${JavaScriptCore_SCRIPTS_DIR}/builtins/builtins_generate_wrapper_header.py \
-    ${JavaScriptCore_SCRIPTS_DIR}/builtins/builtins_generate_wrapper_implementation.py \
-    ${JavaScriptCore_SCRIPTS_DIR}/builtins/builtins_generate_internals_wrapper_header.py \
-    ${JavaScriptCore_SCRIPTS_DIR}/builtins/builtins_generate_internals_wrapper_implementation.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/__init__.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/wkbuiltins.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/builtins_generator.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/builtins_model.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/builtins_templates.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/builtins_generate_combined_header.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/builtins_generate_combined_implementation.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/builtins_generate_separate_header.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/builtins_generate_separate_implementation.py \
+    ${JavaScriptCore_SCRIPTS_DIR}/wkbuiltins/builtins_generate_wrapper_header.py \
+    ${JavaScriptCore_SCRIPTS_DIR}/wkbuiltins/builtins_generate_wrapper_implementation.py \
+    ${JavaScriptCore_SCRIPTS_DIR}/wkbuiltins/builtins_generate_internals_wrapper_header.py \
+    ${JavaScriptCore_SCRIPTS_DIR}/wkbuiltins/builtins_generate_internals_wrapper_implementation.py \
     $(JavaScriptCore_SCRIPTS_DIR)/generate-js-builtins.py \
     $(JavaScriptCore_SCRIPTS_DIR)/lazywriter.py \
 #
index 70ca84d..9c5c50c 100644 (file)
                99DA00A31BD5993100F4575C /* builtins_generator.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA009A1BD5992700F4575C /* builtins_generator.py */; settings = {ATTRIBUTES = (Private, ); }; };
                99DA00A41BD5993100F4575C /* builtins_model.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA009B1BD5992700F4575C /* builtins_model.py */; settings = {ATTRIBUTES = (Private, ); }; };
                99DA00A51BD5993100F4575C /* builtins_templates.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA009C1BD5992700F4575C /* builtins_templates.py */; settings = {ATTRIBUTES = (Private, ); }; };
-               99DA00A61BD5993100F4575C /* builtins.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA009D1BD5992700F4575C /* builtins.py */; settings = {ATTRIBUTES = (Private, ); }; };
+               99DA00A61BD5993100F4575C /* wkbuiltins.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA009D1BD5992700F4575C /* wkbuiltins.py */; settings = {ATTRIBUTES = (Private, ); }; };
                99DA00A71BD5993100F4575C /* builtins_generate_combined_header.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA009E1BD5992700F4575C /* builtins_generate_combined_header.py */; settings = {ATTRIBUTES = (Private, ); }; };
                99DA00A81BD5993100F4575C /* builtins_generate_combined_implementation.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA009F1BD5992700F4575C /* builtins_generate_combined_implementation.py */; settings = {ATTRIBUTES = (Private, ); }; };
                99DA00A91BD5993100F4575C /* builtins_generate_separate_header.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA00A01BD5992700F4575C /* builtins_generate_separate_header.py */; settings = {ATTRIBUTES = (Private, ); }; };
                99DA009A1BD5992700F4575C /* builtins_generator.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_generator.py; sourceTree = "<group>"; };
                99DA009B1BD5992700F4575C /* builtins_model.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_model.py; sourceTree = "<group>"; };
                99DA009C1BD5992700F4575C /* builtins_templates.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_templates.py; sourceTree = "<group>"; };
-               99DA009D1BD5992700F4575C /* builtins.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins.py; sourceTree = "<group>"; };
+               99DA009D1BD5992700F4575C /* wkbuiltins.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = wkbuiltins.py; sourceTree = "<group>"; };
                99DA009E1BD5992700F4575C /* builtins_generate_combined_header.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_generate_combined_header.py; sourceTree = "<group>"; };
                99DA009F1BD5992700F4575C /* builtins_generate_combined_implementation.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_generate_combined_implementation.py; sourceTree = "<group>"; };
                99DA00A01BD5992700F4575C /* builtins_generate_separate_header.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_generate_separate_header.py; sourceTree = "<group>"; };
                        path = Scripts;
                        sourceTree = "<group>";
                };
-               99DA00971BD598E000F4575C /* builtins */ = {
+               99DA00971BD598E000F4575C /* wkbuiltins */ = {
                        isa = PBXGroup;
                        children = (
                                99DA00991BD5992700F4575C /* __init__.py */,
-                               99DA009D1BD5992700F4575C /* builtins.py */,
+                               99DA009D1BD5992700F4575C /* wkbuiltins.py */,
                                99DA009E1BD5992700F4575C /* builtins_generate_combined_header.py */,
                                99DA009F1BD5992700F4575C /* builtins_generate_combined_implementation.py */,
                                412952731D2CF6AC00E78B89 /* builtins_generate_internals_wrapper_header.py */,
                                99DA009B1BD5992700F4575C /* builtins_model.py */,
                                99DA009C1BD5992700F4575C /* builtins_templates.py */,
                        );
-                       path = builtins;
+                       path = wkbuiltins;
                        sourceTree = "<group>";
                };
                A513E5CC185FB992007E95AD /* agents */ = {
                                DE26E9031CB5DD0500D2BE82 /* BuiltinExecutableCreator.h in Headers */,
                                A7D801A51880D66E0026C39B /* BuiltinExecutables.h in Headers */,
                                A75EE9B218AAB7E200AAD043 /* BuiltinNames.h in Headers */,
-                               99DA00A61BD5993100F4575C /* builtins.py in Headers */,
+                               99DA00A61BD5993100F4575C /* wkbuiltins.py in Headers */,
                                99DA00A71BD5993100F4575C /* builtins_generate_combined_header.py in Headers */,
                                99DA00A81BD5993100F4575C /* builtins_generate_combined_implementation.py in Headers */,
                                412952771D2CF6BC00E78B89 /* builtins_generate_internals_wrapper_header.py in Headers */,
index c3e498a..48a9bb0 100644 (file)
@@ -37,7 +37,7 @@ log = logging.getLogger('global')
 
 from lazywriter import LazyFileWriter
 
-from builtins import *
+from wkbuiltins import *
 
 
 def concatenated_output_filename(builtins_files, framework_name, generate_only_wrapper_files):
@@ -1,3 +1,3 @@
 # Required for Python to search this directory for module files
 
-from builtins import *
+from wkbuiltins import *
@@ -1,4 +1,4 @@
-# This file is used to simulate the builtins/ directory when generate-js-builtins.py
+# This file is used to simulate the wkbuiltins/ directory when generate-js-builtins.py
 # is run from JavaScriptCore framework's private headers directory, which is flattened.
 
 from builtins_model import *
index b6ae949..29cef4a 100644 (file)
@@ -1870,7 +1870,7 @@ set(WebCore_BUILTINS_SOURCES
 )
 
 set(BUILTINS_GENERATOR_SCRIPTS
-    ${JavaScriptCore_SCRIPTS_DIR}/builtins.py
+    ${JavaScriptCore_SCRIPTS_DIR}/wkbuiltins.py
     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generator.py
     ${JavaScriptCore_SCRIPTS_DIR}/builtins_model.py
     ${JavaScriptCore_SCRIPTS_DIR}/builtins_templates.py
index 11cfad1..3e3d489 100644 (file)
@@ -1,3 +1,15 @@
+2018-09-14  Mike Gorse  <mgorse@suse.com>
+
+        builtins directory causes name conflict on Python 3
+        https://bugs.webkit.org/show_bug.cgi?id=189552
+
+        Reviewed by Michael Catanzaro.
+
+        No new tests (No behavior change).
+
+        * CMakeLists.txt: builtins -> wkbuiltins.
+        * DerivedSources.make: builtins -> wkbuiltins.
+
 2018-09-13  Ryosuke Niwa  <rniwa@webkit.org>
 
         Capturing event listeners are called during bubbling phase for shadow hosts
index 92cc15b..e6a427d 100644 (file)
@@ -1550,7 +1550,7 @@ WebCore_BUILTINS_SOURCES = \
 #
 
 BUILTINS_GENERATOR_SCRIPTS = \
-    $(JavaScriptCore_SCRIPTS_DIR)/builtins.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins.py \
     $(JavaScriptCore_SCRIPTS_DIR)/builtins_generator.py \
     $(JavaScriptCore_SCRIPTS_DIR)/builtins_model.py \
     $(JavaScriptCore_SCRIPTS_DIR)/builtins_templates.py \