Ejemplo n.º 1
0
        public static LexicalEnvironment NewObjectEnvironment([NotNull] ScriptObject obj, [NotNull] LexicalEnvironment environment, bool withEnvironment)
        {
            //https://tc39.github.io/ecma262/#sec-newobjectenvironment
            var environmentRecord = new ObjectEnvironment(obj, withEnvironment);

            return(new LexicalEnvironment(environmentRecord, environment));
        }
Ejemplo n.º 2
0
 public GlobalEnvironment([NotNull] Agent agent, [NotNull] ScriptObject globalObject, [NotNull] ScriptObject thisValue)
 {
     //https://tc39.github.io/ecma262/#sec-newglobalenvironment
     objectRecord      = new ObjectEnvironment(globalObject, false);
     this.agent        = agent;
     globalThisValue   = thisValue;
     declarativeRecord = new DeclarativeEnvironment(agent);
 }