Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Unpick Format V2

Daomephsta edited this page Sep 1, 2019 · 1 revision

The instruction name is in plain text.
Parameters are denoted like this <group>.
Optional tokens are denoted like this (<type> <value>).

  • constant <group> <owner> <name> (<descriptor> <value>)
    Defines a constant field. Valid types for constant fields are int, long, float, double, String & Class. Constant fields must be both static & final.
    • Parameters
      • group - A continuous sequence of non-whitespace characters used to group constant definitions. Constant definitions and flag definitions cannot be in the same group.
      • owner - The fully qualified name of the class containing the constant field, with all periods (.) replaced with forward slashes (/).
      • name - The identifier of the constant field.
      • descriptor - The type descriptor of the constant field, formatted according to JVMS 4.3.2.
      • value - The value of the constant field. Integer values must be in base 10.
    • Examples:
      • constant foo_group example/Constants FOO I 3
      • constant bar example/Constants BAR
  • flag <group> <owner> <name> (<descriptor> <value>)
    Defines a flag field. Valid types for flag fields are int & long. Constant fields must be both static & final.
    • Parameters
      • group - A continuous sequence of non-whitespace characters used to group flag definitions. Constant definitions and flag definitions cannot be in the same group.
      • owner - The fully qualified name of the class containing the flag field, with all periods (.) replaced with forward slashes (/).
      • name - The identifier of the flag field.
      • descriptor - The type descriptor of the flag field, formatted according to JVMS 4.3.2.
      • value - The value of the flag field. Values must be in base 10.
    • Examples:
      • flag baz_group example/Constants BAZ I 3
      • flag eggs example/Constants EGGS
  • target_method <owner> <name> <descriptor> Defines the start of a target method definition. The definition ends when the parser next encounters an instruction that is neither param or return.
    • Parameters
      • owner - The fully qualified name of the class containing the method, with all periods (.) replaced with forward slashes (/).
      • name - The identifier of the method.
      • descriptor - The type descriptor of the method, formatted according to JVMS 4.3.3.
    • Examples:
      • target_method example/Example foo (J)V
           param 0 long_flags
        
      • target_method example/Example bar (ZJ)V 
           param 1 long_constants
        
      • target_method example/Example baz ()J 
           return long_constants
        
  • param <parameter_index> <constant_group>
    Valid only within a target method definition. Defines the constant group for the parameter of the parent target method definition with the given index.
    • Parameters
      • parameter_index - the index of the target parameter
      • constant_group - the id of the constant group containing all constants that are passed as the target parameter.
    • Examples: See target_method
  • return <constant_group>
    Valid only within a target method definition. Defines the constant group for the return value of the parent target method definition.
    • Parameters
      • constant_group - the id of the constant group containing all constants that are returned from the represented method and its implementations.
    • Examples: See target_method
Clone this wiki locally