1. 28 Feb, 2019 1 commit
    • Simon Zünd's avatar
      [torque] Introduce LanguageServerData class · 3f057d44
      Simon Zünd authored
      This CL introduces a new contextual 'LanguageSererData'. Its purpose
      is to hold all the eagerly calculated data needed to answer
      language server requests. The first thing collected are the
      definitoins of some IdentifierExpresisons and macro/builtin
      call-sites.
      
      Collecting this data is not necessary for normal compilation, so it
      is disabled by default and can be enabled via a Torque compiler
      option. Since the holder class is a contextual for which no scope
      exists during normal compilation, accidental collection of
      unnecessary language server data *should* be prevented.
      
      R=tebbi@chromium.org
      
      Bug: v8:7793
      Change-Id: Iffcebad4c420a0a51b1ed3c37a37c3475c6ab2e8
      Reviewed-on: https://chromium-review.googlesource.com/c/1491594Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59941}
      3f057d44
  2. 19 Feb, 2019 1 commit
  3. 04 Feb, 2019 1 commit
  4. 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
  5. 05 Dec, 2018 1 commit
  6. 13 Nov, 2018 1 commit
  7. 05 Nov, 2018 1 commit
    • Tobias Tebbi's avatar
      [torque] cleanup generics and scopes · 06c8ce59
      Tobias Tebbi authored
      - Name lookup in module scopes has namespace semantics now: All
        overloads from all parent modules are combined before overload
        resolution.
      - Allow overloads of different callables: runtime-functions,
        macros, builtins, and generics.
      - The duplication between the DeclarationVisitor and the
        ImplementationVisitor is removed: The DeclarationVisitor creates
        declarables for everything except for implicit generic specializations.
        The ImplementationVisitor iterates over declarables.
        The DeclarationVisitor only looks at the header of declarations, not
        at the body.
      - Modules become Declarable's, which will enable them to be nested.
      - Modules replace the existing Scope chain mechanism, which will make it
        easier to inline macros.
      - The DeclarationVisitor and Declarations become stateless. All state is
        moved to contextual variables and the GlobalContext.
      - Implicit specializations are created directly from the
        ImplementationVisitor. This will enable template parameter inference.
      - As a consequence, the list of all builtins is only available after the
        ImplementationVisitor has run. Thus GenerateBuiltinDefinitions has to
        move to the ImplementationVisitor. Also, this makes it necessary to
        resolve the link from function pointer types to example builtins only
        at this point.
      
      
      Bug: v8:7793
      Change-Id: I61cef2fd3e954ab148c252974344a6e38ee2d01d
      Reviewed-on: https://chromium-review.googlesource.com/c/1304294
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57231}
      06c8ce59
  8. 15 Oct, 2018 1 commit
  9. 04 Oct, 2018 1 commit
  10. 24 Jul, 2018 1 commit
  11. 20 Jul, 2018 1 commit
  12. 15 Jun, 2018 1 commit
  13. 13 Jun, 2018 1 commit
  14. 30 May, 2018 1 commit
  15. 16 May, 2018 2 commits
  16. 08 May, 2018 1 commit
  17. 04 May, 2018 1 commit
    • Daniel Clifford's avatar
      [Torque]: add assert(), unreachable and debug statements · 9cd8995f
      Daniel Clifford authored
      - In debug builds, 'assert(<expr>)' evaluates and aborts execution
        if the provided Torque expression is false at runtime.
        assert(<expr>) supports the same set of expressions protocols
        as Toruqe's if statement, i.e. both bool values and BranchIf-
        style tests. Upon failure, the assertion prints the Torque
        source code of the failed expression, not the generated CSA
        code.
      - 'unreachable' calls CSA's Unreachable() and signals to Torque
        that code execution cannot continue (i.e. its statement
        returns the 'never' type). In debug builds, the line number
        and position of the statement are printed before breaking.
      - 'debug' calls CSA's DebugBreak(). In debug builds, the line
        number and position of the 'debug' are printed before breaking.
      
      Change-Id: I4efd052536bb402c097a0d5f7be56e154b5b3676
      Reviewed-on: https://chromium-review.googlesource.com/1042570
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52984}
      9cd8995f
  18. 03 May, 2018 1 commit
    • Daniel Clifford's avatar
      Refactor/cleanup various Torque classes, inclduing making Type a Declarable · 90415437
      Daniel Clifford authored
      This is a preparatory step for implementing generics. Along the way, clean up
      and encapsulate a bunch of code, including:
      
      * Fully encapsulate Scope by adding the new class ScopeChain that provide an
        abstraction for creating and activating scopes.
      * Untangle Modules and Scopes.
      * Unify scope activation so that it is always associated with an AST node
        and triggered by a RAII helper class.
      * Unify (somewhat) how builtins and macros are created, fixing a few
        inconsistencies with when and how parameters and their types are declared.
      * Create a new Declarations class that brokers between the visitor classes and
        the ScopeChain. This moves handling of declaration-related errors out of the
        visitors but also makes it possible to do so without polluting Scope and
        ScopeChain with details about resolving SourcePositions in error cases.
      
      Change-Id: I180017d4cf39ccf5ef1d20b84f53284c252f8d87
      Reviewed-on: https://chromium-review.googlesource.com/1038504
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52947}
      90415437
  19. 24 Apr, 2018 1 commit
  20. 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