Ejemplo n.º 1
0
 private void GenerateMethods(GenContext context)
 {
     for (ISeq s = RT.seq(_methods); s != null; s = s.next())
     {
         FnMethod method = (FnMethod)s.first();
         method.GenerateCode(context);
     }
 }
Ejemplo n.º 2
0
        protected override void GenerateMethods(GenContext context)
        {
            for (ISeq s = RT.seq(Methods); s != null; s = s.next())
            {
                FnMethod method = (FnMethod)s.first();
                method.GenerateCode(this, context);
            }

            if (IsVariadic)
            {
                GenerateGetRequiredArityMethod(TypeBuilder, _variadicMethod.RequiredArity);
            }

            List <int> supportedArities = new List <int>();

            for (ISeq s = RT.seq(Methods); s != null; s = s.next())
            {
                FnMethod method = (FnMethod)s.first();
                supportedArities.Add(method.NumParams);
            }

            GenerateHasArityMethod(TypeBuilder, supportedArities, IsVariadic, IsVariadic ? _variadicMethod.RequiredArity : 0);
        }