Skip to content

Commit

Permalink
For reasons that I don't understand, part of the previous patch crash…
Browse files Browse the repository at this point in the history
…es RPython's JIT generator.

Upto --opt=3 works fine, but this little fragment crashes --opt=jit. Why? I
have no idea. Perhaps it's passing function references across modules? It's
not much of a guess, but it's about the best I've come up with so far...
  • Loading branch information
ltratt committed Oct 27, 2011
1 parent 65cc1dc commit 75498f7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pypyvm/Modules/Con_Sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ def init(vm):
def import_(vm):
(mod,),_ = vm.decode_args("O")

Builtins.new_c_con_func_for_mod(vm, "exit", exit, mod)
Builtins.new_c_con_func_for_mod(vm, "println", println, mod)
exit_func = Builtins.new_c_con_func(vm, Builtins.Con_String(vm, "exit"), False, exit, mod)
mod.set_defn(vm, "exit", exit_func)

println_func = Builtins.new_c_con_func(vm, Builtins.Con_String(vm, "println"), False, println, mod)
mod.set_defn(vm, "println", println_func)

vm.return_(vm.get_builtin(Builtins.BUILTIN_NULL_OBJ))

Expand Down

0 comments on commit 75498f7

Please sign in to comment.