예제 #1
0
        public static void InitializeModuleFieldBoxed(CodeContext context, object name, ref ModuleGlobalWrapper wrapper)
        {
            var s = (SymbolId)name;
            ModuleGlobalCache mgc = context.LanguageContext.GetModuleCache(s);

            wrapper = new ModuleGlobalWrapper(context, mgc, s);
        }
예제 #2
0
        protected internal override bool TryGetExtraValue(SymbolId key, out object value)
        {
            if (base.TryGetExtraValue(key, out value))
            {
                ModuleGlobalWrapper wrapper = value as ModuleGlobalWrapper;
                Debug.Assert(wrapper != null);

                if (wrapper.RawValue != Uninitialized.Instance)
                {
                    value = wrapper.RawValue;
                    return(true);
                }
            }
            return(false);
        }
예제 #3
0
        protected internal override bool TrySetExtraValue(SymbolId key, object value)
        {
            object prevVal;

            if (base.TryGetExtraValue(key, out prevVal))
            {
                ModuleGlobalWrapper wrapper = prevVal as ModuleGlobalWrapper;

                Debug.Assert(wrapper != null);

                wrapper.CurrentValue = value;

                return(true);
            }
            return(false);
        }
예제 #4
0
        public static void InitializeModuleField(CodeContext context, SymbolId name, ref ModuleGlobalWrapper wrapper)
        {
            ModuleGlobalCache mgc = context.LanguageContext.GetModuleCache(name);

            wrapper = new ModuleGlobalWrapper(context, mgc, name);
        }
예제 #5
0
 public static void SetValue(object value, ModuleGlobalWrapper wrapper)
 {
     wrapper.CurrentValue = value;
 }
예제 #6
0
 public static void SetValue(object value, ModuleGlobalWrapper wrapper)
 {
   wrapper.CurrentValue = value;
 }