v8/test/unittests/torque
Nico Hartmann fdc9fade97 [torque] Enum language feature
This CL implements enums in Torque in three steps:

1.) It implements necessary changes to Torque's type system. In
particular, the constraints on constexpr types are relaxed such that
constexpr types can exist without a corresponding non-constexpr
version. Furthermore, constexpr and their non-constexpr counterpart
need not be of the same kind of type. This allows an AbstractType to
have a UnionType as its non-constexpr counterpart.

2.) The enum feature itself is realized as a pure desugaring in the
parser, where all required types, constants and macro specializations
(like FromConstexpr<>) are generated from a simple enum declaration,
such that enum entries are not just constants, but are namespace
scoped and have distinct types so that they can be used within
typeswitch constructs.

3.) Almost all of the existing constants defined in torque
(.tq files) are ported to new enum definitions.

Bug: v8:10053
Change-Id: I72426d3b1434f301fd690847e15603de0dc1021b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1964392
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65503}
2019-12-18 16:24:48 +00:00
..
earley-parser-unittest.cc [torque] generate files per Torque file instead of per namespace 2019-06-05 16:12:27 +00:00
ls-json-unittest.cc [test] Use Fuchsia test runner for unittests 2019-12-05 14:22:01 +00:00
ls-message-unittest.cc [cleanup] Avoid non-const reference arguments in src/torque 2019-07-09 05:14:28 +00:00
ls-server-data-unittest.cc [test] Use Fuchsia test runner for unittests 2019-12-05 14:22:01 +00:00
torque-unittest.cc [torque] Enum language feature 2019-12-18 16:24:48 +00:00
torque-utils-unittest.cc [torque-ls] fix Windows file paths 2019-04-24 08:17:07 +00:00