mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
Revert some changes
This commit is contained in:
parent
dbb118a5bc
commit
4c7abd504c
@ -394,10 +394,6 @@ pub trait FnMut<Args>: FnOnce<Args> {
|
||||
|
||||
#[lang = "panic"]
|
||||
pub fn panic(&(_msg, _file, _line, _col): &(&'static str, &'static str, u32, u32)) -> ! {
|
||||
panic_inner(&_msg);
|
||||
}
|
||||
|
||||
pub fn panic_inner(_msg: &&str) -> ! {
|
||||
unsafe {
|
||||
libc::puts("Panicking\0" as *const str as *const u8);
|
||||
intrinsics::abort();
|
||||
|
@ -269,7 +269,7 @@ fn trans_stmt<'tcx>(
|
||||
|
||||
fx.set_debug_loc(stmt.source_info);
|
||||
|
||||
#[cfg(false_debug_assertions)]
|
||||
#[cfg(debug_assertions)]
|
||||
match &stmt.kind {
|
||||
StatementKind::StorageLive(..) | StatementKind::StorageDead(..) => {} // Those are not very useful
|
||||
_ => {
|
||||
|
@ -362,6 +362,19 @@ impl<'tcx> CPlace<'tcx> {
|
||||
}
|
||||
|
||||
pub fn write_cvalue(self, fx: &mut FunctionCx<'_, 'tcx, impl Backend>, from: CValue<'tcx>) {
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
use cranelift_codegen::cursor::{Cursor, CursorPosition};
|
||||
let cur_ebb = match fx.bcx.cursor().position() {
|
||||
CursorPosition::After(ebb) => ebb,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
fx.add_comment(
|
||||
fx.bcx.func.layout.last_inst(cur_ebb).unwrap(),
|
||||
format!("write_cvalue: {:?} <- {:?}",self, from),
|
||||
);
|
||||
}
|
||||
|
||||
let from_ty = from.layout().ty;
|
||||
let to_ty = self.layout().ty;
|
||||
|
||||
|
15
test.sh
15
test.sh
@ -4,10 +4,10 @@ set -e
|
||||
|
||||
if [[ "$1" == "--release" ]]; then
|
||||
export CHANNEL='release'
|
||||
cargo rustc --release $CG_CLIF_COMPILE_FLAGS -- -Clink-args=-fuse-ld=lld
|
||||
cargo build --release $CG_CLIF_COMPILE_FLAGS
|
||||
else
|
||||
export CHANNEL='debug'
|
||||
cargo rustc $CG_CLIF_COMPILE_FLAGS -- -Clink-args=-fuse-ld=lld
|
||||
cargo build $CG_CLIF_COMPILE_FLAGS
|
||||
fi
|
||||
|
||||
source config.sh
|
||||
@ -28,8 +28,6 @@ mkdir -p target/out/clif
|
||||
echo "[BUILD] mini_core"
|
||||
$RUSTC example/mini_core.rs --crate-name mini_core --crate-type lib,dylib
|
||||
|
||||
#exit 1
|
||||
|
||||
echo "[BUILD] example"
|
||||
$RUSTC example/example.rs --crate-type lib
|
||||
|
||||
@ -71,16 +69,15 @@ $RUSTC example/mod_bench.rs --crate-type bin
|
||||
|
||||
pushd simple-raytracer
|
||||
echo "[BENCH COMPILE] ebobby/simple-raytracer"
|
||||
rm -r target/x86_64*/
|
||||
../cargo.sh build
|
||||
hyperfine --runs ${RUN_RUNS:-10} --warmup 1 --prepare "rm -r target/*/debug || true" \
|
||||
"RUSTFLAGS='' cargo build --target $TARGET_TRIPLE" \
|
||||
"../cargo.sh build"
|
||||
|
||||
echo "[BENCH RUN] ebobby/simple-raytracer"
|
||||
cp ./target/*/debug/main ./raytracer_cg_clif
|
||||
hyperfine --runs ${RUN_RUNS:-10} ./raytracer_*
|
||||
hyperfine --runs ${RUN_RUNS:-10} ./raytracer_cg_llvm ./raytracer_cg_clif
|
||||
popd
|
||||
|
||||
exit 1
|
||||
|
||||
pushd build_sysroot/sysroot_src/src/libcore/tests
|
||||
rm -r ./target || true
|
||||
../../../../../cargo.sh test
|
||||
|
Loading…
Reference in New Issue
Block a user