1. 15 May, 2020 1 commit
  2. 12 May, 2020 1 commit
  3. 30 Apr, 2020 1 commit
  4. 16 Jan, 2020 1 commit
  5. 18 Dec, 2019 1 commit
    • Nico Hartmann's avatar
      [torque] Enum language feature · fdc9fade
      Nico Hartmann authored
      This CL implements enums in Torque in three steps:
      
      1.) It implements necessary changes to Torque's type system. In
      particular, the constraints on constexpr types are relaxed such that
      constexpr types can exist without a corresponding non-constexpr
      version. Furthermore, constexpr and their non-constexpr counterpart
      need not be of the same kind of type. This allows an AbstractType to
      have a UnionType as its non-constexpr counterpart.
      
      2.) The enum feature itself is realized as a pure desugaring in the
      parser, where all required types, constants and macro specializations
      (like FromConstexpr<>) are generated from a simple enum declaration,
      such that enum entries are not just constants, but are namespace
      scoped and have distinct types so that they can be used within
      typeswitch constructs.
      
      3.) Almost all of the existing constants defined in torque
      (.tq files) are ported to new enum definitions.
      
      Bug: v8:10053
      Change-Id: I72426d3b1434f301fd690847e15603de0dc1021b
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1964392
      Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#65503}
      fdc9fade
  6. 16 Dec, 2019 1 commit
  7. 18 Oct, 2019 1 commit
  8. 04 Apr, 2019 1 commit
    • Tobias Tebbi's avatar
      [torque] named arguments for constructors · e87e3b1f
      Tobias Tebbi authored
      This changes the syntax for constructing structs and classes to explicitly
      mention the fieldnames, similar to JavaScript object literals.
      The fields still have to be listed in the same order as in the struct/class
      declaration.
      As in Javascript, {foo: foo} can be abbreviated as {foo}.
      
      Example:
      
      macro NewJSArray(implicit context: Context)(
          map: Map, elements: FixedArrayBase): JSArray {
        return new JSArray{
          map,
          properties_or_hash: kEmptyFixedArray,
          elements,
          length: elements.length
        };
      }
      
      Drive-by cleanup: Make struct and class constructors follow the same pattern
                        in the parser and the AST.
      
      Bug: v8:9018 v8:7793
      Change-Id: I22ff7f68270e4f406aa80731a709d41ea52f52bb
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1551999Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60622}
      e87e3b1f
  9. 05 Mar, 2019 1 commit
    • peterwmwong's avatar
      [typedarray] Port TypedArray#filter to Torque. · 7c89c29b
      peterwmwong authored
      Also ports GrowableFixedArray to Torque. The CSA version is preserved
      for now, as the Torque structs are not consumable by CSA builtins yet
      (Struct methods are inlined).
      
      TypedArrayPrototypeFilter builtin size decreased by 24% (Mac x64.release):
        TFJ Builtin, TypedArrayPrototypeFilter, 5689 -> 4298
      
      TypedArrays/Filter micro benchmarks have improved 10-15% (Mac x64.release):
        TypedArrays-Uint8Array(Score):     746 -> 857
        TypedArrays-Uint16Array(Score):    758 -> 862
        TypedArrays-Uint32Array(Score):    746 -> 855
        TypedArrays-Float32Array(Score):   749 -> 817
        TypedArrays-Float64Array(Score):   751 -> 839
        TypedArrays-BigUint64Array(Score): 562 -> 625
      
      Bug: v8:8906
      Change-Id: I1172b7407de95b067448e680ec327e726e9194cf
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1501469
      Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60035}
      7c89c29b