v8/test
Clemens Hammacher 9e995e12ca [assembler] Make Register et al. real classes
Up to now, each architecture defined all Register types as structs,
with lots of redundancy. An often found comment noted that they cannot
be classes due to initialization order problems. As these problems are
gone with C++11 constexpr constants, I now tried making Registers
classes again.
All register types now inherit from RegisterBase, which provides a
default set of methods and named constructors (like ::from_code,
code(), bit(), is_valid(), ...).
This design allows to guarantee an interesting property: Each register
is either valid, or it's the no_reg register. There are no other
invalid registers. This is guaranteed statically by the constexpr
constructor, and dynamically by ::from_code.

I decided to disallow the default constructor completely, so instead of
"Register reg;" you now need "Register reg = no_reg;". This makes
explicit how the Register is initialized.

I did this change to the x64, ia32, arm, arm64, mips and mips64 ports.
Overall, code got much more compact and more safe. In theory, it should
also increase performance (since the is_valid() check is simpler), but
this is probably not measurable.

R=mstarzinger@chromium.org

Change-Id: I5ccfa4050daf4e146a557970e9d37fd3d2788d4a
Reviewed-on: https://chromium-review.googlesource.com/650927
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47847}
2017-09-06 12:13:09 +00:00
..
benchmarks Use --opt instead of --crankshaft in tests. 2017-04-28 14:20:39 +00:00
cctest [assembler] Make Register et al. real classes 2017-09-06 12:13:09 +00:00
common [asmjs] --validate-asm should not expose the WASM API. 2017-09-04 13:31:32 +00:00
debugger Remove weak-list of optimized JS functions. 2017-09-05 04:30:19 +00:00
fuzzer [test/fuzzer] Fix cpplint complaints 2017-09-04 10:45:21 +00:00
inspector Reland of Inspector: Runtime.callFunctionOn to accept executionContextId 2017-08-31 02:23:06 +00:00
intl Fix common misspellings 2017-08-02 09:35:28 +00:00
js-perf-test [parser|js-perf-test] Disable compilation cache in the parsing microbrenchmarks. 2017-09-04 14:04:02 +00:00
memory [snapshot] add tracking for builtin snapshot size. 2017-08-31 07:29:31 +00:00
message Reland "[d8] implement setTimeout." 2017-09-05 07:30:46 +00:00
mjsunit Revert "[turbofan] Reland^2 "Polymorphic inlining - try merge map check dispatch with function call dispatch."" 2017-09-06 11:41:28 +00:00
mkgrokdump Fix compilation failure due to overload of virtual function 2017-05-24 21:19:48 +00:00
mozilla Reland "[d8] implement setTimeout." 2017-09-05 07:30:46 +00:00
preparser [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
promises-aplus Fix common misspellings 2017-08-02 09:35:28 +00:00
test262 [intl] Implement Intl.PluralRules behind --harmony-plural-rules 2017-08-21 22:23:59 +00:00
unittests [interpreter] printing: output the native context index as string 2017-09-05 12:57:09 +00:00
wasm-spec-tests [wasm] Update the wasm spec tests 2017-09-05 09:44:48 +00:00
webkit Fix common misspellings 2017-08-02 09:35:28 +00:00
bot_default.gyp [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
bot_default.isolate [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
BUILD.gn [wasm] Remove the wasm-asmjs fuzzer 2017-06-21 10:59:35 +00:00
default.gyp [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
default.isolate [wasm] Add wasm spec tests to the v8 test runner 2017-04-27 13:00:13 +00:00
optimize_for_size.gyp [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
optimize_for_size.isolate [debugger] basic test infrastructure for new debugger test api. 2016-10-21 06:38:05 +00:00
perf.gyp [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
perf.isolate Remove SIMD.js from V8. 2017-02-14 06:57:25 +00:00