Skip to content

Remove some float hostfunctions#7053

Open
oleks-rip wants to merge 2 commits intoXRPLF:ripple/wasmi-host-functionsfrom
oleks-rip:rm_float
Open

Remove some float hostfunctions#7053
oleks-rip wants to merge 2 commits intoXRPLF:ripple/wasmi-host-functionsfrom
oleks-rip:rm_float

Conversation

@oleks-rip
Copy link
Copy Markdown
Collaborator

High Level Overview of Change

flotSet -> floatFromMantissaAndExponent
remove floatAbs
remove floatNegate
remove floatLog

remove floatAbs
remove floatNegate
remove floatLog
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 93.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.0%. Comparing base (ce2586c) to head (829de99).
⚠️ Report is 1 commits behind head on ripple/wasmi-host-functions.

Files with missing lines Patch % Lines
src/libxrpl/tx/wasm/WasmiVM.cpp 90.9% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                      Coverage Diff                      @@
##           ripple/wasmi-host-functions   #7053     +/-   ##
=============================================================
- Coverage                         82.0%   82.0%   -0.0%     
=============================================================
  Files                             1025    1025             
  Lines                            78213   78105    -108     
  Branches                          7662    7656      -6     
=============================================================
- Hits                             64155   64051    -104     
+ Misses                           14058   14054      -4     
Files with missing lines Coverage Δ
include/xrpl/basics/Number.h 98.7% <ø> (ø)
include/xrpl/tx/wasm/HostFunc.h 100.0% <ø> (ø)
include/xrpl/tx/wasm/HostFuncImpl.h 90.3% <ø> (ø)
include/xrpl/tx/wasm/ParamsHelper.h 100.0% <100.0%> (ø)
src/libxrpl/basics/Number.cpp 98.7% <ø> (+0.1%) ⬆️
src/libxrpl/tx/wasm/HostFuncImplFloat.cpp 98.6% <100.0%> (+1.0%) ⬆️
src/libxrpl/tx/wasm/HostFuncWrapper.cpp 98.1% <100.0%> (+0.1%) ⬆️
src/libxrpl/tx/wasm/WasmVM.cpp 97.8% <100.0%> (-0.1%) ⬇️
src/libxrpl/tx/wasm/WasmiVM.cpp 92.0% <90.9%> (-0.6%) ⬇️

... and 3 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pwang200
Copy link
Copy Markdown
Collaborator

pwang200 commented Apr 30, 2026

I think we agreed to use float_from_m_e and float_to_m_e for shorter names. https://github.com/XRPLF/XRPL-Standards/pull/504/changes#r3095427267


struct WasmImportFunc
{
std::string name;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes seem unrelated, what are they for?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to not make a copy of names. So this one and unordered_map<**std::string_view**, WasmUserData> ImportVec; will point to the same data

@oleks-rip
Copy link
Copy Markdown
Collaborator Author

I think we agreed to use float_from_m_e and float_to_m_e for shorter names. https://github.com/XRPLF/XRPL-Standards/pull/504/changes#r3095427267

renamed 829de99

if (importTypes.empty())
return {};
if (imports.empty())
throw std::runtime_error("Missing imports");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto to what?

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.

3 participants