anchor.diff:    let (|Proxied|Not|) (input:Ast.Local) =
       if Set.contains F.NeedProxy input.Flags then Proxied else Not
   
  -  let dynamicIndex = ref -1 
  -  let dynamicExpr = Expr.paramT<Runtime.Box array> "~dynamic"
  -
     let createVar (l:Ast.Local) =
       let clrTyp = Utils.Type.jsToClr l.UsedAs
       if l.ClosedOver 
  
positive.code:   let createProxy (l:Ast.Local) =
      Expr.param (sprintf "%s_proxy" l.Name) scope.ArgTypes.[l.Index]
  
    let vars = 
      scope.Locals
        |> Map.map(fun _ l -> 
                    match l with
                    | Parameter -> 
                      match l with
                      | Proxied -> Proxied(createVar l, createProxy l)
                      | Not -> Variable(createVar l, P)
                    | Local -> Variable(createVar l, L)
                  )
  
    vars, (!dynamicIndex + 1), dynamicExpr
  
  let isLocal (pair:string * Var) =
    match pair with
  
negative.code: (*Compiles a Ast.Node tree into a DLR Expression-tree*)
  let compileAst (env:Runtime.IEnvironment) (delegateType:ClrType) (closureType:ClrType) (scope:Ast.Scope) (ast:Ast.Node) =
  
    let ctx = {
      Context.New with
        Closure = Dlr.Expr.param "~closure" closureType
        Scope = scope
        Builder = Compiler.ExprGen.builder
        TemporaryTypes = new SafeDict<string, ClrType>()
        Env = env
        Locals = buildVarsMap scope
    }
  
    let initGlobals = Expr.assign ctx.Globals (Expr.field ctx.Environment "Globals")
    let initClosure = Expr.assign ctx.Closure (Expr.cast closureType (Expr.field ctx.Function "Closure"))
  
    let body = 
      [ctx.Builder2 ast; Expr.labelExprT<Runtime.Box> ctx.Return]
        |> List.toSeq
        |> Seq.append [initGlobals; initClosure]
        #if DEBUG
        |> Seq.toArray
        |> fun x -> Expr.block x
        #endif
  
    let parms  = 
      ctx.Locals
        |> Map.toSeq
        |> Seq.filter isParameter
        |> Seq.map toParm
  