Dont check arginfo types for internal functions #4232
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch disables checking of arginfo types on internal function calls. Types will only be checked by zpp now. This will allow us to add arginfo information to internal functions without introducing a significant performance hit by performing duplicate type checks.
In debug builds, we make sure that either the function threw or the arginfo verification succeeds. This will help to detect cases where types specified in arginfo are out of sync with what is specified in zpp. This sanity check currently allows null for scalar typed arguments -- we can forbid them if/when we do so in zpp as well (relevant discussion: https://externals.io/message/105845).
This patch also fixes two existing places with an arginfo/zpp mismatch.
Test differences are due to different error messages for arginfo and zpp. We might want to unify these as well, but let's do that separately.