about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-03-01 12:19:22 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2021-03-01 12:19:22 +0100
commit27a5f4f4727db27db8cbf37ca74cb7ea4f9a820b (patch)
tree75737a8a02ddf7e734a871fe045555ace610bc60
parent86c594426f247ae34ef12f5e4dfd97f5ffe093c8 (diff)
downloadrust-27a5f4f4727db27db8cbf37ca74cb7ea4f9a820b.tar.gz
rust-27a5f4f4727db27db8cbf37ca74cb7ea4f9a820b.zip
Update Cranelift
Fixes #1143
-rw-r--r--Cargo.lock20
-rw-r--r--example/mini_core.rs16
-rw-r--r--example/mini_core_hello_world.rs3
3 files changed, 29 insertions, 10 deletions
diff --git a/Cargo.lock b/Cargo.lock
index e01eca27ef7..76d9f0d27ce 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -40,7 +40,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
 [[package]]
 name = "cranelift-bforest"
 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 = [
  "cranelift-entity",
 ]
@@ -48,7 +48,7 @@ dependencies = [
 [[package]]
 name = "cranelift-codegen"
 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 = [
  "byteorder",
  "cranelift-bforest",
@@ -66,7 +66,7 @@ dependencies = [
 [[package]]
 name = "cranelift-codegen-meta"
 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 = [
  "cranelift-codegen-shared",
  "cranelift-entity",
@@ -75,17 +75,17 @@ dependencies = [
 [[package]]
 name = "cranelift-codegen-shared"
 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]]
 name = "cranelift-entity"
 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]]
 name = "cranelift-frontend"
 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 = [
  "cranelift-codegen",
  "log",
@@ -96,7 +96,7 @@ dependencies = [
 [[package]]
 name = "cranelift-jit"
 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 = [
  "anyhow",
  "cranelift-codegen",
@@ -114,7 +114,7 @@ dependencies = [
 [[package]]
 name = "cranelift-module"
 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 = [
  "anyhow",
  "cranelift-codegen",
@@ -126,7 +126,7 @@ dependencies = [
 [[package]]
 name = "cranelift-native"
 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 = [
  "cranelift-codegen",
  "target-lexicon",
@@ -135,7 +135,7 @@ dependencies = [
 [[package]]
 name = "cranelift-object"
 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 = [
  "anyhow",
  "cranelift-codegen",
diff --git a/example/mini_core.rs b/example/mini_core.rs
index 002ec7e2e3d..7c6d7fc106d 100644
--- a/example/mini_core.rs
+++ b/example/mini_core.rs
@@ -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"]
 pub trait Neg {
     type Output;
diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs
index 4a8375afac3..237f4d11d57 100644
--- a/example/mini_core_hello_world.rs
+++ b/example/mini_core_hello_world.rs
@@ -264,6 +264,9 @@ fn main() {
     assert_eq!(f2 as i8, -128);
     assert_eq!(f2 as u8, 0);
 
+    let amount = 0;
+    assert_eq!(1u128 << amount, 1);
+
     static ANOTHER_STATIC: &u8 = &A_STATIC;
     assert_eq!(*ANOTHER_STATIC, 42);