]> Repositorios git - scryer-prolog.git/commitdiff
reverse builtin instructions
authorMark Thom <[email protected]>
Sat, 3 Feb 2018 00:10:57 +0000 (17:10 -0700)
committerMark Thom <[email protected]>
Sat, 3 Feb 2018 00:10:57 +0000 (17:10 -0700)
src/prolog/builtins.rs
src/prolog/io.rs

index aa644bdd9f57ceb203d1ddc93be1aaec35287374..dad175090e18932bb3546f2f0f29c119888b13f7 100644 (file)
@@ -447,7 +447,7 @@ fn get_builtins(atom_tbl: TabledData<Atom>) -> Code {
          get_current_block!(),
          query![put_value!(perm_v!(3), 1),
                 put_unsafe_value!(4, 2),
-                put_value!(perm_v!(2), 3)],                
+                put_value!(perm_v!(2), 3)],
          deallocate!(),
          jmp_execute!(3, 1),
          try_me_else!(5), // 304.
@@ -491,8 +491,8 @@ fn get_builtins(atom_tbl: TabledData<Atom>) -> Code {
          trust_me!(),
          allocate!(0),
          goto_call!(352, 0), // goto run_cleaners_without_handling/0, 352.
-         fail!(),
          deallocate!(),
+         fail!(),
          try_me_else!(10), // run_cleaners_with_handling/0, 340.
          allocate!(2),
          get_level!(perm_v!(1)),
@@ -500,7 +500,7 @@ fn get_builtins(atom_tbl: TabledData<Atom>) -> Code {
          get_cleaner_call!(),
          query![put_value!(perm_v!(2), 1),
                 put_var!(temp_v!(4), 2),
-                put_constant!(Level::Shallow, atom!("true", atom_tbl), temp_v!(3))],         
+                put_constant!(Level::Shallow, atom!("true", atom_tbl), temp_v!(3))],
          goto_call!(5, 3), // goto catch/3, 5.
          cut!(perm_v!(1)),
          deallocate!(),
@@ -515,7 +515,7 @@ fn get_builtins(atom_tbl: TabledData<Atom>) -> Code {
          query![put_value!(perm_v!(2), 1)],
          call_n!(1),
          cut!(perm_v!(1)),
-         deallocate!(),         
+         deallocate!(),
          goto_execute!(352, 0), // goto run_cleaners_without_handling/0, 352.
          trust_me!(),
          proceed!(),
index 1e7f11139af75277e9edeb52947195a6cf935bb7..5d467db6e494adede1a367e1f2c0d091f06886e1 100644 (file)
@@ -494,8 +494,6 @@ fn compile_decl<'a, 'b: 'a>(wam: &'a mut Machine, tl: &'b TopLevel, queue: &'b V
                 return EvalSession::from(e);
             };
 
-            print_code(&code);
-            
             if !code.is_empty() {
                 if let Some(name) = tl.name() {
                     wam.add_user_code(name, tl.arity(), code)