1. 24 Jul, 2018 1 commit
  2. 20 Jul, 2018 1 commit
  3. 16 May, 2018 2 commits
    • Tobias Tebbi's avatar
      [torque] implement function pointers to builtins · 07f19a08
      Tobias Tebbi authored
      This CL adds the new type expression
      builtin(Context, ArgType1, ...) => ReturnType
      and allows to use Torque-defined builtins as values of this type, as well
      as calling values of this type.
      The new function pointer types are subtypes of Code.
      
      Change-Id: Ib7ba3ce6ef7a8591a4c79230dd189fd25698d5b9
      Reviewed-on: https://chromium-review.googlesource.com/1060056
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53217}
      07f19a08
    • Daniel Clifford's avatar
      [torque]: Implement Generics for Builtins and Macros · 3d2cb0b4
      Daniel Clifford authored
      Including specialization, e.g.:
      
        // Declare parameterized generic
        macro GenericMacroTest<T: type>(param: T): Object {
          return Undefined;
        }
      
        // Declare specialization of generic
        GenericMacroTest<Object>(param: Object): Object {
          return param;
        }
      
        ...
        assert(GenericMacroTest<Smi>(0) == Undefined);
        assert(GenericMacroTest<Smi>(1) == Undefined);
        assert(GenericMacroTest<Object>(Null) == Null);
        assert(GenericMacroTest<Object>(False) == False);
        ...
      
      Known issue: specialization doesn't rigorously checked to verify
      that specialization signature precisely matches generic declaration.
      
      Change-Id: I9d9d96da4c5c8c9a76550844680e9e133a5edaed
      Reviewed-on: https://chromium-review.googlesource.com/1043986
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53203}
      3d2cb0b4
  4. 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
  5. 24 Apr, 2018 1 commit
  6. 20 Apr, 2018 1 commit
    • Mike Stanton's avatar
      [Torque] Support JavaScript builtins with fixed args · 93df7ff0
      Mike Stanton authored
      To implement builtin continuations called from the deoptimizer,
      we need to better support writing builtins declared with javascript
      binding in Torque. This CL adds fixed number of argument support.
      So you can declare in Torque, something like:
      
      builtin javascript Foo(context: Context, receiver: Object, bar: Object):
        Object {
        ...
      }
      
      Formerly, this would give you an error because we only supported
      javascript bindings with a varargs array.
      
      Bug: v8:7672
      Change-Id: I5b5b25bdbbd5e054049c39dd2f1a4c606472dcd5
      Reviewed-on: https://chromium-review.googlesource.com/1018941
      Commit-Queue: Michael Stanton <mvstanton@chromium.org>
      Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52704}
      93df7ff0
  7. 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