Commit d7ef0b8c authored by jochen's avatar jochen Committed by Commit bot

Fix BUILD.gn files and add presubmit step

Remove files that were removed from the build files but never deleted.

R=machenbach@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2346103002
Cr-Commit-Position: refs/heads/master@{#39499}
parent 95cc98c9
...@@ -1772,6 +1772,7 @@ v8_source_set("v8_base") { ...@@ -1772,6 +1772,7 @@ v8_source_set("v8_base") {
"src/ic/x64/stub-cache-x64.cc", "src/ic/x64/stub-cache-x64.cc",
"src/regexp/x64/regexp-macro-assembler-x64.cc", "src/regexp/x64/regexp-macro-assembler-x64.cc",
"src/regexp/x64/regexp-macro-assembler-x64.h", "src/regexp/x64/regexp-macro-assembler-x64.h",
"src/third_party/valgrind/valgrind.h",
"src/x64/assembler-x64-inl.h", "src/x64/assembler-x64-inl.h",
"src/x64/assembler-x64.cc", "src/x64/assembler-x64.cc",
"src/x64/assembler-x64.h", "src/x64/assembler-x64.h",
......
...@@ -216,6 +216,38 @@ def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api): ...@@ -216,6 +216,38 @@ def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api):
return [] return []
def _CheckMissingFiles(input_api, output_api):
"""Runs verify_source_deps.py to ensure no files were added that are not in
GN.
"""
# We need to wait until we have an input_api object and use this
# roundabout construct to import checkdeps because this file is
# eval-ed and thus doesn't have __file__.
original_sys_path = sys.path
try:
sys.path = sys.path + [input_api.os_path.join(
input_api.PresubmitLocalPath(), 'tools')]
from verify_source_deps import missing_gn_files, missing_gyp_files
finally:
# Restore sys.path to what it was before.
sys.path = original_sys_path
gn_files = missing_gn_files()
gyp_files = missing_gyp_files()
results = []
if gn_files:
results.append(output_api.PresubmitError(
"You added one or more source files but didn't update the\n"
"corresponding BUILD.gn files:\n",
gn_files))
if gyp_files:
results.append(output_api.PresubmitError(
"You added one or more source files but didn't update the\n"
"corresponding gyp files:\n",
gyp_files))
return results
def _CommonChecks(input_api, output_api): def _CommonChecks(input_api, output_api):
"""Checks common to both upload and commit.""" """Checks common to both upload and commit."""
results = [] results = []
...@@ -231,6 +263,7 @@ def _CommonChecks(input_api, output_api): ...@@ -231,6 +263,7 @@ def _CommonChecks(input_api, output_api):
_CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api)) _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api))
results.extend( results.extend(
_CheckNoInlineHeaderIncludesInNormalHeaders(input_api, output_api)) _CheckNoInlineHeaderIncludesInNormalHeaders(input_api, output_api))
results.extend(_CheckMissingFiles(input_api, output_api))
return results return results
......
...@@ -961,6 +961,7 @@ ...@@ -961,6 +961,7 @@
'ic/call-optimization.h', 'ic/call-optimization.h',
'ic/handler-compiler.cc', 'ic/handler-compiler.cc',
'ic/handler-compiler.h', 'ic/handler-compiler.h',
'ic/handler-configuration.h',
'ic/ic-inl.h', 'ic/ic-inl.h',
'ic/ic-state.cc', 'ic/ic-state.cc',
'ic/ic-state.h', 'ic/ic-state.h',
...@@ -1412,6 +1413,8 @@ ...@@ -1412,6 +1413,8 @@
'ia32/interface-descriptors-ia32.cc', 'ia32/interface-descriptors-ia32.cc',
'ia32/macro-assembler-ia32.cc', 'ia32/macro-assembler-ia32.cc',
'ia32/macro-assembler-ia32.h', 'ia32/macro-assembler-ia32.h',
'ia32/simulator-ia32.cc',
'ia32/simulator-ia32.h',
'builtins/ia32/builtins-ia32.cc', 'builtins/ia32/builtins-ia32.cc',
'compiler/ia32/code-generator-ia32.cc', 'compiler/ia32/code-generator-ia32.cc',
'compiler/ia32/instruction-codes-ia32.h', 'compiler/ia32/instruction-codes-ia32.h',
...@@ -1451,6 +1454,8 @@ ...@@ -1451,6 +1454,8 @@
'x87/interface-descriptors-x87.cc', 'x87/interface-descriptors-x87.cc',
'x87/macro-assembler-x87.cc', 'x87/macro-assembler-x87.cc',
'x87/macro-assembler-x87.h', 'x87/macro-assembler-x87.h',
'x87/simulator-x87.cc',
'x87/simulator-x87.h',
'builtins/x87/builtins-x87.cc', 'builtins/x87/builtins-x87.cc',
'compiler/x87/code-generator-x87.cc', 'compiler/x87/code-generator-x87.cc',
'compiler/x87/instruction-codes-x87.h', 'compiler/x87/instruction-codes-x87.h',
...@@ -1583,6 +1588,8 @@ ...@@ -1583,6 +1588,8 @@
'x64/interface-descriptors-x64.cc', 'x64/interface-descriptors-x64.cc',
'x64/macro-assembler-x64.cc', 'x64/macro-assembler-x64.cc',
'x64/macro-assembler-x64.h', 'x64/macro-assembler-x64.h',
'x64/simulator-x64.cc',
'x64/simulator-x64.h',
'x64/sse-instr.h', 'x64/sse-instr.h',
'debug/x64/debug-x64.cc', 'debug/x64/debug-x64.cc',
'full-codegen/x64/full-codegen-x64.cc', 'full-codegen/x64/full-codegen-x64.cc',
...@@ -1593,6 +1600,7 @@ ...@@ -1593,6 +1600,7 @@
'ic/x64/stub-cache-x64.cc', 'ic/x64/stub-cache-x64.cc',
'regexp/x64/regexp-macro-assembler-x64.cc', 'regexp/x64/regexp-macro-assembler-x64.cc',
'regexp/x64/regexp-macro-assembler-x64.h', 'regexp/x64/regexp-macro-assembler-x64.h',
'third_party/valgrind/valgrind.h',
], ],
}], }],
['v8_target_arch=="x64"', { ['v8_target_arch=="x64"', {
......
...@@ -10,8 +10,11 @@ v8_executable("cctest") { ...@@ -10,8 +10,11 @@ v8_executable("cctest") {
sources = [ sources = [
"$target_gen_dir/resources.cc", "$target_gen_dir/resources.cc",
"asmjs/test-asm-typer.cc", "asmjs/test-asm-typer.cc",
"ast-types-fuzz.h",
"cctest.cc", "cctest.cc",
"cctest.h",
"compiler/c-signature.h", "compiler/c-signature.h",
"compiler/call-tester.h",
"compiler/code-assembler-tester.h", "compiler/code-assembler-tester.h",
"compiler/codegen-tester.cc", "compiler/codegen-tester.cc",
"compiler/codegen-tester.h", "compiler/codegen-tester.h",
...@@ -55,9 +58,14 @@ v8_executable("cctest") { ...@@ -55,9 +58,14 @@ v8_executable("cctest") {
"compiler/test-run-unwinding-info.cc", "compiler/test-run-unwinding-info.cc",
"compiler/test-run-variables.cc", "compiler/test-run-variables.cc",
"compiler/test-run-wasm-machops.cc", "compiler/test-run-wasm-machops.cc",
"compiler/value-helper.h",
"expression-type-collector-macros.h",
"gay-fixed.cc", "gay-fixed.cc",
"gay-fixed.h",
"gay-precision.cc", "gay-precision.cc",
"gay-precision.h",
"gay-shortest.cc", "gay-shortest.cc",
"gay-shortest.h",
"heap/heap-tester.h", "heap/heap-tester.h",
"heap/heap-utils.cc", "heap/heap-utils.cc",
"heap/heap-utils.h", "heap/heap-utils.h",
...@@ -73,6 +81,7 @@ v8_executable("cctest") { ...@@ -73,6 +81,7 @@ v8_executable("cctest") {
"interpreter/bytecode-expectations-printer.cc", "interpreter/bytecode-expectations-printer.cc",
"interpreter/bytecode-expectations-printer.h", "interpreter/bytecode-expectations-printer.h",
"interpreter/interpreter-tester.cc", "interpreter/interpreter-tester.cc",
"interpreter/interpreter-tester.h",
"interpreter/source-position-matcher.cc", "interpreter/source-position-matcher.cc",
"interpreter/source-position-matcher.h", "interpreter/source-position-matcher.h",
"interpreter/test-bytecode-generator.cc", "interpreter/test-bytecode-generator.cc",
...@@ -83,7 +92,9 @@ v8_executable("cctest") { ...@@ -83,7 +92,9 @@ v8_executable("cctest") {
"libsampler/test-sampler.cc", "libsampler/test-sampler.cc",
"parsing/test-scanner-streams.cc", "parsing/test-scanner-streams.cc",
"print-extension.cc", "print-extension.cc",
"print-extension.h",
"profiler-extension.cc", "profiler-extension.cc",
"profiler-extension.h",
"test-access-checks.cc", "test-access-checks.cc",
"test-accessors.cc", "test-accessors.cc",
"test-api-accessors.cc", "test-api-accessors.cc",
...@@ -117,6 +128,7 @@ v8_executable("cctest") { ...@@ -117,6 +128,7 @@ v8_executable("cctest") {
"test-elements-kind.cc", "test-elements-kind.cc",
"test-fast-dtoa.cc", "test-fast-dtoa.cc",
"test-feedback-vector.cc", "test-feedback-vector.cc",
"test-feedback-vector.h",
"test-field-type-tracking.cc", "test-field-type-tracking.cc",
"test-fixed-dtoa.cc", "test-fixed-dtoa.cc",
"test-flags.cc", "test-flags.cc",
...@@ -164,6 +176,8 @@ v8_executable("cctest") { ...@@ -164,6 +176,8 @@ v8_executable("cctest") {
"test-weakmaps.cc", "test-weakmaps.cc",
"test-weaksets.cc", "test-weaksets.cc",
"trace-extension.cc", "trace-extension.cc",
"trace-extension.h",
"types-fuzz.h",
"wasm/test-run-wasm-64.cc", "wasm/test-run-wasm-64.cc",
"wasm/test-run-wasm-asmjs.cc", "wasm/test-run-wasm-asmjs.cc",
"wasm/test-run-wasm-interpreter.cc", "wasm/test-run-wasm-interpreter.cc",
...@@ -183,6 +197,7 @@ v8_executable("cctest") { ...@@ -183,6 +197,7 @@ v8_executable("cctest") {
"test-assembler-arm.cc", "test-assembler-arm.cc",
"test-code-stubs-arm.cc", "test-code-stubs-arm.cc",
"test-code-stubs.cc", "test-code-stubs.cc",
"test-code-stubs.h",
"test-disasm-arm.cc", "test-disasm-arm.cc",
"test-macro-assembler-arm.cc", "test-macro-assembler-arm.cc",
"test-run-wasm-relocation-arm.cc", "test-run-wasm-relocation-arm.cc",
...@@ -192,18 +207,21 @@ v8_executable("cctest") { ...@@ -192,18 +207,21 @@ v8_executable("cctest") {
"test-assembler-arm64.cc", "test-assembler-arm64.cc",
"test-code-stubs-arm64.cc", "test-code-stubs-arm64.cc",
"test-code-stubs.cc", "test-code-stubs.cc",
"test-code-stubs.h",
"test-disasm-arm64.cc", "test-disasm-arm64.cc",
"test-fuzz-arm64.cc", "test-fuzz-arm64.cc",
"test-javascript-arm64.cc", "test-javascript-arm64.cc",
"test-js-arm64-variables.cc", "test-js-arm64-variables.cc",
"test-run-wasm-relocation-arm64.cc", "test-run-wasm-relocation-arm64.cc",
"test-utils-arm64.cc", "test-utils-arm64.cc",
"test-utils-arm64.h",
] ]
} else if (v8_current_cpu == "x86") { } else if (v8_current_cpu == "x86") {
sources += [ sources += [
"test-assembler-ia32.cc", "test-assembler-ia32.cc",
"test-code-stubs-ia32.cc", "test-code-stubs-ia32.cc",
"test-code-stubs.cc", "test-code-stubs.cc",
"test-code-stubs.h",
"test-disasm-ia32.cc", "test-disasm-ia32.cc",
"test-log-stack-tracer.cc", "test-log-stack-tracer.cc",
"test-macro-assembler-ia32.cc", "test-macro-assembler-ia32.cc",
...@@ -214,6 +232,7 @@ v8_executable("cctest") { ...@@ -214,6 +232,7 @@ v8_executable("cctest") {
"test-assembler-mips.cc", "test-assembler-mips.cc",
"test-code-stubs-mips.cc", "test-code-stubs-mips.cc",
"test-code-stubs.cc", "test-code-stubs.cc",
"test-code-stubs.h",
"test-disasm-mips.cc", "test-disasm-mips.cc",
"test-macro-assembler-mips.cc", "test-macro-assembler-mips.cc",
] ]
...@@ -222,6 +241,7 @@ v8_executable("cctest") { ...@@ -222,6 +241,7 @@ v8_executable("cctest") {
"test-assembler-mips.cc", "test-assembler-mips.cc",
"test-code-stubs-mips.cc", "test-code-stubs-mips.cc",
"test-code-stubs.cc", "test-code-stubs.cc",
"test-code-stubs.h",
"test-disasm-mips.cc", "test-disasm-mips.cc",
"test-macro-assembler-mips.cc", "test-macro-assembler-mips.cc",
] ]
...@@ -230,6 +250,7 @@ v8_executable("cctest") { ...@@ -230,6 +250,7 @@ v8_executable("cctest") {
"test-assembler-mips64.cc", "test-assembler-mips64.cc",
"test-code-stubs-mips64.cc", "test-code-stubs-mips64.cc",
"test-code-stubs.cc", "test-code-stubs.cc",
"test-code-stubs.h",
"test-disasm-mips64.cc", "test-disasm-mips64.cc",
"test-macro-assembler-mips64.cc", "test-macro-assembler-mips64.cc",
] ]
...@@ -238,6 +259,7 @@ v8_executable("cctest") { ...@@ -238,6 +259,7 @@ v8_executable("cctest") {
"test-assembler-mips64.cc", "test-assembler-mips64.cc",
"test-code-stubs-mips64.cc", "test-code-stubs-mips64.cc",
"test-code-stubs.cc", "test-code-stubs.cc",
"test-code-stubs.h",
"test-disasm-mips64.cc", "test-disasm-mips64.cc",
"test-macro-assembler-mips64.cc", "test-macro-assembler-mips64.cc",
] ]
...@@ -246,6 +268,7 @@ v8_executable("cctest") { ...@@ -246,6 +268,7 @@ v8_executable("cctest") {
"test-assembler-x64.cc", "test-assembler-x64.cc",
"test-code-stubs-x64.cc", "test-code-stubs-x64.cc",
"test-code-stubs.cc", "test-code-stubs.cc",
"test-code-stubs.h",
"test-disasm-x64.cc", "test-disasm-x64.cc",
"test-log-stack-tracer.cc", "test-log-stack-tracer.cc",
"test-macro-assembler-x64.cc", "test-macro-assembler-x64.cc",
...@@ -257,6 +280,7 @@ v8_executable("cctest") { ...@@ -257,6 +280,7 @@ v8_executable("cctest") {
"test-assembler-x87.cc", "test-assembler-x87.cc",
"test-code-stubs-x87.cc", "test-code-stubs-x87.cc",
"test-code-stubs.cc", "test-code-stubs.cc",
"test-code-stubs.h",
"test-disasm-x87.cc", "test-disasm-x87.cc",
"test-log-stack-tracer.cc", "test-log-stack-tracer.cc",
"test-macro-assembler-x87.cc", "test-macro-assembler-x87.cc",
...@@ -266,12 +290,14 @@ v8_executable("cctest") { ...@@ -266,12 +290,14 @@ v8_executable("cctest") {
sources += [ sources += [
"test-assembler-ppc.cc", "test-assembler-ppc.cc",
"test-code-stubs.cc", "test-code-stubs.cc",
"test-code-stubs.h",
"test-disasm-ppc.cc", "test-disasm-ppc.cc",
] ]
} else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
sources += [ sources += [
"test-assembler-s390.cc", "test-assembler-s390.cc",
"test-code-stubs.cc", "test-code-stubs.cc",
"test-code-stubs.h",
"test-disasm-s390.cc", "test-disasm-s390.cc",
] ]
} }
......
...@@ -33,7 +33,9 @@ ...@@ -33,7 +33,9 @@
'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc', 'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc',
'cctest_sources': [ ### gcmole(all) ### 'cctest_sources': [ ### gcmole(all) ###
'asmjs/test-asm-typer.cc', 'asmjs/test-asm-typer.cc',
'ast-types-fuzz.h',
'compiler/c-signature.h', 'compiler/c-signature.h',
'compiler/call-tester.h',
'compiler/codegen-tester.cc', 'compiler/codegen-tester.cc',
'compiler/codegen-tester.h', 'compiler/codegen-tester.h',
'compiler/code-assembler-tester.h', 'compiler/code-assembler-tester.h',
...@@ -77,8 +79,12 @@ ...@@ -77,8 +79,12 @@
'compiler/test-run-stubs.cc', 'compiler/test-run-stubs.cc',
'compiler/test-run-variables.cc', 'compiler/test-run-variables.cc',
'compiler/test-run-wasm-machops.cc', 'compiler/test-run-wasm-machops.cc',
'compiler/value-helper.h',
'cctest.cc', 'cctest.cc',
'cctest.h',
'expression-type-collector-macros.h',
'interpreter/interpreter-tester.cc', 'interpreter/interpreter-tester.cc',
'interpreter/interpreter-tester.h',
'interpreter/source-position-matcher.cc', 'interpreter/source-position-matcher.cc',
'interpreter/source-position-matcher.h', 'interpreter/source-position-matcher.h',
'interpreter/test-bytecode-generator.cc', 'interpreter/test-bytecode-generator.cc',
...@@ -88,8 +94,11 @@ ...@@ -88,8 +94,11 @@
'interpreter/bytecode-expectations-printer.cc', 'interpreter/bytecode-expectations-printer.cc',
'interpreter/bytecode-expectations-printer.h', 'interpreter/bytecode-expectations-printer.h',
'gay-fixed.cc', 'gay-fixed.cc',
'gay-fixed.h',
'gay-precision.cc', 'gay-precision.cc',
'gay-precision.h',
'gay-shortest.cc', 'gay-shortest.cc',
'gay-shortest.h',
'heap/heap-tester.h', 'heap/heap-tester.h',
'heap/heap-utils.cc', 'heap/heap-utils.cc',
'heap/heap-utils.h', 'heap/heap-utils.h',
...@@ -106,7 +115,9 @@ ...@@ -106,7 +115,9 @@
'libsampler/test-sampler.cc', 'libsampler/test-sampler.cc',
'parsing/test-scanner-streams.cc', 'parsing/test-scanner-streams.cc',
'print-extension.cc', 'print-extension.cc',
'print-extension.h',
'profiler-extension.cc', 'profiler-extension.cc',
'profiler-extension.h',
'test-access-checks.cc', 'test-access-checks.cc',
'test-accessors.cc', 'test-accessors.cc',
'test-api.cc', 'test-api.cc',
...@@ -139,6 +150,7 @@ ...@@ -139,6 +150,7 @@
'test-elements-kind.cc', 'test-elements-kind.cc',
'test-fast-dtoa.cc', 'test-fast-dtoa.cc',
'test-feedback-vector.cc', 'test-feedback-vector.cc',
'test-feedback-vector.h',
'test-field-type-tracking.cc', 'test-field-type-tracking.cc',
'test-fixed-dtoa.cc', 'test-fixed-dtoa.cc',
'test-flags.cc', 'test-flags.cc',
...@@ -187,6 +199,8 @@ ...@@ -187,6 +199,8 @@
'test-weakmaps.cc', 'test-weakmaps.cc',
'test-weaksets.cc', 'test-weaksets.cc',
'trace-extension.cc', 'trace-extension.cc',
'trace-extension.h',
'types-fuzz.h',
'wasm/test-run-wasm.cc', 'wasm/test-run-wasm.cc',
'wasm/test-run-wasm-64.cc', 'wasm/test-run-wasm-64.cc',
'wasm/test-run-wasm-asmjs.cc', 'wasm/test-run-wasm-asmjs.cc',
...@@ -203,6 +217,7 @@ ...@@ -203,6 +217,7 @@
'cctest_sources_ia32': [ ### gcmole(arch:ia32) ### 'cctest_sources_ia32': [ ### gcmole(arch:ia32) ###
'test-assembler-ia32.cc', 'test-assembler-ia32.cc',
'test-code-stubs.cc', 'test-code-stubs.cc',
'test-code-stubs.h',
'test-code-stubs-ia32.cc', 'test-code-stubs-ia32.cc',
'test-disasm-ia32.cc', 'test-disasm-ia32.cc',
'test-macro-assembler-ia32.cc', 'test-macro-assembler-ia32.cc',
...@@ -212,6 +227,7 @@ ...@@ -212,6 +227,7 @@
'cctest_sources_x64': [ ### gcmole(arch:x64) ### 'cctest_sources_x64': [ ### gcmole(arch:x64) ###
'test-assembler-x64.cc', 'test-assembler-x64.cc',
'test-code-stubs.cc', 'test-code-stubs.cc',
'test-code-stubs.h',
'test-code-stubs-x64.cc', 'test-code-stubs-x64.cc',
'test-disasm-x64.cc', 'test-disasm-x64.cc',
'test-macro-assembler-x64.cc', 'test-macro-assembler-x64.cc',
...@@ -222,6 +238,7 @@ ...@@ -222,6 +238,7 @@
'cctest_sources_arm': [ ### gcmole(arch:arm) ### 'cctest_sources_arm': [ ### gcmole(arch:arm) ###
'test-assembler-arm.cc', 'test-assembler-arm.cc',
'test-code-stubs.cc', 'test-code-stubs.cc',
'test-code-stubs.h',
'test-code-stubs-arm.cc', 'test-code-stubs-arm.cc',
'test-disasm-arm.cc', 'test-disasm-arm.cc',
'test-macro-assembler-arm.cc', 'test-macro-assembler-arm.cc',
...@@ -229,8 +246,10 @@ ...@@ -229,8 +246,10 @@
], ],
'cctest_sources_arm64': [ ### gcmole(arch:arm64) ### 'cctest_sources_arm64': [ ### gcmole(arch:arm64) ###
'test-utils-arm64.cc', 'test-utils-arm64.cc',
'test-utils-arm64.h',
'test-assembler-arm64.cc', 'test-assembler-arm64.cc',
'test-code-stubs.cc', 'test-code-stubs.cc',
'test-code-stubs.h',
'test-code-stubs-arm64.cc', 'test-code-stubs-arm64.cc',
'test-disasm-arm64.cc', 'test-disasm-arm64.cc',
'test-fuzz-arm64.cc', 'test-fuzz-arm64.cc',
...@@ -241,16 +260,19 @@ ...@@ -241,16 +260,19 @@
'cctest_sources_s390': [ ### gcmole(arch:s390) ### 'cctest_sources_s390': [ ### gcmole(arch:s390) ###
'test-assembler-s390.cc', 'test-assembler-s390.cc',
'test-code-stubs.cc', 'test-code-stubs.cc',
'test-code-stubs.h',
'test-disasm-s390.cc' 'test-disasm-s390.cc'
], ],
'cctest_sources_ppc': [ ### gcmole(arch:ppc) ### 'cctest_sources_ppc': [ ### gcmole(arch:ppc) ###
'test-assembler-ppc.cc', 'test-assembler-ppc.cc',
'test-code-stubs.cc', 'test-code-stubs.cc',
'test-code-stubs.h',
'test-disasm-ppc.cc' 'test-disasm-ppc.cc'
], ],
'cctest_sources_mips': [ ### gcmole(arch:mips) ### 'cctest_sources_mips': [ ### gcmole(arch:mips) ###
'test-assembler-mips.cc', 'test-assembler-mips.cc',
'test-code-stubs.cc', 'test-code-stubs.cc',
'test-code-stubs.h',
'test-code-stubs-mips.cc', 'test-code-stubs-mips.cc',
'test-disasm-mips.cc', 'test-disasm-mips.cc',
'test-macro-assembler-mips.cc' 'test-macro-assembler-mips.cc'
...@@ -258,6 +280,7 @@ ...@@ -258,6 +280,7 @@
'cctest_sources_mipsel': [ ### gcmole(arch:mipsel) ### 'cctest_sources_mipsel': [ ### gcmole(arch:mipsel) ###
'test-assembler-mips.cc', 'test-assembler-mips.cc',
'test-code-stubs.cc', 'test-code-stubs.cc',
'test-code-stubs.h',
'test-code-stubs-mips.cc', 'test-code-stubs-mips.cc',
'test-disasm-mips.cc', 'test-disasm-mips.cc',
'test-macro-assembler-mips.cc' 'test-macro-assembler-mips.cc'
...@@ -265,6 +288,7 @@ ...@@ -265,6 +288,7 @@
'cctest_sources_mips64': [ ### gcmole(arch:mips64) ### 'cctest_sources_mips64': [ ### gcmole(arch:mips64) ###
'test-assembler-mips64.cc', 'test-assembler-mips64.cc',
'test-code-stubs.cc', 'test-code-stubs.cc',
'test-code-stubs.h',
'test-code-stubs-mips64.cc', 'test-code-stubs-mips64.cc',
'test-disasm-mips64.cc', 'test-disasm-mips64.cc',
'test-macro-assembler-mips64.cc' 'test-macro-assembler-mips64.cc'
...@@ -272,6 +296,7 @@ ...@@ -272,6 +296,7 @@
'cctest_sources_mips64el': [ ### gcmole(arch:mips64el) ### 'cctest_sources_mips64el': [ ### gcmole(arch:mips64el) ###
'test-assembler-mips64.cc', 'test-assembler-mips64.cc',
'test-code-stubs.cc', 'test-code-stubs.cc',
'test-code-stubs.h',
'test-code-stubs-mips64.cc', 'test-code-stubs-mips64.cc',
'test-disasm-mips64.cc', 'test-disasm-mips64.cc',
'test-macro-assembler-mips64.cc' 'test-macro-assembler-mips64.cc'
...@@ -279,6 +304,7 @@ ...@@ -279,6 +304,7 @@
'cctest_sources_x87': [ ### gcmole(arch:x87) ### 'cctest_sources_x87': [ ### gcmole(arch:x87) ###
'test-assembler-x87.cc', 'test-assembler-x87.cc',
'test-code-stubs.cc', 'test-code-stubs.cc',
'test-code-stubs.h',
'test-code-stubs-x87.cc', 'test-code-stubs-x87.cc',
'test-disasm-x87.cc', 'test-disasm-x87.cc',
'test-macro-assembler-x87.cc', 'test-macro-assembler-x87.cc',
......
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/heap/slots-buffer.h"
#include "test/cctest/cctest.h"
#include "test/cctest/heap/heap-utils.h"
namespace v8 {
namespace internal {
TEST(SlotsBufferObjectSlotsRemoval) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
Heap* heap = isolate->heap();
Factory* factory = isolate->factory();
SlotsBuffer* buffer = new SlotsBuffer(NULL);
void* fake_object[1];
Handle<FixedArray> array = factory->NewFixedArray(2, TENURED);
CHECK(heap->old_space()->Contains(*array));
array->set(0, reinterpret_cast<Object*>(fake_object), SKIP_WRITE_BARRIER);
// Firstly, let's test the regular slots buffer entry.
buffer->Add(HeapObject::RawField(*array, FixedArray::kHeaderSize));
CHECK(reinterpret_cast<void*>(buffer->Get(0)) ==
HeapObject::RawField(*array, FixedArray::kHeaderSize));
SlotsBuffer::RemoveObjectSlots(CcTest::i_isolate()->heap(), buffer,
array->address(),
array->address() + array->Size());
CHECK(reinterpret_cast<void*>(buffer->Get(0)) ==
HeapObject::RawField(heap->empty_fixed_array(),
FixedArrayBase::kLengthOffset));
// Secondly, let's test the typed slots buffer entry.
SlotsBuffer::AddTo(NULL, &buffer, SlotsBuffer::EMBEDDED_OBJECT_SLOT,
array->address() + FixedArray::kHeaderSize,
SlotsBuffer::FAIL_ON_OVERFLOW);
CHECK(reinterpret_cast<void*>(buffer->Get(1)) ==
reinterpret_cast<Object**>(SlotsBuffer::EMBEDDED_OBJECT_SLOT));
CHECK(reinterpret_cast<void*>(buffer->Get(2)) ==
HeapObject::RawField(*array, FixedArray::kHeaderSize));
SlotsBuffer::RemoveObjectSlots(CcTest::i_isolate()->heap(), buffer,
array->address(),
array->address() + array->Size());
CHECK(reinterpret_cast<void*>(buffer->Get(1)) ==
HeapObject::RawField(heap->empty_fixed_array(),
FixedArrayBase::kLengthOffset));
CHECK(reinterpret_cast<void*>(buffer->Get(2)) ==
HeapObject::RawField(heap->empty_fixed_array(),
FixedArrayBase::kLengthOffset));
delete buffer;
}
TEST(FilterInvalidSlotsBufferEntries) {
FLAG_manual_evacuation_candidates_selection = true;
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
Heap* heap = isolate->heap();
Factory* factory = isolate->factory();
SlotsBuffer* buffer = new SlotsBuffer(NULL);
// Set up a fake black object that will contain a recorded SMI, a recorded
// pointer to a new space object, and a recorded pointer to a non-evacuation
// candidate object. These object should be filtered out. Additionally,
// we point to an evacuation candidate object which should not be filtered
// out.
// Create fake object and mark it black.
Handle<FixedArray> fake_object = factory->NewFixedArray(23, TENURED);
MarkBit mark_bit = Marking::MarkBitFrom(*fake_object);
Marking::MarkBlack(mark_bit);
// Write a SMI into field one and record its address;
Object** field_smi = fake_object->RawFieldOfElementAt(0);
*field_smi = Smi::FromInt(100);
buffer->Add(field_smi);
// Write a new space reference into field 2 and record its address;
Handle<FixedArray> new_space_object = factory->NewFixedArray(23);
mark_bit = Marking::MarkBitFrom(*new_space_object);
Marking::MarkBlack(mark_bit);
Object** field_new_space = fake_object->RawFieldOfElementAt(1);
*field_new_space = *new_space_object;
buffer->Add(field_new_space);
// Write an old space reference into field 3 which points to an object not on
// an evacuation candidate.
Handle<FixedArray> old_space_object_non_evacuation =
factory->NewFixedArray(23, TENURED);
mark_bit = Marking::MarkBitFrom(*old_space_object_non_evacuation);
Marking::MarkBlack(mark_bit);
Object** field_old_space_object_non_evacuation =
fake_object->RawFieldOfElementAt(2);
*field_old_space_object_non_evacuation = *old_space_object_non_evacuation;
buffer->Add(field_old_space_object_non_evacuation);
// Write an old space reference into field 4 which points to an object on an
// evacuation candidate.
heap::SimulateFullSpace(heap->old_space());
Handle<FixedArray> valid_object =
isolate->factory()->NewFixedArray(23, TENURED);
Page* page = Page::FromAddress(valid_object->address());
page->SetFlag(MemoryChunk::EVACUATION_CANDIDATE);
Object** valid_field = fake_object->RawFieldOfElementAt(3);
*valid_field = *valid_object;
buffer->Add(valid_field);
SlotsBuffer::RemoveInvalidSlots(heap, buffer);
Object** kRemovedEntry = HeapObject::RawField(heap->empty_fixed_array(),
FixedArrayBase::kLengthOffset);
CHECK_EQ(buffer->Get(0), kRemovedEntry);
CHECK_EQ(buffer->Get(1), kRemovedEntry);
CHECK_EQ(buffer->Get(2), kRemovedEntry);
CHECK_EQ(buffer->Get(3), valid_field);
// Clean-up to make verify heap happy.
mark_bit = Marking::MarkBitFrom(*fake_object);
Marking::MarkWhite(mark_bit);
mark_bit = Marking::MarkBitFrom(*new_space_object);
Marking::MarkWhite(mark_bit);
mark_bit = Marking::MarkBitFrom(*old_space_object_non_evacuation);
Marking::MarkWhite(mark_bit);
delete buffer;
}
} // namespace internal
} // namespace v8
...@@ -196,8 +196,8 @@ ...@@ -196,8 +196,8 @@
'wasm-data-section.cc', 'wasm-data-section.cc',
'../common/wasm/wasm-module-runner.cc', '../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h', '../common/wasm/wasm-module-runner.h',
'../fuzzer/wasm-section-fuzzers.cc', 'wasm-section-fuzzers.cc',
'../fuzzer/wasm-section-fuzzers.h', 'wasm-section-fuzzers.h',
], ],
}, },
{ {
...@@ -226,8 +226,8 @@ ...@@ -226,8 +226,8 @@
'wasm-function-sigs-section.cc', 'wasm-function-sigs-section.cc',
'../common/wasm/wasm-module-runner.cc', '../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h', '../common/wasm/wasm-module-runner.h',
'../fuzzer/wasm-section-fuzzers.cc', 'wasm-section-fuzzers.cc',
'../fuzzer/wasm-section-fuzzers.h', 'wasm-section-fuzzers.h',
], ],
}, },
{ {
...@@ -256,8 +256,8 @@ ...@@ -256,8 +256,8 @@
'wasm-globals-section.cc', 'wasm-globals-section.cc',
'../common/wasm/wasm-module-runner.cc', '../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h', '../common/wasm/wasm-module-runner.h',
'../fuzzer/wasm-section-fuzzers.cc', 'wasm-section-fuzzers.cc',
'../fuzzer/wasm-section-fuzzers.h', 'wasm-section-fuzzers.h',
], ],
}, },
{ {
...@@ -286,8 +286,8 @@ ...@@ -286,8 +286,8 @@
'wasm-imports-section.cc', 'wasm-imports-section.cc',
'../common/wasm/wasm-module-runner.cc', '../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h', '../common/wasm/wasm-module-runner.h',
'../fuzzer/wasm-section-fuzzers.cc', 'wasm-section-fuzzers.cc',
'../fuzzer/wasm-section-fuzzers.h', 'wasm-section-fuzzers.h',
], ],
}, },
{ {
...@@ -316,8 +316,8 @@ ...@@ -316,8 +316,8 @@
'wasm-memory-section.cc', 'wasm-memory-section.cc',
'../common/wasm/wasm-module-runner.cc', '../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h', '../common/wasm/wasm-module-runner.h',
'../fuzzer/wasm-section-fuzzers.cc', 'wasm-section-fuzzers.cc',
'../fuzzer/wasm-section-fuzzers.h', 'wasm-section-fuzzers.h',
], ],
}, },
{ {
...@@ -346,8 +346,8 @@ ...@@ -346,8 +346,8 @@
'wasm-names-section.cc', 'wasm-names-section.cc',
'../common/wasm/wasm-module-runner.cc', '../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h', '../common/wasm/wasm-module-runner.h',
'../fuzzer/wasm-section-fuzzers.cc', 'wasm-section-fuzzers.cc',
'../fuzzer/wasm-section-fuzzers.h', 'wasm-section-fuzzers.h',
], ],
}, },
{ {
...@@ -376,8 +376,8 @@ ...@@ -376,8 +376,8 @@
'wasm-types-section.cc', 'wasm-types-section.cc',
'../common/wasm/wasm-module-runner.cc', '../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h', '../common/wasm/wasm-module-runner.h',
'../fuzzer/wasm-section-fuzzers.cc', 'wasm-section-fuzzers.cc',
'../fuzzer/wasm-section-fuzzers.h', 'wasm-section-fuzzers.h',
], ],
}, },
{ {
......
...@@ -54,6 +54,7 @@ v8_executable("unittests") { ...@@ -54,6 +54,7 @@ v8_executable("unittests") {
"compiler/js-operator-unittest.cc", "compiler/js-operator-unittest.cc",
"compiler/js-typed-lowering-unittest.cc", "compiler/js-typed-lowering-unittest.cc",
"compiler/linkage-tail-call-unittest.cc", "compiler/linkage-tail-call-unittest.cc",
"compiler/live-range-builder.h",
"compiler/live-range-unittest.cc", "compiler/live-range-unittest.cc",
"compiler/liveness-analyzer-unittest.cc", "compiler/liveness-analyzer-unittest.cc",
"compiler/load-elimination-unittest.cc", "compiler/load-elimination-unittest.cc",
...@@ -100,6 +101,7 @@ v8_executable("unittests") { ...@@ -100,6 +101,7 @@ v8_executable("unittests") {
"interpreter/bytecode-pipeline-unittest.cc", "interpreter/bytecode-pipeline-unittest.cc",
"interpreter/bytecode-register-allocator-unittest.cc", "interpreter/bytecode-register-allocator-unittest.cc",
"interpreter/bytecode-register-optimizer-unittest.cc", "interpreter/bytecode-register-optimizer-unittest.cc",
"interpreter/bytecode-utils.h",
"interpreter/bytecodes-unittest.cc", "interpreter/bytecodes-unittest.cc",
"interpreter/constant-array-builder-unittest.cc", "interpreter/constant-array-builder-unittest.cc",
"interpreter/interpreter-assembler-unittest.cc", "interpreter/interpreter-assembler-unittest.cc",
......
This diff is collapsed.
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
'compiler/js-typed-lowering-unittest.cc', 'compiler/js-typed-lowering-unittest.cc',
'compiler/linkage-tail-call-unittest.cc', 'compiler/linkage-tail-call-unittest.cc',
'compiler/liveness-analyzer-unittest.cc', 'compiler/liveness-analyzer-unittest.cc',
'compiler/live-range-builder.h',
'compiler/live-range-unittest.cc', 'compiler/live-range-unittest.cc',
'compiler/load-elimination-unittest.cc', 'compiler/load-elimination-unittest.cc',
'compiler/loop-peeling-unittest.cc', 'compiler/loop-peeling-unittest.cc',
...@@ -93,6 +94,7 @@ ...@@ -93,6 +94,7 @@
'interpreter/bytecode-pipeline-unittest.cc', 'interpreter/bytecode-pipeline-unittest.cc',
'interpreter/bytecode-register-allocator-unittest.cc', 'interpreter/bytecode-register-allocator-unittest.cc',
'interpreter/bytecode-register-optimizer-unittest.cc', 'interpreter/bytecode-register-optimizer-unittest.cc',
'interpreter/bytecode-utils.h',
'interpreter/constant-array-builder-unittest.cc', 'interpreter/constant-array-builder-unittest.cc',
'interpreter/interpreter-assembler-unittest.cc', 'interpreter/interpreter-assembler-unittest.cc',
'interpreter/interpreter-assembler-unittest.h', 'interpreter/interpreter-assembler-unittest.h',
......
...@@ -16,18 +16,21 @@ tool won't be accurate for other sources in other directories (e.g. cctest). ...@@ -16,18 +16,21 @@ tool won't be accurate for other sources in other directories (e.g. cctest).
import itertools import itertools
import re import re
import os import os
import sys
V8_BASE = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) V8_BASE = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
V8_SRC_BASE = os.path.join(V8_BASE, 'src') V8_SRC_BASE = os.path.join(V8_BASE, 'src')
V8_TEST_BASE = os.path.join(V8_BASE, 'test')
V8_INCLUDE_BASE = os.path.join(V8_BASE, 'include') V8_INCLUDE_BASE = os.path.join(V8_BASE, 'include')
GYP_FILES = [ GYP_FILES = [
os.path.join(V8_BASE, 'src', 'd8.gyp'), os.path.join(V8_BASE, 'src', 'd8.gyp'),
os.path.join(V8_BASE, 'src', 'v8.gyp'), os.path.join(V8_BASE, 'src', 'v8.gyp'),
os.path.join(V8_BASE, 'src', 'inspector', 'inspector.gyp'), os.path.join(V8_BASE, 'src', 'inspector', 'inspector.gypi'),
os.path.join(V8_BASE, 'src', 'third_party', 'vtune', 'v8vtune.gyp'), os.path.join(V8_BASE, 'src', 'third_party', 'vtune', 'v8vtune.gyp'),
os.path.join(V8_BASE, 'test', 'cctest', 'cctest.gyp'), os.path.join(V8_BASE, 'test', 'cctest', 'cctest.gyp'),
os.path.join(V8_BASE, 'test', 'fuzzer', 'fuzzer.gyp'),
os.path.join(V8_BASE, 'test', 'unittests', 'unittests.gyp'), os.path.join(V8_BASE, 'test', 'unittests', 'unittests.gyp'),
os.path.join(V8_BASE, 'tools', 'parser-shell.gyp'), os.path.join(V8_BASE, 'tools', 'parser-shell.gyp'),
] ]
...@@ -48,25 +51,46 @@ GN_UNSUPPORTED_FEATURES = [ ...@@ -48,25 +51,46 @@ GN_UNSUPPORTED_FEATURES = [
'ppc', 'ppc',
'qnx', 'qnx',
'solaris', 'solaris',
'valgrind',
'vtune', 'vtune',
'x87', 'x87',
] ]
ALL_GN_PREFIXES = [
'..',
os.path.join('src', 'inspector'),
'src',
os.path.join('test', 'cctest'),
os.path.join('test', 'unittests'),
]
ALL_GYP_PREFIXES = [
'..',
'common',
os.path.join('src', 'third_party', 'vtune'),
'src',
os.path.join('test', 'cctest'),
os.path.join('test', 'common'),
os.path.join('test', 'fuzzer'),
os.path.join('test', 'unittests'),
]
def path_no_prefix(path): def pathsplit(path):
for prefix in ['../', 'src/inspector/', 'src/']: return re.split('[/\\\\]', path)
if path.startswith(prefix):
return path_no_prefix(path[len(prefix):]) def path_no_prefix(path, prefixes):
for prefix in prefixes:
if path.startswith(prefix + os.sep):
return path_no_prefix(path[len(prefix) + 1:], prefixes)
return path return path
def isources(directory): def isources(directory, prefixes):
for root, dirs, files in os.walk(directory): for root, dirs, files in os.walk(directory):
for f in files: for f in files:
if not (f.endswith('.h') or f.endswith('.cc')): if not (f.endswith('.h') or f.endswith('.cc')):
continue continue
yield path_no_prefix(os.path.relpath(os.path.join(root, f), V8_BASE)) yield path_no_prefix(
os.path.relpath(os.path.join(root, f), V8_BASE), prefixes)
def iflatten(obj): def iflatten(obj):
...@@ -79,7 +103,7 @@ def iflatten(obj): ...@@ -79,7 +103,7 @@ def iflatten(obj):
for i in iflatten(value): for i in iflatten(value):
yield i yield i
elif isinstance(obj, basestring): elif isinstance(obj, basestring):
yield path_no_prefix(obj) yield path_no_prefix(os.path.join(*pathsplit(obj)), ALL_GYP_PREFIXES)
def iflatten_gyp_file(gyp_file): def iflatten_gyp_file(gyp_file):
...@@ -100,30 +124,46 @@ def iflatten_gn_file(gn_file): ...@@ -100,30 +124,46 @@ def iflatten_gn_file(gn_file):
for line in f.read().splitlines(): for line in f.read().splitlines():
match = re.match(r'.*"([^"]*)".*', line) match = re.match(r'.*"([^"]*)".*', line)
if match: if match:
yield path_no_prefix(match.group(1)) yield path_no_prefix(
os.path.join(*pathsplit(match.group(1))), ALL_GN_PREFIXES)
def icheck_values(values, *source_dirs): def icheck_values(values, prefixes, *source_dirs):
for source_file in itertools.chain( for source_file in itertools.chain(
*[isources(source_dir) for source_dir in source_dirs] *[isources(source_dir, prefixes) for source_dir in source_dirs]
): ):
if source_file not in values: if source_file not in values:
yield source_file yield source_file
gyp_values = set(itertools.chain( def missing_gyp_files():
*[iflatten_gyp_file(gyp_file) for gyp_file in GYP_FILES] gyp_values = set(itertools.chain(
)) *[iflatten_gyp_file(gyp_file) for gyp_file in GYP_FILES]
))
return sorted(icheck_values(
gyp_values, ALL_GYP_PREFIXES, V8_SRC_BASE, V8_INCLUDE_BASE, V8_TEST_BASE))
print "----------- Files not in gyp: ------------" def missing_gn_files():
for i in sorted(icheck_values(gyp_values, V8_SRC_BASE, V8_INCLUDE_BASE)): gn_values = set(itertools.chain(
print i *[iflatten_gn_file(gn_file) for gn_file in GN_FILES]
))
gn_values = set(itertools.chain( gn_files = sorted(icheck_values(
*[iflatten_gn_file(gn_file) for gn_file in GN_FILES] gn_values, ALL_GN_PREFIXES, V8_SRC_BASE, V8_INCLUDE_BASE, V8_TEST_BASE))
)) return filter(
lambda x: not any(i in x for i in GN_UNSUPPORTED_FEATURES), gn_files)
print "\n----------- Files not in gn: -------------"
for i in sorted(icheck_values(gn_values, V8_SRC_BASE, V8_INCLUDE_BASE)): def main():
if not any(f in i for f in GN_UNSUPPORTED_FEATURES): print "----------- Files not in gyp: ------------"
for i in missing_gyp_files():
print i
print "\n----------- Files not in gn: -------------"
for i in missing_gn_files():
print i print i
return 0
if '__main__' == __name__:
sys.exit(main())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment