• Tobias Tebbi's avatar
    [torque] enable multiple inheritance from Torque-generated assemblers · 00ffe4a6
    Tobias Tebbi authored
    This enables more seamless interop between Torque and CSA:
    
    Since CodeStubAssembler can now inherit from the Torque base namespace,
    macros defined in the base namespace can be used in CodeStubAssembler
    macros, even without qualification.
    At the same time, macros in the base namespace can refer to
    CodeStubAssembler macros. The only new limitation is that types defined
    in code-stub-assembler.h cannot be referenced in the signature of macros
    defined in the base namespace, since this would produce a cyclic header
    dependency. A work-around for this woud be to put such types (like int31
    in this CL) into a separate header included by both. I (mis-)used
    code-assembler.h for that.
    Another side-effec is that types and enums defined in CodeStubAssembler
    have to be accessed in a qualified way from Torque.
    
    Other assemblers can now inherit from their Torque equivalent, so
    porting macros into the corresponding Torque namespace doesn't require
    any change to the existing use-sites.
    
    To avoid C++ ambiguities, the Torque-generated assemblers must not define
    anything also defined in Code(Stub)Assembler. This includes the type
    aliases for TNode, PLabel, ...
    My workaround is to qualify everything in the generated C++.
    
    As a drive-by fix, I had to change the formatter to avoid a situation
    where it doesn't compute a fixed point: putting a keyword at the
    beginning of a line removes the '\s' in front of it, so I replaced that
    with '\b'.
    
    Bug: v8:7793
    Change-Id: If3b9e9ad967a181b380a10d5673615606abd1041
    Reviewed-on: https://chromium-review.googlesource.com/c/1341955Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
    Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#57645}
    00ffe4a6
Name
Last commit
Last update
benchmarks Loading commit data...
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...
.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...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...