prepare for debugger

This commit is contained in:
ValKmjolnir
2021-07-16 02:17:53 +08:00
parent 8b8e72c879
commit 9da029b8fe
3 changed files with 190 additions and 183 deletions
+57 -54
View File
@@ -930,11 +930,14 @@ nop:
return;
//#define exec_operand(op,num) {op();++count[num];if(!canary[0])goto *code[++pc];goto nop;}
#define exec_operand(op,num) {op();if(!canary[0])goto *code[++pc];goto nop;}
intg: exec_operand(opr_intg ,op_intg);
intl: exec_operand(opr_intl ,op_intl);
offset: exec_operand(opr_offset ,op_offset);
loadg: exec_operand(opr_loadg ,op_loadg);
loadl: exec_operand(opr_loadl ,op_loadl);
//#define exec_opnodie(op,num) {op();++count[num];goto *code[++pc];}
#define exec_opnodie(op,num) {op();goto *code[++pc];}
intg: exec_opnodie(opr_intg ,op_intg);
intl: exec_opnodie(opr_intl ,op_intl);
offset: exec_opnodie(opr_offset ,op_offset);
loadg: exec_opnodie(opr_loadg ,op_loadg);
loadl: exec_opnodie(opr_loadl ,op_loadl);
pnum: exec_operand(opr_pnum ,op_pnum);
pone: exec_operand(opr_pone ,op_pone);
pzero: exec_operand(opr_pzero ,op_pzero);
@@ -943,53 +946,53 @@ pstr: exec_operand(opr_pstr ,op_pstr);
newv: exec_operand(opr_newv ,op_newv);
newh: exec_operand(opr_newh ,op_newh);
newf: exec_operand(opr_newf ,op_newf);
happ: exec_operand(opr_happ ,op_happ);
para: exec_operand(opr_para ,op_para);
defpara: exec_operand(opr_defpara ,op_defpara);
dynpara: exec_operand(opr_dynpara ,op_dynpara);
happ: exec_opnodie(opr_happ ,op_happ);
para: exec_opnodie(opr_para ,op_para);
defpara: exec_opnodie(opr_defpara ,op_defpara);
dynpara: exec_opnodie(opr_dynpara ,op_dynpara);
unot: exec_operand(opr_unot ,op_unot);
usub: exec_operand(opr_usub ,op_usub);
add: exec_operand(opr_add ,op_add);
sub: exec_operand(opr_sub ,op_sub);
mul: exec_operand(opr_mul ,op_mul);
div: exec_operand(opr_div ,op_div);
lnk: exec_operand(opr_lnk ,op_lnk);
addc: exec_operand(opr_addc ,op_addc);
subc: exec_operand(opr_subc ,op_subc);
mulc: exec_operand(opr_mulc ,op_mulc);
divc: exec_operand(opr_divc ,op_divc);
lnkc: exec_operand(opr_lnkc ,op_lnkc);
addeq: exec_operand(opr_addeq ,op_addeq);
subeq: exec_operand(opr_subeq ,op_subeq);
muleq: exec_operand(opr_muleq ,op_muleq);
diveq: exec_operand(opr_diveq ,op_diveq);
lnkeq: exec_operand(opr_lnkeq ,op_lnkeq);
addeqc: exec_operand(opr_addeqc ,op_addeqc);
subeqc: exec_operand(opr_subeqc ,op_subeqc);
muleqc: exec_operand(opr_muleqc ,op_muleqc);
diveqc: exec_operand(opr_diveqc ,op_diveqc);
lnkeqc: exec_operand(opr_lnkeqc ,op_lnkeqc);
meq: exec_operand(opr_meq ,op_meq);
eq: exec_operand(opr_eq ,op_eq);
neq: exec_operand(opr_neq ,op_neq);
less: exec_operand(opr_less ,op_less);
leq: exec_operand(opr_leq ,op_leq);
grt: exec_operand(opr_grt ,op_grt);
geq: exec_operand(opr_geq ,op_geq);
lessc: exec_operand(opr_lessc ,op_lessc);
leqc: exec_operand(opr_leqc ,op_leqc);
grtc: exec_operand(opr_grtc ,op_grtc);
geqc: exec_operand(opr_geqc ,op_geqc);
pop: exec_operand(opr_pop ,op_pop);
jmp: exec_operand(opr_jmp ,op_jmp);
jt: exec_operand(opr_jt ,op_jt);
jf: exec_operand(opr_jf ,op_jf);
usub: exec_opnodie(opr_usub ,op_usub);
add: exec_opnodie(opr_add ,op_add);
sub: exec_opnodie(opr_sub ,op_sub);
mul: exec_opnodie(opr_mul ,op_mul);
div: exec_opnodie(opr_div ,op_div);
lnk: exec_opnodie(opr_lnk ,op_lnk);
addc: exec_opnodie(opr_addc ,op_addc);
subc: exec_opnodie(opr_subc ,op_subc);
mulc: exec_opnodie(opr_mulc ,op_mulc);
divc: exec_opnodie(opr_divc ,op_divc);
lnkc: exec_opnodie(opr_lnkc ,op_lnkc);
addeq: exec_opnodie(opr_addeq ,op_addeq);
subeq: exec_opnodie(opr_subeq ,op_subeq);
muleq: exec_opnodie(opr_muleq ,op_muleq);
diveq: exec_opnodie(opr_diveq ,op_diveq);
lnkeq: exec_opnodie(opr_lnkeq ,op_lnkeq);
addeqc: exec_opnodie(opr_addeqc ,op_addeqc);
subeqc: exec_opnodie(opr_subeqc ,op_subeqc);
muleqc: exec_opnodie(opr_muleqc ,op_muleqc);
diveqc: exec_opnodie(opr_diveqc ,op_diveqc);
lnkeqc: exec_opnodie(opr_lnkeqc ,op_lnkeqc);
meq: exec_opnodie(opr_meq ,op_meq);
eq: exec_opnodie(opr_eq ,op_eq);
neq: exec_opnodie(opr_neq ,op_neq);
less: exec_opnodie(opr_less ,op_less);
leq: exec_opnodie(opr_leq ,op_leq);
grt: exec_opnodie(opr_grt ,op_grt);
geq: exec_opnodie(opr_geq ,op_geq);
lessc: exec_opnodie(opr_lessc ,op_lessc);
leqc: exec_opnodie(opr_leqc ,op_leqc);
grtc: exec_opnodie(opr_grtc ,op_grtc);
geqc: exec_opnodie(opr_geqc ,op_geqc);
pop: exec_opnodie(opr_pop ,op_pop);
jmp: exec_opnodie(opr_jmp ,op_jmp);
jt: exec_opnodie(opr_jt ,op_jt);
jf: exec_opnodie(opr_jf ,op_jf);
counter: exec_operand(opr_counter ,op_cnt);
cntpop: exec_operand(opr_cntpop ,op_cntpop);
findex: exec_operand(opr_findex ,op_findex);
feach: exec_operand(opr_feach ,op_feach);
callg: exec_operand(opr_callg ,op_callg);
calll: exec_operand(opr_calll ,op_calll);
cntpop: exec_opnodie(opr_cntpop ,op_cntpop);
findex: exec_opnodie(opr_findex ,op_findex);
feach: exec_opnodie(opr_feach ,op_feach);
callg: exec_opnodie(opr_callg ,op_callg);
calll: exec_opnodie(opr_calll ,op_calll);
callv: exec_operand(opr_callv ,op_callv);
callvi: exec_operand(opr_callvi ,op_callvi);
callh: exec_operand(opr_callh ,op_callh);
@@ -997,13 +1000,13 @@ callfv: exec_operand(opr_callfv ,op_callfv);
callfh: exec_operand(opr_callfh ,op_callfh);
callb: exec_operand(opr_callb ,op_callb);
slcbegin:exec_operand(opr_slcbegin,op_slcbegin);
slcend: exec_operand(opr_slcend ,op_slcend);
slcend: exec_opnodie(opr_slcend ,op_slcend);
slc: exec_operand(opr_slc ,op_slc);
slc2: exec_operand(opr_slc2 ,op_slc2);
mcallg: exec_operand(opr_mcallg ,op_mcallg);
mcalll: exec_operand(opr_mcalll ,op_mcalll);
mcallg: exec_opnodie(opr_mcallg ,op_mcallg);
mcalll: exec_opnodie(opr_mcalll ,op_mcalll);
mcallv: exec_operand(opr_mcallv ,op_mcallv);
mcallh: exec_operand(opr_mcallh ,op_mcallh);
ret: exec_operand(opr_ret ,op_ret);
ret: exec_opnodie(opr_ret ,op_ret);
}
#endif