diff --git a/include/cppgc/internal/meson.build b/include/cppgc/internal/meson.build new file mode 100644 index 0000000000..4d70740c00 --- /dev/null +++ b/include/cppgc/internal/meson.build @@ -0,0 +1,18 @@ +cppgc_internal_headers = [ + 'write-barrier.h', + 'gc-info.h', + 'persistent-node.h', + 'name-trait.h', + 'pointer-policies.h', + 'logging.h', + 'api-constants.h', + 'atomic-entry-flag.h', + 'member-storage.h', + 'compiler-specific.h', + 'finalizer-trait.h', + 'caged-heap-local-data.h', + 'base-page-handle.h', + 'caged-heap.h', +] + +install_headers(cppgc_internal_headers, subdir: install_header_subdir / 'cppgc' / 'internal') diff --git a/include/cppgc/meson.build b/include/cppgc/meson.build new file mode 100644 index 0000000000..c00cd4c626 --- /dev/null +++ b/include/cppgc/meson.build @@ -0,0 +1,34 @@ +cppgc_headers = [ + 'testing.h', + 'cross-thread-persistent.h', + 'name-provider.h', + 'persistent.h', + 'prefinalizer.h', + 'allocation.h', + 'process-heap-statistics.h', + 'ephemeron-pair.h', + 'custom-space.h', + 'type-traits.h', + 'heap-state.h', + 'default-platform.h', + 'heap-statistics.h', + 'heap-handle.h', + 'visitor.h', + 'garbage-collected.h', + 'trace-trait.h', + 'object-size-trait.h', + 'common.h', + 'heap-consistency.h', + 'macros.h', + 'heap.h', + 'sentinel-pointer.h', + 'liveness-broker.h', + 'member.h', + 'platform.h', + 'source-location.h', + 'explicit-management.h', +] + +install_headers(cppgc_headers, subdir: install_header_subdir / 'cppgc') + +subdir('internal') diff --git a/include/libplatform/meson.build b/include/libplatform/meson.build new file mode 100644 index 0000000000..9f74ea9af8 --- /dev/null +++ b/include/libplatform/meson.build @@ -0,0 +1,7 @@ +libplatform_headers = [ + 'libplatform-export.h', + 'libplatform.h', + 'v8-tracing.h', +] + +install_headers(libplatform_headers, subdir: install_header_subdir / 'libplatform') diff --git a/include/meson.build b/include/meson.build new file mode 100644 index 0000000000..4bd033f9e4 --- /dev/null +++ b/include/meson.build @@ -0,0 +1,71 @@ +install_header_subdir = 'v8-' + api_version + +v8_inspector_js_protocol = files('js_protocol.pdl') + +v8_headers = [ + 'v8-array-buffer.h', + 'v8-callbacks.h', + 'v8-container.h', + 'v8-context.h', + 'v8-cppgc.h', + 'v8-data.h', + 'v8-date.h', + 'v8-debug.h', + 'v8-embedder-heap.h', + 'v8-embedder-state-scope.h', + 'v8-exception.h', + 'v8-extension.h', + 'v8-external.h', + 'v8-fast-api-calls.h', + 'v8-forward.h', + 'v8-function-callback.h', + 'v8-function.h', + 'v8-initialization.h', + 'v8-inspector-protocol.h', + 'v8-inspector.h', + 'v8-internal.h', + 'v8-isolate.h', + 'v8-json.h', + 'v8-local-handle.h', + 'v8-locker.h', + 'v8-maybe.h', + 'v8-memory-span.h', + 'v8-message.h', + 'v8-metrics.h', + 'v8-microtask-queue.h', + 'v8-microtask.h', + 'v8-object.h', + 'v8-persistent-handle.h', + 'v8-platform.h', + 'v8-primitive-object.h', + 'v8-primitive.h', + 'v8-profiler.h', + 'v8-promise.h', + 'v8-proxy.h', + 'v8-regexp.h', + 'v8-script.h', + 'v8-snapshot.h', + 'v8-statistics.h', + 'v8-template.h', + 'v8-traced-handle.h', + 'v8-typed-array.h', + 'v8-unwinder-state.h', + 'v8-unwinder.h', + 'v8-util.h', + 'v8-value-serializer-version.h', + 'v8-value-serializer.h', + 'v8-value.h', + 'v8-version-string.h', + 'v8-version.h', + 'v8-wasm-trap-handler-posix.h', + 'v8-wasm-trap-handler-win.h', + 'v8-wasm.h', + 'v8-weak-callback-info.h', + 'v8.h', + 'v8config.h', +] + +install_headers(v8_headers, subdir: install_header_subdir) + +subdir('cppgc') +subdir('libplatform') diff --git a/meson.build b/meson.build new file mode 100644 index 0000000000..e6137bb07c --- /dev/null +++ b/meson.build @@ -0,0 +1,282 @@ +project('v8', 'cpp', + version: '10.6.122', +) + +api_version = '10.0' + +cpp = meson.get_compiler('cpp') +cpp_native = meson.get_compiler('cpp', native: true) +cpp_std = (cpp.get_id() == 'msvc') ? 'vc++17' : 'gnu++17' +cpp_options = [ + 'cpp_std=' + cpp_std, + 'cpp_eh=none', + 'cpp_rtti=false', +] + +python = import('python').find_installation().path() + +build_os = build_machine.system() +host_os = host_machine.system() + +target_conditionals_prefix = '#include ' +is_macos_src = target_conditionals_prefix + ''' +#if !TARGET_OS_OSX +# error Not macOS +#endif +''' +is_ios_src = target_conditionals_prefix + ''' +#if !TARGET_OS_IOS +# error Not iOS +#endif +''' + +if build_os == 'windows' + build_os = 'win' +elif build_os == 'darwin' + if cpp_native.compiles(is_macos_src, name: 'compiling on macOS') + build_os = 'macos' + elif cpp_native.compiles(is_ios_src, name: 'compiling on iOS') + build_os = 'ios' + endif +elif build_os == 'linux' and cpp_native.has_header('android/api-level.h') + build_os = 'android' +endif +if host_os == 'windows' + host_os = 'win' +elif host_os == 'darwin' + if cpp.compiles(is_macos_src, name: 'compiling for macOS') + host_os = 'macos' + elif cpp.compiles(is_ios_src, name: 'compiling for iOS') + host_os = 'ios' + endif +elif host_os == 'linux' and cpp.has_header('android/api-level.h') + host_os = 'android' +endif +host_os_nick = (host_os == 'macos') ? 'mac' : host_os + +v8_arch_from_cpu_family = { + 'x86': 'ia32', + 'x86_64': 'x64', + 'arm': 'arm', + 'aarch64': 'arm64', +} +build_arch = v8_arch_from_cpu_family[build_machine.cpu_family()] +host_arch = v8_arch_from_cpu_family[host_machine.cpu_family()] +host_is_64bit = cpp.sizeof('void *') == 8 + +if host_os in ['macos', 'ios'] and host_arch == 'arm64' + have_ptrauth_src = '''#ifdef __clang__ +# if __has_feature (ptrauth_calls) +# define HAVE_PTRAUTH 1 +# endif +#endif + +#ifndef HAVE_PTRAUTH +# error Pointer authentication not supported +#endif +''' + have_ptrauth = cpp.compiles(have_ptrauth_src, name: 'pointer authentication') +else + have_ptrauth = false +endif + +is_clang_or_non_windows = cpp.get_id() == 'clang' or host_os != 'win' +if not is_clang_or_non_windows + msvc_asm_tool_specs = { + 'ia32': { + 'tool': 'ml', + 'args': ['/nologo', '/Fo', '@OUTPUT@', '/c', '@INPUT@'], + }, + 'x64': { + 'tool': 'ml64', + 'args': ['/nologo', '/Fo', '@OUTPUT@', '/c', '@INPUT@'], + }, + 'arm64': { + 'tool': 'armasm64', + 'args': ['-nologo', '-o', '@OUTPUT@', '@INPUT@'], + }, + } + msvc_required_archs = [host_arch] + if not meson.can_run_host_binaries() + msvc_required_archs += build_arch + endif + msvc_asm_commands = {} + foreach arch : msvc_required_archs + spec = msvc_asm_tool_specs[arch] + tool = find_program(spec['tool']) + args = spec['args'] + msvc_asm_commands += { arch: [tool] + args } + endforeach +endif + +zlib_dep = dependency('zlib') +if not meson.can_run_host_binaries() + zlib_native_dep = dependency('zlib', native: true) +endif + +extra_libs_private = { + 'win': [ + 'winmm.lib', + 'ws2_32.lib', + ], + 'android': ['-llog'], +} + +public_incdirs = include_directories('include') +internal_incdirs = include_directories( + '.', + 'src', + 'include', +) + +config_args = [ + '-DV8_HAVE_TARGET_OS', + '-DV8_TARGET_OS_' + host_os.to_upper(), + '-DV8_TARGET_ARCH_' + host_arch.to_upper(), + '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64', + '-DV8_ATOMIC_OBJECT_FIELD_WRITES', + '-DV8_ENABLE_LAZY_SOURCE_POSITIONS', + '-DV8_WIN64_UNWINDING_INFO', + '-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH', + '-DV8_ALLOCATION_FOLDING', + '-DV8_ALLOCATION_SITE_TRACKING', + '-DV8_DEPRECATION_WARNINGS', + '-DV8_IMMINENT_DEPRECATION_WARNINGS', + '-DV8_RUNTIME_CALL_STATS', + '-DV8_DISABLE_TESTS', + '-DDYNAMIC_ANNOTATIONS_ENABLED=0', + '-DOFFICIAL_BUILD', + '-DUSE_SYSTEM_ZLIB', + '-DNVALGRIND', +] + +if get_option('default_library') != 'static' + config_args += [ + '-DBUILDING_V8_SHARED', + '-DBUILDING_V8_PLATFORM_SHARED', + ] +endif + +embedder_string = get_option('embedder_string') +if embedder_string != '' + config_args += f'-DV8_EMBEDDER_STRING="@embedder_string@"' +endif + +if have_ptrauth + config_args += '-DV8_TARGET_PTRAUTH' +endif + +enable_advanced_bigint_algorithms = get_option('advanced_bigint_algorithms').allowed() +if enable_advanced_bigint_algorithms + config_args += '-DV8_ADVANCED_BIGINT_ALGORITHMS' +endif + +if get_option('pointer_compression').auto() + enable_pointer_compression = host_is_64bit +else + enable_pointer_compression = get_option('pointer_compression').allowed() +endif +if enable_pointer_compression + config_args += '-DCPPGC_POINTER_COMPRESSION' +endif + +if get_option('shared_ro_heap').auto() + enable_shared_ro_heap = enable_pointer_compression +else + enable_shared_ro_heap = get_option('shared_ro_heap').allowed() +endif +if enable_shared_ro_heap + config_args += '-DV8_SHARED_RO_HEAP' +endif + +caged_heap_supported = host_is_64bit +if get_option('caged_heap').auto() + enable_caged_heap = caged_heap_supported +elif get_option('caged_heap').enabled() + if not caged_heap_supported + error('CppGC caged heap requires 64bit platforms') + endif + enable_caged_heap = true +else + enable_caged_heap = false +endif +if enable_caged_heap + config_args += [ + '-DCPPGC_CAGED_HEAP', + '-DCPPGC_YOUNG_GENERATION', + ] +endif + +enable_i18n = get_option('i18n').allowed() + +if get_option('maglev').auto() + enable_maglev = host_arch == 'x64' and enable_pointer_compression +else + enable_maglev = get_option('maglev').allowed() +endif + +enable_wasm = get_option('wasm').allowed() +if enable_wasm + config_args += '-DV8_ENABLE_WEBASSEMBLY' +endif + +if get_option('system_instrumentation').auto() + enable_system_instrumentation = host_os in ['win', 'macos'] +else + enable_system_instrumentation = get_option('system_instrumentation').allowed() +endif +if enable_system_instrumentation + config_args += '-DV8_ENABLE_SYSTEM_INSTRUMENTATION' +endif + +if host_os == 'win' + config_args += [ + '-DUNICODE', + '-D_UNICODE', + '-D_CRT_RAND_S', + '-DNOMINMAX', + ] + if cpp.get_id() == 'msvc' + config_args += [ + '/wd4146', + '/wd4244', + '/wd4251', + '/wd4267', + '/wd4275', + '/wd4312', + '/wd4506', + '/wd4530', + '/wd4661', + '/wd4700', + '/wd4715', + '/wd4716', + '/wd4838', + ] + endif + if cpp.get_define('_WIN32_WINNT') == '' + config_args += [ + '-DWINVER=0x0501', + '-D_WIN32_WINNT=0x0501', + ] + endif +endif + +add_project_arguments( + config_args + cpp.get_supported_arguments([ + '-Wno-non-virtual-dtor', + ]), + language: 'cpp' +) +add_project_arguments( + config_args + cpp.get_supported_arguments([ + '-Wno-non-virtual-dtor', + ]), + language: 'cpp', + native: true +) + +run_codegen = [python, files('tools' / 'meson-run-codegen.py')] + +subdir('include') +subdir('third_party') +subdir('src') diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000000..4d65c51d6f --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,53 @@ +option('embedder_string', + type: 'string', + value: '', + description: 'Embedder string' +) + +option('advanced_bigint_algorithms', + type: 'feature', + value: 'auto', + description: 'Enable advanced BigInt algorithms, costing about 10-30 KB binary size depending on platform' +) + +option('pointer_compression', + type: 'feature', + value: 'disabled', + description: 'Enable pointer compression' +) + +option('shared_ro_heap', + type: 'feature', + value: 'auto', + description: 'Enable sharing read-only space across isolates' +) + +option('caged_heap', + type: 'feature', + value: 'disabled', + description: 'Enable heap reservation of size 4GB' +) + +option('i18n', + type: 'feature', + value: 'disabled', + description: 'Internationalization support' +) + +option('maglev', + type: 'feature', + value: 'disabled', + description: 'Maglev mid-tier optimizing compiler' +) + +option('wasm', + type: 'feature', + value: 'auto', + description: 'WebAssembly' +) + +option('system_instrumentation', + type: 'feature', + value: 'disabled', + description: 'Enable OS-dependent event tracing' +) diff --git a/src/builtins-generated/meson.build b/src/builtins-generated/meson.build new file mode 100644 index 0000000000..2fc05a3e64 --- /dev/null +++ b/src/builtins-generated/meson.build @@ -0,0 +1,7 @@ +bytecodes_builtins_list_h = custom_target('v8-bytecode-builtins-list', + output: 'bytecodes-builtins-list.h', + command: [ + bytecode_builtins_list_generator, + '@OUTPUT@' + ], +) diff --git a/src/inspector/meson.build b/src/inspector/meson.build new file mode 100644 index 0000000000..8c37a3c8d8 --- /dev/null +++ b/src/inspector/meson.build @@ -0,0 +1,95 @@ +v8_inspector_sources = [ + 'custom-preview.cc', + 'injected-script.cc', + 'inspected-context.cc', + 'remote-object-id.cc', + 'search-util.cc', + 'string-16.cc', + 'string-util.cc', + 'test-interface.cc', + 'v8-console-agent-impl.cc', + 'v8-console-message.cc', + 'v8-console.cc', + 'v8-debugger-agent-impl.cc', + 'v8-debugger-id.cc', + 'v8-debugger-script.cc', + 'v8-debugger.cc', + 'v8-heap-profiler-agent-impl.cc', + 'v8-inspector-impl.cc', + 'v8-inspector-session-impl.cc', + 'v8-profiler-agent-impl.cc', + 'v8-regex.cc', + 'v8-runtime-agent-impl.cc', + 'v8-schema-agent-impl.cc', + 'v8-stack-trace-impl.cc', + 'v8-value-utils.cc', + 'v8-webdriver-serializer.cc', + 'value-mirror.cc', + 'v8-string-conversions.cc', +] + +v8_inspector_protocol_generated_outputs = [ + 'Debugger.h', + 'Runtime.h', + 'Schema.h', + 'protocol_Forward.h', + 'protocol_Protocol.cpp', + 'protocol_Protocol.h', + 'protocol_Console.cpp', + 'protocol_Console.h', + 'protocol_Debugger.cpp', + 'protocol_Debugger.h', + 'protocol_HeapProfiler.cpp', + 'protocol_HeapProfiler.h', + 'protocol_Profiler.cpp', + 'protocol_Profiler.h', + 'protocol_Runtime.cpp', + 'protocol_Runtime.h', + 'protocol_Schema.cpp', + 'protocol_Schema.h', +] + +v8_inspector_header_install_dir = get_option('includedir') / install_header_subdir / 'inspector' + +v8_inspector_protocol_generated_install_dir = [] +foreach i : range(v8_inspector_protocol_generated_outputs.length()) + if i < 3 + dir = v8_inspector_header_install_dir + else + dir = false + endif + v8_inspector_protocol_generated_install_dir += dir +endforeach + +v8_inspector_protocol_generated_sources = custom_target('v8-inspector-protocol-generated-sources', + input: [ + 'inspector_protocol_config.json', + v8_inspector_js_protocol, + v8_inspector_protocol_templates, + ], + output: v8_inspector_protocol_generated_outputs, + command: [ + run_codegen, + '--output-directory', '@OUTDIR@', + '--link-directory', '..' / '..' / 'include' / 'inspector', + '--flatten-directory', 'protocol', + '--', + v8_inspector_protocol_generator, + '--jinja_dir', jinja_dir, + '--output_base', '@OUTDIR@', + '--config', '@INPUT0@', + '--inspector_protocol_dir', v8_inspector_protocol_dir, + '--config_value', 'protocol.path=@INPUT1@', + ], + install: true, + install_dir: v8_inspector_protocol_generated_install_dir, +) + +v8_inspector = static_library('v8-inspector', [ + v8_inspector_sources, + v8_inspector_protocol_generated_sources, + crdtp_sources, + ], + override_options: cpp_options, + dependencies: [v8_libbase_dep], +) diff --git a/src/libplatform/meson.build b/src/libplatform/meson.build new file mode 100644 index 0000000000..8016358591 --- /dev/null +++ b/src/libplatform/meson.build @@ -0,0 +1,39 @@ +libplatform_sources = [ + 'default-foreground-task-runner.cc', + 'default-job.cc', + 'default-platform.cc', + 'default-worker-threads-task-runner.cc', + 'delayed-task-queue.cc', + 'task-queue.cc', + 'tracing' / 'trace-buffer.cc', + 'tracing' / 'trace-config.cc', + 'tracing' / 'trace-object.cc', + 'tracing' / 'trace-writer.cc', + 'tracing' / 'tracing-controller.cc', + 'worker-thread.cc', +] + +if enable_system_instrumentation + libplatform_sources += 'tracing' / f'recorder-@host_os_nick@.cc' +endif + +v8_libplatform = static_library('v8-libplatform', libplatform_sources, + override_options: cpp_options, + dependencies: [v8_libbase_dep], +) +if meson.can_run_host_binaries() + v8_libplatform_native = v8_libplatform +else + v8_libplatform_native = static_library('v8-libplatform-native', libplatform_sources, + override_options: cpp_options, + dependencies: [v8_libbase_native_dep], + native: true, + ) +endif + +v8_libplatform_dep = declare_dependency( + link_with: v8_libplatform, +) +v8_libplatform_native_dep = declare_dependency( + link_with: v8_libplatform_native, +) diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000000..aaa9d17f2b --- /dev/null +++ b/src/meson.build @@ -0,0 +1,1137 @@ +libbase_common_sources = [ + 'base' / 'bits.cc', + 'base' / 'bounded-page-allocator.cc', + 'base' / 'cpu.cc', + 'base' / 'debug' / 'stack_trace.cc', + 'base' / 'division-by-constant.cc', + 'base' / 'emulated-virtual-address-subspace.cc', + 'base' / 'file-utils.cc', + 'base' / 'functional.cc', + 'base' / 'ieee754.cc', + 'base' / 'lazy-instance.cc', + 'base' / 'logging.cc', + 'base' / 'numbers' / 'bignum-dtoa.cc', + 'base' / 'numbers' / 'bignum.cc', + 'base' / 'numbers' / 'cached-powers.cc', + 'base' / 'numbers' / 'diy-fp.cc', + 'base' / 'numbers' / 'dtoa.cc', + 'base' / 'numbers' / 'fast-dtoa.cc', + 'base' / 'numbers' / 'fixed-dtoa.cc', + 'base' / 'numbers' / 'strtod.cc', + 'base' / 'once.cc', + 'base' / 'page-allocator.cc', + 'base' / 'platform' / 'threading-backend.cc', + 'base' / 'platform' / 'condition-variable.cc', + 'base' / 'platform' / 'memory-protection-key.cc', + 'base' / 'platform' / 'mutex.cc', + 'base' / 'platform' / 'semaphore.cc', + 'base' / 'platform' / 'time.cc', + 'base' / 'region-allocator.cc', + 'base' / 'sanitizer' / 'lsan-page-allocator.cc', + 'base' / 'sanitizer' / 'lsan-virtual-address-space.cc', + 'base' / 'strings.cc', + 'base' / 'sys-info.cc', + 'base' / 'utils' / 'random-number-generator.cc', + 'base' / 'virtual-address-space-page-allocator.cc', + 'base' / 'virtual-address-space.cc', + 'base' / 'vlq-base64.cc', +] + +libbase_posix_sources = [ + 'base' / 'platform' / 'platform-posix.cc', + 'base' / 'platform' / 'platform-posix-time.cc', +] + +libbase_os_sources = { + 'win': [ + 'base' / 'debug' / 'stack_trace_win.cc', + 'base' / 'platform' / 'platform-win32.cc', + ], + 'macos': libbase_posix_sources + [ + 'base' / 'debug' / 'stack_trace_posix.cc', + 'base' / 'platform' / 'platform-darwin.cc', + 'base' / 'platform' / 'platform-macos.cc', + ], + 'linux': libbase_posix_sources + [ + 'base' / 'debug' / 'stack_trace_posix.cc', + 'base' / 'platform' / 'platform-linux.cc', + ], + 'ios': libbase_posix_sources + [ + 'base' / 'debug' / 'stack_trace_posix.cc', + 'base' / 'platform' / 'platform-darwin.cc', + ], + 'android': libbase_posix_sources + [ + 'base' / 'debug' / 'stack_trace_android.cc', + 'base' / 'platform' / 'platform-linux.cc', + ], + 'freebsd': libbase_posix_sources + [ + 'base' / 'debug' / 'stack_trace_posix.cc', + 'base' / 'platform' / 'platform-freebsd.cc', + ], +} + +v8_libbase = static_library('v8-libbase', libbase_common_sources + libbase_os_sources.get(host_os, []), + override_options: cpp_options, + include_directories: internal_incdirs, +) +if meson.can_run_host_binaries() + v8_libbase_native = v8_libbase +else + v8_libbase_native = static_library('v8-libbase-native', libbase_common_sources + libbase_os_sources.get(build_os, []), + override_options: cpp_options, + include_directories: internal_incdirs, + native: true, + ) +endif + +v8_libbase_dep = declare_dependency( + include_directories: internal_incdirs, + link_args: extra_libs_private.get(host_os, []), + link_with: v8_libbase, +) +v8_libbase_native_dep = declare_dependency( + include_directories: internal_incdirs, + link_args: extra_libs_private.get(build_os, []), + link_with: v8_libbase_native, +) + +base_sources = [ + 'api' / 'api-arguments.cc', + 'api' / 'api-natives.cc', + 'api' / 'api.cc', + 'ast' / 'ast-function-literal-id-reindexer.cc', + 'ast' / 'ast-value-factory.cc', + 'ast' / 'ast.cc', + 'ast' / 'modules.cc', + 'ast' / 'prettyprinter.cc', + 'ast' / 'scopes.cc', + 'ast' / 'source-range-ast-visitor.cc', + 'ast' / 'variables.cc', + 'baseline' / 'baseline-batch-compiler.cc', + 'baseline' / 'baseline-compiler.cc', + 'baseline' / 'baseline.cc', + 'baseline' / 'bytecode-offset-iterator.cc', + 'builtins' / 'accessors.cc', + 'builtins' / 'builtins-api.cc', + 'builtins' / 'builtins-array.cc', + 'builtins' / 'builtins-arraybuffer.cc', + 'builtins' / 'builtins-async-module.cc', + 'builtins' / 'builtins-atomics-synchronization.cc', + 'builtins' / 'builtins-bigint.cc', + 'builtins' / 'builtins-callsite.cc', + 'builtins' / 'builtins-collections.cc', + 'builtins' / 'builtins-console.cc', + 'builtins' / 'builtins-dataview.cc', + 'builtins' / 'builtins-date.cc', + 'builtins' / 'builtins-error.cc', + 'builtins' / 'builtins-function.cc', + 'builtins' / 'builtins-global.cc', + 'builtins' / 'builtins-internal.cc', + 'builtins' / 'builtins-json.cc', + 'builtins' / 'builtins-number.cc', + 'builtins' / 'builtins-object.cc', + 'builtins' / 'builtins-reflect.cc', + 'builtins' / 'builtins-regexp.cc', + 'builtins' / 'builtins-shadow-realm.cc', + 'builtins' / 'builtins-shared-array.cc', + 'builtins' / 'builtins-sharedarraybuffer.cc', + 'builtins' / 'builtins-string.cc', + 'builtins' / 'builtins-struct.cc', + 'builtins' / 'builtins-symbol.cc', + 'builtins' / 'builtins-temporal.cc', + 'builtins' / 'builtins-trace.cc', + 'builtins' / 'builtins-typed-array.cc', + 'builtins' / 'builtins-weak-refs.cc', + 'builtins' / 'builtins-web-snapshots.cc', + 'builtins' / 'builtins.cc', + 'builtins' / 'constants-table-builder.cc', + 'codegen' / 'aligned-slot-allocator.cc', + 'codegen' / 'assembler.cc', + 'codegen' / 'bailout-reason.cc', + 'codegen' / 'code-comments.cc', + 'codegen' / 'code-desc.cc', + 'codegen' / 'code-factory.cc', + 'codegen' / 'code-reference.cc', + 'codegen' / 'compilation-cache.cc', + 'codegen' / 'compiler.cc', + 'codegen' / 'constant-pool.cc', + 'codegen' / 'external-reference-encoder.cc', + 'codegen' / 'external-reference-table.cc', + 'codegen' / 'external-reference.cc', + 'codegen' / 'flush-instruction-cache.cc', + 'codegen' / 'handler-table.cc', + 'codegen' / 'interface-descriptors.cc', + 'codegen' / 'machine-type.cc', + 'codegen' / 'maglev-safepoint-table.cc', + 'codegen' / 'optimized-compilation-info.cc', + 'codegen' / 'pending-optimization-table.cc', + 'codegen' / 'register-configuration.cc', + 'codegen' / 'reloc-info.cc', + 'codegen' / 'safepoint-table.cc', + 'codegen' / 'source-position-table.cc', + 'codegen' / 'source-position.cc', + 'codegen' / 'string-constants.cc', + 'codegen' / 'tick-counter.cc', + 'codegen' / 'tnode.cc', + 'codegen' / 'turbo-assembler.cc', + 'codegen' / 'unoptimized-compilation-info.cc', + 'common' / 'assert-scope.cc', + 'common' / 'code-memory-access.cc', + 'compiler-dispatcher' / 'lazy-compile-dispatcher.cc', + 'compiler-dispatcher' / 'optimizing-compile-dispatcher.cc', + 'date' / 'date.cc', + 'date' / 'dateparser.cc', + 'debug' / 'debug-coverage.cc', + 'debug' / 'debug-evaluate.cc', + 'debug' / 'debug-frames.cc', + 'debug' / 'debug-interface.cc', + 'debug' / 'debug-property-iterator.cc', + 'debug' / 'debug-scope-iterator.cc', + 'debug' / 'debug-scopes.cc', + 'debug' / 'debug-stack-trace-iterator.cc', + 'debug' / 'debug-type-profile.cc', + 'debug' / 'debug.cc', + 'debug' / 'liveedit-diff.cc', + 'debug' / 'liveedit.cc', + 'deoptimizer' / 'deoptimize-reason.cc', + 'deoptimizer' / 'deoptimized-frame-info.cc', + 'deoptimizer' / 'deoptimizer.cc', + 'deoptimizer' / 'materialized-object-store.cc', + 'deoptimizer' / 'translated-state.cc', + 'deoptimizer' / 'translation-array.cc', + 'diagnostics' / 'basic-block-profiler.cc', + 'diagnostics' / 'compilation-statistics.cc', + 'diagnostics' / 'disassembler.cc', + 'diagnostics' / 'eh-frame.cc', + 'diagnostics' / 'gdb-jit.cc', + 'diagnostics' / 'objects-debug.cc', + 'diagnostics' / 'objects-printer.cc', + 'diagnostics' / 'perf-jit.cc', + 'diagnostics' / 'unwinder.cc', + 'execution' / 'arguments.cc', + 'execution' / 'clobber-registers.cc', + 'execution' / 'embedder-state.cc', + 'execution' / 'encoded-c-signature.cc', + 'execution' / 'execution.cc', + 'execution' / 'frames.cc', + 'execution' / 'futex-emulation.cc', + 'execution' / 'interrupts-scope.cc', + 'execution' / 'isolate.cc', + 'execution' / 'local-isolate.cc', + 'execution' / 'messages.cc', + 'execution' / 'microtask-queue.cc', + 'execution' / 'protectors.cc', + 'execution' / 'simulator-base.cc', + 'execution' / 'stack-guard.cc', + 'execution' / 'thread-id.cc', + 'execution' / 'thread-local-top.cc', + 'execution' / 'tiering-manager.cc', + 'execution' / 'v8threads.cc', + 'extensions' / 'cputracemark-extension.cc', + 'extensions' / 'externalize-string-extension.cc', + 'extensions' / 'gc-extension.cc', + 'extensions' / 'ignition-statistics-extension.cc', + 'extensions' / 'statistics-extension.cc', + 'extensions' / 'trigger-failure-extension.cc', + 'flags' / 'flags.cc', + 'handles' / 'global-handles.cc', + 'handles' / 'handles.cc', + 'handles' / 'local-handles.cc', + 'handles' / 'persistent-handles.cc', + 'bigint' / 'bigint-internal.cc', + 'bigint' / 'bitwise.cc', + 'bigint' / 'div-burnikel.cc', + 'bigint' / 'div-helpers.cc', + 'bigint' / 'div-schoolbook.cc', + 'bigint' / 'fromstring.cc', + 'bigint' / 'mul-karatsuba.cc', + 'bigint' / 'mul-schoolbook.cc', + 'bigint' / 'tostring.cc', + 'bigint' / 'vector-arithmetic.cc', + 'heap' / 'allocation-observer.cc', + 'heap' / 'array-buffer-sweeper.cc', + 'heap' / 'base-space.cc', + 'heap' / 'basic-memory-chunk.cc', + 'heap' / 'code-object-registry.cc', + 'heap' / 'code-range.cc', + 'heap' / 'code-stats.cc', + 'heap' / 'collection-barrier.cc', + 'heap' / 'combined-heap.cc', + 'heap' / 'concurrent-allocator.cc', + 'heap' / 'concurrent-marking.cc', + 'heap' / 'cppgc-js' / 'cpp-heap.cc', + 'heap' / 'cppgc-js' / 'cpp-snapshot.cc', + 'heap' / 'cppgc-js' / 'unified-heap-marking-state.cc', + 'heap' / 'cppgc-js' / 'unified-heap-marking-verifier.cc', + 'heap' / 'cppgc-js' / 'unified-heap-marking-visitor.cc', + 'heap' / 'embedder-tracing.cc', + 'heap' / 'factory-base.cc', + 'heap' / 'factory.cc', + 'heap' / 'finalization-registry-cleanup-task.cc', + 'heap' / 'free-list.cc', + 'heap' / 'gc-idle-time-handler.cc', + 'heap' / 'gc-tracer.cc', + 'heap' / 'heap-allocator.cc', + 'heap' / 'heap-controller.cc', + 'heap' / 'heap-layout-tracer.cc', + 'heap' / 'heap-write-barrier.cc', + 'heap' / 'heap.cc', + 'heap' / 'incremental-marking-job.cc', + 'heap' / 'incremental-marking.cc', + 'heap' / 'index-generator.cc', + 'heap' / 'invalidated-slots.cc', + 'heap' / 'large-spaces.cc', + 'heap' / 'local-factory.cc', + 'heap' / 'local-heap.cc', + 'heap' / 'mark-compact.cc', + 'heap' / 'marking-barrier.cc', + 'heap' / 'marking-worklist.cc', + 'heap' / 'marking.cc', + 'heap' / 'memory-allocator.cc', + 'heap' / 'memory-chunk-layout.cc', + 'heap' / 'memory-chunk.cc', + 'heap' / 'memory-measurement.cc', + 'heap' / 'memory-reducer.cc', + 'heap' / 'new-spaces.cc', + 'heap' / 'object-stats.cc', + 'heap' / 'objects-visiting.cc', + 'heap' / 'paged-spaces.cc', + 'heap' / 'read-only-heap.cc', + 'heap' / 'read-only-spaces.cc', + 'heap' / 'safepoint.cc', + 'heap' / 'scavenge-job.cc', + 'heap' / 'scavenger.cc', + 'heap' / 'slot-set.cc', + 'heap' / 'spaces.cc', + 'heap' / 'stress-marking-observer.cc', + 'heap' / 'stress-scavenge-observer.cc', + 'heap' / 'sweeper.cc', + 'heap' / 'weak-object-worklists.cc', + 'heap' / 'third-party' / 'heap-api-stub.cc', + 'heap' / 'base' / 'active-system-pages.cc', + 'heap' / 'base' / 'stack.cc', + 'heap' / 'base' / 'worklist.cc', + 'heap' / 'cppgc' / 'allocation.cc', + 'heap' / 'cppgc' / 'compaction-worklists.cc', + 'heap' / 'cppgc' / 'compactor.cc', + 'heap' / 'cppgc' / 'concurrent-marker.cc', + 'heap' / 'cppgc' / 'explicit-management.cc', + 'heap' / 'cppgc' / 'free-list.cc', + 'heap' / 'cppgc' / 'gc-info-table.cc', + 'heap' / 'cppgc' / 'gc-info.cc', + 'heap' / 'cppgc' / 'gc-invoker.cc', + 'heap' / 'cppgc' / 'heap-base.cc', + 'heap' / 'cppgc' / 'heap-consistency.cc', + 'heap' / 'cppgc' / 'heap-growing.cc', + 'heap' / 'cppgc' / 'heap-object-header.cc', + 'heap' / 'cppgc' / 'heap-page.cc', + 'heap' / 'cppgc' / 'heap-space.cc', + 'heap' / 'cppgc' / 'heap-state.cc', + 'heap' / 'cppgc' / 'heap-statistics-collector.cc', + 'heap' / 'cppgc' / 'heap.cc', + 'heap' / 'cppgc' / 'incremental-marking-schedule.cc', + 'heap' / 'cppgc' / 'liveness-broker.cc', + 'heap' / 'cppgc' / 'logging.cc', + 'heap' / 'cppgc' / 'marker.cc', + 'heap' / 'cppgc' / 'marking-state.cc', + 'heap' / 'cppgc' / 'marking-verifier.cc', + 'heap' / 'cppgc' / 'marking-visitor.cc', + 'heap' / 'cppgc' / 'marking-worklists.cc', + 'heap' / 'cppgc' / 'member-storage.cc', + 'heap' / 'cppgc' / 'memory.cc', + 'heap' / 'cppgc' / 'name-trait.cc', + 'heap' / 'cppgc' / 'object-allocator.cc', + 'heap' / 'cppgc' / 'object-size-trait.cc', + 'heap' / 'cppgc' / 'page-memory.cc', + 'heap' / 'cppgc' / 'persistent-node.cc', + 'heap' / 'cppgc' / 'platform.cc', + 'heap' / 'cppgc' / 'pointer-policies.cc', + 'heap' / 'cppgc' / 'prefinalizer-handler.cc', + 'heap' / 'cppgc' / 'process-heap-statistics.cc', + 'heap' / 'cppgc' / 'process-heap.cc', + 'heap' / 'cppgc' / 'raw-heap.cc', + 'heap' / 'cppgc' / 'remembered-set.cc', + 'heap' / 'cppgc' / 'source-location.cc', + 'heap' / 'cppgc' / 'stats-collector.cc', + 'heap' / 'cppgc' / 'sweeper.cc', + 'heap' / 'cppgc' / 'testing.cc', + 'heap' / 'cppgc' / 'trace-trait.cc', + 'heap' / 'cppgc' / 'virtual-memory.cc', + 'heap' / 'cppgc' / 'visitor.cc', + 'heap' / 'cppgc' / 'write-barrier.cc', + 'ic' / 'call-optimization.cc', + 'ic' / 'handler-configuration.cc', + 'ic' / 'ic-stats.cc', + 'ic' / 'ic.cc', + 'ic' / 'stub-cache.cc', + 'init' / 'bootstrapper.cc', + 'init' / 'icu_util.cc', + 'init' / 'isolate-allocator.cc', + 'init' / 'startup-data-util.cc', + 'init' / 'v8.cc', + 'interpreter' / 'bytecode-array-builder.cc', + 'interpreter' / 'bytecode-array-iterator.cc', + 'interpreter' / 'bytecode-array-random-iterator.cc', + 'interpreter' / 'bytecode-array-writer.cc', + 'interpreter' / 'bytecode-decoder.cc', + 'interpreter' / 'bytecode-flags.cc', + 'interpreter' / 'bytecode-generator.cc', + 'interpreter' / 'bytecode-label.cc', + 'interpreter' / 'bytecode-node.cc', + 'interpreter' / 'bytecode-operands.cc', + 'interpreter' / 'bytecode-register-optimizer.cc', + 'interpreter' / 'bytecode-register.cc', + 'interpreter' / 'bytecode-source-info.cc', + 'interpreter' / 'bytecodes.cc', + 'interpreter' / 'constant-array-builder.cc', + 'interpreter' / 'control-flow-builders.cc', + 'interpreter' / 'handler-table-builder.cc', + 'interpreter' / 'interpreter-intrinsics.cc', + 'interpreter' / 'interpreter.cc', + 'json' / 'json-parser.cc', + 'json' / 'json-stringifier.cc', + 'libsampler' / 'sampler.cc', + 'logging' / 'counters.cc', + 'logging' / 'local-logger.cc', + 'logging' / 'log-file.cc', + 'logging' / 'log.cc', + 'logging' / 'metrics.cc', + 'logging' / 'runtime-call-stats.cc', + 'logging' / 'tracing-flags.cc', + 'numbers' / 'conversions.cc', + 'numbers' / 'math-random.cc', + 'objects' / 'backing-store.cc', + 'objects' / 'bigint.cc', + 'objects' / 'call-site-info.cc', + 'objects' / 'code-kind.cc', + 'objects' / 'code.cc', + 'objects' / 'compilation-cache-table.cc', + 'objects' / 'contexts.cc', + 'objects' / 'debug-objects.cc', + 'objects' / 'elements-kind.cc', + 'objects' / 'elements.cc', + 'objects' / 'embedder-data-array.cc', + 'objects' / 'feedback-vector.cc', + 'objects' / 'field-type.cc', + 'objects' / 'js-array-buffer.cc', + 'objects' / 'js-atomics-synchronization.cc', + 'objects' / 'js-function.cc', + 'objects' / 'js-objects.cc', + 'objects' / 'js-regexp.cc', + 'objects' / 'js-temporal-objects.cc', + 'objects' / 'keys.cc', + 'objects' / 'literal-objects.cc', + 'objects' / 'lookup-cache.cc', + 'objects' / 'lookup.cc', + 'objects' / 'managed.cc', + 'objects' / 'map-updater.cc', + 'objects' / 'map.cc', + 'objects' / 'module.cc', + 'objects' / 'object-type.cc', + 'objects' / 'objects.cc', + 'objects' / 'option-utils.cc', + 'objects' / 'ordered-hash-table.cc', + 'objects' / 'property-descriptor.cc', + 'objects' / 'property.cc', + 'objects' / 'scope-info.cc', + 'objects' / 'shared-function-info.cc', + 'objects' / 'simd.cc', + 'objects' / 'source-text-module.cc', + 'objects' / 'string-comparator.cc', + 'objects' / 'string-table.cc', + 'objects' / 'string.cc', + 'objects' / 'swiss-name-dictionary.cc', + 'objects' / 'symbol-table.cc', + 'objects' / 'synthetic-module.cc', + 'objects' / 'tagged-impl.cc', + 'objects' / 'template-objects.cc', + 'objects' / 'templates.cc', + 'objects' / 'transitions.cc', + 'objects' / 'type-hints.cc', + 'objects' / 'value-serializer.cc', + 'objects' / 'visitors.cc', + 'parsing' / 'func-name-inferrer.cc', + 'parsing' / 'import-assertions.cc', + 'parsing' / 'literal-buffer.cc', + 'parsing' / 'parse-info.cc', + 'parsing' / 'parser.cc', + 'parsing' / 'parsing.cc', + 'parsing' / 'pending-compilation-error-handler.cc', + 'parsing' / 'preparse-data.cc', + 'parsing' / 'preparser.cc', + 'parsing' / 'rewriter.cc', + 'parsing' / 'scanner-character-streams.cc', + 'parsing' / 'scanner.cc', + 'parsing' / 'token.cc', + 'profiler' / 'allocation-tracker.cc', + 'profiler' / 'cpu-profiler.cc', + 'profiler' / 'heap-profiler.cc', + 'profiler' / 'heap-snapshot-generator.cc', + 'profiler' / 'profile-generator.cc', + 'profiler' / 'profiler-listener.cc', + 'profiler' / 'profiler-stats.cc', + 'profiler' / 'sampling-heap-profiler.cc', + 'profiler' / 'strings-storage.cc', + 'profiler' / 'symbolizer.cc', + 'profiler' / 'tick-sample.cc', + 'profiler' / 'tracing-cpu-profiler.cc', + 'profiler' / 'weak-code-registry.cc', + 'regexp' / 'experimental' / 'experimental-bytecode.cc', + 'regexp' / 'experimental' / 'experimental-compiler.cc', + 'regexp' / 'experimental' / 'experimental-interpreter.cc', + 'regexp' / 'experimental' / 'experimental.cc', + 'regexp' / 'property-sequences.cc', + 'regexp' / 'regexp-ast.cc', + 'regexp' / 'regexp-bytecode-generator.cc', + 'regexp' / 'regexp-bytecode-peephole.cc', + 'regexp' / 'regexp-bytecodes.cc', + 'regexp' / 'regexp-compiler-tonode.cc', + 'regexp' / 'regexp-compiler.cc', + 'regexp' / 'regexp-dotprinter.cc', + 'regexp' / 'regexp-error.cc', + 'regexp' / 'regexp-interpreter.cc', + 'regexp' / 'regexp-macro-assembler-tracer.cc', + 'regexp' / 'regexp-macro-assembler.cc', + 'regexp' / 'regexp-parser.cc', + 'regexp' / 'regexp-stack.cc', + 'regexp' / 'regexp-utils.cc', + 'regexp' / 'regexp.cc', + 'roots' / 'roots.cc', + 'runtime' / 'runtime-array.cc', + 'runtime' / 'runtime-atomics.cc', + 'runtime' / 'runtime-bigint.cc', + 'runtime' / 'runtime-classes.cc', + 'runtime' / 'runtime-collections.cc', + 'runtime' / 'runtime-compiler.cc', + 'runtime' / 'runtime-date.cc', + 'runtime' / 'runtime-debug.cc', + 'runtime' / 'runtime-forin.cc', + 'runtime' / 'runtime-function.cc', + 'runtime' / 'runtime-futex.cc', + 'runtime' / 'runtime-generator.cc', + 'runtime' / 'runtime-internal.cc', + 'runtime' / 'runtime-literals.cc', + 'runtime' / 'runtime-module.cc', + 'runtime' / 'runtime-numbers.cc', + 'runtime' / 'runtime-object.cc', + 'runtime' / 'runtime-operators.cc', + 'runtime' / 'runtime-promise.cc', + 'runtime' / 'runtime-proxy.cc', + 'runtime' / 'runtime-regexp.cc', + 'runtime' / 'runtime-scopes.cc', + 'runtime' / 'runtime-shadow-realm.cc', + 'runtime' / 'runtime-strings.cc', + 'runtime' / 'runtime-symbol.cc', + 'runtime' / 'runtime-temporal.cc', + 'runtime' / 'runtime-test.cc', + 'runtime' / 'runtime-trace.cc', + 'runtime' / 'runtime-typedarray.cc', + 'runtime' / 'runtime-weak-refs.cc', + 'runtime' / 'runtime.cc', + 'sandbox' / 'external-pointer-table.cc', + 'sandbox' / 'sandbox.cc', + 'sandbox' / 'testing.cc', + 'snapshot' / 'code-serializer.cc', + 'snapshot' / 'context-deserializer.cc', + 'snapshot' / 'context-serializer.cc', + 'snapshot' / 'deserializer.cc', + 'snapshot' / 'embedded' / 'embedded-data.cc', + 'snapshot' / 'object-deserializer.cc', + 'snapshot' / 'read-only-deserializer.cc', + 'snapshot' / 'read-only-serializer.cc', + 'snapshot' / 'roots-serializer.cc', + 'snapshot' / 'serializer-deserializer.cc', + 'snapshot' / 'serializer.cc', + 'snapshot' / 'shared-heap-deserializer.cc', + 'snapshot' / 'shared-heap-serializer.cc', + 'snapshot' / 'snapshot-compression.cc', + 'snapshot' / 'snapshot-data.cc', + 'snapshot' / 'snapshot-source-sink.cc', + 'snapshot' / 'snapshot-utils.cc', + 'snapshot' / 'snapshot.cc', + 'snapshot' / 'startup-deserializer.cc', + 'snapshot' / 'startup-serializer.cc', + 'strings' / 'string-builder.cc', + 'strings' / 'string-case.cc', + 'strings' / 'string-stream.cc', + 'strings' / 'unicode-decoder.cc', + 'strings' / 'unicode.cc', + 'strings' / 'uri.cc', + 'tasks' / 'cancelable-task.cc', + 'tasks' / 'operations-barrier.cc', + 'tasks' / 'task-utils.cc', + 'temporal' / 'temporal-parser.cc', + 'third_party' / 'siphash' / 'halfsiphash.cc', + 'tracing' / 'trace-event.cc', + 'tracing' / 'traced-value.cc', + 'tracing' / 'tracing-category-observer.cc', + 'utils' / 'address-map.cc', + 'utils' / 'allocation.cc', + 'utils' / 'bit-vector.cc', + 'utils' / 'detachable-vector.cc', + 'utils' / 'identity-map.cc', + 'utils' / 'memcopy.cc', + 'utils' / 'ostreams.cc', + 'utils' / 'utils.cc', + 'utils' / 'version.cc', + 'web-snapshot' / 'web-snapshot.cc', + 'zone' / 'accounting-allocator.cc', + 'zone' / 'type-stats.cc', + 'zone' / 'zone-segment.cc', + 'zone' / 'zone.cc', + 'compiler' / 'access-builder.cc', + 'compiler' / 'access-info.cc', + 'compiler' / 'add-type-assertions-reducer.cc', + 'compiler' / 'all-nodes.cc', + 'compiler' / 'backend' / 'code-generator.cc', + 'compiler' / 'backend' / 'frame-elider.cc', + 'compiler' / 'backend' / 'gap-resolver.cc', + 'compiler' / 'backend' / 'instruction-scheduler.cc', + 'compiler' / 'backend' / 'instruction-selector.cc', + 'compiler' / 'backend' / 'instruction.cc', + 'compiler' / 'backend' / 'jump-threading.cc', + 'compiler' / 'backend' / 'mid-tier-register-allocator.cc', + 'compiler' / 'backend' / 'move-optimizer.cc', + 'compiler' / 'backend' / 'register-allocator-verifier.cc', + 'compiler' / 'backend' / 'register-allocator.cc', + 'compiler' / 'backend' / 'spill-placer.cc', + 'compiler' / 'basic-block-instrumentor.cc', + 'compiler' / 'branch-condition-duplicator.cc', + 'compiler' / 'branch-elimination.cc', + 'compiler' / 'bytecode-analysis.cc', + 'compiler' / 'bytecode-graph-builder.cc', + 'compiler' / 'bytecode-liveness-map.cc', + 'compiler' / 'c-linkage.cc', + 'compiler' / 'checkpoint-elimination.cc', + 'compiler' / 'code-assembler.cc', + 'compiler' / 'common-node-cache.cc', + 'compiler' / 'common-operator-reducer.cc', + 'compiler' / 'common-operator.cc', + 'compiler' / 'compilation-dependencies.cc', + 'compiler' / 'compiler-source-position-table.cc', + 'compiler' / 'constant-folding-reducer.cc', + 'compiler' / 'control-equivalence.cc', + 'compiler' / 'control-flow-optimizer.cc', + 'compiler' / 'csa-load-elimination.cc', + 'compiler' / 'dead-code-elimination.cc', + 'compiler' / 'decompression-optimizer.cc', + 'compiler' / 'effect-control-linearizer.cc', + 'compiler' / 'escape-analysis-reducer.cc', + 'compiler' / 'escape-analysis.cc', + 'compiler' / 'fast-api-calls.cc', + 'compiler' / 'feedback-source.cc', + 'compiler' / 'frame-states.cc', + 'compiler' / 'frame.cc', + 'compiler' / 'graph-assembler.cc', + 'compiler' / 'graph-reducer.cc', + 'compiler' / 'graph-trimmer.cc', + 'compiler' / 'graph-visualizer.cc', + 'compiler' / 'graph.cc', + 'compiler' / 'heap-refs.cc', + 'compiler' / 'js-call-reducer.cc', + 'compiler' / 'js-context-specialization.cc', + 'compiler' / 'js-create-lowering.cc', + 'compiler' / 'js-generic-lowering.cc', + 'compiler' / 'js-graph.cc', + 'compiler' / 'js-heap-broker.cc', + 'compiler' / 'js-inlining-heuristic.cc', + 'compiler' / 'js-inlining.cc', + 'compiler' / 'js-intrinsic-lowering.cc', + 'compiler' / 'js-native-context-specialization.cc', + 'compiler' / 'js-operator.cc', + 'compiler' / 'js-type-hint-lowering.cc', + 'compiler' / 'js-typed-lowering.cc', + 'compiler' / 'late-escape-analysis.cc', + 'compiler' / 'linkage.cc', + 'compiler' / 'load-elimination.cc', + 'compiler' / 'loop-analysis.cc', + 'compiler' / 'loop-peeling.cc', + 'compiler' / 'loop-unrolling.cc', + 'compiler' / 'loop-variable-optimizer.cc', + 'compiler' / 'machine-graph-verifier.cc', + 'compiler' / 'machine-graph.cc', + 'compiler' / 'machine-operator-reducer.cc', + 'compiler' / 'machine-operator.cc', + 'compiler' / 'map-inference.cc', + 'compiler' / 'memory-lowering.cc', + 'compiler' / 'memory-optimizer.cc', + 'compiler' / 'node-marker.cc', + 'compiler' / 'node-matchers.cc', + 'compiler' / 'node-observer.cc', + 'compiler' / 'node-origin-table.cc', + 'compiler' / 'node-properties.cc', + 'compiler' / 'node.cc', + 'compiler' / 'opcodes.cc', + 'compiler' / 'operation-typer.cc', + 'compiler' / 'operator-properties.cc', + 'compiler' / 'operator.cc', + 'compiler' / 'osr.cc', + 'compiler' / 'pipeline-statistics.cc', + 'compiler' / 'pipeline.cc', + 'compiler' / 'property-access-builder.cc', + 'compiler' / 'raw-machine-assembler.cc', + 'compiler' / 'redundancy-elimination.cc', + 'compiler' / 'refs-map.cc', + 'compiler' / 'representation-change.cc', + 'compiler' / 'schedule.cc', + 'compiler' / 'scheduler.cc', + 'compiler' / 'select-lowering.cc', + 'compiler' / 'simplified-lowering-verifier.cc', + 'compiler' / 'simplified-lowering.cc', + 'compiler' / 'simplified-operator-reducer.cc', + 'compiler' / 'simplified-operator.cc', + 'compiler' / 'state-values-utils.cc', + 'compiler' / 'store-store-elimination.cc', + 'compiler' / 'type-cache.cc', + 'compiler' / 'type-narrowing-reducer.cc', + 'compiler' / 'typed-optimization.cc', + 'compiler' / 'typer.cc', + 'compiler' / 'types.cc', + 'compiler' / 'value-numbering-reducer.cc', + 'compiler' / 'verifier.cc', + 'compiler' / 'zone-stats.cc', + 'compiler' / 'turboshaft' / 'decompression-optimization.cc', + 'compiler' / 'turboshaft' / 'graph-builder.cc', + 'compiler' / 'turboshaft' / 'graph-visualizer.cc', + 'compiler' / 'turboshaft' / 'graph.cc', + 'compiler' / 'turboshaft' / 'operations.cc', + 'compiler' / 'turboshaft' / 'optimization-phase.cc', + 'compiler' / 'turboshaft' / 'recreate-schedule.cc', + 'utils' / 'hex-format.cc', + 'utils' / 'sha-256.cc', +] + +if host_os == 'win' + base_sources += 'diagnostics' / 'unwinding-info-win64.cc' +endif + +if enable_advanced_bigint_algorithms + base_sources += [ + 'bigint' / 'div-barrett.cc', + 'bigint' / 'mul-fft.cc', + 'bigint' / 'mul-toom.cc', + ] +endif + +if enable_caged_heap + base_sources += [ + 'heap' / 'cppgc' / 'caged-heap-local-data.cc', + 'heap' / 'cppgc' / 'caged-heap.cc', + ] +endif + +if enable_i18n + base_sources += [ + 'builtins' / 'builtins-intl.cc', + 'objects' / 'intl-objects.cc', + 'objects' / 'js-break-iterator.cc', + 'objects' / 'js-collator.cc', + 'objects' / 'js-date-time-format.cc', + 'objects' / 'js-display-names.cc', + 'objects' / 'js-list-format.cc', + 'objects' / 'js-locale.cc', + 'objects' / 'js-number-format.cc', + 'objects' / 'js-plural-rules.cc', + 'objects' / 'js-relative-time-format.cc', + 'objects' / 'js-segment-iterator.cc', + 'objects' / 'js-segmenter.cc', + 'objects' / 'js-segments.cc', + 'runtime' / 'runtime-intl.cc', + 'strings' / 'char-predicates.cc', + ] +endif + +if enable_maglev + base_sources += [ + 'maglev' / 'maglev-code-generator.cc', + 'maglev' / 'maglev-compilation-info.cc', + 'maglev' / 'maglev-compilation-unit.cc', + 'maglev' / 'maglev-compiler.cc', + 'maglev' / 'maglev-concurrent-dispatcher.cc', + 'maglev' / 'maglev-graph-builder.cc', + 'maglev' / 'maglev-graph-printer.cc', + 'maglev' / 'maglev-ir.cc', + 'maglev' / 'maglev-regalloc.cc', + 'maglev' / 'maglev.cc', + ] +endif + +if enable_wasm + base_sources += [ + 'asmjs' / 'asm-js.cc', + 'asmjs' / 'asm-parser.cc', + 'asmjs' / 'asm-scanner.cc', + 'asmjs' / 'asm-types.cc', + 'debug' / 'debug-wasm-objects.cc', + 'runtime' / 'runtime-test-wasm.cc', + 'runtime' / 'runtime-wasm.cc', + 'trap-handler' / 'handler-inside.cc', + 'trap-handler' / 'handler-outside.cc', + 'trap-handler' / 'handler-shared.cc', + 'wasm' / 'assembler-buffer-cache.cc', + 'wasm' / 'baseline' / 'liftoff-assembler.cc', + 'wasm' / 'baseline' / 'liftoff-compiler.cc', + 'wasm' / 'canonical-types.cc', + 'wasm' / 'code-space-access.cc', + 'wasm' / 'constant-expression-interface.cc', + 'wasm' / 'constant-expression.cc', + 'wasm' / 'function-body-decoder.cc', + 'wasm' / 'function-compiler.cc', + 'wasm' / 'graph-builder-interface.cc', + 'wasm' / 'jump-table-assembler.cc', + 'wasm' / 'local-decl-encoder.cc', + 'wasm' / 'memory-tracing.cc', + 'wasm' / 'module-compiler.cc', + 'wasm' / 'module-decoder.cc', + 'wasm' / 'module-instantiate.cc', + 'wasm' / 'names-provider.cc', + 'wasm' / 'signature-map.cc', + 'wasm' / 'simd-shuffle.cc', + 'wasm' / 'streaming-decoder.cc', + 'wasm' / 'sync-streaming-decoder.cc', + 'wasm' / 'value-type.cc', + 'wasm' / 'wasm-code-manager.cc', + 'wasm' / 'wasm-debug.cc', + 'wasm' / 'wasm-disassembler.cc', + 'wasm' / 'wasm-engine.cc', + 'wasm' / 'wasm-external-refs.cc', + 'wasm' / 'wasm-features.cc', + 'wasm' / 'wasm-import-wrapper-cache.cc', + 'wasm' / 'wasm-init-expr.cc', + 'wasm' / 'wasm-js.cc', + 'wasm' / 'wasm-module-builder.cc', + 'wasm' / 'wasm-module-sourcemap.cc', + 'wasm' / 'wasm-module.cc', + 'wasm' / 'wasm-objects.cc', + 'wasm' / 'wasm-opcodes.cc', + 'wasm' / 'wasm-result.cc', + 'wasm' / 'wasm-serialization.cc', + 'wasm' / 'wasm-subtyping.cc', + 'compiler' / 'int64-lowering.cc', + 'compiler' / 'wasm-compiler.cc', + 'compiler' / 'wasm-escape-analysis.cc', + 'compiler' / 'wasm-gc-lowering.cc', + 'compiler' / 'wasm-gc-operator-reducer.cc', + 'compiler' / 'wasm-graph-assembler.cc', + 'compiler' / 'wasm-inlining.cc', + 'compiler' / 'wasm-loop-peeling.cc', + 'compiler' / 'wasm-typer.cc', + ] +endif + +base_portable_arch_sources = { + 'ia32': [ + 'codegen' / 'ia32' / 'assembler-ia32.cc', + 'codegen' / 'ia32' / 'cpu-ia32.cc', + 'codegen' / 'ia32' / 'macro-assembler-ia32.cc', + 'codegen' / 'shared-ia32-x64' / 'macro-assembler-shared-ia32-x64.cc', + 'compiler' / 'backend' / 'ia32' / 'code-generator-ia32.cc', + 'compiler' / 'backend' / 'ia32' / 'instruction-scheduler-ia32.cc', + 'compiler' / 'backend' / 'ia32' / 'instruction-selector-ia32.cc', + 'deoptimizer' / 'ia32' / 'deoptimizer-ia32.cc', + 'diagnostics' / 'ia32' / 'disasm-ia32.cc', + 'diagnostics' / 'ia32' / 'unwinder-ia32.cc', + 'execution' / 'ia32' / 'frame-constants-ia32.cc', + 'regexp' / 'ia32' / 'regexp-macro-assembler-ia32.cc', + ], + 'x64': [ + 'codegen' / 'shared-ia32-x64' / 'macro-assembler-shared-ia32-x64.cc', + 'codegen' / 'x64' / 'assembler-x64.cc', + 'codegen' / 'x64' / 'cpu-x64.cc', + 'codegen' / 'x64' / 'macro-assembler-x64.cc', + 'compiler' / 'backend' / 'x64' / 'code-generator-x64.cc', + 'compiler' / 'backend' / 'x64' / 'instruction-scheduler-x64.cc', + 'compiler' / 'backend' / 'x64' / 'instruction-selector-x64.cc', + 'compiler' / 'backend' / 'x64' / 'unwinding-info-writer-x64.cc', + 'deoptimizer' / 'x64' / 'deoptimizer-x64.cc', + 'diagnostics' / 'x64' / 'disasm-x64.cc', + 'diagnostics' / 'x64' / 'eh-frame-x64.cc', + 'diagnostics' / 'x64' / 'unwinder-x64.cc', + 'execution' / 'x64' / 'frame-constants-x64.cc', + 'regexp' / 'x64' / 'regexp-macro-assembler-x64.cc', + ], + 'arm': [ + 'codegen' / 'arm' / 'assembler-arm.cc', + 'codegen' / 'arm' / 'constants-arm.cc', + 'codegen' / 'arm' / 'cpu-arm.cc', + 'codegen' / 'arm' / 'macro-assembler-arm.cc', + 'compiler' / 'backend' / 'arm' / 'code-generator-arm.cc', + 'compiler' / 'backend' / 'arm' / 'instruction-scheduler-arm.cc', + 'compiler' / 'backend' / 'arm' / 'instruction-selector-arm.cc', + 'compiler' / 'backend' / 'arm' / 'unwinding-info-writer-arm.cc', + 'deoptimizer' / 'arm' / 'deoptimizer-arm.cc', + 'diagnostics' / 'arm' / 'disasm-arm.cc', + 'diagnostics' / 'arm' / 'eh-frame-arm.cc', + 'diagnostics' / 'arm' / 'unwinder-arm.cc', + 'execution' / 'arm' / 'frame-constants-arm.cc', + 'execution' / 'arm' / 'simulator-arm.cc', + 'regexp' / 'arm' / 'regexp-macro-assembler-arm.cc', + ], + 'arm64': [ + 'codegen' / 'arm64' / 'assembler-arm64.cc', + 'codegen' / 'arm64' / 'cpu-arm64.cc', + 'codegen' / 'arm64' / 'decoder-arm64.cc', + 'codegen' / 'arm64' / 'instructions-arm64-constants.cc', + 'codegen' / 'arm64' / 'instructions-arm64.cc', + 'codegen' / 'arm64' / 'macro-assembler-arm64.cc', + 'codegen' / 'arm64' / 'register-arm64.cc', + 'codegen' / 'arm64' / 'utils-arm64.cc', + 'compiler' / 'backend' / 'arm64' / 'code-generator-arm64.cc', + 'compiler' / 'backend' / 'arm64' / 'instruction-scheduler-arm64.cc', + 'compiler' / 'backend' / 'arm64' / 'instruction-selector-arm64.cc', + 'compiler' / 'backend' / 'arm64' / 'unwinding-info-writer-arm64.cc', + 'deoptimizer' / 'arm64' / 'deoptimizer-arm64.cc', + 'diagnostics' / 'arm64' / 'disasm-arm64.cc', + 'diagnostics' / 'arm64' / 'eh-frame-arm64.cc', + 'diagnostics' / 'arm64' / 'unwinder-arm64.cc', + 'execution' / 'arm64' / 'frame-constants-arm64.cc', + 'execution' / 'arm64' / 'pointer-auth-arm64.cc', + 'execution' / 'arm64' / 'simulator-arm64.cc', + 'execution' / 'arm64' / 'simulator-logic-arm64.cc', + 'regexp' / 'arm64' / 'regexp-macro-assembler-arm64.cc', + ], +} + +base_generic_asm_sources = { + 'ia32': [ + 'heap' / 'base' / 'asm' / 'ia32' / 'push_registers_asm.cc', + ], + 'x64': [ + 'heap' / 'base' / 'asm' / 'x64' / 'push_registers_asm.cc', + ], + 'arm': [ + 'heap' / 'base' / 'asm' / 'arm' / 'push_registers_asm.cc', + ], + 'arm64': [ + 'heap' / 'base' / 'asm' / 'arm64' / 'push_registers_asm.cc', + ], +} + +base_msvc_asm_sources = { + 'ia32': [ + 'heap' / 'base' / 'asm' / 'ia32' / 'push_registers_masm.asm', + ], + 'x64': [ + 'heap' / 'base' / 'asm' / 'x64' / 'push_registers_masm.asm', + ], + 'arm64': [ + 'heap' / 'base' / 'asm' / 'arm64' / 'push_registers_masm.S', + ], +} + +base_arch_sources = {} +if is_clang_or_non_windows + foreach arch : ['ia32', 'x64', 'arm', 'arm64'] + base_arch_sources += { arch: base_portable_arch_sources[arch] + base_generic_asm_sources[arch] } + endforeach +else + foreach arch : msvc_required_archs + objects = [] + command = msvc_asm_commands[arch] + foreach source : base_msvc_asm_sources[arch] + name = source.underscorify() + '.obj' + objects += custom_target(name, + input: source, + output: name, + command: command, + ) + endforeach + base_arch_sources += { arch: base_portable_arch_sources[arch] + objects } + endforeach +endif + +bytecode_builtins_list_generator = executable('bytecode-builtins-list-generator', [ + 'builtins' / 'generate-bytecodes-builtins-list.cc', + 'interpreter' / 'bytecode-operands.cc', + 'interpreter' / 'bytecodes.cc', + ], + override_options: cpp_options, + dependencies: [v8_libbase_native_dep], + native: not meson.can_run_host_binaries(), +) + +subdir('builtins-generated') +base_sources += bytecodes_builtins_list_h + +subdir('torque') +subdir('torque-generated') +base_sources += torque_generated_definitions + +n = base_sources.length() +base_sources_part1 = [] +base_sources_part2 = [] +foreach i : range(n / 2) + base_sources_part1 += base_sources[i] +endforeach +foreach i : range(n / 2, n) + base_sources_part2 += base_sources[i] +endforeach + +base_sources_part1 += torque_generated_headers +base_sources_part2 += torque_generated_headers + +generated_headers = [bytecodes_builtins_list_h, torque_generated_headers] + +v8_base_part1 = static_library('v8-base-part1', base_sources_part1, + override_options: cpp_options, + dependencies: [v8_libbase_dep, compression_utils_portable_dep], +) +v8_base_part2 = static_library('v8-base-part2', base_sources_part2 + base_arch_sources[host_arch], + override_options: cpp_options, + dependencies: [v8_libbase_dep, compression_utils_portable_dep], +) +if meson.can_run_host_binaries() + v8_base_part1_native = v8_base_part1 + v8_base_part2_native = v8_base_part2 +else + v8_base_part1_native = static_library('v8-base-part1-native', base_sources_part1, + override_options: cpp_options, + dependencies: [v8_libbase_native_dep, compression_utils_portable_native_dep], + native: true, + ) + v8_base_part2_native = static_library('v8-base-part2-native', base_sources_part2 + base_arch_sources[build_arch], + override_options: cpp_options, + dependencies: [v8_libbase_native_dep, compression_utils_portable_native_dep], + native: true, + ) +endif + +v8_base_dep = declare_dependency( + sources: generated_headers, + include_directories: internal_incdirs, + link_with: [v8_base_part1, v8_base_part2], +) +v8_base_native_dep = declare_dependency( + sources: generated_headers, + include_directories: internal_incdirs, + link_with: [v8_base_part1_native, v8_base_part2_native], +) + +init_sources = [ + 'init' / 'setup-isolate-full.cc', + 'builtins' / 'builtins-array-gen.cc', + 'builtins' / 'builtins-async-function-gen.cc', + 'builtins' / 'builtins-async-gen.cc', + 'builtins' / 'builtins-async-generator-gen.cc', + 'builtins' / 'builtins-async-iterator-gen.cc', + 'builtins' / 'builtins-bigint-gen.cc', + 'builtins' / 'builtins-call-gen.cc', + 'builtins' / 'builtins-collections-gen.cc', + 'builtins' / 'builtins-constructor-gen.cc', + 'builtins' / 'builtins-conversion-gen.cc', + 'builtins' / 'builtins-date-gen.cc', + 'builtins' / 'builtins-generator-gen.cc', + 'builtins' / 'builtins-global-gen.cc', + 'builtins' / 'builtins-handler-gen.cc', + 'builtins' / 'builtins-ic-gen.cc', + 'builtins' / 'builtins-internal-gen.cc', + 'builtins' / 'builtins-interpreter-gen.cc', + 'builtins' / 'builtins-iterator-gen.cc', + 'builtins' / 'builtins-lazy-gen.cc', + 'builtins' / 'builtins-microtask-queue-gen.cc', + 'builtins' / 'builtins-number-gen.cc', + 'builtins' / 'builtins-object-gen.cc', + 'builtins' / 'builtins-promise-gen.cc', + 'builtins' / 'builtins-proxy-gen.cc', + 'builtins' / 'builtins-regexp-gen.cc', + 'builtins' / 'builtins-shadow-realm-gen.cc', + 'builtins' / 'builtins-sharedarraybuffer-gen.cc', + 'builtins' / 'builtins-string-gen.cc', + 'builtins' / 'builtins-temporal-gen.cc', + 'builtins' / 'builtins-typed-array-gen.cc', + 'builtins' / 'growable-fixed-array-gen.cc', + 'builtins' / 'profile-data-reader.cc', + 'builtins' / 'setup-builtins-internal.cc', + 'codegen' / 'code-stub-assembler.cc', + 'heap' / 'setup-heap-internal.cc', + 'ic' / 'accessor-assembler.cc', + 'ic' / 'binary-op-assembler.cc', + 'ic' / 'keyed-store-generic.cc', + 'ic' / 'unary-op-assembler.cc', + 'interpreter' / 'interpreter-assembler.cc', + 'interpreter' / 'interpreter-generator.cc', + 'interpreter' / 'interpreter-intrinsics-generator.cc', + 'builtins' / host_arch / 'builtins-' + host_arch + '.cc', +] +init_sources += torque_generated_initializers +if enable_i18n + init_sources += 'builtins' / 'builtins-intl-gen.cc' +endif +if enable_wasm + init_sources += 'builtins' / 'builtins-wasm-gen.cc' +endif + +v8_init = static_library('v8-init', init_sources, + override_options: cpp_options, + dependencies: [v8_base_native_dep], + native: not meson.can_run_host_binaries(), +) + +v8_init_dep = declare_dependency(link_with: v8_init) + +subdir('libplatform') +subdir('snapshot') + +v8_snapshot_sources = custom_target('v8-snapshot', + output: [ + 'embedded.S', + 'snapshot.cc', + ], + command: [ + mksnapshot, + '--turbo_instruction_scheduling', + '--target_os=' + host_os_nick, + '--target_arch=' + host_arch, + '--embedded_src', '@OUTPUT0@', + '--startup_src', '@OUTPUT1@', + ], +) +if not is_clang_or_non_windows + name = 'embedded.obj' + v8_snapshot_sources = [ + custom_target(name, + input: v8_snapshot_sources[0], + output: name, + command: msvc_asm_commands[host_arch], + ), + v8_snapshot_sources[1], + ] +endif + +subdir('inspector') + +v8 = library('v8-' + api_version, [ + 'utils' / 'v8dll-main.cc', + 'init' / 'setup-isolate-deserialize.cc', + v8_snapshot_sources, + ], + override_options: cpp_options, + include_directories: internal_incdirs, + link_whole: [v8_base_part1, v8_base_part2, v8_libbase, v8_libplatform, v8_inspector], + install: true, +) + +client_flags = [] +if get_option('default_library') != 'static' + client_flags += [ + '-DUSING_V8_SHARED', + '-DUSING_V8_PLATFORM_SHARED', + ] +endif + +v8_dep = declare_dependency( + compile_args: client_flags, + include_directories: public_incdirs, + link_with: v8, +) + +pkg = import('pkgconfig') +pkg.generate(v8, + filebase: 'v8-' + api_version, + name: 'V8', + description: 'V8 JavaScript Engine', + extra_cflags: client_flags, + libraries_private: extra_libs_private.get(host_os, []), +) + +meson.override_dependency('v8-' + api_version, v8_dep) diff --git a/src/snapshot/meson.build b/src/snapshot/meson.build new file mode 100644 index 0000000000..62cea381ca --- /dev/null +++ b/src/snapshot/meson.build @@ -0,0 +1,17 @@ +sources = [ + 'embedded' / 'embedded-empty.cc', + 'embedded' / 'embedded-file-writer.cc', + 'embedded' / 'platform-embedded-file-writer-aix.cc', + 'embedded' / 'platform-embedded-file-writer-base.cc', + 'embedded' / 'platform-embedded-file-writer-generic.cc', + 'embedded' / 'platform-embedded-file-writer-mac.cc', + 'embedded' / 'platform-embedded-file-writer-win.cc', + 'mksnapshot.cc', + 'snapshot-empty.cc', +] + +mksnapshot = executable('mksnapshot', sources, + override_options: cpp_options, + dependencies: [v8_base_native_dep, v8_libplatform_native_dep, v8_init_dep], + native: not meson.can_run_host_binaries(), +) diff --git a/src/torque-generated/meson.build b/src/torque-generated/meson.build new file mode 100644 index 0000000000..e6f598d4c9 --- /dev/null +++ b/src/torque-generated/meson.build @@ -0,0 +1,301 @@ +torque_files = [ + 'src' / 'builtins' / 'aggregate-error.tq', + 'src' / 'builtins' / 'array-at.tq', + 'src' / 'builtins' / 'array-concat.tq', + 'src' / 'builtins' / 'array-copywithin.tq', + 'src' / 'builtins' / 'array-every.tq', + 'src' / 'builtins' / 'array-filter.tq', + 'src' / 'builtins' / 'array-find.tq', + 'src' / 'builtins' / 'array-findindex.tq', + 'src' / 'builtins' / 'array-findlast.tq', + 'src' / 'builtins' / 'array-findlastindex.tq', + 'src' / 'builtins' / 'array-foreach.tq', + 'src' / 'builtins' / 'array-from.tq', + 'src' / 'builtins' / 'array-isarray.tq', + 'src' / 'builtins' / 'array-join.tq', + 'src' / 'builtins' / 'array-lastindexof.tq', + 'src' / 'builtins' / 'array-map.tq', + 'src' / 'builtins' / 'array-of.tq', + 'src' / 'builtins' / 'array-reduce-right.tq', + 'src' / 'builtins' / 'array-reduce.tq', + 'src' / 'builtins' / 'array-reverse.tq', + 'src' / 'builtins' / 'array-shift.tq', + 'src' / 'builtins' / 'array-slice.tq', + 'src' / 'builtins' / 'array-some.tq', + 'src' / 'builtins' / 'array-splice.tq', + 'src' / 'builtins' / 'array-to-reversed.tq', + 'src' / 'builtins' / 'array-to-spliced.tq', + 'src' / 'builtins' / 'array-unshift.tq', + 'src' / 'builtins' / 'array-with.tq', + 'src' / 'builtins' / 'array.tq', + 'src' / 'builtins' / 'arraybuffer.tq', + 'src' / 'builtins' / 'base.tq', + 'src' / 'builtins' / 'boolean.tq', + 'src' / 'builtins' / 'builtins-bigint.tq', + 'src' / 'builtins' / 'builtins-string.tq', + 'src' / 'builtins' / 'cast.tq', + 'src' / 'builtins' / 'collections.tq', + 'src' / 'builtins' / 'constructor.tq', + 'src' / 'builtins' / 'conversion.tq', + 'src' / 'builtins' / 'convert.tq', + 'src' / 'builtins' / 'console.tq', + 'src' / 'builtins' / 'data-view.tq', + 'src' / 'builtins' / 'finalization-registry.tq', + 'src' / 'builtins' / 'frames.tq', + 'src' / 'builtins' / 'frame-arguments.tq', + 'src' / 'builtins' / 'function.tq', + 'src' / 'builtins' / 'growable-fixed-array.tq', + 'src' / 'builtins' / 'ic-callable.tq', + 'src' / 'builtins' / 'ic.tq', + 'src' / 'builtins' / 'internal-coverage.tq', + 'src' / 'builtins' / 'internal.tq', + 'src' / 'builtins' / 'iterator.tq', + 'src' / 'builtins' / 'math.tq', + 'src' / 'builtins' / 'number.tq', + 'src' / 'builtins' / 'object-fromentries.tq', + 'src' / 'builtins' / 'object.tq', + 'src' / 'builtins' / 'promise-abstract-operations.tq', + 'src' / 'builtins' / 'promise-all.tq', + 'src' / 'builtins' / 'promise-all-element-closure.tq', + 'src' / 'builtins' / 'promise-any.tq', + 'src' / 'builtins' / 'promise-constructor.tq', + 'src' / 'builtins' / 'promise-finally.tq', + 'src' / 'builtins' / 'promise-misc.tq', + 'src' / 'builtins' / 'promise-race.tq', + 'src' / 'builtins' / 'promise-reaction-job.tq', + 'src' / 'builtins' / 'promise-resolve.tq', + 'src' / 'builtins' / 'promise-then.tq', + 'src' / 'builtins' / 'promise-jobs.tq', + 'src' / 'builtins' / 'proxy-constructor.tq', + 'src' / 'builtins' / 'proxy-delete-property.tq', + 'src' / 'builtins' / 'proxy-get-property.tq', + 'src' / 'builtins' / 'proxy-get-prototype-of.tq', + 'src' / 'builtins' / 'proxy-has-property.tq', + 'src' / 'builtins' / 'proxy-is-extensible.tq', + 'src' / 'builtins' / 'proxy-prevent-extensions.tq', + 'src' / 'builtins' / 'proxy-revocable.tq', + 'src' / 'builtins' / 'proxy-revoke.tq', + 'src' / 'builtins' / 'proxy-set-property.tq', + 'src' / 'builtins' / 'proxy-set-prototype-of.tq', + 'src' / 'builtins' / 'proxy.tq', + 'src' / 'builtins' / 'reflect.tq', + 'src' / 'builtins' / 'regexp-exec.tq', + 'src' / 'builtins' / 'regexp-match-all.tq', + 'src' / 'builtins' / 'regexp-match.tq', + 'src' / 'builtins' / 'regexp-replace.tq', + 'src' / 'builtins' / 'regexp-search.tq', + 'src' / 'builtins' / 'regexp-source.tq', + 'src' / 'builtins' / 'regexp-split.tq', + 'src' / 'builtins' / 'regexp-test.tq', + 'src' / 'builtins' / 'regexp.tq', + 'src' / 'builtins' / 'string-at.tq', + 'src' / 'builtins' / 'string-endswith.tq', + 'src' / 'builtins' / 'string-html.tq', + 'src' / 'builtins' / 'string-includes.tq', + 'src' / 'builtins' / 'string-indexof.tq', + 'src' / 'builtins' / 'string-iterator.tq', + 'src' / 'builtins' / 'string-match-search.tq', + 'src' / 'builtins' / 'string-pad.tq', + 'src' / 'builtins' / 'string-repeat.tq', + 'src' / 'builtins' / 'string-replaceall.tq', + 'src' / 'builtins' / 'string-slice.tq', + 'src' / 'builtins' / 'string-startswith.tq', + 'src' / 'builtins' / 'string-substr.tq', + 'src' / 'builtins' / 'string-substring.tq', + 'src' / 'builtins' / 'string-trim.tq', + 'src' / 'builtins' / 'symbol.tq', + 'src' / 'builtins' / 'torque-internal.tq', + 'src' / 'builtins' / 'typed-array-at.tq', + 'src' / 'builtins' / 'typed-array-createtypedarray.tq', + 'src' / 'builtins' / 'typed-array-every.tq', + 'src' / 'builtins' / 'typed-array-entries.tq', + 'src' / 'builtins' / 'typed-array-filter.tq', + 'src' / 'builtins' / 'typed-array-find.tq', + 'src' / 'builtins' / 'typed-array-findindex.tq', + 'src' / 'builtins' / 'typed-array-findlast.tq', + 'src' / 'builtins' / 'typed-array-findlastindex.tq', + 'src' / 'builtins' / 'typed-array-foreach.tq', + 'src' / 'builtins' / 'typed-array-from.tq', + 'src' / 'builtins' / 'typed-array-keys.tq', + 'src' / 'builtins' / 'typed-array-of.tq', + 'src' / 'builtins' / 'typed-array-reduce.tq', + 'src' / 'builtins' / 'typed-array-reduceright.tq', + 'src' / 'builtins' / 'typed-array-set.tq', + 'src' / 'builtins' / 'typed-array-slice.tq', + 'src' / 'builtins' / 'typed-array-some.tq', + 'src' / 'builtins' / 'typed-array-sort.tq', + 'src' / 'builtins' / 'typed-array-subarray.tq', + 'src' / 'builtins' / 'typed-array-to-reversed.tq', + 'src' / 'builtins' / 'typed-array-values.tq', + 'src' / 'builtins' / 'typed-array-with.tq', + 'src' / 'builtins' / 'typed-array.tq', + 'src' / 'builtins' / 'weak-ref.tq', + 'src' / 'ic' / 'handler-configuration.tq', + 'src' / 'objects' / 'allocation-site.tq', + 'src' / 'objects' / 'api-callbacks.tq', + 'src' / 'objects' / 'arguments.tq', + 'src' / 'objects' / 'bigint.tq', + 'src' / 'objects' / 'call-site-info.tq', + 'src' / 'objects' / 'cell.tq', + 'src' / 'objects' / 'code.tq', + 'src' / 'objects' / 'contexts.tq', + 'src' / 'objects' / 'data-handler.tq', + 'src' / 'objects' / 'debug-objects.tq', + 'src' / 'objects' / 'descriptor-array.tq', + 'src' / 'objects' / 'embedder-data-array.tq', + 'src' / 'objects' / 'feedback-cell.tq', + 'src' / 'objects' / 'feedback-vector.tq', + 'src' / 'objects' / 'fixed-array.tq', + 'src' / 'objects' / 'foreign.tq', + 'src' / 'objects' / 'free-space.tq', + 'src' / 'objects' / 'heap-number.tq', + 'src' / 'objects' / 'heap-object.tq', + 'src' / 'objects' / 'js-array-buffer.tq', + 'src' / 'objects' / 'js-array.tq', + 'src' / 'objects' / 'js-atomics-synchronization.tq', + 'src' / 'objects' / 'js-collection-iterator.tq', + 'src' / 'objects' / 'js-collection.tq', + 'src' / 'objects' / 'js-function.tq', + 'src' / 'objects' / 'js-generator.tq', + 'src' / 'objects' / 'js-objects.tq', + 'src' / 'objects' / 'js-promise.tq', + 'src' / 'objects' / 'js-proxy.tq', + 'src' / 'objects' / 'js-regexp-string-iterator.tq', + 'src' / 'objects' / 'js-regexp.tq', + 'src' / 'objects' / 'js-shadow-realm.tq', + 'src' / 'objects' / 'js-shared-array.tq', + 'src' / 'objects' / 'js-struct.tq', + 'src' / 'objects' / 'js-temporal-objects.tq', + 'src' / 'objects' / 'js-weak-refs.tq', + 'src' / 'objects' / 'literal-objects.tq', + 'src' / 'objects' / 'map.tq', + 'src' / 'objects' / 'megadom-handler.tq', + 'src' / 'objects' / 'microtask.tq', + 'src' / 'objects' / 'module.tq', + 'src' / 'objects' / 'name.tq', + 'src' / 'objects' / 'oddball.tq', + 'src' / 'objects' / 'ordered-hash-table.tq', + 'src' / 'objects' / 'primitive-heap-object.tq', + 'src' / 'objects' / 'promise.tq', + 'src' / 'objects' / 'property-array.tq', + 'src' / 'objects' / 'property-cell.tq', + 'src' / 'objects' / 'property-descriptor-object.tq', + 'src' / 'objects' / 'prototype-info.tq', + 'src' / 'objects' / 'regexp-match-info.tq', + 'src' / 'objects' / 'scope-info.tq', + 'src' / 'objects' / 'script.tq', + 'src' / 'objects' / 'shared-function-info.tq', + 'src' / 'objects' / 'source-text-module.tq', + 'src' / 'objects' / 'string.tq', + 'src' / 'objects' / 'struct.tq', + 'src' / 'objects' / 'swiss-hash-table-helpers.tq', + 'src' / 'objects' / 'swiss-name-dictionary.tq', + 'src' / 'objects' / 'synthetic-module.tq', + 'src' / 'objects' / 'template-objects.tq', + 'src' / 'objects' / 'templates.tq', + 'src' / 'objects' / 'torque-defined-classes.tq', + 'src' / 'objects' / 'turbofan-types.tq', + 'test' / 'torque' / 'test-torque.tq', + 'third_party' / 'v8' / 'builtins' / 'array-sort.tq', +] + +if enable_i18n + torque_files += [ + 'src' / 'objects' / 'intl-objects.tq', + 'src' / 'objects' / 'js-break-iterator.tq', + 'src' / 'objects' / 'js-collator.tq', + 'src' / 'objects' / 'js-date-time-format.tq', + 'src' / 'objects' / 'js-display-names.tq', + 'src' / 'objects' / 'js-list-format.tq', + 'src' / 'objects' / 'js-locale.tq', + 'src' / 'objects' / 'js-number-format.tq', + 'src' / 'objects' / 'js-plural-rules.tq', + 'src' / 'objects' / 'js-relative-time-format.tq', + 'src' / 'objects' / 'js-segment-iterator.tq', + 'src' / 'objects' / 'js-segmenter.tq', + 'src' / 'objects' / 'js-segments.tq', + ] +endif + +if enable_wasm + torque_files += [ + 'src' / 'builtins' / 'wasm.tq', + 'src' / 'debug' / 'debug-wasm-objects.tq', + 'src' / 'wasm' / 'wasm-objects.tq', + ] +endif + +torque_inputs = [] +foreach file : torque_files + torque_inputs += meson.project_source_root() / file +endforeach + +torque_outputs = [ + 'bit-fields.h', + 'builtin-definitions.h', + # 'class-debug-readers.cc', + # 'class-debug-readers.h', + 'class-forward-declarations.h', + 'class-verifiers.cc', + 'class-verifiers.h', + 'csa-types.h', + # 'debug-macros.cc', + # 'debug-macros.h', + 'enum-verifiers.cc', + 'exported-macros-assembler.cc', + 'exported-macros-assembler.h', + 'factory.cc', + 'factory.inc', + 'instance-types.h', + 'interface-descriptors.inc', + 'objects-body-descriptors-inl.inc', + 'objects-printer.cc', + 'visitor-lists.h', +] +foreach file : torque_files + filetq = file.replace('/', '_').replace('.tq', '-tq') + torque_outputs += [ + filetq + '-csa.cc', + filetq + '-csa.h', + filetq + '-inl.inc', + filetq + '.cc', + filetq + '.inc', + ] +endforeach + +torque_generated_files = custom_target('v8-torque-code', + input: torque_inputs, + output: torque_outputs, + command: [ + run_codegen, + '--output-directory', '@OUTDIR@', + '--flatten-directory', 'src' / 'builtins', + '--flatten-directory', 'src' / 'debug', + '--flatten-directory', 'src' / 'ic', + '--flatten-directory', 'src' / 'objects', + '--flatten-directory', 'src' / 'wasm', + '--flatten-directory', 'test' / 'torque', + '--flatten-directory', 'third_party' / 'v8' / 'builtins', + '--', + torque, + '-o', '@OUTDIR@', + '-v8-root', meson.project_source_root(), + torque_files, + ], +) + +torque_generated_headers = [] +torque_generated_initializers = [] +torque_generated_definitions = [] +foreach file : torque_generated_files.to_list() + path = file.full_path() + if path.endswith('.h') + torque_generated_headers += file + elif path.endswith('enum-verifiers.cc') or \ + path.endswith('exported-macros-assembler.cc') or \ + path.endswith('-csa.cc') + torque_generated_initializers += file + elif path.endswith('.cc') + torque_generated_definitions += file + endif +endforeach diff --git a/src/torque/meson.build b/src/torque/meson.build new file mode 100644 index 0000000000..6d18f9ed0e --- /dev/null +++ b/src/torque/meson.build @@ -0,0 +1,37 @@ +torque_compiler_sources = [ + 'torque.cc', + 'cc-generator.cc', + 'cfg.cc', + 'class-debug-reader-generator.cc', + 'cpp-builder.cc', + 'csa-generator.cc', + 'declarable.cc', + 'declaration-visitor.cc', + 'declarations.cc', + 'earley-parser.cc', + 'global-context.cc', + 'implementation-visitor.cc', + 'instance-type-generator.cc', + 'instructions.cc', + 'kythe-data.cc', + 'server-data.cc', + 'source-positions.cc', + 'torque-code-generator.cc', + 'torque-compiler.cc', + 'torque-parser.cc', + 'type-inference.cc', + 'type-oracle.cc', + 'type-visitor.cc', + 'types.cc', + 'utils.cc', +] + +torque = executable('torque', torque_compiler_sources, + override_options: [ + 'cpp_std=' + cpp_std, + 'cpp_eh=default', + 'cpp_rtti=false', + ], + dependencies: [v8_libbase_native_dep], + native: not meson.can_run_host_binaries(), +) diff --git a/subprojects/zlib.wrap b/subprojects/zlib.wrap new file mode 100644 index 0000000000..2fe438a60b --- /dev/null +++ b/subprojects/zlib.wrap @@ -0,0 +1,7 @@ +[wrap-git] +url = https://github.com/frida/zlib.git +revision = main +depth = 1 + +[provide] +dependency_names = zlib diff --git a/third_party/inspector_protocol/crdtp/meson.build b/third_party/inspector_protocol/crdtp/meson.build new file mode 100644 index 0000000000..09025afa48 --- /dev/null +++ b/third_party/inspector_protocol/crdtp/meson.build @@ -0,0 +1,11 @@ +crdtp_sources = files( + 'cbor.cc', + 'dispatch.cc', + 'error_support.cc', + 'json.cc', + 'protocol_core.cc', + 'serializable.cc', + 'span.cc', + 'status.cc', + 'json_platform_v8.cc', +) diff --git a/third_party/inspector_protocol/meson.build b/third_party/inspector_protocol/meson.build new file mode 100644 index 0000000000..a42becf8f8 --- /dev/null +++ b/third_party/inspector_protocol/meson.build @@ -0,0 +1,17 @@ +subdir('crdtp') + +v8_inspector_protocol_dir = 'third_party' / 'inspector_protocol' +v8_inspector_protocol_generator = [python, files('code_generator.py')] +v8_inspector_protocol_templates = files( + 'lib' / 'Forward_h.template', + 'lib' / 'ValueConversions_cpp.template', + 'lib' / 'ValueConversions_h.template', + 'lib' / 'Values_cpp.template', + 'lib' / 'Values_h.template', + 'lib' / 'Object_cpp.template', + 'lib' / 'Object_h.template', + 'templates' / 'Exported_h.template', + 'templates' / 'Imported_h.template', + 'templates' / 'TypeBuilder_cpp.template', + 'templates' / 'TypeBuilder_h.template', +) diff --git a/third_party/meson.build b/third_party/meson.build new file mode 100644 index 0000000000..bacd92e22a --- /dev/null +++ b/third_party/meson.build @@ -0,0 +1,4 @@ +jinja_dir = meson.current_source_dir() + +subdir('inspector_protocol') +subdir('zlib') diff --git a/third_party/zlib/google/meson.build b/third_party/zlib/google/meson.build new file mode 100644 index 0000000000..cc8675c0db --- /dev/null +++ b/third_party/zlib/google/meson.build @@ -0,0 +1,30 @@ +sources = [ + 'compression_utils_portable.cc', +] + +deps = [zlib_dep] + +compression_utils_portable = static_library('compression-utils-portable', sources, + override_options: cpp_options, + dependencies: deps, +) +if meson.can_run_host_binaries() + compression_utils_portable_native = compression_utils_portable + deps_native = deps +else + deps_native = [zlib_native_dep] + compression_utils_portable_native = static_library('compression-utils-portable-native', sources, + override_options: cpp_options, + dependencies: deps_native, + native: true, + ) +endif + +compression_utils_portable_dep = declare_dependency( + link_with: compression_utils_portable, + dependencies: deps, +) +compression_utils_portable_native_dep = declare_dependency( + link_with: compression_utils_portable_native, + dependencies: deps_native, +) diff --git a/third_party/zlib/meson.build b/third_party/zlib/meson.build new file mode 100644 index 0000000000..f322455606 --- /dev/null +++ b/third_party/zlib/meson.build @@ -0,0 +1 @@ +subdir('google') diff --git a/tools/meson-run-codegen.py b/tools/meson-run-codegen.py new file mode 100755 index 0000000000..0e13be7d02 --- /dev/null +++ b/tools/meson-run-codegen.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 + +import argparse +import os +from pathlib import Path +import platform +import shutil +import subprocess + + +def main(): + parser = argparse.ArgumentParser(description="Wrap code generator tool.") + parser.add_argument("--output-directory", dest="output_dir", required=True, + help="directory where output will be written") + parser.add_argument("--flatten-directory", dest="flatten_dirs", default=[], action="append", + help="declare a single output directory to be flattened") + parser.add_argument("--link-directory", dest="link_dirs", default=[], action="append", + help="declare a single output directory to be linked/copied") + parser.add_argument("generator_args", metavar="command", nargs="*", + help="generator and arguments") + args = parser.parse_args() + + output_dir = Path(args.output_dir) + output_subdirs = [(output_dir / Path(d), "flatten") for d in args.flatten_dirs] + output_subdirs += [(output_dir / Path(d), "link") for d in args.link_dirs] + + generator_args = args.generator_args + if len(generator_args) == 0: + parser.error("missing generator args") + + for d, _ in output_subdirs: + d.mkdir(parents=True, exist_ok=True) + + subprocess.run(generator_args, check=True) + + output_globs = [ + "*.c", + "*.cc", + "*.cpp", + "*.h", + "*.inc", + ] + can_symlink = platform.system() != "Windows" + for d, action in output_subdirs: + for output_glob in output_globs: + for output_file in d.glob(output_glob): + subpath = output_file.relative_to(output_dir) + if action == "flatten": + alias = output_dir / "_".join(subpath.parts) + else: + alias = output_dir / output_file.name + if can_symlink: + if not alias.exists(): + alias.symlink_to(subpath) + else: + if alias.exists(): + old_contents = alias.read_bytes() + new_contents = output_file.read_bytes() + dirty = new_contents != old_contents + else: + dirty = True + if dirty: + shutil.copyfile(output_file, alias) + + +if __name__ == "__main__": + main()