1. 28 Oct, 2020 1 commit
    • Tobias Tebbi's avatar
      [torque] generate C++ class definitions per Torque file · 03f60296
      Tobias Tebbi authored
      This CL splits the class definitions per .tq file, to realize the
      following relationship:
      A class defined in src/objects/foo.tq has a C++ definition in
      src/objects/foo.h. Torque then generates:
      
      - torque-generated/src/objects/foo-tq.inc
        An include file (no proper header) to be included in src/objects/foo.h
        containing the Torque-generated C++ class definition.
      
      - torque-generated/src/objects/foo-tq-inl.inc
        An include file (no proper header) to be included in
        src/objects/foo-inl.h containing inline function definitions.
      
      - torque-generated/src/objects/foo-tq.cc
        A source file including src/objects/foo-inl.h that contains non-inline
        function definitions.
      
      Advantages of this approach:
      - Avoid big monolithic headers and preserve the work that went into
        splitting objects.h
      - Moving a definition to Torque keeps everything in the same place
        from a C++ viewpoint, including a fully Torque-generated C++ class
        definition.
      - The Torque-generated include files do not need to be independent
        headers, necessary includes or forward declarations can just be added
        to the headers that include them.
      
      Drive-by changes:
      A bunch of definitions and files had to be moved or created to realize
      a consistent 1:1 relationship between .tq files and C++ headers.
      
      
      Bug: v8:7793
      TBR: hpayer@chromium.org
      Change-Id: I239a89a16d0bc856a8669d7c92aeafe24a7c7663
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2470571
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarSeth Brenith <seth.brenith@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#70853}
      03f60296
  2. 25 May, 2020 1 commit
  3. 18 Mar, 2020 1 commit
  4. 16 Oct, 2019 1 commit
  5. 29 Aug, 2019 1 commit
    • Seth Brenith's avatar
      [cleanup][torque] Use @generateCppClass in some simple cases, part 2 · a5811358
      Seth Brenith authored
      This patch is mostly mechanical. A few changes in
      implementation-visitor.cc might be worth mentioning:
      - Don't generate both field offset macros and class definitions for the
        same class. This was mostly just to keep me from forgetting to remove
        the DEFINE_FIELD_OFFSET_CONSTANTS part when converting classes, but
        also helpfully flagged that FixedArrayBase wasn't using the generated
        class that it requested.
      - Generate forward declarations for all tq-defined classes in
        internal-class-definitions-tq.h. This is helpful for making things
        compile when classes have fields of other class types.
      - When generating accessors for union types, use the nearest class type
        that contains the entire union rather than plain Object. This is
        important for compile-time type safety. It also required a few minor
        fixes elsewhere (isolate.cc, modules.cc, scope-info.cc,
        source-text-module.cc, and a correction of the field types in
        CallHandlerInfo to match how they're set in api.cc).
      
      Change-Id: I3b9280e30779ce57fb9f3629eecfec898e26d708
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1774976Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#63458}
      a5811358
  6. 09 Jul, 2019 1 commit
  7. 23 May, 2019 2 commits
  8. 22 May, 2019 1 commit
  9. 01 Mar, 2019 1 commit
  10. 09 Jan, 2019 1 commit
  11. 26 Dec, 2018 1 commit
  12. 18 Dec, 2018 1 commit
  13. 14 Dec, 2018 1 commit
  14. 08 Dec, 2018 1 commit
  15. 25 Nov, 2018 1 commit
  16. 24 Nov, 2018 1 commit
  17. 23 Nov, 2018 1 commit
  18. 13 Nov, 2018 1 commit
  19. 28 Sep, 2018 1 commit
    • Daniel Clifford's avatar
      Clean up common argument objects that share length property · 64e8a948
      Daniel Clifford authored
      This CL adds a bit more rigor to the handling of length properties
      in JSObject-derived classes that explicitly contain that property
      inline.
      
      This involves:
      - Introducing a new superclass of JSArgumentsObject called
        JSArgumentsObjectWithLength that is shared with other object
        instances that also have a fixed length property.
      - Adding JSArgumentsObjectWithLength to the type hierarchy in Torque,
        including adding fast-cases for leading the length property for all
        classes deriving from JSObjectWithLength.
      - Adding more rigor to Context and NativeContext handling in base.tq.
        This is useful for the map checks required to verify objects are
        argument object types derived from JSArgumentsObjectWithLength.
      
      Change-Id: I2f0a20601ffcb90b3767cbaeb766e9998d3462ec
      Reviewed-on: https://chromium-review.googlesource.com/1248661
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56289}
      64e8a948
  20. 26 Jul, 2018 1 commit
  21. 24 May, 2018 1 commit
  22. 26 Oct, 2017 1 commit
  23. 28 Aug, 2017 1 commit
    • Michael Starzinger's avatar
      [objects] Remove dangerous arguments accessors. · a33b0d25
      Michael Starzinger authored
      This removes dangerous accessors method from the arguments object
      accessor classes. The shape of an arguments object might transition,
      turning the fields into dictionary mode, making the accessors invalid.
      
      It also fixes a bug in the reported number of embedder fields on the
      arguments object.
      
      R=ishell@chromium.org
      TEST=cctest/test-api/InternalFieldsOfRegularObjects
      
      Change-Id: Ib7a73608c6236fe8864434e0cfdcb754ae012a75
      Reviewed-on: https://chromium-review.googlesource.com/636368
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47643}
      a33b0d25
  24. 13 Jun, 2017 1 commit