From ed86dee65d5f19ff7a38ff9621b33a24475064e5 Mon Sep 17 00:00:00 2001 From: steve Date: Mon, 30 Jul 2001 03:53:01 +0000 Subject: [PATCH] Initialize initial functor tables. --- vvp/compile.cc | 7 ++++++- vvp/functor.cc | 9 ++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/vvp/compile.cc b/vvp/compile.cc index 986d4fa43..c70aa4919 100644 --- a/vvp/compile.cc +++ b/vvp/compile.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: compile.cc,v 1.91 2001/07/28 03:12:39 steve Exp $" +#ident "$Id: compile.cc,v 1.92 2001/07/30 03:53:01 steve Exp $" #endif # include "arith.h" @@ -931,6 +931,7 @@ void compile_event_or(char*label, unsigned argc, struct symb_s*argv) obj->event = new struct vvp_event_s; obj->event->threads = 0; obj->event->ival = obj->ival; + obj->event->vvp_edge_tab = 0; /* Link the outputs of the named events to me. */ @@ -943,6 +944,7 @@ void compile_event_or(char*label, unsigned argc, struct symb_s*argv) tmp = ipoint_index(tmp, argv[idx].idx); functor_t fport = functor_index(tmp); + assert(fport); assert(fport->out == 0); fport->out = fdx; @@ -1565,6 +1567,9 @@ vvp_ipoint_t debug_lookup_functor(const char*name) /* * $Log: compile.cc,v $ + * Revision 1.92 2001/07/30 03:53:01 steve + * Initialize initial functor tables. + * * Revision 1.91 2001/07/28 03:12:39 steve * Support C and C special symbols. * diff --git a/vvp/functor.cc b/vvp/functor.cc index 11f2e89f9..635b2b443 100644 --- a/vvp/functor.cc +++ b/vvp/functor.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: functor.cc,v 1.24 2001/07/16 18:06:01 steve Exp $" +#ident "$Id: functor.cc,v 1.25 2001/07/30 03:53:01 steve Exp $" #endif # include "functor.h" @@ -69,7 +69,11 @@ static struct functor_index1*functor_table[functor_index2_size] = { 0 }; void functor_init(void) { functor_table[0] = new struct functor_index1; + memset(functor_table[0], 0, sizeof(struct functor_index1)); + functor_table[0]->table[0] = new struct functor_index0; + memset(functor_table[0]->table[0], 0, sizeof(struct functor_index0)); + functor_count = 1; } @@ -371,6 +375,9 @@ const unsigned char ft_var[16] = { /* * $Log: functor.cc,v $ + * Revision 1.25 2001/07/30 03:53:01 steve + * Initialize initial functor tables. + * * Revision 1.24 2001/07/16 18:06:01 steve * Initialize allocated functors (Stephan Boettcher) *