Skip to content

Commit

Permalink
Убрана команда CmdiProfileFunction (#46)
Browse files Browse the repository at this point in the history
Запуск профилировщика осуществляется явно в функции refalrts::RASLFunction::run,
так время выполнения показывается точнее.
  • Loading branch information
Mazdaywik committed Aug 12, 2016
1 parent d5c16ab commit 47f0855
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
4 changes: 0 additions & 4 deletions src/compiler/Generator.sref
Original file line number Diff line number Diff line change
Expand Up @@ -627,10 +627,6 @@ GenCommand {
(e.Indent ' {refalrts::icEnd, 0, 0, 0}')
(e.Indent '};');

(e.Indent) (#CmdiProfileFunction) =
(e.Indent)
(e.Indent '{refalrts::icProfileFunction, 0, 0, 0},');

(e.Indent) (#CmdiIssueMem s.Memory) =
(e.Indent)
(e.Indent '{refalrts::icIssueMemory, ' <StrFromInt s.Memory> ', 0, 0},');
Expand Down
4 changes: 1 addition & 3 deletions src/compiler/LowLevelRASL.sref
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ $ENTRY LowLevelRASL {
)
<Function
s.GenMode s.ScopeClass (e.Name)
(#CmdProfileFunction)
<AddSavers e.Commands>
>;

Expand Down Expand Up @@ -572,8 +571,6 @@ DoLength {
ConvertOneInterpretCommand {
(#CmdComment e.Text) = (#CmdComment e.Text);

(#CmdProfileFunction) = (#CmdiProfileFunction);

(#CmdIssueMem s.Memory) = (#CmdiIssueMem s.Memory);

(#CmdiOnFailGoTo s.Offset) = (#CmdiOnFailGoTo s.Offset);
Expand Down Expand Up @@ -1040,6 +1037,7 @@ PrepareOpenEStack {
Function-Direct {
s.ScopeClass (e.Name) e.Body =
(#CmdFnStart e.Name)
(#CmdProfileFunction)
<Function-DirectRec e.Body>
(#CmdFnEnd)
<InUnnamedNamespace s.ScopeClass (#CmdFuncDescr e.Name)>;
Expand Down
5 changes: 1 addition & 4 deletions src/srlib/refalrts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2911,6 +2911,7 @@ void refalrts::vm::free_view_field() {
refalrts::FnResult refalrts::RASLFunction::run(
refalrts::Iter begin, refalrts::Iter end
) {
this_is_generated_function();
Iter info_b = 0;
Iter info_e = 0;
Iter func_name = call_left(info_b, info_e, begin, end);
Expand Down Expand Up @@ -2955,10 +2956,6 @@ refalrts::FnResult refalrts::RASLFunction::run(

switch(raa[i].cmd)
{
case icProfileFunction:
this_is_generated_function();
break;

case icIssueMemory:
context.reserve(raa[i].val1);
break;
Expand Down
1 change: 0 additions & 1 deletion src/srlib/refalrts.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ struct Node {
};

enum iCmd {
icProfileFunction,
icIssueMemory,
icReserveBacktrackStack,
icOnFailGoTo,
Expand Down

0 comments on commit 47f0855

Please sign in to comment.