1. 21 Jul, 2021 1 commit
  2. 20 Jul, 2021 1 commit
    • Seth Brenith's avatar
      [cleanup] Use @generateCppClass on more classes · 334b94e1
      Seth Brenith authored
      Most Torque-defined extern classes already use @generateCppClass. As
      Nico pointed out in [1], it would be nice to convert the remaining
      classes and remove this option. This change converts most of those
      remaining classes. I know that the future of Torque-defined classes is a
      subject of some debate right now, but I think that it's worth doing a
      few mechanical changes to reduce the existing variety of options.
      
      Changes that don't exactly follow the usual pattern:
      1. BigIntBase, MutableBigInt: we can define these without a body, and
         then Torque treats them as "really external" rather than "kind of
         external, but with some Torque-generated parts".
      2. RegExpMatchInfo: moved its inline functions into a separate file,
         which the generated -tq.cc file requires.
      
      [1] https://docs.google.com/document/d/1q_gZLnXd4bGnCx3IUfbln46K3bSs9UHBGasy9McQtHI/edit#
      
      Bug: v8:8952
      Change-Id: I84c7958a295caa0bab847683c05022e18c921cad
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3027742Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#75817}
      334b94e1
  3. 10 Feb, 2021 1 commit
    • Daniel Clark's avatar
      Fix top-level await crash from synthetic module being evaluated twice · f033e2a1
      Daniel Clark authored
      With top-level await, when Evaluate is performed on an already-evaluated
      synthetic module, Module::InnerEvaluate returns undefined.  This breaks
      top-level await's assumption that the returned value is always a
      promise.
      
      In order to make SyntheticModule's behavior consistent with
      SourceTextModule, the top_level_capability field is moved up to Module
      and SyntheticModule::Evaluate places the promise returned from the
      host's evaluation steps in that field.  Now SourceTextModule and
      SyntheticModule can share the same code to handle the case where the
      module is either kErrored or kEvaluated, so the code for this
      is moved up to Module.
      
      Thus, SyntheticModule is now guaranteed to return the
      promise from the evaluation steps even on subsequent Evaluate() calls.
      
      Unfortunately Node hasn't yet updated their EvaluationStepsCallback
      to return a Promise, so we can't yet assume that the returned value
      is a Promise without breaking Node.  So, this change also adds a clause
      to check for this condition and create a new resolved Promise if one
      was not provided by the callback steps.  This could eventually be
      removed once Node's callback steps are updated for top-level await.
      
      Change-Id: I2d6ae918abfeba9e3a757838502d4df92946edaa
      Bug: v8:11398
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2673794Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Commit-Queue: Dan Clark <daniec@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#72629}
      f033e2a1
  4. 21 Nov, 2019 1 commit
    • Tobias Tebbi's avatar
      [torque] shape: define in-object properties properly · cfab6505
      Tobias Tebbi authored
      This introduces a new keyword "shape" in addition to "class",
      which allows the definition of a type that extends a JSObject
      subclass and specifies one or several maps with statically
      known in-object properties.
      Differences compared to normal classes:
      - Shapes are transient since they specify maps instead of
        instance types.
      - Shapes have a known size.
      - Fields of shapes are always in-object properties. In particular,
        this means that their offset is after kHeaderSize.
      - It's forbidden to inherited from shapes.
      - Since shapes usually specify NativeContext-dependent maps, it's
        not possible to write runtime type-checks for them. Thus this CL
        avoids mapping them to their own TNode type, as the CAST macro
        won't work properly. We had runtime-checks for some of them
        nevertheless, some of them scarily confusing like
        IsJSSloppyArgumentsObject, that actually just checked the instance
        type.
      
      Drive-by cleanups and simplifications:
      - Allow subclassing from non-abstract classes and remove
        @dirtyInstantiatedAbstractClass. This attribute stems from a mis-
        conception of how instance types work, and with this change it
        ceases to have semantic influence.
      - Replace the existing JSArgumentsObject subclasses into two shapes.
        JSArgumentsObjectWithLength had to be removed since shapes don't
        support subclassing.
      - Place kHeaderSize correctly for objects with indexed fields.
      
      Design doc:
      https://docs.google.com/document/d/1zPy2ZYfNFjeEuw6Mz3YJA-GaPGbdcSYam3SrS7ETzRU
      
      Bug: v8:8944
      
      Change-Id: Iabf185ccd27d0900e0890539a7fe9eaa8bf2d50e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1917140
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#65108}
      cfab6505
  5. 11 Nov, 2019 1 commit