Skip to content

Commit d84a746

Browse files
committed
Formatted the code
1 parent ec7e061 commit d84a746

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

crates/spidermonkey-embedding-splicer/src/bin/splicer.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ fn serialize_imports(imports: &[(String, String, u32)]) -> String {
208208
/// Manually serialize CoreFn to JSON
209209
fn serialize_core_fn(core_fn: &CoreFn) -> String {
210210
let mut result = String::from("{");
211-
211+
212212
// params
213213
result.push_str("\"params\": [");
214214
for (i, param) in core_fn.params.iter().enumerate() {
@@ -218,7 +218,7 @@ fn serialize_core_fn(core_fn: &CoreFn) -> String {
218218
result.push_str(&serialize_core_ty(param));
219219
}
220220
result.push_str("], ");
221-
221+
222222
// ret
223223
result.push_str("\"ret\": ");
224224
if let Some(ref ret) = core_fn.ret {
@@ -227,16 +227,16 @@ fn serialize_core_fn(core_fn: &CoreFn) -> String {
227227
result.push_str("null");
228228
}
229229
result.push_str(", ");
230-
230+
231231
// retptr
232232
result.push_str(&format!("\"retptr\": {}, ", core_fn.retptr));
233-
233+
234234
// retsize
235235
result.push_str(&format!("\"retsize\": {}, ", core_fn.retsize));
236-
236+
237237
// paramptr
238238
result.push_str(&format!("\"paramptr\": {}", core_fn.paramptr));
239-
239+
240240
result.push('}');
241241
result
242242
}

crates/spidermonkey-embedding-splicer/src/splice.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ fn synthesize_import_functions(
764764
let ops_ro = builder.body.instructions.get_ops();
765765
for (idx, op) in ops_ro.iter().enumerate() {
766766
if let Operator::I32Const { value } = op {
767+
// we specifically need the const "around" 3393
768+
// which is the coreabi_sample_i32 table offset
767769
if *value < 1000 || *value > 5000 {
768770
continue;
769771
}

0 commit comments

Comments
 (0)