Branch: Tag:

1999-10-22

1999-10-22 02:35:57 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

more and better DMALLOC

Rev: bin/test_pike.pike:1.29
Rev: src/builtin_functions.c:1.192
Rev: src/object.c:1.85
Rev: src/object.h:1.31
Rev: src/pike_memory.c:1.48

1:   #!/usr/local/bin/pike    - /* $Id: test_pike.pike,v 1.28 1999/10/21 21:19:12 grubba Exp $ */ + /* $Id: test_pike.pike,v 1.29 1999/10/22 02:35:41 hubbe Exp $ */      import Stdio;    - #if !efun(_verify_internals) + #if !constant(_verify_internals)   #define _verify_internals()   #endif    -  + #if !constant(_dmalloc_set_name) + void _dmalloc_set_name(mixed ... args) {} + #endif +    int foo(string opt)   {    if(opt=="" || !opt) return 1;
228:    switch(type)    {    case "COMPILE": +  _dmalloc_set_name(fname,0);    if(catch(compile_string(test + widener, fname)))    { -  +  _dmalloc_set_name();    werror(fname + " failed.\n");    bzot(test);    errors++;    }else{ -  +  _dmalloc_set_name();    successes++;    }    break;       case "COMPILE_ERROR":    master()->set_inhibit_compile_errors(1); -  +  _dmalloc_set_name(fname,0);    if(catch(compile_string(test + widener, fname)))    { -  +  _dmalloc_set_name();    successes++;    }else{ -  +  _dmalloc_set_name();    werror(fname + " failed.\n");    bzot(test);    errors++;
253:       case "EVAL_ERROR":    master()->set_inhibit_compile_errors(1); +  _dmalloc_set_name(fname,0);    if(catch(clone(compile_string(test + widener, fname))->a()))    { -  +  _dmalloc_set_name();    successes++;    }else{ -  +  _dmalloc_set_name();    werror(fname + " failed.\n");    bzot(test);    errors++;
267:    default:    mixed err;    if (err = catch{ +  _dmalloc_set_name(fname,0);    o=clone(compile_string(test + widener,fname)); -  +  _dmalloc_set_name();       if(check > 1) _verify_internals();       a=b=0;    if(t) trace(t); -  +  _dmalloc_set_name(fname,1);    if(functionp(o->a)) a=o->a();    if(functionp(o->b)) b=o->b(); -  +  _dmalloc_set_name(); +     if(t) trace(0);    if(check > 1) _verify_internals();    }) {