• Sigurd Schneider's avatar
    [torque] Introduce @abstract annotation for Torque classes · 4d05884e
    Sigurd Schneider authored
    This annotation indicates that the class itself is not instantiated,
    and does not have its own instance type: The instance types that
    logically belong to the class are the instance types of the derived
    classes.
    
    Currently, we need the indication @dirtyInstantiatedAbstractClass
    for several classes that are used as both, abstract base classes
    and concrete classes. The prime example is JSObject which is the
    base for many other classes, and also serves as the class to allocate
    plain JSObjects. The annotation is purposefully ugly because in the
    future we should refactor code to make it unnecessary.
    
    Another annotation we introduce is @hasSameInstanceTypeAsParent,
    which indicates another design pattern that currently occurs in the
    code-base: Some Torque classes have the same instance types as their
    parent class, but rename some fields, or possibly have a different map.
    In such cases, the parent class is not abstract and the derived classes
    can be seen as refinements of this class (that, for example, narrows the
    type of a field). In the future, Torque should accomodate this pattern
    better, but at moment we are content with just indicating where it is
    used.
    
    Bug: v8:7793
    Change-Id: I1892dcc7325250df75d80308bf3d767d6d43bcc2
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1607761
    Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
    Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#61495}
    4d05884e
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...