internal override SCode LocateVariable(IVariableSpecializer variable) { ValueCell cell; if (this.importedTopLevelVariables.TryGetValue(variable.Name, out cell)) { return(variable.MakeTopLevel(cell)); } else { return(this.environment.SpecializeVariable(variable)); } }
internal override SCode LocateVariable(IVariableSpecializer variable) { int argOffset = this.envClosure.FormalOffset(variable.Name); if (argOffset != -1) { return(variable.MakeArgument(argOffset)); } int staticOffset = this.StaticOffset(variable.Name); if (staticOffset != -1) { return(variable.MakeStatic(staticOffset)); } //// Must be last so that bindings and statics will shadow! ValueCell topLevelCell; if (this.importedTopLevelVariables.TryGetValue(variable.Name, out topLevelCell)) { return(variable.MakeTopLevel(topLevelCell)); } return(variable.MakeFree()); }
internal abstract SCode LocateVariable(IVariableSpecializer variable);
internal override SCode LocateVariable(IVariableSpecializer variable) { throw new NotImplementedException(); }