Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[omr-dev] How to avoid OMR compiler static instance

Hi,

I was wondering if the singleton instance of OMR can be avoided. I
would like to understand the reasons for this.

For example: in compiler/env/JitConfig.cpp:

TR::JitConfig *
TR::JitConfig::instance()
   {
   return OMR::FrontEnd::singleton().jitConfig();
   }


And in compiler/infra/OMRMonitorTable.cpp:

// singleton
class OMR_EXTENSIBLE MonitorTable
   {
   public:

   static TR::MonitorTable *get() { return _instance; }

   protected:

   static TR::MonitorTable *_instance;


Are there issues I need to be aware of if I wanted to change this?

Thanks and Regards
Dibyendu


Back to the top