Add use declarations for std features.
Merge the `use` parts of the `no_std` branch. This reduces the diffs between master and the `no_std` branch, making it easier to maintain. Most of these changes are derived from patches by @lachlansneff in https://github.com/Cretonne/cretonne/tree/no_std.
This commit is contained in:
@@ -34,6 +34,7 @@ use state::{TranslationState, ControlStackFrame};
|
||||
use std::collections::{HashMap, hash_map};
|
||||
use environ::{FuncEnvironment, GlobalValue};
|
||||
use std::{i32, u32};
|
||||
use std::vec::Vec;
|
||||
|
||||
/// Translates wasm operators into Cretonne IL instructions. Returns `true` if it inserted
|
||||
/// a return.
|
||||
|
||||
@@ -10,6 +10,8 @@ use cretonne::cursor::FuncCursor;
|
||||
use cretonne::settings;
|
||||
use wasmparser;
|
||||
use std::error::Error;
|
||||
use std::vec::Vec;
|
||||
use std::string::String;
|
||||
|
||||
/// Compute a `ir::ExternalName` for a given wasm function index.
|
||||
fn get_func_name(func_index: FunctionIndex) -> ir::ExternalName {
|
||||
|
||||
@@ -5,6 +5,8 @@ use cretonne::cursor::FuncCursor;
|
||||
use cretonne::settings::Flags;
|
||||
use translation_utils::{SignatureIndex, FunctionIndex, TableIndex, GlobalIndex, MemoryIndex,
|
||||
Global, Table, Memory};
|
||||
use std::vec::Vec;
|
||||
use std::string::String;
|
||||
|
||||
/// The value of a WebAssembly global variable.
|
||||
#[derive(Clone, Copy)]
|
||||
|
||||
@@ -8,6 +8,8 @@ use sections_translator::{SectionParsingError, parse_function_signatures, parse_
|
||||
parse_elements_section, parse_data_section};
|
||||
use environ::ModuleEnvironment;
|
||||
|
||||
use std::string::String;
|
||||
|
||||
/// Translate a sequence of bytes forming a valid Wasm binary into a list of valid Cretonne IL
|
||||
/// [`Function`](../cretonne/ir/function/struct.Function.html).
|
||||
/// Returns the functions and also the mappings for imported functions and signature between the
|
||||
|
||||
@@ -16,6 +16,8 @@ use wasmparser::{Parser, ParserState, FuncType, ImportSectionEntryType, External
|
||||
use wasmparser;
|
||||
use std::str::from_utf8;
|
||||
use environ::ModuleEnvironment;
|
||||
use std::vec::Vec;
|
||||
use std::string::String;
|
||||
|
||||
pub enum SectionParsingError {
|
||||
WrongSectionContent(String),
|
||||
|
||||
@@ -7,6 +7,7 @@ use cretonne::ir::{self, Ebb, Inst, Value};
|
||||
use environ::{FuncEnvironment, GlobalValue};
|
||||
use std::collections::HashMap;
|
||||
use translation_utils::{GlobalIndex, MemoryIndex, SignatureIndex, FunctionIndex};
|
||||
use std::vec::Vec;
|
||||
|
||||
/// A control stack frame can be an `if`, a `block` or a `loop`, each one having the following
|
||||
/// fields:
|
||||
|
||||
Reference in New Issue
Block a user