ChangeLog-2002-12-03 83 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272
  1. 2002-12-03 Maciej Stachowiak <mjs@apple.com>
  2. Reviewed by: Darin Adler
  3. - fixed Deployment build.
  4. * kjs/dtoa.cpp: Work around warnings.
  5. 2002-12-03 Maciej Stachowiak <mjs@apple.com>
  6. - fixed 3114790 - Gamespot reviews pages badly mis-rendering
  7. because floating point numbers format wide
  8. Reviewed by: David Hyatt
  9. * kjs/dtoa.cpp: Imported float <--> string conversion routines
  10. from David M. Gay. I changed this to fix warnings and avoid
  11. colliding with names of standard library functions.
  12. * kjs/dtoa.h: Added a header I made up for dtoa.cpp
  13. * kjs/ustring.cpp:
  14. (UString::from): Use new double to string routine (kjs_strtod).
  15. (UString::toDouble): Use new string to double routine (kjs_dtoa).
  16. * JavaScriptCore.pbproj/project.pbxproj: Added new files
  17. 2002-11-27 John Sullivan <sullivan@apple.com>
  18. * kjs/collector.cpp:
  19. removed puts("COLLECT") leftover debugging spam that was
  20. buggin' gramps
  21. === Alexander-34 ===
  22. 2002-11-26 Maciej Stachowiak <mjs@apple.com>
  23. Change ActivationImp to be allocated via the garbage collector
  24. again instead of on the stack. This fixes the following four
  25. regressions but sadly it causes a 6% performance hit. It's
  26. probably possibly to reduce the hit a bit by being smarter about
  27. inlining and the way the marking list variant is implemented, but
  28. I'll look into that later.
  29. - fixed 3111500 - REGRESSION: crash in "KJS::ScopeChain::mark()" on www.posci.com
  30. - fixed 3111145 - REGRESSION: reproducible crash in KJS hashtable lookup at time.com
  31. - fixed 3110897 - REGRESSION: javascript crasher on http://bmwgallery.tripod.com/
  32. - fixed 3109987 - REGRESSION: Reproducible crash in KJS ObjectImp at live365.com
  33. Also:
  34. - improved DEBUG_COLLECTOR mode a bit by never giving memory back
  35. to the system.
  36. * kjs/collector.cpp:
  37. * kjs/context.h:
  38. * kjs/function.cpp:
  39. (ActivationImp::ActivationImp):
  40. (ActivationImp::mark):
  41. (ActivationImp::createArgumentsObject):
  42. * kjs/function.h:
  43. * kjs/internal.cpp:
  44. (ContextImp::ContextImp):
  45. (ContextImp::mark):
  46. * kjs/list.cpp:
  47. * kjs/list.h:
  48. * kjs/value.cpp:
  49. (Value::Value):
  50. 2002-11-26 Darin Adler <darin@apple.com>
  51. * kjs/property_map.cpp:
  52. (PropertyMap::save): Look at the attributes the same way in the single hash entry
  53. case as in the actual hash table case. Change the rule for which attributes to save
  54. to "attributes that don't have the ReadOnly, DontEnum, or Function bit set".
  55. Also fix bug where saving an empty property map would leave the count set to the old value.
  56. 2002-11-26 Richard Williamson <rjw@apple.com>
  57. Remove debugging code. Could be cause of performance regresssion.
  58. * kjs/nodes.cpp:
  59. (FunctionCallNode::evaluate):
  60. Restire attributes correctly.
  61. * kjs/property_map.cpp:
  62. 2002-11-25 Richard Williamson <rjw@apple.com>
  63. Use delete[] (not delete) operator to delete array.
  64. * kjs/property_map.cpp:
  65. 2002-11-25 Richard Williamson <rjw@apple.com>
  66. Added debugging info. Fixed property map save function.
  67. * kjs/nodes.cpp:
  68. (FunctionCallNode::evaluate):
  69. * kjs/property_map.cpp:
  70. 2002-11-25 Richard Williamson <rjw@apple.com>
  71. Changes for back/forward. Currently disabled.
  72. * kjs/property_map.cpp:
  73. * kjs/property_map.h:
  74. 2002-11-25 Darin Adler <darin@apple.com>
  75. * kjs/property_map.cpp: Rearrange code a little bit and tweak indentation.
  76. This might provide a tiny speedup because we don't look at the single entry
  77. any more in cases where the _table pointer is non-0.
  78. 2002-11-24 Darin Adler <darin@apple.com>
  79. - changed ScopeChain to not ref each item in the chain, and use
  80. marking instead; gains 1% on JavaScript iBench
  81. * kjs/context.h: Return chain by reference.
  82. * kjs/internal.cpp: (ContextImp::mark): Mark the scope chain.
  83. * kjs/interpreter.cpp: (Context::scopeChain): Return chain by reference.
  84. * kjs/interpreter.h: Make some Context methods inline.
  85. * kjs/nodes.cpp:
  86. (ThisNode::evaluate): Get at ContextImp directly.
  87. (ResolveNode::evaluateReference): Ditto.
  88. (VarDeclNode::evaluate): Ditto.
  89. (VarDeclNode::processVarDecls): Ditto.
  90. (FuncDeclNode::processFuncDecl): Pass ScopeChain directly to avoid copying.
  91. (FuncExprNode::evaluate): Ditto.
  92. * kjs/object.cpp: Make scope and setScope inline.
  93. * kjs/object.h: Make scope return a chain by reference. Make scope and
  94. setScope both be inline. Use a normal ScopeChain instead of NoRefScopeChain
  95. since they are now one and the same.
  96. * kjs/scope_chain.cpp: Remove all the code to ref and deref objects.
  97. Merge NoRefScopeChain in with ScopeChain since they both work this way now.
  98. * kjs/scope_chain.h: Remove NoRefScopeChain and simplify the ref counts.
  99. Make more functions inline.
  100. 2002-11-24 Maciej Stachowiak <mjs@apple.com>
  101. - fixed 3098356 - Hard hang on movie search at www.movietickets.com
  102. * kjs/string_object.cpp:
  103. (StringProtoFuncImp::call): When doing a regexp replacement that
  104. results in an empty match, always move on to the next character
  105. after doing the replacement. The previous code would hit an
  106. infinite loop if an initial empty match was replaced with the
  107. empty string.
  108. 2002-11-24 Maciej Stachowiak <mjs@apple.com>
  109. - fixed 3095446 - Crash on AppleScript page due to very long argument list
  110. * kjs/grammar.y: Don't try to construct the argument list in the
  111. right order, since that blows out the parser stack.
  112. * kjs/nodes.cpp:
  113. (ArgumentsNode::ArgumentsNode): Instead reverse the argument list
  114. here.
  115. * kjs/nodes.h: Make ArgumentsNode a friend of ArgumentListNode.
  116. * kjs/grammar.cpp: Updated from grammar.y.
  117. 2002-11-23 Maciej Stachowiak <mjs@apple.com>
  118. - completed Darin's mostly-fix for 3037795 - Resource use
  119. increases when accessing very high index value in array
  120. The two missing pieces were handling sparse properties when
  121. shrinking the array, and when sorting. Thse are now both taken
  122. care of.
  123. * kjs/array_instance.h:
  124. * kjs/array_object.cpp:
  125. (ArrayInstanceImp::put):
  126. (ArrayInstanceImp::deleteProperty):
  127. (ArrayInstanceImp::resizeStorage):
  128. (ArrayInstanceImp::setLength):
  129. (ArrayInstanceImp::sort):
  130. (ArrayInstanceImp::pushUndefinedObjectsToEnd):
  131. * kjs/identifier.h:
  132. * kjs/object.h:
  133. * kjs/property_map.cpp:
  134. * kjs/property_map.h:
  135. * kjs/reference_list.cpp:
  136. (ReferenceList::append):
  137. (ReferenceList::length):
  138. * kjs/reference_list.h:
  139. * kjs/ustring.cpp:
  140. (UString::toUInt32):
  141. * kjs/ustring.h:
  142. 2002-11-23 Maciej Stachowiak <mjs@apple.com>
  143. Numerous collector changes for a net gain of 3% on JS ibench:
  144. - Replaced per-block bitmap with free list.
  145. - Increased number of empty blocks kept around to 2.
  146. - Doubled block size.
  147. - When scanning heap in collector, skip scanning the rest of a
  148. block as soon as we see as many live cells as the the number of
  149. used cells it had originally.
  150. Also the following collector changes unrelated to performance:
  151. - Made constants `const int' instead of `static const int'.
  152. - Miscellaneous code cleanup.
  153. * kjs/collector.cpp:
  154. - Added debugging mode enabled by defining DEBUG_GC which asserts
  155. when a destroyed ValueImp
  156. * kjs/internal.cpp:
  157. (ContextImp::mark):
  158. * kjs/value.cpp:
  159. (Value::Value):
  160. * kjs/value.h:
  161. * kjs/config.h:
  162. 2002-11-22 Darin Adler <darin@apple.com>
  163. - replaced List class with a vector rather than a linked list, changed it
  164. to use a pool of instances instead of all the nodes allocated off of the
  165. heap; gives 10% gain on iBench
  166. * kjs/list.h: Complete rewrite.
  167. * kjs/list.cpp: Ditto.
  168. * kjs/array_object.cpp: (compareWithCompareFunctionForQSort): Go back to
  169. doing a clear and two appends here. Fast with the new list implementation.
  170. * kjs/collector.h: Remove _COLLECTOR hack and just make rootObjectClasses
  171. return a const void *.
  172. * kjs/collector.cpp: Remove _COLLECTOR hack, and various other minor tweaks.
  173. 2002-11-22 Darin Adler <darin@apple.com>
  174. - prepare to reimplement KJS::List; move to its own file, add statistics
  175. * kjs/function_object.cpp: (FunctionProtoFuncImp::call): Use new copyTail()
  176. function rather than copy() and removeFirst().
  177. * kjs/identifier.cpp: Add statistics, off by default.
  178. * kjs/property_map.cpp: Add statistics, off by default.
  179. * kjs/list.cpp: Added. Moved code here. To be rewritten.
  180. * kjs/list.h: Added. Moved interface here. To be rewritten.
  181. * kjs/types.cpp: Removed.
  182. * kjs/types.h: Now just an empty header that includes other headers.
  183. * JavaScriptCore.pbproj/project.pbxproj: Add new files, rearrange.
  184. 2002-11-22 Maciej Stachowiak <mjs@apple.com>
  185. - reduce cell size to 56 bytes from 64, now that nearly all
  186. objects fit in that size. .5% speed gain and probably some
  187. footprint gain.
  188. * kjs/collector.cpp: Change CELL_SIZE from 64 to 56.
  189. 2002-11-22 Darin Adler <darin@apple.com>
  190. - change ScopeChain to be a singly linked list shares tails, gives 11% gain on iBench
  191. * kjs/context.h:
  192. (ContextImp::pushScope): Make inline, use push instead of prepend, and pass imp pointer.
  193. (ContextImp::popScope): Make inline, use pop instead of removeFirst.
  194. * kjs/function.cpp: (DeclaredFunctionImp::DeclaredFunctionImp): No need to copy.
  195. * kjs/function_object.cpp: (FunctionObjectImp::construct): Use push instead of
  196. prepend, and pass imp pointer.
  197. * kjs/internal.cpp: (ContextImp::ContextImp): Use clear, push instead of prepend,
  198. and pass imp pointers.
  199. * kjs/nodes.cpp: (ResolveNode::evaluateReference): Use isEmpty, pop, and top instead
  200. of ScopeChainIterator.
  201. * kjs/object.h: Change _scope to be a NoRefScopeChain.
  202. * kjs/object.cpp: No need to initialize _scope any more, since it's not a NoRefScopeChain.
  203. * kjs/scope_chain.h: Rewrite, different implementation and interface.
  204. * kjs/scope_chain.cpp: More of the same.
  205. 2002-11-22 Maciej Stachowiak <mjs@apple.com>
  206. - a simple change for .4% gain on ibench - instead of unmarking
  207. all objects at the start of collection, instead unmark as part of
  208. the sweep phase
  209. * kjs/collector.cpp:
  210. (Collector::collect): Remove separate unmarking pass and instead
  211. unmark the objects that don't get collected during the sweep
  212. phase.
  213. 2002-11-21 Darin Adler <darin@apple.com>
  214. - stop garbage collecting the ActivationImp objects, gets 3% on iBench
  215. - pave the way to separate the argument lists from scope chains
  216. * kjs/context.h: Added. Moved ContextImp here so it can use things defined
  217. in function.h
  218. * kjs/scope_chain.h: Added. Starting as a copy of List, to be improved.
  219. * kjs/scope_chain.cpp: Added. Starting as a copy of List, to be improved.
  220. * JavaScriptCore.pbproj/project.pbxproj: Rearranged things, added context.h.
  221. * kjs/function.cpp:
  222. (FunctionImp::call): Pass InterpreterImp, not ExecState, to ContextImp.
  223. (DeclaredFunctionImp::DeclaredFunctionImp): List -> ScopeChain.
  224. (ActivationImp::createArgumentsObject): ArgumentList -> List.
  225. (GlobalFuncImp::call): Pass InterpreterImp, not an ExecState, to ContextImp.
  226. * kjs/function.h: List -> ScopeChain.
  227. * kjs/function_object.cpp: (FunctionObjectImp::construct): List -> ScopeChain.
  228. * kjs/internal.cpp:
  229. (ContextImp::ContextImp): Set the context in the interpreter.
  230. (ContextImp::~ContextImp): Set the context in the interpreter to the caller.
  231. (ContextImp::mark): Mark all the activation objects.
  232. (InterpreterImp::InterpreterImp): Initialize context to 0.
  233. (InterpreterImp::mark): Mark the top context.
  234. (InterpreterImp::evaluate): Pass InterpreterImp to ContextImp.
  235. * kjs/internal.h: Move ContextImp to its own header. Add setContext to InterpreterImp.
  236. * kjs/interpreter.cpp: (Context::scopeChain): List -> ScopeChain.
  237. * kjs/interpreter.h: List -> ScopeChain.
  238. * kjs/nodes.cpp:
  239. (ResolveNode::evaluateReference): List -> ScopeChain.
  240. (FuncDeclNode::processFuncDecl): List -> ScopeChain.
  241. (FuncExprNode::evaluate): List -> ScopeChain.
  242. * kjs/object.cpp: List -> ScopeChain.
  243. * kjs/object.h: List -> ScopeChain.
  244. * kjs/types.h: Remove needsMarking features from List.
  245. * kjs/types.cpp: Ditto.
  246. 2002-11-21 Maciej Stachowiak <mjs@apple.com>
  247. - reduced the size of PropertyMap by storing sizes and such in the
  248. dynamically allocated part of the object to reduce the size of
  249. ObjectImp - .5% speed improvement on JS iBench.
  250. * kjs/property_map.cpp:
  251. * kjs/property_map.h:
  252. 2002-11-21 Maciej Stachowiak <mjs@apple.com>
  253. * Makefile.am: Pass symroots for this tree to pbxbuild.
  254. === Alexander-33 ===
  255. 2002-11-21 Darin Adler <darin@apple.com>
  256. * kjs/property_map.cpp: More assertions.
  257. 2002-11-21 Darin Adler <darin@apple.com>
  258. * kjs/property_map.cpp: Turn that consistency check back off.
  259. 2002-11-21 Darin Adler <darin@apple.com>
  260. - someone somewhere must be defining a macro named check, causing a compile failure in WebCore
  261. Rename check() to checkConsistency().
  262. * kjs/property_map.h: Rename.
  263. * kjs/property_map.cpp: Yes, rename.
  264. 2002-11-21 Darin Adler <darin@apple.com>
  265. - add self-check to property map in hopes of finding the cnet.com bug
  266. * kjs/property_map.h: Add check() function.
  267. * kjs/property_map.cpp: Add the checking, controlled by DO_CONSISTENCY_CHECK.
  268. - fixed UChar interface so it's not so slow in debug builds
  269. * kjs/ustring.h: Nothing in UChar needs to be private.
  270. * kjs/function.cpp: (GlobalFuncImp::call):
  271. * kjs/function_object.cpp: (FunctionObjectImp::construct):
  272. * kjs/identifier.cpp:
  273. * kjs/lexer.cpp: (Lexer::setCode), (Lexer::shift):
  274. * kjs/lookup.cpp: (keysMatch):
  275. * kjs/ustring.cpp: (UString::Rep::computeHash), (KJS::compare):
  276. Use the "uc" field instead of the "unicode()" inline function.
  277. 2002-11-21 Darin Adler <darin@apple.com>
  278. - fixed a null-dereference I ran into while trying to reproduce bug 3107351
  279. * kjs/function.h: Change ActivationImp constructor to take context parameter.
  280. * kjs/function.cpp: (ActivationImp::ActivationImp): Take context parameter,
  281. not execution state parameter.
  282. * kjs/internal.cpp: (ContextImp::ContextImp): Initialize activation object
  283. from context, not execution state, because the new context is not yet in the
  284. execution state.
  285. 2002-11-20 Darin Adler <darin@apple.com>
  286. - added a feature for Richard to use in his back/forward cache
  287. * kjs/object.h: Added save/restoreProperties.
  288. * kjs/property_map.h: Here too.
  289. * kjs/property_map.cpp: Here too.
  290. 2002-11-20 Darin Adler <darin@apple.com>
  291. - created argument list objects only on demand for a 7.5% speedup
  292. * kjs/function.h: Change ActivationImp around.
  293. * kjs/function.cpp:
  294. (FunctionImp::call): Pass a pointer to the arguments list to avoid ref/unref.
  295. (FunctionImp::get): Get the function pointer from the context directly,
  296. not the activation object.
  297. (ArgumentsImp::ArgumentsImp): Add an overload that takes no arguments.
  298. (ActivationImp::ActivationImp): Store a context pointer and an arguments object pointer.
  299. (ActivationImp::get): Special case for arguments, create it and return it.
  300. (ActivationImp::put): Special case for arguments, can't be set.
  301. (ActivationImp::hasProperty): Special case for arguments, return true.
  302. (ActivationImp::deleteProperty): Special case for arguments, refuse to delete.
  303. (ActivationImp::mark): Mark the arguments object.
  304. (ActivationImp::createArgumentsObject): Do the work of actually creating it.
  305. (GlobalFuncImp::call): Use stack-based objects for the ContextImp and ExecState.
  306. * kjs/internal.h: Keep function and arguments pointer in the context.
  307. * kjs/internal.cpp:
  308. (ContextImp::ContextImp): Don't pass in the func and args when making an ActivationImp.
  309. (InterpreterImp::evaluate): Use stack-based objects here.
  310. * kjs/types.h: Add ArgumentList as a synonym for List, soon to be separate.
  311. 2002-11-20 Maciej Stachowiak <mjs@apple.com>
  312. Reduced the size of ValueImp by 8 bytes for a .5% speedup.
  313. * kjs/value.h: Removed destructed flag. Made refcount and flag 16
  314. bits each.
  315. * kjs/value.cpp:
  316. (ValueImp::~ValueImp): Don't set destructed flag.
  317. 2002-11-20 Darin Adler <darin@apple.com>
  318. * kjs/types.cpp: Keep ref count for the whole lists of nodes.
  319. Doesn't speed things up much, less than 1%.
  320. 2002-11-20 Maciej Stachowiak <mjs@apple.com>
  321. * kjs/collector.cpp:
  322. (Collector::allocate): Clear the flags on newly allocated objects.
  323. 2002-11-20 Darin Adler <darin@apple.com>
  324. - oops, checked in big regression instead of 5% speedup
  325. * kjs/function.cpp: (ActivationImp::ActivationImp): Make a marking
  326. list, not a refing list.
  327. - a cut at the sparse array implementation
  328. * kjs/array_instance.h: Keep storageLength separate from length.
  329. * kjs/array_object.cpp:
  330. (ArrayInstanceImp::ArrayInstanceImp): Start with storageLength == length.
  331. (ArrayInstanceImp::get): Check against storage length.
  332. (ArrayInstanceImp::put): Ditto.
  333. (ArrayInstanceImp::hasProperty): Ditto.
  334. (ArrayInstanceImp::deleteProperty): Ditto.
  335. (ArrayInstanceImp::setLength): Only enlarge storage length up to a cutoff.
  336. (ArrayInstanceImp::mark): Use storageLength.
  337. (ArrayInstanceImp::pushUndefinedObjectsToEnd): Added FIXME.
  338. 2002-11-20 Darin Adler <darin@apple.com>
  339. - decrease ref/deref -- 5% speedup in iBench
  340. * JavaScriptCore.pbproj/project.pbxproj: Added array_instance.h
  341. * kjs/array_instance.h: Added so it can be shared by function.h.
  342. * kjs/array_object.cpp:
  343. * kjs/array_object.h:
  344. * kjs/bool_object.cpp:
  345. * kjs/bool_object.h:
  346. * kjs/collector.cpp:
  347. * kjs/date_object.cpp:
  348. * kjs/date_object.h:
  349. * kjs/error_object.cpp:
  350. * kjs/function.cpp:
  351. * kjs/function.h:
  352. * kjs/function_object.cpp:
  353. * kjs/internal.cpp:
  354. * kjs/internal.h:
  355. * kjs/math_object.cpp:
  356. * kjs/nodes.cpp:
  357. * kjs/number_object.cpp:
  358. * kjs/object.cpp:
  359. * kjs/object.h:
  360. * kjs/object_object.cpp:
  361. * kjs/property_map.cpp:
  362. * kjs/reference.cpp:
  363. * kjs/reference.h:
  364. * kjs/regexp_object.cpp:
  365. * kjs/string_object.cpp:
  366. * kjs/string_object.h:
  367. * kjs/value.cpp:
  368. * kjs/value.h:
  369. Switched lots of interfaces so they don't require ref/deref.
  370. 2002-11-20 Maciej Stachowiak <mjs@apple.com>
  371. Fixed the two most obvious problems with the new GC for another 6%
  372. improvement.
  373. * kjs/collector.cpp:
  374. (Collector::allocate): Don't bother doing the bit tests on a bitmap word if
  375. all it's bits are on.
  376. (Collector::collect): Track memoryFull boolean.
  377. * kjs/collector.h: Inlined outOfMemory since it was showing up on profiles.
  378. 2002-11-20 Maciej Stachowiak <mjs@apple.com>
  379. Rewrote garbage collector to make blocks of actual memory instead
  380. of blocks of pointers. 7% improvement on JavaScript
  381. iBench. There's still lots of room to tune the new GC, this is
  382. just my first cut.
  383. * kjs/collector.cpp:
  384. (Collector::allocate):
  385. (Collector::collect):
  386. (Collector::size):
  387. (Collector::outOfMemory):
  388. (Collector::finalCheck):
  389. (Collector::numGCNotAllowedObjects):
  390. (Collector::numReferencedObjects):
  391. (Collector::liveObjectClasses):
  392. * kjs/collector.h:
  393. * kjs/function.cpp:
  394. (ActivationImp::ActivationImp):
  395. * kjs/function.h:
  396. 2002-11-20 Darin Adler <darin@apple.com>
  397. - on the road to killing ActivationImp
  398. * kjs/function.h: Add get/put to FunctionImp. Remove argumentsObject() from
  399. ActivationImp. Add function() to ActivationImp.
  400. * kjs/function.cpp:
  401. (FunctionImp::FunctionImp): No arguments property.
  402. (FunctionImp::call): No need to set up the arguments property.
  403. (FunctionImp::parameterString): Remove ** strangeness.
  404. (FunctionImp::processParameters): Ditto.
  405. (FunctionImp::get): Added, handles arguments and length properties.
  406. (FunctionImp::put): Ditto.
  407. (FunctionImp::hasProperty): Ditto.
  408. (FunctionImp::deleteProperty): Ditto.
  409. (ActivationImp::ActivationImp): Store a function pointer so we can find it
  410. in the context.
  411. * kjs/function_object.cpp: (FunctionObjectImp::construct): No need to set up
  412. arguments property.
  413. * kjs/nodes.cpp: (FuncExprNode::evaluate): No need to set up length property.
  414. * kjs/internal.h: Return ObjectImp * for activation object.
  415. * kjs/interpreter.h: Remove stray declaration of ExecStateImp.
  416. 2002-11-20 Darin Adler <darin@apple.com>
  417. - add a couple of list operations to avoid clearing lists so much during sorting; gives 1.5% iBench
  418. * kjs/types.h: Added replaceFirst/replaceLast.
  419. * kjs/types.cpp: (List::replaceFirst), (List::replaceLast): Added.
  420. * kjs/array_object.cpp: (compareWithCompareFunctionForQSort): Use replaceFirst/replaceLast.
  421. * kjs/property_map.cpp: Put in an ifdef so I can re-add/remove the single entry to see if
  422. it has outlived its usefulness. (It hasn't yet.)
  423. 2002-11-20 Darin Adler <darin@apple.com>
  424. - atomic identifiers; gives another 6.5% in the iBench suite
  425. * kjs/identifier.h: Did the real thing.
  426. * kjs/identifier.cpp: Ditto.
  427. * kjs/property_map.h: _tableSizeHashMask -> _tableSizeMask
  428. * kjs/property_map.cpp: The above, plus take advantage of comparing
  429. by pointer instead of by comparing bytes.
  430. 2002-11-19 Darin Adler <darin@apple.com>
  431. - a few more globals for often-used property names
  432. - conversion to Identifier from UString must now be explicit
  433. * kjs/error_object.cpp:
  434. * kjs/function.cpp:
  435. * kjs/function_object.cpp:
  436. * kjs/identifier.cpp:
  437. * kjs/identifier.h:
  438. * kjs/lexer.cpp:
  439. * kjs/nodes.cpp:
  440. * kjs/number_object.cpp:
  441. * kjs/object.cpp:
  442. * kjs/object.h:
  443. * kjs/string_object.cpp:
  444. * kjs/testkjs.cpp:
  445. * kjs/ustring.cpp:
  446. * kjs/ustring.h:
  447. 2002-11-19 Darin Adler <darin@apple.com>
  448. - another step towards atomic identifiers; storing hash in the string rep. gives about
  449. a 1.5% speedup in the JavaScript iBench
  450. * kjs/ustring.h: Add a hash field to UString::Rep.
  451. * kjs/ustring.cpp:
  452. (UString::Rep::create): Set hash to uninitialized value.
  453. (UString::Rep::destroy): Do the deleting in her, and call Identifier if needed.
  454. (UString::Rep::computeHash): Added.
  455. (UString::append): Set hash to 0 when modifying the string in place.
  456. (UString::operator=): Ditto.
  457. * kjs/property_map.cpp: Use the hash from UString.
  458. * kjs/identifier.h: Added aboutToDestroyUStringRep.
  459. * kjs/identifier.cpp: (Identifier::aboutToDestroyUStringRep): Added.
  460. 2002-11-19 Darin Adler <darin@apple.com>
  461. - next step towards atomic identifiers; Identifier is no longer derived from UString
  462. * kjs/identifier.h: Remove base class and add _ustring member.
  463. * kjs/identifier.cpp: Add null and an == that works with const char *.
  464. * kjs/property_map.cpp: Get rep through _ustring.
  465. * kjs/function.cpp: (FunctionImp::parameterString): Call ustring().
  466. * kjs/function_object.cpp: (FunctionProtoFuncImp::call): Ditto.
  467. * kjs/nodes.cpp:
  468. (PropertyNode::evaluate): Ditto.
  469. (VarDeclNode::evaluate): Ditto.
  470. (ForInNode::execute): Ditto.
  471. * kjs/nodes2string.cpp: (SourceStream::operator<<): Add overload for Identifier.
  472. * kjs/reference.cpp: (Reference::getValue): Call ustring().
  473. * kjs/regexp_object.cpp: (RegExpObjectImp::get): Call ustring().
  474. 2002-11-19 Darin Adler <darin@apple.com>
  475. - fixed memory trasher
  476. * kjs/ustring.cpp: (UString::from): Fix "end of buffer" computation.
  477. 2002-11-19 Darin Adler <darin@apple.com>
  478. - a first step towards atomic identifiers in JavaScript
  479. Most places that work with identifiers now use Identifier
  480. instead of UString.
  481. * kjs/identifier.cpp: Added.
  482. * kjs/identifier.h: Added.
  483. * JavaScriptCore.pbproj/project.pbxproj: Added files.
  484. * kjs/array_object.cpp:
  485. * kjs/array_object.h:
  486. * kjs/completion.cpp:
  487. * kjs/completion.h:
  488. * kjs/date_object.cpp:
  489. * kjs/date_object.h:
  490. * kjs/function.cpp:
  491. * kjs/function.h:
  492. * kjs/function_object.cpp:
  493. * kjs/grammar.cpp:
  494. * kjs/grammar.cpp.h:
  495. * kjs/grammar.h:
  496. * kjs/grammar.y:
  497. * kjs/internal.cpp:
  498. * kjs/internal.h:
  499. * kjs/lexer.cpp:
  500. * kjs/lookup.cpp:
  501. * kjs/lookup.h:
  502. * kjs/math_object.cpp:
  503. * kjs/math_object.h:
  504. * kjs/nodes.cpp:
  505. * kjs/nodes.h:
  506. * kjs/number_object.cpp:
  507. * kjs/number_object.h:
  508. * kjs/object.cpp:
  509. * kjs/object.h:
  510. * kjs/property_map.cpp:
  511. * kjs/property_map.h:
  512. * kjs/reference.cpp:
  513. * kjs/reference.h:
  514. * kjs/regexp_object.cpp:
  515. * kjs/regexp_object.h:
  516. * kjs/string_object.cpp:
  517. * kjs/string_object.h:
  518. 2002-11-19 Darin Adler <darin@apple.com>
  519. - fix hash function and key comparison for the other kind of hash table; yields 3%
  520. * kjs/lookup.cpp:
  521. (keysMatch): Added.
  522. (Lookup::findEntry): Don't allocate and convert to ASCII just to search.
  523. 2002-11-19 Darin Adler <darin@apple.com>
  524. - another hash table fix; yields a 2% improvement on iBench JavaScript
  525. * kjs/property_map.cpp: A few more places where we use & instead of %.
  526. - some List changes that don't affect speed yet
  527. * kjs/types.cpp:
  528. (List::prependList): Tighten up a tiny bit.
  529. (List::copy): Use prependList.
  530. * kjs/types.h: Remove appendList and globalClear.
  531. * kjs/interpreter.cpp: (Interpreter::finalCheck): Remove List::globalClear().
  532. 2002-11-19 Darin Adler <darin@apple.com>
  533. - fixed 3105026 -- REGRESSION: DHTML menus are broken all over the place
  534. * kjs/types.cpp: (List::prepend): Fix backwards links in new node.
  535. 2002-11-19 Darin Adler <darin@apple.com>
  536. - a fix that gives another 1.5% on the iBench JavaScript test
  537. * kjs/ustring.cpp: (UString::from): Stop using sprintf to format integers.
  538. 2002-11-18 Darin Adler <darin@apple.com>
  539. - reduced the creation of Value objects and hoisted the property map
  540. into Object for another gain of about 6%
  541. * JavaScriptCore.pbproj/project.pbxproj: Made property_map.h public.
  542. * kjs/array_object.cpp:
  543. (compareWithCompareFunctionForQSort): Don't wrap the ValueImp * in a Value
  544. just to add it to a list.
  545. (ArrayProtoFuncImp::call): Pass the globalObject directly so we don't have
  546. to ref/deref.
  547. * kjs/function.cpp:
  548. (FunctionImp::call): Use a reference for the global object to avoid ref/deref.
  549. (GlobalFuncImp::call): Ditto.
  550. * kjs/internal.cpp:
  551. (BooleanImp::toObject): Put the object directly into the list, don't create a Value.
  552. (StringImp::toObject): Ditto.
  553. (NumberImp::toObject): Ditto.
  554. (InterpreterImp::evaluate): Use a reference for the global object.
  555. * kjs/internal.h: Return a reference for the global object.
  556. * kjs/interpreter.cpp: (Interpreter::globalObject): Ditto.
  557. * kjs/interpreter.h: Ditto.
  558. * kjs/object.cpp: Use _prop directly in the object, not a separate pointer.
  559. * kjs/object.h: Ditto.
  560. * kjs/types.cpp: Added List methods that work directly with ValueImp.
  561. (List::append): Added a ValueImp version.
  562. (List::prepend): Ditto.
  563. (List::appendList): Work directly with the ValueImp's.
  564. (List::prependList): Ditto.
  565. (List::copy): Use appendList.
  566. (List::empty): Use a shared global List.
  567. * kjs/types.h: Update for above changes.
  568. 2002-11-18 Darin Adler <darin@apple.com>
  569. * kjs/property_map.cpp: Oops, copyright goes to Apple, not me.
  570. * kjs/property_map.h: Ditto.
  571. 2002-11-18 Darin Adler <darin@apple.com>
  572. - property and string improvements giving a 7% or so improvement in JavaScript iBench
  573. * kjs/property_map.h: Rewrite to use a hash table.
  574. * kjs/property_map.cpp: Ditto.
  575. * kjs/string_object.h:
  576. * kjs/string_object.cpp:
  577. (StringInstanceImp::StringInstanceImp): Construct a string with the right value
  578. instead of putting the string in later.
  579. (StringInstanceImp::get): Get the length from the string, not a separate property.
  580. (StringInstanceImp::put): Ignore attempts to set length, since we don't put it in
  581. the property map.
  582. (StringInstanceImp::hasProperty): Return true for length.
  583. (StringInstanceImp::deleteProperty): Return false for length.
  584. (StringObjectImp::construct): Call new StringInstanceImp constructor. Don't try
  585. to set a length property.
  586. * kjs/ustring.h: Make the rep deref know how to deallocate the rep.
  587. * kjs/ustring.cpp:
  588. (UString::release): Move the real work to the rep's deref, since the hash table
  589. now uses the rep directly.
  590. * kjs/object.h: Remove unused field.
  591. 2002-11-18 Maciej Stachowiak <mjs@apple.com>
  592. Change List to completely avoid going through the GC
  593. allocator. 3.6% performance improvement on JavaScript iBench.
  594. * kjs/internal.cpp:
  595. (InterpreterImp::mark): Don't mark the empty list.
  596. For all the methods below I basically lifted the ListImp version
  597. up to the List method with minor tweaks.
  598. * kjs/types.cpp:
  599. (ListIterator::ListIterator):
  600. (List::List):
  601. (List::operator=):
  602. (List::~List):
  603. (List::mark):
  604. (List::append):
  605. (List::prepend):
  606. (List::appendList):
  607. (List::prependList):
  608. (List::removeFirst):
  609. (List::removeLast):
  610. (List::remove):
  611. (List::clear):
  612. (List::clearInternal):
  613. (List::copy):
  614. (List::begin):
  615. (List::end):
  616. (List::isEmpty):
  617. (List::size):
  618. (List::at):
  619. (List::operator[]):
  620. (List::empty):
  621. (List::erase):
  622. (List::refAll):
  623. (List::derefAll):
  624. (List::swap):
  625. (List::globalClear):
  626. * kjs/types.h:
  627. 2002-11-18 Maciej Stachowiak <mjs@apple.com>
  628. Fixed a horrible leak introduced with my last change that
  629. somehow did not show up on my machine.
  630. * kjs/types.cpp:
  631. (List::List): Mark ListImp as GC allowed.
  632. 2002-11-18 Maciej Stachowiak <mjs@apple.com>
  633. Another step towards the List conversion: stop inheriting from Value.
  634. * kjs/types.cpp:
  635. (ListIterator::ListIterator):
  636. (List::List):
  637. (List::operator=):
  638. (List::~List):
  639. (List::mark):
  640. (List::append):
  641. (List::prepend):
  642. (List::appendList):
  643. (List::prependList):
  644. (List::removeFirst):
  645. (List::removeLast):
  646. (List::remove):
  647. (List::clear):
  648. (List::copy):
  649. (List::begin):
  650. (List::end):
  651. (List::isEmpty):
  652. (List::size):
  653. (List::at):
  654. (List::operator[]):
  655. * kjs/types.h:
  656. 2002-11-18 Maciej Stachowiak <mjs@apple.com>
  657. Partway to removing Value from List. Created a marking List
  658. variant, used it in place of ListImp.
  659. * kjs/internal.h: Removed List stuff.
  660. * kjs/internal.cpp:
  661. (InterpreterImp::mark): Call appropriate List method to do marking of
  662. empty ListImp.
  663. * kjs/object.h:
  664. * kjs/object.cpp: Use marking List instead of ListImp *.
  665. * kjs/types.h:
  666. * kjs/types.cpp:
  667. (List::List): New boolean needsMarking parameter.
  668. (List::operator=): Perform trickery related to needsMarking.
  669. (List::~List): Likewise.
  670. (List::mark): Mark the ListImp.
  671. (List::markEmptyList):
  672. (ListImp::*): Moved here fron internal.cpp, they will be
  673. integrated into the relevant List methods soon.
  674. 2002-11-18 Darin Adler <darin@apple.com>
  675. - another string constant discovered that can be optimized
  676. * kjs/object.h: Add a property name constant for "__proto__".
  677. * kjs/object.cpp: Define it.
  678. (ObjectImp::get): Use it.
  679. (ObjectImp::hasProperty): Use it.
  680. - prepare to turn PropertyMap into a hash table
  681. * kjs/object.cpp:
  682. (ObjectImp::mark): Use the new PropertyMap::mark().
  683. (ObjectImp::put): Use the new overload of PropertyMap::get().
  684. (ObjectImp::deleteProperty): Use the new overload of PropertyMap::get().
  685. (ObjectImp::propList): Use PropertyMap::addEnumerablesToReferenceList().
  686. * kjs/property_map.h: Remove PropertyMapNode and make all node-related methods private.
  687. Add mark(), a new overload of get() that returns attributes, a clear() that takes no attributes,
  688. and addEnumerablesToReferenceList().
  689. * kjs/property_map.cpp:
  690. (PropertyMap::get): Added new overload.
  691. (PropertyMap::clear): Added new overload.
  692. (PropertyMap::mark): Added.
  693. (PropertyMap::addEnumerablesToReferenceList): Added.
  694. * kjs/ustring.h: Added a hash function.
  695. * kjs/ustring.cpp: (KJS::hash): Added.
  696. 2002-11-18 Darin Adler <darin@apple.com>
  697. - simplified the ExecState class, which was showing up in profiles
  698. Sped up JavaScript iBench by 6%.
  699. * kjs/interpreter.h: Removed the level of indirection, and made it all inline.
  700. * kjs/interpreter.cpp: Removed ExecState implementation from here altogether.
  701. - fixed an oversight in my sort speedup
  702. * kjs/array_object.h: Add pushUndefinedObjectsToEnd.
  703. * kjs/array_object.cpp:
  704. (ArrayInstanceImp::sort): Call pushUndefinedObjectsToEnd.
  705. (ArrayInstanceImp::pushUndefinedObjectsToEnd): Added.
  706. Pushes all undefined to the end of the array.
  707. 2002-11-18 Darin Adler <darin@apple.com>
  708. - fix worst speed problems on the sort page of the iBench JavaScript test
  709. Sped up JavaScript iBench by 70%, the sort page by 88%.
  710. * kjs/array_object.h: Add array-specific sort functions.
  711. * kjs/array_object.cpp:
  712. (compareByStringForQSort): Added.
  713. (ArrayInstanceImp::sort): Added.
  714. (compareWithCompareFunctionForQSort): Added.
  715. (ArrayProtoFuncImp::call): Use ArrayInstanceImp::sort if the object being
  716. sorted is actually an array.
  717. * kjs/object.h: Add argumentsPropertyName.
  718. * kjs/object.cpp: Add argumentsPropertyName.
  719. * kjs/function.cpp:
  720. (FunctionImp::FunctionImp): Use argumentsPropertyName to avoid making a UString.
  721. (FunctionImp::call): Ditto.
  722. (ActivationImp::ActivationImp): Ditto.
  723. * kjs/function_object.cpp: (FunctionObjectImp::construct): Ditto.
  724. * kjs/ustring.h: Added compare function for -1/0/+1 comparison.
  725. * kjs/ustring.cpp: (KJS::compare): Added.
  726. 2002-11-18 Maciej Stachowiak <mjs@apple.com>
  727. Change ArgumentListNode operations to be iterative instead of
  728. recursive. This probably fixes 3095446 (Crash in
  729. KJS::ArgumentListNode::ref()) but I can't reproduce it myself so
  730. I'm not 100% sure. I think the original bug was a stack overflow
  731. and this change would remove that possibility.
  732. * kjs/nodes.cpp:
  733. (ArgumentListNode::ref): Make iterative.
  734. (ArgumentListNode::deref): Make iterative.
  735. (ArgumentListNode::evaluateList): Make iterative.
  736. === Alexander-32 ===
  737. 2002-11-14 Darin Adler <darin@apple.com>
  738. - fixed 3101243 -- excite passes date that can't be parsed, results in bogus date at top right corner
  739. * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Handle errors from strtol
  740. by checking errno. Check the "string in a haystack" to be sure it's a multiple
  741. of 3. Add case that allows year to be after time.
  742. 2002-11-14 Darin Adler <darin@apple.com>
  743. - fixed 3101191 -- REGRESSION: Hang loading excite.com
  744. * kjs/date_object.cpp:
  745. (mktimeUsingCF): Pick an arbitrary cutoff of 3000, and return -1 if the
  746. year passed in is that big so we don't infinite loop. Also validate the
  747. rest of the date with CFGregorianDateIsValid.
  748. (DateProtoFuncImp::call): Handle a -1 result from mktime.
  749. (DateObjectImp::construct): Check for NaN before calling mktime, and also
  750. handle a -1 result from mktime.
  751. (DateObjectFuncImp::call): Check for NaN before calling mktime, and also
  752. handle a -1 result from mktime.
  753. 2002-11-13 Darin Adler <darin@apple.com>
  754. - fixed 3099930 -- dates/times without time zones are parsed as UTC by kjs,
  755. local time by other browsers
  756. * kjs/date_object.cpp:
  757. (DateProtoFuncImp::call): Handle the NaN case better, like Mozilla and OmniWeb.
  758. (DateObjectFuncImp::call): Return NaN rather than Undefined() for bad dates.
  759. (KJS::parseDate): Return NaN rather than Undefined() or 0 for bad dates.
  760. (KJS::KRFCDate_parseDate): Return -1 rather than 0 for bad dates.
  761. Assume local time if no time zone is passed. Don't return 1 if we parse 0.
  762. 2002-11-13 Darin Adler <darin@apple.com>
  763. - fixed 3073230 -- JavaScript time calls do I/O by lstat()ing /etc/localtime
  764. * kjs/date_object.cpp:
  765. (formatDate): Added.
  766. (formatTime): Added.
  767. (formatLocaleDate): Added.
  768. (formatLocaleTime): Added.
  769. (DateProtoFuncImp::call): Changed to use the above functions instead of
  770. using strftime.
  771. 2002-11-08 Darin Adler <darin@apple.com>
  772. * kjs/date_object.cpp:
  773. (ctimeUsingCF): Added.
  774. (timeUsingCF): Added.
  775. 2002-11-07 Darin Adler <darin@apple.com>
  776. * kjs/date_object.cpp: (mktimeUsingCF): Fix storage leak.
  777. 2002-11-07 Maciej Stachowiak <mjs@apple.com>
  778. - partial fix to 3073230 - JavaScript time calls do I/O by
  779. lastat()ing /etc/localtime
  780. * kjs/date_object.cpp:
  781. (mktimeUsingCF): Implementation of mktime using CF.
  782. === Alexander-31 ===
  783. 2002-11-01 Darin Adler <darin@apple.com>
  784. * kjs/object.cpp: Make the same change Maciej just did, but to the
  785. other constructor right next to the one he changed.
  786. 2002-10-31 Maciej Stachowiak <mjs@apple.com>
  787. - fixed 3082660 - REGRESSION: one ListImp leaks opening/closing nearly empty web page
  788. * kjs/object.cpp: Set gc allowed on freshly created ListImp, since
  789. there is no List wrapper for it.
  790. 2002-10-31 Darin Adler <darin@apple.com>
  791. * kjs/grammar.y: Fix the APPLE_CHANGES thing here too.
  792. * kjs/grammar.cpp: Regenerated this file.
  793. === Alexander-30 ===
  794. 2002-10-30 Darin Adler <darin@apple.com>
  795. - fixed 3073230 -- Alex is doing file I/O when executing JavaScript by asking for localtime
  796. I fixed this by using Core Foundation time functions instead.
  797. * kjs/date_object.cpp:
  798. (tmUsingCF): Function that uses Core Foundation to get the time and then puts it into
  799. a tm struct.
  800. (gmtimeUsingCF): Function used instead of gmtime (used a macro to make the substitution).
  801. (localtimeUsingCF): Function used instead of localtime (used a macro to make the substitution).
  802. 2002-10-26 Darin Adler <darin@apple.com>
  803. - changed to use #if APPLE_CHANGES and #if !APPLE_CHANGES consistently
  804. We no longer do #ifdef APPLE_CHANGES or #ifndef APPLE_CHANGES.
  805. * kjs/collector.cpp:
  806. * kjs/collector.h:
  807. * kjs/grammar.cpp:
  808. * kjs/internal.cpp:
  809. * kjs/ustring.h:
  810. 2002-10-25 Darin Adler <darin@apple.com>
  811. - fixed 3038011 -- drop-down menu hierarchy broken at yahoo new acct page
  812. * kjs/array_object.cpp: (ArrayProtoFuncImp::call):
  813. Fix bug calling concat on an empty array. The old code tried to
  814. optimize in a way that would prevent appending any arrays until
  815. at least one element was in the destination array. So if you were
  816. concatenating a non-empty array into an empty array, you got an empty array.
  817. === Alexander-29 ===
  818. === Alexander-28 ===
  819. 2002-10-10 Darin Adler <darin@apple.com>
  820. - fixed 3072643 -- infinite loop in JavaScript code at walgreens.com
  821. The problem is that "xxx".indexOf("", 1) needs to return 1, but we
  822. were returning 0.
  823. * kjs/ustring.cpp:
  824. (UString::find): Return pos, not 0, when the search string is empty.
  825. (UString::rfind): Make sure that pos is not past the end of the string,
  826. taking into account the search string; fixes a potential read off the end
  827. of the buffer. Also return pos, not 0, when the search string is empty.
  828. === Alexander-27 ===
  829. 2002-10-07 Darin Adler <darin@apple.com>
  830. Fixed absurdly high memory usage when looking at pages that use a lot of JavaScript.
  831. * kjs/collector.cpp:
  832. (Collector::allocate): Implement a new policy of doing a garbage collect every 1000
  833. allocations. The old policy was both complicated and misguided.
  834. (Collector::collect): Zero out the "number of allocations since last collect".
  835. 2002-10-06 Darin Adler <darin@apple.com>
  836. I noticed some broken lists at mapblast.com and tracked it down to this.
  837. * kjs/array_object.cpp:
  838. (ArrayInstanceImp::put): Don't truncate the list; only extend the length if
  839. it's not already long enough.
  840. (ArrayProtoFuncImp::call): Fix some ifdef'd code so it compiles if you turn
  841. the ifdefs on.
  842. 2002-10-04 Darin Adler <darin@apple.com>
  843. Fixed problems parsing numbers that are larger than a long with parseInt.
  844. * kjs/config.h: Define HAVE_FUNC_STRTOLL.
  845. * kjs/function.cpp: (GlobalFuncImp::call):
  846. Change parseInt to use strtoll if available.
  847. === Alexander-26 ===
  848. 2002-09-27 Darin Adler <darin@apple.com>
  849. - fixed 3033969 -- repro crash (infinite recursion in JavaScript)
  850. clicking on "screens" option at fsv.sf.net
  851. * kjs/object.h: Change recursion limit to 100 levels rather than 1000.
  852. === Alexander-25 ===
  853. 2002-09-26 Darin Adler <darin@apple.com>
  854. Fix the infinity problem Dave worked around. We didn't have the
  855. configuration flags set right to make infinity work. Setting those
  856. properly made everything work without changes to min and max.
  857. * kjs/config.h: Define HAVE_FUNC_ISINF, HAVE_STRING_H, and
  858. also WORDS_BIGENDIAN (if on ppc).
  859. * kjs/math_object.cpp: (MathFuncImp::call): Roll out min and max
  860. changes from yesterday.
  861. 2002-09-25 David Hyatt <hyatt@apple.com>
  862. Fix the impls of min/max to not use +inf/-inf when you have
  863. arguments. Technically there's still a bug here for the no
  864. argument case, probably caused by a screwup when +inf/-inf are
  865. converted to doubles.
  866. * kjs/math_object.cpp:
  867. (MathFuncImp::call):
  868. 2002-09-25 Darin Adler <darin@apple.com>
  869. - fixed 3057964 -- JS problem performing MD5 script embedded in yahoo login page
  870. * kjs/simple_number.h: Fix incorrect check for sign bit that was munging numbers
  871. in the range 0x10000000 to 0x1FFFFFFF.
  872. === Alexander-24 ===
  873. === Alexander-22 ===
  874. 2002-09-05 Maciej Stachowiak <mjs@apple.com>
  875. First baby step towards moving List away from garbage collection.
  876. * kjs/types.h: Add needsMarking boolean and make List inherit from
  877. Value privately instead of publicly.
  878. 2002-08-30 Darin Adler <darin@apple.com>
  879. * JavaScriptCore.pbproj/project.pbxproj: Allowed the new Project Builder to put in
  880. encodings for each file.
  881. === Alexander-21 ===
  882. === Alexander-20 ===
  883. 2002-08-20 Darin Adler <darin@apple.com>
  884. Three small changes to things that showed up in the sample.
  885. 5% speed increase on cvs-js-performance test.
  886. * kjs/simple_number.h: Check if double is an integer with d == (double)(int)d
  887. instead of remainder(d, 1) == 0, saving a function call each time.
  888. * kjs/ustring.cpp:
  889. (UString::find): Compare the first character before calling memcmp for the rest.
  890. (UString::rfind): Ditto.
  891. (KJS::operator==): Don't do a strlen before starting to compare the characters.
  892. 2002-08-20 Maciej Stachowiak <mjs@apple.com>
  893. * kjs/object.cpp: Don't reference other ValueImps in the
  894. destructor, they may have already been destroyed, and will have
  895. GC_ALLOWED set already in any case.
  896. 2002-08-19 Maciej Stachowiak <mjs@apple.com>
  897. Fixed the bug that made sony.com menus come out wrong and made
  898. aa.com crash (Radar 3027762).
  899. Mode most methods inline.
  900. * kjs/completion.cpp:
  901. * kjs/completion.h:
  902. 2002-08-19 Maciej Stachowiak <mjs@apple.com>
  903. Maintain stack of old "arguments" property values for functions
  904. implicitly on the system stack instead of explicitly in the
  905. FunctionImp. This eliminates only a trivial number of GC
  906. allocations (less than 200) but eliminates one of the two cases
  907. where a ListImp * is stored directly, paving the way to separate
  908. List from Value.
  909. * kjs/function.h: Remove argStack, pushArgs and popArgs.
  910. * kjs/function.cpp:
  911. (FunctionImp::FunctionImp): Don't initalize argStack.
  912. (FunctionImp::~FunctionImp): Remove comment about argStack.
  913. (FunctionImp::mark): Don't mark the argStack.
  914. (FunctionImp::call): Save old "arguments" property in a Value,
  915. where it will be GC-protected, rather than keeping a list, and
  916. restore the old value when done executing.
  917. 2002-08-18 Darin Adler <darin@apple.com>
  918. * kjs/internal.cpp: (KJS::printInfo): Remove one more CompletionType
  919. that Maciej missed.
  920. 2002-08-18 Maciej Stachowiak <mjs@apple.com>
  921. Remove stray references to CompletionType and CompletionImp.
  922. * kjs/completion.h:
  923. * kjs/object.cpp:
  924. * kjs/value.h:
  925. 2002-08-18 Maciej Stachowiak <mjs@apple.com>
  926. Separated Completion from Value and made it a pure stack
  927. object. This removed another 160,000 of the remaining 580,000
  928. garbage collected object allocations.
  929. 6% speed increase on cvs-js-performance test.
  930. * kjs/completion.cpp: Added. New implementation that doesn't
  931. require a ValueImp *.
  932. (Completion::Completion):
  933. (Completion::complType):
  934. (Completion::value):
  935. (Completion::target):
  936. (Completion::isValueCompletion):
  937. * kjs/completion.h: Added.
  938. * kjs/function.cpp:
  939. (GlobalFuncImp::call): Removed some (apparently mistaken) uses of
  940. Completion as a Value.
  941. * kjs/internal.cpp:
  942. * kjs/internal.h:
  943. * kjs/types.cpp: Removed Completion stuff.
  944. * kjs/types.h: Removed Completion stuff.
  945. * JavaScriptCore.pbproj/project.pbxproj: Added new header.
  946. 2002-08-16 Darin Adler <darin@apple.com>
  947. Fix the Development build.
  948. * kjs/object.cpp: Take out a use of ReferenceType.
  949. * kjs/ustring.h: Added a bit more inlining.
  950. * kjs/ustring.cpp: Moved the function out of here.
  951. 2002-08-16 Maciej Stachowiak <mjs@apple.com>
  952. Final step of the Reference change. Completely separate Reference
  953. from Value, and eliminate ReferenceImp.
  954. 18% speedup on cvs-js-performance test.
  955. * kjs/internal.cpp, kjs/internal.h: Remove ReferenceImp.
  956. * kjs/nodes.cpp:
  957. (Node::evaluateReference): Use Reference::makeValueReference(),
  958. not ConstReference.
  959. * kjs/reference.cpp:
  960. (Reference::Reference): New implementation, handles both regular
  961. and value references.
  962. (Reference::makeValueReference): Incorporate functionality of ConstReference
  963. into this class.
  964. (Reference::getBase): New implementation (incorporates error vase
  965. for value references).
  966. (Reference::getPropertyName): New implementation (incorporates error case
  967. for value references).
  968. (Reference::putValue): New implementation (incorporates error case
  969. for value references).
  970. (Reference::deleteValue): New implementation (incorporates error case
  971. for value references).
  972. (Reference::getValue): New implementation (incorporates special case
  973. for value references).
  974. (Reference::isMutable): New implementation.
  975. * kjs/reference.h: New implementation that merges ReferenceImp
  976. into the stack object.
  977. * kjs/value.h, kjs/value.cpp: Removed all reference-related method.
  978. 2002-08-16 Darin Adler <darin@apple.com>
  979. - fixed 3026184 -- Hang going to http://aa.com/ while executing JavaScript
  980. * kjs/simple_number.h: (SimpleNumber::value): Fixed conversion to a negative
  981. number. The technique of using division was no good. Instead, or in the sign
  982. bits as needed.
  983. 2002-08-16 Maciej Stachowiak <mjs@apple.com>
  984. * kjs/reference_list.h: Must include headers with "", not
  985. <>. D'oh!
  986. 2002-08-16 Maciej Stachowiak <mjs@apple.com>
  987. * JavaScriptCore.pbproj/project.pbxproj: Install reference.h and
  988. reference_list.h so WebCore compiles (duh).
  989. 2002-08-16 Maciej Stachowiak <mjs@apple.com>
  990. * JavaScriptCore.pbproj/project.pbxproj:
  991. * kjs/internal.cpp:
  992. * kjs/internal.h:
  993. * kjs/nodes.cpp:
  994. (Node::evaluateReference):
  995. * kjs/reference.cpp:
  996. (Reference::Reference):
  997. (Reference::makeValueReference):
  998. (Reference::getBase):
  999. (Reference::getPropertyName):
  1000. (Reference::getValue):
  1001. (Reference::putValue):
  1002. (Reference::deleteValue):
  1003. (Reference::isMutable):
  1004. * kjs/reference.h:
  1005. * kjs/reference_list.h:
  1006. * kjs/value.cpp:
  1007. (ValueImp::dispatchToUInt32):
  1008. * kjs/value.h:
  1009. 2002-08-16 Maciej Stachowiak <mjs@apple.com>
  1010. Next step: reimplement ReferenceList from scratch, and store it as
  1011. an actual Reference object, so ReferenceList no longer depends on
  1012. Reference being a Value or having a ReferenceImp. A resizing
  1013. vector might be even better the way this is used.
  1014. Also moved Reference to its own header and implementation file in
  1015. preparation for reimplementing it.
  1016. * JavaScriptCore.pbproj/project.pbxproj:
  1017. * kjs/nodes.cpp:
  1018. (ForInNode::execute):
  1019. * kjs/reference.cpp: Added.
  1020. (Reference::Reference):
  1021. (Reference::dynamicCast):
  1022. (ConstReference::ConstReference):
  1023. * kjs/reference.h: Added.
  1024. * kjs/reference_list.cpp: Added.
  1025. (ReferenceList::ReferenceList):
  1026. (ReferenceList::operator=):
  1027. (ReferenceList::swap):
  1028. (ReferenceList::append):
  1029. (ReferenceList::~ReferenceList):
  1030. (ReferenceList::begin):
  1031. (ReferenceList::end):
  1032. (ReferenceListIterator::ReferenceListIterator):
  1033. (ReferenceListIterator::operator!=):
  1034. (ReferenceListIterator::operator->):
  1035. (ReferenceListIterator::operator++):
  1036. * kjs/reference_list.h:
  1037. * kjs/types.cpp:
  1038. * kjs/types.h:
  1039. 2002-08-16 Maciej Stachowiak <mjs@apple.com>
  1040. Fix Development build - some NDEBUG code had to be changed for the
  1041. Value/Reference split.
  1042. * kjs/internal.cpp:
  1043. (KJS::printInfo):
  1044. * kjs/nodes.cpp:
  1045. (FunctionCallNode::evaluate):
  1046. 2002-08-16 Maciej Stachowiak <mjs@apple.com>
  1047. * kjs/reference_list.h: Added file I forgot to check in last time.
  1048. 2002-08-15 Maciej Stachowiak <mjs@apple.com>
  1049. Phase 1 of optimization to stop allocating references through the
  1050. collector. This step clearly splits evaluating to a reference and
  1051. evaluating to a value, and moves all of the reference-specific
  1052. operations from Value to Reference. A special ConstReference class
  1053. helps out for the one case where you need special reference
  1054. operations if the result is a reference, and not otherwise.
  1055. Also, Reference now inherits privately from Value, and there is a
  1056. new ReferenceList class that inherits privately from List, so the
  1057. uses of Reference and Value are now completely orthogonal. This
  1058. means that as the next step, their implementations can be
  1059. completely disentangled.
  1060. This step has no actual performance impact.
  1061. * kjs/collector.cpp:
  1062. (Collector::collect):
  1063. * kjs/nodes.cpp:
  1064. (Node::evaluateReference):
  1065. (ResolveNode::evaluate):
  1066. (ResolveNode::evaluateReference):
  1067. (ElementNode::evaluate):
  1068. (PropertyValueNode::evaluate):
  1069. (AccessorNode1::evaluate):
  1070. (AccessorNode1::evaluateReference):
  1071. (AccessorNode2::evaluate):
  1072. (AccessorNode2::evaluateReference):
  1073. (ArgumentListNode::evaluateList):
  1074. (NewExprNode::evaluate):
  1075. (FunctionCallNode::evaluate):
  1076. (PostfixNode::evaluate):
  1077. (DeleteNode::evaluate):
  1078. (VoidNode::evaluate):
  1079. (TypeOfNode::evaluate):
  1080. (PrefixNode::evaluate):
  1081. (UnaryPlusNode::evaluate):
  1082. (NegateNode::evaluate):
  1083. (BitwiseNotNode::evaluate):
  1084. (LogicalNotNode::evaluate):
  1085. (MultNode::evaluate):
  1086. (AddNode::evaluate):
  1087. (ShiftNode::evaluate):
  1088. (RelationalNode::evaluate):
  1089. (EqualNode::evaluate):
  1090. (BitOperNode::evaluate):
  1091. (BinaryLogicalNode::evaluate):
  1092. (ConditionalNode::evaluate):
  1093. (AssignNode::evaluate):
  1094. (CommaNode::evaluate):
  1095. (VarDeclNode::evaluate):
  1096. (ExprStatementNode::execute):
  1097. (IfNode::execute):
  1098. (DoWhileNode::execute):
  1099. (WhileNode::execute):
  1100. (ForNode::execute):
  1101. (ForInNode::execute):
  1102. (ReturnNode::execute):
  1103. (WithNode::execute):
  1104. (CaseClauseNode::evaluate):
  1105. (SwitchNode::execute):
  1106. (ThrowNode::execute):
  1107. * kjs/nodes.h:
  1108. * kjs/types.cpp:
  1109. (ConstReference::ConstReference):
  1110. * kjs/types.h:
  1111. * kjs/value.h:
  1112. 2002-08-15 Darin Adler <darin@apple.com>
  1113. Tweaks and small bug fixes to Maciej's excellent new fixnum optimization.
  1114. Also updated or removed comments that call it "fixnum" instead of "simple number".
  1115. * kjs/simple_number.h: Change constant names so they don't SHOUT the way macro
  1116. names do. Added constants for shift, min, and max. Fixed off-by-1 error that
  1117. prevented us from using the extreme values on either end. Base the range of
  1118. numbers on a fixed 32 bits constant rather than the size of a long, because
  1119. code elsewhere depends on positive numbers fitting into both "unsigned" and
  1120. "UInt32" while assuming it doesn't need to check; we can easily change this
  1121. later. Used int types rather than long for essentially the same reason.
  1122. Fixed the value-extraction function so it will work for negative numbers even
  1123. if the shift is logical, not arithmetic, by using division instead.
  1124. Renamed functions to be quite terse since they are inside a class.
  1125. * kjs/value.h:
  1126. * kjs/value.cpp:
  1127. (ValueImp::dispatchToObject): Call NumberImp::toObject in a "non-virtual"
  1128. way rather than repeating the code here.
  1129. (ValueImp::dispatchToUInt32): Handle the negative number case correctly.
  1130. (ValueImp::dispatchGetBase): Call ValueImp::getBase in a "non-virtual"
  1131. way rather than repeating the code here.
  1132. (ValueImp::dispatchGetPropertyName): Call ValueImp::getPropertyName in a
  1133. "non-virtual" way rather than repeating the code here.
  1134. (ValueImp::dispatchPutValue): Call ValueImp::putValue in a "non-virtual"
  1135. way rather than repeating the code here.
  1136. (ValueImp::dispatchDeleteValue): Call ValueImp::deleteValue in a "non-virtual"
  1137. way rather than repeating the code here.
  1138. (Number::Number): Fixed a bug where the double-based constructor was casting
  1139. to long, so wouldn't do the "remainder" check.
  1140. === Alexander-19 ===
  1141. === Alexander-18 ===
  1142. 2002-08-15 Maciej Stachowiak <mjs@apple.com>
  1143. Phase 2 of fixnum optimization. Store any integral number that
  1144. will fit in two bits less than a long inside the ValueImp *
  1145. itself, thus avoiding the need to deal with the garbage collector
  1146. at all for these types. Such numbers comprised .5 million of the
  1147. 1.7 million ValueImps created during the cvs-js-performance test,
  1148. so traffic through the garbage collector should be
  1149. 20% improvement on cvs-js-performance. This may also show up on
  1150. cvs-base, but I did not compare and I am too lazy to make clean in
  1151. WebCore yet again.
  1152. This also significantly reduces memory footprint on
  1153. JavaScript-heavy pages. Size after going through
  1154. cvs-js-performance suite is now 22MB to 17.5MB.
  1155. * JavaScriptCore.pbproj/project.pbxproj:
  1156. * kjs/simple_number.h: Added. Some inline static methods for handling
  1157. simple numbers that are stored in the pointer.
  1158. * kjs/ustring.h:
  1159. * kjs/ustring.cpp:
  1160. (UString::from): Added new overload for long.
  1161. * kjs/value.cpp:
  1162. (ValueImp::marked): Add special case for simple numbers.
  1163. (ValueImp::setGcAllowed): Likewise.
  1164. (ValueImp::toInteger): Call dispatch version of
  1165. toUInt32(unsigned&), not the real method.
  1166. (ValueImp::toInt32): Likewise.
  1167. (ValueImp::toUInt32): Likewise.
  1168. (ValueImp::toUInt16): Likewise.
  1169. (ValueImp::dispatchType): Add special case for simple numbers.
  1170. (ValueImp::dispatchToPrimitive): Likewise.
  1171. (ValueImp::dispatchToBoolean): Likewise.
  1172. (ValueImp::dispatchToNumber): Likewise.
  1173. (ValueImp::dispatchToString): Likewise.
  1174. (ValueImp::dispatchToObject): Likewise.
  1175. (ValueImp::dispatchToUInt32): Likewise.
  1176. (ValueImp::dispatchGetBase): Likewise.
  1177. (ValueImp::dispatchGetPropertyName): Likewise.
  1178. (ValueImp::dispatchPutValue): Likewise.
  1179. (ValueImp::dispatchDeleteValue): Likewise.
  1180. (Number::Number): Create a simple number instead of a full-blown
  1181. ValueImp when possible.
  1182. (Number::value): Likewise.
  1183. * kjs/value.h:
  1184. 2002-08-15 Maciej Stachowiak <mjs@apple.com>
  1185. Phase one of the "fixnum" optimization (storing small enough
  1186. integers in the pointer). This just paves the way for the change
  1187. by making all the virtual functions of ValueImp private and adding
  1188. non-virtual dispatchers which can call the virtual function or
  1189. handle fixnums specially.
  1190. Also, I marked every place that should need a special case with a
  1191. FIXNUM comment.
  1192. * kjs/bool_object.cpp:
  1193. (BooleanObjectImp::construct): Call dispatch method not the real method.
  1194. * kjs/internal.h: Make toUInt32 private to make sure no one calls it directly
  1195. on a NumberImp*.
  1196. * kjs/nodes.cpp:
  1197. (ForInNode::execute): Call dispatch method not the real method.
  1198. * kjs/object.cpp:
  1199. (ObjectImp::propList): Call dispatch method not the real method.
  1200. * kjs/object.h:
  1201. * kjs/string_object.cpp:
  1202. (StringProtoFuncImp::call): Call dispatch method not the real method.
  1203. (StringObjectImp::construct): Call dispatch method not the real method.
  1204. * kjs/value.h:
  1205. * kjs/value.cpp:
  1206. (ValueImp::marked): Put a comment about required FIXNUM change.
  1207. (ValueImp::setGcAllowed): Likewise.
  1208. (ValueImp::dispatchType): Just call the virtual method for now.
  1209. (ValueImp::dispatchToPrimitive): Likewise.
  1210. (ValueImp::dispatchToBoolean): Likewise.
  1211. (ValueImp::dispatchToNumber): Likewise.
  1212. (ValueImp::dispatchToString): Likewise.
  1213. (ValueImp::dispatchToObject): Likewise.
  1214. (ValueImp::dispatchToUInt32): Likewise.
  1215. (ValueImp::dispatchGetBase): Likewise.
  1216. (ValueImp::dispatchGetPropertyName): Likewise.
  1217. (ValueImp::dispatchGetValue): Likewise.
  1218. (ValueImp::dispatchPutValue): Likewise.
  1219. (ValueImp::dispatchDeleteValue): Likewise.
  1220. 2002-08-14 Darin Adler <darin@apple.com>
  1221. Another pass of tweaks, including one bug fix.
  1222. * kjs/array_object.cpp:
  1223. (ArrayInstanceImp::ArrayInstanceImp): Use malloc, not new.
  1224. (ArrayInstanceImp::get): Use a local variable so we don't rely on the optimizer
  1225. to avoid indexing twice.
  1226. (ArrayInstanceImp::hasProperty): Use a local variable, and also check against
  1227. UndefinedImp::staticUndefined rather than doing type() != UndefinedType.
  1228. 2002-08-14 Maciej Stachowiak <mjs@apple.com>
  1229. Simplified array handling by using NULL to represent empty cells
  1230. instead of the Undefined object, so we can use calloc, realloc and
  1231. memset instead of loops. Inspired by a suggestion of Darin's.
  1232. * kjs/array_object.cpp:
  1233. (ArrayInstanceImp::ArrayInstanceImp):
  1234. (ArrayInstanceImp::~ArrayInstanceImp):
  1235. (ArrayInstanceImp::get):
  1236. (ArrayInstanceImp::hasProperty):
  1237. (ArrayInstanceImp::deleteProperty):
  1238. (ArrayInstanceImp::setLength):
  1239. (ArrayInstanceImp::mark):
  1240. 2002-08-14 Maciej Stachowiak <mjs@apple.com>
  1241. Fix major JavaScript memory leak. run-plt says cvs-base improved
  1242. by 2% and cvs-js-performance improved by 7%. However, this was
  1243. within the possible noise level in each case.
  1244. The fix was to store ValueImp *'s in the array instead of Value
  1245. objects, since the Value wrapper will keep a ref and make the
  1246. object immortal.
  1247. * kjs/array_object.cpp:
  1248. (ArrayInstanceImp::ArrayInstanceImp):
  1249. (ArrayInstanceImp::get):
  1250. (ArrayInstanceImp::put):
  1251. (ArrayInstanceImp::hasProperty):
  1252. (ArrayInstanceImp::deleteProperty):
  1253. (ArrayInstanceImp::setLength):
  1254. (ArrayInstanceImp::mark):
  1255. * kjs/array_object.h:
  1256. 2002-08-13 Maciej Stachowiak <mjs@apple.com>
  1257. Add the ability to determine the classes of live JavaScript
  1258. objects, to help with leak fixing.
  1259. * kjs/collector.h, kjs/collector.cpp:
  1260. (Collector::liveObjectClasses):
  1261. 2002-08-13 Maciej Stachowiak <mjs@apple.com>
  1262. Small speed improvement. 3% faster on cvs-js-performance, no
  1263. measurable change on cvs-static-urls.
  1264. * kjs/collector.cpp:
  1265. (Collector::collect): Combine 3 loops over all objects into one,
  1266. to reduce flat time and improve locality of reference.
  1267. 2002-08-12 Darin Adler <darin@apple.com>
  1268. Speed improvements. 19% faster on cvs-js-performance, 1% on cvs-static-urls.
  1269. Use global string objects for length and other common property names rather
  1270. than constantly making and destroying them. Use integer versions of get() and
  1271. other related calls rather than always making a string.
  1272. Also get rid of many unneeded constructors, destructors, copy constructors, and
  1273. assignment operators. And make some functions non-virtual.
  1274. * kjs/internal.h:
  1275. * kjs/internal.cpp:
  1276. (NumberImp::toUInt32): Implement.
  1277. (ReferenceImp::ReferenceImp): Special case for numeric property names.
  1278. (ReferenceImp::getPropertyName): Moved guts here from ValueImp. Handle numeric case.
  1279. (ReferenceImp::getValue): Moved guts here from ValueImp. Handle numeric case.
  1280. (ReferenceImp::putValue): Moved guts here from ValueImp. Handle numeric case.
  1281. (ReferenceImp::deleteValue): Added. Handle numeric case.
  1282. * kjs/array_object.h:
  1283. * kjs/array_object.cpp: All-new array implementation that stores the elements
  1284. in a C++ array rather than in a property map.
  1285. (ArrayInstanceImp::ArrayInstanceImp): Allocate the C++ array.
  1286. (ArrayInstanceImp::~ArrayInstanceImp): Delete the C++ array.
  1287. (ArrayInstanceImp::get): Implement both the old version and the new overload that
  1288. takes an unsigned index for speed.
  1289. (ArrayInstanceImp::put): Implement both the old version and the new overload that
  1290. takes an unsigned index for speed.
  1291. (ArrayInstanceImp::hasProperty): Implement both the old version and the new overload that
  1292. takes an unsigned index for speed.
  1293. (ArrayInstanceImp::deleteProperty): Implement both the old version and the new overload that
  1294. takes an unsigned index for speed.
  1295. (ArrayInstanceImp::setLength): Added. Used by the above to resize the array.
  1296. (ArrayInstanceImp::mark): Mark the elements of the array too.
  1297. (ArrayPrototypeImp::ArrayPrototypeImp): Pass the length to the array instance constructor.
  1298. * kjs/bool_object.cpp:
  1299. * kjs/date_object.cpp:
  1300. * kjs/error_object.cpp:
  1301. * kjs/function.cpp:
  1302. * kjs/function_object.cpp:
  1303. * kjs/math_object.cpp:
  1304. * kjs/nodes.cpp:
  1305. * kjs/nodes.h:
  1306. * kjs/number_object.cpp:
  1307. * kjs/object_object.cpp:
  1308. * kjs/regexp_object.cpp:
  1309. * kjs/string_object.cpp:
  1310. * kjs/nodes2string.cpp: (SourceStream::operator<<): Add a special case for char now that
  1311. you can't create a UString from a char implicitly.
  1312. * kjs/object.h:
  1313. * kjs/object.cpp:
  1314. (ObjectImp::get): Call through to the string version if the numeric version is not implemented.
  1315. (ObjectImp::put): Call through to the string version if the numeric version is not implemented.
  1316. (ObjectImp::hasProperty): Call through to the string version if the numeric version is not implemented.
  1317. (ObjectImp::deleteProperty): Call through to the string version if the numeric version is not implemented.
  1318. * kjs/types.h:
  1319. * kjs/types.cpp:
  1320. (Reference::Reference): Added constructors for the numeric property name case.
  1321. * kjs/ustring.h: Made the constructor that turns a character into a string be explicit so we
  1322. don't get numbers that turn themselves into strings.
  1323. * kjs/ustring.cpp:
  1324. (UString::UString): Detect the empty string case, and use a shared empty string.
  1325. (UString::find): Add an overload for single character finds.
  1326. (UString::rfind): Add an overload for single character finds.
  1327. (KJS::operator==): Fix bug where it would call strlen(0) if the first string was not null.
  1328. Also handle non-ASCII characters consistently with the rest of the code by casting to unsigned char
  1329. just in case.
  1330. * kjs/value.h: Make ValueImp and all subclasses non-copyable and non-assignable.
  1331. * kjs/value.cpp:
  1332. (ValueImp::toUInt32): New interface, mainly useful so we can detect array indices and not turn
  1333. them into strings and back.
  1334. (ValueImp::toInteger): Use the new toUInt32. Probably can use more improvement.
  1335. (ValueImp::toInt32): Use the new toUInt32. Probably can use more improvement.
  1336. (ValueImp::toUInt16): Use the new toUInt32. Probably can use more improvement.
  1337. (ValueImp::getBase): Remove handling of the Reference case. That's in ReferenceImp now.
  1338. (ValueImp::getPropertyName): Remove handling of the Reference case. That's in ReferenceImp now.
  1339. (ValueImp::getValue): Remove handling of the Reference case. That's in ReferenceImp now.
  1340. (ValueImp::putValue): Remove handling of the Reference case. That's in ReferenceImp now.
  1341. (ValueImp::deleteValue): Added. Used so we can do delete the same way we do put.
  1342. === Alexander-17 ===
  1343. 2002-08-09 Darin Adler <darin@apple.com>
  1344. Some string speedups. Makes sony.com cached 11% faster on Development, but
  1345. the improvement for Deployment should be greater.
  1346. * kjs/ustring.h: Made it possible for UChar objects to be uninitialized, which
  1347. gives a speed boost. Inlined CString's +=, UString's destructor, +=, and +.
  1348. * kjs/ustring.cpp:
  1349. (UString::UString): Optimize const char * version, which showed up
  1350. heavily in performance analysis. Added new two-UString version, which
  1351. makes the + operator fast.
  1352. (UString::ascii): Remove thread safety changes. Change static buffer to remember
  1353. its size, and to always be at least 4096 bytes long; that way we never have to
  1354. reallocate unless it's for a long string. Also make code to extract the characters
  1355. significantly faster by getting rid of two pointer dereferences per character.
  1356. (UString::is8Bit): Avoid one pointer dereference per character.
  1357. (UString::toDouble): Use ascii() instead of cstring() to avoid copying the string.
  1358. * kjs/collector.cpp: Remove unneeded APPLE_CHANGES.
  1359. * kjs/regexp.cpp: Remove ifdefs around some APPLE_CHANGES that we
  1360. want to keep, because they just fix warnings.
  1361. * kjs/value.h: Remove obsolete APPLE_CHANGES comment.
  1362. * JavaScriptCore.pbproj/project.pbxproj: Project Builder decided
  1363. to move a line around in the file.
  1364. 2002-08-09 Maciej Stachowiak <mjs@apple.com>
  1365. Fix my last change to actually call the versions of the lock functions
  1366. that are recursive and initialize as needed.
  1367. * kjs/internal.cpp:
  1368. (InterpreterImp::InterpreterImp):
  1369. (InterpreterImp::clear):
  1370. (InterpreterImp::evaluate):
  1371. 2002-08-09 Maciej Stachowiak <mjs@apple.com>
  1372. - fixed 2948835 - JavaScriptCore locking is too fine grained, makes it too slow
  1373. * kjs/collector.cpp:
  1374. (Collector::allocate):
  1375. (Collector::collect):
  1376. (Collector::finalCheck):
  1377. (Collector::numInterpreters):
  1378. (Collector::numGCNotAllowedObjects):
  1379. (Collector::numReferencedObjects):
  1380. * kjs/collector.h:
  1381. * kjs/internal.cpp:
  1382. (initializeInterpreterLock):
  1383. (lockInterpreter):
  1384. (unlockInterpreter):
  1385. (Parser::parse):
  1386. (InterpreterImp::InterpreterImp):
  1387. (InterpreterImp::clear):
  1388. (InterpreterImp::evaluate):
  1389. * kjs/value.cpp:
  1390. (ValueImp::ValueImp):
  1391. (ValueImp::setGcAllowed):
  1392. === milestone 0.5 ===
  1393. === Alexander-16 ===
  1394. 2002-08-05 Maciej Stachowiak <mjs@apple.com>
  1395. - fixed 3007072 - need to be able to build fat
  1396. * JavaScriptCore.pbproj/project.pbxproj: Fixed DeploymentFat build.
  1397. === Alexander-15 ===
  1398. 2002-07-25 Darin Adler <darin@apple.com>
  1399. * JavaScriptCore.pbproj/project.pbxproj: Add DeploymentFat build style.
  1400. === Alexander-14 ===
  1401. 2002-07-21 Darin Adler <darin@apple.com>
  1402. * kjs/*: Roll KDE 3.0.2 changes in. Also switch to not using APPLE_CHANGES
  1403. for some of the changes that we definitely want to contribute upstream.
  1404. 2002-07-21 Maciej Stachowiak <mjs@apple.com>
  1405. * Makefile.am: Remove products from symroots on `make clean'.
  1406. === Alexander-13 ===
  1407. 2002-07-13 Darin Adler <darin@apple.com>
  1408. * Makefile.am: Don't use embed.am any more.
  1409. * JavaScriptCore.pbproj/project.pbxproj: Use embed-into-alex instead
  1410. of make embed.
  1411. 2002-07-12 Darin Adler <darin@apple.com>
  1412. * kjs/ustring.h: Since <sys/types.h> includes ushort and uint now, had
  1413. to change the includes here to be compatible with that.
  1414. 2002-07-11 Darin Adler <darin@apple.com>
  1415. * JavaScriptCore.pbproj/project.pbxproj: To make the build of
  1416. WebCore work without using -I to peek at JavaScriptCore sources,
  1417. made all the Public sources Private so they are all in one directory.
  1418. Also, made lookup.h be Private.
  1419. === Alexander-11 ===
  1420. === Alexander-10 ===
  1421. 2002-06-25 Darin Adler <darin@apple.com>
  1422. * JavaScriptCore.pbproj/project.pbxproj: Re-add -Wmissing-format-attribute.
  1423. === Alexander-9 ===
  1424. 2002-06-19 Kenneth Kocienda <kocienda@apple.com>
  1425. I just played alchemical voodoo games with the linker to
  1426. make all our frameworks and Alexander prebound.
  1427. * JavaScriptCore.pbproj/project.pbxproj
  1428. 2002-06-15 Darin Adler <darin@apple.com>
  1429. * JavaScriptCore.pbproj/project.pbxproj: Removed explicit PFE_FILE_C_DIALECTS now that
  1430. Project Builder handles this automatically. Removed explicit USE_GCC3 since that's implicit
  1431. now. Also, since this project is all C++, only use WARNING_CFLAGS with flags that are appropriate
  1432. for C++; don't bother breaking out C vs. C++.
  1433. * kjs/collector.cpp: Now that the system warning is fixed, use PTHREAD_MUTEX_INITIALIZER and
  1434. PTHREAD_COND_INITIALIZER.
  1435. * kjs/internal.cpp: Use PTHREAD_MUTEX_INITIALIZER.
  1436. * kjs/ustring.cpp: Use PTHREAD_ONCE_INIT.
  1437. 2002-06-15 Maciej Stachowiak <mjs@apple.com>
  1438. Made Development build mode mean what Unoptimized used to mean. Removed Unoptimized build mode.
  1439. Added a Mixed build mode which does what Deployment used to. All this to fix:
  1440. Radar 2955367 - Change default build style to "Unoptimized"
  1441. * JavaScriptCore.pbproj/project.pbxproj:
  1442. 2002-06-12 Darin Adler <darin@apple.com>
  1443. * kjs/nodes.cpp: (Node::finalCheck): A bit of APPLE_CHANGES so we
  1444. can compile with KJS_DEBUG_MEM defined if we want to.
  1445. 2002-06-10 Darin Adler <darin@apple.com>
  1446. Merged in changes from KDE 3.0.1.
  1447. * kjs/collector.cpp:
  1448. * kjs/date_object.cpp:
  1449. * kjs/function.cpp:
  1450. * kjs/internal.cpp:
  1451. * kjs/lookup.h:
  1452. * kjs/object.cpp:
  1453. * kjs/operations.cpp:
  1454. * kjs/regexp.cpp:
  1455. * kjs/regexp_object.cpp:
  1456. * kjs/regexp_object.h:
  1457. * kjs/string_object.cpp:
  1458. * kjs/testkjs.cpp:
  1459. * kjs/ustring.cpp:
  1460. * kjs/value.cpp:
  1461. * kjs/value.h:
  1462. Do the merge, and add APPLE_CHANGES as needed to make things compile.
  1463. * kjs/date_object.lut.h: Re-generated.
  1464. 2002-06-07 Darin Adler <darin@apple.com>
  1465. * Makefile.am: Use new shared "embed.am" file so we don't need four copies of
  1466. the embedding rules for WebFoundation, JavaScriptCore, WebCore, and WebKit.
  1467. 2002-06-07 Darin Adler <darin@apple.com>
  1468. * JavaScriptCore.pbproj/project.pbxproj: Don't use any warning flags for C that won't work
  1469. for C++, because PFE uses the C warning flags on a C++ compile.
  1470. === Alexander-8 ===
  1471. 2002-06-06 Darin Adler <darin@apple.com>
  1472. * JavaScriptCore.pbproj/project.pbxproj: Update warning flags for compatibility
  1473. with new C++.
  1474. 2002-06-05 Darin Adler <darin@apple.com>
  1475. Fix problem seen as build failure on Jersey.
  1476. * Makefile.am: JavaScriptCore-stamp needs to be a dependency, not a
  1477. source file, because it doesn't have a corresponding object file.
  1478. Making it a dependency causes things to compile in the right order.
  1479. 2002-06-04 Darin Adler <darin@apple.com>
  1480. Improve the speed of the JavaScript string append operation by growing
  1481. the capacity so we don't need to reallocate the string every time.
  1482. Also fix script execution so it doesn't use recursion to advance from
  1483. one statement to the next, using iteration instead.
  1484. * Makefile.am: Stop using BUILT_SOURCES to build JavaScriptCore-stamp,
  1485. because this causes the Project Builder project to build *before* the
  1486. subdir. Intead, use an all-am rule in a way more similar to all our
  1487. other directories.
  1488. * kjs/grammar.y: Link the SourceElementsNode in the opposite direction,
  1489. so we can walk the list and execute each element instead of using
  1490. recursion to reverse the list.
  1491. * kjs/grammar.cpp: Check in new generated file.
  1492. * kjs/nodes.cpp:
  1493. (SourceElementsNode::execute):
  1494. (SourceElementsNode::processFuncDecl):
  1495. (SourceElementsNode::processVarDecls):
  1496. Use loops instead of recursion.
  1497. * kjs/ustring.h: Don't initialize all UChar objects to 0. This was
  1498. wasting a *huge* amount of time.
  1499. * kjs/ustring.cpp:
  1500. (UString::Rep::create): Add a "capacity" along with the length.
  1501. (UString::append): Include 50% extra capacity when appending.
  1502. (UString::operator=): Reuse the buffer if possible rather than
  1503. always creating a new one.
  1504. 2002-06-02 Darin Adler <darin@apple.com>
  1505. * COPYING.LIB: Fix line endings. It was using CRs.
  1506. 2002-05-31 Darin Adler <darin@apple.com>
  1507. * Makefile.am:
  1508. * kjs/Makefile.am:
  1509. Slight improvements to rules that touch stamp files.
  1510. 2002-05-28 Maciej Stachowiak <mjs@apple.com>
  1511. * THANKS: Demangled.
  1512. === Alexander-7 ===
  1513. 2002-05-24 Maciej Stachowiak <mjs@apple.com>
  1514. Added license and acknowledgements.
  1515. * AUTHORS: Added.
  1516. * COPYING.LIB: Added.
  1517. * THANKS: Added.
  1518. === 0.3 ===
  1519. === Alexander-6 ===
  1520. === Alexander-5 ===
  1521. === Alexander-4 ===
  1522. === JavaScriptCore-5 ===
  1523. 2002-05-21 Maciej Stachowiak <mjs@apple.com>
  1524. Reviewed by: Richard Williamson
  1525. Fixed Radar 2928775 - Sherlock crashes sitting in stocks channel
  1526. * kjs/internal.cpp:
  1527. (InterpreterImp::InterpreterImp): Set the interp pointer earlier,
  1528. in case garbage collection takes place while creating the global
  1529. values.
  1530. 2002-05-15 Darin Adler <darin@apple.com>
  1531. Reviewed by: Maciej Stachowiak
  1532. * Makefile.am:
  1533. Use all-am and clean-am instead of all and clean because it's better and
  1534. to make "make check" at the top level work right.
  1535. 2002-05-13 Darin Adler <darin@apple.com>
  1536. Reviewed by: Maciej Stachowiak
  1537. * kjs/value.h: Fix comment typos.
  1538. === JavaScriptCore-4 ===
  1539. 2002-05-10 Maciej Stachowiak <mjs@apple.com>
  1540. Reviewed by: Ken Kocienda and Darin Adler
  1541. Fixed the following bug:
  1542. Radar 2890573 - JavaScriptCore needs to be thread-safe
  1543. Actually this is only a weak form of thread-safety - you can safely
  1544. use different interpreters from different threads at the same
  1545. time. If you try to use a single interpreter object from multiple
  1546. threads, you need to provide your own locking.
  1547. * kjs/collector.h, kjs/collector.cpp:
  1548. (Collector::lock, Collector::unlock): Trivial implementation of a
  1549. recursive mutex.
  1550. (Collector::allocate): Lock around the body of this function.
  1551. (Collector::collect): Likewise.
  1552. (Collector::finalCheck): Likewise.
  1553. (Collector::numInterpreters): Likewise.
  1554. (Collector::numGCNotAllowedObjects): Likewise.
  1555. (Collector::numReferencedObjects): Likewise.
  1556. * kjs/internal.cpp:
  1557. (Parser::parse): use a mutex to lock around the whole parse, since
  1558. it uses a bunch of global state.
  1559. (InterpreterImp::InterpreterImp): Grab the Collector lock here,
  1560. both the mutually exclude calls to the body of this function, and
  1561. to protect the s_hook static member which the collector pokes at.
  1562. (InterpreterImp::clear): Likewise.
  1563. * kjs/ustring.cpp:
  1564. (statBufferKeyCleanup, statBufferKeyInit, UString::ascii): Convert
  1565. use of static variable
  1566. * kjs/value.cpp:
  1567. (ValueImp::ValueImp, ValueImp::mark, ValueImp::marked,
  1568. ValueImp::setGcAllowed): Grab the GC lock around any flag changes.
  1569. === Alexander-3 ===
  1570. 2002-05-08 Darin Adler <darin@apple.com>
  1571. * kjs/collector.h:
  1572. * kjs/collector.cpp:
  1573. (Collector::numInterpreters):
  1574. (Collector::numGCNotAllowedObjects):
  1575. (Collector::numReferencedObjects):
  1576. Add three new functions so we can see a bit more about leaking JavaScriptCore.
  1577. 2002-05-06 Darin Adler <darin@apple.com>
  1578. * JavaScriptCorePrefix.h: Added.
  1579. * JavaScriptCore.pbproj/project.pbxproj: Use PFE precompiling.
  1580. Also switch from xNDEBUG to NDEBUG.
  1581. === Alexander 0.3c2 (v1) ===
  1582. 2002-04-18 Darin Adler <darin@apple.com>
  1583. * JavaScriptCore.pbproj/project.pbxproj: Oops. Take out -Wstrict-prototypes, put back
  1584. -Wmissing-prototypes.
  1585. 2002-04-18 Darin Adler <darin@apple.com>
  1586. * JavaScriptCore.pbproj/project.pbxproj: Take out -Wmissing-prototypes
  1587. because system headers are triggering it when we don't have
  1588. precompiled headers on.
  1589. 2002-04-18 Darin Adler <darin@apple.com>
  1590. Reviewed by Maciej
  1591. * JavaScriptCore.pbproj/project.pbxproj: Turn on gcc3 and the same set of warnings
  1592. as in the rest of Labyrinth (see top level ChangeLog for details).
  1593. 2002-04-17 Maciej Stachowiak <mjs@apple.com>
  1594. Reviewed by: Darin Adler <darin@apple.com>
  1595. * kjs/testkjs.cpp: Don't include <iostream.h> to avoid gcc3
  1596. warning.
  1597. 2002-04-15 Darin Adler <darin@apple.com>
  1598. Reviwed by: Maciej Stachowiak <mjs@apple.com>
  1599. * kjs/internal.cpp:
  1600. * kjs/property_map.cpp:
  1601. * kjs/ustring.h:
  1602. Removed some unneeded <config.h> includes so we are more similar
  1603. to the real KDE sources.
  1604. 2002-04-15 Darin Adler <darin@apple.com>
  1605. Reviwed by: Maciej Stachowiak <mjs@apple.com>
  1606. Merged changes from KDE 3.0 final and did some build fixes.
  1607. * JavaScriptCore.pbproj/project.pbxproj: Added nodes2string.cpp.
  1608. * kjs/grammar.*: Regenerated.
  1609. * kjs/*.lut.h: Regenerated.
  1610. 2002-04-08 Darin Adler <darin@apple.com>
  1611. Reviwed by: Maciej Stachowiak <mjs@apple.com>
  1612. * JavaScriptCore.pbproj/project.pbxproj: Re-added -Wno-format-y2k.
  1613. 2002-04-04 Darin Adler <darin@apple.com>
  1614. * JavaScriptCore.pbproj/project.pbxproj: Add an Unoptimized build
  1615. style: exactly like Development except without the -O.
  1616. 2002-04-03 Darin Adler <darin@apple.com>
  1617. * kjs/Makefile.am: Gratuitous cleanup.
  1618. 2002-04-02 Darin Adler <darin@apple.com>
  1619. * JavaScriptCore.pbproj/project.pbxproj: Update flags as I did for
  1620. WebFoundation.
  1621. 2002-04-02 Maciej Stachowiak <mjs@apple.com>
  1622. * JavaScriptCore.pbproj/project.pbxproj: Pass -Wno-format-y2k so
  1623. the project builds with gcc3.
  1624. * kjs/nodes.cpp: Avoid including an obsolete header to avoid
  1625. warning with gcc3.
  1626. 2002-04-02 Darin Adler <darin@apple.com>
  1627. * kjs/property_map.cpp: (PropertyMap::~PropertyMap): Deallocate the
  1628. map by calling clear so we don't leak the entire map.
  1629. 2002-04-02 Darin Adler <darin@apple.com>
  1630. * kjs/internal.cpp: (InterpreterImp::globalClear): Add code to
  1631. deallocate and null out emptyList, because once the last interpreter
  1632. is destroyed there's nothing to keep it from being garbage collected.
  1633. 2002-04-01 Darin Adler <darin@apple.com>
  1634. Got rid of KWQDef.h because it's dangerous to have two files with
  1635. the same name and different contents.
  1636. * JavaScriptCore.pbproj/project.pbxproj:
  1637. * kjs/KWQDef.h: Removed.
  1638. * kjs/ustring.h: Defines unsigned int types inline now.
  1639. 2002-03-30 Maciej Stachowiak <mjs@apple.com>
  1640. Fixed Radar 2891272 (JavaScript crashes loading quicktime.com and
  1641. apple.com)
  1642. * kjs/object.cpp: (ObjectImp::~ObjectImp): Don't call setGCAlloc
  1643. on object internals pointed to, because they may have already been
  1644. collected by the time this object is collected, and in that case
  1645. we would corrupt the malloc arena.
  1646. * Makefile.am: Make the stamp file depend on all the sources and
  1647. headers so the framework gets rebuilt properly.
  1648. * JavaScriptCore.pbproj/project.pbxproj: Some random numbers moved
  1649. around. No idea what I really changed.
  1650. 2002-03-30 Darin Adler <darin@apple.com>
  1651. * kjs/grammar.y: Took out Id tag so we won't constantly need to
  1652. update grammar.cpp.
  1653. * kjs/grammar.cpp: Regenerated without Id tag.
  1654. * .cvsignore: Ignore some additional autogenerated files.
  1655. * kjs/.cvsignore: Ignore some additional autogenerated files.
  1656. 2002-03-30 Maciej Stachowiak <mjs@apple.com>
  1657. * JavaScriptCore.pbproj/project.pbxproj: Install some of the
  1658. headers.
  1659. 2002-03-30 Maciej Stachowiak <mjs@apple.com>
  1660. Converted JavaScriptCore to build with Project Builder, in
  1661. preparation for B&I submission.
  1662. * English.lproj/InfoPlist.strings: Added.
  1663. * JavaScriptCore.pbproj/.cvsignore: Added.
  1664. * JavaScriptCore.pbproj/project.pbxproj: Added.
  1665. * .cvsignore: Update the set of ignored things.
  1666. * Makefile.am: Hand off to PB for the main build, but still handle
  1667. the generated files and the test program.
  1668. * kjs/Makefile.am: Don't build anything except the generated
  1669. source files.
  1670. * kjs/KWQDef.h, kjs/config.h: Added minimal versions of these
  1671. files to get kjs to build.
  1672. Check in all the genrated files, since Project Builder isn't up to
  1673. the task of handling built sources:
  1674. * kjs/array_object.lut.h: Added.
  1675. * kjs/date_object.lut.h: Added.
  1676. * kjs/grammar.cpp: Added.
  1677. * kjs/grammar.cpp.h: Added.
  1678. * kjs/grammar.h: Added.
  1679. * kjs/lexer.lut.h: Added.
  1680. * kjs/math_object.lut.h: Added.
  1681. * kjs/number_object.lut.h: Added.
  1682. * kjs/string_object.lut.h: Added.
  1683. * kjs/.cvsignore: Update set of ignored things.
  1684. 2002-03-28 Maciej Stachowiak <mjs@apple.com>
  1685. * kjs/kjs-test.chk: Update output for new test results.
  1686. 2002-03-26 Maciej Stachowiak <mjs@apple.com>
  1687. Set up kjs to build by itself into libJavaScriptCore.dylib.
  1688. * .cvsignore: Added.
  1689. * Makefile.am: Added.
  1690. * dummy.cpp: Added.
  1691. * kjs/.cvsignore: Added.