Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved various enums and constants into the runtime library.
- Loading branch information
Showing
16 changed files
with
131 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace IronJS.Runtime | ||
{ | ||
public enum ArgumentsLinkArray : byte | ||
{ | ||
Locals = 0, | ||
ClosedOver = 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace IronJS.Runtime | ||
{ | ||
public static class BoxFields | ||
{ | ||
public const string Bool = "Bool"; | ||
public const string Number = "Number"; | ||
public const string Clr = "Clr"; | ||
public const string Undefined = "Clr"; | ||
public const string String = "String"; | ||
public const string SuffixString = "SuffixString"; | ||
public const string Object = "Object"; | ||
public const string Function = "Func"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace IronJS.Runtime | ||
{ | ||
public enum DefaultValueHint | ||
{ | ||
None = 0, | ||
String = 1, | ||
Number = 2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace IronJS.Runtime | ||
{ | ||
public enum FunctionType | ||
{ | ||
UserDefined, | ||
NativeConstructor, | ||
NativeFunction | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace IronJS.Runtime | ||
{ | ||
public enum MarshalModes | ||
{ | ||
Default = 2, | ||
This = 1, | ||
Function = 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace IronJS.Runtime | ||
{ | ||
public enum ParameterStorageType | ||
{ | ||
Private, | ||
Shared | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace IronJS.Runtime | ||
{ | ||
public enum ParamsModes : byte | ||
{ | ||
NoParams = 0, | ||
ObjectParams = 1, | ||
BoxParams = 2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace IronJS.Runtime | ||
{ | ||
public static class TypeTags | ||
{ | ||
public const uint Box = 0x00000000u; | ||
public const uint Bool = 0xFFFFFF01u; | ||
public const uint Number = 0xFFFFFF02u; | ||
public const uint Clr = 0xFFFFFF03u; | ||
public const uint String = 0xFFFFFF04u; | ||
public const uint SuffixString = 0xFFFFFF05u; | ||
public const uint Undefined = 0xFFFFFF06u; | ||
public const uint Object = 0xFFFFFF07u; | ||
public const uint Function = 0xFFFFFF08u; | ||
|
||
private static readonly Dictionary<uint, string> names = new Dictionary<uint, string> | ||
{ | ||
{ Box, "internal" }, | ||
{ Bool, "boolean" }, | ||
{ Number, "number" }, | ||
{ Clr, "clr" }, | ||
{ String, "string" }, | ||
{ SuffixString, "string" }, | ||
{ Undefined, "undefined" }, | ||
{ Object, "object" }, | ||
{ Function, "function" } | ||
}; | ||
|
||
public static string GetName(uint tag) | ||
{ | ||
return names[tag]; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
open System | ||
|
||
open IronJS | ||
open IronJS.Runtime | ||
open IronJS.Dlr.Operators | ||
|
||
/// | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters