ChangeLog 104 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977
  1. 2019-08-29 Per Bothner <per@bothner.com>
  2. * ClassType.java (isAccessible): Make static.
  3. Interpret caller==null as being "artibitrary caller".
  4. 2018-09-07 Per Bothner <per@bothner.com>
  5. * ClassType.java (JAVA_10_VERSION): New magic number.
  6. 2018-01-03 Per Bothner <per@bothner.com>
  7. * Type.java (lowestCommonSharedType): New method. Factor out from
  8. lowestCommonSuperType so new method can be used by Language.unionType.
  9. 2017-09-27 Per Bothner <per@bothner.com>
  10. * CodeAttr.java (emitPushPrimArray): Overload.
  11. 2017-08-26 Per Bothner <per@bothner.com>
  12. * Scope.java (vars): Make private.
  13. 2017-05-08 Per Bothner <per@bothner.com>
  14. * CodeAttr.java (emitIfRaw): New method.
  15. 2017-04-19 Per Bothner <per@bothner.com>
  16. * ClassType.java (classfileFormatVersion): Make somewhat newer.
  17. 2017-01-01 Per Bothner <per@bothner.com>
  18. * ClassType.java (isCompatibleWithValue): If this is an interface that
  19. extends valueType assume compatible.
  20. 2016-12-03 Per Bothner <per@bothner.com>
  21. * Type.java (isCompatibleWithValue): Slight change to return value-
  22. return 0 when a "narrowing is needed, evenf if always compatible.
  23. Also start by calling Type.isSame.
  24. (static isCompatibleWithValue): Don't need equality test.
  25. * ClassType.java (isCompatibleWithValue): Check Type.isSame.
  26. * AnnotationEntry.java (asAnnotationValue): Generalize String
  27. value to allow allow any CharSequence.
  28. 2016-09-03 Per Bothner <per@bothner.com>
  29. * ClassType.java (JAVA_9_VERSION): New constant.
  30. * ClassType.java (checkSingleAbstractMethod): Make some locals final.
  31. 2016-08-29 Per Bothner <per@bothner.com>
  32. * ClassType.java (checkSingleAbstractMethod): Fix logic to properly
  33. search superclasses - specifically Object. Fixes Savannah
  34. bug #48938 "lambda cannot be cast to java.util.Comparator".
  35. (getMethods): Search Object as superclass of interfaces.
  36. Also fix a performance bug.
  37. * Filter.java: Make parameterized.
  38. * Type.java (promoteIfUnsigned): Fix bug which caused boolean nd char
  39. to be propmoted to int.
  40. 2016-07-12 Per Bothner <per@bothner.com>
  41. * Type.java (promotedIfUnsigned): New method.
  42. 2016-06-21 Per Bothner <per@bothner.com>
  43. * EnclosingMethodAttr.java (print): Fix handling when
  44. method_index is 0.
  45. 2016-04-28 Tom Bousso <tombousso@gmail.com>
  46. * TypeVariable.java (equals): New method.
  47. 2016-04-24 Per Bothner <per@bothner.com>
  48. * Method.java (makeCloneMethod): Set classfile from Type.objectType
  49. rather than Type.pointer_type which is not initialized when
  50. makeCloneMethod is called. Also make the method non-public.
  51. This fixes Savannah bug #47772 "Array clone doesn't work".
  52. 2016-04-21 Per Bothner <per@bothner.com>
  53. * Type.java (isSame): New static convenience method.
  54. * ParameterizedType.java (equals): New method.
  55. 2016-02-11 Per Bothner <per@bothner.com>
  56. * ClassType.java (isCompatibleWithValue): Return 2 (no coercion needed)
  57. in more cases.
  58. * Type.java (isCompatibleWithValue): Check if types are identical.
  59. 2016-01-27 Per Bothner <per@bothner.com>
  60. * Type.java (errorType): Change to instance of SpecialObjectType.
  61. 2015-10-14 Per Bothner <per@bothner.com>
  62. * CodeAttr.java (processFixups): Guard against 'goto' cycle/
  63. 2015-08-13 Jamison Hope <jrh@theptrgroup.com>
  64. * ClassType.java (getAnnotation): New method.
  65. * RuntimeAnnotationsAttr.java (readAnnotationEntry): Set
  66. annotationType when entry is read to avoid NullPointerException in
  67. getAnnotation() later.
  68. * AnnotationEntry.java (Value.getValue): Convert enum values.
  69. 2015-06-04 Per Bothner <per@bothner.com>
  70. * PrimType.java (compare): Handle signed vs unsigned types.
  71. 2015-06-03 Per Bothner <per@bothner.com>
  72. * PrimType.java (numberHierarchy): Add IntFraction.
  73. 2015-05-29 Per Bothner <per@bothner.com>
  74. * PrimType.java (isUnsigned): New method.
  75. * CodeAttr.java (fixUnsigned): New method.
  76. (emitConvert): Change parameter types to PrimType.
  77. Handle converting to/from unsigned integer types.
  78. 2015-05-20 Per Bothner <per@bothner.com>
  79. * PrimType.java (numberHierarchy): Add gnu.math.UXxx classes.
  80. * ClassType.java (getDeclaredMethod): Prefer non-synthetic
  81. non-bridge methods.
  82. 2015-05-15 Per Bothner <per@bothner.com>
  83. Optimizations to avoid redundant goto.
  84. * CodeAttr.java (FIXUP_DEFINE_UNREACHABLE): New kind of fixup.
  85. (FIXUP_NONE): Remove unneeded fixup kind.
  86. (fixupSet, fixupEncode, setPreviousLabelHere): New convenience methods.
  87. (processFixups): Optimize many redundant gotos and transfer-to-goto.
  88. * Label.java (defineRaw): Add overload to specify fixup-kind.
  89. * SwitchState.java: Tweaks to stack-types and fixup-chaining.
  90. 2015-05-13 Per Bothner <per@bothner.com>
  91. * Variable.java (scope): Make private.
  92. (getScope, setScope): New accessor methods.
  93. * LocalVarsAttr.java: Update accordingly.
  94. * Scope.java: Likewise.
  95. 2015-05-13 Per Bothner <per@bothner.com>
  96. * Label.java (setTypes): Add sanity check.
  97. 2015-05-08 Jamison Hope <jrh@theptrgroup.com>
  98. * CodeAttr.java (disAssemble): Fix buglet in handling of "ret"
  99. instruction.
  100. 2015-04-16 Per Bothner <per@bothner.com>
  101. * CodeAttr.java (emitCatchStart): New overload that takes a type,
  102. and leaves it to the caller to save/use the exception.
  103. 2015-03-30 Per Bothner <per@bothner.com>
  104. * ObjectType.java (promote): Remove - we don't want to promote
  105. nullType to objectType, since the latter is needed for stack-maps.
  106. * CodeAttr.java (gotoFinallyOrEnd): Revert previous change,
  107. since above change makes it unnecessary.
  108. * CodeAttr.java (addHandle): Note that we're reachable here.
  109. * CodeAttr.java (disAssembleWithFixups): Print FIXUP_TRY_HANDLER.
  110. 2015-03-29 Per Bothner <per@bothner.com>
  111. * CodeAttr.java (emitPushNull): Add overload that takes a type.
  112. (gotoFinallyOrEnd): Specify type of pushed null, in case we need
  113. to emit a stack-map entry.
  114. 2015-03-25 Per Bothner <per@bothner.com>
  115. * CodeAttr.java (emitFinallyEnd): Check if reachableHere() - otherwise
  116. clear end_label and don't generate any code.
  117. 2015-02-28 Per Bothner <per@bothner.com>
  118. * CodeAttr.java (emitWithCleanupCatch, emitWithCleanupDone):
  119. Don't save/restore stack types - that is handled by the Label objects.
  120. (emitTryEnd - 0-argument): Decprecate and make empty.
  121. (emitFinallyStart): Re-order code we only have forward gotos.
  122. 2015-02-17 Per Bothner <per@bothner.com>
  123. * ClassType.java (removeField): New method.
  124. * Method.java (setReturnType): New method.
  125. 2015-01-30 Per Bothner <per@bothner.com>
  126. * ClassType.java (isCompatibleWithValue): Explicit handling of nullType.
  127. 2015-01-29 Per Bothner <per@bothner.com>
  128. * ClassType.java (isCompatibleWithValue): If this is an interface,
  129. and the value type is a class that does not implement the interface
  130. consider it incompatible.
  131. 2014-12-22 Per Bothner <per@bothner.com>
  132. * Type.java (isCompatibleWithValue): New static helper.
  133. 2014-12-15 Victor van den Elzen
  134. * SpecialObjectType.java (compare): Check for comparing
  135. toStringType to itself.
  136. 2014-12-09 Per Bothner <per@bothner.com>
  137. * CodeAttr.java (emitIfIntGEqZero, emitIfIntGEq): New methods.
  138. 2014-12-08 Per Bothner <per@bothner.com>
  139. * ExitableBlock.java (exit): Do nothing if not reachableHere.
  140. * IfState.java (start_stack_size, stack_growth, then_stacked_types):
  141. Remove fields. This old logic was redundant, since using a Label
  142. handles type merging just as well. Actually better, since the old
  143. code had problem setting start_stack_size correctly in some cases.
  144. * CodeAttr.java: Update and simplify accordingly.
  145. 2014-12-02 Per Bothner <per@bothner.com>
  146. * ClassType.java (getAllInterfaces): New method.
  147. (getMethods, getMethod): Use getAllInterfaces.
  148. 2014-11-20 Per Bothner <per@bothner.com>
  149. * SwitchState.java (finish): Don't define after_label if nothing
  150. reaches it.
  151. 2014-11-03 Per Bothner <per@bothner.com>
  152. * CodeAttr.java (disAssemble): Handle invoke dynamic.
  153. * CpoolInvokeDynamic.java (print): Remove excess space.
  154. 2014-08-28 Per Bothner <per@bothner.com>
  155. * Type.java (isCompatibleWithValue): Change interpretation of return
  156. value so 2 means no run-time conversion/check needed.
  157. * ClassType.java (isCompatibleWithValue): New overload.
  158. * ArrayType.java (isCompatibleWithValue): New overload.
  159. * TypeVariable.java (isCompatibleWithValue): New overload.
  160. 2014-08-27 Per Bothner <per@bothner.com>
  161. * ClassType.java (isSubclass, compare): Since toStringType is no
  162. longer a ClassType, remove some dead code.
  163. 2014-08-21 Per Bothner <per@bothner.com>
  164. * SwitchState.java (finish): Update, since defaultLabel is
  165. now allocated in constructor.
  166. 2014-08-12 Andrea Bernardini <andrebask@gmail.com>
  167. * SwitchState.java (finish): Add code to avoid
  168. possible integer overflows.
  169. 2014-08-11 Per Bothner <per@bothner.com>
  170. * Type.java (javalangCharacterType): New static field.
  171. 2014-07-10 Andrea Bernardini <andrebask@gmail.com>
  172. * SwitchState.java: code readability improvements.
  173. 2014-07-29 Per Bothner <per@bothner.com>
  174. Add support for generating MethodHandle constant pool entries.
  175. * CpoolMethodHandle.java: New constructor.
  176. (hashCode, write): New methods.
  177. * ConstantPool.java (addMethodHandle): New methdods.
  178. * CodeAttr.java (emitPushMethodHandle): New method.
  179. * Type.java (javalanginvokeMethodHandleType): New field.
  180. 2014-07-27 Per Bothner <per@bothner.com>
  181. * SpecialObjectType.java: New class that extends ObjectType.
  182. Some properties moved from gnu.kawa.lispexpr.LangObjType.
  183. * Makefile.am: Update accordingly.
  184. * ObjectType.java (getImplementationType): No longer needed.
  185. * Type.java (nullType, toStringType): Now are SpecialObjectType.
  186. 2014-07-10 Per Bothner <per@bothner.com>
  187. Fix for Savannah bug #42713: "MalformedParameterizedTypeException
  188. thrown when compiling". Actually 2 fixes: (1) Make the call
  189. getGenericType lazy (2) don't addField if field is private.
  190. * Location.java (type): Make private.
  191. (getType): Make non-final.
  192. * CodeAttr.java: Update accordingly.
  193. * ClassTypeWriter.java: Likewise.
  194. * Field.java (getType): New override. If we have a reflect-field
  195. and type is null, call getGenericType.
  196. * ClassType.java (addField(java.lang.reflect.Field)): Inline.
  197. (addFields): Inline here. Leave type as null for now,
  198. Also skip if private.
  199. 2014-06-30 Per Bothner <per@bothner.com>
  200. * PrimType.java (convertToRaw): New method.
  201. 2014-06-25 Per Bothner <per@bothner.com>
  202. * Method.java (rmethod): Change type to AccessibleObject.
  203. 2014-06-25 Per Bothner <per@bothner.com>
  204. * Field.java (getAnnotation): New method.
  205. * Method.java (rmethod): New field.
  206. (getAnnotation): New method.
  207. * ClassType.java (AddField): New convenience method.
  208. It also sets rfield.
  209. (addField): Use it.
  210. (addMethod): Set Method's rmethod field.
  211. * RuntimeAnnotationsAttr.java (getAnnotation *2): New methods.
  212. * ArrayType.java (getRawType): New method.
  213. 2014-06-16 Per Bothner <per@bothner.com>
  214. * SwitchState.java: Various fixes, mainly becase fixupChain
  215. doesn't attempt to manage and propagate type-states.
  216. 2014-04-18 Per Bothner <per@bothner.com>
  217. * CodeAttr.java (disAssembleWithFixups): Fix some logic bugs,
  218. most critically in handling of FIXUP_CASE.
  219. (processFixups): Add commented-out call to disAssembleWithFixups.
  220. Support new Java8 constant pool entry types.
  221. * ConstantPool.java (METHOD_HANDLE, METHOD_TYPE, INVOKE_DYNAMIC,
  222. ANY_REF): New constants.
  223. (getForced): Handle new types.
  224. * CpoolInvokeDynamic.java: New class, extends CpoolEntry.
  225. * CpoolMethodHandle.java: New class, extends CpoolEntry.
  226. * CpoolMethodType.java: New class, extends CpoolEntry.
  227. * Makefile.am: Update accordingly.
  228. 2014-03-01 Per Bothner <per@bothner.com>
  229. * Scope.java (fixParamNames): New method to rename parameter names.
  230. 2014-02-17 Per Bothner <per@bothner.com>
  231. * ArrayClassLoader.java: Make sure Error is uncaught or re-thrown.
  232. * ClassType.java: Likewise.
  233. 2014-02-12 Per Bothner <per@bothner.com>
  234. * CodeAttr.java (emitAndThen): New method.
  235. (pushIfState): New private convenience method. Use as needed.
  236. * IfState.java (andThenSet): New field.
  237. 2013-12-29 Per Bothner <per@bothner.com>
  238. * CodeAttr.java (emitGotoIfNull, emitGotoIfNonNull): New methods.
  239. 2013-12-02 Per Bothner <per@bothner.com>
  240. * CodeAttr.java (castNeeded): Force top-type to raw type.
  241. This is needed for TypeVariable in addition to UninitializedType.
  242. 2013-11-13 Per Bothner <per@bothner.com>
  243. * ObjectType.java (getReflectClass): Simplify since we can
  244. now assume that Throwable#getCause is available.
  245. 2013-11-07 Per Bothner <per@bothner.com>
  246. * ArrayClassLoader.java (loadClass): Fix logic error from change
  247. made 2008-05-10. Fixes bug reported by Charles Turner.
  248. 2013-09-16 Per Bothner <per@bothner.com>
  249. * ClassType.java (JDK_1_8_VERSION): New constant.
  250. * CodeAttr.java (emitNewArray): Fix logic error noted by
  251. Charles Turner.
  252. 2013-07-18 Per Bothner <per@bothner.com>
  253. * Variable.java (freeLocal): Avoid out-of-bounds indexing of
  254. local_types array. This fixes Savannah bug # 39151
  255. "ArrayOutOfBoundsException in Variable.freeLocal".
  256. 2013-07-11 Per Bothner <per@bothner.com>
  257. * CodeAttr.java (pushAutoPoppableScope): New method.
  258. (popScope): Keep popping Scopes until we pop a non-autoPop Scope.
  259. * Scope.java (autoPop): New field.
  260. * Scope.java (getStartLabel, getEndLabel): New accessor methods.
  261. * CodeAttr.java (emitTailCall): Add overloaded method.
  262. 2013-06-28 Per Bothner <per@bothner.com>
  263. * ClassType.java (writeToStream): Set ADD_ENCLOSING_DONE
  264. in addition to ADD_FIELDS_DONE and ADD_METHODS_DONE.
  265. 2013-06-02 Per Bothner <per@bothner.com>
  266. * Type.java (isCompatibleWithValue): New method.
  267. (lowestCommonSuperType): Minor bullet-proofing.
  268. 2013-02-10 Per Bothner <per@bothner.com>
  269. * Type.java (lowestCommonSuperType): Minor tweak.
  270. 2012-12-12 thomas kirk <tk@research.att.com>
  271. * ZipLoader.java (loadAllClasses): Don't load duplicate.
  272. Fixes Savannah bug #37910 "gnu.bytecode.ZipLoader:loadAllClasses
  273. not checking for previous definitions".
  274. 2012-12-09 Per Bothner <per@bothner.com>
  275. * TypeVariable.java: @Override annotation should not be in comment.
  276. * ParameterizedType.java: Likewise.
  277. 2012-11-05 Per Bothner <per@bothner.com>
  278. Fix bug in encodding of enum annotation values. They should
  279. use the enum type's descriptor (signature), not "internal name".
  280. * AnnotationEntry.java (decodeEnumEntry): New static method.
  281. (print): Use it.
  282. * RuntimeAnnotationsAttr.java (assignConstants): Use decodeEnumEntry.
  283. * ClassType.java (nameToSignature): New static method.
  284. (setName): Use it.
  285. 2012-10-06 Per Bothner <per@bothner.com>
  286. Change so reading a class cann detecte neverReturnsType easily.
  287. * Type.java (neverReturnsType): Change to use Type$NeverReturns.
  288. (NeverReturns): New helper class.
  289. 2012-09-27 Per Bothner <per@bothner.com>
  290. * Field.java (setModifiers): New method.
  291. 2012-08-16 Per Bothner <per@bothner.com>
  292. * ExitableBlock.java: When exiting, we may need to pop the stack.
  293. 2012-07-17 Per Bothner <per@bothner.com>
  294. * CodeAttr.java (emitInvoke): Use invokespecial if method is private.
  295. Fixes Savannah bug #36856 "More Dalvik issues".
  296. 2012-06-19 Per Bothner <per@bothner.com>
  297. * Label.java (isUsed): New method.
  298. 2012-04-22 Per Bothner <per@bothner.com>
  299. * CodeAttr.java (emitFi): Fix logic for updating unreachability.
  300. 2012-02-03 Per Bothner <per@bothner.com>
  301. * Field.java (hasConstantValueAttr): New method.
  302. 2012-01-27 Per Bothner <per@bothner.com>
  303. * ExitableBlock.java (finish): If appropriate, do setUnreachabe().
  304. This fixes Savannah bug #35362: "endless loop + unused continuation".
  305. 2011-12-12 Per Bothner <per@bothner.com>
  306. * Type.java (isInterface): New method.
  307. 2011-12-01 Per Bothner <per@bothner.com>
  308. * ClassType.java (compare): Fix thinko.
  309. * ClassType.java (isSubclass): Add explicit test for Object.
  310. This is both for performance and it helps work around a bug in
  311. subtyping a not-yet resolved ClassExp.
  312. 2011-10-29 Jamison Hope <jrh@theptrgroup.com>
  313. * PrimType.java (unboxedType): New static convenience method.
  314. 2011-10-07 Per Bothner <per@bothner.com>
  315. * ParameterizedType.java (getReflectClass): New method.
  316. 2011-10-01 Jamison Hope <jrh@theptrgroup.com>
  317. * Method.java (isNative): New method.
  318. 2011-08-04 Per Bothner <per@bothner.com>
  319. * CodeAttr.java (emitInc): If increment is zero, do nothing.
  320. 2011-08-03 Per Bothner <per@bothner.com>
  321. * StackMapTableAttr.java (encodeVerificationType): Fix handling of
  322. UninitializedType - which was broken when parameterized types were
  323. added. This fixes Savannah bug #33916 "Build error with Java7".
  324. 2011-07-27 Per Bothner <per@bothner.com>
  325. * ParameterizedType.java (getName): Call toString().
  326. * Type.java (getName): Make non-final.
  327. 2011-07-12 Per Bothner <per@bothner.com>
  328. * Type.java (javalangannotationAnnotationType): New static field.
  329. * AnnotationEntry.java (asAnnotationValue): Moved from
  330. gnu/kawa/reflect/MakeAnnotation.java.
  331. (addMember(String,Object,Type)): New convenience method.
  332. 2011-06-29 Per Bothner <bothner@kuling.bothner.com>
  333. Improved support for parameterized types.
  334. * TypeVariable.java: New class, extends ObjectType.
  335. * Makefile.am: Update accordingly.
  336. * Type.java (make(java.lang.reflect.Type)): Handle TypeVariable.
  337. Fix thinko.
  338. * StackMapTableAttr.java (encodeVerificationType): Use getRawType.
  339. * ClassType.java (getTypeParameters): New method.
  340. (addMethod): Make use of getGenericParameterTypes etc to set types
  341. according to generic Java types.
  342. * Method.java (makeGenericSignature): New method.
  343. (assignConstants): Also emit Signature attribute if appropriate.
  344. * ParameterizedType.java (getRawType): Refine to return a ClassType.
  345. (getTypeArgumentBound): Make more robust.
  346. (getGenericSignature): A tweak to emit a '*' wildcard.
  347. (emitCoerceFromObject): New method.
  348. 2011-06-29 Per Bothner <bothner@kuling.bothner.com>
  349. * Attribute.java (next): Make private.
  350. * ClassTypeWriter.java (printAttributes): Use getNext method.
  351. * InnerClassesAttr.java (getFirstInnerClasses): Likewise.
  352. * EnclosingMethodAttr.java (getFirstEnclosingMethod): Likewise.
  353. 2011-06-20 Per Bothner <bothner@kuling.bothner.com>
  354. Start of support for parameterized (generic) types.
  355. * ParameterizedType.java: New class, extends ObjectType.
  356. * Makefile.am: Update accordingly.
  357. * Field.java (assign_constants): Generate Signature attribute if needed.
  358. * CodeAttr.java (castNeeded): Use getRawType, not
  359. getImplementationType, since later may be a ParameterizedType.
  360. * Location.java (getSignature): Likewise get signature of raw typw.
  361. * Type.java (genericSignature): New field.
  362. (getGenericSignature, setGenericSignature,
  363. getMaybeGenericSignature): New methods.
  364. (make): New non-public method to map java.lang.reflect.Type
  365. to gnu.bytecode.Type.
  366. (make): Try former method, but fall back to using Class if that fails.
  367. * ClassType.java (addField): Use new 2-argument make method.
  368. 2011-06-19 Per Bothner <bothner@kuling.bothner.com>
  369. * ClassType.java (getDeclaredStaticMethod): New method.
  370. (getDeclaredMethod): New non-public overloaded method.
  371. * ObjectType.java (compare): Make more robust/correct.
  372. 2011-04-10 Per Bothner <per@bothner.com>
  373. * Type.java (getType, make): Use setExisting method.
  374. * ObjectType.java (getReflectClass): Likewise.
  375. 2011-03-07 Per Bothner <per@bothner.com>
  376. * CodeAttr.java (emitStore): Do nothing if not reachableHere().
  377. (emitInvokeMethod): Likewise.
  378. (emitRawReturn): Likewise.
  379. (emitCatchStart): Note we're reachable at the handler.
  380. Fixes Savannah bug#32678 "set! and endless loop".
  381. 2011-03-04 Per Bothner <per@bothner.com>
  382. * Scope.java (noteStartFunction): Don't call setTypes on start address,
  383. as setStartPC calls define, which calls setTypes anyway.
  384. * Label.java (mergeLocalType): Check length of old localTypes array.
  385. This fixes Savannah bug #32656 "ArrayIndexOutOfBoundsException in
  386. mergeLocalType".
  387. * Label.java (setTypes): If the new local variable array is shorter
  388. than the old one, call mergeLocalType so notifyTypeChangeListeners
  389. gets called.
  390. This fixes Savannah bug #32657 "Verification error with JDK7".
  391. 2011-03-02 Per Bothner <per@bothner.com>
  392. * ObjectType.java (getContextClassLoader): Remove special hack for
  393. getting system ClassLoader (rather than context ClassLoader) on Android
  394. - it causes problems with newer versions of Android and isn't needed.
  395. It's unclear if the hack is still needed for older Android versions.
  396. 2011-01-07 Per Bothner <per@bothner.com>
  397. * AnnotationEntry.java (print): Don't print initial identation
  398. or final newline here.
  399. * RuntimeAnnotationsAttr.java (print): Do it here instead.
  400. * AnnotationEntry.java (Value.print): Thus we can avoid excess
  401. whitespace when printing nested annotation values.
  402. * ClassType.java (isFinal, isAnnotation): New convenience methods.
  403. (compare): More precide results when comparing annotation type
  404. or final class versus interface.
  405. 2011-01-06 Per Bothner <per@bothner.com>
  406. * PrimType.java (boxedType): Handle voidType.
  407. 2011-01-03 Per Bothner <per@bothner.com>
  408. * ClassType.java (getDefaultConstructor): New method.
  409. 2010-12-26 Per Bothner <per@bothner.com>
  410. * RuntimeAnnotationsAttr.java (maybeAddAnnotation): New method.
  411. * AnnotationEntry.java (getRetention, hasTarget): New methods.
  412. 2010-12-01 Per Bothner <per@bothner.com>
  413. * AnnotationEntry.java: Also implement
  414. java.lang.reflect.InvocationHandler.
  415. (invoke): New method.
  416. (Value.getValue, Value.print): Add/fix support for enums and arrays.
  417. * RuntimeAnnotationsAttr.java (getAnnotationsAttr, addAnnotation,
  418. getRuntimeVisibleAnnotations, getRuntimeInvisibleAnnotations):
  419. New methods.
  420. (assignConstants, write): Add/fix support for enums and arrays.
  421. 2010-12-14 Per Bothner <per@bothner.com>
  422. * RuntimeAnnotationsAttr.java (write): Write entry count.
  423. (assignConstants): Count space needed for entry count.
  424. * RuntimeAnnotationsAttr.java (write): Add missing break statement.
  425. * RuntimeAnnotationsAttr.java (assignConstants): String annotation
  426. value uses a UTF8 constant, not a String constant.
  427. 2010-12-01 Per Bothner <per@bothner.com>
  428. * AnnotationDefaultAttr.java: New class, extends Attribute.
  429. * Makefile.am: Update accordingly.
  430. * ClassFileInput.java (readAttribute): Read AnnotationDefault attribute.
  431. * RuntimeAnnotationsAttr.java (write, assignConstants): Change to
  432. static, so they can be called from AnnotationDefaultAttr.
  433. * AnnotationEntry.java (print): Use printQuoteString for strings.
  434. 2010-11-29 Per Bothner <per@bothner.com>
  435. Aim for complete support for Annotations.
  436. * AttrContainer.java (getConstants): New method.
  437. * Attribute.java (getConstants): New method.
  438. * Field.java (getConstants): New method.
  439. * ClassTypeWriter.java (printOptionalIndex): Skip if index is <= 0.
  440. * AnnotationEntry.java (Value): New member class.
  441. Add partial javax.lang.model.AnnotationValue support.
  442. Add support for printing AnnotationEntry and Value instances.
  443. * RuntimeAnnotationsAttr.java: Add support for parsing, generating,
  444. and printing Annotation attributes.
  445. Split support for printing RuntimeAnnotationsAttr into separate
  446. pieces: First read/parse, then separate print parsed AnnotationEntrys.
  447. * ClassFileInput.java (readAttribute): Change to use new
  448. RuntimeAnnotationsAttr.readAnnotationEntry rather than reading an
  449. unparsed data array.
  450. 2010-11-26 Per Bothner <per@bothner.com>
  451. * dump.java (main): If the context ClassLoader is null,
  452. use the SystemClassLoader.
  453. 2010-11-22 Per Bothner <per@bothner.com>
  454. * StackMapTableAttr.java (encodeVerificationType): Fix handling of
  455. Type.nullType - it's imlementation-type is objectType.
  456. 2010-11-18 Per Bothner <per@bothner.com>
  457. * ClassType.java (getSimpleName): Make use of enclosingMember,
  458. rather than unreliable scanning for '$'.
  459. * InnerClassesAttr.java (print): Add a printOptionalIndex call.
  460. 2010-10-26 Per Bothner <per@bothner.com>
  461. * PrimType.java (compare): Catch case where other is a LangPrimType.
  462. For example compare of Type.intType and Scheme.booleanType should be -1.
  463. 2010-10-24 Per Bothner <per@bothner.com>
  464. * Type.java (getSignature): Make non-final.
  465. * ArrayType.java (<init>): Don't set signature yet, instead set it
  466. lazily, as component type might not have a name yet.
  467. (getSignature): If signature field is null, set it now.
  468. * Field.java (assign_constants): Use getSignature method.
  469. * LocalVarsAttr.java: Likewise.
  470. 2010-10-23 Per Bothner <per@bothner.com>
  471. * Type.java (isExisting): New method.
  472. * ObjectType.java (isExisting): Simplify using new isExisting.
  473. 2010-10-16 Per Bothner <per@bothner.com>
  474. * PrimType.java (compare): Treat boolean as equal to java.lang.Boolean.
  475. Likewise for char and java.lang.Character.
  476. 2010-10-06 Per Bothner <per@bothner.com>
  477. * PrimType.java (findInHierarchy): Calculate priority/hierarchy of
  478. Number class.
  479. (compare): Use above to compare primtive type with Number class.
  480. 2010-10-05 Per Bothner <per@bothner.com>
  481. Fix Savannah 31250 "try/catch & endless loop".
  482. * Scope.java (setStartPC): We don't want to set the reachable flag.
  483. 2010-09-30 Per Bothner <per@bothner.com>
  484. * ClassType.java (compare): Special-case the care of comparing
  485. Object and an inteface.
  486. 2010-09-29 Per Bothner <per@bothner.com>
  487. Fix various problems with StackMapTable.
  488. * SwitchState.java: Replace calls to Label#setTypesSame (optimization
  489. which causes problems with StackMapTable) by calls to setTypes.
  490. * StackMapTableAttr.java (emitStackMapEntry): Don't include unused
  491. "tail" locals in local variable count/
  492. * Variable.java (freeLocal): Also null out local_types element.
  493. * CodeAttr.java (previousLabel, varsSetInCurrentBlock): New fields.
  494. (fixupAdd): Explicitly note when needsStackMapEntry.
  495. (noteVarType): Note definition in varsSetInCurrentBlock array.
  496. (processFixups): Use needsStackMapEntry.
  497. (mergeLabels): Simplify.
  498. * Scope.java (setStartPC): Need to use define rather than more
  499. efficinet defineraw, since tailcalls may jump to the start label.
  500. * Label.java: Add a framework so that when a locaTypes[varnum] is
  501. changed (nulled) then also invalidate for any labels that depend
  502. on this labels - i.e. that the variable flows to.
  503. (needsStackMapEntry, typeChangeListeners): New fields.
  504. (mergeLocalType, notifyTypeChangeListeners, addTypeChangeListener,
  505. addTypeChangeListeners): New methods.
  506. 2010-09-28 Per Bothner <per@bothner.com>
  507. * Method.java (init_param_slots): Change to just call startCode.
  508. 2010-09-20 Per Bothner <per@bothner.com>
  509. * ClassType.java (checkSingleAbstractMethod): New method.
  510. * ClassType.java (AbstractMethodFilter): New static member class.
  511. (getAbstractMethods): New method.
  512. 2010-09-17 Per Bothner <per@bothner.com>
  513. * PrimType.java (boxedType): New method.
  514. (emitCoerceToObject): Use boxedType.
  515. * PrimType (compare): Return -3 if not shown to be compatible.
  516. 2010-08-28 Per Bothner <per@bothner.com>
  517. * CodeAttr.java (emitInvokeMethod): After initialization we also need
  518. to remove UninitializedType from the local_types array.
  519. * Label.java (mergeTypes): New method. It differs from
  520. Type.lowestCommonSuperType in that merging a PrimType and a
  521. non-PrimType returns null rather than objectType.
  522. 2010-08-07 Per Bothner <per@bothner.com>
  523. * Type.java (class ClassToTypeMap): Change to a member class.
  524. Remove default constructor.
  525. (ClassToTypeMap.matches): Fix - parameter should be key type,
  526. not value type.
  527. 2010-08-01 Per Bothner <per@bothner.com>
  528. * ClassType.java: Add 'synchronized' a bunch of places. This is needed
  529. when reading "existing" classes, because we share a global
  530. mapNameToType and hence the set of existing classes is shared.
  531. * Field.java: Likewise.
  532. * ClassType.java (make(String,ClassType)): Deprecate.
  533. 2010-07-19 Per Bothner <per@bothner.com>
  534. * CpoolFloat.java: Remove no-longer-used class.
  535. Replaced by CpoolValue1.java - in 1997!
  536. 2010-04-10 Per Bothner <per@bothner.com>
  537. * AnnotationEntry.java: New class - a placeholder for future
  538. annotation support.
  539. 2010-04-02 Per Bothner <per@bothner.com>
  540. * PrimType.java (coerceFromObject): Add support for boolean.
  541. 2010-01-10 Per Bothner <per@bothner.com>
  542. * RuntimeAnnotationsAttr.java (printAnnotationElementValue):
  543. Print a class annotation value.
  544. Support reading/printing (but not yet generating) annotations.
  545. * RuntimeAnnotationsAttr.java: New class, extends MiscAttr, for
  546. "RuntimeVisibleAnnotations" or "RuntimeInvisibleAnnotations".
  547. * Makefile.am: Update accordingly.
  548. * ClassTypeWriter.java (PRINT_EXTRAS): New flag.
  549. (printSpaces, getCpoolEntry, printConstantTersely,
  550. printContantUtf8AsClass): New methods.
  551. * ClassFileInput.java (readAttribute): Handle
  552. "RuntimeVisibleAnnotations" and "RuntimeInvisibleAnnotations".
  553. * MiscAttr.java (u1, u2): New methods.
  554. * Type.java (printSignature): Add fall-back/default.
  555. * StackMapTableAttr.java (write): Call super write.
  556. * ClassFileInput.java (getClassConstant): New convenience method.
  557. (readClassInfo): Use it.
  558. * dump.java (main): Better error message if opening jar: URL fails.
  559. * StackMapTableAttr.java: Change to extend MiscAttr.
  560. Move data, dataLength to MiscAttr.
  561. Data and fdataLength now include the initial 'numEntries' field.
  562. (put1, pu2, u1, u2): Likewise.
  563. * ClassFileInput.java (readAttribute): Change since the data array
  564. passed to StackMapTableAttr includes initial 2-byte numEntries field.
  565. * MiscAttr.java (put1, pu2, u1, u2): Moved from StackMapTableAttr.
  566. (length): Rename to dataLength.
  567. 2009-10-19 Per Bothner <per@bothner.com>
  568. * Type.java (getRealType): New method.
  569. 2009-09-29 Per Bothner <per@bothner.com>
  570. * ClassTypeWriter.java (setClass): New method.
  571. * ClassTypeWriter.java (printMethod): New method.
  572. (printMethods): Use it.
  573. * ArrayClassLoader.java (getResourceAsStream): New overriding method.
  574. If asking with a matching .class file, open a ByteArrayInputStream
  575. on the class bytes - which means these now have to be preserved
  576. even after the class has been loaded.
  577. 2009-09-15 Per Bothner <per@bothner.com>
  578. * Type.java (emitConvertFromPrimitive): New method.
  579. 2009-09-14 Per Bothner <per@bothner.com>
  580. * PrimType.java (coerceFromObject): Use valueOf methods, if JAVA5.
  581. * CodeAttr.java (castNeeded): Return false if types match.
  582. In addition to being an optimization, this makes primitive-array
  583. types work.
  584. 2009-09-12 Per Bothner <per@bothner.com>
  585. * PrimType.java (emitCoerceToObject): Use '{Integer,...}.valueOf'
  586. methods rather than 'new {Integer,...}' if Java5 or later.
  587. 2009-08-05 Per Bothner <per@bothner.com>
  588. * ClassType.java (isAccessible): Fix buglet.
  589. * ClassType.java (getMethods): Follow java inheritance spec more
  590. closely. We don't need the call context - but whether a method is
  591. inherited may depend on whether they're in the same package.
  592. Update calls.
  593. This fixes Savannah bug #27019 "setLength method of StringBuilder
  594. not found".
  595. * ObjectType.java (getMethods): Update, and create @deprecated stub.
  596. * ArrayType.java (getMethods): Update for new API.
  597. * Method.java (<init>): New constructor.
  598. 2009-07-29 Per Bothner <per@bothner.com>
  599. * ClassType.java (getMethods(Filter,int,Vector,String)): Generalize
  600. Vector argument to List<Method>.
  601. (getMethods(Filter,int,Method[],String)): Re-implement to use
  602. above method.
  603. (countMethods, getMethods(Filter,int)): Likewise.
  604. * ObjectType.java (getMethod): Likewise generalize Vector->List.
  605. 2009-07-15 Per Bothner <per@bothner.com>
  606. * CodeAttr.java (noteVarType): Make sure re-sized array is big enough.
  607. Follow-up to previous fix for Savannah bug #27011
  608. "ArrayIndexOutOfBoundsException after 20 local variables" - now
  609. with 42 variables.
  610. 2009-07-11 Per Bothner <per@bothner.com>
  611. * CodeAttr.java (noteVarType): Make sure fresh array is big enough.
  612. This fixes Savannah bug #27011 "ArrayIndexOutOfBoundsException after
  613. 20 local variables".
  614. 2009-07-03 Per Bothner <per@bothner.com>
  615. * CodeAttr.java: Fix thinko when comparing opcodes.
  616. Fixes bug reported by Martin Ward.
  617. 2009-07-02 Per Bothner <per@bothner.com>
  618. * CodeAttr.java (setType): Fix thinko - compare against stack length.
  619. Also rename local labelSP to usedStack.
  620. Fixes bug reported by Helmut Eller.
  621. 2009-06-28 Per Bothner <per@bothner.com>
  622. * CodeAttr.java (emitStore): Don't check if var is dead - this can be
  623. useful for pushing parameters to a previously compiled inlined procedure,
  624. followed by a jump to the procedure label - see gnu.expr.ApplyExp.
  625. 2009-04-21 Per Bothner <per@bothner.com>
  626. * ObjectType.java (getContextClassLoader): Reportedly on Android
  627. Thread#getContextClassLoader doesn't work.
  628. 2009-04-16 Per Bothner <per@bothner.com>
  629. * Type.java (errorType): New static.
  630. 2009-02-23 Per Bothner <per@bothner.com>
  631. * Type.java (class ClassTypeToMap): New class.
  632. (mapClassToType): Change to use ClassTypeToMap instead of WeakHashMap.
  633. 2009-01-14 Per Bothner <per@bothner.com>
  634. * dump.java (main): Make more bullet-proof.
  635. (usage): Fix typos for jar: URL syntax.
  636. 2008-12-29 Per Bothner <per@bothner.com>
  637. * ClassType.java (isAccessible): New convenience method. This also
  638. checks whether the member is static, in case of protected access.
  639. 2008-12-28 Per Bothner <per@bothner.com>
  640. * SwitchState.java (finish): Optimize a single 'case 0'.
  641. 2008-12-27 Per Bothner <per@bothner.com>
  642. Generate StackMapTable attributes.
  643. * ExitableBlock.java: New class.
  644. * Makefile.am: Update accordingly.
  645. * CodeAttr.java (startExitableBlock, endExitableBlock): New methods.
  646. * StackMapTableAttr.java (emitStackMapEntry): Generate an entry
  647. for a given position in the StackMapTable attribute. Handles
  648. appropriate encoding and compression.
  649. * SwitchState.java (typeState): Remove field - instead we remember
  650. the type-state in cases_label.
  651. (switchValuePushed): Do the popType of the switch value here.
  652. (addCase, addDefault): Remove methods with explicit Labels.
  653. (exitSwitch): New method.
  654. * CodeAttr.java (startSwitch): Don't do popType here.
  655. * UninitializedType.java (label): New field.
  656. (<init>): New constructor - takes label of new instruction.
  657. * Method.java (initCode): Call new noteParamTypes methods.
  658. * Variable.java (reserveLocal): Don't explicitly set UninitializedType
  659. here - that is taken care of in noteParamTypes.
  660. * CodeAttr.java: Support for genering StackMapTable.
  661. That requires not using jsr/ret.
  662. (useJsr): New method.
  663. (flag): New field.
  664. (noteParamTypes, noteVarType, setTypes, emitPushDefaultValue,
  665. emitStoreDefaultValue): New methods.
  666. (emitStore): Do noteVarType.
  667. (doPendingFinalizers, saveStackTypeState, restoreStackTypeState):
  668. Remove methods.
  669. (emitTryStart, emitTryEnd, emitCatchStart, emitFinallyStart,
  670. emitFinallyEnd, emitTryCatchEnd): Rewrite to not require jsr/ret.
  671. (processFixups): Rewrite to emit StackMapTable entries.
  672. * Scope.java (noteStartFunction): New convenience method.
  673. * Label.java (stackTypes, localTypes): New fields.
  674. (setTypes, setTypesSame, defineRaw): New methods.
  675. (define): Update type-state.
  676. * TryState.java (returnSwitch): Remove field.
  677. (exitCases, tryClauseDone): New fields.
  678. (outerHandler): New method.
  679. 2008-12-27 Per Bothner <per@bothner.com>
  680. * CodeAttr.java (emitArrayLoad, emitArrayStore): New convenience
  681. methods that don't require the element type to be explicitly specified.
  682. * PrimType.java (promotedType): New method.
  683. * Type.java (lowestCommonSuperType): Use it to "merge" PrimTypes.
  684. Merging otherwise incompatible ObjectTypes yields java.lang.Object.
  685. 2008-12-23 Per Bothner <per@bothner.com>
  686. * ClassType.java (isAccessible): Add extra parameter for the
  687. "receiver" type, so we can properly check protected access.
  688. 2008-12-16 Yaroslav Kavenchuk <kavenchuk@gmail.com>
  689. Per Bothner <per@bothner.com>
  690. * Method.java (makeSignature): New method.
  691. 2008-11-23 Per Bothner <per@bothner.com>
  692. * CodeAttr.java (emitBinop): Make public, so ArithOp can use it.
  693. * CodeAttr.java (putLineNumber): Check for null filename.
  694. 2008-11-16 Per Bothner <per@bothner.com>
  695. Make 'dump' more convenient and more flexible.
  696. * ClassTypeWriter.java (PRINT_VERSION, PRINT_VERBOSE,
  697. PRINT_CONSTANT_POOL, PRINT_CONSTANT_POOL_INDEXES): New constants.
  698. (setFlags): New field.
  699. (printConstants): Remove field - use bits in flags field instead.
  700. (print()): New flags field; also print attributes.
  701. (print(ClassType), printAttributes): New methods.
  702. * ClassFileInput.java (readFormatVersion): New method.
  703. * dump.java (<init>): Change calling-sequence and make non-public.
  704. (printAttributes): Move to super-class.
  705. (process): New methods. Handles .jar/.zip as well as .class files.
  706. (main): Create ClassTypeWriter immediately.
  707. New handling to use process and accept class names.
  708. (uriSchemeLength, uriSchemeSpecified): Methods coped from
  709. gnu.text.Path.
  710. (usage): Expand.
  711. * ObjectType.java (getContextClassLoader): New method.
  712. (getContextClass): Use it.
  713. * ConstantValueAttr.java (print): Use printOptionalIndex.
  714. 2008-11-13 Per Bothner <per@bothner.com>
  715. * CodeAttr.java (emitInc): Generalize type check.
  716. 2008-11-11 Per Bothner <per@bothner.com>
  717. * StackMapTableAttr.java (dataLength): New field, for when we
  718. generate this attribute. Use it in place of data.length.
  719. * StackMapTableAttr.java (print): Print locals/stack offset before
  720. types, and generally make printing nicer.
  721. (getMethod): New method.
  722. (printVerificationType, extractVerificationType, reallocBuffer,
  723. extractVerificationTypes, printVerificationTypes): New methods.
  724. (print_verification_type, print_verification_types): Remove methods.
  725. 2008-09-16 Per Bothner <per@bothner.com>
  726. Add support for try-finally without using jsr,
  727. which is incompatible with StackMapTable.
  728. * TryState.java (returnSwitch, exception): New fields.
  729. * CodeAttr.java (callFinally): New helper function.
  730. (doPendingFinalizers): Use it.
  731. (emitTryStart, emitTryEnd, emitFinallyStart, emitFinallyEnd):
  732. Simulate jsr using a switch.
  733. 2008-09-10 Per Bothner <per@bothner.com>
  734. Implement tracking of "uninitialized objects", as a preliminary
  735. step for StackMapTable generation.
  736. * UninitializedType.java: New class, extends ObjectType.
  737. * Makefile.am: Update accordingly.
  738. * Variable.java (reserveLocal): Note that the 'this' parameter in
  739. an <init> starts out as uninitialized.
  740. * CodeAttr.java (emitPushThis): Use emitLoad: If the variable
  741. is uninitialized, we need to push an UninitializedType.
  742. (emitNew): The pushed type is a new UninitializedType.
  743. (emitInvokeMethod): Handle checkin and fixups for <init> methods:
  744. Should be UninitializedType, change to regular ClassType after.
  745. (castNeeded): Handle UninitializedType.
  746. 2008-09-06 Per Bothner <per@bothner.com>
  747. * SwitchState.java (getNumCases): New method.
  748. (switchValuePushed):` New method.
  749. (<init>): Move position-dependent logic to switchValuePushed.
  750. (addCase(int,CodeAttr,Label)): New method.
  751. (addDefault(CodeAttr,Label)): New method.
  752. (addCase): Rename internal method to insertCase.
  753. * CodeAttr.java (startSwitch): New method.
  754. Fix a problem where dump creates fixups, which messes up disassembly.
  755. * CodeAttr.java (CodeAttr.java): If fixup_count is -1, skip fixups.
  756. (processFixups): Also skip if fixup_count is negative, not just zero.
  757. (disAssembleWithFixups, disAssemble): Treat negative
  758. fixup_count like zero.
  759. * ClassFileInput.java (readAttribute): Set fixup_count of new CodeAttr
  760. to -1.
  761. * Label.java (define): Don't fixupAdd if fixup_count is negative.
  762. 2008-07-16 Per Bothner <per@bothner.com>
  763. Various improvements in class file printing.
  764. * SignatureAttr.java: New class, extends Attribute.
  765. * Makefile.am: Update accordingly.
  766. * ClassFileInput.java (readAttribute): Recognize "Signature" attribute.
  767. * SourceFileAttr.java (print): Optionally index index.
  768. * MiscAttr.java (print): Print contents, in hex.
  769. * dump.java: Recognize -verbose/-verbose; only print constant pool
  770. contents and indexes when verbose is set.
  771. 2008-05-22 Per Bothner <per@bothner.com>
  772. * Type.java (javalangObjectType, javalangStringType, toStringType,
  773. javalangBooleanType, javalangThrowableType, javalangNumberType,
  774. javalangClassType): New names for existing static fields.
  775. (pointer_type, string_type, tostring_type, boolean_ctype,
  776. throwable_type, number_type, java_lang_Class_type): The old names
  777. kept as deprecated aliases.
  778. (objectTYpe): New synonym for javalangObjectType.
  779. 2008-05-21 Per Bothner <per@bothner.com>
  780. * Type.java (byteType, shortType, intType, longType, floatType,
  781. doubleType, booleanType, charType, voidType): New names for
  782. existing static fields.
  783. (byte_type, short_type, int_type, long_type, float_type,
  784. double_type, boolean_type, char_type, void_type): The old names,
  785. kept as deprecated aliases.
  786. 2008-05-18 Per Bothner <per@bothner.com>
  787. * ClassType.java: Add constants and methods to tweak class file
  788. version numbers more cleanly.
  789. (setClassFileVersion(int), getClassfileVersion): New methods.
  790. (JDK_1_1_VERSION, JDK_1_2_VERSION, JDK_1_3_VERSION, JDK_1_4_VERSION,
  791. JDK_1_5_VERSION, JDK_1_6_VERSION, JDK_1_7_VERSION): New constants.
  792. 2008-05-10 Per Bothner <per@bothner.com>
  793. * ObjectType.java (isExisting): Generalize for ArrayType and classes
  794. that have a different implementation-type.
  795. Immediate impetus is handling tostring_type.
  796. * ArrayClassLoader.java (addClass(ClassType)): Defer mapping to Class
  797. until loadClass, because it could be a class in a module we have't
  798. compiled yet.
  799. (loadClass): Do deferred handing of ClassType.
  800. 2008-05-04 Per Bothner <per@bothner.com>
  801. * ClassType.java (getSimpleName): Fixed two bugs - wrong PreProcess
  802. macro; a comment that would confuse PreProcess. Fixes bug reported by
  803. Leonardo Valeri Manera <l.valerimanera@gmail.com>.
  804. * ClassType.java (doFixups): Fix thinko.
  805. * InnerClassesAttr.java (addClass): Fix thinko.
  806. (print): Fix buglets.
  807. 2008-05-03 Per Bothner <per@bothner.com>
  808. Better support for InnerClasses attributes.
  809. * CpoolClass.java (clas): New ObjectType field.
  810. (getClassType): Use or set clas field.
  811. (getClassName): New convenience method.
  812. * ClassType.java (getSimpleName, addMemberClass, getDeclaredClass,
  813. addMemberClasses): New methods.
  814. (addEnclosingMember): Make non-public.
  815. (firstInnerClass, nextInnerClass): New fields.
  816. (doFixUps): Add InnerClasses entries as required by JVM spec.
  817. * InnerClassesAttr.java (getFirstInnerClasses): New static method.
  818. (addClass): New method.
  819. (assignConstant): Now just a stub, since addClass does the work.
  820. (print): Various updates.
  821. * ObjectType.java (ADD_MEMBERCLASSES_DONE): New constant.
  822. * EnclosingMethodAttr.java (getFirstEnclosingMethod): New method.
  823. (assignConstants): Re-write.
  824. * ConstantPool.java (addClass(ObjectType)): Remember clas field.
  825. (addmethodRef, addFieldRef): Use addClass(ObjectType).
  826. (getForcedClass): New method.
  827. * CodeAttr.java (emitPushClass(String)): Remove no-longer-needed method.
  828. 2008-05-02 Per Bothner <per@bothner.com>
  829. * StackMapTableAttr.java (print_verification_type): Use named constant.
  830. 2008-04-28 Per Bothner <per@bothner.com>
  831. * StackMapTableAttr.java: New class, extends Attribute.
  832. * Makefile.am: Update accordingly.
  833. * ClassFileInput.java (readAttribute): Recognize StackMapTable.
  834. * Type.java (printSignature): New method.
  835. * CpoolClass.java (print): Use Type.printSignature for array types.
  836. * CodeAttr.java (emitPushNull): Push nullType, rather than pointer_type.
  837. 2008-04-27 Per Bothner <per@bothner.com>
  838. * ClassType.java (addMethods): Use addMethod(java.lang.reflect.Method)
  839. and addMethod(java.lang.reflect.Constructo).
  840. 2008-04-26 Per Bothner <per@bothner.com>
  841. * CodeAttr.java (emitPushClass(ObjectType)): New method.
  842. * CodeAttr.java (emitCheckcast): Generalize to allow ObjectType.
  843. * SwitchState.java (addCase): Use unsigned shift to avoid
  844. potential overflow error in binary search.
  845. 2008-04-24 Per Bothner <per@bothner.com>
  846. * CodeAttr.java (processFixups): Drop redundant line number entries.
  847. 2008-04-08 Elliott Hughes <enh@jessies.org>
  848. Per Bothner <per@bothner.com>
  849. * package.html: Add example, plus sme other tweaks.
  850. * dump.java: Add more javadoc.
  851. 2008-04-08 Per Bothner <per@bothner.com>
  852. * Access.java: Various new constants. Explicit support for
  853. acess flags in InnerClasses attribute.
  854. * InnerClassesAttr.java (print): Pass Access.INNERCLASS_CONTEXT.
  855. * ClassType.java: Now also implement Member.
  856. (getStaticFlag): New method, needed to implement Member.
  857. (enclosingMember): New field.
  858. (getDeclaringClass, getEnclosingMember, setEnclosingMember,
  859. addEnclosingMember, addMethod, addMode): New methods.
  860. * ObjectType.java (ADD_ENCLOSING_DONE): Add flag.
  861. * Access.java (CLASS_CONTEXT, INNERCLASS_CONTEXT, FIELD_CONTEXT,
  862. METHOD_CONTEXT, INNERCLASS_MODIFIERS): New constants.
  863. 2008-03-01 Per Bothner <per@bothner.com>
  864. * EnclosingMethodAttr.java: New extends, extends Attribute.
  865. * Makefile.am: Update accordingly.
  866. * ClassFileInput.java (readAttribute): Recognize EnclosingMethod
  867. attribute.
  868. 2008-02-28 Per Bothner <per@bothner.com>
  869. * ClassTypeWriter.java (printOptionalIndex): Print '#' first.
  870. 2007-11-04 Per Bothner <per@bothner.com>
  871. * ArrayClassLoader.java: Revert following the Java2 delegation model.
  872. Give the current ClassLoader priority over ancestor ClassLoaders.
  873. (loadClass): New methods.
  874. (findClass): Remove method.
  875. 2007-11-02 Per Bothner <per@bothner.com>
  876. * ObjectType.java (getField, getMethod, getMethods): New methods.
  877. * PrimType.java (compare): If other is non-ClassType non-ArrayType
  878. defer to other (perhaps a LangObjType).
  879. 2007-04-01 Per Bothner <per@bothner.com>
  880. * ArrayClassLoader.java (getContextPackage): New static method.
  881. 2007-03-13 Per Bothner <per@bothner.com>
  882. * ClassType.java (access_flags): Make non-public.
  883. (addModifiers): New method.
  884. 2007-02-08 Per Bothner <per@bothner.com>
  885. * ArrayType.java: Implement Externalizable.
  886. (writeExternal, readExternal, readResolve): New methods.
  887. * ArrayType.java (getReflectClass): New method.
  888. Use element's ClassLoader.
  889. * Type.java: Implement java.lang.reflect.Type if JAVA5.
  890. 2007-01-20 Per Bothner <per@bothner.com>
  891. * ObjectType.java (getContextClass): Fix so PreProcess doesn't break.
  892. 2007-01-19 Per Bothner <per@bothner.com>
  893. * ObjectType.java (thisClassLoader): New field.
  894. (getContextClass): New static method.
  895. (getReflectClass): Use getContextClass.
  896. 2007-01-14 Per Bothner <per@bothner.com>
  897. * ArrayClassLoader.java: Change to use Java 1.2 delegation model.
  898. I.e. implement findClass rather than loadClass if JAVA2 is enabled.
  899. (<init>): New constructor, to pass in parent ClassLoader.
  900. 2007-01-02 Per Bothner <per@bothner.com>
  901. * Method.java (makeCloneMethod): New method.
  902. * ObjectType.java (getMethods): New method, "moved up" from ClassType.
  903. * ArrayType.java (getMethods): New method.
  904. * Type.java (clone_method): New static Method field.
  905. 2006-12-05 Per Bothner <per@bothner.com>
  906. * ClassType.java (setInterface): Also set/clear Access.ABSTRACT.
  907. * ClassType.java (compare): tostring_type is less specific than Object.
  908. * Method.java (types): Add generic parameters if JAVA5.
  909. * ZipLoader.java (loadedClasses): Likewise.
  910. * Type.java (mapClassToType, mapNameToType): Likewise.
  911. (lookupType, getType, registerTypeForClass, make, <clinit>):
  912. Update, add synchronization.
  913. * ClassType.java (readResolve): Likewise.
  914. * ObjectType.java: Suppress warning.
  915. 2006-11-25 Per Bothner <per@bothner.com>
  916. * PrimType.java (compare): Add some more special cases.
  917. 2006-11-22 Per Bothner <per@bothner.com>
  918. * CodeAttr.java (calculateSplit): Make static.
  919. 2006-11-20 Per Bothner <per@bothner.com>
  920. * Variable.java (dead): Make public.
  921. * CodeAttr.java (emitWithCleanupStart): Use emitTryStart.
  922. (emitWithCleanupCatch): Need to save and then clear stack_types.
  923. (emitWithCleanupDone): Restore stack_types.
  924. * TryState.java (savedTypes): New field.
  925. 2006-11-18 Per Bothner <per@bothner.com>
  926. * ObjectType.java: Share some code between JAVA2 and non-JAVA2 case.
  927. * Type.java (getSizeInWords): New method.
  928. * Variable.java (reserveLocal): Use getSizeInWords.
  929. 2006-11-15 Per Bothner <per@bothner.com>
  930. * ObjectType.java (isInstance): New method - handle nullType.
  931. 2006-11-07 Per Bothner <per@bothner.com>
  932. * CodeAttr.java (instructionLineMode): New static option field.
  933. (assignConstants): Handle instructionLineMode.
  934. 2006-10-31 Per Bothner <per@bothner.com>
  935. * ClassType.java (compare): Compare wapped always if not ClassType.
  936. For example for XDataType. Also a simplification.
  937. * Type.java (mapClassToType): Use WeakHashMap if JAVA2.
  938. 2006-09-11 Per Bothner <per@bothner.com>
  939. * SourceDebugExtAttr.java: Remove unused local variable.
  940. 2006-06-12 Per Bothner <per@bothner.com>
  941. * ClassType.java (isSubclass): New method.
  942. 2006-05-30 Per Bothner <per@bothner.com>
  943. * ClassType.java (classfileFormatVersion): New field.
  944. (major_version, minor_version): Remove constants.
  945. (getClassfileMajorVersion, getClassfileMinorVersion.
  946. setClassfileVersion, setClassfileVersionJava5): New me thods.
  947. (writeToStream): Write major/minor version values instead of constants
  948. * ClassFileInput.java (readHeader): Read and remember version numbers.
  949. 2006-05-23 Per Bothner <per@bothner.com>
  950. * ClassFileInput.java: Remove unused local variables.
  951. * ClassType.java: Likewise.
  952. * ListCodeSize.java: Likewise.
  953. * SourceDebugExtAttr.java: Likewise.
  954. 2006-05-20 Per Bothner <per@bothner.com>
  955. * Field.java (setConstantValue): Allocate constant pool if needed.
  956. 2006-04-10 Per Bothner <per@bothner.com>
  957. * ClassType.java (getField): Also check super-interfaces.
  958. 2006-03-07 Per Bothner <per@bothner.com>
  959. * Type.java (<init>(Type)): New copy constructor.
  960. 2006-03-01 Per Bothner <per@bothner.com>
  961. * Method.java (cleanupAfterCompilation): New method.
  962. * ClassType.java (cleanupAfterCompilation): New method.
  963. 2006-02-19 thomas kirk <tk@research.att.com>
  964. Per Bothner <per@bothner.com>
  965. * ZipLoader.java (loadAllClasses): Return first class
  966. in archive (i.e. the main class).
  967. 2006-02-19 Per Bothner <per@bothner.com>
  968. * Member.java: New interface.
  969. * Makefile.am: Update coordingly.
  970. * Field.java: Implements Member.
  971. * Method.java: Implement Member.
  972. 2006-02-01 Per Bothner <per@bothner.com>
  973. * ListCodeSize.java: New utility application class.
  974. * Makefile.am: Update accordingly.
  975. * Method.java (listParameters): New method.
  976. (toString): Use listParameters.
  977. * ArrayClassLoader.java: Remove unneeded import.
  978. 2006-01-24 Per Bothner <per@bothner.com>
  979. * ClassType.java (getDeclaredMethod): If arg_types[i] is null,
  980. match any parameter type.
  981. (getMethod): Don't check that method is public; let caller
  982. check that method is accessible.
  983. 2005-12-31 Per Bothner <per@bothner.com>
  984. * ObjectType.java (getReflectClass): Un-tab-ify conditional text.
  985. 2005-12-11 Per Bothner <per@bothner.com>
  986. * ArrayClassLoader.java (context): New field.
  987. (getResourceContext, setResourceContext, findResource): New methods.
  988. 2005-11-23 Per Bothner <per@bothner.com>
  989. * ClassType.java (getOuterLinkType): New method.
  990. (setOuterLink): Change to return link Field instead of void.
  991. 2005-11-22 Per Bothner <per@bothner.com>
  992. * ClassType.java (getField): New method, takes mask.
  993. (getField): Old method now just calls new method.
  994. (addFields): Now add all fields, not just public|protected ones.
  995. (addmethods): Likewise.
  996. (getMethod): Only match public methods.
  997. * ClassType.java (addMethod): Reimplement using shared code.
  998. 2005-11-21 Per Bothner <per@bothner.com>
  999. * ObjectType.java (HAS_OUTER_LINK): New flag,
  1000. * ClassType.java (hasOuterLink, setOuterLink): New methods.
  1001. (addField): Set HAS_OUTER_LINK if "this$0" field seen.
  1002. (getDeclaredMethod): Adjust if hasOuterLink().
  1003. * Method.java (signature): Make non-private so ClassType can clear it.
  1004. 2005-11-16 Per Bothner <per@bothner.com>
  1005. * ClassType.java (getPackageName): Fix thinko.
  1006. 2005-11-14 Per Bothner <per@bothner.com>
  1007. * ClassType.java (getMethod): Also search implemented interfaces.
  1008. 2005-10-27 Per Bothner <per@bothner.com>
  1009. * ClassType.java (getSuperclass): Only getReflectClass() if isExisting.
  1010. 2005-10-16 Per Bothner <per@bothner.com>
  1011. * ClassType.java (isAccessible): Fix thinko.
  1012. * CodeAttr.java (castNeeded): New static hekp method that handles
  1013. ArrayTypes as well as ClassTypes.
  1014. (emitCheckcast): Make use of castNeeded.
  1015. 2005-09-25 Per Bothner <per@bothner.com>
  1016. * Type.java (make): Remove redundant statement.
  1017. 2005-07-28 Dean Ferreyra <dean@octw.com>
  1018. * ClassType.java (getInterfaces): Add missing needed synchornized.
  1019. 2005-05-30 Per Bothner <per@bothner.com>
  1020. * Variable.java (isArtificial, setArtificial): Remove unused methods.
  1021. (ARTIFICIAL_FLAG): Remove unused constant.
  1022. 2005-05-16 Per Bothner <per@bothner.com>
  1023. * CodeAttr.java (pushScope): All our own enterScope, so setStartPC is
  1024. called, and the start label is allocated,
  1025. * ClassFileInput.java (readAttribute): Minor optmization.
  1026. 2005-05-10 Per Bothner <per@bothner.com>
  1027. * ClassType.java (getMethod): New method.
  1028. 2005-04-18 Per Bothner <per@bothner.com>
  1029. * ObjectType.java (getReflectClass): Update PreProcess names.
  1030. 2005-04-17 Per Bothner <per@bothner.com>
  1031. * ObjectType.java (getReflectClass): Do initCause on wrapper
  1032. RuntimeException, if Java4, which is now the default.
  1033. 2005-04-03 Per Bothner <per@bothner.com>
  1034. * Method.java: Remove bogus @return in javadoc comment.
  1035. * Variable.java: Likewise.
  1036. 2005-03-22 Per Bothner <per@bothner.com>
  1037. * CodeAttr.java (emitTryStart): Create new TryState *after* we
  1038. save any stack values, so saves come before exception range start.
  1039. 2005-03-02 Per Bothner <per@bothner.com>
  1040. * Field.java (setConstantValue): Handle boolean and char fields.
  1041. 2005-02-25 Per Bothner <per@bothner.com>
  1042. * CodeAttr.java (pushScope): Don't do a getLabel - it's redundant,
  1043. since enterScope also does it, via setStartPC.
  1044. 2005-01-30 Per Bothner <per@bothner.com>
  1045. * Access.java (toString): Fix typo.
  1046. * InnerClassesAttr.java (print): Specificy class access flags.
  1047. 2005-01-28 Per Bothner <per@bothner.com>
  1048. * Type.java (java_lang_Class_type): New static field.
  1049. * CodeAttr.java (emitPushClass): New method.
  1050. 2005-01-19 Per Bothner <per@bothner.com>
  1051. * Access.java (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS):
  1052. New bit-mask constants.
  1053. (toString): Mask off inappropriate flags.
  1054. * ClassTypeWriter.java: Make some methods public.
  1055. 2005-01-15 Per Bothner <per@bothner.com>
  1056. * Access.java (BRIDGE, VARARGS, STRICT, SYNTHETIC, ANNOTATION):
  1057. Add new JDK 1.4 and 1.5 modifiers.
  1058. (toString(int,char)): Update for new flags.
  1059. * Type.java (setName): New protected method.
  1060. * ObjectType.java (<init>(String)): Make public. It makes more sense
  1061. for "funny" types like NodeType to be ObjectType but not ClassType.
  1062. To be used for gnu.NodeType.
  1063. * ClassType.java (setName): Stylistic improvement.
  1064. 2005-01-09 Per Bothner <per@bothner.com>
  1065. * ClassType.java (writeExternal): Simplify. Non-existing classes
  1066. are now handled specialy in LitTable.
  1067. 2005-01-05 Per Bothner <per@bothner.com>
  1068. * Type.java (array_type): New field.
  1069. * ArrayType.java (make(Type)): Use array_type of argument.
  1070. (make(String)): New non-public static method.
  1071. * Type.java (getType): Use ArrayType.make(String).
  1072. (signatureToType): Use ArrayType.make(Type).
  1073. * Type.java (hashCode): New method.
  1074. * ClassType.java (getDeclaredMethod): Compare argument types
  1075. by comparing signatures, not only by identity.
  1076. 2005-01-02 Per Bothner <per@bothner.com>
  1077. * ObjectType.java: Change "select" (preprocessor) syntax.
  1078. 2004-12-30 Per Bothner <per@bothner.com>
  1079. * ClassFileInput.java (readAttribute): Link in scopes read from
  1080. LocalVariableTable table into Scope tree structure.
  1081. * Variable.java (shouldEmit): Trivial performance fix
  1082. 2004-12-29 Per Bothner <per@bothner.com>
  1083. * Type.java (setReflectClass): New method.
  1084. 2004-12-25 Per Bothner <per@bothner.com>
  1085. * SourceDebugExtAttr.java (addFile): Clear curLineIndex "cache".
  1086. 2004-12-24 Per Bothner <per@bothner.com>
  1087. * Method.java (compile_linenumber): Remove no-longer used method.
  1088. * ClassType.java (setSourceFile): Fix off-by-one error.
  1089. * ClassType.java (setSourceFile): Don't include directories in
  1090. SourceFile attribute, following class file spec.
  1091. 2004-12-23 Per Bothner <per@bothner.com>
  1092. * ClassFileInput.java (readAttribute): Fix NullPointerException if
  1093. end unset in parameter_scope, when reading "LocalVariableTable".
  1094. * SourceDebugExtAttr.java: New class, extends Attribute.
  1095. * Makefile.am: Update accordingly.
  1096. * ClassFileInput.java (readAttribute): Handle "SourceDebugExtension".
  1097. * ClassType.java (sourceDbgExt): New field.
  1098. (setStratum): New method, allocates SourceDebugExtAttr.
  1099. (setSourceFile): Add new file to sourceDbgExt.
  1100. * CodeAttr.java (sourceDbgExt): New field.
  1101. (putLineNumber): If sourceDbgExt, have it do fixLine.
  1102. (putLineNumber): New overloaded method.
  1103. * Method.java (initCode): Copy sourceDbgExt from classfile.
  1104. * SourceFileAttr.java (fixSourceFile): New static helper method.
  1105. (setSourceFile): Use fixSourceFile here, and in SourceDebugExtAttr.
  1106. 2004-11-22 Per Bothner <per@bothner.com>
  1107. * Type.java (tostring_type, pointer_type, ...): Make final.
  1108. * ClassType.java (writeExternal): Better error message.
  1109. 2004-08-05 Per Bothner <per@bothner.com>
  1110. * PrimType.java (emitIsInstance): New method.
  1111. 2004-08-03 Per Bothner <per@bothner.com>
  1112. * Variable.java (shouldEmit): Require that scope's start and end
  1113. labels are non-null. Minor optimization tweaking.
  1114. 2004-07-31 Per Bothner <per@bothner.com>
  1115. * CodeAttr.java (label): Remove field.
  1116. (FIXUP_NONE, FIXUP_DEFINE, FIXUP_SWITCH, FIXUP_CASE, FIXUP_GOTO,
  1117. FIXUP_JSR, FIXUP_TRANFER, FIXUP_TRANFER2, FIXUP_DELETE3, FIXUP_MOVE,
  1118. FIXUP_MOVE_TO_END, FIXUP_TRY, FIXUP_CATCH, FIXUP_LINE_PC,
  1119. FIXUP_LINE_NUMBER): New constants - fixup kinds.
  1120. (processFixups): New big method - does what it says.
  1121. (finalize_labels): Removed method.
  1122. (invert_opcode): New method.
  1123. (reserve): Don't need to check for "spring" to long jump.
  1124. (putLineNumber, emitTransfer, emitGoto.emitJsr): Use new fixup
  1125. mechanism.
  1126. (addhandler): Likewise. Change parameters to take labels.
  1127. (emitGoto): Remove 2-parameter version.
  1128. (emitTryStart, emitTryEnd): Use no-argument Label constructor.
  1129. (fragments, fragmentStack): Remove fields.
  1130. (beginFragment/endFragmenrt): Use new fixup mechanism.
  1131. (assignConstants): Don't need to handle fragments. Do processFixups.
  1132. (readPC): Remove field, and places that access it.
  1133. * Label.java (relocate_fixups, relocate_wide, emit_spring, emit,
  1134. emit_wide, add_fixup, add_wide_fixup, hasFixups): Remove methods.
  1135. (next, fixups, wide_fixups, spring_position): Remove fields.
  1136. (first_fixup): New field.
  1137. (<init>): New simplified constructors.
  1138. (define): Change to note fixup_count and fixupAdd.
  1139. * Method.java (reachableHere): Invoke CodeAttr's method.
  1140. * CodeAttr.java (unreachable_here): Make private.
  1141. * SwitchState.java: Use fixupChain to avoid goto to switch.
  1142. Also padding is now deferred to processFixups time.
  1143. * TryState.java (start_pc, end_pc): Replace int fields by ...
  1144. (start_try, end_try): ... new Label fields.
  1145. * CodeFragment.java: Removed - replaced by new fragment mechanism.
  1146. * Makefile.am: Remove CodeFragment.java.
  1147. 2004-07-31 Per Bothner <per@bothner.com>
  1148. * Scope.java (start, end): New fields
  1149. (start_pc, end_pc): Remove fields - use start and end fields instead.
  1150. (<init>): New constructor tkaing Labels.
  1151. (addVariable, addVariableAfter): Set scope of Variable.
  1152. Don't set start_pc - set implicitly via scope.
  1153. (setStartPC): Change to take a CodeAttr instead of a PC.
  1154. Set the start label from code, instead of setting start_pc fields.
  1155. * Variable.java (shouldEmit): Moved here from LocalVarsAttr.java.
  1156. (scope): New field.
  1157. (start_pc, end_pc): Remove fields - get them via scope instead.
  1158. (freeLocal): Don't set end_pc - set implicitly via scope.
  1159. * Label.java (<init>): New constructor takes PC.
  1160. * LocalVarsAttr.java (shouldEmit): Move to Variable.
  1161. (write, print): Update since start_pc and end_pc replaced by Labels.
  1162. * CodeAttr.java (getLabel): New method.
  1163. (enterScope): Use updated setStartPc.
  1164. (pushScope, popScope): Use getLabel instead of explicit start_pc.
  1165. (emitTailCall): Use emitGoto instead of "inlining" it.
  1166. * ClassFileInput.java (readAttribute): Update handling of
  1167. LocalVariableTable since PC ranges are now indirected through Labels.
  1168. * Variable.java (LIVE_FLAG): New constant.
  1169. (dead): Use LIVE_FLAG.
  1170. (reserveLocal): Set LIVE_FLAG.
  1171. (freeLocal): Clean LIVE_FLAG.
  1172. 2004-07-20 Per Bothner <per@bothner.com>
  1173. * CodeFragment.java: Remove useless import statements.
  1174. * IfState.java: Likewise.
  1175. * Label.java: Likewise.
  1176. * Location.java: Likewise.
  1177. * PrimType.java: Likewise.
  1178. * Scope.java: Likewise.
  1179. * TryState.java: Likewise.
  1180. * Type.java: Likewise.
  1181. * Variable.java: Likewise.
  1182. * ZipArchive.java: Likewise.
  1183. * dump.java: Likewise.
  1184. 2004-05-13 Per Bothner <per@bothner.com>
  1185. * ClassType.java (getFields, getDeclaredMethods): Make synchronized.
  1186. (getDeclaredField): Use getFields.
  1187. (getDeclaredMethod [2 overloads]): Use getDeclaredMethods.
  1188. Fixes Savannah bug #8817.
  1189. 2004-02-20 Per Bothner <per@bothner.com>
  1190. * CodeAttr.java (emitTryEnd): Don't emitStore if ! reachableHere().
  1191. Fixes bug reported by dominique.boucher@nuecho.com 2/20.
  1192. 2004-02-19 Daniel Bonniot <Daniel.Bonniot@inria.fr>
  1193. * ClassType.java (getPackageName): Use lastIndexOf, not indexOf.
  1194. 2004-02-10 Per Bothner <per@bothner.com>
  1195. * ClassType.java (isAccessible): New method.
  1196. 2003-11-03 Per Bothner <per@bothner.com>
  1197. * CodeAttr.java (emitIfIntEqZero): New method.
  1198. 2003-10-28 Per Bothner <per@bothner.com>
  1199. * dump-main.cc: Belatedly remove unused file.
  1200. 2003-10-09 Per Bothner <per@bothner.com>
  1201. * ZipArchive.java: Remove all fields and non-static methods,
  1202. leaving only main and usage/copy, which main uses.
  1203. There is no point any more, given the existence of java.util.zip.
  1204. (main): Implement 'q' command using ZipOutputStream and ZipEntry.
  1205. * ZipMember.java: Remove file. No longer used.
  1206. * Makefile.am: Update accordingly.
  1207. 2003-09-30 Per Bothner <per@bothner.com>
  1208. * CodeAttr.java (emitWithCleanupStart, emitWithCleanupCatch,
  1209. emitWithCleanupDone): New methods.
  1210. 2003-09-24 Per Bothner <per@bothner.com>
  1211. * CodeAttr.java (emitTryStart): Clean up internal logic. Fix bug
  1212. where testing for non-zero SP would never true at that point.
  1213. 2003-07-16 Chris Dean <Chris.Dean@sokitomi.com>
  1214. * PrimType.java (compare): Guard againt null otherName.
  1215. 2003-06-18 Jim White <jim@pagesmiths.com>
  1216. * Type.java (mapNameToType): Initialize statically.
  1217. 2003-06-22 Per Bothner <per@bothner.com>
  1218. * PrimType.java (emitCoerceToObject): Fix handling of boolean case.
  1219. Fixes bug reported by Wen-Chun Ni <wcn@tbcommerce.com>.
  1220. 2003-05-17 Per Bothner <per@bothner.com>
  1221. * ClassType.java (getModifiers, getInterfaces): Only call
  1222. getReflectClass if isExisting.
  1223. 2003-05-13 Per Bothner <per@bothner.com>
  1224. * Type.java: Make default constructor protected.
  1225. 2003-04-29 Jim White <jim@pagesmiths.com>
  1226. * ObjectType.java (getReflectClass): Move comment to separate line.
  1227. Lined for Ant support.
  1228. 2003-04-25 Per Bothner <per@bothner.com>
  1229. * ObjectType.java (getReflectClass): Pass false to initialize argument
  1230. of Class.forName - but only if Java2 is selected.
  1231. 2003-04-21 Per Bothner <per@bothner.com>
  1232. * ArrayClassLoader.java: Rewrite to use a Hashtable.
  1233. 2003-04-04 Per Bothner <per@bothner.com>
  1234. * Access.java (toString(int,char)): New overloaded method.
  1235. Allows printing 'super' instead of 'synchronized' for a class.
  1236. * ClassTypeWriter.java printClassInfo, printFields, printMethods):
  1237. Use new method.
  1238. 2003-03-13 Per Bothner <per@bothner.com>
  1239. * CodeAttr.java (getSP): New method.
  1240. * CodeAttr.java (emitPushString): Don't do redundant pushType
  1241. if we call emitPushNull.
  1242. 2002-11-19 Daniel Bonniot <bonniot@users.sourceforge.net>
  1243. * CodeAttr.java (emitSwap): Handle two word values.
  1244. 2002-10-21 Daniel Bonniot <bonniot@users.sourceforge.net>
  1245. * CodeAttr.java (doPendingFinalizers): Fix verification error
  1246. when returning a value inside a try/finally.
  1247. 2002-08-16 Per Bothner <per@bothner.com>
  1248. * PrimType.java (compare): tostring_type is more general.
  1249. * ArrayType.java (compare): Likewise.
  1250. 2002-08-06 Per Bothner <per@bothner.com>
  1251. * ObjectType.java (isExisting): New method.
  1252. 2002-08-04 Per Bothner <per@bothner.com>
  1253. * CodeAttr.java (emitCheckcast): Check if already isSubclass.
  1254. 2002-07-21 Per Bothner <per@bothner.com>
  1255. * Field.java (toString): New method.
  1256. 2002-06-13 Per Bothner <per@bothner.com>
  1257. * ClassType.java (writeExternal): Fix typo in exception message.
  1258. 2002-06-05 Per Bothner <per@bothner.com>
  1259. * PrimType.java (emitCoerceToObject): New method.
  1260. 2002-05-19 Per Bothner <per@bothner.com>
  1261. * CodeAttr.java (doPendingFinalizers): New public method.
  1262. (emitReturn): Call doPendingFinalizers.
  1263. (getCurrentTry): New method.
  1264. 2002-05-06 Per Bothner <per@bothner.com>
  1265. * Method.java (toString): Use '.' before method name.
  1266. 2002-04-19 Daniel Bonniot <bonniot@users.sourceforge.net>
  1267. * ClassType.java (addMethods): Prevents addMethods to incorrectly list
  1268. twice the methods of the class.
  1269. 2002-04-18 Per Bothner <per@bothner.com>
  1270. * ArrayClassLoader.java: New default constructor.
  1271. (addClass(Class), addClass(ClassType)): New overloaded methods.
  1272. * ClassType.java (writeToArray): Handle IOException.
  1273. * CodeAttr.java (emitInvoke): If method name is "<init>",
  1274. do invokeSpecial.
  1275. * CodeAttr.java (emitGotoIfCompare2): Support object eq/ne compares.
  1276. (emitGotoIfEq, emitGotoIfNE): Re-implement using emitGotoIfCompare2.
  1277. * Method.java (startCode): New convenience method.
  1278. 2002-04-16 Phil Walker <phil_walker@hp.com>
  1279. * InnerClassesAttr.java (write): Multiple index by 4.
  1280. 2002-04-02 Daniel Bonniot <bonniot@users.sourceforge.net>
  1281. * CodeAttr.java (emitShift): New method.
  1282. (emitShl, emitShr, emitUshr): Handle a long first argument.
  1283. 2002-03-07 Per Bothner <per@bothner.com>
  1284. * Scope.java (preserved): New flag.
  1285. (freeLocals) New method.
  1286. * CodeAttr.java (popScpe): Use new freeLocals method.
  1287. * LocalVarsAttr.java (preserveVariablesUpto): New method.
  1288. * Scope.java (lookup): Make public.
  1289. 2002-03-02 Per Bothner <per@bothner.com>
  1290. * Makefile.am (dump): Remove rule for making executable.
  1291. * README: Remove obsolete file.
  1292. * CodeAttr.java (emitGotoIfCompare2): ALso allow ifeq and ifne.
  1293. 2002-02-01 Per Bothner <per@bothner.com>
  1294. * ClassType.java (sourcefile): Remove unused field.
  1295. Reported by Daniel Bonniot <bonniot@users.sourceforge.net>.
  1296. 2002-01-31 Per Bothner <per@bothner.com>
  1297. * ClassType.java: Implement Externalizable.
  1298. (writeExternal, readExternal, readResolve): New methods.
  1299. 2002-01-21 Per Bothner <per@bothner.com>
  1300. * CodeAttr.java (calculateSplit): New helper method.
  1301. (emitPushString): Handle the case a String too long for CONSTANT_Utf8.
  1302. 2002-01-07 Per Bothner <per@bothner.com>
  1303. * CodeAttr.java (emitPushPrimArray): New method.
  1304. Replaces gnu.expr.LitTable.emitPrimArray.
  1305. 2001-12-27 Daniel Bonniot <bonniot@users.sourceforge.net>
  1306. * CodeAttr.java (various): Replace emitGoto(L, 168) by emitJsr(L).
  1307. * CodeAttr.java (emitReturn): Jump to the finally blocks before return.
  1308. 2001-12-24 Per Bothner <per@bothner.com>
  1309. * CodeAttr.java (emitPushString): Tolerate null String argument.
  1310. * CodeAttr.java (emitThen): New method.
  1311. * package.html: Remove "http:" from relative URLs.
  1312. * Method.java (toString): Use getName of declaring class to avoid
  1313. prefixing by "Class Type ". Fixes bug reported by Daniel Bonniot.
  1314. 2001-11-23 Per Bothner <per@bothner.com>
  1315. * ClassType.java (isSubclass): Handle other class an interface,
  1316. (compare): Simplify, due to above change.
  1317. * ClassType.java (isSubclass): Special test for tostring_type.
  1318. (compare): Likewise.
  1319. * ObjectType.java (coerceFromObject): Allow null when tostring_type.
  1320. (emitCoerceFromObject): Emit code that tests input for null.
  1321. 2001-11-21 Per Bothner <per@bothner.com>
  1322. * ClassType.java (noClasses): New static field.
  1323. (getInterfaces): Use getReflectClass().
  1324. Use noClasses when there are no intefaces.
  1325. (getMethods): Search interface also of super-classes.
  1326. Fixes problem reported by Valtteri Vuorikoski.
  1327. * ClassType.java (getMethods): Context is now a package name, rather
  1328. than a ClassType. Fixes problem reported by Walter Pelissero, where
  1329. Sun has a private java.lang.UnixProcess which we considered to be in
  1330. the same package as java.lang.Object, which used to mean "any class",
  1331. 2001-11-17 Per Bothner <per@bothner.com>
  1332. * ClassType.java (getPackageName): New method.
  1333. (getMethods): New overload uses Vector.
  1334. * Type.java (make): Don't set interface flag here since it prevents
  1335. future getModifiers calls from getting the reflectClass's modifiers.
  1336. 2001-11-05 Per Bothner <per@bothner.com>
  1337. * ArrayType.java (getImplementationType): New method
  1338. * ClassType.java (compare): Handle case when both are interfaces.
  1339. * Type.java (string_type): Is now a normal Java class.
  1340. (tostring_type): New class; String that uses toString to convert.
  1341. * ObjectType.java (coerceFromObject, emitCoerceFromObject): Check if
  1342. this is new Type.tostring_type
  1343. (getImplementationType): Map tostring_type to string_type.
  1344. 2001-10-23 Per Bothner <per@bothner.com>
  1345. * CodeAttr.java (emitJsr): New method.
  1346. 2001-09-20 Per Bothner <per@bothner.com>
  1347. * PrimType.java (compare): All types are subtypes of Object.
  1348. 2001-09-14 Per Bothner <per@bothner.com>
  1349. * ObjectType.java (promote): Convert nullType to pointer_type;
  1350. (getImplementationType): Likewise.
  1351. 2001-09-12 Per Bothner <per@bothner.com>
  1352. * Type.java (neverReturnsType): Use different constructor, to
  1353. avoid it being registered in place of void_type.
  1354. 2001-08-23 Per Bothner <per@bothner.com>
  1355. * Access.java (SUPER): New constant.
  1356. * CodeAttr.java (emitInvoke): Was testing isInterface on wrong class.
  1357. * CodeAttr.java (emitElse): Fix bug (null pointer access)
  1358. reported by Felix S Klock II <pnkfelix@MIT.EDU>.
  1359. * Type.java (signatureToPrimitive): Change return type.
  1360. * Type.java (getImplementationType): New method.
  1361. 2001-08-15 Per Bothner <per@bothner.com>
  1362. * ClassType.java (getSuperclass): Don't call getReflectClass of
  1363. this is an interface or is Object.
  1364. * ClassType.java (setInterface): New method.
  1365. * ClassType.java (getMethods(Filter,int)): New method overloads.
  1366. (countMethods): New method.
  1367. * Method.java (isAbstract): New method.
  1368. 2001-08-07 Brian Jones <cbj@gnu.org>
  1369. * LineNumbersAttr.java (getLineCount, getLineNumberTable): New methods.
  1370. 2001-07-16 Per Bothner <per@bothner.com>
  1371. * PrimType.java (booleanValue): Make static.
  1372. * Scope.java (find_var): Renamed to ...
  1373. (getvariable): ... new name.
  1374. * CodeAttr.java (getArg): Update accordingly.
  1375. (getCurrentScope): New method.
  1376. * CodeAttr.java (getCurrentScope): New method.
  1377. 2001-04-23 Per Bothner <per@bothner.com>
  1378. * CodeFragment.java (linenumbers): New field.
  1379. (emit): Also emit linenumbers.
  1380. * CodeAttr.java (endFragment): Save linenumbers in fragment.
  1381. 2001-04-07 Thomas Kirk <tk@research.att.com>
  1382. * ZipLoader.java (loadAllClasses): New method to force load
  1383. of all classes from the zip archive, close archive.
  1384. (close): New Method to prevent leaking open ZipFiles when
  1385. archive is not completely read.
  1386. (loadClass): Reopen the zip file if it has been closed prematurely.
  1387. * ZipLoader.java (zipname): New field to hold name of zipfile
  1388. in case it must be reopened.
  1389. 2001-03-29 Per Bothner <per@bothner.com>
  1390. * CodeAttr.java (emitTryStart): If the stack needs to be saved,
  1391. do so before setting the TryState's start_pc.
  1392. Fixes bug reported by Bob Bane <bane@gst.com>.
  1393. 2001-03-08 Per Bothner <per@bothner.com>
  1394. * ClassType.java (getSuperclass): Call getReflectClass if needed.
  1395. * ClassType.java (implementsInterface): New method.
  1396. (compare): Use implementsInterface to compare interfaces.
  1397. 2001-02-26 Per Bothner <per@bothner.com>
  1398. * ClassType.java (doFixups): Move method fixups to Method, CodeAttr.
  1399. * CodeAttr.java (assignConstants): Handle CodeFragments, labels here.
  1400. * Method.java (assign_constants): REname to assignConstants.
  1401. 2000-11-21 Bruce R. Lewis <brlewis@users.sourceforge.net>
  1402. * ArrayClassLoader.java: Handle custom classloader by using
  1403. Class.forName() instead of findSystemClass().
  1404. * ZipLoader.java: Likewise.
  1405. 2000-10-09 Per Bothner <per@bothner.com>
  1406. * ObjectType.java (setExisting): New method.
  1407. * Type.java (getType): Don't try to load reflectClass yet.
  1408. * ObjectType.java (getInternalName): New method.
  1409. (getNameOrSignature): Removed, replaced by getInternalName.
  1410. (getReflectClass): Update to use getInternalName.
  1411. * ArrayType.java (getInternalName): New method, replaces ...
  1412. (getNameOrSignature): Removed, replaced by getInternalName.
  1413. * ConstantPool.java (addClass): Update to use getInternalName.
  1414. * ObjectType.java (coerceFromObject): Minor optimization.
  1415. 2000-08-23 Daniel Bonniot <bonniot@cma.ensmp.fr>
  1416. * CodeAttr.java (emitDup, emitDupX): New methods.
  1417. 2000-08-16 Per Bothner <per@bothner.com>
  1418. * CodeAttr.java (addParamLocals): New method.
  1419. * Method.java (init_param_slots): Use CodeAttr's new addParamLocals.
  1420. * Type.java (make): If an existing type has same name but different
  1421. reflectClass (i.e. different ClassLoader), treat it as different type.
  1422. 2000-06-10 Per Bothner <per@bothner.com>
  1423. * Type.java (nullType): New static field.
  1424. * ObjectType.java: No longer abstract - used for nullType.
  1425. (ObjectType): New constructor.
  1426. (getNameOrSignature): Moved here from ClassType.
  1427. (compare): New method - handle nullType.
  1428. * ArrayType.java (compare): Handle nullType.
  1429. * ClassType.java (compare): Handle nullType.
  1430. (getNameOrSignature): Now inherited.
  1431. 2000-06-09 Per Bothner <per@bothner.com>
  1432. * Field.java (setConstantValue): New method.
  1433. 2000-05-22 Per Bothner <per@bothner.com>
  1434. * Filter.java: New interface.
  1435. * Makefile.am (java_JAVA): Add Filter.java.
  1436. * ClassType.java (addMethod): Use existing method even if it
  1437. has extra access flags.
  1438. (getDeclaredMethods, getMethods): New methods.
  1439. * Type.java (make(Class)): If a regular class, set EXISTING_CLASS.
  1440. Bind reflectClass, but avoid calling Class.forName (runs <clinit>).
  1441. * Type.java (isSubType): Make final. Just call compare.
  1442. * ArrayType.java (compare): To compare AraryTypes, compare elements.
  1443. * PrimType.java (compare): Implement Java char->number widening rules.
  1444. 2000-05-09 Per Bothner <per@bothner.com>
  1445. * Type.java (getType): Class Class.forName to get reflectClass;
  1446. only set EXISTING_CLASS if it succeeds.
  1447. * Scope.java (addVariable): New different Variable constructor.
  1448. * LocalVarsAttr.java (shouldEmit): New method. Return false if
  1449. start_pc/end_pc are invalid.
  1450. (getCount, write): Use shouldEmit.
  1451. 2000-04-21 Per Bothner <per@bothner.com>
  1452. * PrimType.java: New "copying" constructor.
  1453. 2000-04-12 Per Bothner <per@bothner.com>
  1454. * ConstantValueAttr.java: New class, extends Attribute,
  1455. * Makefile.am (java_JAVA): Added ConstantValueAttr.java.
  1456. * ClassFileInput.java (readAttribute): Handle ConstantValue attribute.
  1457. * ClassTypeWriter.java (printQuotedString): New method.
  1458. * CpoolUtf8.java (print): Use ClassTypeWriter's printQuotedString.
  1459. * Field.java (constant_value_index): Remove field.
  1460. (write): Replace constant_value_index usage by attribute handling.
  1461. (assign_constants): Likewise.
  1462. * Field.java (sourceName, rfield): New fields.
  1463. (getReflectField, setSourceName, getSourceName, searcField): New.
  1464. * ClassType.java (writeToStream): Set ADD_FIELDS_DONE|ADD_METHODS_DONE.
  1465. * Field.java (getModifiers): New method.
  1466. * ClassType.java (writeToFile): Use File.separatorChar.
  1467. 2000-03-05 Per Bothner <per@bothner.com>
  1468. * ZipLoader.java (loadClass): Use DataInputStream.readFully to force
  1469. all of a class member to be read. Fixes VerifyError under JDK1.2.
  1470. Throw ClassNotFoundException rather than Error.
  1471. 2000-03-02 Per Bothner <per@bothner.com>
  1472. * Type.java (neverReturnsType): New static final Type.
  1473. (lowestCommonSuperType): Handle neverReturnsType.
  1474. 2000-03-02 Daniel Bonniot <d.bonniot@mail.dotcom.fr>
  1475. * CodeAttr.java (words): New private method.
  1476. (emitInvokeMethod): Use new words method.
  1477. * CodeAttr.java: Update two error messages.
  1478. 2000-02-27 Per Bothner <per@bothner.com>
  1479. Various tweaks for better javadoc processing.
  1480. * overview.html: Renamed to package.html.
  1481. 2000-02-25 Daniel Bonniot <d.bonniot@mail.dotcom.fr>
  1482. * ClassType.java (getInterfaces): Fix thinko.
  1483. 2000-02-12 Per Bothner <per@bothner.com>
  1484. * ClassType.java (addInterface): New method.
  1485. 2000-02-10 Per Bothner <per@bothner.com>
  1486. * Type.java (mapNameToType): New static replaces ClassType.classTable.
  1487. (lookupType, getType): New static methods.
  1488. (make): Use ArrayType.make.
  1489. * ArrayType.java (make): New static method.
  1490. * ClassType.java (classTable): Replaced by Type,mapNameToType.
  1491. (make): Use Type.getType.
  1492. (getDeclaredMethod(String,int)): New overloaded method.
  1493. (addMethods): Also add constructore.
  1494. 2000-02-01 Per Bothner <per@bothner.com>
  1495. * ClassType.java (getInterfaces): Style tweaks.
  1496. * IfState.java (<init>): New constructor.
  1497. * CodeAttr.java (emitIfThen): Use new IfState constructor to avoid
  1498. that doesn't set end_label (which may be unneeded).
  1499. (emitElse, emitFi): Only set end_label if defined.
  1500. 2000-01-19 Daniel Bonniot <d.bonniot@mail.dotcom.fr>
  1501. * CodeAttr.java (emitConvert): Ensured that conversion from a
  1502. primitive type to itself always succeeds, and that no code is
  1503. generated.
  1504. * Type.java (lowestCommonSuperType): New method.
  1505. * Type.java (make): Set INTERFACE flag if appropriate.
  1506. * gnu/bytecode/ClassType.java (getInterfaces): Get from reflectClass.
  1507. 2000-01-22 Per Bothner <per@bothner.com>
  1508. * ClassType.java (addField): Remove redundant setName, type setting.
  1509. (getDeclaredMethod): Minor optimization.
  1510. * CodeAttr.java (emitInvoke): New method.
  1511. (adjusrTypedOp, emitBinop, emitAdd, emitSub): New method overloads.
  1512. (emitIfIntLEqZero): New method.
  1513. (emitElse, emitFi): Add (fragile) support for stack skrinking.
  1514. * IfState.java (stack_growth): New field.
  1515. * LocalVarsAttr.java (enterScope): Tweak error message.
  1516. * Method.java (toString): Emit types in Java-source form, instead
  1517. of using getSignature.
  1518. * Type.java (int_type etc): Change type from Type to Primtype.
  1519. 1999-12-24 Per Bothner <per@bothner.com>
  1520. * Variable.java: New constructors.
  1521. (toString): New method.
  1522. * Scope.java (setStartPC): New method.
  1523. (addVariable): If code is null, don't call allocateLocal.
  1524. * LocalVarsAttr.java (enterScope) Don't set start_pc of variables.
  1525. * CodeAttr.java (locals): Make field public.
  1526. (enterScope): Call scope.setStartPC.
  1527. 1999-12-16 Luke Gorrie <luke@vegetable.org>
  1528. * ClassType.java (getSuperclass): Check for null superclass.
  1529. 1999-12-16 Per Bothner <per@bothner.com>
  1530. * ClassType.java (isInterface): Use getModifiers().
  1531. * ClassType.java (getFields): Call addFields if an existing class.
  1532. 1999-12-02 Per Bothner <per@bothner.com>
  1533. * Attribute.java (addToFrontOf): New method.
  1534. * CodeAttr.java, ExceptionsAttr.java, InnerClassesAttr.java,
  1535. LineNumbersAttr.java, LocalVarsAttr.java, SourceFileAttr.java
  1536. (<init>): Use new addToFrontOf method.
  1537. * LocalVarsAttr.java (isEmpty): New method.
  1538. (<init>): New (overloaded) constructor.
  1539. * CodeAttr.java (pushScope): Use new LocalVarsAttr constructor.
  1540. (assignConstants): If we have something to emit in a (non-empty)
  1541. LocalVars attribute, link it into the attribute list.
  1542. 1999-11-18 Per Bothner <per@bothner.com>
  1543. * ClassType.java (getModifiers): Update access_flags after calling
  1544. reflectClass.getModifiers().
  1545. * ConstantPool.java (addMethodRef): Use getModifiers() to check
  1546. if class is interface. (This calls getReflectClass if needed.)
  1547. * ObjectType.java (getReflectClass): If Class.forName fails, and
  1548. EXISTING_CLASS flag is set, throw an exception.
  1549. 1999-11-15 Per Bothner <per@bothner.com>
  1550. * ObjectType.java (flags): New variable.
  1551. (ADD_FIELDS_DONE, ADD_METHODS_DONE, EXISTING_CLASS): New constants.
  1552. * ClassType.java (addFields): New method.
  1553. (getDeclaredField): New method. May call addFields.
  1554. (getDeclaredMethod, getMethod): New methods. May call addMethods.
  1555. 1999-11-03 Per Bothner <per@bothner.com>
  1556. * Type.java (isSubtype): Use new isSubclass method from ClassType.
  1557. (compare): New virtual method.
  1558. (swappedCompareResult): New static method.
  1559. * ClassType (compare, isSubclass, isInterface): New methods.
  1560. * PrimType.java (compare): New virtual method.
  1561. (compare): New static method.
  1562. * ArrayType.java (compare): New virtual method.
  1563. 1999-10-25 Per Bothner <per@bothner.com>
  1564. * ObjectType.java (coerceFromObject): Allow null as input.
  1565. 1999-08-30 Geoff Berry <gcb@gnu.org>
  1566. * CodeAttr.java (emitPushDouble, emitPushFloat): Handle
  1567. pushing of -0.0.
  1568. 1999-09-08 Per Bothner <per@bothner.com>
  1569. * Method.java (write): Remove unused Variable var.
  1570. 1999-09-02 Per Bothner <per@bothner.com>
  1571. * CodeFragment.java (unreachable_save): New feld.
  1572. * CodeAttr.java (various places): Use setUnreachable().
  1573. (beginFragment): Save value of unreachable_here.
  1574. (endFragment): Restore it.
  1575. * Variable.java (setFlag): New private convenience method.
  1576. (setSimple, setParameter, serArtificial): Use it.
  1577. 1999-08-26 Per Bothner <per@bothner.com>
  1578. * ClassType.java (getSuperclass): If superClass unset, but
  1579. reflectClass is set, call java.lang.Class.getSuperclass.
  1580. 1999-08-22 Per Bothner <per@bothner.com>
  1581. * ClassType.java (addMethods, getMatchingMethods): New methods.
  1582. * CodeAttr.java (setReachable, setUnreachable): New methods.
  1583. (emitNewArray): Use anewarray even if element type is ArrayType.
  1584. * Method.java (toString): Make safe even if arg_types is null.
  1585. * ZipArchive.java (append): Remove version using byte[] name.
  1586. 1999-08-08 Per Bothner <per@bothner.com>
  1587. * ArrayClassLoader.java (addClass): New method.
  1588. 1999-08-06 Per Bothner <per@bothner.com>
  1589. * CodeFragment.java: New class.
  1590. * ClassType.java (doFixups): Emit any pending fragments.
  1591. * CodeAttr.java (getPC, isInTry): New methods.
  1592. (beginFragment, endFragment): New methods.
  1593. 1999-07-15 Per Bothner <per@bothner.com>
  1594. * CodeAttr.java (popType): Use Type.isVoid method.
  1595. * Type.java (isSubtype): Add more logic for testing superclasses if
  1596. reflctive classes not available.
  1597. 1999-04-25 Per Bothner <bothner@Magnus.Cygnus.COM>
  1598. * Variable.java (offset): Make non-public.
  1599. 1999-04-22 Per Bothner <bothner@Magnus.Cygnus.COM>
  1600. * ZipMember.java: Inherit from java.util.zip.ZipEntry.
  1601. Various related changes.
  1602. * ZipArchive.java: Add casts and other changes from ZipMember changes.
  1603. (copy - two overload variants): New methods.
  1604. (doit): Removed.
  1605. (main): Use java.util.zip classes (except for 'q' command).
  1606. 1999-04-17 Per Bothner <bothner@Magnus.Cygnus.COM>
  1607. * ClassFileInput.java (readAttribute): Revert previous change.
  1608. * InnerClassesAttr.java (print): Mask short data by 0xFFFF.
  1609. * LineNumbersAttr.java (print): Mask short data by 0xFFFF.
  1610. * Type.java (isSubtype, isMoreSpecic): New methods.
  1611. 1999-04-15 Per Bothner <bothner@Magnus.Cygnus.COM>
  1612. * ClassFileInput.java (readAttribute): Use readUnsignedShort (twice).
  1613. (From Jay Krell <jay.krell@cornell.edu>.)
  1614. * CodeAttr.java (emitStore): Add missing space in error message.
  1615. 1999-04-05 Geoff Berry <gcb@duke.edu>
  1616. * ClassFileInput.java (readAttribute): Handle Exceptions attribute.
  1617. * CpoolClass.java (getClassType): New method.
  1618. * Method.java (getExceptionAttr, setExceptions(short[]),
  1619. setExceptions(ClassType[]), getExceptions): New methods.
  1620. * ExceptionsAttr.java: New file.
  1621. * Makefile.am (java_JAVA): Add ExceptionsAttr.java.
  1622. Sat Mar 20 10:59:28 1999 Per Bothner <bothner@Magnus.Cygnus.COM>
  1623. * Type.java (getSize, isVoid): New methods.
  1624. * CodeAttr.java (pushType, emitInvokeMethod, emitReturn):
  1625. Handle other void types (size==0) besides Type.void_type.
  1626. 1999-03-13 Geoff Berry <gcb@duke.edu>
  1627. * SwitchState.java (addDefault(Label,CodeAttr)): New method.
  1628. (addCase(int,Label,CodeAttr)): Fix binary search.
  1629. (finish): Move pushType call.
  1630. Tue Mar 16 20:49:08 1999 Per Bothner <bothner@Magnus.Cygnus.COM>
  1631. * PrimType.java (emitCoerceFromObject): Handle coercing to void.
  1632. * ClassType.java (getModifiers): If access_flags is 0,
  1633. check reflectClass.getModifiers(). (Bit of a hack.)
  1634. Thu Feb 11 16:14:30 1999 Zvi Har'El <rl@math.technion.ac.il>
  1635. * InnerClassesAttr.java (print): Fix for anonymous classes.
  1636. 1999-02-28 Geoff Berry <gcb@duke.edu>
  1637. * CodeAttr.java (emitArrayLength): Add type check for incoming
  1638. array.
  1639. (emitNewArray(Type,int)): New method to support the
  1640. `multianewarray' instruction.
  1641. (emitInc): New method to support the `iinc' instruction.
  1642. (emitGotoIfEq): Fix double case to use `dcmpl'.
  1643. (emitGotoIfLt, emitGotoIfGe, emitGotoIfGt, emitGotoIfLe,
  1644. emitGotoIfCompare2): New methods.
  1645. (emitIfCompare1): Add type check for incoming int.
  1646. (emitIfRefCompare1, emitIfNotNull, emitIfNull): New methods.
  1647. (emitIfLt, emitIfGe, emitIfGt, emitIfLe): New methods.
  1648. (disAssemble): Fix invokeinterface handling.
  1649. * ConstantPool.java (addClass): Change parameter type from
  1650. ClassType to ObjectType to allow ArrayTypes to be added.
  1651. Mon Feb 22 23:17:08 1999 Per Bothner <bothner@cygnus.com>
  1652. * ObjectType.java (getReflectClass): Replace '/' by '.' in
  1653. signature before passing it to Class.forName. Needed for array types.
  1654. Tue Feb 9 09:52:36 1999 Per Bothner <bothner@Magnus.Cygnus.COM>
  1655. * CodeAttr.java (emitNewArray): Result is appropriate ArrayType.
  1656. (saveStackTypeState, restoreStackTypeState): New methods.
  1657. (emitReturn): Note unreachable_here.
  1658. * Method.java (setModifiers): New method.
  1659. * SwitchState.java (restoreStack): Rmeove method.
  1660. (<init>): Call CodeAttr.saveStackTypeState.
  1661. (addCase, addDefault): Use CodeAttr.restoreStackTypeState
  1662. (finish): Push eror string *after* new'ing exception..
  1663. Sat Jan 16 09:29:34 1999 Per Bothner <bothner@Magnus.Cygnus.COM>
  1664. * CodeAttr.java (reorder_fixups): Only reorder if oldest != null.
  1665. (print): Fix two small bugs for tableswitch.
  1666. * LocalVarsAttr.java (enterScope): Set start_pc of local Variables.
  1667. * SwitchState.java (addCase): Fix typo. Increment numCases.
  1668. (finish): Add defaultLabel, if none was specified. Fix thinko.
  1669. * ClassTypeWriter.java: Remove some useless commented-out code.
  1670. 1998-12-08 Geoff Berry <gcb@cs.duke.edu>
  1671. * gnu/bytecode/CodeAttr.java (emitShl, emitShr, emitUshr,
  1672. emitInvokeInterface): New methods.
  1673. * gnu/bytecode/Field.java (getDeclaringClass, setStaticFlag,
  1674. getStaticFlag, getFlags): New methods.
  1675. * gnu/bytecode/Method.java (toString): New method.
  1676. Sat Nov 7 09:46:18 1998 Per Bothner <bothner@cygnus.com>
  1677. * ConstantPool.java (rehash): New method.
  1678. (addUtf8, addClass, addValue1, addvalue2, addString, addNameAndType,
  1679. addRef): Call rehash if no hashTab.
  1680. (<init>(DataInputStream)): Don't lock.
  1681. * CpoolEntry.java (add_hashed): Make package private.
  1682. (<init>): Handle creating or growing hashTab by ConstantPool.rehash.
  1683. * CpoolClass.java, CpoolNameAndType.java, CpoolRef.java,
  1684. CpoolString.java, CpoolUtf8.java, CpoolValue1.java, CpoolValue2.java
  1685. (hashCode): Add new non-static override - recalculate if hash is 0.
  1686. * LineNumbersAttr.java (<init>): Set code.lines to this.
  1687. * LocalVarsAttr.java (<init>): Set code.locals to this.
  1688. * CodeAttr.java (<init>): Set meth.code to this.
  1689. 1998-10-06 Geoff Berry <gcb@cs.duke.edu>
  1690. * CodeAttr.java: (lookup(String)): Make public.
  1691. (addLocal(Type,String)): Make public.
  1692. Sat Oct 17 13:04:32 1998 Per Bothner <bothner@cygnus.com>
  1693. * CodeAttr.java (emitNot): Use explicit parameter instead of topType.
  1694. (emitConvert): Remove single-argument form.
  1695. (emitMonitorEnter, emitMonitorExit): New methods.
  1696. (emitTryStart): Always save result (in local var) if there is one.
  1697. (disAssembler): Fix typo moniorenter -> monitorenter.
  1698. * Scope.java (addVariable): Make public.
  1699. * Type.java (throwable_type): New static.
  1700. Fri Sep 11 20:05:59 1998 Per Bothner <bothner@cygnus.com>
  1701. * ClassType.java (make): New static overload.
  1702. (setname): Make public.
  1703. (getSuperclass): New method.
  1704. * PrimType.java (charValue, booleanValue): New coercions.
  1705. Sat Aug 29 20:24:39 1998 Per Bothner <bothner@cygnus.com>
  1706. * Method.java (getModifiers): New method.
  1707. * Type.java (make): Do (many) ClassType.make instead of new ClassType.
  1708. * Variable.java (allocateLocal): If assigned, return immediately.
  1709. * ZipLoader.java (loadClass): Fix small logic error.
  1710. Sat Aug 29 09:14:00 1998 Per Bothner <bothner@cygnus.com>
  1711. * Method.java (assign_local): Removed.
  1712. * Scope.java (addVariableAfter): New method.
  1713. * CodeAttr.java (beginScope): Removed. Not needed after all.
  1714. 1998-08-28 Per Bothner <bothner@cygnus.com>
  1715. * CodeAttr.java (beginScope): New method.
  1716. (enterScope): Note PC in start_pc.
  1717. (emitTailCall): Take extra Scope argument.
  1718. * Label.java (hasFixups): New method.
  1719. Wed Jul 29 09:47:09 1998 PARMELAN Edouard <parmee@postecss.ncrfran.france.ncr.com>
  1720. * ClassTypeWritter,java (printSignature): Add missing commas.
  1721. Wed Jul 22 22:18:24 1998 Per Bothner <bothner@cygnus.com>
  1722. * ZipLoader.java (loadClass): Fix variable clash.
  1723. (Reported by Lynn Quam <quam@ai.sri.com>.)
  1724. * CodeAttr.java (emitMaybeWide): New function.
  1725. (emitLoad, emitStore): Fix bug using emitMaybeWide.
  1726. (disAssemble): Fix a few buglets.
  1727. * LineNumbersAttr.java (write): Minor optimization.
  1728. * ArrayClassLoader.java: Moved from ../../kawa/lang/SchemeLoader.java.
  1729. * Makefile.am: Update.
  1730. (install-html): Subsumed by install-subdir-html in ../Makefile.am.
  1731. Mon Jun 29 18:56:04 1998 Per Bothner <bothner@cygnus.com>
  1732. * Method.java (compile_tailcall): Replaced by ...
  1733. * CodeAttr.java (emitTailCall): ... new method.
  1734. Thu Jun 25 22:40:05 1998 Per Bothner <bothner@cygnus.com>
  1735. * CodeAttr.java (stack_types): Make non-private (for SwitchState).
  1736. Mon Jun 22 18:33:13 1998 Per Bothner <bothner@cygnus.com>
  1737. * Access.java (toString): Print unrecognized flags as hex value.
  1738. * ClassTypeWriter.java (printClassInfo): Don't print hex access flags.
  1739. * CpoolClass.java (getStringName): New method.
  1740. * Label.java: Fix bugs in how relocations were implemented.
  1741. * ClassFileInput.java (readAttribute): Handle "InnerClasses".
  1742. * InnerClassesAttr.java: New, for JDK 1.1 "InnerClasses" attribute.
  1743. * SwitchState.java: New - state for a switch statement.
  1744. * Makefile.am: Add new classes.
  1745. Mon Apr 27 13:18:01 1998 Jeff Haynes <jhaynes@dascom.com>
  1746. * ClassType.java, ConstantPool.java, CpoolClass.java, CpoolUtf8.java,
  1747. CpoolNameAndType.java, CpoolRef.java, CpoolString.java,
  1748. CpoolValue1.java, CpoolValue2.java, Field.java, Method.java:
  1749. Add public access methods for class members so that I can
  1750. interogate a class from outside this java package.
  1751. Fri May 15 21:33:19 1998 Per Bothner <bothner@cygnus.com>
  1752. * Type.java (registerTypeForClass): New static method.
  1753. (make): Call registerTypeForClass.
  1754. * PrimType.java (<init>): Call registerTypeForClass.
  1755. Tue Apr 21 00:04:41 1998 Per Bothner <bothner@cygnus.com>
  1756. * dump-main.cc: New file - a main() wrapper for dump.main.
  1757. * Makefile.am: Add rules to build stand-alone executable
  1758. for dump, when compiled by gcc, and linked with libjava.
  1759. Sat Apr 4 17:36:03 1998 Per Bothner <bothner@cygnus.com>
  1760. * CodeAttr.java (readPC): New instance variable.
  1761. Set it most places that read the PC.
  1762. (emitPushConstant, emitPushFloat): New methods.
  1763. (emitAnd, andIOR, emitXOr, emitNot): New methods.
  1764. (emitGotoIfInt{Eq,New,Lt,Ge,Gt,Le}Zero, emitIfEq): New methods.
  1765. (emitRet): Add missing calls to reserve.
  1766. * Label.java (define): Remove version that takes a Method.
  1767. (define): If label follows goto of label, try to optimize away goto.
  1768. * IfState.java (<init>): Default start_stack_size to code.PC.
  1769. * CodeAttr.java (emitTryStart): Extra result_type argument.
  1770. Generate code to save stack (if non-empty) in new Variables.
  1771. (emiTryCatchEnd): Restore stack.
  1772. Code to save result moved here from TryExp.
  1773. * TryState.java (savedStack): Save stack here.
  1774. (saved_result) New variable to store final result.
  1775. * Makefile.am: Re-write to compile all out-of-date *.java at once.
  1776. Wed Mar 18 12:06:13 1998 Per Bothner <bothner@cygnus.com>
  1777. * CodeAttr.java (emitRet): Add missing reserve calls.
  1778. Sat Mar 7 08:27:38 1998 Per Bothner <bothner@cygnus.com>
  1779. * Add and fix various comments for javadoc.
  1780. * overview.html: New file (derived from README).
  1781. * README: Now mainly just a link to overview.html.
  1782. * LineNumbersAttr.java (put): Make public.
  1783. * Location.java: Make class public.
  1784. * Makefile.am (HTML_HOME, install-html): New for installing html.
  1785. * CodeAttr.java (adjustTypedOp): New private method.
  1786. (emitLoad, emitStore): Used new adjustTypedOp.
  1787. (emitBinop, emitAdd, emitSub, emitMul, emitDiv, emitRem): New here.
  1788. * Method.java (compile_binop, compile_primop, compile_add,
  1789. compile_sub, compile_mul, compile_div, compile_rem): Removed here.
  1790. * Type.java (coerceFromObject): Made abstract.
  1791. * ObjectType.java (coerceFromObject): Moved here from Type.
  1792. Add special handling for Type.string_type.
  1793. Mon Mar 2 22:56:44 1998 Per Bothner <bothner@cygnus.com>
  1794. * Type.java (make): New static method.
  1795. * ArrayType.java (getComponentType): New method.
  1796. * ClassType.java (getField): New method.
  1797. (addMethod): Re-use existing Method if there is a match.
  1798. (getReflectClass, emitCoerceFromObject): Move to ObjectType.
  1799. * ObjectType.java: New abstract class.
  1800. * Makefile.am, Makefile.in (OBJ): Added ObjectType.class.
  1801. * CodeAttr (emitTypedOp): New private method.
  1802. (emitArrayStore, emitArrayLoad, emitNewArray): New methods.
  1803. * Method.java (compile_array_store, compile_array_load): Removed.
  1804. Mon Feb 23 22:50:46 1998 Per Bothner <bothner@cygnus.com>
  1805. * CodeAttr.java (emitConvert): Fix thinko - s/to_sig/from_sig/.
  1806. Sun Feb 8 23:29:37 1998 Per Bothner <bothner@cygnus.com>
  1807. * CodeAttr.java (emitGotoIfEq): Use signature to select opcode.
  1808. Tue Feb 3 12:33:46 1998 Per Bothner <bothner@cygnus.com>
  1809. * CodeAttr.java (emitPushThis, emitInvokeMethod, emitInvokeVirtual,
  1810. emitInvokeSpecial, emitInvokeStatic, emotGotoIfEq, emitGotoIfNE,
  1811. emitGotoIf, emitIfIntNotZero, emitIfIntCompare, EmitIfIntLt, emitIfNEq,
  1812. emitConvert, emitInstanceof): New methods based on old ones in Method.
  1813. * Method.java (compile_convert, compile_goto_ifeq, compile_goto_ifne,
  1814. compile_goto_if, compile_if_neq_0, compile_if_icmp, compile_ifi_lt,
  1815. compile_ifneq, compile_invoke_method, compile_invoke_virtual,
  1816. compile_invoke_special, compile_invoke_static): Removed methods.
  1817. * Type.java (byte_type etc): Change types from Type to PrimType.
  1818. (toString, isInstance, emitIsInstance, coerceFromObject,
  1819. coerceToObject, emitCoerceToObject): New virtual methods.
  1820. (compileCoerceFromObject): Rename to emitCoerceFromObject and
  1821. change argument type.
  1822. * ClassType.java (compileCoerceFromObject): Likewise.
  1823. * PrimType.java: New class - extends type.
  1824. * Makefile.am, Makefile.in (OBJ): Add PrimType.class.
  1825. Mon Jan 26 16:24:46 1998 Per Bothner <bothner@cygnus.com>
  1826. * CodeAttr.java (emitCheckcast): New method, base on
  1827. Method.compile_checkcast.
  1828. * Method.java (Method.compile_checkcast): Now just a stub.
  1829. * Type.java (isValidJavaTypeName): New method.
  1830. Sun Jan 11 15:51:51 1998 Per Bothner <bothner@cygnus.com>
  1831. * CodeAttr.java (emitFinallyStart): Re-set end_pc.
  1832. * Type.java (reflectClass): New field.
  1833. (getReflectClass): New method.
  1834. (<init>): Take extra reflectClass argument.
  1835. * ClassType.java (getReflectClass, toString): New methods.
  1836. * ArrayType.java (getReflectClass): New method.
  1837. Sun Dec 14 15:55:22 1997 Per Bothner <bothner@cygnus.com>
  1838. * ClassFileInput.java (readClassType):
  1839. (readClassInfo): Read interface indexes correctly.
  1840. * CodeAttr.java (emitLoad, emitThrow): New methods.
  1841. Fix various problems with exception table support.
  1842. * Method.java (compile_push_value): Replaced by CodeAttr.emitLoad.
  1843. * ZipMember.java (getData): New method, based on ZipArchive.contents.
  1844. * ZipArchive.java (contents): Move to ZipMember. Update callers.
  1845. * ZipLoader.java: Re-write to use java.util.zip.ZipFile.
  1846. Thu Nov 27 21:22:16 1997 Per Bothner <bothner@cygnus.com>
  1847. * TryState.java: New class, for exception handling.
  1848. * Makefile.am: Added TryState.class.
  1849. * Method.java: Move mone methods to CodeAttr.java.
  1850. * CodeAttr.java: Rename compile_xxx to emitXxx.
  1851. (addhandler, emitTryStart, emitTryEnd. emitCatchStart, emitCatchEnd,
  1852. emitFinallyStart, emitFinallyEnd, emitTryCatchEnd): New methods
  1853. to support exception handling.
  1854. * ClassFileInput.java: Create exception table.
  1855. * Scope.java (various places): Pass CodeAttr instead of Method.
  1856. * Variable.java: Moved functionality here from Method.java.
  1857. Mon Nov 10 16:57:28 1997 Per Bothner <bothner@cygnus.com>
  1858. * CodeAttr.java (disAssemble): New method.
  1859. * ClassTypeWriter.java (printConstantOperand): New method.
  1860. * ClassFileInput.java (readAttribute): Don't use Method.assign_local
  1861. to set LocalVariableTable offsets, since that doesn't like overlaps.
  1862. Sun Nov 2 13:39:48 1997 Per Bothner <bothner@cygnus.com>
  1863. * CodeAttr.java, LineNumbersAttr.java, LocalVarsAttr.java:
  1864. New classes to represent more standard attributes.
  1865. * Location.java: New class - shared stuff from Field and Variable.
  1866. * Field.java, Variable.java: Inherit from Location; move stuff there.
  1867. * Attribute.java (isSkipped, setSkipped, getlengthAll): New methods.
  1868. * ClassFileInput.java (readAttributes): Make more robust.
  1869. Read Code, lineNumberTable, and LocalVariableTable attributes.
  1870. * ClassType.java (addMethod): Use new Method.setSignature.
  1871. * ClassTypeWriter.java (printSignature): New method. Use it.
  1872. * Label.java (relocate_fixups, relocate_wide, emit_spring,
  1873. add_fixup, emit, emit_wide): Charge arg from Method to CodeAttr.
  1874. * Makefile.am: Add new classes. Add JCFLAGS.
  1875. * Method.java: Many variables and methods moved to CodeAttr,
  1876. LineNumbersAtrr or LocalsVarsAttr. Update accordingly.
  1877. (setSignature, setName, assign_constants): New methods.
  1878. * ClassType.java, IfState.java: Update for stuff moved around.
  1879. * VarEnumerator.java (reset): Tolerate null scope.
  1880. * Type.java (signatureToType): Add overloading with offset and length.
  1881. Fri Sep 26 21:12:29 1997 Per Bothner <bothner@cygnus.com>
  1882. * Attribute.java, AttrContainer.java, MiscAttr.java,
  1883. SourceFileAttr.java, dump.java: New classes.
  1884. * Makefile.am, Makefile.in: Update for new classes and new automake.
  1885. * ClassFileInput.java: Add support for reading Attributes.
  1886. (main): Moved to new dump.java.
  1887. * ClassTypeWriter.java: Add support for printing Attributes.
  1888. * ClassType.java, Field.java, Method.java: Implement AttrContainer.
  1889. * ClassType.java: Move some stuff to SourceFileAttr.java.
  1890. Fri Sep 26 21:01:25 1997 Per Bothner <bothner@cygnus.com>
  1891. * CpoolUtf8.java (intern): New method.
  1892. * CpoolValue2.java (CpoolValue2): Extra slot count increment needed.
  1893. * CpoolEntry.java (getIndex): New method.
  1894. Sun Jun 22 14:00:10 1997 Per Bothner <bothner@cygnus.com>
  1895. * ConstantPool.java: Add missing break, missing increment.
  1896. Replace most readShort by readUnsignedShort.
  1897. * ClassFileInput.java: Likewise.
  1898. Fixes from Jay Krell <jay.krell@cornell.edu>.
  1899. * ClassTypeWriter.java: Change to extend PrintWriter, not PrintStream.
  1900. * ZipMember.java (print): Fix to use ps argument, not System.out.
  1901. Sun Mar 30 22:54:48 1997 Per Bothner <bothner@cygnus.com>
  1902. * LICENSE: New file - and new license!
  1903. * *.java: Added copyright notice.
  1904. * Access.java (toString): New static method.
  1905. * ClassFileInput.java: New class for reading .class files.
  1906. * ClassType.java" Remove get_*_const methods.
  1907. Rename various fields. Avoid creating constant pool until needed.
  1908. * ClassTypeWriter.java: New class, for printing a ClassType.
  1909. * ConstantPool.java: New class - manage constant pool.
  1910. * Cpool*.java: Add getTag method. Rename hash_of to hashCode.
  1911. Add print methods, and new default constructors.
  1912. * CpoolInt.java, CpoolFloat.java: Combined into CpoolValue1.java.
  1913. * CpoolLong.java, CpoolDouble.java: Combined into CpoolValue2.java.
  1914. * Type.java (signatureToPrimitive, signatureToType, signatureLength,
  1915. signatureToName): New methods.
  1916. Tue Mar 25 13:26:29 1997 Per Bothner <bothner@kalessin.cygnus.com>
  1917. Move this package from codegen to gnu.bytecode.
  1918. Change all names and signatures from byte[] (Utf8) to String.
  1919. Rename some methods to be more "conventional" (e.g.
  1920. strName -> getName; set_class_name -> setname.
  1921. Mon Mar 24 13:35:46 1997 Per Bothner <bothner@deneb.cygnus.com>
  1922. * Method.java: Add more char->byte casts.
  1923. Wed Mar 19 11:04:02 1997 Per Bothner <bothner@deneb.cygnus.com>
  1924. * CpoolRef.java (get_const): Set tags to CONSTANT_InterfaceMethodref
  1925. if method's class is an interface.
  1926. * Method.java (compile_invoke_method): Handle invokeinterface properly,
  1927. Mon Mar 17 17:15:28 1997 Per Bothner <bothner@deneb.cygnus.com>
  1928. * ArrayType.java, Type.java: Cast char literals to byte.
  1929. * ClassType.java: Rename set_super -> setSuper.
  1930. * Method.java (compile_arraylength, compile_if_icmp,
  1931. compile_ifi_lt): New methods.
  1932. (compile_invoke_nonvirtual): Renamed to compile_invoke_special.
  1933. Tue Feb 4 22:13:40 1997 Per Bothner <bothner@deneb.cygnus.com>
  1934. * ZipArchive.java: Add char-constant -> byte casts.
  1935. Mon Feb 3 17:16:17 1997 Per Bothner <bothner@kalessin.cygnus.com>
  1936. * ClassType.java (getClassName): Removed.
  1937. (compileCoerceFromObject): New methods.
  1938. (this_name): Moved to Type.
  1939. * Type.java (getName): New method.
  1940. (compileCoerceFromObject): New methods.
  1941. * Method.java (set_static): Renamed to setStaticFlag.
  1942. (compile_convert, compile_goto_if, compile_primop,
  1943. getDeclaringClass, getReturnType, getParameterTypes, getName): New
  1944. Fri Jan 3 18:52:20 1997 Per Bothner <bothner@deneb.cygnus.com>
  1945. * Access: Make class public.
  1946. (VALATILE -> VOLATILE): Fix typo.
  1947. * ArrayType.java (elements): Make public.
  1948. * Method.java (compile_array_store, compile_array_load):
  1949. Boolean arrays use baload/bastore (byte load/store) op.
  1950. * Type.java (pointer_type, string_type): Make types specific.
  1951. Sat Nov 16 14:52:45 1996 Per Bothner <bothner@deneb.cygnus.com>
  1952. * IfState.java: New class.
  1953. * Makefile.am, Makefile.in: Add IfState.class.
  1954. * Method.java (if_stack): New field.
  1955. (compile_ifneq, compile_else, compile_fi): New methods.
  1956. Sat Oct 26 08:59:10 1996 Per Bothner <bothner@deneb.cygnus.com>
  1957. * *.java: Remove redundant 'import codegen.*'. (MS j++ complains.)
  1958. Mon Sep 16 11:09:40 1996 Per Bothner <bothner@deneb.cygnus.com>
  1959. * CpoolDouble.java: New class, for CONSTANT_Double.
  1960. * Makefile.{am,in}: Add CpoolDouble.class.
  1961. * Method.java (compile_push_double): New method.
  1962. * ZipArchive.java: Fix usage string.
  1963. * Makefile.{am,in}: (javadir): Use $(subdir)
  1964. {DEP_,}DISTFILES): Do not include DATA (i.e. *.class).
  1965. Replace generated EXTRA_DIST with ditto SOURCES.
  1966. Thu Sep 12 17:21:20 1996 Per Bothner <bothner@deneb.cygnus.com>
  1967. * CpoolLong.java: New class, for CONSTANT_Long.
  1968. * Method.java (compile_push_long): New method.
  1969. * codegen/Makefile.{am,in}: Add EXTRA_DIST rule.
  1970. Use $*.java instead of possibly-less-portable $(<F).
  1971. Sun Sep 8 22:26:14 1996 Per Bothner <bothner@deneb.cygnus.com>
  1972. * Makefile.{am,in} (JAVAC): Fix -classpath argument.
  1973. Sat Sep 7 13:00:07 1996 Per Bothner <bothner@deneb.cygnus.com>
  1974. * {ClassType,Method}.java: Support emitting "SourceFile" attribute.
  1975. (setSourceFile): New method to set SourceFile.
  1976. * Method.java (compile_checkcast): Combine overloaded methods.
  1977. Tue Sep 3 19:44:28 1996 Per Bothner <bothner@deneb.cygnus.com>
  1978. * ZipArchive.java: Move ZipMember to ...
  1979. * ZipMember.java: ... new file (and make it public).
  1980. * ZipLoader.java: New class (derived from kawa.lang.SchemeLoader).
  1981. * Makefile.{am,in}: Add new classes.
  1982. Fix broken suffix handling.
  1983. * ClassType.java (getClassName): New method.
  1984. * Method.java (compile_linenumber): New method.
  1985. (LineNumberTable_name_index): New field.
  1986. (linenumber_count, linenumber_table): New fields.
  1987. (write): Emit line numbers.
  1988. (compile_invoke_method): Generalize to support invokestatic.
  1989. (compile_invoke_virtual, compile_invoke_nonvirtual,
  1990. compile_invoke_static): Update accordingly.
  1991. Sat Jul 20 17:32:28 1996 Per Bothner <bothner@deneb.cygnus.com>
  1992. * Makefile.am, Makefile.in (OBJ): Add ZipArchive.class.
  1993. (CLEANFILES): Add ZipMember.class.
  1994. * Method.java (compile_tailcall, reachableHere): New methods.
  1995. Tue Jul 16 23:18:20 1996 Per Bothner <bothner@deneb.cygnus.com>
  1996. * ZipArchive.java: New class, for handling .zip archives.
  1997. * Field.java (strName): New method.
  1998. * Method.java (assign_local): Fix type lossage.
  1999. (compile_checkcast, maybe_compile_checkcast): New methods for arrays.
  2000. (compile_dup): Gneeralize to handle all the dup* instructions.
  2001. (compile_invoke_static): Don't push_stack_type if returning void.
  2002. Thu Jul 11 14:44:21 1996 Per Bothner <bothner@deneb.cygnus.com>
  2003. * ClassType.java: Add support for implementing interfaces.
  2004. * CpoolUtf8.java (get_const): Use proper equals to compare bytes.
  2005. * Method.java: Support emitting debug info: LocalVariableTable.
  2006. New methods enterScope, assign_local.
  2007. New methods compile_new, compile_array_load, compile_swap,
  2008. copile_store_value, compile_{get,put}{field,static},
  2009. * Scope.java: Renamed field prev -> parent.
  2010. New fields nextSibling, firstChile, lastChild.
  2011. New method linkChild (to enter in tree).
  2012. * VarEnumerator.java: New class.
  2013. * Makefile.am, Makefile.in: Add VarEnumerator.class.
  2014. * Variable.java: New fields offset, flags, name_index, signature_index.
  2015. New methods for accessing flags and iterating.
  2016. Tue Jul 2 11:23:44 1996 Anthony Green <green@csk3.cygnus.com>
  2017. * Makefile.am, Makefile.in: New files to support building codegen
  2018. package.
  2019. * Makefile.am, Makefile.in: Added "make clean" support.
  2020. Mon Jul 1 23:11:46 1996 Per Bothner <bothner@deneb.cygnus.com>
  2021. * Access.java, ArrayType.java, ClassType.java, CpoolClass.java,
  2022. CpoolEntry.java, CpoolInt.java, CpoolNameAndType.java, CpoolRef.java,
  2023. CpoolString.java, CpoolUtf8.java, Field.java, Label.java, Method.java,
  2024. Scope.java, Type.java, Variable.java: New classes in new package.
  2025. This provides a medium-level interface to generating .class files.