v8/test
Clemens Hammacher fd306a0658 Allow constexpr RegList construction from Registers
Before, the standard way to create a RegList was either:
RegList list = (1 << 0) | (1 << 1) | ...
or
RegList list = rax.bit() | rdx.bit() | ...

The first way allows to make the RegList constexpr, but needs comments
to document which registers you are referring to, and it has no checks
that all bits you set on the RegList actually belong to valid registers.
The second one uses the symbolic names, hence is much more readable and
makes it harder to construct invalid RegLists. It's not constexpr
though, since the {bit()} method on the register types is not constexpr.

This CL adds a constexpr accessor to get the code and bit of a
constexpr Register, and adds a helper method to create a constexpr
RegList like this:
constexpr RegList list = Register::ListOf<rax, rdx, rdi>();

This new method is used in a number of places to test its
applicability. Other uses of the old pattern remain and can be cleaned
up later.

R=tebbi@chromium.org

Change-Id: Ie7b1d6342dc5f316dcfedd0363b3540ad5e7f413
Reviewed-on: https://chromium-review.googlesource.com/728026
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48887}
2017-10-24 17:30:11 +00:00
..
benchmarks [test] Remove deprecated test-download feature 2017-10-11 15:18:19 +00:00
cctest [ast] Encapsulate AstValue inside Literal AstNode 2017-10-24 14:57:19 +00:00
common [wasm] Support block parameters 2017-10-24 11:44:26 +00:00
debugger Reland "[inspector] breakpoint after last break position should not jump to first line" 2017-10-16 22:04:55 +00:00
fuzzer [fuzzer] Documentation: fix link for build configurations reference. 2017-10-05 16:45:12 +00:00
inspector [inspector] improve this value for arrow function in scopes 2017-10-23 16:40:29 +00:00
intl Intl.DateTimeFormat: throw RangeError for non-finite input 2017-10-19 23:25:52 +00:00
js-perf-test [test] fix Sixspeed runner to really run "Map get string" 2017-10-24 12:57:50 +00:00
memory [snapshot] add tracking for builtin snapshot size. 2017-08-31 07:29:31 +00:00
message [js] Remove CHECK_OBJECT_COERCIBLE for Array methods 2017-10-20 19:29:36 +00:00
mjsunit [parser] Fix rewinding logic for destructuring in arrow params 2017-10-24 14:54:52 +00:00
mkgrokdump
mozilla Reland "[d8] implement setTimeout." 2017-09-05 07:30:46 +00:00
preparser
promises-aplus [test] Remove deprecated test-download feature 2017-10-11 15:18:19 +00:00
test262 [typedarrays] Reduce overheads of TA.p.set 2017-10-19 08:25:52 +00:00
unittests Allow constexpr RegList construction from Registers 2017-10-24 17:30:11 +00:00
wasm-spec-tests [arm] [simulator] Reenable wasm float tests 2017-10-20 11:42:52 +00:00
webkit [js] Remove CHECK_OBJECT_COERCIBLE for Array methods 2017-10-20 19:29:36 +00:00
bot_default.gyp
bot_default.isolate
BUILD.gn
default.gyp
default.isolate
optimize_for_size.gyp
optimize_for_size.isolate
perf.gyp
perf.isolate