...
 
Commits (2)
......@@ -318,11 +318,16 @@ impl<'a> VM {
/// initializes runtime
fn init_runtime(&self) {
use std::env;
// init gc
{
let ref options = self.vm_options;
let immixspace_size = match env::var("MU_IMMIX_SPACE") {
Ok(s) => s.parse::<usize>().unwrap(),
_ => options.flag_gc_immixspace_size
};
gc::gc_init(
options.flag_gc_immixspace_size,
immixspace_size,
options.flag_gc_lospace_size,
options.flag_gc_nthreads,
!options.flag_gc_disable_collection
......
......@@ -30,7 +30,7 @@ def test_PyPy():
flags = ['-O3', '--no-shared', '--backend=mu', '--mu-impl=zebu',
'--mu-vmargs', '--gc-immixspace-size=10737418240', '--mu-suplibdir=%(bin_dir)s' % globals()]
# flags = ['-O3', '--no-shared', '--backend=c', '--no-profopt']
args = ['--no-allworkingmodules']
args = ['--no-allworkingmodules', '--pybenchmodules']
cmd.extend(flags)
cmd.extend(['--output=%s' % target])
......
......@@ -241,3 +241,30 @@ def test_exc_pass_values():
""", "test_exc_pass_values");
assert(execute("test_exc_pass_values") == 4);
def test_inline_exc():
compile_bundle(
"""
.funcsig inline_sig = (funcref<()->()>)->()
.funcdef test_inline_exc <main_sig>
{
entry(<int<32>>argc <uptr<uptr<char>>>argv):
CALL <inline_sig> inlined(throwy) EXC(nor() exc())
nor():
RET <int<32>>1
exc():
RET <int<32>>2
}
.funcdef inlined <inline_sig>
{
entry(<funcref<()->()>> func):
CALL <()->()> func ()
RET
}
.funcdef throwy <()->()>
{
entry():
THROW <ref<void>> NULL
}
""", "test_inline_exc");
assert(execute("test_inline_exc") == 2);