summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-09-05 13:28:53 +0000
committerMoonchild <moonchild@palemoon.org>2022-09-05 13:28:53 +0000
commitf4e39fc6f45e65d2bbaf3e4e968c86c8d993730f (patch)
treefe80e06b0c94c17fc1e817f2292547cc1685fbc0
parentd10904010a3527c92a6cc0461a582c31521697b8 (diff)
downloaduxp-f4e39fc6f45e65d2bbaf3e4e968c86c8d993730f.tar.gz
Revert "Issue #1676 - Part 4: Split builtin sources out of js/src/moz.build"
-rw-r--r--js/src/builtin/moz.build73
-rw-r--r--js/src/moz.build64
2 files changed, 60 insertions, 77 deletions
diff --git a/js/src/builtin/moz.build b/js/src/builtin/moz.build
deleted file mode 100644
index ebf9318db2..0000000000
--- a/js/src/builtin/moz.build
+++ /dev/null
@@ -1,73 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-include('../js-config.mozbuild')
-include('../js-cxxflags.mozbuild')
-
-FINAL_LIBRARY = "js"
-
-# Includes should be relative to parent path
-LOCAL_INCLUDES += ["!..", ".."]
-
-SOURCES += [
- 'AtomicsObject.cpp',
- 'Eval.cpp',
- 'Intl.cpp',
- 'MapObject.cpp',
- 'ModuleObject.cpp',
- 'Object.cpp',
- 'Profilers.cpp',
- 'Promise.cpp',
- 'Reflect.cpp',
- 'ReflectParse.cpp',
- 'RegExp.cpp',
- 'SIMD.cpp',
- 'SymbolObject.cpp',
- 'TestingFunctions.cpp',
- 'TypedObject.cpp',
- 'WeakMapObject.cpp',
- 'WeakSetObject.cpp',
-]
-
-if CONFIG['_MSC_VER']:
- if CONFIG['CPU_ARCH'] == 'x86':
- SOURCES['RegExp.cpp'].no_pgo = True # Bug 772303
-
-# Prepare self-hosted JS code for embedding
-GENERATED_FILES += [('selfhosted.out.h', 'selfhosted.js')]
-selfhosted = GENERATED_FILES[('selfhosted.out.h', 'selfhosted.js')]
-selfhosted.script = 'embedjs.py:generate_selfhosted'
-selfhosted.inputs = [
- '../js.msg',
- 'TypedObjectConstants.h',
- 'SelfHostingDefines.h',
- 'Utilities.js',
- 'Array.js',
- 'AsyncIteration.js',
- 'Classes.js',
- 'Date.js',
- 'Error.js',
- 'Function.js',
- 'Generator.js',
- 'Intl.js',
- 'IntlData.js',
- 'Iterator.js',
- 'Map.js',
- 'Module.js',
- 'Number.js',
- 'Object.js',
- 'Promise.js',
- 'Reflect.js',
- 'RegExp.js',
- 'RegExpGlobalReplaceOpt.h.js',
- 'RegExpLocalReplaceOpt.h.js',
- 'String.js',
- 'Set.js',
- 'Sorting.js',
- 'TypedArray.js',
- 'TypedObject.js',
- 'WeakMap.js',
- 'WeakSet.js',
-]
diff --git a/js/src/moz.build b/js/src/moz.build
index 22b8d01992..93e1a4ec50 100644
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -7,9 +7,7 @@ include('js-config.mozbuild')
include('js-cxxflags.mozbuild')
include('js-testing.mozbuild')
-DIRS += [
- 'builtin',
-]
+FILES_PER_UNIFIED_FILE = 6
if CONFIG['JS_BUNDLED_EDITLINE']:
DIRS += ['editline']
@@ -117,6 +115,22 @@ EXPORTS.js += [
]
SOURCES += [
+ 'builtin/AtomicsObject.cpp',
+ 'builtin/Eval.cpp',
+ 'builtin/Intl.cpp',
+ 'builtin/MapObject.cpp',
+ 'builtin/ModuleObject.cpp',
+ 'builtin/Object.cpp',
+ 'builtin/Profilers.cpp',
+ 'builtin/Promise.cpp',
+ 'builtin/Reflect.cpp',
+ 'builtin/ReflectParse.cpp',
+ 'builtin/SIMD.cpp',
+ 'builtin/SymbolObject.cpp',
+ 'builtin/TestingFunctions.cpp',
+ 'builtin/TypedObject.cpp',
+ 'builtin/WeakMapObject.cpp',
+ 'builtin/WeakSetObject.cpp',
'devtools/sharkctl.cpp',
'ds/LifoAlloc.cpp',
'ds/MemoryProtectionExceptionHandler.cpp',
@@ -331,6 +345,8 @@ SOURCES += [
# jsarray.cpp and jsatom.cpp cannot be built in unified mode because
# xpcshell is broken during packaging when compiled with gcc-4.8.2
+# builtin/RegExp.cpp cannot be built in unified mode because it is built
+# without PGO
# frontend/Parser.cpp cannot be built in unified mode because of explicit
# template instantiations.
# jsdtoa.cpp cannot be built in unified mode because we want to suppress
@@ -343,6 +359,7 @@ SOURCES += [
# instantiations may or may not be needed depending on what it gets bundled
# with.
SOURCES += [
+ 'builtin/RegExp.cpp',
'frontend/Parser.cpp',
'gc/StoreBuffer.cpp',
'jsarray.cpp',
@@ -602,7 +619,9 @@ USE_LIBS += [
if CONFIG['_MSC_VER']:
- if CONFIG['CPU_ARCH'] == 'x86_64' and CONFIG['JS_HAS_CTYPES']:
+ if CONFIG['CPU_ARCH'] == 'x86':
+ SOURCES['builtin/RegExp.cpp'].no_pgo = True # Bug 772303
+ elif CONFIG['CPU_ARCH'] == 'x86_64' and CONFIG['JS_HAS_CTYPES']:
SOURCES['ctypes/CTypes.cpp'].no_pgo = True # Bug 810661
if CONFIG['OS_ARCH'] not in ('WINNT'):
@@ -628,6 +647,43 @@ NO_EXPAND_LIBS = True
DIST_INSTALL = True
+# Prepare self-hosted JS code for embedding
+GENERATED_FILES += [('selfhosted.out.h', 'selfhosted.js')]
+selfhosted = GENERATED_FILES[('selfhosted.out.h', 'selfhosted.js')]
+selfhosted.script = 'builtin/embedjs.py:generate_selfhosted'
+selfhosted.inputs = [
+ 'js.msg',
+ 'builtin/TypedObjectConstants.h',
+ 'builtin/SelfHostingDefines.h',
+ 'builtin/Utilities.js',
+ 'builtin/Array.js',
+ 'builtin/AsyncIteration.js',
+ 'builtin/Classes.js',
+ 'builtin/Date.js',
+ 'builtin/Error.js',
+ 'builtin/Function.js',
+ 'builtin/Generator.js',
+ 'builtin/Intl.js',
+ 'builtin/IntlData.js',
+ 'builtin/Iterator.js',
+ 'builtin/Map.js',
+ 'builtin/Module.js',
+ 'builtin/Number.js',
+ 'builtin/Object.js',
+ 'builtin/Promise.js',
+ 'builtin/Reflect.js',
+ 'builtin/RegExp.js',
+ 'builtin/RegExpGlobalReplaceOpt.h.js',
+ 'builtin/RegExpLocalReplaceOpt.h.js',
+ 'builtin/String.js',
+ 'builtin/Set.js',
+ 'builtin/Sorting.js',
+ 'builtin/TypedArray.js',
+ 'builtin/TypedObject.js',
+ 'builtin/WeakMap.js',
+ 'builtin/WeakSet.js'
+]
+
# Suppress warnings in third-party code.
# We are keeping this in the main moz.build because it is file specific
if CONFIG['CLANG_CXX'] or CONFIG['GNU_CXX']: