public void Set(DObject obj, DFunction value) { Set(obj, (DObject)value); } //To make sure CodeGen can detect this public void Set(DObject obj, DArray value) { Set(obj, (DObject)value); } //To make sure CodeGen can detect this
//ECMA-262 section 15.2.3.14 void keys(ref mdr.CallFrame callFrame) { Debug.WriteLine("calling JSObject.keys"); var O = callFrame.Arg0.AsDObject(); if (O == null) Trace.Fail("TypeError"); var retArray = new DArray(O.Map.Property.Index + 1); var i = 0; for (var m = O.Map; m.Property.Name != null; m = m.Parent) { if (!m.Property.IsNotEnumerable && !m.Property.IsInherited && (m.Property.IsDataDescriptor || m.Property.IsAccessorDescriptor)) { retArray.Elements[i++].Set(m.Property.Name); } } retArray.Length = i; //Debug.Assert(i == retArray.Length, "Array not populated correctly!"); callFrame.Return.Set(retArray); }
} //To make sure CodeGen can detect this public void Set(DObject obj, DArray value) { Set(obj, (DObject)value); } //To make sure CodeGen can detect this
//ECMA-262 section 15.2.3.4 void getOwnPropertyNames(ref mdr.CallFrame callFrame) { Debug.WriteLine("calling JSObject.getOwnPropertyNames"); var O = callFrame.Arg0.AsDObject(); if (O == null) Trace.Fail("TypeError"); var retArray = new DArray(O.Map.Property.Index + 1); var i = 0; for (var m = O.Map; m.Property.Name != null; m = m.Parent) { retArray.Elements[i++].Set(m.Property.Name); } retArray.Length = i; //Debug.Assert(i == retArray.Length, "Array not populated correctly!"); callFrame.Return.Set(retArray); }
public void Set(DArray v) { Set((DObject)v); }