Permalink
Browse files

Opened up some fields and added a few missing properties in the runti…

…me assembly.
  • Loading branch information...
1 parent b9144bc commit ab062ad9011a1156d255cd2643bbd27479dc042f @otac0n otac0n committed Jul 7, 2011
@@ -11,7 +11,7 @@ internal static class BoxedValueOffsets
public const int ReferenceType = 8;
}
- internal static class Markers
+ public static class Markers
{
public const ushort Number = 0xFFF8;
public const ushort Tagged = 0xFFF9;
@@ -102,6 +102,11 @@ public CommonObject NewArray(uint size)
return new ArrayObject(this, size) { Length = size };
}
+ public CommonObject NewDate(DateTime date)
+ {
+ return new DateObject(this, date);
+ }
+
public CommonObject NewBoolean()
{
return this.NewBoolean(false);
@@ -269,7 +269,7 @@ private static Descriptor Find(CommonObject @this, string name)
/// <param name="name"></param>
/// <param name="index"></param>
/// <returns></returns>
- private bool CanPut(string name, out int index)
+ public bool CanPut(string name, out int index)
{
if (this.PropertySchema.IndexMap.TryGetValue(name, out index))
{
@@ -8,6 +8,14 @@ namespace IronJS.Runtime
public class HostFunctionObject<T> : FunctionObject
where T : class
{
+ static HostFunctionObject()
+ {
+ if (!typeof(T).IsSubclassOf(typeof(Delegate)))
+ {
+ throw new InvalidOperationException(typeof(T).Name + " is not a delegate type");
+ }
+ }
+
public T Delegate;
public HostFunctionObject(Environment env, T delegateFunction, FunctionMetaData metaData)
@@ -35,6 +35,11 @@ public override string ClassName
get { return "RegExp"; }
}
+ public bool Global
+ {
+ get { return this.global; }
+ }
+
public bool IgnoreCase
{
get
@@ -50,5 +55,10 @@ public bool MultiLine
return (this.regExp.Options & RegexOptions.Multiline) == RegexOptions.Multiline;
}
}
+
+ public Regex RegExp
+ {
+ get { return this.regExp; }
+ }
}
}

0 comments on commit ab062ad

Please sign in to comment.