mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-04-25 15:22:17 +00:00
Add comment to Emscripten module.
This commit is contained in:
parent
0ea8a48a64
commit
f532bff101
@ -59,7 +59,7 @@ fn try_deserialize(base_dir: &str, module_path: &str) -> Result<elements::Module
|
|||||||
|
|
||||||
fn try_load(base_dir: &str, module_path: &str) -> Result<(), InterpreterError> {
|
fn try_load(base_dir: &str, module_path: &str) -> Result<(), InterpreterError> {
|
||||||
let module = try_deserialize(base_dir, module_path).map_err(|e| parity_wasm::interpreter::Error::Program(format!("{:?}", e)))?;
|
let module = try_deserialize(base_dir, module_path).map_err(|e| parity_wasm::interpreter::Error::Program(format!("{:?}", e)))?;
|
||||||
let program = ProgramInstance::new().expect("Failed creating program");
|
let program = ProgramInstance::new();
|
||||||
program.add_module("try_load", module, None).map(|_| ())
|
program.add_module("try_load", module, None).map(|_| ())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ pub fn spec(name: &str) {
|
|||||||
.expect(&format!("Failed to load json file {}", &fixture.json));
|
.expect(&format!("Failed to load json file {}", &fixture.json));
|
||||||
let spec: test::Spec = serde_json::from_reader(&mut f).expect("Failed to deserialize JSON file");
|
let spec: test::Spec = serde_json::from_reader(&mut f).expect("Failed to deserialize JSON file");
|
||||||
|
|
||||||
let program = ProgramInstance::new().expect("Failed creating program");
|
let program = ProgramInstance::new();
|
||||||
let mut last_module = None;
|
let mut last_module = None;
|
||||||
for command in &spec.commands {
|
for command in &spec.commands {
|
||||||
println!("command {:?}", command);
|
println!("command {:?}", command);
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
//! This module provides some of the simplest exports
|
||||||
|
//! from the Emscripten runtime, such as `STACKTOP` or `abort`.
|
||||||
|
|
||||||
use std::sync::{Arc, Weak};
|
use std::sync::{Arc, Weak};
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use builder::module;
|
use builder::module;
|
||||||
@ -27,7 +30,7 @@ const DEFAULT_TABLE_BASE: u32 = 0;
|
|||||||
/// Default tableBase variable value.
|
/// Default tableBase variable value.
|
||||||
const DEFAULT_MEMORY_BASE: u32 = 0;
|
const DEFAULT_MEMORY_BASE: u32 = 0;
|
||||||
|
|
||||||
/// Defaul table size.
|
/// Default table size.
|
||||||
const DEFAULT_TABLE_SIZE: u32 = 64;
|
const DEFAULT_TABLE_SIZE: u32 = 64;
|
||||||
|
|
||||||
/// Index of default memory.
|
/// Index of default memory.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user