1. 29 May, 2020 1 commit
  2. 26 May, 2020 1 commit
  3. 07 May, 2020 1 commit
  4. 11 Feb, 2020 1 commit
    • Nico Hartmann's avatar
      [torque] Reduce generated CSA variables and labels · 89b248b6
      Nico Hartmann authored
      This CL significantly reduces the size of CSA files generated from
      torque by introducing only those Phis at block entry that are
      required and otherwise uses defined values directly.
      
      To do so it does:
      - Define a DefinitionLocation that represents where a value is
        defined.
      - For each block compute all the definitions that reach that
        block and introduce a phi iff the reaching definitions for a value
        are not the same for all predecessor blocks.
      - In CSAGenerator map all DefinitionLocations to variables, such that
        if the same value is used in multiple blocks, it is mapped to the
        same variable without the need to pass it along the jump. This
        reduces both the arguments passed to Goto, Branch, ... and the
        variables that need to be passed to Bind when the block's label is
        bound. This reduces the number of temporary variables
        significantly. Temporaries are declared outside of blocks now
        in order to be accessible from other blocks.
      
      Drive-by changes:
      - Sequences of SetSourcePosition calls are merged if no output is
        generated between them.
      - Dead blocks are no longer generated in release builds.
      
      Bug: v8:9861
      Change-Id: I5c30e5376e93c424c3ebfc5144a08592d77ae61f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2037444
      Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66225}
      89b248b6
  5. 20 Dec, 2019 1 commit
    • Tobias Tebbi's avatar
      [torque] multiple arrays in one object · 59e8d45a
      Tobias Tebbi authored
      This allows the definition of classes with several arrays and ports
      SmallOrderedHashTable subclasses to Torque as an example, including
      the existing CSA allocation functions for them.
      
      Overview of changes:
      - Introduce ResidueClass to encapsulate the modulo-arithmetic
        necessary to do alignment checks.
      - Add MachineOperatorReducer to the CSA pipeline to address now
        missing CSA ad-hoc constant folding that got blocked by a
        temporary phi.
      - Allow assignments to references to structs. This is needed to
        initialize the data_table part of SmallOrderedHashMap.
      - Make the NumberLiteralExpression AST-node store a double instead
        of a string. This is necessary to detect arrays with constant size
        used for padding.
      - Turn offsets into base::Optional<size_t> to ensure we don't use
        an invalid or statically unknown offset.
      - Remove CreateFieldReferenceInstruction since it doesn't work for
        complex offset computations and the logic can be expressed better
        in ImplementationVisitor.
      - Validate alignment of structs embedded in classes.
      
      Bug: v8:10004 v8:7793
      Change-Id: Ifa414b42278e572a0c577bf9da3d37f80771a258
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1958011
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#65538}
      59e8d45a
  6. 13 Dec, 2019 1 commit
  7. 15 Nov, 2019 1 commit
    • Seth Brenith's avatar
      [torque] Generate more detailed errors when instantiating generics · 332290e4
      Seth Brenith authored
      Currently it's pretty easy to write Torque code that generates an error
      in some common generic function such as Convert<To: type, From: type>,
      and unless your change is very small, it can be hard to figure out what
      part of it caused that macro specialization. This CL updates the Torque
      compiler to emit some extra information about the stack of code
      positions that caused a specialization of a macro or builtin, similar to
      what Clang does for C++ templates. Obviously there might be multiple
      places that require a particular specialization, but we only report the
      first one that caused the specialization to be created.
      
      Bug: v8:7793
      Change-Id: I4c0fbf1fd437d0eb0d7d5002baef7a5361aea5ee
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1911019
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64987}
      332290e4
  8. 31 Oct, 2019 1 commit
  9. 30 Aug, 2019 1 commit
    • Georg Schmid's avatar
      [torque] Add HeapSlice location references to Torque · cbf01502
      Georg Schmid authored
      This CL adds a LocationReference specifically for slices to Torque. This allows us to safely reference arrays in objects and pass around such references. For an array of T-typed elements, referencing yields a Slice<T>. In addition, the traditional element access syntax ('o.array[i]') now internally produces a slice, indexes it at 'i' and dereferences the resulting HeapReference.
      
      Bug: v8:7793
      Change-Id: I4af58e4d2feac547c55a1f6f9350a6c510383df2
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1771782
      Commit-Queue: Georg Schmid <gsps@google.com>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63479}
      cbf01502
  10. 31 Jul, 2019 1 commit
    • Seth Brenith's avatar
      Reland "Add postmortem debugging helper library" · 0921e8f2
      Seth Brenith authored
      This is a reland of 517ab73f
      
      Updates since original: now compressed pointers passed to the function
      GetObjectProperties are required to be sign-extended. Previously, the
      function allowed zero-extended values, but that led to ambiguity on
      pointers like 0x88044919: is it compressed or is the heap range actually
      centered on 0x100000000?
      
      Original change's description:
      > Add postmortem debugging helper library
      >
      > This change begins to implement the functionality described in
      > https://docs.google.com/document/d/1evHnb1uLlSbvHAAsmOXyc25x3uh1DjgNa8u1RHvwVhk/edit#
      > for investigating V8 state in crash dumps.
      >
      > This change adds a new library, v8_debug_helper, for providing platform-
      > agnostic assistance with postmortem debugging. This library can be used
      > by extensions built for debuggers such as WinDbg or lldb. Its public API
      > is described by debug-helper.h; currently the only method it exposes is
      > GetObjectProperties, but we'd like to add more functionality over time.
      > The API surface is restricted to plain C-style structs and pointers, so
      > that it's easy to link from a debugger extension built with a different
      > toolchain.
      >
      > This change also adds a new cctest file to exercise some basic
      > interaction with the new library.
      >
      > The API function GetObjectProperties takes an object pointer (which
      > could be compressed, or weak, or a SMI), and returns a string
      > description of the object and a list of properties the object contains.
      > For now, the list of properties is entirely based on Torque object
      > definitions, but we expect to add custom properties in future updates so
      > that it can be easier to make sense of complex data structures such as
      > dictionaries.
      >
      > GetObjectProperties does several things that are intended to generate
      > somewhat useful results even in cases where memory may be corrupt or
      > unavailable:
      > - The caller may optionally provide a type string which will be used if
      >   the memory for the object's Map is inaccessible.
      > - All object pointers are compared against the list of known objects
      >   generated by mkgrokdump. The caller may optionally provide the
      >   pointers for the first pages of various heap spaces, to avoid spurious
      >   matches. If those pointers are not provided, then any matches are
      >   prefixed with "maybe" in the resulting description string, such as
      >   "maybe UndefinedValue (0x4288000341 <Oddball>)".
      >
      > Bug: v8:9376
      >
      > Change-Id: Iebf3cc2dea3133c7811bcefcdf38d9458b02fded
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1628012
      > Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Michael Stanton <mvstanton@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#62882}
      
      Bug: v8:9376
      Change-Id: I866a1cc9d4c34bfe10c7b98462451fe69763cf3f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1717090Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#63008}
      0921e8f2
  11. 24 Jul, 2019 1 commit
    • Zhi An Ng's avatar
      Revert "Add postmortem debugging helper library" · 6747e3a1
      Zhi An Ng authored
      This reverts commit 517ab73f.
      
      Reason for revert: Test failures https://bugs.chromium.org/p/v8/issues/detail?id=9538
      
      Original change's description:
      > Add postmortem debugging helper library
      > 
      > This change begins to implement the functionality described in
      > https://docs.google.com/document/d/1evHnb1uLlSbvHAAsmOXyc25x3uh1DjgNa8u1RHvwVhk/edit#
      > for investigating V8 state in crash dumps.
      > 
      > This change adds a new library, v8_debug_helper, for providing platform-
      > agnostic assistance with postmortem debugging. This library can be used
      > by extensions built for debuggers such as WinDbg or lldb. Its public API
      > is described by debug-helper.h; currently the only method it exposes is
      > GetObjectProperties, but we'd like to add more functionality over time.
      > The API surface is restricted to plain C-style structs and pointers, so
      > that it's easy to link from a debugger extension built with a different
      > toolchain.
      > 
      > This change also adds a new cctest file to exercise some basic
      > interaction with the new library.
      > 
      > The API function GetObjectProperties takes an object pointer (which
      > could be compressed, or weak, or a SMI), and returns a string
      > description of the object and a list of properties the object contains.
      > For now, the list of properties is entirely based on Torque object
      > definitions, but we expect to add custom properties in future updates so
      > that it can be easier to make sense of complex data structures such as
      > dictionaries.
      > 
      > GetObjectProperties does several things that are intended to generate
      > somewhat useful results even in cases where memory may be corrupt or
      > unavailable:
      > - The caller may optionally provide a type string which will be used if
      >   the memory for the object's Map is inaccessible.
      > - All object pointers are compared against the list of known objects
      >   generated by mkgrokdump. The caller may optionally provide the
      >   pointers for the first pages of various heap spaces, to avoid spurious
      >   matches. If those pointers are not provided, then any matches are
      >   prefixed with "maybe" in the resulting description string, such as
      >   "maybe UndefinedValue (0x4288000341 <Oddball>)".
      > 
      > Bug: v8:9376
      > 
      > Change-Id: Iebf3cc2dea3133c7811bcefcdf38d9458b02fded
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1628012
      > Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Michael Stanton <mvstanton@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#62882}
      
      TBR=yangguo@chromium.org,mvstanton@chromium.org,jgruber@chromium.org,tebbi@chromium.org,seth.brenith@microsoft.com
      
      Change-Id: Ia078f2e8d101d2375b5db88021b2d65d28f1b075
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:9376
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1716033Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#62899}
      6747e3a1
  12. 23 Jul, 2019 1 commit
    • Seth Brenith's avatar
      Add postmortem debugging helper library · 517ab73f
      Seth Brenith authored
      This change begins to implement the functionality described in
      https://docs.google.com/document/d/1evHnb1uLlSbvHAAsmOXyc25x3uh1DjgNa8u1RHvwVhk/edit#
      for investigating V8 state in crash dumps.
      
      This change adds a new library, v8_debug_helper, for providing platform-
      agnostic assistance with postmortem debugging. This library can be used
      by extensions built for debuggers such as WinDbg or lldb. Its public API
      is described by debug-helper.h; currently the only method it exposes is
      GetObjectProperties, but we'd like to add more functionality over time.
      The API surface is restricted to plain C-style structs and pointers, so
      that it's easy to link from a debugger extension built with a different
      toolchain.
      
      This change also adds a new cctest file to exercise some basic
      interaction with the new library.
      
      The API function GetObjectProperties takes an object pointer (which
      could be compressed, or weak, or a SMI), and returns a string
      description of the object and a list of properties the object contains.
      For now, the list of properties is entirely based on Torque object
      definitions, but we expect to add custom properties in future updates so
      that it can be easier to make sense of complex data structures such as
      dictionaries.
      
      GetObjectProperties does several things that are intended to generate
      somewhat useful results even in cases where memory may be corrupt or
      unavailable:
      - The caller may optionally provide a type string which will be used if
        the memory for the object's Map is inaccessible.
      - All object pointers are compared against the list of known objects
        generated by mkgrokdump. The caller may optionally provide the
        pointers for the first pages of various heap spaces, to avoid spurious
        matches. If those pointers are not provided, then any matches are
        prefixed with "maybe" in the resulting description string, such as
        "maybe UndefinedValue (0x4288000341 <Oddball>)".
      
      Bug: v8:9376
      
      Change-Id: Iebf3cc2dea3133c7811bcefcdf38d9458b02fded
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1628012
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#62882}
      517ab73f
  13. 21 Jun, 2019 1 commit
    • Sigurd Schneider's avatar
      [torque] Support 'real' internal classes · 76c1e829
      Sigurd Schneider authored
      Rework the implementation of non-external Torque classes to use
      Struct machinery rather than FixedArray machinery. This allows
      Torque-only defined 'internal' classes to the automatically generate
      class verifiers and printers.
      
      As part of this change, generate C++ boilerplate accessors for
      internal Torque classes, since this is a pre-requisite for the
      verifiers, printers and other Struct-based functionality.
      
      Moreover, augment the header-generating functionality in Torque
      to create separate header files for field offset definitions,
      internal class C++ definitions and instance types.
      
      Bug: v8:7793
      Change-Id: I47d5f1570040c2b44d378f23b6cf95d3d132dacc
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1607645
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#62317}
      76c1e829
  14. 05 Jun, 2019 1 commit
  15. 03 Jun, 2019 1 commit
  16. 28 May, 2019 1 commit
  17. 24 May, 2019 1 commit
    • Tobias Tebbi's avatar
      Reland^2 "[torque] move class tests to unittests" · d47db126
      Tobias Tebbi authored
      This is a reland of c33a1ef2
      
      It seems the revert was based on a flake.
      
      Original change's description:
      > Reland "[torque] move class tests to unittests"
      >
      > This is a reland of f589d561
      >
      > Now with an ASAN-container-overflow false positive workaround:
      > Somehow ASAN was unhappy about a simple
      > std::vector<std::string>::push_back.
      > Increasing the std::vector capacity before doing the push_back
      > strangely fixes the problem.
      >
      > Original change's description:
      > > [torque] move class tests to unittests
      > >
      > > This avoids the generation of fake external classes.
      > >
      > > Bug: v8:7793
      > > Change-Id: I9744b299d3ec474d72b298b4f6143f95e345d1d9
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1625991
      > > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
      > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#61778}
      >
      > TBR: szuend@chromium.org, sigurds@chromium.org
      > Bug: v8:7793
      > Change-Id: Ifa1958e4d6e850ba27632aa95c7efaf5ca4bfefa
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627970
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#61807}
      
      Bug: v8:7793
      Change-Id: Ia403f1b784500c0903172f13e74c0b325e82599f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627980Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61819}
      d47db126
  18. 23 May, 2019 2 commits
    • Francis McCabe's avatar
      Revert "Reland "[torque] move class tests to unittests"" · 0ef1982f
      Francis McCabe authored
      This reverts commit c33a1ef2.
      
      Reason for revert: fails win32 test:
      https://ci.chromium.org/p/v8/builders/ci/V8%20Win32%20-%20nosnap%20-%20shared/33658
      
      Original change's description:
      > Reland "[torque] move class tests to unittests"
      > 
      > This is a reland of f589d561
      > 
      > Now with an ASAN-container-overflow false positive workaround:
      > Somehow ASAN was unhappy about a simple
      > std::vector<std::string>::push_back.
      > Increasing the std::vector capacity before doing the push_back
      > strangely fixes the problem.
      > 
      > Original change's description:
      > > [torque] move class tests to unittests
      > >
      > > This avoids the generation of fake external classes.
      > >
      > > Bug: v8:7793
      > > Change-Id: I9744b299d3ec474d72b298b4f6143f95e345d1d9
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1625991
      > > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
      > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#61778}
      > 
      > TBR: szuend@chromium.org, sigurds@chromium.org
      > Bug: v8:7793
      > Change-Id: Ifa1958e4d6e850ba27632aa95c7efaf5ca4bfefa
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627970
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#61807}
      
      TBR=sigurds@chromium.org,tebbi@chromium.org,szuend@chromium.org
      
      Change-Id: I079e3ccf2c7a4778e3e6aabee85313ab5a070ee3
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:7793
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1626834Reviewed-by: 's avatarFrancis McCabe <fgm@chromium.org>
      Commit-Queue: Francis McCabe <fgm@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61808}
      0ef1982f
    • Tobias Tebbi's avatar
      Reland "[torque] move class tests to unittests" · c33a1ef2
      Tobias Tebbi authored
      This is a reland of f589d561
      
      Now with an ASAN-container-overflow false positive workaround:
      Somehow ASAN was unhappy about a simple
      std::vector<std::string>::push_back.
      Increasing the std::vector capacity before doing the push_back
      strangely fixes the problem.
      
      Original change's description:
      > [torque] move class tests to unittests
      >
      > This avoids the generation of fake external classes.
      >
      > Bug: v8:7793
      > Change-Id: I9744b299d3ec474d72b298b4f6143f95e345d1d9
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1625991
      > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#61778}
      
      TBR: szuend@chromium.org, sigurds@chromium.org
      Bug: v8:7793
      Change-Id: Ifa1958e4d6e850ba27632aa95c7efaf5ca4bfefa
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627970
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61807}
      c33a1ef2
  19. 21 May, 2019 1 commit
    • Simon Zünd's avatar
      [torque] More flexibel and uniform error reporting · bdfd1e4b
      Simon Zünd authored
      This CL changes the existing TorqueError struct into a more general
      TorqueMessage by adding a "kind" enum. The contextual for lint errors
      is removed and replaced by a list of TorqueMessages.
      
      A MessageBuilder is introduced to help with the different
      combinations of present information and method of reporting. A lint
      error with custom SourcePosition can be reported like this:
      
      Lint("naming convention error").Position(<src_pos_var>);
      
      While a fatal error, with CurrentSourcePosition can be thrown
      like this:
      
      Error("something went horrible wrong").Throw();
      
      This approach is both backwards compatible and should prove flexible
      enough to add more information to messages or add other message kinds.
      
      Bug: v8:7793
      Change-Id: Ib04fa188e34b3e8e9a6526a086f80da8f690a6f5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1617245
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61696}
      bdfd1e4b
  20. 08 May, 2019 1 commit
    • Sigurd Schneider's avatar
      [torque] Refactor annotation handling · ad010efa
      Sigurd Schneider authored
      This CL introduces an AnnotationSet to unify annotation handling. Grammar
      rules now accept a list of annotations (via annotations Symbol), where an
      annotation is an Identifier starting with '@'. The new class AnnotationSet
      can be used to restrict the allowed annotations and query presence of annotations
      in the Make* functions.
      
      Bug: v8:7793
      Change-Id: Iad5435d4a94a3bea99aca76c23d2cffffe78a97f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1601142
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61334}
      ad010efa
  21. 24 Apr, 2019 1 commit
    • Simon Zünd's avatar
      [torque] Collect lint errors for later processing · 1397697e
      Simon Zünd authored
      This CL changes lint errors to not be printed directly to stderr.
      Instead, they are collected in a list that gets surfaced via
      the TorqueCompilerResult. This is done so they can be presented
      to language server clients.
      
      This change also removes the "abort_on_lint_errors" option.
      API users can now decide for themselves what to do, depending on
      the presence of lint errors in the returned list.
      
      R=sigurds@chromium.org, tebbi@chromium.org
      
      Bug: v8:8880
      Change-Id: I44601010491aafcf4c8609fd8c115219317506a4
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1581608Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60983}
      1397697e
  22. 23 Apr, 2019 1 commit
    • Simon Zünd's avatar
      [torque-ls] Send compilation errors to the client · f663bb6e
      Simon Zünd authored
      This CL implements the first set of diagnostic notifications.
      When Torque compilation fails, the language server translates the
      Torque error into a diagnostics notification and pushes it to the
      client.
      
      Note that per specification, the server is responsible to manage the
      state of all published diagnostics. This means that the server is
      also responsible for clearing out previous notifications if they
      become stale.
      
      Bug: v8:8880
      Change-Id: Ief46dc1d94d1e5b7fa3e0048df494bfc05974031
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1569434Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60942}
      f663bb6e
  23. 16 Apr, 2019 1 commit
    • Simon Zünd's avatar
      Reland^3 "[torque] Throw exception instead of aborting if something goes wrong" · 2d8f2e86
      Simon Zünd authored
      This is a reland of ffe6940f
      
      The UBSan issue is fixed with https://crrev.com/c/1566511
      
      TBR=tebbi@chromium.org
      
      Original change's description:
      > Reland^2 "[torque] Throw exception instead of aborting if something goes wrong"
      >
      > This is a reland of 251d1623
      >
      > The reland fixes ASAN component builds by adding RTTI build config to both
      > torque executables. Big thanks to sigurds for finding the fix.
      >
      > Original change's description:
      > > Reland "[torque] Throw exception instead of aborting if something goes wrong"
      > >
      > > This is a reland of 3bd49f9b
      > >
      > > The issue on the windows bot is apparently a compiler bug in MSVC related to
      > > move construction. The fix seems to be to change the order of the fields in
      > > "JsonParseResult" (go figure).
      > >
      > > Drive-by-change: Fix LS on windows by emitting correct line endings and
      > > enabling exceptions for the LS executable as well.
      > >
      > > Original change's description:
      > > > [torque] Throw exception instead of aborting if something goes wrong
      > > >
      > > > This CL enables exceptions for the Torque compiler and Torque language
      > > > server. Instead of aborting when something goes wrong during
      > > > compilation, a TorqueError is thrown, containing the error message
      > > > and a source position. The compiler executable still prints the error
      > > > and aborts, while the language server will pass this information
      > > > along to the client (not included in this CL).
      > > >
      > > > R=danno@chromium.org
      > > >
      > > > Bug: v8:8880
      > > > Change-Id: Iad83c46fb6a91c1babbc0ae7dbd94fbe4e7f1663
      > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526003
      > > > Reviewed-by: Daniel Clifford <danno@chromium.org>
      > > > Commit-Queue: Simon Zünd <szuend@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#60512}
      > >
      > > Bug: v8:8880
      > > Change-Id: I00e6591bbb4c516dd7540a7e27196853bc637f11
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545995
      > > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > > Commit-Queue: Simon Zünd <szuend@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#60736}
      >
      > Bug: v8:8880
      > Change-Id: Iba198d771169283e83e74324f27aa9e90b8d8975
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1563770
      > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
      > Commit-Queue: Simon Zünd <szuend@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#60804}
      
      Bug: v8:8880
      Change-Id: I5b7e40ad27bff8f7bfa22240954c2cb75083ad82
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1564065Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Auto-Submit: Simon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60860}
      2d8f2e86
  24. 12 Apr, 2019 2 commits
    • Simon Zünd's avatar
      Revert "Reland^2 "[torque] Throw exception instead of aborting if something goes wrong"" · d7801445
      Simon Zünd authored
      This reverts commit ffe6940f.
      
      Reason for revert: Breaks UBSan bot
      
      Original change's description:
      > Reland^2 "[torque] Throw exception instead of aborting if something goes wrong"
      > 
      > This is a reland of 251d1623
      > 
      > The reland fixes ASAN component builds by adding RTTI build config to both
      > torque executables. Big thanks to sigurds for finding the fix.
      > 
      > Original change's description:
      > > Reland "[torque] Throw exception instead of aborting if something goes wrong"
      > >
      > > This is a reland of 3bd49f9b
      > >
      > > The issue on the windows bot is apparently a compiler bug in MSVC related to
      > > move construction. The fix seems to be to change the order of the fields in
      > > "JsonParseResult" (go figure).
      > >
      > > Drive-by-change: Fix LS on windows by emitting correct line endings and
      > > enabling exceptions for the LS executable as well.
      > >
      > > Original change's description:
      > > > [torque] Throw exception instead of aborting if something goes wrong
      > > >
      > > > This CL enables exceptions for the Torque compiler and Torque language
      > > > server. Instead of aborting when something goes wrong during
      > > > compilation, a TorqueError is thrown, containing the error message
      > > > and a source position. The compiler executable still prints the error
      > > > and aborts, while the language server will pass this information
      > > > along to the client (not included in this CL).
      > > >
      > > > R=danno@chromium.org
      > > >
      > > > Bug: v8:8880
      > > > Change-Id: Iad83c46fb6a91c1babbc0ae7dbd94fbe4e7f1663
      > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526003
      > > > Reviewed-by: Daniel Clifford <danno@chromium.org>
      > > > Commit-Queue: Simon Zünd <szuend@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#60512}
      > >
      > > Bug: v8:8880
      > > Change-Id: I00e6591bbb4c516dd7540a7e27196853bc637f11
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545995
      > > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > > Commit-Queue: Simon Zünd <szuend@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#60736}
      > 
      > Bug: v8:8880
      > Change-Id: Iba198d771169283e83e74324f27aa9e90b8d8975
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1563770
      > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
      > Commit-Queue: Simon Zünd <szuend@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#60804}
      
      TBR=sigurds@chromium.org,tebbi@chromium.org,szuend@chromium.org
      
      Change-Id: I30ccec8ac28158c102a4e9a01074432172685f96
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:8880
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1564207Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60805}
      d7801445
    • Simon Zünd's avatar
      Reland^2 "[torque] Throw exception instead of aborting if something goes wrong" · ffe6940f
      Simon Zünd authored
      This is a reland of 251d1623
      
      The reland fixes ASAN component builds by adding RTTI build config to both
      torque executables. Big thanks to sigurds for finding the fix.
      
      Original change's description:
      > Reland "[torque] Throw exception instead of aborting if something goes wrong"
      >
      > This is a reland of 3bd49f9b
      >
      > The issue on the windows bot is apparently a compiler bug in MSVC related to
      > move construction. The fix seems to be to change the order of the fields in
      > "JsonParseResult" (go figure).
      >
      > Drive-by-change: Fix LS on windows by emitting correct line endings and
      > enabling exceptions for the LS executable as well.
      >
      > Original change's description:
      > > [torque] Throw exception instead of aborting if something goes wrong
      > >
      > > This CL enables exceptions for the Torque compiler and Torque language
      > > server. Instead of aborting when something goes wrong during
      > > compilation, a TorqueError is thrown, containing the error message
      > > and a source position. The compiler executable still prints the error
      > > and aborts, while the language server will pass this information
      > > along to the client (not included in this CL).
      > >
      > > R=danno@chromium.org
      > >
      > > Bug: v8:8880
      > > Change-Id: Iad83c46fb6a91c1babbc0ae7dbd94fbe4e7f1663
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526003
      > > Reviewed-by: Daniel Clifford <danno@chromium.org>
      > > Commit-Queue: Simon Zünd <szuend@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#60512}
      >
      > Bug: v8:8880
      > Change-Id: I00e6591bbb4c516dd7540a7e27196853bc637f11
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545995
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Commit-Queue: Simon Zünd <szuend@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#60736}
      
      Bug: v8:8880
      Change-Id: Iba198d771169283e83e74324f27aa9e90b8d8975
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1563770Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60804}
      ffe6940f
  25. 10 Apr, 2019 2 commits
    • Maya Lekova's avatar
      Revert "Reland "[torque] Throw exception instead of aborting if something goes wrong"" · 69e90801
      Maya Lekova authored
      This reverts commit 251d1623.
      
      Reason for revert: Breaks ASAN debug builders for ClusterFuzz, see https://ci.chromium.org/p/v8/builders/ci/V8%20Clusterfuzz%20Linux64%20ASAN%20-%20debug%20builder/8115
      
      Original change's description:
      > Reland "[torque] Throw exception instead of aborting if something goes wrong"
      > 
      > This is a reland of 3bd49f9b
      > 
      > The issue on the windows bot is apparently a compiler bug in MSVC related to
      > move construction. The fix seems to be to change the order of the fields in
      > "JsonParseResult" (go figure).
      > 
      > Drive-by-change: Fix LS on windows by emitting correct line endings and
      > enabling exceptions for the LS executable as well.
      > 
      > Original change's description:
      > > [torque] Throw exception instead of aborting if something goes wrong
      > >
      > > This CL enables exceptions for the Torque compiler and Torque language
      > > server. Instead of aborting when something goes wrong during
      > > compilation, a TorqueError is thrown, containing the error message
      > > and a source position. The compiler executable still prints the error
      > > and aborts, while the language server will pass this information
      > > along to the client (not included in this CL).
      > >
      > > R=danno@chromium.org
      > >
      > > Bug: v8:8880
      > > Change-Id: Iad83c46fb6a91c1babbc0ae7dbd94fbe4e7f1663
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526003
      > > Reviewed-by: Daniel Clifford <danno@chromium.org>
      > > Commit-Queue: Simon Zünd <szuend@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#60512}
      > 
      > Bug: v8:8880
      > Change-Id: I00e6591bbb4c516dd7540a7e27196853bc637f11
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545995
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Commit-Queue: Simon Zünd <szuend@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#60736}
      
      TBR=danno@chromium.org,tebbi@chromium.org,szuend@chromium.org
      
      Change-Id: I0b22db1652bd46fbb7167f75b710ed5e408ea8ac
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:8880
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1561311Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60747}
      69e90801
    • Simon Zünd's avatar
      Reland "[torque] Throw exception instead of aborting if something goes wrong" · 251d1623
      Simon Zünd authored
      This is a reland of 3bd49f9b
      
      The issue on the windows bot is apparently a compiler bug in MSVC related to
      move construction. The fix seems to be to change the order of the fields in
      "JsonParseResult" (go figure).
      
      Drive-by-change: Fix LS on windows by emitting correct line endings and
      enabling exceptions for the LS executable as well.
      
      Original change's description:
      > [torque] Throw exception instead of aborting if something goes wrong
      >
      > This CL enables exceptions for the Torque compiler and Torque language
      > server. Instead of aborting when something goes wrong during
      > compilation, a TorqueError is thrown, containing the error message
      > and a source position. The compiler executable still prints the error
      > and aborts, while the language server will pass this information
      > along to the client (not included in this CL).
      >
      > R=danno@chromium.org
      >
      > Bug: v8:8880
      > Change-Id: Iad83c46fb6a91c1babbc0ae7dbd94fbe4e7f1663
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526003
      > Reviewed-by: Daniel Clifford <danno@chromium.org>
      > Commit-Queue: Simon Zünd <szuend@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#60512}
      
      Bug: v8:8880
      Change-Id: I00e6591bbb4c516dd7540a7e27196853bc637f11
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545995Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60736}
      251d1623
  26. 28 Mar, 2019 2 commits
    • Simon Zünd's avatar
      Revert "[torque] Throw exception instead of aborting if something goes wrong" · c3b51ac0
      Simon Zünd authored
      This reverts commit 3bd49f9b.
      
      Reason for revert: Build failure on Win Bot
      
      Original change's description:
      > [torque] Throw exception instead of aborting if something goes wrong
      > 
      > This CL enables exceptions for the Torque compiler and Torque language
      > server. Instead of aborting when something goes wrong during
      > compilation, a TorqueError is thrown, containing the error message
      > and a source position. The compiler executable still prints the error
      > and aborts, while the language server will pass this information
      > along to the client (not included in this CL).
      > 
      > R=​danno@chromium.org
      > 
      > Bug: v8:8880
      > Change-Id: Iad83c46fb6a91c1babbc0ae7dbd94fbe4e7f1663
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526003
      > Reviewed-by: Daniel Clifford <danno@chromium.org>
      > Commit-Queue: Simon Zünd <szuend@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#60512}
      
      TBR=danno@chromium.org,mvstanton@chromium.org,szuend@chromium.org
      
      Change-Id: Iac253da404eaf6e534267f59a42ca93667c205e4
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:8880
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543849Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60513}
      c3b51ac0
    • Simon Zünd's avatar
      [torque] Throw exception instead of aborting if something goes wrong · 3bd49f9b
      Simon Zünd authored
      This CL enables exceptions for the Torque compiler and Torque language
      server. Instead of aborting when something goes wrong during
      compilation, a TorqueError is thrown, containing the error message
      and a source position. The compiler executable still prints the error
      and aborts, while the language server will pass this information
      along to the client (not included in this CL).
      
      R=danno@chromium.org
      
      Bug: v8:8880
      Change-Id: Iad83c46fb6a91c1babbc0ae7dbd94fbe4e7f1663
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526003Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60512}
      3bd49f9b
  27. 05 Mar, 2019 1 commit
  28. 27 Feb, 2019 2 commits
  29. 25 Feb, 2019 1 commit
  30. 04 Feb, 2019 1 commit
  31. 28 Jan, 2019 1 commit
    • Daniel Clifford's avatar
      [torque] Compile and error check all inlined macros · 7215f6d6
      Daniel Clifford authored
      Previously, macros that returned true for "ShouldBeInlined" were only
      compiled if they were called, which made it impossible to
      type/semantic check all Torque code (e.g. newly added methods to
      structs). One might argue that all code should be tested (and thus
      through inlining compiled), but for prototyping, the skipped
      compilations were definitely annoying.
      
      As part of this change, added a ShouldGenerateExternalCode method to
      declarables (by default returns !ShouldBeInlined) that makes it
      possible to suppresses C++ code generation for any method. To
      support this at the lowest level, a NullOStream classes is added as
      part of this patch.
      
      Finally, added support for generating C++ for passing structs as label
      parameters to run previously inlined methods through the
      implementation-visitor for non-inlined compilation.
      
      Bug: v8:7793
      Change-Id: I8ce23382e12ddc25f46222c25729c82433040a73
      Reviewed-on: https://chromium-review.googlesource.com/c/1434378
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59134}
      7215f6d6
  32. 22 Jan, 2019 3 commits
    • Daniel Clifford's avatar
      Reland "[torque] Implement safe initialization of classes through hidden structs" · 4c9bc648
      Daniel Clifford authored
      This is a reland of d11a0648
      
      Original change's description:
      > [torque] Implement safe initialization of classes through hidden structs
      > 
      > Initialization of classes now happens atomically at the end of the
      > class constructor only once all of the values for the class' fields
      > have been fully computed. This makes Torque constructors completely
      > GC safe, e.g. hardened against allocations or exceptions in
      > constructors.
      > 
      > As part of this change, make the 'this' parameter for method calls
      > explicit rather than implicit.
      > 
      > Drive by: add validation to check for duplicate field declarations
      > 
      > Bug: v8:7793
      > Change-Id: I8b5e85980d6a103ef9fc3262b76f6514f36ebf88
      > Reviewed-on: https://chromium-review.googlesource.com/c/1411252
      > Commit-Queue: Daniel Clifford <danno@chromium.org>
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#58979}
      
      Bug: v8:7793
      Change-Id: Ia8c23a36a661a73b5dc34437efd514a7c13a1ae8
      Reviewed-on: https://chromium-review.googlesource.com/c/1426840Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59005}
      4c9bc648
    • Daniel Clifford's avatar
      Revert "[torque] Implement safe initialization of classes through hidden structs" · 8c17e114
      Daniel Clifford authored
      This reverts commit d11a0648.
      
      Reason for revert: <INSERT REASONING HERE>
      
      Original change's description:
      > [torque] Implement safe initialization of classes through hidden structs
      > 
      > Initialization of classes now happens atomically at the end of the
      > class constructor only once all of the values for the class' fields
      > have been fully computed. This makes Torque constructors completely
      > GC safe, e.g. hardened against allocations or exceptions in
      > constructors.
      > 
      > As part of this change, make the 'this' parameter for method calls
      > explicit rather than implicit.
      > 
      > Drive by: add validation to check for duplicate field declarations
      > 
      > Bug: v8:7793
      > Change-Id: I8b5e85980d6a103ef9fc3262b76f6514f36ebf88
      > Reviewed-on: https://chromium-review.googlesource.com/c/1411252
      > Commit-Queue: Daniel Clifford <danno@chromium.org>
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#58979}
      
      TBR=danno@chromium.org,tebbi@chromium.org
      
      Change-Id: Id6c46c175f53c5a77db1e6ca242586fba34cd02e
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:7793
      Reviewed-on: https://chromium-review.googlesource.com/c/1426121Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58980}
      8c17e114
    • Daniel Clifford's avatar
      [torque] Implement safe initialization of classes through hidden structs · d11a0648
      Daniel Clifford authored
      Initialization of classes now happens atomically at the end of the
      class constructor only once all of the values for the class' fields
      have been fully computed. This makes Torque constructors completely
      GC safe, e.g. hardened against allocations or exceptions in
      constructors.
      
      As part of this change, make the 'this' parameter for method calls
      explicit rather than implicit.
      
      Drive by: add validation to check for duplicate field declarations
      
      Bug: v8:7793
      Change-Id: I8b5e85980d6a103ef9fc3262b76f6514f36ebf88
      Reviewed-on: https://chromium-review.googlesource.com/c/1411252
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58979}
      d11a0648
  33. 17 Jan, 2019 1 commit