• Seth Brenith's avatar
    [torque] Automatically generate verifier functions · e483fb27
    Seth Brenith authored
    This change generates functions that verify the things that Torque knows
    about objects and their fields. We still must implement each verifier
    function in objects-debug.cc, but we can call into the generated code to
    verify that field types match their Torque definitions. If no additional
    verification is required, we can use the macro USE_TORQUE_VERIFIER as a
    shorthand for a verifier that calls the corresponding generated
    function.
    
    A new annotation @noVerifier can be applied to both class and field
    definitions, to prevent generating verification code. This allows fully
    customized verification for complicated cases like
    JSFunction::prototype_or_initial_map, which might not exist at all, and
    JSObject::elements, which might be a one pointer filler map.
    
    Because Factory::InitializeJSObjectFromMap fills new objects with
    undefined values, and many verifiers need to deal with partially-
    initialized objects, the generated verifiers allow undefined values on
    every class deriving from JSObject. In cases where stricter checks were
    previously performed, they are kept in objects-debug.cc.
    
    Bug: v8:7793
    Change-Id: I84034efadca89ba0aceddf92e886ffbfaa4c23fa
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1594042
    Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
    Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#61422}
    e483fb27
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...