v8/tools
Seth Brenith 2bbf333379 Require the first three fields of ScopeInfo to be present
ScopeInfo objects generally start with three fields: flags, parameter
count, and local variable count. But a single read-only ScopeInfo
instance has none of those fields. This is the empty ScopeInfo, which is
used for contexts that don't correspond to any scope (the native context
and contexts for builtin functions). Since there is only ever a single
instance of the empty ScopeInfo, the memory savings of omitting these
fields is trivial, and we can simplify logic somewhat by including them.
Rather than checking for length to be zero, this change introduces a new
flag indicating that a ScopeInfo instance is the empty one.

On its own, this change doesn't provide a whole lot of value. However,
it sets us up for two further improvements, which are consistent with
the goals outlined in [1]:

1. We should fully describe ScopeInfo fields in Torque. Getting rid of
the requirement to check for emptiness would substantially simplify the
indexed field expressions.

2. ScopeInfo shouldn't inherit from FixedArray, and shouldn't begin with
a `length` field when the length can be computed from the other fields.
This would save a small amount of heap memory and avoid any possibility
of a mismatch between the two ways of computing the length.

[1] https://docs.google.com/document/d/1tiGK7_lubxPHnInI2vscUwMHfadn8gIEa1apmI8HxR4/edit#heading=h.n63k76b3zfwa

Bug: v8:8952
Change-Id: I018127698a5d91fb2a91684bc3aec2e27ee27c41
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2561598
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#71500}
2020-11-30 16:23:05 +00:00
..
blink_tests [test] Remove obsolete blink test skips 2019-01-18 12:30:23 +00:00
cfi [cfi] Use inclusive terminology 2020-07-28 05:57:41 +00:00
clusterfuzz Revert "Enable simulating errors to test fuzzer reliability" 2020-11-30 09:30:08 +00:00
cppgc cppgc: mirror: Add copybara and migration scripts 2020-07-29 11:53:33 +00:00
debug_helper Revert "[DEPS] Add abseil to deps" 2020-10-27 10:48:05 +00:00
dev [tools] Add scripts for compile_commands.json and VSCode 2020-07-28 14:26:26 +00:00
gcmole [gcmole] Python conversion followup 2020-11-26 09:40:45 +00:00
generate_shim_headers
heap-stats Reland "[Intl] Sync Intl.Segmenter to latest version" 2020-07-30 17:32:20 +00:00
ignition Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
jsfunfuzz [test] update the jsfunfuzz archive in Google Storage 2018-12-18 15:00:35 +00:00
link_clicker.extension [tools] Add link_click chrome extension 2017-05-09 15:25:21 +00:00
mb Revert "Disassociate runtime_deps from the stamp file" 2020-11-06 09:13:34 +00:00
memory [build] Fix win-asan compilation 2017-10-16 08:37:15 +00:00
msan [gn] Add missing dep and blacklist for msan 2016-07-29 09:01:24 +00:00
ninja [ycm] The YouCompleteMe configuration is not VIM specific. 2015-02-12 07:21:13 +00:00
node Remove android_tools deps for v8 repo 2019-07-03 17:59:11 +00:00
perf [tools] Refactor patch/no-patch terminology in run_perf.py 2017-11-22 07:19:50 +00:00
profview [profview] Use requestAnimationFrame to schedule a render 2019-01-15 13:08:46 +00:00
release [presubmit] Clean up insensitive terms 2020-07-27 18:05:48 +00:00
sanitizers [respect] Stop using "blacklist" in several python tools 2020-07-10 19:11:36 +00:00
snapshot Fix a Python3 compatibility issue in asm_to_inline_asm.py. 2020-08-03 22:21:55 +00:00
system-analyzer [tools] System-analyzer timeline improvements 2020-11-30 15:56:34 +00:00
testrunner [turboprop] Don't use concurrent inlining for TurboFan compilations 2020-11-25 15:15:24 +00:00
toolchain [build] Add support for the other MIPS architectures 2018-03-19 10:43:07 +00:00
torque [torque] fix formatting of derefence and addressof operators 2020-07-16 10:17:35 +00:00
tracing/proto-converter [tracing] Add the proto to json converter for trace events 2019-03-25 08:56:18 +00:00
turbolizer [turbolizer] Display live range uses 2020-06-02 15:04:11 +00:00
ubsan [ubsan] Make ARM and ARM64 UBSan-clean 2019-09-16 15:03:45 +00:00
unittests [test] Switch to flattened json output 2020-10-08 13:05:11 +00:00
v8.xcodeproj
v8windbg [config] Add V8_NODISCARD for Scope classes 2020-11-26 11:08:45 +00:00
valgrind/asan [build] Add testrunner data deps 2018-03-26 12:17:08 +00:00
vim [vim] Update CrBuild to use autoninja. 2019-05-27 06:27:29 +00:00
visual_studio
wasm Reland "[wasm-simd] Stage SIMD" 2020-09-10 16:04:35 +00:00
wasm-compilation-hints [wasm] Update OWNERS 2020-01-08 14:56:06 +00:00
zone-stats [zone-stats] Show all zones in a filter 2020-09-09 16:16:11 +00:00
__init__.py [test] make python recognize tools and tools/unittests as packages 2018-12-17 12:12:43 +00:00
adb-d8.py Remove JS natives support, step 3 2019-10-22 07:48:05 +00:00
android-build.sh
android-ll-prof.sh
android-run.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
android-sync.sh [mjsunit][tools] Sync module files for tests 2020-10-07 12:45:19 +00:00
arguments.js [tools] Move common arguments processing into separate file 2017-10-24 00:25:04 +00:00
arguments.mjs [tools] Modernize tools .mjs files 2020-11-10 12:32:26 +00:00
avg.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
bash-completion.sh Move remaining files in src/ 2019-05-24 18:24:36 +00:00
bigint-tester.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
BUILD.gn [tools] Add v8windbg, a WinDbg extension for V8 2020-02-18 19:16:18 +00:00
callstats_groups.py [tools] Add grouping to generate-runtime-callstats.py 2019-12-12 14:52:05 +00:00
callstats-from-telemetry.sh [tools] Add script to convert telemetry json files for callstats.html 2020-07-01 09:31:16 +00:00
callstats.html [tools] Add script to convert telemetry json files for callstats.html 2020-07-01 09:31:16 +00:00
callstats.py [callstats] relocate the vpython imports 2020-02-27 14:45:56 +00:00
callstats.py.vpython [tools] Fix platform specification for scipi 2018-08-17 18:49:49 +00:00
check-inline-includes.sh [iwyu] Extend inline include checking to tests. 2017-09-08 09:31:32 +00:00
check-static-initializers.sh [logging] Systematically emit CodeCreateEvents for builtins 2019-05-23 11:55:36 +00:00
check-unused-bailouts.sh [tools] Speed-up check-unused-bailouts.sh 2017-08-02 11:11:19 +00:00
check-unused-symbols.sh [cleanup] Remove unused heap-symbols and add tool. 2018-11-08 17:57:05 +00:00
codemap.js [profiler] fix 4 bugs in --prof/linux-tick-processor 2020-02-06 10:38:34 +00:00
codemap.mjs [tools] Use profiler code-source-info in processor.mjs 2020-11-30 11:34:49 +00:00
collect_deprecation_stats.sh [objects] Deprecate GetIsolate/Heap behind a flag 2018-06-01 15:19:21 +00:00
compare_torque_output.py [torque] Add support for torque output comparison 2020-01-21 14:39:04 +00:00
compare-table-gen.js Add more exhaustive tests for Math.min and Math.max. 2015-04-10 12:35:16 +00:00
consarray.js
consarray.mjs [tools] Modernize tools .mjs files 2020-11-10 12:32:26 +00:00
cpu.sh [tools] Allow specifying cores for cpu.sh script. 2015-11-18 10:53:30 +00:00
cross_build_gcc.sh
csvparser.js [tools] Harden and speed up map-processor 2020-04-01 10:34:04 +00:00
csvparser.mjs [tools] Modernize tools .mjs files 2020-11-10 12:32:26 +00:00
deprecation_stats.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
DEPS
detect-builtins.js [tools] Fix detect-builtins.js 2016-06-09 10:17:32 +00:00
disasm.py [grokdump] Include -z flag to make objdump disassemble all-zero sections 2017-04-21 13:35:37 +00:00
draw_instruction_graph.sh
dump-cpp.py [tools] Convert JS-tools to ES6 modules 2020-09-28 14:40:18 +00:00
dumpcpp-driver.mjs [tools] Modernize tools .mjs files 2020-11-10 12:32:26 +00:00
dumpcpp.mjs [tools] Modernize tools .mjs files 2020-11-10 12:32:26 +00:00
eval_gc_nvp.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
eval_gc_time.sh [in-place weak refs] Remove WeakCell 2018-08-14 08:05:05 +00:00
find_depot_tools.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
find-commit-for-patch.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
freebsd-tick-processor
fuzz-harness.sh [compiler] Make --debug-code the default in debug builds. 2016-12-02 11:36:55 +00:00
gc_nvp_common.py Clean up mark-compact phases and GC counter names. 2015-12-11 11:26:21 +00:00
gc-nvp-to-csv.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
gc-nvp-trace-processor.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
gdb-v8-support.py [tools] Fix gdb redirect command 2020-03-03 10:33:33 +00:00
gdbinit [gdbinit] Slightly increase dcheck stack walk limit 2020-01-23 11:27:28 +00:00
gen-inlining-tests.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
gen-keywords-gen-h.py [parser] Remove #line directives from keywords-gen.h 2018-11-28 15:22:05 +00:00
gen-postmortem-metadata.py Make v8dbg_ symbols V8_EXPORT so they can be exposed from Chrome builds 2020-11-09 09:16:55 +00:00
generate-builtins-tests.py [respect] Stop using "blacklist" in several python tools 2020-07-10 19:11:36 +00:00
generate-header-include-checks.py Change all TODOs from clemensh to clemensb 2019-09-26 10:25:27 +00:00
generate-runtime-call-stats.py [tools] Fix retention of json files in RCS script 2020-03-26 12:07:56 +00:00
generate-ten-powers.scm
get_landmines.py [landmines] Force clean build to fix Misc V8 Linux gcc 2019-06-06 21:52:11 +00:00
grokdump.py Make grokdump.py work on Windows 2019-10-18 11:13:55 +00:00
ic-processor [tools] Convert JS-tools to ES6 modules 2020-09-28 14:40:18 +00:00
ic-processor-driver.mjs [tools] Modernize tools .mjs files 2020-11-10 12:32:26 +00:00
index.html [tools] Remove outdated ic-processor 2020-10-27 14:21:45 +00:00
inspect-d8.js Improve JavaScript debugging in d8 2019-09-30 11:19:49 +00:00
linux-tick-processor [tools] Port more tools to ES6 classes 2020-11-04 14:45:41 +00:00
ll_prof.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
lldb_commands.py [tools] Add error handling to no_arg_cmd 2020-06-02 08:01:16 +00:00
locs.py [tools] Use ThreadPoolExecutor with reasonable job count default 2019-04-08 10:41:46 +00:00
logreader.js [tools] Harden and speed up map-processor 2020-04-01 10:34:04 +00:00
logreader.mjs [tools] Modernize tools .mjs files 2020-11-10 12:32:26 +00:00
mac-nm [profiler] Graphical front-end for tick processor. 2017-03-04 13:04:58 +00:00
mac-tick-processor
Makefile.tags [Makefile] Move tags generation to standalone Makefile 2018-01-26 12:03:32 +00:00
objdump-v8 [disasm] Make jump target printing perf friendly 2017-03-20 14:47:04 +00:00
OWNERS Use relative paths to OWNERS files 2019-08-12 13:52:52 +00:00
parse-processor [tools] Convert JS-tools to ES6 modules 2020-09-28 14:40:18 +00:00
parse-processor-driver.mjs [tools] Modernize tools .mjs files 2020-11-10 12:32:26 +00:00
parse-processor.html [tools] Convert JS-tools to ES6 modules 2020-09-28 14:40:18 +00:00
parse-processor.mjs [tools] Modernize tools .mjs files 2020-11-10 12:32:26 +00:00
perf-compare.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
predictable_wrapper.py [Py3] Get python scripts in tools closer to Py3 2020-06-29 16:55:16 +00:00
PRESUBMIT.py [presubmit] Clean up insensitive terms 2020-07-27 18:05:48 +00:00
profile_view.js
profile_view.mjs [tools] Modernize tools .mjs files 2020-11-10 12:32:26 +00:00
profile.js [tools] Add markers to system-analyzer source panel 2020-09-23 13:06:11 +00:00
profile.mjs [tools] Use profiler code-source-info in processor.mjs 2020-11-30 11:34:49 +00:00
regexp-sequences.py Preparing v8 to use with python3 2019-10-18 13:10:56 +00:00
run_perf.py [test] Make finding build directory more flexible 2020-09-28 12:38:16 +00:00
run-clang-tidy.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
run-llprof.sh Fix tools/run-llprof.sh to work with newer perf. 2014-10-09 06:01:41 +00:00
run-num-fuzzer.py [Py3] Get python scripts in tools closer to Py3 2020-06-29 16:55:16 +00:00
run-perf.sh [cleanup] Replace underscore by minus in d8 flags 2019-04-03 12:32:08 +00:00
run-tests.py [Py3] Get python scripts in tools closer to Py3 2020-06-29 16:55:16 +00:00
run-wasm-api-tests.py [wasm-c-api] Roll 7865f7d: Expose possible traps during Instance::make 2019-08-23 09:46:29 +00:00
run.py Show failure codes in run.py 2020-06-17 17:16:22 +00:00
shell-utils.h Move remaining files in src/ 2019-05-24 18:24:36 +00:00
SourceMap.js Fix two overflow cases in SourceMap VLQ decoding 2020-01-27 09:05:25 +00:00
sourcemap.mjs [tools] Modernize tools .mjs files 2020-11-10 12:32:26 +00:00
splaytree.js
splaytree.mjs [tools] Modernize tools .mjs files 2020-11-10 12:32:26 +00:00
stats-viewer.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
test262-results-parser.js test262 roll 2018-08-28 21:18:23 +00:00
tick-processor.html [tools] Convert JS-tools to ES6 modules 2020-09-28 14:40:18 +00:00
tickprocessor-driver.js [profiler] fix 4 bugs in --prof/linux-tick-processor 2020-02-06 10:38:34 +00:00
tickprocessor-driver.mjs [tools] Modernize tools .mjs files 2020-11-10 12:32:26 +00:00
tickprocessor.js [profiler] fix 4 bugs in --prof/linux-tick-processor 2020-02-06 10:38:34 +00:00
tickprocessor.mjs [tools] Modernize tools .mjs files 2020-11-10 12:32:26 +00:00
try_perf.py [tools] Add support for --confidence-level flag to tools/try_perf.py 2019-06-14 12:33:49 +00:00
turbolizer-perf.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
update-object-macros-undef.py Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
v8_presubmit.py [tools] Format JS files in system-analyzer/ if they're unformatted 2020-11-10 11:02:32 +00:00
v8heapconst.py Require the first three fields of ScopeInfo to be present 2020-11-30 16:23:05 +00:00
whitespace.txt Whitespace change to trigger builders 2020-11-02 14:16:50 +00:00
windbg.js [heap] Add base class for LargeObjectSpaces 2019-10-25 09:22:57 +00:00
windows-tick-processor.bat [tools] Convert JS-tools to ES6 modules 2020-09-28 14:40:18 +00:00