• Seth Brenith's avatar
    [torque] Get rid of `weak` keyword · 6745405f
    Seth Brenith authored
    Torque allows a `weak` keyword on class field declarations. This keyword
    is confusing, because it means two completely different things:
    
    1. This field should be included in the weak fields section, meaning the
       field's offset should be in the range [kStartOfWeakFieldsOffset,
       kEndOfWeakFieldsOffset).
    2. If a BodyDescriptor is generated for this class, then this field
       should be visited using *custom* weakness semantics
       (IterateCustomWeakPointers, not IterateMaybeObjectPointers).
    
    I propose the following updated behavior, which I think is a bit more
    reasonable:
    
    1. To request that the generated BodyDescriptor use custom weakness
       semantics, use a new annotation @customWeakMarking.
    2. The weak fields section includes all fields that can be a Weak<T>
       type, plus those annotated with @customWeakMarking.
    
    These new rules require reordering fields in two classes which didn't
    already have all of their strong fields adjacent.
    
    Bug: v8:7793
    Change-Id: Ic9d741986afa7fc1be3de044af5cae11a3c64d8c
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3261968
    Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
    Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#77739}
    6745405f
prototype-info.tq 1.16 KB