Typecheck `Error` and `Exception`
commite1fe6f24bff52fd32cfb9cb8853389b0e141b5e0
authorHunter Goldstein <hgoldstein@fb.com>
Wed, 1 Jun 2022 15:55:01 +0000 (1 08:55 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 1 Jun 2022 15:55:01 +0000 (1 08:55 -0700)
treea0fbb2828359644273f71c359b68582471b8d922
parent29fb7159169c125b5c6e60e07f0016ef95c5f925
Typecheck `Error` and `Exception`

Summary:
Building off the previous diff, we can now typecheck the base `Exception` and `Error` types.
* In the JIT we used to assert that `Exception::$traceOpts` was typed as `mixed`, now it's an `int` (which we can trust). I haven't changed the JIT to take advantage of this, only acknowledge it.
* While I *should* change some of the constructor params, I figured it's better to leave them be and `UNSAFE_CAST` them on assignment.

Reviewed By: aorenste

Differential Revision: D36599977

fbshipit-source-id: 26b96bad269befbc6f5852d792bb6972c88664bc
hphp/runtime/ext/std/ext_std_variable.php
hphp/runtime/vm/jit/irgen-create.cpp
hphp/system/php/lang/Error.php
hphp/system/php/lang/Exception.php