parent
86c594426f
commit
27a5f4f472
3 changed files with 29 additions and 10 deletions
20
Cargo.lock
generated
20
Cargo.lock
generated
|
@ -40,7 +40,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cranelift-bforest"
|
name = "cranelift-bforest"
|
||||||
version = "0.70.0"
|
version = "0.70.0"
|
||||||
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2"
|
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cranelift-entity",
|
"cranelift-entity",
|
||||||
]
|
]
|
||||||
|
@ -48,7 +48,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cranelift-codegen"
|
name = "cranelift-codegen"
|
||||||
version = "0.70.0"
|
version = "0.70.0"
|
||||||
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2"
|
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"cranelift-bforest",
|
"cranelift-bforest",
|
||||||
|
@ -66,7 +66,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cranelift-codegen-meta"
|
name = "cranelift-codegen-meta"
|
||||||
version = "0.70.0"
|
version = "0.70.0"
|
||||||
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2"
|
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cranelift-codegen-shared",
|
"cranelift-codegen-shared",
|
||||||
"cranelift-entity",
|
"cranelift-entity",
|
||||||
|
@ -75,17 +75,17 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cranelift-codegen-shared"
|
name = "cranelift-codegen-shared"
|
||||||
version = "0.70.0"
|
version = "0.70.0"
|
||||||
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2"
|
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cranelift-entity"
|
name = "cranelift-entity"
|
||||||
version = "0.70.0"
|
version = "0.70.0"
|
||||||
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2"
|
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cranelift-frontend"
|
name = "cranelift-frontend"
|
||||||
version = "0.70.0"
|
version = "0.70.0"
|
||||||
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2"
|
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cranelift-codegen",
|
"cranelift-codegen",
|
||||||
"log",
|
"log",
|
||||||
|
@ -96,7 +96,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cranelift-jit"
|
name = "cranelift-jit"
|
||||||
version = "0.70.0"
|
version = "0.70.0"
|
||||||
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2"
|
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"cranelift-codegen",
|
"cranelift-codegen",
|
||||||
|
@ -114,7 +114,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cranelift-module"
|
name = "cranelift-module"
|
||||||
version = "0.70.0"
|
version = "0.70.0"
|
||||||
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2"
|
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"cranelift-codegen",
|
"cranelift-codegen",
|
||||||
|
@ -126,7 +126,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cranelift-native"
|
name = "cranelift-native"
|
||||||
version = "0.70.0"
|
version = "0.70.0"
|
||||||
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2"
|
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cranelift-codegen",
|
"cranelift-codegen",
|
||||||
"target-lexicon",
|
"target-lexicon",
|
||||||
|
@ -135,7 +135,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cranelift-object"
|
name = "cranelift-object"
|
||||||
version = "0.70.0"
|
version = "0.70.0"
|
||||||
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#ee1ddfb6f95750d97598b77f3ebf129a15a241b2"
|
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"cranelift-codegen",
|
"cranelift-codegen",
|
||||||
|
|
|
@ -365,6 +365,22 @@ impl <T: PartialEq> PartialEq for Option<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[lang = "shl"]
|
||||||
|
pub trait Shl<RHS = Self> {
|
||||||
|
type Output;
|
||||||
|
|
||||||
|
#[must_use]
|
||||||
|
fn shl(self, rhs: RHS) -> Self::Output;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Shl for u128 {
|
||||||
|
type Output = u128;
|
||||||
|
|
||||||
|
fn shl(self, rhs: u128) -> u128 {
|
||||||
|
self << rhs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[lang = "neg"]
|
#[lang = "neg"]
|
||||||
pub trait Neg {
|
pub trait Neg {
|
||||||
type Output;
|
type Output;
|
||||||
|
|
|
@ -264,6 +264,9 @@ fn main() {
|
||||||
assert_eq!(f2 as i8, -128);
|
assert_eq!(f2 as i8, -128);
|
||||||
assert_eq!(f2 as u8, 0);
|
assert_eq!(f2 as u8, 0);
|
||||||
|
|
||||||
|
let amount = 0;
|
||||||
|
assert_eq!(1u128 << amount, 1);
|
||||||
|
|
||||||
static ANOTHER_STATIC: &u8 = &A_STATIC;
|
static ANOTHER_STATIC: &u8 = &A_STATIC;
|
||||||
assert_eq!(*ANOTHER_STATIC, 42);
|
assert_eq!(*ANOTHER_STATIC, 42);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue