This is the mail archive of the
frysk@sourceware.org
mailing list for the frysk project.
Re: frysk.rt.Frame and frysk.debuginfo.DebugInfo
- From: Sami Wagiaalla <swagiaal at redhat dot com>
- To: Stan Cox <scox at redhat dot com>
- Cc: Nurdin Premji <npremji at redhat dot com>, Frysk List <frysk at sourceware dot org>
- Date: Thu, 07 Jun 2007 09:29:52 -0400
- Subject: Re: frysk.rt.Frame and frysk.debuginfo.DebugInfo
- References: <1181166384.3102.313.camel@multics.rdu.redhat.com>
So we need to come up with a
way to have a single shared DebugInfo.
Factories are a common way of solving this problem. Make the constructor
of DebugInfo private and DebugInfo objects can only be created through a
DebugInfoFactory which keeps a cache of DebugInfo objects.
DebugInfoFactory would take a frame, check the cache and return a
DebugInfo object.
This by the way also solves the antlr problem. If there is a DebugInfo
object per frame, then antlr objects called from within that DebugInfo
object are only concered with that objects Frame.
Sami Wagiaalla