r|      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{ !(c) Christian Gram Kalhauge, 2017MITkalhuage@cs.ucla.eduSafe2T A BitSet using a 16 bit word0A sized bytestring using a 16 bit word as length0A sized bytestring using a 32 bit word as length*A sized list using a 16 bit word as lengthA bit set of size wAn Enumish value, all maps to a number, but not all integers maps to a enumsish value. There is no guarantee that the integers will be subsequent.yThe only needed implementation is a list of integer-enum pairs in ascending order, corresponding to their integer value. A byte string with a size w.^SizedList is a binary type, that reads a list of elements. It first reads a length N of type w and then N items of type a.Get the size of the sized list.!Get the size of a SizedByteString$Takes the third element of a triple.      !(c) Christian Gram Kalhauge, 2017MITkalhuage@cs.ucla.eduSafe5OT!A ConstantPool is just an IntMap. A IntMapC is used, because constants are accessed after their byte-offset. 5$'A constant is a multi word item in the !J. Each of the constructors are pretty much self expiatory from the types.3nA constant is referenced by the ConstantRef data type. It is just a 16 bit word, but wrapped for type safety.5 Some of the $Cs take up more space in the constant pool than other. Notice that % and 1F is not of size 32, but is still awarded value 1. This is due to an  Hhttp://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.4.5 inconsistency in JVM.6*Return a list of reference-constant pairs.7 Lookup a $ in the !.8 Lookup a | in the ! , returns }e if the reference does not point to something in the ConstantPool, if it points to something not a %1 Constant, or if it is impossible to decode the  ByteString as Utf8.9Lookup a class name in the ! , returns } otherwise.!"#$%&'()*+,-./0123456789:;<!"#$')&%(*+,-./0123456789$%&'()*+,-./012534!"#7896 !"#$%&'()*+,-./0123456789:;<!(c) Christian Gram Kalhauge, 2017MITkalhuage@cs.ucla.eduNone5Eaaload baload ...Faastore bastore ...Haload_0, bload_2, iload 5 ...Iaload, bload ...Jiadd ...Kineg ...L8Exclusively on int and long, identified by the word-sizeM$Only works on ints, increment local 1, with 2NOnly valid on different typesOOnly valid on different typesQCompare two floating values, 1 indicates if greater-than, (2 is if float or double should be used.Racompare with 0 if #2 is False, and two ints from the stack if True. the last value is the offsetSPcheck if two objects are equal, or not equal. If #2 is True, compare with null.Wa table switch has 3 values  `default` low high and a list of offets.Xa lookup switch has a  `default` value and a list of pairs.bTrue => Enter, False => ExitcCreate a new multi array of  1 and with  2 dimensionsInclusive program counter into codeExclusive program counter into codeA program counter into code indicating the handler.DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~DRYZG\LEFHIJKMNOPQSTUVWX[]^_`abcdefghijklmnopqrstuvwxyz{|}~ԑDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqxyuvwrstz{|}~D&EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !(c) Christian Gram Kalhauge, 2017MITkalhuage@cs.ucla.eduNone59;T  CCode is redefined with Attribute, as it is recursively containing !. This is a small hack to fix it. (A class-type that describes a data-type a0 as an Attribute. Most notable it provides the = method that enables converting an Attribute to a data-type a. The name of the attribute.  Generate a a from an Attribute.(Create a type dependent on another type b", used for accessing the correct   in  .JAn Attribute, simply contains of a reference to a name and contains info.7A small helper function to extract the info as a lazy   .HExtracts the name from the attribute, if it exists in the ConstantPool.Code is an Attribute.    ~              ~!(c) Christian Gram Kalhauge, 2017MITkalhuage@cs.ucla.eduSafeAccess flags for the  'Access flags for the  /Access flags for the <The  mapping of the /=The  mapping of the '>The  mapping of the ' !"#$%&'()*+,-./0123456789:;<=>?@A$ !"#$%&'()*+,-./0123456789:;<=>$/0123456789:;< !"#$%&>'()*+,-.=   !"#$%&'()*+,-./ 0123456789:;<=>?@A!(c) Christian Gram Kalhauge, 2017MITkalhuage@cs.ucla.eduNone5K)A Field in the class-file, as described  Fhttp://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.5here.KLMNOPQKLMNOPKLMNOPKLMNOPQ!(c) Christian Gram Kalhauge, 2017MITkalhuage@cs.ucla.eduNone5U*A Method in the class-file, as described  Fhttp://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.6here.[3Unpack the BitSet and get the AccessFlags as a Set.\6Unpack the SizedList and get the attributes as a List.]%Lookup the name of the method in the !.^+Lookup the descriptor of the method in the !._Fetch the first   Attribute. UVWXYZ[\]^_` UVWXYZ[\]^_ UVWXYZ[\]^_UVWXYZ[\]^_`!(c) Christian Gram Kalhauge, 2017MITkalhuage@cs.ucla.eduNone5dA d as described  =http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.htmlhere.qGet a list of 3s to interfaces.rGet a list of Ks of a ClassFile.sGet a list of Us of a ClassFile.tGet a list of s of a ClassFile.u'Lookup the this class in a ConstantPoolv*Lookup the super class in the ConstantPooldefghijklmnopqrstuvwdefghijklmnopqrstuvdefghijklmnopqrstuvd efghijklmnopqrstuvw !(c) Christian Gram Kalhauge, 2017MITkalhuage@cs.ucla.eduNone{+Create a class file form a lazy byte string{J!"#$')&%(*+,-./0123456789    KLMNOPUVWXYZ[\]^_defghijklmnopqrstuv{{{ !"#$%&'()*+,--./0123456789:;<=>>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~V/JK      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJ  KLMNOPQRSTUVWXYZ[\]^_  `abcdefghijklmnopqrst uvwxyz{|}'jvm-binary-0.0.1-INqRQWrwNVD23mePMfBHSALanguage.JVM.UtilsLanguage.JVM.ConstantLanguage.JVM.Attribute.CodeLanguage.JVM.AttributeLanguage.JVM.AccessFlagLanguage.JVM.FieldLanguage.JVM.MethodLanguage.JVM.ClassFile Language.JVMData.ByteString.Lazy ByteStringField ClassFileMethodBitSet16SizedByteString16SizedByteString32 SizedList16BitSettoSetEnumishinOrder fromEnumish toEnumishSizedByteStringunSizedByteString SizedList unSizedListlistSizebyteStringSizetrd$fBinaryBitSet$fBinarySizedByteString$fBinarySizedList$fTraversableSizedList$fFoldableSizedList$fShowSizedList $fEqSizedList$fFunctorSizedList$fShowSizedByteString$fEqSizedByteString $fOrdBitSet $fShowBitSet $fEqBitSet ConstantPoolunConstantPoolConstantStringIntegerFloatLongDoubleClassRef StringRefFieldRef MethodRefInterfaceMethodRef NameAndType MethodHandle MethodType InvokeDynamic ConstantRef constantSizetoListOfConstantslookupConstant lookupTextlookupClassName$fBinaryConstantPool$fBinaryConstant$fBinaryConstantRef$fEqConstantRef$fShowConstantRef$fGenericConstantRef$fShowConstant $fEqConstant$fShowConstantPool$fEqConstantPool ByteCodeOpr ArrayLoad ArrayStorePushLoadStore BinaryOprNegBitOpr IncrLocalCastCastDown CompareLongsCompareFloatingIfIfRefGotoJsrRet TableSwitch LookupSwitchGetPutInvokeNewNewArray ArrayLengthThrow CheckCast InstanceOfMonitor MultiNewArrayReturnNopPopDupDupX1DupX2SwapCmpOprCEqCNeCLtCGeCGtCLeIncrementAmountIWideISingle LocalAddressLWideLSingle LongOffsetOffsetShLShRUShRAndOrXOrBinOprAddSubMulDivRemCNullCIntM1CInt0CInt1CInt2CInt3CInt4CInt5CLong0CLong1CFloat0CFloat1CFloat2CDouble0CDouble1CByteCShortCHalfRefCRefWordSizeOneOrTwoOneTwo FieldAccess FldStaticFldField Invokation InvkSpecial InvkVirtual InvkStatic InvkInterface InvkDynamic ArrayTypeABooleanAByteACharAShortAIntALongAFloatADoubleARef LocalTypeLIntLLongLFloatLDoubleLRefSmallArithmeticTypeMByteMCharMShortArithmeticTypeMIntMLongMFloatMDouble ByteCodeInstoffsetopcodeExceptionTablestartendhandler catchTypeByteCode unByteCodeCodemaxStack maxLocalsbytecodeexceptionTable attributes$fBinaryByteCodeOpr$fBinaryByteCodeInst$fBinaryExceptionTable$fBinaryByteCode $fBinaryCode$fShowExceptionTable$fEqExceptionTable$fGenericExceptionTable$fShowArithmeticType$fEqArithmeticType$fEnumArithmeticType$fBoundedArithmeticType$fShowSmallArithmeticType$fEqSmallArithmeticType$fEnumSmallArithmeticType$fBoundedSmallArithmeticType$fShowLocalType $fEqLocalType$fEnumLocalType$fBoundedLocalType$fShowArrayType $fEqArrayType$fShowInvokation$fEqInvokation$fShowFieldAccess$fEqFieldAccess$fShowOneOrTwo $fOrdOneOrTwo$fBoundedOneOrTwo $fEqOneOrTwo$fEnumOneOrTwo $fShowBinOpr $fEqBinOpr $fShowBitOpr $fEqBitOpr$fShowLocalAddress$fEqLocalAddress$fShowIncrementAmount$fEqIncrementAmount $fShowCmpOpr $fEqCmpOpr$fShowByteCodeOpr$fEqByteCodeOpr$fShowByteCodeInst$fEqByteCodeInst$fGenericByteCodeInst$fShowByteCode $fEqByteCode $fShowCode$fEqCode $fGenericCode IsAttributeattrName fromAttributefromAttribute'Const Attribute aNameIndexaInfo'aInfoaName$fIsAttributeCode$fBinaryAttribute$fShowAttribute $fEqAttribute$fGenericAttribute FAccessFlagFPublicFPrivate FProtectedFStaticFFinal FSynchronizedFUnused6 FVolatile FTransient FSyntheticFEnum CAccessFlagCPublicCFinalCSuper CAbstract CSynthetic CAnnotationCEnum MAccessFlagMPublicMPrivate MProtectedMStaticMFinal MSynchronizedMBridgeMVarargsMNative MAbstract MStrictFP MSyntheticmflagscflagsfflags$fEnumishFAccessFlag$fEnumishCAccessFlag$fEnumishMAccessFlag$fOrdMAccessFlag$fShowMAccessFlag$fEqMAccessFlag$fOrdCAccessFlag$fShowCAccessFlag$fEqCAccessFlag$fOrdFAccessFlag$fShowFAccessFlag$fEqFAccessFlag fAccessFlags fNameIndexfDescriptorIndex fAttributes $fBinaryField $fShowField $fEqField$fGenericField mAccessFlags' mNameIndexmDescriptorIndex mAttributes' mAccessFlags mAttributesmName mDescriptormCode$fBinaryMethod $fShowMethod $fEqMethod$fGenericMethod cMagicNumber cMinorVersion cMajorVersion cConstantPool cAccessFlagscThisClassIndexcSuperClassIndex cInterfaces'cFields' cMethods' cAttributes' cInterfacescFieldscMethods cAttributes cThisClass cSuperClass$fBinaryClassFile$fShowClassFile $fEqClassFile$fGenericClassFiledecodeClassFile#text-1.2.2.2-KC7dWoG09dA1F6jKj5GSqhData.Text.InternalTextbaseGHC.BaseNothingunConst