aboutsummaryrefslogtreecommitdiff
path: root/backendC/CleanCompilerSources/instructions.c
diff options
context:
space:
mode:
authorjohnvg2005-01-12 16:17:59 +0000
committerjohnvg2005-01-12 16:17:59 +0000
commit0174e68d1aef9cd1bb36a46df205cdf1f1645576 (patch)
tree1bdc16f4b31f55cb443fbb9035e57092ad1249e9 /backendC/CleanCompilerSources/instructions.c
parentchanged version number and name of university (diff)
improve names used by the time profiler for functions generated for
case, if and lambda expressions git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1505 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'backendC/CleanCompilerSources/instructions.c')
-rw-r--r--backendC/CleanCompilerSources/instructions.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/backendC/CleanCompilerSources/instructions.c b/backendC/CleanCompilerSources/instructions.c
index 9ed5958..b2bb6ba 100644
--- a/backendC/CleanCompilerSources/instructions.c
+++ b/backendC/CleanCompilerSources/instructions.c
@@ -607,6 +607,7 @@ enum {
#define Ipush_b "push_b"
#define Ijsr_eval "jsr_eval"
+#define Ijsr_ap "jsr_ap"
#define Ipop_a "pop_a"
#define Ipop_b "pop_b"
@@ -638,6 +639,7 @@ enum {
#define Ijmp_eval "jmp_eval"
#define Ijmp_eval_upd "jmp_eval_upd"
+#define Ijmp_ap "jmp_ap"
#define Ihalt "halt"
@@ -668,6 +670,7 @@ static void put_instruction_code (int instruction_code)
FPutC (instruction_code,OutFile);
}
+#define Da "a"
#define Dkeep "keep"
#define Dd "d"
#define Do "o"
@@ -2188,11 +2191,23 @@ void GenJsrEval (int offset)
put_arguments_n_b (offset);
}
+void GenJsrAp (int n_args)
+{
+ put_instruction_b (jsr_ap);
+ put_arguments_n_b (n_args);
+}
+
void GenJmpEval (void)
{
put_instruction (Ijmp_eval);
}
+void GenJmpAp (int n_args)
+{
+ put_instruction_b (jmp_ap);
+ put_arguments_n_b (n_args);
+}
+
void GenPopA (int nr)
{
if (nr > 0){
@@ -2633,6 +2648,13 @@ void GenNodeEntryDirective (int arity,Label label,Label label2)
}
}
+void GenApplyEntryDirective (int arity,Label label)
+{
+ put_directive_b (a);
+ put_arguments_n__b (arity);
+ GenLabel (label);
+}
+
void GenLazyRecordNodeEntryDirective (int arity,Label label)
{
if (DoStackLayout){
@@ -3667,6 +3689,14 @@ void GenPB (char *function_name)
FPrintF (OutFile,"\"%s\"",function_name);
}
+void GenPB_ident (IdentP ident,unsigned int line_n)
+{
+ put_directive_ (Dpb);
+ PutCOutFile ('\"');
+ PrintSymbolOfIdent (ident,line_n,OutFile);
+ PutCOutFile ('\"');
+}
+
void GenPB_with_line_number (char *function_name,int line_number)
{
put_directive_ (Dpb);