1. 10 Jan, 2019 1 commit
    • Daniel Clifford's avatar
      [torque]: Class declarations · d0e95c7a
      Daniel Clifford authored
      Class declarations support structured heap data that is a subtype of
      HeapObject. Only fields of Object subtypes (both strong and weak)
      are currently supported (no scalar fields yet).
      
      With this CL, both the field list macro used with the C++
      DEFINE_FIELD_OFFSET_CONSTANTS macro (to make field offset constants) as
      well as the Torque "operator '.field'" macros are generated for the
      classes declared in Torque. This is a first step to removing the
      substantial amount of duplication and boilerplate code
      needed to declare heap object classes.
      
      As a proof of concept, and handful of class field definitions,
      including those for non trivial classes like JSFunction, have been
      moved to Torque.
      
      Bug: v8:7793
      Change-Id: I2fa0b53db65fa6f5fe078fb94e1db3418f908753
      Reviewed-on: https://chromium-review.googlesource.com/c/1373971
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58704}
      d0e95c7a
  2. 14 Dec, 2018 1 commit
    • Daniel Clifford's avatar
      [builtins] Port GetArgumentsFrameAndCount to Torque · a74afec6
      Daniel Clifford authored
      In the process, add the bint type (which stands for Best-INTeger),
      which implements Torque's idea of CSA's ParameterMode. It maps to
      a different type on 32-bit (Smi) and 64-bit (intptr). There are
      convert operators that are either no-ops or conversions
      to-and-from Smi and intptrs on the each platform, depending on
      the underlying type for bint. This allows Torque code to git most
      of the benefits of ParameterMode without having to explicitly
      pass around the mode, since it is almost always OptimalMode anyways.
      
      Change-Id: I92e08adc1d79cb3e24576c96f9734aec1af54162
      Reviewed-on: https://chromium-review.googlesource.com/c/1361160
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58253}
      a74afec6
  3. 13 Nov, 2018 1 commit
  4. 02 Nov, 2018 1 commit
  5. 10 Oct, 2018 1 commit
  6. 04 Oct, 2018 1 commit
  7. 13 Sep, 2018 1 commit
  8. 12 Sep, 2018 2 commits
  9. 11 Sep, 2018 1 commit
  10. 10 Sep, 2018 1 commit
  11. 20 Jul, 2018 1 commit
  12. 29 May, 2018 1 commit
    • Tobias Tebbi's avatar
      [torque] add union types · bf9d2893
      Tobias Tebbi authored
      This adds support for union types to Torque.
      
      There is a new type expression
      A | B
      to form the union of the type expressions A and B.
      This is only possible if A and B have a common supertype, to prevent
      nonsensical unions of types with different representations.
      
      Union types are normalized:
      A | B == B | A
      A | (B | C) == (A | B) | C
      A | A == A
      
      The subtyping rules are defined recursively:
      (A | B) <: C  if  A <: C and B <: C
      A <: (B | C)  if  A <: B or A <: C
      
      This allows to define Object as a union type:
      
      type Tagged generates 'TNode<Object>';
      type Smi extends Tagged generates 'TNode<Smi>';
      type HeapObject extends Tagged generates 'TNode<HeapObject>';
      type Object = Smi | HeapObject;
      
      The type {Tagged} is introduced to have a common supertype of all
      tagged values, but we should not use it directly, because {Object}
      contains the additional information that there is nothing but {Smi}
      and {HeapObject} values.
      
      When mapping union types to CSA types, we select the most specific
      common supertype. For Number and Numeric, we already use union types
      on the CSA side. Since it is not possible to map to CSA union types
      in general, we special-case these two union types to map them to
      the CSA union types we already use.
      
      Bug: v8:7793
      Change-Id: I7a4e466436f55d04012f29ef17acfdb957653908
      Reviewed-on: https://chromium-review.googlesource.com/1076132Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53411}
      bf9d2893
  13. 16 May, 2018 1 commit
  14. 24 Apr, 2018 1 commit
  15. 19 Apr, 2018 1 commit
    • Simon Zünd's avatar
      [torque] Add DashifyString function for module names. · a0d4005c
      Simon Zünd authored
      Module names in torque are allowed to have underscores but not dashes.
      To stay consistent with C++ file naming conventions, the underscores
      in module names are replaced by dashes for file names.
      
      Example:
      
      module typed_array {} would now generate:
      builtins-typed-array-from-dsl-gen.(cc|h)
      
      instead of:
      builtins-typed_array-from-dsl-gen.(cc|h)
      
      R=danno@chromium.org
      
      Change-Id: Iff42d7b9b5f65c378ee30f9d884ab6a3a3cd42a7
      Reviewed-on: https://chromium-review.googlesource.com/1016460Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52686}
      a0d4005c
  16. 16 Apr, 2018 1 commit
    • Daniel Clifford's avatar
      Torque: Implement a DSL for CSA · a3353da8
      Daniel Clifford authored
      An overview of motivation behind Torque and some of its principles
      can be found here: https://bit.ly/2qAI5Ep
      
      Note that there is quite a bit of work left to do in order to get
      Torque production-ready for any non-trivial amount of code, but
      landing the prototype as-is will allow for much faster iteration.
      
      Bugs will be filed for all of the big-ticket items that are not
      landing blockers but called out in this patch as important to fix.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_nosnap_rel;luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: Ib07af70966d5133dc57344928885478b9c6b8b73
      Reviewed-on: https://chromium-review.googlesource.com/845682
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52618}
      a3353da8