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

Make Function Env immutable #1663

Merged
merged 11 commits into from
Nov 20, 2020
Prev Previous commit
Next Next commit
Run rustfmt over code
  • Loading branch information
Mark McCaskey committed Oct 1, 2020
commit facbc78cec6134014c5940a04c30e2166185b550
21 changes: 2 additions & 19 deletions lib/emscripten/src/emscripten_target.rs
Original file line number Diff line number Diff line change
@@ -223,15 +223,7 @@ pub fn invoke_iiiii(ctx: &EmEnv, index: i32, a1: i32, a2: i32, a3: i32, a4: i32)
debug!("emscripten::invoke_iiiii");
invoke!(ctx, dyn_call_iiiii, index, a1, a2, a3, a4)
}
pub fn invoke_iiiiii(
ctx: &EmEnv,
index: i32,
a1: i32,
a2: i32,
a3: i32,
a4: i32,
a5: i32,
) -> i32 {
pub fn invoke_iiiiii(ctx: &EmEnv, index: i32, a1: i32, a2: i32, a3: i32, a4: i32, a5: i32) -> i32 {
debug!("emscripten::invoke_iiiiii");
invoke!(ctx, dyn_call_iiiiii, index, a1, a2, a3, a4, a5)
}
@@ -631,16 +623,7 @@ pub fn invoke_viijiii(
panic!("dyn_call_viijiii is set to None");
}
}
pub fn invoke_viijj(
ctx: &EmEnv,
index: i32,
a1: i32,
a2: i32,
a3: i32,
a4: i32,
a5: i32,
a6: i32,
) {
pub fn invoke_viijj(ctx: &EmEnv, index: i32, a1: i32, a2: i32, a3: i32, a4: i32, a5: i32, a6: i32) {
debug!("emscripten::invoke_viijj");
if let Some(dyn_call_viijj) = &get_emscripten_data(ctx).dyn_call_viijj {
dyn_call_viijj.call(index, a1, a2, a3, a4, a5, a6).unwrap();
7 changes: 1 addition & 6 deletions lib/emscripten/src/pthread.rs
Original file line number Diff line number Diff line change
@@ -5,12 +5,7 @@ pub fn _pthread_attr_destroy(_ctx: &EmEnv, _a: i32) -> i32 {
0
}

pub fn _pthread_attr_getstack(
_ctx: &EmEnv,
_stackaddr: i32,
_stacksize: i32,
_other: i32,
) -> i32 {
pub fn _pthread_attr_getstack(_ctx: &EmEnv, _stackaddr: i32, _stacksize: i32, _other: i32) -> i32 {
trace!(
"emscripten::_pthread_attr_getstack({}, {}, {})",
_stackaddr,
8 changes: 1 addition & 7 deletions lib/emscripten/src/time.rs
Original file line number Diff line number Diff line change
@@ -387,13 +387,7 @@ pub fn _timegm(_ctx: &EmEnv, _time_ptr: c_int) -> i32 {
}

/// emscripten: _strftime
pub fn _strftime(
ctx: &EmEnv,
s_ptr: c_int,
maxsize: u32,
format_ptr: c_int,
tm_ptr: c_int,
) -> i32 {
pub fn _strftime(ctx: &EmEnv, s_ptr: c_int, maxsize: u32, format_ptr: c_int, tm_ptr: c_int) -> i32 {
debug!(
"emscripten::_strftime {} {} {} {}",
s_ptr, maxsize, format_ptr, tm_ptr