aboutsummaryrefslogtreecommitdiff
path: root/kernel/byterun/coq_fix_code.c
diff options
context:
space:
mode:
authorGuillaume Melquiond2021-02-17 12:12:29 +0100
committerGuillaume Melquiond2021-02-19 11:17:26 +0100
commitab94a2a5dbe142d972d65a33d977e8e9f8d52f01 (patch)
tree45b6fb6ea9fc2a13c1b02a0bbb2800ad3a2f4458 /kernel/byterun/coq_fix_code.c
parentc7bbe4729dc53ddf3a02a7ae3816ec3c146d452e (diff)
Make the generated file the official source of arity.
Diffstat (limited to 'kernel/byterun/coq_fix_code.c')
-rw-r--r--kernel/byterun/coq_fix_code.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/kernel/byterun/coq_fix_code.c b/kernel/byterun/coq_fix_code.c
index 40aaa5c021..f986095f59 100644
--- a/kernel/byterun/coq_fix_code.c
+++ b/kernel/byterun/coq_fix_code.c
@@ -27,67 +27,6 @@
#ifdef THREADED_CODE
char ** coq_instr_table;
char * coq_instr_base;
-int arity[STOP+1];
-
-void init_arity () {
- /* instruction with zero operand */
- arity[ACC0]=arity[ACC1]=arity[ACC2]=arity[ACC3]=arity[ACC4]=arity[ACC5]=
- arity[ACC6]=arity[ACC7]=
- arity[PUSH]=arity[PUSHACC1]=
- arity[PUSHACC2]=arity[PUSHACC3]=arity[PUSHACC4]=arity[PUSHACC5]=
- arity[PUSHACC6]=arity[PUSHACC7]=
- arity[ENVACC0]=arity[ENVACC1]=arity[ENVACC2]=arity[ENVACC3]=
- arity[PUSHENVACC0]=arity[PUSHENVACC1]=arity[PUSHENVACC2]=arity[PUSHENVACC3]=
- arity[APPLY1]=arity[APPLY2]=arity[APPLY3]=arity[APPLY4]=arity[RESTART]=
- arity[OFFSETCLOSURE0]=arity[OFFSETCLOSURE1]=
- arity[PUSHOFFSETCLOSURE0]=arity[PUSHOFFSETCLOSURE1]=
- arity[GETFIELD0]=arity[GETFIELD1]=
- arity[CONST0]=arity[CONST1]=arity[CONST2]=arity[CONST3]=
- arity[PUSHCONST0]=arity[PUSHCONST1]=arity[PUSHCONST2]=arity[PUSHCONST3]=
- arity[ACCUMULATE]=arity[STOP]=
- 0;
- /* instruction with one operand */
- arity[ACC]=arity[PUSHACC]=arity[POP]=arity[ENVACC]=arity[PUSHENVACC]=
- arity[PUSH_RETADDR]=arity[APPLY]=arity[APPTERM1]=arity[APPTERM2]=
- arity[APPTERM3]=arity[RETURN]=arity[GRAB]=arity[OFFSETCLOSURE]=
- arity[PUSHOFFSETCLOSURE]=arity[GETGLOBAL]=arity[PUSHGETGLOBAL]=
- arity[MAKEBLOCK1]=arity[MAKEBLOCK2]=arity[MAKEBLOCK3]=arity[MAKEBLOCK4]=
- arity[MAKEACCU]=arity[CONSTINT]=arity[PUSHCONSTINT]=arity[GRABREC]=
- arity[PUSHFIELDS]=arity[GETFIELD]=arity[SETFIELD]=
- arity[BRANCH]=arity[ENSURESTACKCAPACITY]=
- arity[CHECKADDINT63]=arity[CHECKADDCINT63]=arity[CHECKADDCARRYCINT63]=
- arity[CHECKSUBINT63]=arity[CHECKSUBCINT63]=arity[CHECKSUBCARRYCINT63]=
- arity[CHECKMULINT63]=arity[CHECKMULCINT63]=
- arity[CHECKDIVINT63]=arity[CHECKMODINT63]=arity[CHECKDIVEUCLINT63]=
- arity[CHECKDIV21INT63]=
- arity[CHECKLXORINT63]=arity[CHECKLORINT63]=arity[CHECKLANDINT63]=
- arity[CHECKLSLINT63]=arity[CHECKLSRINT63]=arity[CHECKADDMULDIVINT63]=
- arity[CHECKEQINT63]=arity[CHECKLTINT63]=arity[CHECKLEINT63]=
- arity[CHECKCOMPAREINT63]=arity[CHECKHEAD0INT63]=arity[CHECKTAIL0INT63]=
- arity[CHECKEQFLOAT]=arity[CHECKLTFLOAT]=arity[CHECKLEFLOAT]=
- arity[CHECKOPPFLOAT]=arity[CHECKABSFLOAT]=arity[CHECKCOMPAREFLOAT]=
- arity[CHECKCLASSIFYFLOAT]=
- arity[CHECKADDFLOAT]=arity[CHECKSUBFLOAT]=arity[CHECKMULFLOAT]=
- arity[CHECKDIVFLOAT]=arity[CHECKSQRTFLOAT]=
- arity[CHECKFLOATOFINT63]=arity[CHECKFLOATNORMFRMANTISSA]=
- arity[CHECKFRSHIFTEXP]=arity[CHECKLDSHIFTEXP]=
- arity[CHECKNEXTUPFLOAT]=arity[CHECKNEXTDOWNFLOAT]=
- arity[CHECKNEXTUPFLOATINPLACE]=arity[CHECKNEXTDOWNFLOATINPLACE]=
- 1;
- /* instruction with two operands */
- arity[APPTERM]=arity[MAKEBLOCK]=arity[CLOSURE]=
- arity[CHECKCAMLCALL1]=arity[CHECKCAMLCALL2_1]=
- arity[CHECKCAMLCALL2]=arity[CHECKCAMLCALL3_1]=
- arity[PROJ]=
- 2;
- /* instruction with four operands */
- arity[MAKESWITCHBLOCK]=4;
- /* instruction with arbitrary operands */
- arity[CLOSUREREC]=arity[CLOSURECOFIX]=arity[SWITCH]=-1;
- for (int i = 0; i <= STOP; ++i)
- if (arity[i] != arity2[i]) { printf("bad: %d\n", i); abort(); }
-}
-
#endif /* THREADED_CODE */