[m-dev.] trivial diff: add new RL bytecode

Simon Taylor stayl at cs.mu.OZ.AU
Wed Jun 2 16:59:28 AEST 1999



Estimated hours taken: 0.1

compiler/rl_code.m:
	Add a new bytecode which tests whether there is
	a single reference to a relation.



Index: rl_code.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/rl_code.m,v
retrieving revision 1.3
diff -u -u -r1.3 rl_code.m
--- rl_code.m	1999/05/11 05:03:58	1.3
+++ rl_code.m	1999/06/02 06:41:37
@@ -5,7 +5,7 @@
 %-----------------------------------------------------------------------------%
 % Do not edit - this file was automatically generated by
 % $ADITI_ROOT/src/rosi/create_rl_code_m.
-% Created Tue May 11 12:46:29 1999
+% Created Wed Jun  2 16:41:37 1999
 
 %-----------------------------------------------------------------------------%
 :- module rl_code.
@@ -335,6 +335,7 @@
 	;	rl_PROC_conditional_goto_label(int32)
 	;	rl_PROC_notempty
 	;	rl_PROC_empty
+	;	rl_PROC_one_reference(int32)
 	;	rl_PROC_and
 	;	rl_PROC_or
 	;	rl_PROC_not
@@ -1414,241 +1415,245 @@
 bytecode_to_intlist(rl_PROC_empty,	 Splits) :-
 	int16_to_bytecode(272, I272Codes),
 	list__condense([I272Codes], Splits).
-bytecode_to_intlist(rl_PROC_and,	 Splits) :-
+bytecode_to_intlist(rl_PROC_one_reference(X0int32),	 Splits) :-
 	int16_to_bytecode(273, I273Codes),
-	list__condense([I273Codes], Splits).
-bytecode_to_intlist(rl_PROC_or,	 Splits) :-
+	int32_to_bytecode(X0int32, X0int32Codes),
+	list__condense([I273Codes,X0int32Codes], Splits).
+bytecode_to_intlist(rl_PROC_and,	 Splits) :-
 	int16_to_bytecode(274, I274Codes),
 	list__condense([I274Codes], Splits).
-bytecode_to_intlist(rl_PROC_not,	 Splits) :-
+bytecode_to_intlist(rl_PROC_or,	 Splits) :-
 	int16_to_bytecode(275, I275Codes),
 	list__condense([I275Codes], Splits).
-bytecode_to_intlist(rl_PROC_stream,	 Splits) :-
+bytecode_to_intlist(rl_PROC_not,	 Splits) :-
 	int16_to_bytecode(276, I276Codes),
 	list__condense([I276Codes], Splits).
-bytecode_to_intlist(rl_PROC_stream_end,	 Splits) :-
+bytecode_to_intlist(rl_PROC_stream,	 Splits) :-
 	int16_to_bytecode(277, I277Codes),
 	list__condense([I277Codes], Splits).
-bytecode_to_intlist(rl_PROC_stream_list_cons,	 Splits) :-
+bytecode_to_intlist(rl_PROC_stream_end,	 Splits) :-
 	int16_to_bytecode(278, I278Codes),
 	list__condense([I278Codes], Splits).
-bytecode_to_intlist(rl_PROC_stream_list_nil,	 Splits) :-
+bytecode_to_intlist(rl_PROC_stream_list_cons,	 Splits) :-
 	int16_to_bytecode(279, I279Codes),
 	list__condense([I279Codes], Splits).
-bytecode_to_intlist(rl_PROC_var(X0int32,X1int32),	 Splits) :-
+bytecode_to_intlist(rl_PROC_stream_list_nil,	 Splits) :-
 	int16_to_bytecode(280, I280Codes),
+	list__condense([I280Codes], Splits).
+bytecode_to_intlist(rl_PROC_var(X0int32,X1int32),	 Splits) :-
+	int16_to_bytecode(281, I281Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
 	int32_to_bytecode(X1int32, X1int32Codes),
-	list__condense([I280Codes,X0int32Codes,X1int32Codes], Splits).
+	list__condense([I281Codes,X0int32Codes,X1int32Codes], Splits).
 bytecode_to_intlist(rl_PROC_indexed_var(X0int32,X1int32,X2aString),	 Splits) :-
-	int16_to_bytecode(281, I281Codes),
+	int16_to_bytecode(282, I282Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
 	int32_to_bytecode(X1int32, X1int32Codes),
 	int32_to_bytecode(X2aString, X2aStringCodes),
-	list__condense([I281Codes,X0int32Codes,X1int32Codes,X2aStringCodes], Splits).
+	list__condense([I282Codes,X0int32Codes,X1int32Codes,X2aStringCodes], Splits).
 bytecode_to_intlist(rl_PROC_var_list_cons(X0int32,X1int32),	 Splits) :-
-	int16_to_bytecode(282, I282Codes),
+	int16_to_bytecode(283, I283Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
 	int32_to_bytecode(X1int32, X1int32Codes),
-	list__condense([I282Codes,X0int32Codes,X1int32Codes], Splits).
+	list__condense([I283Codes,X0int32Codes,X1int32Codes], Splits).
 bytecode_to_intlist(rl_PROC_var_list_nil,	 Splits) :-
-	int16_to_bytecode(283, I283Codes),
-	list__condense([I283Codes], Splits).
-bytecode_to_intlist(rl_PROC_expr(X0int32),	 Splits) :-
 	int16_to_bytecode(284, I284Codes),
-	int32_to_bytecode(X0int32, X0int32Codes),
-	list__condense([I284Codes,X0int32Codes], Splits).
-bytecode_to_intlist(rl_PROC_expr_frag(X0int32),	 Splits) :-
+	list__condense([I284Codes], Splits).
+bytecode_to_intlist(rl_PROC_expr(X0int32),	 Splits) :-
 	int16_to_bytecode(285, I285Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
 	list__condense([I285Codes,X0int32Codes], Splits).
-bytecode_to_intlist(rl_PROC_expr_end,	 Splits) :-
+bytecode_to_intlist(rl_PROC_expr_frag(X0int32),	 Splits) :-
 	int16_to_bytecode(286, I286Codes),
-	list__condense([I286Codes], Splits).
-bytecode_to_intlist(rl_PROC_expr_list_cons(X0int32),	 Splits) :-
+	int32_to_bytecode(X0int32, X0int32Codes),
+	list__condense([I286Codes,X0int32Codes], Splits).
+bytecode_to_intlist(rl_PROC_expr_end,	 Splits) :-
 	int16_to_bytecode(287, I287Codes),
+	list__condense([I287Codes], Splits).
+bytecode_to_intlist(rl_PROC_expr_list_cons(X0int32),	 Splits) :-
+	int16_to_bytecode(288, I288Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
-	list__condense([I287Codes,X0int32Codes], Splits).
+	list__condense([I288Codes,X0int32Codes], Splits).
 bytecode_to_intlist(rl_PROC_expr_list_nil,	 Splits) :-
-	int16_to_bytecode(288, I288Codes),
-	list__condense([I288Codes], Splits).
-bytecode_to_intlist(rl_PROC_bool_op_list_cons,	 Splits) :-
 	int16_to_bytecode(289, I289Codes),
 	list__condense([I289Codes], Splits).
-bytecode_to_intlist(rl_PROC_bool_op_list_nil,	 Splits) :-
+bytecode_to_intlist(rl_PROC_bool_op_list_cons,	 Splits) :-
 	int16_to_bytecode(290, I290Codes),
 	list__condense([I290Codes], Splits).
-bytecode_to_intlist(rl_PROC_int_list_cons(X0int32),	 Splits) :-
+bytecode_to_intlist(rl_PROC_bool_op_list_nil,	 Splits) :-
 	int16_to_bytecode(291, I291Codes),
+	list__condense([I291Codes], Splits).
+bytecode_to_intlist(rl_PROC_int_list_cons(X0int32),	 Splits) :-
+	int16_to_bytecode(292, I292Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
-	list__condense([I291Codes,X0int32Codes], Splits).
+	list__condense([I292Codes,X0int32Codes], Splits).
 bytecode_to_intlist(rl_PROC_int_list_nil,	 Splits) :-
-	int16_to_bytecode(292, I292Codes),
-	list__condense([I292Codes], Splits).
-bytecode_to_intlist(rl_PROC_ret,	 Splits) :-
 	int16_to_bytecode(293, I293Codes),
 	list__condense([I293Codes], Splits).
-bytecode_to_intlist(rl_PROC_join,	 Splits) :-
+bytecode_to_intlist(rl_PROC_ret,	 Splits) :-
 	int16_to_bytecode(294, I294Codes),
 	list__condense([I294Codes], Splits).
-bytecode_to_intlist(rl_PROC_join_nl,	 Splits) :-
+bytecode_to_intlist(rl_PROC_join,	 Splits) :-
 	int16_to_bytecode(295, I295Codes),
 	list__condense([I295Codes], Splits).
-bytecode_to_intlist(rl_PROC_join_sm,	 Splits) :-
+bytecode_to_intlist(rl_PROC_join_nl,	 Splits) :-
 	int16_to_bytecode(296, I296Codes),
 	list__condense([I296Codes], Splits).
-bytecode_to_intlist(rl_PROC_join_hj,	 Splits) :-
+bytecode_to_intlist(rl_PROC_join_sm,	 Splits) :-
 	int16_to_bytecode(297, I297Codes),
 	list__condense([I297Codes], Splits).
-bytecode_to_intlist(rl_PROC_join_index_simple,	 Splits) :-
+bytecode_to_intlist(rl_PROC_join_hj,	 Splits) :-
 	int16_to_bytecode(298, I298Codes),
 	list__condense([I298Codes], Splits).
-bytecode_to_intlist(rl_PROC_join_index_complex,	 Splits) :-
+bytecode_to_intlist(rl_PROC_join_index_simple,	 Splits) :-
 	int16_to_bytecode(299, I299Codes),
 	list__condense([I299Codes], Splits).
-bytecode_to_intlist(rl_PROC_join_cross,	 Splits) :-
+bytecode_to_intlist(rl_PROC_join_index_complex,	 Splits) :-
 	int16_to_bytecode(300, I300Codes),
 	list__condense([I300Codes], Splits).
-bytecode_to_intlist(rl_PROC_semijoin_nl,	 Splits) :-
+bytecode_to_intlist(rl_PROC_join_cross,	 Splits) :-
 	int16_to_bytecode(301, I301Codes),
 	list__condense([I301Codes], Splits).
-bytecode_to_intlist(rl_PROC_semijoin_sm,	 Splits) :-
+bytecode_to_intlist(rl_PROC_semijoin_nl,	 Splits) :-
 	int16_to_bytecode(302, I302Codes),
 	list__condense([I302Codes], Splits).
-bytecode_to_intlist(rl_PROC_semijoin_index,	 Splits) :-
+bytecode_to_intlist(rl_PROC_semijoin_sm,	 Splits) :-
 	int16_to_bytecode(303, I303Codes),
 	list__condense([I303Codes], Splits).
-bytecode_to_intlist(rl_PROC_subtract,	 Splits) :-
+bytecode_to_intlist(rl_PROC_semijoin_index,	 Splits) :-
 	int16_to_bytecode(304, I304Codes),
 	list__condense([I304Codes], Splits).
-bytecode_to_intlist(rl_PROC_subtract_nl,	 Splits) :-
+bytecode_to_intlist(rl_PROC_subtract,	 Splits) :-
 	int16_to_bytecode(305, I305Codes),
 	list__condense([I305Codes], Splits).
-bytecode_to_intlist(rl_PROC_subtract_sm,	 Splits) :-
+bytecode_to_intlist(rl_PROC_subtract_nl,	 Splits) :-
 	int16_to_bytecode(306, I306Codes),
 	list__condense([I306Codes], Splits).
-bytecode_to_intlist(rl_PROC_subtract_hj,	 Splits) :-
+bytecode_to_intlist(rl_PROC_subtract_sm,	 Splits) :-
 	int16_to_bytecode(307, I307Codes),
 	list__condense([I307Codes], Splits).
-bytecode_to_intlist(rl_PROC_subtract_index,	 Splits) :-
+bytecode_to_intlist(rl_PROC_subtract_hj,	 Splits) :-
 	int16_to_bytecode(308, I308Codes),
 	list__condense([I308Codes], Splits).
-bytecode_to_intlist(rl_PROC_subtract_cross,	 Splits) :-
+bytecode_to_intlist(rl_PROC_subtract_index,	 Splits) :-
 	int16_to_bytecode(309, I309Codes),
 	list__condense([I309Codes], Splits).
-bytecode_to_intlist(rl_PROC_difference,	 Splits) :-
+bytecode_to_intlist(rl_PROC_subtract_cross,	 Splits) :-
 	int16_to_bytecode(310, I310Codes),
 	list__condense([I310Codes], Splits).
-bytecode_to_intlist(rl_PROC_select,	 Splits) :-
+bytecode_to_intlist(rl_PROC_difference,	 Splits) :-
 	int16_to_bytecode(311, I311Codes),
 	list__condense([I311Codes], Splits).
-bytecode_to_intlist(rl_PROC_select_filter,	 Splits) :-
+bytecode_to_intlist(rl_PROC_select,	 Splits) :-
 	int16_to_bytecode(312, I312Codes),
 	list__condense([I312Codes], Splits).
-bytecode_to_intlist(rl_PROC_select_index,	 Splits) :-
+bytecode_to_intlist(rl_PROC_select_filter,	 Splits) :-
 	int16_to_bytecode(313, I313Codes),
 	list__condense([I313Codes], Splits).
-bytecode_to_intlist(rl_PROC_btree_scan,	 Splits) :-
+bytecode_to_intlist(rl_PROC_select_index,	 Splits) :-
 	int16_to_bytecode(314, I314Codes),
 	list__condense([I314Codes], Splits).
-bytecode_to_intlist(rl_PROC_project_tee,	 Splits) :-
+bytecode_to_intlist(rl_PROC_btree_scan,	 Splits) :-
 	int16_to_bytecode(315, I315Codes),
 	list__condense([I315Codes], Splits).
-bytecode_to_intlist(rl_PROC_sort(X0int32),	 Splits) :-
+bytecode_to_intlist(rl_PROC_project_tee,	 Splits) :-
 	int16_to_bytecode(316, I316Codes),
+	list__condense([I316Codes], Splits).
+bytecode_to_intlist(rl_PROC_sort(X0int32),	 Splits) :-
+	int16_to_bytecode(317, I317Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
-	list__condense([I316Codes,X0int32Codes], Splits).
+	list__condense([I317Codes,X0int32Codes], Splits).
 bytecode_to_intlist(rl_PROC_union,	 Splits) :-
-	int16_to_bytecode(317, I317Codes),
-	list__condense([I317Codes], Splits).
-bytecode_to_intlist(rl_PROC_union_sm,	 Splits) :-
 	int16_to_bytecode(318, I318Codes),
 	list__condense([I318Codes], Splits).
-bytecode_to_intlist(rl_PROC_uniondiff,	 Splits) :-
+bytecode_to_intlist(rl_PROC_union_sm,	 Splits) :-
 	int16_to_bytecode(319, I319Codes),
 	list__condense([I319Codes], Splits).
-bytecode_to_intlist(rl_PROC_uniondiff_sm,	 Splits) :-
+bytecode_to_intlist(rl_PROC_uniondiff,	 Splits) :-
 	int16_to_bytecode(320, I320Codes),
 	list__condense([I320Codes], Splits).
-bytecode_to_intlist(rl_PROC_uniondiff_btree,	 Splits) :-
+bytecode_to_intlist(rl_PROC_uniondiff_sm,	 Splits) :-
 	int16_to_bytecode(321, I321Codes),
 	list__condense([I321Codes], Splits).
-bytecode_to_intlist(rl_PROC_aggregate,	 Splits) :-
+bytecode_to_intlist(rl_PROC_uniondiff_btree,	 Splits) :-
 	int16_to_bytecode(322, I322Codes),
 	list__condense([I322Codes], Splits).
-bytecode_to_intlist(rl_PROC_aggregate_sm,	 Splits) :-
+bytecode_to_intlist(rl_PROC_aggregate,	 Splits) :-
 	int16_to_bytecode(323, I323Codes),
 	list__condense([I323Codes], Splits).
-bytecode_to_intlist(rl_PROC_insert_tuple_stream,	 Splits) :-
+bytecode_to_intlist(rl_PROC_aggregate_sm,	 Splits) :-
 	int16_to_bytecode(324, I324Codes),
 	list__condense([I324Codes], Splits).
-bytecode_to_intlist(rl_PROC_empty_stream(X0aString),	 Splits) :-
+bytecode_to_intlist(rl_PROC_insert_tuple_stream,	 Splits) :-
 	int16_to_bytecode(325, I325Codes),
+	list__condense([I325Codes], Splits).
+bytecode_to_intlist(rl_PROC_empty_stream(X0aString),	 Splits) :-
+	int16_to_bytecode(326, I326Codes),
 	int32_to_bytecode(X0aString, X0aStringCodes),
-	list__condense([I325Codes,X0aStringCodes], Splits).
+	list__condense([I326Codes,X0aStringCodes], Splits).
 bytecode_to_intlist(rl_PROC_hypothetical,	 Splits) :-
-	int16_to_bytecode(326, I326Codes),
-	list__condense([I326Codes], Splits).
-bytecode_to_intlist(rl_PROC_topdown,	 Splits) :-
 	int16_to_bytecode(327, I327Codes),
 	list__condense([I327Codes], Splits).
-bytecode_to_intlist(rl_PROC_last_bytecode,	 Splits) :-
+bytecode_to_intlist(rl_PROC_topdown,	 Splits) :-
 	int16_to_bytecode(328, I328Codes),
 	list__condense([I328Codes], Splits).
-bytecode_to_intlist(rl_HEAD_proc(X0aString,X1aString,X2aString,X3int32),	 Splits) :-
+bytecode_to_intlist(rl_PROC_last_bytecode,	 Splits) :-
 	int16_to_bytecode(329, I329Codes),
+	list__condense([I329Codes], Splits).
+bytecode_to_intlist(rl_HEAD_proc(X0aString,X1aString,X2aString,X3int32),	 Splits) :-
+	int16_to_bytecode(330, I330Codes),
 	int32_to_bytecode(X0aString, X0aStringCodes),
 	int32_to_bytecode(X1aString, X1aStringCodes),
 	int32_to_bytecode(X2aString, X2aStringCodes),
 	int32_to_bytecode(X3int32, X3int32Codes),
-	list__condense([I329Codes,X0aStringCodes,X1aStringCodes,X2aStringCodes,X3int32Codes], Splits).
+	list__condense([I330Codes,X0aStringCodes,X1aStringCodes,X2aStringCodes,X3int32Codes], Splits).
 bytecode_to_intlist(rl_HEAD_proc_end,	 Splits) :-
-	int16_to_bytecode(330, I330Codes),
-	list__condense([I330Codes], Splits).
-bytecode_to_intlist(rl_HEAD_const_int(X0int32,X1aInt),	 Splits) :-
 	int16_to_bytecode(331, I331Codes),
+	list__condense([I331Codes], Splits).
+bytecode_to_intlist(rl_HEAD_const_int(X0int32,X1aInt),	 Splits) :-
+	int16_to_bytecode(332, I332Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
 	aInt_to_bytecode(X1aInt, X1aIntCodes),
-	list__condense([I331Codes,X0int32Codes,X1aIntCodes], Splits).
+	list__condense([I332Codes,X0int32Codes,X1aIntCodes], Splits).
 bytecode_to_intlist(rl_HEAD_const_flt(X0int32,X1aDouble),	 Splits) :-
-	int16_to_bytecode(332, I332Codes),
+	int16_to_bytecode(333, I333Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
 	aDouble_to_bytecode(X1aDouble, X1aDoubleCodes),
-	list__condense([I332Codes,X0int32Codes,X1aDoubleCodes], Splits).
+	list__condense([I333Codes,X0int32Codes,X1aDoubleCodes], Splits).
 bytecode_to_intlist(rl_HEAD_const_str(X0int32,X1aString),	 Splits) :-
-	int16_to_bytecode(333, I333Codes),
+	int16_to_bytecode(334, I334Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
 	aString_to_bytecode(X1aString, X1aStringCodes),
-	list__condense([I333Codes,X0int32Codes,X1aStringCodes], Splits).
+	list__condense([I334Codes,X0int32Codes,X1aStringCodes], Splits).
 bytecode_to_intlist(rl_HEAD_var_int(X0int32),	 Splits) :-
-	int16_to_bytecode(334, I334Codes),
-	int32_to_bytecode(X0int32, X0int32Codes),
-	list__condense([I334Codes,X0int32Codes], Splits).
-bytecode_to_intlist(rl_HEAD_var_flt(X0int32),	 Splits) :-
 	int16_to_bytecode(335, I335Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
 	list__condense([I335Codes,X0int32Codes], Splits).
-bytecode_to_intlist(rl_HEAD_var_str(X0int32),	 Splits) :-
+bytecode_to_intlist(rl_HEAD_var_flt(X0int32),	 Splits) :-
 	int16_to_bytecode(336, I336Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
 	list__condense([I336Codes,X0int32Codes], Splits).
-bytecode_to_intlist(rl_HEAD_var_term(X0int32),	 Splits) :-
+bytecode_to_intlist(rl_HEAD_var_str(X0int32),	 Splits) :-
 	int16_to_bytecode(337, I337Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
 	list__condense([I337Codes,X0int32Codes], Splits).
-bytecode_to_intlist(rl_HEAD_var_stream(X0int32),	 Splits) :-
+bytecode_to_intlist(rl_HEAD_var_term(X0int32),	 Splits) :-
 	int16_to_bytecode(338, I338Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
 	list__condense([I338Codes,X0int32Codes], Splits).
-bytecode_to_intlist(rl_HEAD_define_rule(X0int32,X1aString,X2aString),	 Splits) :-
+bytecode_to_intlist(rl_HEAD_var_stream(X0int32),	 Splits) :-
 	int16_to_bytecode(339, I339Codes),
 	int32_to_bytecode(X0int32, X0int32Codes),
+	list__condense([I339Codes,X0int32Codes], Splits).
+bytecode_to_intlist(rl_HEAD_define_rule(X0int32,X1aString,X2aString),	 Splits) :-
+	int16_to_bytecode(340, I340Codes),
+	int32_to_bytecode(X0int32, X0int32Codes),
 	int32_to_bytecode(X1aString, X1aStringCodes),
 	int32_to_bytecode(X2aString, X2aStringCodes),
-	list__condense([I339Codes,X0int32Codes,X1aStringCodes,X2aStringCodes], Splits).
+	list__condense([I340Codes,X0int32Codes,X1aStringCodes,X2aStringCodes], Splits).
 bytecode_to_intlist(rl_HEAD_last_bytecode,	 Splits) :-
-	int16_to_bytecode(340, I340Codes),
-	list__condense([I340Codes], Splits).
+	int16_to_bytecode(341, I341Codes),
+	list__condense([I341Codes], Splits).
 
 int32_to_bytecode(X, List) :-
 	int32_to_byte_list(X, List).
@@ -1671,4 +1676,4 @@
 	int_to_byte_list(X, List).
 
 
-rl_code__version(1, 20).
+rl_code__version(1, 21).
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list