• 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
..
ls Loading commit data...
OWNERS Loading commit data...
ast.h Loading commit data...
cc-generator.cc Loading commit data...
cc-generator.h Loading commit data...
cfg.cc Loading commit data...
cfg.h Loading commit data...
class-debug-reader-generator.cc Loading commit data...
constants.h Loading commit data...
contextual.h Loading commit data...
csa-generator.cc Loading commit data...
csa-generator.h Loading commit data...
declarable.cc Loading commit data...
declarable.h Loading commit data...
declaration-visitor.cc Loading commit data...
declaration-visitor.h Loading commit data...
declarations.cc Loading commit data...
declarations.h Loading commit data...
earley-parser.cc Loading commit data...
earley-parser.h Loading commit data...
global-context.cc Loading commit data...
global-context.h Loading commit data...
implementation-visitor.cc Loading commit data...
implementation-visitor.h Loading commit data...
instance-type-generator.cc Loading commit data...
instructions.cc Loading commit data...
instructions.h Loading commit data...
parameter-difference.h Loading commit data...
runtime-macro-shims.h Loading commit data...
runtime-support.h Loading commit data...
server-data.cc Loading commit data...
server-data.h Loading commit data...
source-positions.cc Loading commit data...
source-positions.h Loading commit data...
torque-code-generator.cc Loading commit data...
torque-code-generator.h Loading commit data...
torque-compiler.cc Loading commit data...
torque-compiler.h Loading commit data...
torque-parser.cc Loading commit data...
torque-parser.h Loading commit data...
torque.cc Loading commit data...
type-inference.cc Loading commit data...
type-inference.h Loading commit data...
type-oracle.cc Loading commit data...
type-oracle.h Loading commit data...
type-visitor.cc Loading commit data...
type-visitor.h Loading commit data...
types.cc Loading commit data...
types.h Loading commit data...
utils.cc Loading commit data...
utils.h Loading commit data...