示例#1
0
        public void GenerateSet(Expression value, MethodBodyGenerator generator, MethodCompileOption option)
        {
            var iLVariable = generator.GetLocalVariable(key.Name);

            if (iLVariable != null)
            {
                generator.LoadVariable(iLVariable);
            }
        }
 public override void GenerateCode(MethodBodyGenerator generator, MethodCompileOption options)
 {
     if (generator.Method is Generators.DynamicMethodGenerator)
     {
         // for annonymous type
         // if this is used in anonymous function or objects
         var variable = generator.GetLocalVariable("__value");
         if (variable.Type.IsValueType && (options & MethodCompileOption.EmitStartAddress) == MethodCompileOption.EmitStartAddress)
         {
             generator.LoadAddressOfVariable(variable);
         }
         else
         {
             generator.LoadVariable(variable);
         }
     }
     else
     {
         generator.LoadArgument(0);
     }
 }