Commit 6e256904 authored by qinsoon's avatar qinsoon

[wip] working on test_throw

parent cc5740e4
......@@ -1731,13 +1731,16 @@ impl<'lb, 'lvm> BundleLoader<'lb, 'lvm> {
let target = dest_clause.dest;
let dest_args = dest_clause.vars.iter().map(|vid| {
if let Some(ind) = inst_result_ids.iter().position(|rid| *rid == *vid) {
DestArg::Freshbound(ind)
} else {
let my_index = ops.len();
self.add_opnd(fcb, ops, *vid);
DestArg::Normal(my_index)
}
// if let Some(ind) = inst_result_ids.iter().position(|rid| *rid == *vid) {
// DestArg::Freshbound(ind)
// } else {
// let my_index = ops.len();
// self.add_opnd(fcb, ops, *vid);
// DestArg::Normal(my_index)
// }
let my_index = ops.len();
self.add_opnd(fcb, ops, *vid);
DestArg::Normal(my_index)
}).collect::<Vec<_>>();
let impl_dest = Destination {
......
from util import fncptr_from_c_script
from util import fncptr_from_c_script, preload_libmu
import ctypes, ctypes.util
def test_branch():
fn, _ = fncptr_from_c_script("test_branch.c", "test_fnc")
assert fn() == 30
......@@ -23,6 +22,7 @@ def test_extern_func():
def test_throw():
# from rpython.rlib import rmu_fast as rmu
preload_libmu()
fn, _ = fncptr_from_c_script("test_throw.c", "test_fnc", [ctypes.c_int64], ctypes.c_int64)
# mu = rmu.MuVM()
# mu.current_thread_as_mu_thread(rmu.null(rmu.MuCPtr))
......@@ -31,6 +31,7 @@ def test_throw():
def test_exception_stack_unwind():
# from rpython.rlib import rmu_fast as rmu
preload_libmu()
fn, _ = fncptr_from_c_script("test_exception_stack_unwind.c", "test_fnc", [ctypes.c_int64], ctypes.c_int64)
# mu = rmu.MuVM()
# mu.current_thread_as_mu_thread(rmu.null(rmu.MuCPtr))
......
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