Format with stable rustfmt-preview, then with rustfmt-0.9 again.
This commit is contained in:
@@ -22,16 +22,16 @@
|
||||
//!
|
||||
//! That is why `translate_function_body` takes an object having the `WasmRuntime` trait as
|
||||
//! argument.
|
||||
use cretonne::ir::{self, InstBuilder, MemFlags, JumpTableData};
|
||||
use cretonne::ir::{self, InstBuilder, JumpTableData, MemFlags};
|
||||
use cretonne::ir::types::*;
|
||||
use cretonne::ir::condcodes::{IntCC, FloatCC};
|
||||
use cretonne::ir::condcodes::{FloatCC, IntCC};
|
||||
use cretonne::packed_option::ReservedValue;
|
||||
use cton_frontend::{FunctionBuilder, Variable};
|
||||
use wasmparser::{Operator, MemoryImmediate};
|
||||
use translation_utils::{f32_translation, f64_translation, type_to_type, num_return_values};
|
||||
use translation_utils::{TableIndex, SignatureIndex, FunctionIndex, MemoryIndex};
|
||||
use state::{TranslationState, ControlStackFrame};
|
||||
use std::collections::{HashMap, hash_map};
|
||||
use wasmparser::{MemoryImmediate, Operator};
|
||||
use translation_utils::{num_return_values, type_to_type, f32_translation, f64_translation};
|
||||
use translation_utils::{FunctionIndex, MemoryIndex, SignatureIndex, TableIndex};
|
||||
use state::{ControlStackFrame, TranslationState};
|
||||
use std::collections::{hash_map, HashMap};
|
||||
use environ::{FuncEnvironment, GlobalValue};
|
||||
use std::{i32, u32};
|
||||
use std::vec::Vec;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//! "Dummy" environment for testing wasm translation.
|
||||
|
||||
use environ::{FuncEnvironment, GlobalValue, ModuleEnvironment};
|
||||
use translation_utils::{Global, Memory, Table, GlobalIndex, TableIndex, SignatureIndex,
|
||||
FunctionIndex, MemoryIndex};
|
||||
use translation_utils::{FunctionIndex, Global, GlobalIndex, Memory, MemoryIndex, SignatureIndex,
|
||||
Table, TableIndex};
|
||||
use func_translator::FuncTranslator;
|
||||
use cretonne::ir::{self, InstBuilder};
|
||||
use cretonne::ir::types::*;
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
mod spec;
|
||||
mod dummy;
|
||||
|
||||
pub use environ::spec::{ModuleEnvironment, FuncEnvironment, GlobalValue};
|
||||
pub use environ::spec::{FuncEnvironment, GlobalValue, ModuleEnvironment};
|
||||
pub use environ::dummy::DummyEnvironment;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
use cretonne::ir::{self, InstBuilder};
|
||||
use cretonne::cursor::FuncCursor;
|
||||
use cretonne::settings::Flags;
|
||||
use translation_utils::{SignatureIndex, FunctionIndex, TableIndex, GlobalIndex, MemoryIndex,
|
||||
Global, Table, Memory};
|
||||
use translation_utils::{FunctionIndex, Global, GlobalIndex, Memory, MemoryIndex, SignatureIndex,
|
||||
Table, TableIndex};
|
||||
use std::vec::Vec;
|
||||
use std::string::String;
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
|
||||
use code_translator::translate_operator;
|
||||
use cretonne::entity::EntityRef;
|
||||
use cretonne::ir::{self, InstBuilder, Ebb};
|
||||
use cretonne::result::{CtonResult, CtonError};
|
||||
use cretonne::ir::{self, Ebb, InstBuilder};
|
||||
use cretonne::result::{CtonError, CtonResult};
|
||||
use cretonne::timing;
|
||||
use cton_frontend::{FunctionBuilderContext, FunctionBuilder, Variable};
|
||||
use cton_frontend::{FunctionBuilder, FunctionBuilderContext, Variable};
|
||||
use environ::FuncEnvironment;
|
||||
use state::TranslationState;
|
||||
use wasmparser::{self, BinaryReader};
|
||||
|
||||
@@ -9,18 +9,14 @@
|
||||
//!
|
||||
//! The main function of this module is [`translate_module`](fn.translate_module.html).
|
||||
|
||||
#![deny(missing_docs,
|
||||
trivial_numeric_casts,
|
||||
unused_extern_crates)]
|
||||
#![cfg_attr(feature="clippy",
|
||||
plugin(clippy(conf_file="../../clippy.toml")))]
|
||||
#![cfg_attr(feature="cargo-clippy",
|
||||
allow(new_without_default, redundant_field_names))]
|
||||
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
|
||||
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(new_without_default, redundant_field_names))]
|
||||
|
||||
extern crate wasmparser;
|
||||
extern crate cton_frontend;
|
||||
#[macro_use(dbg)]
|
||||
extern crate cretonne;
|
||||
extern crate cton_frontend;
|
||||
extern crate wasmparser;
|
||||
|
||||
mod code_translator;
|
||||
mod func_translator;
|
||||
@@ -32,6 +28,6 @@ mod translation_utils;
|
||||
|
||||
pub use func_translator::FuncTranslator;
|
||||
pub use module_translator::translate_module;
|
||||
pub use environ::{FuncEnvironment, ModuleEnvironment, DummyEnvironment, GlobalValue};
|
||||
pub use translation_utils::{FunctionIndex, GlobalIndex, TableIndex, MemoryIndex, SignatureIndex,
|
||||
Global, GlobalInit, Table, Memory};
|
||||
pub use environ::{DummyEnvironment, FuncEnvironment, GlobalValue, ModuleEnvironment};
|
||||
pub use translation_utils::{FunctionIndex, Global, GlobalIndex, GlobalInit, Memory, MemoryIndex,
|
||||
SignatureIndex, Table, TableIndex};
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//! Translation skeleton that traverses the whole WebAssembly module and call helper functions
|
||||
//! to deal with each part of it.
|
||||
use cretonne::timing;
|
||||
use wasmparser::{ParserState, SectionCode, ParserInput, Parser, WasmDecoder, BinaryReaderError};
|
||||
use sections_translator::{SectionParsingError, parse_function_signatures, parse_import_section,
|
||||
parse_function_section, parse_export_section, parse_start_section,
|
||||
parse_memory_section, parse_global_section, parse_table_section,
|
||||
parse_elements_section, parse_data_section};
|
||||
use wasmparser::{BinaryReaderError, Parser, ParserInput, ParserState, SectionCode, WasmDecoder};
|
||||
use sections_translator::{parse_data_section, parse_elements_section, parse_export_section,
|
||||
parse_function_section, parse_function_signatures, parse_global_section,
|
||||
parse_import_section, parse_memory_section, parse_start_section,
|
||||
parse_table_section, SectionParsingError};
|
||||
use environ::ModuleEnvironment;
|
||||
|
||||
use std::string::String;
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
//! The special case of the initialize expressions for table elements offsets or global variables
|
||||
//! is handled, according to the semantics of WebAssembly, to only specific expressions that are
|
||||
//! interpreted on the fly.
|
||||
use translation_utils::{type_to_type, TableIndex, FunctionIndex, GlobalIndex, SignatureIndex,
|
||||
MemoryIndex, Global, GlobalInit, Table, TableElementType, Memory};
|
||||
use cretonne::ir::{Signature, AbiParam, CallConv};
|
||||
use translation_utils::{type_to_type, FunctionIndex, Global, GlobalIndex, GlobalInit, Memory,
|
||||
MemoryIndex, SignatureIndex, Table, TableElementType, TableIndex};
|
||||
use cretonne::ir::{AbiParam, CallConv, Signature};
|
||||
use cretonne;
|
||||
use wasmparser::{Parser, ParserState, FuncType, ImportSectionEntryType, ExternalKind, WasmDecoder,
|
||||
MemoryType, Operator};
|
||||
use wasmparser::{ExternalKind, FuncType, ImportSectionEntryType, MemoryType, Operator, Parser,
|
||||
ParserState, WasmDecoder};
|
||||
use wasmparser;
|
||||
use std::str::from_utf8;
|
||||
use environ::ModuleEnvironment;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
use cretonne::ir::{self, Ebb, Inst, Value};
|
||||
use environ::{FuncEnvironment, GlobalValue};
|
||||
use std::collections::HashMap;
|
||||
use translation_utils::{GlobalIndex, MemoryIndex, SignatureIndex, FunctionIndex};
|
||||
use translation_utils::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex};
|
||||
use std::vec::Vec;
|
||||
|
||||
/// A control stack frame can be an `if`, a `block` or a `loop`, each one having the following
|
||||
|
||||
Reference in New Issue
Block a user