• 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...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...