using Jint.Native; using Jint.Native.Object; using Jint.Runtime.Environments; namespace Jint.Runtime; public sealed class Realm { internal readonly Dictionary _templateMap = new(); // helps when debugging which nested realm we are in... #if DEBUG private static int globalId = 1; public Realm() { Id = globalId++; } internal int Id; #endif /// /// The intrinsic values used by code associated with this realm. /// public Intrinsics Intrinsics { get; internal set; } = null!; /// /// The global object for this realm. /// public ObjectInstance GlobalObject { get; internal set; } = null!; /// /// The global environment for this realm. /// internal GlobalEnvironment GlobalEnv { get; set; } = null!; /// /// Field reserved for use by hosts that need to associate additional information with a Realm Record. /// public object? HostDefined { get; set; } }