Commit ecfd94ff authored by Eduardo Souza's avatar Eduardo Souza

Set up failing example test_execption.

parent fa18681b
......@@ -30,10 +30,10 @@ doctest = false
#ykstackmaps = { path = "/Users/ledusou/Documents/Repositories/misc/ykstackmaps", version = "*" }
#llvm-sys = "80"
#mu = { path = "/home/user/.virtualenv/eduardo/mu-impl-fast-macos", version = "*" }
mu = { path = "/home/user/.virtualenv/eduardo/mu-impl-fast-macos", version = "*" }
#ykstackmaps = { path = "/home/user/.virtualenv/eduardo/ykstackmaps", version = "*" }
llvm-sys = "60"
mu = { git = "https://gitlab.anu.edu.au/mu/mu-impl-fast", branch = "rust-2018", version = "*" }
#mu = { git = "https://gitlab.anu.edu.au/mu/mu-impl-fast", branch = "rust-2018", version = "*" }
#ykstackmaps = { git = "https://github.com/udesou/ykstackmaps.git", branch = "udesou-master", version = "*" }
#llvm-sys = "80"
......
......@@ -397,11 +397,11 @@ fn create_catch_exception_and_add(vm: &VM, throw_exception: MuEntityHeader) {
}
// FIXME TEST FAILS WHEN CONSIDERING GC AND ADDRSPACES
//#[test]
//fn test_exception_throw_catch_twice() {
// build_and_run_llvm_test!(catch_twice AND throw_exception,
// catch_twice_test1, throw_catch_twice);
//}
#[test]
fn test_exception_throw_catch_twice() {
build_and_run_llvm_test!(catch_twice AND throw_exception,
catch_twice_test1, throw_catch_twice);
}
fn throw_catch_twice() -> VM {
let opts = String::from("init_mu --generate-llvm");
......@@ -474,7 +474,7 @@ fn create_catch_twice(vm: &VM, throw_exception: MuEntityHeader) {
);
ssa! ((vm, catch_twice_v1) <int64> exc_arg1_val);
inst! ((vm, catch_twice_v1) blk_exception2_load1:
exc_arg1_val = LOAD blk_exception2_iref_exc1 (is_ptr: false, order: MemoryOrder::SeqCst)
exc_arg1_val = LOAD blk_exception2_exc_arg1 (is_ptr: false, order: MemoryOrder::SeqCst)
);
ssa! ((vm, catch_twice_v1) <iref_int64> blk_exception2_iref_exc2);
......@@ -483,12 +483,12 @@ fn create_catch_twice(vm: &VM, throw_exception: MuEntityHeader) {
);
ssa! ((vm, catch_twice_v1) <int64> exc_arg2_val);
inst! ((vm, catch_twice_v1) blk_exception2_load2:
exc_arg2_val = LOAD blk_exception2_iref_exc2 (is_ptr: false, order: MemoryOrder::SeqCst)
exc_arg2_val = LOAD exc_arg2 (is_ptr: false, order: MemoryOrder::SeqCst)
);
ssa! ((vm, catch_twice_v1) <int64> res);
inst! ((vm, catch_twice_v1) blk_exception2_add:
res = BINOP (BinOp::Add) exc_arg1_val exc_arg2_val
res = BINOP (BinOp::Add) exc_arg2_val exc_arg2_val
);
inst! ((vm, catch_twice_v1) blk_exception2_ret:
......@@ -496,9 +496,9 @@ fn create_catch_twice(vm: &VM, throw_exception: MuEntityHeader) {
);
define_block! ((vm, catch_twice_v1) blk_exception2(blk_exception2_exc_arg1) [exc_arg2] {
blk_exception2_getiref1,
// blk_exception2_getiref1,
blk_exception2_load1,
blk_exception2_getiref2,
// blk_exception2_getiref2,
blk_exception2_load2,
blk_exception2_add,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment