Skip to content

Fully support basic floating point operations in spshell.#195

Merged
dvander merged 2 commits intomasterfrom
floats
Apr 14, 2018
Merged

Fully support basic floating point operations in spshell.#195
dvander merged 2 commits intomasterfrom
floats

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