Bug 912099 - Part h: Make sure CPP_SOURCES only points to existing files in js/src; r=mshal
authorMs2ger <ms2ger@gmail.com>
Thu, 03 Oct 2013 09:10:01 +0200
changeset 149665 c2625a33e8f0088e09a9f869d0552817ed136fdd
parent 149664 5e91fd0e187da6309614c4bfe737b9cf377b8acc
child 149666 6b7ec3be1e7e27a94f53de479c72bd154575bf47
push id25399
push userMs2ger@gmail.com
push dateThu, 03 Oct 2013 07:22:24 +0000
treeherdermozilla-central@0e26e6f12ad9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs912099
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 912099 - Part h: Make sure CPP_SOURCES only points to existing files in js/src; r=mshal
js/src/Makefile.in
js/src/gdb/moz.build
js/src/moz.build
python/mozbuild/mozbuild/frontend/emitter.py
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -599,17 +599,17 @@ host_jskwgen.$(OBJ_SUFFIX): jsversion.h 
 host_jsoplengen.$(OBJ_SUFFIX): jsopcode.tbl
 
 # Use CURDIR to avoid finding a jsautooplen.h in the source tree (from
 # a previous build?) via VPATH when we're building in a separate tree.
 $(CURDIR)/jsautooplen.h: host_jsoplengen$(HOST_BIN_SUFFIX)
 	./host_jsoplengen$(HOST_BIN_SUFFIX) $@
 
 # Force auto-header generation before compiling any source that may use them
-$(patsubst %.cc,%.$(OBJ_SUFFIX),$(CPPSRCS:%.cpp=%.$(OBJ_SUFFIX))): $(CURDIR)/jsautokw.h $(CURDIR)/jsautooplen.h
+$(OBJS): $(CURDIR)/jsautokw.h $(CURDIR)/jsautooplen.h
 
 ifdef MOZ_ETW
 ETWProvider.h ETWProvider.rc ETWProvider.mof: ETWProvider.man
 	$(MC) -um -mof $^
 
 Probes.$(OBJ_SUFFIX): ETWProvider.h
 
 ETWProvider.res: ETWProvider.rc
--- a/js/src/gdb/moz.build
+++ b/js/src/gdb/moz.build
@@ -3,16 +3,16 @@
 # 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/.
 
 PROGRAM = 'gdb-tests'
 
 CPP_SOURCES += [
     'gdb-tests.cpp',
-    'test-JSObject.cpp',
-    'test-JSString.cpp',
-    'test-Root.cpp',
-    'test-jsid.cpp',
-    'test-jsval.cpp',
-    'test-prettyprinters.cpp',
-    'typedef-printers.cpp',
+    'tests/test-JSObject.cpp',
+    'tests/test-JSString.cpp',
+    'tests/test-Root.cpp',
+    'tests/test-jsid.cpp',
+    'tests/test-jsval.cpp',
+    'tests/test-prettyprinters.cpp',
+    'tests/typedef-printers.cpp',
 ]
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -73,85 +73,85 @@ EXPORTS.js += [
     '../public/Tracer.h',
     '../public/TypeDecls.h',
     '../public/Utility.h',
     '../public/Value.h',
     '../public/Vector.h',
 ]
 
 CPP_SOURCES += [
-    'ArgumentsObject.cpp',
-    'Barrier.cpp',
-    'BytecodeCompiler.cpp',
-    'BytecodeEmitter.cpp',
-    'CallNonGenericMethod.cpp',
-    'CharacterEncoding.cpp',
-    'DateTime.cpp',
-    'Debugger.cpp',
-    'Eval.cpp',
-    'ExecutableAllocator.cpp',
-    'FoldConstants.cpp',
-    'ForkJoin.cpp',
-    'GlobalObject.cpp',
-    'Id.cpp',
-    'Interpreter.cpp',
-    'Intl.cpp',
-    'Iteration.cpp',
-    'LifoAlloc.cpp',
-    'MapObject.cpp',
-    'Marking.cpp',
-    'Memory.cpp',
-    'MemoryMetrics.cpp',
-    'Module.cpp',
-    'Monitor.cpp',
-    'NameFunctions.cpp',
-    'Nursery.cpp',
-    'Object.cpp',
-    'ObjectImpl.cpp',
-    'OldDebugAPI.cpp',
-    'PageBlock.cpp',
-    'ParallelArray.cpp',
-    'ParseMaps.cpp',
-    'ParseNode.cpp',
-    'Parser.cpp',
-    'Probes.cpp',
-    'Profilers.cpp',
-    'PropertyKey.cpp',
-    'ProxyObject.cpp',
-    'RegExp.cpp',
-    'RegExpObject.cpp',
-    'RegExpStatics.cpp',
-    'RootMarking.cpp',
-    'Runtime.cpp',
-    'SPSProfiler.cpp',
-    'ScopeObject.cpp',
-    'SelfHosting.cpp',
-    'Shape.cpp',
-    'Stack.cpp',
-    'Statistics.cpp',
-    'StoreBuffer.cpp',
-    'String.cpp',
-    'StringBuffer.cpp',
-    'StructuredClone.cpp',
-    'TestingFunctions.cpp',
-    'ThreadPool.cpp',
-    'TokenStream.cpp',
-    'Tracer.cpp',
-    'TypeRepresentation.cpp',
-    'TypedArrayObject.cpp',
-    'TypedObject.cpp',
-    'Unicode.cpp',
-    'Value.cpp',
-    'Verifier.cpp',
-    'Xdr.cpp',
-    'YarrCanonicalizeUCS2.cpp',
-    'YarrInterpreter.cpp',
-    'YarrPattern.cpp',
-    'YarrSyntaxChecker.cpp',
-    'Zone.cpp',
+    'vm/ArgumentsObject.cpp',
+    'gc/Barrier.cpp',
+    'frontend/BytecodeCompiler.cpp',
+    'frontend/BytecodeEmitter.cpp',
+    'vm/CallNonGenericMethod.cpp',
+    'vm/CharacterEncoding.cpp',
+    'vm/DateTime.cpp',
+    'vm/Debugger.cpp',
+    'builtin/Eval.cpp',
+    'assembler/jit/ExecutableAllocator.cpp',
+    'frontend/FoldConstants.cpp',
+    'vm/ForkJoin.cpp',
+    'vm/GlobalObject.cpp',
+    'vm/Id.cpp',
+    'vm/Interpreter.cpp',
+    'builtin/Intl.cpp',
+    'gc/Iteration.cpp',
+    'ds/LifoAlloc.cpp',
+    'builtin/MapObject.cpp',
+    'gc/Marking.cpp',
+    'gc/Memory.cpp',
+    'vm/MemoryMetrics.cpp',
+    'builtin/Module.cpp',
+    'vm/Monitor.cpp',
+    'frontend/NameFunctions.cpp',
+    'gc/Nursery.cpp',
+    'builtin/Object.cpp',
+    'vm/ObjectImpl.cpp',
+    'vm/OldDebugAPI.cpp',
+    'yarr/PageBlock.cpp',
+    'builtin/ParallelArray.cpp',
+    'frontend/ParseMaps.cpp',
+    'frontend/ParseNode.cpp',
+    'frontend/Parser.cpp',
+    'vm/Probes.cpp',
+    'builtin/Profilers.cpp',
+    'vm/PropertyKey.cpp',
+    'vm/ProxyObject.cpp',
+    'builtin/RegExp.cpp',
+    'vm/RegExpObject.cpp',
+    'vm/RegExpStatics.cpp',
+    'gc/RootMarking.cpp',
+    'vm/Runtime.cpp',
+    'vm/SPSProfiler.cpp',
+    'vm/ScopeObject.cpp',
+    'vm/SelfHosting.cpp',
+    'vm/Shape.cpp',
+    'vm/Stack.cpp',
+    'gc/Statistics.cpp',
+    'gc/StoreBuffer.cpp',
+    'vm/String.cpp',
+    'vm/StringBuffer.cpp',
+    'vm/StructuredClone.cpp',
+    'builtin/TestingFunctions.cpp',
+    'vm/ThreadPool.cpp',
+    'frontend/TokenStream.cpp',
+    'gc/Tracer.cpp',
+    'builtin/TypeRepresentation.cpp',
+    'vm/TypedArrayObject.cpp',
+    'builtin/TypedObject.cpp',
+    'vm/Unicode.cpp',
+    'vm/Value.cpp',
+    'gc/Verifier.cpp',
+    'vm/Xdr.cpp',
+    'yarr/YarrCanonicalizeUCS2.cpp',
+    'yarr/YarrInterpreter.cpp',
+    'yarr/YarrPattern.cpp',
+    'yarr/YarrSyntaxChecker.cpp',
+    'gc/Zone.cpp',
     'jsalloc.cpp',
     'jsanalyze.cpp',
     'jsapi.cpp',
     'jsarray.cpp',
     'jsatom.cpp',
     'jsbool.cpp',
     'jscntxt.cpp',
     'jscompartment.cpp',
@@ -166,191 +166,191 @@ CPP_SOURCES += [
     'jsiter.cpp',
     'jsmath.cpp',
     'jsnativestack.cpp',
     'jsnum.cpp',
     'jsobj.cpp',
     'json.cpp',
     'jsonparser.cpp',
     'jsopcode.cpp',
-    'jsperf.cpp',
+    'perf/jsperf.cpp',
     'jsprf.cpp',
     'jspropertytree.cpp',
     'jsproxy.cpp',
     'jsreflect.cpp',
     'jsscript.cpp',
     'jsstr.cpp',
     'jsutil.cpp',
     'jswatchpoint.cpp',
     'jsweakmap.cpp',
     'jsworkers.cpp',
     'jswrapper.cpp',
     'prmjtime.cpp',
-    'sharkctl.cpp',
+    'devtools/sharkctl.cpp',
 ]
 
 if CONFIG['MOZ_INSTRUMENTS']:
     CPP_SOURCES += [
-        'Instruments.cpp',
+        'devtools/Instruments.cpp',
     ]
 
 if CONFIG['ENABLE_TRACE_LOGGING']:
     CPP_SOURCES += [
         'TraceLogging.cpp',
     ]
 
 if CONFIG['ENABLE_ION']:
     CPP_SOURCES += [
-        'AliasAnalysis.cpp',
-        'AsmJS.cpp',
-        'AsmJSLink.cpp',
-        'AsmJSModule.cpp',
-        'AsmJSSignalHandlers.cpp',
-        'BacktrackingAllocator.cpp',
-        'Bailouts.cpp',
-        'BaselineBailouts.cpp',
-        'BaselineCompiler-shared.cpp',
-        'BaselineCompiler.cpp',
-        'BaselineFrame.cpp',
-        'BaselineFrameInfo.cpp',
-        'BaselineIC.cpp',
-        'BaselineInspector.cpp',
-        'BaselineJIT.cpp',
-        'BitSet.cpp',
-        'BytecodeAnalysis.cpp',
-        'C1Spewer.cpp',
-        'CodeGenerator-shared.cpp',
-        'CodeGenerator.cpp',
-        'EdgeCaseAnalysis.cpp',
-        'EffectiveAddressAnalysis.cpp',
-        'Ion.cpp',
-        'IonAnalysis.cpp',
-        'IonBuilder.cpp',
-        'IonCaches.cpp',
-        'IonFrames.cpp',
-        'IonMacroAssembler.cpp',
-        'IonSpewer.cpp',
-        'JSONSpewer.cpp',
-        'PerfSpewer.cpp',
-        'LICM.cpp',
-        'LIR.cpp',
-        'LinearScan.cpp',
-        'LiveRangeAllocator.cpp',
-        'Lowering-shared.cpp',
-        'Lowering.cpp',
-        'MCallOptimize.cpp',
-        'MIR.cpp',
-        'MIRGraph.cpp',
-        'MoveResolver.cpp',
-        'ParallelSafetyAnalysis.cpp',
-        'ParallelFunctions.cpp',
-        'RangeAnalysis.cpp',
-        'RegisterAllocator.cpp',
-        'Safepoints.cpp',
-        'Snapshots.cpp',
-        'StupidAllocator.cpp',
-        'TypePolicy.cpp',
-        'TypeRepresentationSet.cpp',
-        'UnreachableCodeElimination.cpp',
-        'VMFunctions.cpp',
-        'ValueNumbering.cpp',
+        'jit/AliasAnalysis.cpp',
+        'jit/AsmJS.cpp',
+        'jit/AsmJSLink.cpp',
+        'jit/AsmJSModule.cpp',
+        'jit/AsmJSSignalHandlers.cpp',
+        'jit/BacktrackingAllocator.cpp',
+        'jit/Bailouts.cpp',
+        'jit/BaselineBailouts.cpp',
+        'jit/shared/BaselineCompiler-shared.cpp',
+        'jit/BaselineCompiler.cpp',
+        'jit/BaselineFrame.cpp',
+        'jit/BaselineFrameInfo.cpp',
+        'jit/BaselineIC.cpp',
+        'jit/BaselineInspector.cpp',
+        'jit/BaselineJIT.cpp',
+        'jit/BitSet.cpp',
+        'jit/BytecodeAnalysis.cpp',
+        'jit/C1Spewer.cpp',
+        'jit/shared/CodeGenerator-shared.cpp',
+        'jit/CodeGenerator.cpp',
+        'jit/EdgeCaseAnalysis.cpp',
+        'jit/EffectiveAddressAnalysis.cpp',
+        'jit/Ion.cpp',
+        'jit/IonAnalysis.cpp',
+        'jit/IonBuilder.cpp',
+        'jit/IonCaches.cpp',
+        'jit/IonFrames.cpp',
+        'jit/IonMacroAssembler.cpp',
+        'jit/IonSpewer.cpp',
+        'jit/JSONSpewer.cpp',
+        'jit/PerfSpewer.cpp',
+        'jit/LICM.cpp',
+        'jit/LIR.cpp',
+        'jit/LinearScan.cpp',
+        'jit/LiveRangeAllocator.cpp',
+        'jit/shared/Lowering-shared.cpp',
+        'jit/Lowering.cpp',
+        'jit/MCallOptimize.cpp',
+        'jit/MIR.cpp',
+        'jit/MIRGraph.cpp',
+        'jit/MoveResolver.cpp',
+        'jit/ParallelSafetyAnalysis.cpp',
+        'jit/ParallelFunctions.cpp',
+        'jit/RangeAnalysis.cpp',
+        'jit/RegisterAllocator.cpp',
+        'jit/Safepoints.cpp',
+        'jit/Snapshots.cpp',
+        'jit/StupidAllocator.cpp',
+        'jit/TypePolicy.cpp',
+        'jit/TypeRepresentationSet.cpp',
+        'jit/UnreachableCodeElimination.cpp',
+        'jit/VMFunctions.cpp',
+        'jit/ValueNumbering.cpp',
     ]
     if CONFIG['TARGET_CPU'].find('86') != -1:
         CPP_SOURCES += [
-            'Assembler-x86-shared.cpp',
-            'BaselineCompiler-x86-shared.cpp',
-            'BaselineIC-x86-shared.cpp',
-            'CodeGenerator-x86-shared.cpp',
-            'IonFrames-x86-shared.cpp',
-            'Lowering-x86-shared.cpp',
-            'MoveEmitter-x86-shared.cpp',
+            'jit/shared/Assembler-x86-shared.cpp',
+            'jit/shared/BaselineCompiler-x86-shared.cpp',
+            'jit/shared/BaselineIC-x86-shared.cpp',
+            'jit/shared/CodeGenerator-x86-shared.cpp',
+            'jit/shared/IonFrames-x86-shared.cpp',
+            'jit/shared/Lowering-x86-shared.cpp',
+            'jit/shared/MoveEmitter-x86-shared.cpp',
         ]
         if CONFIG['TARGET_CPU'] == 'x86_64':
             CPP_SOURCES += [
-                'Assembler-x64.cpp',
-                'Bailouts-x64.cpp',
-                'BaselineCompiler-x64.cpp',
-                'BaselineIC-x64.cpp',
-                'CodeGenerator-x64.cpp',
-                'Lowering-x64.cpp',
-                'MacroAssembler-x64.cpp',
-                'Trampoline-x64.cpp',
+                'jit/x64/Assembler-x64.cpp',
+                'jit/x64/Bailouts-x64.cpp',
+                'jit/x64/BaselineCompiler-x64.cpp',
+                'jit/x64/BaselineIC-x64.cpp',
+                'jit/x64/CodeGenerator-x64.cpp',
+                'jit/x64/Lowering-x64.cpp',
+                'jit/x64/MacroAssembler-x64.cpp',
+                'jit/x64/Trampoline-x64.cpp',
             ]
         else:
             CPP_SOURCES += [
-                'Assembler-x86.cpp',
-                'Bailouts-x86.cpp',
-                'BaselineCompiler-x86.cpp',
-                'BaselineIC-x86.cpp',
-                'CodeGenerator-x86.cpp',
-                'Lowering-x86.cpp',
-                'MacroAssembler-x86.cpp',
-                'Trampoline-x86.cpp',
+                'jit/x86/Assembler-x86.cpp',
+                'jit/x86/Bailouts-x86.cpp',
+                'jit/x86/BaselineCompiler-x86.cpp',
+                'jit/x86/BaselineIC-x86.cpp',
+                'jit/x86/CodeGenerator-x86.cpp',
+                'jit/x86/Lowering-x86.cpp',
+                'jit/x86/MacroAssembler-x86.cpp',
+                'jit/x86/Trampoline-x86.cpp',
             ]
     elif CONFIG['TARGET_CPU'].find('arm') != -1:
         CPP_SOURCES += [
-            'Architecture-arm.cpp',
-            'Assembler-arm.cpp',
-            'Bailouts-arm.cpp',
-            'BaselineCompiler-arm.cpp',
-            'BaselineIC-arm.cpp',
-            'CodeGenerator-arm.cpp',
-            'IonFrames-arm.cpp',
-            'Lowering-arm.cpp',
-            'MacroAssembler-arm.cpp',
-            'MoveEmitter-arm.cpp',
-            'Trampoline-arm.cpp',
+            'jit/arm/Architecture-arm.cpp',
+            'jit/arm/Assembler-arm.cpp',
+            'jit/arm/Bailouts-arm.cpp',
+            'jit/arm/BaselineCompiler-arm.cpp',
+            'jit/arm/BaselineIC-arm.cpp',
+            'jit/arm/CodeGenerator-arm.cpp',
+            'jit/arm/IonFrames-arm.cpp',
+            'jit/arm/Lowering-arm.cpp',
+            'jit/arm/MacroAssembler-arm.cpp',
+            'jit/arm/MoveEmitter-arm.cpp',
+            'jit/arm/Trampoline-arm.cpp',
         ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     CPP_SOURCES += [
-        'ExecutableAllocatorWin.cpp',
-        'OSAllocatorWin.cpp',
+        'assembler/jit/ExecutableAllocatorWin.cpp',
+        'yarr/OSAllocatorWin.cpp',
     ]
 elif CONFIG['OS_ARCH'] == 'OS2':
     CPP_SOURCES += [
-        'ExecutableAllocatorOS2.cpp',
-        'OSAllocatorOS2.cpp',
+        'assembler/jit/ExecutableAllocatorOS2.cpp',
+        'yarr/OSAllocatorOS2.cpp',
     ]
 else:
     CPP_SOURCES += [
-        'ExecutableAllocatorPosix.cpp',
-        'OSAllocatorPosix.cpp',
+        'assembler/jit/ExecutableAllocatorPosix.cpp',
+        'yarr/OSAllocatorPosix.cpp',
     ]
 
 if CONFIG['ENABLE_ION'] or CONFIG['ENABLE_YARR_JIT']:
     CPP_SOURCES += [
-        'ARMAssembler.cpp',
-        'MacroAssemblerARM.cpp',
-        'MacroAssemblerX86Common.cpp',
+        'assembler/assembler/ARMAssembler.cpp',
+        'assembler/assembler/MacroAssemblerARM.cpp',
+        'assembler/assembler/MacroAssemblerX86Common.cpp',
     ]
 
 if CONFIG['ENABLE_YARR_JIT']:
     CPP_SOURCES += [
-        'YarrJIT.cpp'
+        'yarr/YarrJIT.cpp'
     ]
 
 if CONFIG['JS_HAS_CTYPES']:
     CPP_SOURCES += [
-        'CTypes.cpp',
-        'Library.cpp',
+        'ctypes/CTypes.cpp',
+        'ctypes/Library.cpp',
     ]
 
 if CONFIG['MOZ_VTUNE']:
     CSRCS += [
         'vtune/jitprofiling.c'
     ]
 
 if CONFIG['HAVE_LINUX_PERF_EVENT_H']:
     CPP_SOURCES += [
-        'pm_linux.cpp'
+        'perf/pm_linux.cpp'
     ]
 else:
     CPP_SOURCES += [
-        'pm_stub.cpp'
+        'perf/pm_stub.cpp'
     ]
 
 MSVC_ENABLE_PGO = True
 
 HOST_CPPSRCS += [
     'jskwgen.cpp',
     'jsoplengen.cpp',
 ]
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -121,17 +121,17 @@ class TreeMetadataEmitter(LoggingMixin):
             self.log(logging.WARN, 'mozbuild_warning', dict(
                 path=sandbox.main_path),
                 '{path}: NO_DIST_INSTALL has no effect on XPIDL_SOURCES.')
 
         for idl in sandbox['XPIDL_SOURCES']:
             yield XPIDLFile(sandbox, mozpath.join(sandbox['SRCDIR'], idl),
                 xpidl_module)
 
-        if sandbox['CPP_SOURCES'] and os.path.join('js', 'src') not in sandbox.main_path:
+        if sandbox['CPP_SOURCES']:
             for src in sandbox['CPP_SOURCES']:
                 if not os.path.exists(os.path.join(sandbox['SRCDIR'], src)):
                     raise SandboxValidationError('Reference to a file that '
                         'doesn\'t exist in CPP_SOURCES (%s) in %s'
                         % (src, sandbox['RELATIVEDIR']))
 
         # Proxy some variables as-is until we have richer classes to represent
         # them. We should aim to keep this set small because it violates the