Skip to content

Commit

Permalink
Added more emscripten dyncalls
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Jun 30, 2019
1 parent 299d41c commit a2b723d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/emscripten/src/emscripten_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,10 @@ pub fn invoke_vijj(ctx: &mut Ctx, index: i32, a1: i32, a2: i32, a3: i32, a4: i32
panic!("dyn_call_vijj is set to None");
}
}
pub fn invoke_vidd(ctx: &mut Ctx, index: i32, a1: i32, a2: f64, a3: f64) {
debug!("emscripten::invoke_viid");
invoke_no_return!(ctx, dyn_call_vidd, index, a1, a2, a3);
}
pub fn invoke_viid(ctx: &mut Ctx, index: i32, a1: i32, a2: i32, a3: f64) {
debug!("emscripten::invoke_viid");
invoke_no_return!(ctx, dyn_call_viid, index, a1, a2, a3);
Expand Down
4 changes: 4 additions & 0 deletions lib/emscripten/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ pub struct EmscriptenData<'a> {
pub dyn_call_vijiii: Option<Func<'a, (i32, i32, i32, i32, i32, i32, i32)>>,
pub dyn_call_vijj: Option<Func<'a, (i32, i32, i32, i32, i32, i32)>>,
pub dyn_call_viid: Option<Func<'a, (i32, i32, i32, f64)>>,
pub dyn_call_vidd: Option<Func<'a, (i32, i32, f64, f64)>>,
pub dyn_call_viidii: Option<Func<'a, (i32, i32, i32, f64, i32, i32)>>,
pub dyn_call_viidddddddd:
Option<Func<'a, (i32, i32, i32, f64, f64, f64, f64, f64, f64, f64, f64)>>,
Expand Down Expand Up @@ -220,6 +221,7 @@ impl<'a> EmscriptenData<'a> {
let dyn_call_vijiii = instance.func("dynCall_vijiii").ok();
let dyn_call_vijj = instance.func("dynCall_vijj").ok();
let dyn_call_viid = instance.func("dynCall_viid").ok();
let dyn_call_vidd = instance.func("dynCall_vidd").ok();
let dyn_call_viidii = instance.func("dynCall_viidii").ok();
let dyn_call_viidddddddd = instance.func("dynCall_viidddddddd").ok();

Expand Down Expand Up @@ -287,6 +289,7 @@ impl<'a> EmscriptenData<'a> {
dyn_call_vijiii,
dyn_call_vijj,
dyn_call_viid,
dyn_call_vidd,
dyn_call_viidii,
dyn_call_viidddddddd,
temp_ret_0: 0,
Expand Down Expand Up @@ -934,6 +937,7 @@ pub fn generate_emscripten_env(globals: &mut EmscriptenGlobals) -> ImportObject
"invoke_viji" => func!(crate::emscripten_target::invoke_viji),
"invoke_vijiii" => func!(crate::emscripten_target::invoke_vijiii),
"invoke_vijj" => func!(crate::emscripten_target::invoke_vijj),
"invoke_vidd" => func!(crate::emscripten_target::invoke_vidd),
"invoke_viid" => func!(crate::emscripten_target::invoke_viid),
"invoke_viidii" => func!(crate::emscripten_target::invoke_viidii),
"invoke_viidddddddd" => func!(crate::emscripten_target::invoke_viidddddddd),
Expand Down

0 comments on commit a2b723d

Please sign in to comment.