Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.dynjs.runtime;
 
 public class LexicalEnvironment {
 
         return new LexicalEnvironment(new DeclarativeEnvironmentRecord(), outer);
     }
 
     public static LexicalEnvironment newObjectEnvironment(JSObject objectboolean provideThisLexicalEnvironment outer) {
        return new LexicalEnvironment(new ObjectEnvironmentRecord(objectprovideThis), outer);
    }
    public static LexicalEnvironment newGlobalEnvironment(DynJS runtime) {
        return new LexicalEnvironment(new ObjectEnvironmentRecord(GlobalObject.newGlobalObject(runtime), false), null);
    }
    
    public static LexicalEnvironment newGlobalEnvironment(GlobalObject globalObject) {
        return new LexicalEnvironment(new ObjectEnvironmentRecord(globalObjectfalse), null);
    }
    private LexicalEnvironment outer;
    private EnvironmentRecord record;
    private LexicalEnvironment(EnvironmentRecord recordLexicalEnvironment outer) {
        this. = record;
        this. = outer;
    }
    public EnvironmentRecord getRecord() {
        return this.;
    }
    public LexicalEnvironment getOuter() {
        return this.;
    }
    public GlobalObject getGlobalObject() {
        if (this. == null) {
            return (GlobalObject) ((ObjectEnvironmentRecordthis.).getBindingObject();
        } else {
            return this..getGlobalObject();
        }
    }
    public Reference getIdentifierReference(ExecutionContext contextString nameboolean strict) {
        // 10.2.2.1
        boolean exists = .hasBinding(contextname);
        if (exists) {
            return new Reference(getGlobalObject(), namethis.strict);
        }
        if ( == null) {
            return new Reference(getGlobalObject(), name.strict);
        }
        return .getIdentifierReference(contextnamestrict);
    }
New to GrepCode? Check out our FAQ X