Calls to PHP builtins from Hack files shouldnt have PHP7 strict parameter type enforcment
Summary:
This has nothing to do with `<?hh // strict`, just the runtime behavior.
There are effectively 3 modes:
- standard PHP behavior: coerce and warn
- PHP7 `declare(strict_types=1)` behavior: raise TypeErrors
- Hack files with PHP7 mode enabled:
- use strict_types=1 behavior when calling user functions
- use strict_types=0 behavior when calling builtins: this is because the HHIs aren't restrictive enough, and enforcing it is a really bad experience. This will probably be resolved by releasing the `PHP\` wrappers.
This was correctly done when using the interpreter without using HackC.
The JIT currently considered the second and third cases to be the same.
This diff:
- corrects the JIT
- fixes the assembler (for when using HackC)
- does a tiny no-op change to a helper which makes stepping through in gdb more intuitive
Reviewed By: markw65
Differential Revision:
D7201617
fbshipit-source-id:
75be7b400bfaa7b221fab07aa0a5f5bb92c16abe