public HGeneratorIterator(IEnvironment environment, Generator generator, ReadOnlyList<string> variableDeclarations, ILexicalEnvironment scope) : base(environment) { Generator = generator; VariableDeclarations = variableDeclarations; Scope = scope; }
public HGeneratorIterable(IEnvironment environment, ReadOnlyList <GeneratorStep> steps, ReadOnlyList <string> variableDeclarations, ILexicalEnvironment scope) : base(environment) { Steps = steps; VariableDeclarations = variableDeclarations; Scope = scope; }
public HGeneratorIterable(IEnvironment environment, ReadOnlyList<GeneratorStep> steps, ReadOnlyList<string> variableDeclarations, ILexicalEnvironment scope) : base(environment) { Steps = steps; VariableDeclarations = variableDeclarations; Scope = scope; }
public HGeneratorIterator(IEnvironment environment, Generator generator, ReadOnlyList <string> variableDeclarations, ILexicalEnvironment scope) : base(environment) { Generator = generator; VariableDeclarations = variableDeclarations; Scope = scope; }
public SLexicalEnvironment(IEnvironment environment, IEnvironmentRecord record, ILexicalEnvironment parent) { _environment = environment; Record = record; Parent = parent; }
public IObject CreateIterableFromGenerator(ReadOnlyList<GeneratorStep> steps, ReadOnlyList<string> variableDeclarations, ILexicalEnvironment scope) { return new HGeneratorIterable(this, steps, variableDeclarations, scope); }
public IObject CreateFunction(ExecutableCode executableCode, ReadOnlyList<string> formalParameters, ILexicalEnvironment scope) { // 13.2 Creating Function Objects var f = new NFunction(this); { f.Class = "Function"; f.Extensible = true; f.Prototype = FunctionPrototype; f.ExecutableCode = executableCode; f.FormalParameters = formalParameters; f.Scope = scope; f.DefineOwnProperty("length", CreateDataDescriptor(CreateNumber(f.FormalParameters.Count), false, false ,false), false); f.DefineOwnProperty("constructor", CreateDataDescriptor(f, true, false, true), false); f.DefineOwnProperty("prototype", CreateDataDescriptor(ObjectConstructor.Op_Construct(EmptyArgs), true, false, false), false); if (executableCode.Strict) { var desc = CreateAccessorDescriptor(ThrowTypeErrorFunction, ThrowTypeErrorFunction, false, false); f.DefineOwnProperty("caller", desc, false); f.DefineOwnProperty("arguments", desc, false); } } return f; }
public IObject CreateIterableFromGenerator(ReadOnlyList <GeneratorStep> steps, ReadOnlyList <string> variableDeclarations, ILexicalEnvironment scope) { return(new HGeneratorIterable(this, steps, variableDeclarations, scope)); }
public IObject CreateFunction(ExecutableCode executableCode, ReadOnlyList <string> formalParameters, ILexicalEnvironment scope) { // 13.2 Creating Function Objects var f = new NFunction(this); { f.Class = "Function"; f.Extensible = true; f.Prototype = FunctionPrototype; f.ExecutableCode = executableCode; f.FormalParameters = formalParameters; f.Scope = scope; f.DefineOwnProperty("length", CreateDataDescriptor(CreateNumber(f.FormalParameters.Count), false, false, false), false); f.DefineOwnProperty("constructor", CreateDataDescriptor(f, true, false, true), false); f.DefineOwnProperty("prototype", CreateDataDescriptor(ObjectConstructor.Op_Construct(EmptyArgs), true, false, false), false); if (executableCode.Strict) { var desc = CreateAccessorDescriptor(ThrowTypeErrorFunction, ThrowTypeErrorFunction, false, false); f.DefineOwnProperty("caller", desc, false); f.DefineOwnProperty("arguments", desc, false); } } return(f); }