Branch: Tag:

1998-03-18

1998-03-18 20:22:32 by Per Hedbor <ph@opera.com>

Added support for profiling, and fixed typo in threads.c

Rev: src/builtin_functions.c:1.84
Rev: src/interpret.c:1.70
Rev: src/program.c:1.66
Rev: src/program.h:1.34
Rev: src/threads.c:1.60

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: program.c,v 1.65 1998/03/01 11:40:47 hubbe Exp $"); + RCSID("$Id: program.c,v 1.66 1998/03/18 20:22:31 per Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
1242: Inside #if defined(PROFILING)
   dummy.func.offset=offset;   #ifdef PROFILING    dummy.num_calls=0; +  dummy.total_time=0;   #endif       ref.id_flags=flags;
1418:    ref.identifier_offset=new_program->num_identifiers;    ref.inherit_offset=0;    - #ifdef PROFILEING + #ifdef PROFILING    dummy.num_calls=0; -  +  dummy.total_time=0;   #endif       add_to_identifiers(dummy);
1550:    struct reference ref;    INT32 i;    + #ifdef PROFILING +  fun.num_calls=0; +  fun.total_time=0; + #endif +     i=isidentifier(name);       if(i >= 0)
1635:    fun.func.offset = -1;       i=new_program->num_identifiers; - #ifdef PROFILING -  fun.num_calls = 0; - #endif /* PROFILING */ +        add_to_identifiers(fun);