Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully support basic floating point operations in spshell. #195

Merged
merged 2 commits into from
Apr 14, 2018
Merged

Conversation

dvander
Copy link
Member

@dvander dvander commented Apr 13, 2018

Currently, floating point functions in SourcePawn are optimized by hardcoding the native names SourceMod uses. The hack is not very rigorous. Nevertheless, it exists, and it's why spshell is able to use float ops despite not having the natives.

Let's finally promote at least some of the floating point library to builtin status. We'll probably see more of this in the future (since it's a nice way to prototype new opcodes too), so this patch introduces a "builtins" mechanism. The actual way things get bound is still tied to float native replacement.

Note that when using the new <core/float> include, the native names are different from SourceMod (__float_sub instead of FloatSub, for example). This again is in anticipation of having other special builtins for underlying features. SourceMod won't be upgraded to the new names - there's no particular reason to, and it would cause some minor disruption.

@dvander dvander merged commit e270fc7 into master Apr 14, 2018
@dvander dvander deleted the floats branch April 14, 2018 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant