mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-24 14:11:32 +00:00
Merge branch 'master' into feature/update-api
This commit is contained in:
@ -132,6 +132,10 @@ pub struct CompilerConfig {
|
||||
/// When enabled there can be a small amount of runtime performance overhead.
|
||||
pub full_preemption: bool,
|
||||
|
||||
/// Always choose a unique bit representation for NaN.
|
||||
/// Enabling this makes execution deterministic but increases runtime overhead.
|
||||
pub nan_canonicalization: bool,
|
||||
|
||||
pub features: Features,
|
||||
|
||||
// Target info. Presently only supported by LLVM.
|
||||
|
@ -410,7 +410,7 @@ impl MiddlewareChain {
|
||||
};
|
||||
sink.push(ev);
|
||||
for m in &mut self.chain {
|
||||
let prev: SmallVec<[Event; 2]> = sink.buffer.drain().collect();
|
||||
let prev: SmallVec<[Event; 2]> = sink.buffer.drain(..).collect();
|
||||
for ev in prev {
|
||||
m.feed_event(ev, module_info, &mut sink, source_loc)?;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ pub struct ModuleInfo {
|
||||
pub em_symbol_map: Option<HashMap<u32, String>>,
|
||||
|
||||
/// Custom sections.
|
||||
pub custom_sections: HashMap<String, Vec<u8>>,
|
||||
pub custom_sections: HashMap<String, Vec<Vec<u8>>>,
|
||||
|
||||
/// Flag controlling whether or not debug information for use in a debugger
|
||||
/// will be generated.
|
||||
@ -104,7 +104,8 @@ impl ModuleInfo {
|
||||
let bytes = reader.read_bytes(len)?;
|
||||
let data = bytes.to_vec();
|
||||
let name = name.to_string();
|
||||
self.custom_sections.insert(name, data);
|
||||
let entry: &mut Vec<Vec<u8>> = self.custom_sections.entry(name).or_default();
|
||||
entry.push(data);
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
Reference in New Issue
Block a user