Make more code work with no_std. (#407)

* Make more code work with no_std.

no_std support is still incomplete, but this patch takes care of the
bulk of the straightforward parts.
This commit is contained in:
Dan Gohman
2019-10-08 16:53:32 -07:00
committed by GitHub
parent c0b37bb713
commit 8e1b44b29c
100 changed files with 380 additions and 270 deletions

View File

@@ -1,3 +1,5 @@
use crate::{HashMap, HashSet};
use alloc::vec::Vec;
use cranelift_codegen::ir::{StackSlots, ValueLabel, ValueLoc};
use cranelift_codegen::isa::RegUnit;
use cranelift_codegen::ValueLabelsRanges;
@@ -6,7 +8,6 @@ use cranelift_wasm::{get_vmctx_value_label, DefinedFuncIndex};
use failure::Error;
use gimli::write;
use gimli::{self, Expression, Operation, Reader, ReaderOffset, Register, X86_64};
use std::collections::{HashMap, HashSet};
use super::address_transform::AddressTransform;
@@ -193,7 +194,7 @@ impl CompiledExpression {
addr_tr: &AddressTransform,
frame_info: Option<&FunctionFrameInfo>,
endian: gimli::RunTimeEndian,
) -> std::vec::Vec<(write::Address, u64, write::Expression)> {
) -> alloc::vec::Vec<(write::Address, u64, write::Expression)> {
if scope.len() == 0 {
return vec![];
}