• Seth Brenith's avatar
    [torque] Generate accessors for struct-typed class fields · 6160a767
    Seth Brenith authored
    Torque generates runtime accessor member functions for most class fields
    that are defined in .tq files, but fields with struct types are
    currently omitted. This change adds those accessors. As an example, if a
    .tq file defines the following:
    
      struct InternalClassStructElement {
        a: Smi;
        b: Smi;
      }
    
      class InternalClassWithStructElements extends HeapObject {
        const count: Smi;
        entries[count]: InternalClassStructElement;
      }
    
    Then the following accessors are generated to get and set each struct
    field within the 'entries' field:
    
      inline int entries_a(int i) const;
      inline void set_entries_a(int i, int value);
    
      inline int entries_b(int i) const;
      inline void set_entries_b(int i, int value);
    
    Bug: v8:7793
    Change-Id: Ia40b5918e9d09f53ad8e78bc33f8629b8d6a79fe
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2676926Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
    Cr-Commit-Position: refs/heads/master@{#72662}
    6160a767
Name
Last commit
Last update
..
arm Loading commit data...
arm64 Loading commit data...
ia32 Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc Loading commit data...
riscv64 Loading commit data...
s390 Loading commit data...
wasm/gdb-server Loading commit data...
x64 Loading commit data...
DIR_METADATA Loading commit data...
OWNERS Loading commit data...
debug-coverage.cc Loading commit data...
debug-coverage.h Loading commit data...
debug-evaluate.cc Loading commit data...
debug-evaluate.h Loading commit data...
debug-frames.cc Loading commit data...
debug-frames.h Loading commit data...
debug-interface.cc Loading commit data...
debug-interface.h Loading commit data...
debug-property-iterator.cc Loading commit data...
debug-property-iterator.h Loading commit data...
debug-scope-iterator.cc Loading commit data...
debug-scope-iterator.h Loading commit data...
debug-scopes.cc Loading commit data...
debug-scopes.h Loading commit data...
debug-stack-trace-iterator.cc Loading commit data...
debug-stack-trace-iterator.h Loading commit data...
debug-type-profile.cc Loading commit data...
debug-type-profile.h Loading commit data...
debug-wasm-objects-inl.h Loading commit data...
debug-wasm-objects.cc Loading commit data...
debug-wasm-objects.h Loading commit data...
debug-wasm-objects.tq Loading commit data...
debug.cc Loading commit data...
debug.h Loading commit data...
interface-types.h Loading commit data...
liveedit.cc Loading commit data...
liveedit.h Loading commit data...