dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/JScript/Builtins ArrayPrototype.cs,1


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/JScript/Builtins ArrayPrototype.cs,1.1,1.2 FunctionConstructor.cs,1.1,1.2 FunctionPrototype.cs,1.1,1.2 GlobalObject.cs,1.1,1.2 ObjectConstructor.cs,1.1,1.2 ObjectPrototype.cs,1.1,1.2
Date: Tue, 14 Jan 2003 05:36:21 -0500

Update of /cvsroot/dotgnu-pnet/pnetlib/JScript/Builtins
In directory subversions:/tmp/cvs-serv25859/JScript/Builtins

Modified Files:
        ArrayPrototype.cs FunctionConstructor.cs FunctionPrototype.cs 
        GlobalObject.cs ObjectConstructor.cs ObjectPrototype.cs 
Log Message:


Bring the names of builtin properties and functions into alignment with
the names in ECMA-262.


Index: ArrayPrototype.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/JScript/Builtins/ArrayPrototype.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** ArrayPrototype.cs   13 Jan 2003 10:53:19 -0000      1.1
--- ArrayPrototype.cs   14 Jan 2003 10:35:49 -0000      1.2
***************
*** 33,38 ****
                        {
                                // Add the builtin "Array" properties to the 
prototype.
!                               SetProperty("constructor", 
inst.GetArrayConstructor(),
!                                                       
PropertyAttributes.None);
                                AddBuiltin(inst, "concat");
                                AddBuiltin(inst, "join");
--- 33,37 ----
                        {
                                // Add the builtin "Array" properties to the 
prototype.
!                               Put("constructor", inst.GetArrayConstructor());
                                AddBuiltin(inst, "concat");
                                AddBuiltin(inst, "join");
***************
*** 211,226 ****
                        {
                                constructor = inst.GetArrayConstructor();
!                               concat = GetProperty("concat");
!                               join = GetProperty("join");
!                               pop = GetProperty("pop");
!                               push = GetProperty("push");
!                               reverse = GetProperty("reverse");
!                               shift = GetProperty("shift");
!                               slice = GetProperty("slice");
!                               sort = GetProperty("sort");
!                               splice = GetProperty("splice");
!                               toLocaleString = GetProperty("toLocaleString");
!                               toString = GetProperty("toString");
!                               unshift = GetProperty("unshift");
                        }
  
--- 210,225 ----
                        {
                                constructor = inst.GetArrayConstructor();
!                               concat = Get("concat");
!                               join = Get("join");
!                               pop = Get("pop");
!                               push = Get("push");
!                               reverse = Get("reverse");
!                               shift = Get("shift");
!                               slice = Get("slice");
!                               sort = Get("sort");
!                               splice = Get("splice");
!                               toLocaleString = Get("toLocaleString");
!                               toString = Get("toString");
!                               unshift = Get("unshift");
                        }
  

Index: FunctionConstructor.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/JScript/Builtins/FunctionConstructor.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** FunctionConstructor.cs      13 Jan 2003 10:53:19 -0000      1.1
--- FunctionConstructor.cs      14 Jan 2003 10:35:49 -0000      1.2
***************
*** 43,50 ****
                                        EngineInstance.GetEngineInstance(engine)
                                                .GetObjectPrototype();
!                               SetProperty("prototype", prototype,
!                                                   PropertyAttributes.ReadOnly 
|
!                                                       
PropertyAttributes.DontEnum |
!                                                       
PropertyAttributes.DontDelete);
                        }
  
--- 43,50 ----
                                        EngineInstance.GetEngineInstance(engine)
                                                .GetObjectPrototype();
!                               Put("prototype", prototype,
!                                   PropertyAttributes.ReadOnly |
!                                       PropertyAttributes.DontEnum |
!                                       PropertyAttributes.DontDelete);
                        }
  

Index: FunctionPrototype.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/JScript/Builtins/FunctionPrototype.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** FunctionPrototype.cs        13 Jan 2003 10:53:19 -0000      1.1
--- FunctionPrototype.cs        14 Jan 2003 10:35:49 -0000      1.2
***************
*** 40,45 ****
                                // Add the builtin "Function" properties to the 
prototype.
                                EngineInstance inst = 
EngineInstance.GetEngineInstance(engine);
!                               SetProperty("constructor", 
inst.GetFunctionConstructor(),
!                                                       
PropertyAttributes.None);
                                AddBuiltin(inst, "apply");
                                AddBuiltin(inst, "call");
--- 40,44 ----
                                // Add the builtin "Function" properties to the 
prototype.
                                EngineInstance inst = 
EngineInstance.GetEngineInstance(engine);
!                               Put("constructor", 
inst.GetFunctionConstructor());
                                AddBuiltin(inst, "apply");
                                AddBuiltin(inst, "call");
***************
*** 110,117 ****
                        {
                                base.Init(engine, parent);
!                               constructor = GetProperty("constructor");
!                               apply = GetProperty("apply");
!                               call = GetProperty("call");
!                               toString = GetProperty("toString");
                        }
  
--- 109,116 ----
                        {
                                base.Init(engine, parent);
!                               constructor = Get("constructor");
!                               apply = Get("apply");
!                               call = Get("call");
!                               toString = Get("toString");
                        }
  

Index: GlobalObject.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/JScript/Builtins/GlobalObject.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** GlobalObject.cs     13 Jan 2003 10:53:19 -0000      1.1
--- GlobalObject.cs     14 Jan 2003 10:35:49 -0000      1.2
***************
*** 61,73 ****
                                AddBuiltin(inst, "ScriptEngineMinorVersion");
                                AddBuiltin(inst, "unescape");
!                               globalObject.SetProperty("Infinity", 
Double.PositiveInfinity,
!                                                                               
 PropertyAttributes.DontEnum |
!                                                                               
 PropertyAttributes.DontDelete);
!                               globalObject.SetProperty("NaN", Double.NaN,
!                                                                               
 PropertyAttributes.DontEnum |
!                                                                               
 PropertyAttributes.DontDelete);
!                               globalObject.SetProperty("undefined", null,
!                                                                               
 PropertyAttributes.DontEnum |
!                                                                               
 PropertyAttributes.DontDelete);
  #if false
                                AddProperty("ActiveXObject", ActiveXObject);
--- 61,73 ----
                                AddBuiltin(inst, "ScriptEngineMinorVersion");
                                AddBuiltin(inst, "unescape");
!                               globalObject.Put("Infinity", 
Double.PositiveInfinity,
!                                                                
PropertyAttributes.DontEnum |
!                                                                
PropertyAttributes.DontDelete);
!                               globalObject.Put("NaN", Double.NaN,
!                                                                
PropertyAttributes.DontEnum |
!                                                                
PropertyAttributes.DontDelete);
!                               globalObject.Put("undefined", null,
!                                                                
PropertyAttributes.DontEnum |
!                                                                
PropertyAttributes.DontDelete);
  #if false
                                AddProperty("ActiveXObject", ActiveXObject);
***************
*** 103,107 ****
                        {
                                MethodInfo method = 
typeof(GlobalObject).GetMethod(name);
!                               globalObject.SetProperty(name, new 
BuiltinFunction
                                        (inst.GetFunctionPrototype(), name, 
method),
                                        PropertyAttributes.None);
--- 103,107 ----
                        {
                                MethodInfo method = 
typeof(GlobalObject).GetMethod(name);
!                               globalObject.Put(name, new BuiltinFunction
                                        (inst.GetFunctionPrototype(), name, 
method),
                                        PropertyAttributes.None);
***************
*** 111,116 ****
        private void AddProperty(string name, object value)
                        {
!                               globalObject.SetProperty(name, value,
!                                                                               
 PropertyAttributes.None);
                        }
  
--- 111,115 ----
        private void AddProperty(string name, object value)
                        {
!                               globalObject.Put(name, value, 
PropertyAttributes.None);
                        }
  
***************
*** 546,570 ****
                                @decimal = address@hidden;
                                @void = address@hidden;
!                               CollectGarbage = 
globalObject.GetProperty("CollectGarbage");
!                               decodeURI = 
globalObject.GetProperty("decodeURI");
                                decodeURIComponent =
!                                       
globalObject.GetProperty("decodeURIComponent");
!                               encodeURI = 
globalObject.GetProperty("encodeURI");
                                encodeURIComponent =
!                                       
globalObject.GetProperty("encodeURIComponent");
!                               escape = globalObject.GetProperty("escape");
!                               eval = globalObject.GetProperty("eval");
!                               isFinite = globalObject.GetProperty("isFinite");
!                               isNaN = globalObject.GetProperty("isNaN");
!                               parseFloat = 
globalObject.GetProperty("parseFloat");
!                               parseInt = globalObject.GetProperty("parseInt");
!                               ScriptEngine = 
globalObject.GetProperty("ScriptEngine");
                                ScriptEngineBuildVersion =
!                                       
globalObject.GetProperty("ScriptEngineBuildVersion");
                                ScriptEngineMajorVersion =
!                                       
globalObject.GetProperty("ScriptEngineMajorVersion");
                                ScriptEngineMinorVersion =
!                                       
globalObject.GetProperty("ScriptEngineMinorVersion");
!                               unescape = globalObject.GetProperty("unescape");
                                Infinity = Double.PositiveInfinity;
                                NaN = Double.NaN;
--- 545,569 ----
                                @decimal = address@hidden;
                                @void = address@hidden;
!                               CollectGarbage = 
globalObject.Get("CollectGarbage");
!                               decodeURI = globalObject.Get("decodeURI");
                                decodeURIComponent =
!                                       globalObject.Get("decodeURIComponent");
!                               encodeURI = globalObject.Get("encodeURI");
                                encodeURIComponent =
!                                       globalObject.Get("encodeURIComponent");
!                               escape = globalObject.Get("escape");
!                               eval = globalObject.Get("eval");
!                               isFinite = globalObject.Get("isFinite");
!                               isNaN = globalObject.Get("isNaN");
!                               parseFloat = globalObject.Get("parseFloat");
!                               parseInt = globalObject.Get("parseInt");
!                               ScriptEngine = globalObject.Get("ScriptEngine");
                                ScriptEngineBuildVersion =
!                                       
globalObject.Get("ScriptEngineBuildVersion");
                                ScriptEngineMajorVersion =
!                                       
globalObject.Get("ScriptEngineMajorVersion");
                                ScriptEngineMinorVersion =
!                                       
globalObject.Get("ScriptEngineMinorVersion");
!                               unescape = globalObject.Get("unescape");
                                Infinity = Double.PositiveInfinity;
                                NaN = Double.NaN;

Index: ObjectConstructor.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/JScript/Builtins/ObjectConstructor.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** ObjectConstructor.cs        13 Jan 2003 10:53:19 -0000      1.1
--- ObjectConstructor.cs        14 Jan 2003 10:35:49 -0000      1.2
***************
*** 44,51 ****
                                        EngineInstance.GetEngineInstance(engine)
                                                .GetObjectPrototype();
!                               SetProperty("prototype", prototype,
!                                                   PropertyAttributes.ReadOnly 
|
!                                                       
PropertyAttributes.DontEnum |
!                                                       
PropertyAttributes.DontDelete);
                        }
  
--- 44,51 ----
                                        EngineInstance.GetEngineInstance(engine)
                                                .GetObjectPrototype();
!                               Put("prototype", prototype,
!                                   PropertyAttributes.ReadOnly |
!                                       PropertyAttributes.DontEnum |
!                                       PropertyAttributes.DontDelete);
                        }
  

Index: ObjectPrototype.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/JScript/Builtins/ObjectPrototype.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** ObjectPrototype.cs  13 Jan 2003 10:53:19 -0000      1.1
--- ObjectPrototype.cs  14 Jan 2003 10:35:49 -0000      1.2
***************
*** 38,43 ****
                                // Add the builtin "Object" properties to the 
prototype.
                                EngineInstance inst = 
EngineInstance.GetEngineInstance(engine);
!                               SetProperty("constructor", 
inst.GetObjectConstructor(),
!                                                       
PropertyAttributes.None);
                                AddBuiltin(inst, "toString");
                                AddBuiltin(inst, "toLocaleString");
--- 38,42 ----
                                // Add the builtin "Object" properties to the 
prototype.
                                EngineInstance inst = 
EngineInstance.GetEngineInstance(engine);
!                               Put("constructor", inst.GetObjectConstructor());
                                AddBuiltin(inst, "toString");
                                AddBuiltin(inst, "toLocaleString");
***************
*** 63,72 ****
                        {
                                String cname = Convert.ToString(name);
!                               if(thisob is JSObject)
                                {
!                                       
if(((JSObject)thisob).GetProperty(cname) != null)
!                                       {
!                                               return true;
!                                       }
                                }
                                return false;
--- 62,68 ----
                        {
                                String cname = Convert.ToString(name);
!                               if(thisob is ScriptObject)
                                {
!                                       return 
((ScriptObject)thisob).HasOwnProperty(cname);
                                }
                                return false;
***************
*** 123,127 ****
                                if(thisob is JSObject)
                                {
!                                       className = 
((JSObject)thisob).ClassName;
                                }
                                else
--- 119,123 ----
                                if(thisob is JSObject)
                                {
!                                       className = ((JSObject)thisob).Class;
                                }
                                else
***************
*** 162,172 ****
                        {
                                base.Init(engine);
!                               constructor = GetProperty("constructor");
!                               hasOwnProperty = GetProperty("hasOwnProperty");
!                               isPrototypeOf = GetProperty("isPrototypeOf");
!                               propertyIsEnumerable = 
GetProperty("propertyIsEnumerable");
!                               toLocaleString = GetProperty("toLocaleString");
!                               toString = GetProperty("toString");
!                               valueOf = GetProperty("valueOf");
                        }
  
--- 158,168 ----
                        {
                                base.Init(engine);
!                               constructor = Get("constructor");
!                               hasOwnProperty = Get("hasOwnProperty");
!                               isPrototypeOf = Get("isPrototypeOf");
!                               propertyIsEnumerable = 
Get("propertyIsEnumerable");
!                               toLocaleString = Get("toLocaleString");
!                               toString = Get("toString");
!                               valueOf = Get("valueOf");
                        }
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]