• Seth Brenith's avatar
    [torque] Generate instance types · 8c7ae314
    Seth Brenith authored
    Design doc:
    https://docs.google.com/document/d/1ZU6rCvF2YHBGMLujWqqaxlPsjFfjKDE9C3-EugfdlAE/edit
    
    Changes from the design doc:
    - Changed to use 'class' declarations rather than 'type' declarations
      for things that need instance types but whose layout is not known to
      Torque. These declarations end with a semicolon rather than having a
      full set of methods and fields surrounded by {}. If the class's name
      should not be treated as a class name in generated output (because
      it's actually a template, or doesn't exist at all), we use the
      standard 'generates' clause to declare the most appropriate C++ class.
    - Removed @instanceTypeName.
    - @highestInstanceType became @highestInstanceTypeWithinParentClassRange
      to indicate a semantic change: it no longer denotes the highest
      instance type globally, but only within the range of values for its
      immediate parent class. This lets us use it for Oddball, which is
      expected to be the highest primitive type.
    - Added new abstract classes JSCustomElementsObject and JSSpecialObject
      to help with some range checks.
    - Added @lowestInstanceTypeWithinParentClassRange so we can move the new
      classes JSCustomElementsObject and JSSpecialObject to the beginning of
      the JSObject range. This seems like the least-brittle way to establish
      ranges that also include JSProxy (and these ranges are verified with
      static assertions in instance-type.h).
    - Renamed @instanceTypeValue to @apiExposedInstanceTypeValue.
    - Renamed @instanceTypeFlags to @reserveBitsInInstanceType.
    
    This change introduces the new annotations and adds the ability for
    Torque to assign instance types that satisfy those annotations. Torque
    now emits two new macros:
    - TORQUE_ASSIGNED_INSTANCE_TYPES, which is used to define the
      InstanceType enumeration
    - TORQUE_ASSIGNED_INSTANCE_TYPE_LIST, which replaces the non-String
      parts of INSTANCE_TYPE_LIST
    
    The design document mentions a couple of other macro lists that could
    easily be replaced, but I'd like to defer those to a subsequent checkin
    because this one is already pretty large.
    
    Bug: v8:7793
    Change-Id: Ie71d93a9d5b610e62be0ffa3bb36180c3357a6e8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1757094
    Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
    Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#64258}
    8c7ae314
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...
.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...
ChangeLog Loading commit data...
DEPS 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...
LICENSE.valgrind 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...