public void Dispose() { if (Local == null) { return; } _parent._localsPool.Add((_type, Local)); Local = null; }
public ILEmitContext(IXamlILEmitter emitter, TransformerConfiguration configuration, XamlLanguageEmitMappings <IXamlILEmitter, XamlILNodeEmitResult> emitMappings, XamlRuntimeContext <IXamlILEmitter, XamlILNodeEmitResult> runtimeContext, IXamlLocal contextLocal, Func <string, IXamlType, IXamlTypeBuilder <IXamlILEmitter> > createSubType, IFileSource file, IEnumerable <object> emitters) : base(emitter, configuration, emitMappings, runtimeContext, contextLocal, createSubType, file, emitters) { EnableIlVerification = configuration.GetOrCreateExtra <ILEmitContextSettings>().EnableILVerification; }
public XamlEmitContextWithLocals(TBackendEmitter emitter, TransformerConfiguration configuration, XamlLanguageEmitMappings <TBackendEmitter, TEmitResult> emitMappings, XamlRuntimeContext <TBackendEmitter, TEmitResult> runtimeContext, IXamlLocal contextLocal, Func <string, IXamlType, IXamlTypeBuilder <TBackendEmitter> > createSubType, IFileSource file, IEnumerable <object> emitters) : base(emitter, configuration, emitMappings, runtimeContext, contextLocal, createSubType, file, emitters) { }
public XamlEmitContext(TBackendEmitter emitter, TransformerConfiguration configuration, XamlLanguageEmitMappings <TBackendEmitter, TEmitResult> emitMappings, XamlRuntimeContext <TBackendEmitter, TEmitResult> runtimeContext, IXamlLocal contextLocal, Func <string, IXamlType, IXamlTypeBuilder <TBackendEmitter> > createSubType, IFileSource file, IEnumerable <object> emitters) { File = file; Emitter = emitter; Emitters = emitters.ToList(); Configuration = configuration; RuntimeContext = runtimeContext; ContextLocal = contextLocal; CreateSubType = createSubType; EmitMappings = emitMappings; }
public static IXamlILEmitter Stloc(this IXamlILEmitter emitter, IXamlLocal local) => emitter.Emit(OpCodes.Stloc, local);
public static IXamlILEmitter Ldloca(this IXamlILEmitter emitter, IXamlLocal local) => emitter.Emit(OpCodes.Ldloca, local);
public IXamlILEmitter Emit(OpCode code, IXamlLocal local) { _ilg.Emit(code, ((SreLocal)local).Local); return(this); }
public IXamlILEmitter Emit(OpCode code, IXamlLocal local) { Record(code, local); _inner.Emit(code, local); return(this); }
public static void EmitConvert(XamlEmitContextWithLocals <IXamlILEmitter, XamlILNodeEmitResult> context, IXamlILEmitter ilgen, IXamlLineInfo node, IXamlType what, IXamlType to, IXamlLocal local) { EmitConvert(context, node, what, to, lda => ilgen.Emit(lda ? OpCodes.Ldloca : OpCodes.Ldloc, local)); }
public IXamlILEmitter Emit(SreOpCode code, IXamlLocal local) => Emit(Instruction.Create(Dic[code], ((CecilLocal)local).Variable));
public PooledLocal(XamlLocalsPool parent, IXamlType type, IXamlLocal local) { Local = local; _parent = parent; _type = type; }