Class DgmConverter

java.lang.Object
org.codehaus.groovy.tools.DgmConverter

public class DgmConverter extends Object
Generates GeneratedMetaMethod adapter classes and metadata for the default Groovy methods.
  • Field Details

    • PROXY_FACTORY_CLASS_NAME

      public static final String PROXY_FACTORY_CLASS_NAME
      Binary name of the generated adapter factory; GeneratedMetaMethod.Proxy loads it by this constant.
      See Also:
    • PROXY_FACTORY_SHARD_SIZE

      public static final int PROXY_FACTORY_SHARD_SIZE
      Adapters per factory shard method. Each case costs sixteen bytes of bytecode including its switch-table entry, so a shard stays under HotSpot's 8000-byte limit for JIT compilation, with room for DGM to grow.
      See Also:
  • Constructor Details

    • DgmConverter

      public DgmConverter()
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Generates DGM adapter classes into the target directory.
      Parameters:
      args - optional --info flag and target directory
      Throws:
      IOException - if generated classes or metadata cannot be written
    • loadParameters

      protected static void loadParameters(CachedMethod method, org.objectweb.asm.MethodVisitor mv)
      Loads and casts the non-receiver arguments for the supplied cached method from an Object[] local variable.
      Parameters:
      method - the cached method whose parameters are being loaded
      mv - the visitor receiving the bytecode instructions