Improved emscripten imported function arguments

This commit is contained in:
Syrus
2019-01-24 15:44:08 -08:00
parent 6d8465721f
commit 842105f7d9
6 changed files with 22 additions and 19 deletions

View File

@ -1,22 +1,24 @@
use wasmer_runtime_core::vm::Ctx;
/// emscripten: _llvm_log10_f64
pub extern "C" fn _llvm_log10_f64(value: f64) -> f64 {
pub extern "C" fn _llvm_log10_f64(value: f64, _ctx: &mut Ctx) -> f64 {
debug!("emscripten::_llvm_log10_f64");
value.log10()
}
/// emscripten: _llvm_log2_f64
pub extern "C" fn _llvm_log2_f64(value: f64) -> f64 {
pub extern "C" fn _llvm_log2_f64(value: f64, _ctx: &mut Ctx) -> f64 {
debug!("emscripten::_llvm_log2_f64");
value.log2()
}
// emscripten: f64-rem
pub extern "C" fn f64_rem(x: f64, y: f64) -> f64 {
pub extern "C" fn f64_rem(x: f64, y: f64, _ctx: &mut Ctx) -> f64 {
debug!("emscripten::f64-rem");
x % y
}
// emscripten: global.Math pow
pub extern "C" fn pow(x: f64, y: f64) -> f64 {
pub extern "C" fn pow(x: f64, y: f64, _ctx: &mut Ctx) -> f64 {
x.powf(y)
}