From 80c38081da6303b0aeb45772f811822424d8259a Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 12 Oct 2010 22:02:51 +0100 Subject: [PATCH] no need for special procceed instruction. --- C/absmi.c | 20 +------------------- C/amasm.c | 6 +----- C/analyst.c | 4 +--- C/dbase.c | 4 ++-- C/index.c | 1 - H/YapOpcodes.h | 1 - H/rclause.h | 1 - H/walkclause.h | 1 - 8 files changed, 5 insertions(+), 33 deletions(-) diff --git a/C/absmi.c b/C/absmi.c index 6e8818d36..57d80458d 100755 --- a/C/absmi.c +++ b/C/absmi.c @@ -2692,7 +2692,6 @@ Yap_absmi(int inp) a execute_c, just wait a bit more */ if (ActiveSignals & YAP_CREEP_SIGNAL || (PREG->opc != Yap_opcode(_procceed) && - PREG->opc != Yap_opcode(_safe_procceed) && PREG->opc != Yap_opcode(_cut_e))) { GONext(); } @@ -3087,24 +3086,6 @@ Yap_absmi(int inp) CACHE_A1(); JMPNext(); - BOp(safe_procceed, p); - CACHE_Y_AS_ENV(YREG); - check_trail(TR); - check_stack(NoStackDeallocate, H); - ALWAYS_LOOKAHEAD(CPREG->opc); - PREG = CPREG; - /* for profiler */ - save_pc(); - ENV_YREG = ENV; -#ifdef DEPTH_LIMIT - DEPTH = ENV_YREG[E_DEPTH]; -#endif - WRITEBACK_Y_AS_ENV(); - ALWAYS_GONext(); - ALWAYS_END_PREFETCH(); - ENDCACHE_Y_AS_ENV(); - ENDBOp(); - BOp(procceed, p); CACHE_Y_AS_ENV(YREG); ALWAYS_LOOKAHEAD(CPREG->opc); @@ -3136,6 +3117,7 @@ Yap_absmi(int inp) Op(deallocate, p); CACHE_Y_AS_ENV(YREG); + check_trail(TR); PREG = NEXTOP(PREG, p); /* other instructions do depend on S being set by deallocate :-( */ diff --git a/C/amasm.c b/C/amasm.c index 89e73d0f1..62ed4ff2b 100755 --- a/C/amasm.c +++ b/C/amasm.c @@ -3507,11 +3507,7 @@ do_pass(int pass_no, yamop **entry_codep, int assembling, int *clause_has_blobsp !clinfo.alloc_found) code_p = a_e(_unlock_lu, code_p, pass_no); #endif - if (clinfo.alloc_found) { - code_p = a_pl(_safe_procceed, cip->CurrentPred, code_p, pass_no); - } else { - code_p = a_pl(_procceed, cip->CurrentPred, code_p, pass_no); - } + code_p = a_pl(_procceed, cip->CurrentPred, code_p, pass_no); break; case call_op: code_p = a_p(_call, &clinfo, code_p, pass_no, cip); diff --git a/C/analyst.c b/C/analyst.c index 6ebee805f..1e32eec50 100644 --- a/C/analyst.c +++ b/C/analyst.c @@ -118,7 +118,6 @@ p_show_op_counters() print_instruction(_call_cpred); print_instruction(_call_c_wfail); print_instruction(_procceed); - print_instruction(_safe_procceed); print_instruction(_allocate); print_instruction(_deallocate); @@ -480,8 +479,7 @@ p_show_ops_by_group(void) Yap_opcount[_fcall]; c_control.nproceeds = - Yap_opcount[_procceed]+ - Yap_opcount[_safe_procceed]; + Yap_opcount[_procceed]; c_control.ncallbips = Yap_opcount[_call_cpred] + diff --git a/C/dbase.c b/C/dbase.c index 9302c6225..8fafffcd1 100755 --- a/C/dbase.c +++ b/C/dbase.c @@ -3439,7 +3439,7 @@ lu_recorded(PredEntry *pe) { PELOCK(66,pe); PP = pe; #endif - if (opc == _procceed || opc == _safe_procceed) { + if (opc == _procceed) { P = pe->CodeOfPred; } else { if (P->opc != Yap_opcode(_execute_cpred)) { @@ -3504,7 +3504,7 @@ p_recorded(void) if (!Yap_unify(GetDBLUKey(ap), ARG1)) return FALSE; - if (opc == _procceed || opc == _safe_procceed) { + if (opc == _procceed) { P = cl->ClCode; } else { CP = P; diff --git a/C/index.c b/C/index.c index 6a107a574..db02e1eff 100644 --- a/C/index.c +++ b/C/index.c @@ -1396,7 +1396,6 @@ has_cut(yamop *pc) return FALSE; case _deallocate: case _procceed: - case _safe_procceed: pc = NEXTOP(pc,p); break; /* instructions type sc */ diff --git a/H/YapOpcodes.h b/H/YapOpcodes.h index c8c99d7db..740093710 100644 --- a/H/YapOpcodes.h +++ b/H/YapOpcodes.h @@ -43,7 +43,6 @@ OPCODE(dexecute ,pp), OPCODE(fcall ,Osbpp), OPCODE(call ,Osbpp), - OPCODE(safe_procceed ,p), OPCODE(procceed ,p), OPCODE(allocate ,e), OPCODE(deallocate ,p), diff --git a/H/rclause.h b/H/rclause.h index 71034a4ba..a8dffffcf 100644 --- a/H/rclause.h +++ b/H/rclause.h @@ -424,7 +424,6 @@ restore_opcodes(yamop *pc, yamop *max) case _lock_lu: case _procceed: case _retry_profiled: - case _safe_procceed: pc->u.p.p = PtoPredAdjust(pc->u.p.p); pc = NEXTOP(pc,p); break; diff --git a/H/walkclause.h b/H/walkclause.h index 4f169003c..f73e9114b 100644 --- a/H/walkclause.h +++ b/H/walkclause.h @@ -335,7 +335,6 @@ case _deallocate: case _enter_profiling: case _retry_profiled: - case _safe_procceed: pc = NEXTOP(pc,p); break; /* instructions type plxxs */