public CallInfo(UserFunctionValue funcValue, EnvironmentRecord environment, AnalysisUnit outerUnit, CallArgs args)
 {
     ReturnValue  = new VariableDef();
     AnalysisUnit = new CartesianProductFunctionAnalysisUnit(
         funcValue,
         environment,
         outerUnit,
         args,
         ReturnValue
         );
 }
Example #2
0
        public override void SetMember(Parsing.Node node, AnalysisUnit unit, string name, IAnalysisSet value)
        {
            foreach (var obj in value)
            {
                // function Class() {
                //     this.abc = 42;
                // }
                //
                // Class.prototype.foo = function(fn) {
                //     var x = this.abc;
                // }
                // this now includes us.

                UserFunctionValue userFunc = obj.Value as UserFunctionValue;
                if (userFunc != null)
                {
                    var env = (FunctionEnvironmentRecord)(userFunc.AnalysisUnit._env);

                    env._this.AddTypes(unit, _function._instance.SelfSet, declaringScope: DeclaringModule);
                }
            }
            base.SetMember(node, unit, name, value);
        }
Example #3
0
 public ArgumentsValue(UserFunctionValue function)
     : base(function.ProjectEntry)
 {
     _function = function;
 }