Beispiel #1
0
 // method call:
 public TotemOverloadResolver(TotemBinder binder, IList<DynamicMetaObject> args, CallSignature signature, CallTypes callType, Expression codeContext)
     : base(binder, args, signature, callType)
 {
     Assert.NotNull(codeContext);
     _context = codeContext;
 }
Beispiel #2
0
 public TotemOverloadResolverFactory(TotemBinder binder, Expression/*!*/ codeContext)
 {
     Assert.NotNull(binder, codeContext);
     _binder = binder;
     _codeContext = codeContext;
 }
Beispiel #3
0
 // method call:
 public TotemOverloadResolver(TotemBinder binder, IList<DynamicMetaObject> args, CallSignature signature, Expression codeContext)
     : this(binder, args, signature, CallTypes.None, codeContext)
 {
 }
Beispiel #4
0
        public TotemContext(ScriptDomainManager manager, IDictionary<string, object> options)
            : base(manager)
        {
            _options = new TotemOptions(options);
            _builtinModulesDict = CreateBuiltinTable();

            TotemDictionary defaultScope = new TotemDictionary();
            ModuleContext moduleContext = new ModuleContext(defaultScope, this);
            _defaultContext = moduleContext.GlobalContext;


            TotemBinder binder = new TotemBinder(this, _defaultContext);
            _sharedOverloadResolverFactory = new TotemOverloadResolverFactory(binder, Expression.Constant(_defaultContext));
            _binder = binder;

            if (DefaultContext._default == null)
            {
                DefaultContext.InitializeDefaults(_defaultContext);
            }

            RecursionLimit = _options.RecursionLimit;

            InitializeBuiltins();
        }