src: add new CHECK macros
This adds three more CHECK
macros to util.h
, similar to their definitions within v8. I personally like the added semantics very much, but I can also understand if people think of it as added complexity.
These macros are
-
CHECK_NULL(x)
- asserts thatx
is null -
CHECK_NOT_NULL(x)
- asserts thatx
is not null -
CHECK_IMPLIES(a, b)
- asserts thatb
is true ifa
is true
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines