• Tobias Tebbi's avatar
    [torque] multiple arrays in one object · 59e8d45a
    Tobias Tebbi authored
    This allows the definition of classes with several arrays and ports
    SmallOrderedHashTable subclasses to Torque as an example, including
    the existing CSA allocation functions for them.
    
    Overview of changes:
    - Introduce ResidueClass to encapsulate the modulo-arithmetic
      necessary to do alignment checks.
    - Add MachineOperatorReducer to the CSA pipeline to address now
      missing CSA ad-hoc constant folding that got blocked by a
      temporary phi.
    - Allow assignments to references to structs. This is needed to
      initialize the data_table part of SmallOrderedHashMap.
    - Make the NumberLiteralExpression AST-node store a double instead
      of a string. This is necessary to detect arrays with constant size
      used for padding.
    - Turn offsets into base::Optional<size_t> to ensure we don't use
      an invalid or statically unknown offset.
    - Remove CreateFieldReferenceInstruction since it doesn't work for
      complex offset computations and the logic can be expressed better
      in ImplementationVisitor.
    - Validate alignment of structs embedded in classes.
    
    Bug: v8:10004 v8:7793
    Change-Id: Ifa414b42278e572a0c577bf9da3d37f80771a258
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1958011
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
    Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#65538}
    59e8d45a
utils.cc 10.9 KB