Commit ca5850bb authored by John van Groningen's avatar John van Groningen
Browse files

improve names used by the time profiler for functions generated for

case, if and lambda expressions
parent cff24fe0
......@@ -393,18 +393,18 @@ void PrintSymbolOfIdent (Ident sid, unsigned line_nr, File file)
if (line_nr > 0){
FPrintF (file, " [line: %u]", line_nr);
if (*end_name == '\0')
return;
} else {
FPutC (cTypeDelimiter, file);
PrintName (next_char, end_name, line_nr, file);
if (*end_name == '\0')
return;
}
if (*end_name == '\0')
return;
# ifdef CLEAN2
next_char = end_name;
# else
next_char = end_name + 1;
# endif
} else
FPutC (cTypeDelimiter, file);
......
......@@ -673,7 +673,7 @@ static void CodeRule (ImpRuleP rule)
GenFunctionDescriptorAndExportNodeAndDescriptor (rule_sdef);
if (DoTimeProfiling)
GenPB (rule_sdef->sdef_ident->ident_name);
GenPB_ident (rule_sdef->sdef_ident,rule_sdef->sdef_line);
if (rule_sdef->sdef_exported && rule_sdef->sdef_calledwithrootnode && ExpectsResultNode (resultstate))
MakeSymbolLabel (&ea_lab,CurrentModule,ea_pref,rule_sdef,0);
......
......@@ -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);
......
......@@ -87,8 +87,9 @@ void GenPushA (int offset);
void GenPushB (int offset);
void GenJsrEval (int offset);
void GenJsrAp (int n_args);
void GenJmpEval (void);
void GenJmpAp (int n_args);
void GenPopA (int nr);
void GenPopB (int nr);
......@@ -157,6 +158,7 @@ void GenOStackLayout (int asize,int bsize,Args fun_args);
void GenNodeEntryDirective (int arity,Label label,Label label2);
void GenNodeEntryDirectiveForLabelWithoutSymbol (int arity,Label label,Label label2);
void GenNodeEntryDirectiveUnboxed (int a_size,int b_size,Label label,Label label2);
void GenApplyEntryDirective (int arity,Label label);
void GenLazyRecordNodeEntryDirective (int arity,Label label);
void GenFieldNodeEntryDirective (int arity, Label label, Label label2,char *record_name);
void GenConstructorDescriptorAndExport (SymbDef sdef);
......@@ -213,6 +215,7 @@ void GenFillCaf (Label label,int a_stack_size,int b_stack_size);
void GenCaf (Label label,int a_stack_size,int b_stack_size);
void GenPB (char *function_name);
void GenPB_ident (IdentP ident,unsigned int line_n);
void GenPB_with_line_number (char *function_name,int line_number);
void GenPD (void);
void GenPN (void);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment