• 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
Name
Last commit
Last update
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.flake8 Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
COMMON_OWNERS Loading commit data...
DEPS Loading commit data...
DIR_METADATA Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...