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

Conversation

@dvander
Copy link
Member

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 added 2 commits Apr 13, 2018
@dvander dvander merged commit e270fc7 into master Apr 14, 2018
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@dvander dvander deleted the floats branch Apr 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.