Microsoft.JScript.FunctionObject.FunctionObject C# (CSharp) Method

FunctionObject() private method

private FunctionObject ( String name, ParameterDeclaration parameter_declarations, TypeExpression return_type_expr, Block body, FunctionScope own_scope, ScriptObject enclosing_scope, Context funcContext, MethodAttributes attributes, CustomAttributeList customAttributes, bool isMethod ) : Microsoft.JScript.Vsa
name String
parameter_declarations ParameterDeclaration
return_type_expr TypeExpression
body Block
own_scope FunctionScope
enclosing_scope ScriptObject
funcContext Context
attributes MethodAttributes
customAttributes CustomAttributeList
isMethod bool
return Microsoft.JScript.Vsa
      internal FunctionObject(String name, ParameterDeclaration[] parameter_declarations, TypeExpression return_type_expr, Block body, FunctionScope own_scope, 
        ScriptObject enclosing_scope, Context funcContext, MethodAttributes attributes, CustomAttributeList customAttributes, bool isMethod)
        : base(body.Globals.globalObject.originalFunction.originalPrototype, name, parameter_declarations.Length) {
        this.parameter_declarations = parameter_declarations;
        int n = parameter_declarations.Length;
        this.formal_parameters = new String[n];
        for (int i = 0; i < n; i++)
          this.formal_parameters[i] = parameter_declarations[i].identifier;
        this.argumentsSlotNumber = 0;
        this.return_type_expr = return_type_expr;
        if (this.return_type_expr != null)
          own_scope.AddReturnValueField();
        this.body = body;
        this.method = null;
        this.parameterInfos = null;
        this.funcContext = funcContext;
        this.own_scope = own_scope;
        this.own_scope.owner = this;
        if ((!(enclosing_scope is ActivationObject) || !((ActivationObject)(enclosing_scope)).fast) && !isMethod){
          this.argumentsSlotNumber = this.own_scope.GetNextSlotNumber();
          JSLocalField argsf = (JSLocalField)this.own_scope.AddNewField("arguments", null, (FieldAttributes)0);
          argsf.type = new TypeExpression(new ConstantWrapper(Typeob.Object, funcContext));
          argsf.isDefined = true;
          this.hasArgumentsObject = true;
        }else
          this.hasArgumentsObject = false;
        this.implementedIface = null;
        this.implementedIfaceMethod = null;
        this.isMethod = isMethod;
        this.isExpandoMethod = customAttributes == null ? false : customAttributes.ContainsExpandoAttribute();
        this.isStatic = this.own_scope.isStatic = (attributes&MethodAttributes.Static) != (MethodAttributes)0;
        this.suppressIL = false;
        this.noVersionSafeAttributeSpecified = true; // PartiallyEvaluate may change this value
        this.fields = this.own_scope.GetLocalFields();
        this.enclosing_scope = enclosing_scope;
        this.must_save_stack_locals = false; //This is set to true, if need be by PartiallyEvaluate.
        this.text = null;
        this.mb = null;
        this.cb = null;
        this.attributes = attributes;
        if (!this.isStatic) this.attributes |= MethodAttributes.HideBySig;
        this.globals = body.Globals;
        this.superConstructor = null;
        this.superConstructorCall = null;
        this.customAttributes = customAttributes;
        this.noExpando = false;
        this.clsCompliance = CLSComplianceSpec.NotAttributed;
        this.engineLocal = null;
        this.partiallyEvaluated = false;
      }
      

Same methods

FunctionObject::FunctionObject ( String name, ParameterDeclaration parameter_declarations, TypeExpression return_type_expr, Block body, FunctionScope own_scope, ScriptObject enclosing_scope, Context funcContext, MethodAttributes attributes ) : Microsoft.JScript.Vsa
FunctionObject::FunctionObject ( Type t, String name, String method_name, String formal_parameters, JSLocalField fields, bool must_save_stack_locals, bool hasArgumentsObject, String text, VsaEngine engine ) : Microsoft.JScript.Vsa