namespace Microsoft.JScript {
- public class FunctionObject : ScriptFunction {
+ public class FunctionObject : ScriptFunction, ICanModifyContext {
internal string type_annot;
internal Block body;
internal FunctionObject (string name)
{
- this._prototype = ObjectPrototype.Proto;
+ this._prototype = ObjectConstructor.Ctr.ConstructObject ();
this.name = name;
}
internal FunctionObject (MethodInfo info)
{
- this._prototype = ObjectPrototype.Proto;
+ this._prototype = ObjectConstructor.Ctr.ConstructObject ();
this.method = info;
this.name = info.Name;
this.attr = info.Attributes;
internal FunctionObject (string name, FormalParameterList p, string ret_type, Block body, Location location)
{
- this._prototype = ObjectPrototype.Proto;
+ this._prototype = ObjectConstructor.Ctr.ConstructObject ();
//
// FIXME
// 1) Must collect the attributes given.
return types;
}
}
+
+ void ICanModifyContext.PopulateContext (Environment env, string ns)
+ {
+ ((ICanModifyContext) body).PopulateContext (env, ns);
+ }
+
+ void ICanModifyContext.EmitDecls (EmitContext ec)
+ {
+ ((ICanModifyContext) body).EmitDecls (ec);
+ }
}
}