ChangeLog-2003-10-25 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484
  1. === Safari-111 ===
  2. 2003-10-22 Maciej Stachowiak <mjs@apple.com>
  3. Fix broken build.
  4. * kjs/simple_number.h:
  5. 2003-10-22 Maciej Stachowiak <mjs@apple.com>
  6. Merged 64-bit compilation fixes, and fixes for handling negative 0
  7. from upstream kjs.
  8. * kjs/internal.cpp:
  9. * kjs/simple_number.h:
  10. (KJS::SimpleNumber): fixed constants; added negZero constant.
  11. (KJS::SimpleNumber::is): adjusted to use long and not int.
  12. (KJS::SimpleNumber::value): ditto.
  13. (KJS::SimpleNumber::fits): ditto; also don't allow -0 to fit, so
  14. we don't lose the distinction between -0 and +0.
  15. (KJS::SimpleNumber::make): adjusted to use long.
  16. 2003-10-18 Darin Adler <darin@apple.com>
  17. Reviewed by Dave.
  18. - fixed 3367015 -- interdependent variable declarations in for loop don't work (they go backwards)
  19. * kjs/nodes.h: (KJS::ForNode::ForNode): Add a new overload of the constructor for when the
  20. first parameter is a variable declaration list. Call reverseList as we do in other constructors
  21. that take lists that are built backwards.
  22. * kjs/nodes.cpp: (ForNode::reverseList): Added. New helper function.
  23. === Safari-110 ===
  24. === Safari-109 ===
  25. 2003-10-06 Darin Adler <darin@apple.com>
  26. * kjs/create_hash_table: Remove stray semicolon.
  27. * kjs/array_object.lut.h:
  28. * kjs/date_object.lut.h:
  29. * kjs/lexer.lut.h:
  30. * kjs/math_object.lut.h:
  31. * kjs/number_object.lut.h:
  32. * kjs/string_object.lut.h:
  33. Regenerated.
  34. === Safari-108 ===
  35. 2003-10-02 Darin Adler <darin@apple.com>
  36. Reviewed by Dave.
  37. - fixed 3441656 -- constructor bad for objs created w/ function as prototype (www.moock.org/asdg/codedepot)
  38. * kjs/nodes.cpp: (FuncDeclNode::processFuncDecl): Set up the constructor as
  39. as specified in the JavaScript spec. We were already doing this right in the
  40. other place we make functions.
  41. 2003-09-30 Darin Adler <darin@apple.com>
  42. Reviewed by Dave.
  43. Rolled in Harri Porten's change to accept non-breaking space in JavaScript.
  44. * kjs/lexer.cpp: (Lexer::isWhiteSpace): Accept 00A0 as "whitespace".
  45. 2003-09-25 Maciej Stachowiak <mjs@apple.com>
  46. Roll out build system change since it did not actually work. :-(
  47. * JavaScriptCore.pbproj/project.pbxproj:
  48. * Makefile.am:
  49. 2003-09-25 Maciej Stachowiak <mjs@apple.com>
  50. Reviewed by Darin.
  51. * JavaScriptCore.pbproj/project.pbxproj: Don't hack install name. Instead
  52. of embedding into Safari, embed into WebKit as sub-umbrella.
  53. * Makefile.am: Don't forget to rebuild if the user removes
  54. JavaScript.framework from symroots manually.
  55. === Safari-107 ===
  56. 2003-09-24 Darin Adler <darin@apple.com>
  57. Reviewed by Ken.
  58. - fixed 3421107 -- some dates that other browsers can parse can't be parsed by KJS's Date.parse()
  59. * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Added code to be more strict about month names,
  60. to allow a time zone after date even if the date omits the time, and to understand AM and PM.
  61. 2003-09-22 Darin Adler <darin@apple.com>
  62. * JavaScriptCore.pbproj/project.pbxproj: Rename Mixed build style to OptimizedWithSymbols.
  63. 2003-09-22 Darin Adler <darin@apple.com>
  64. Reviewed by Ken.
  65. * kjs/config.h: Added HAVE_SYS_PARAM_H, since KJS does look for this header, and we do
  66. indeed have it. Just something I noticed in passing while cleaning up configure.in.
  67. 2003-09-20 Darin Adler <darin@apple.com>
  68. Reviewed by Dave.
  69. - fixed 3419380 -- JavaScript Date.getTimezoneOffset is off by one hour (during daylight savings)
  70. * kjs/date_object.cpp: (DateProtoFuncImp::call): The daylight savings correction
  71. in here was incorrect. Perhaps I should have corrected it for the non-BSD case too,
  72. but I'm not sure the issue is the same.
  73. 2003-09-17 Darin Adler <darin@apple.com>
  74. Reviewed by Maciej.
  75. * kjs/date_object.cpp: Removed our CF-based implementations of gmtime, localtime,
  76. mktime, timegm, and time, since they no longer have the slow "hit the filesystem
  77. every time" behavior.
  78. === Safari-100 ===
  79. === Safari-99 ===
  80. === Safari-98 ===
  81. === Safari-97 ===
  82. === Safari-96 ===
  83. 2003-08-27 Maciej Stachowiak <mjs@apple.com>
  84. Reviewed by John
  85. - fixed rdar://problem/3397316 - sherlock crash: KJS::Collector::allocate(unsigned long)
  86. * kjs/internal.cpp:
  87. (InterpreterImp::InterpreterImp): Hold the lock a bit longer, so
  88. the call to initGlobalObject is covered.
  89. === Safari-95 ===
  90. 2003-08-24 Darin Adler <darin@apple.com>
  91. Reviewed by John.
  92. - fixed 3098350 -- opt. params to date methods are ignored (can't set end date in Exchange/Outlook web cal.)
  93. * kjs/date_object.cpp: (DateProtoFuncImp::call): Added code to handle the optional parameters.
  94. Strangely, the table of functions already had the right number of parameters listed, but the
  95. code to look at the parameter values was missing.
  96. === Safari-94 ===
  97. 2003-08-17 Darin Adler <darin@apple.com>
  98. Reviewed by Maciej.
  99. - fixed 3247528 -- encodeURI missing from JavaScriptCore (needed by Crystal Reports)
  100. - fixed 3381297 -- escape method does not escape the null character
  101. - fixed 3381299 -- escape method produces incorrect escape sequences ala WinIE, rather than correct ala Gecko
  102. - fixed 3381303 -- unescape method treats escape sequences as Latin-1 ala WinIE rather than as UTF-8 ala Gecko
  103. - fixed 3381304 -- unescape method garbles strings with bad escape sequences in them
  104. * kjs/function.h: Added constants for decodeURI, decodeURIComponent, encodeURI, and
  105. encodeURIComponent.
  106. * kjs/function.cpp:
  107. (encode): Added. New helper function for escape, encodeURI, and encodeURIComponent.
  108. (decode): Added. New helper function for unescape, decodeURI, and decodeURIComponent.
  109. (GlobalFuncImp::call): Added decodeURI, decodeURIComponent, encodeURI, and encodeURIComponent
  110. implementations. Changed escape and unescape to use new helper functions, which fixes
  111. the four problems above.
  112. * kjs/internal.cpp: (InterpreterImp::initGlobalObject): Add decodeURI, decodeURIComponent,
  113. encodeURI, and encodeURIComponent to the global object.
  114. * kjs/ustring.h: Added a length to the CString class so it can hold strings with null
  115. characters in them, not just null-terminated strings. This allows a null character from
  116. a UString to survive the process of UTF-16 to UTF-8 decoding. Added overloads to
  117. UString::append, UString::UTF8String, UTF8SequenceLength, decodeUTF8Sequence,
  118. convertUTF16OffsetsToUTF8Offsets, and convertUTF8OffsetsToUTF16Offsets.
  119. * kjs/ustring.cpp:
  120. (CString::CString): Set up the length properly in all the constructors. Also add a new
  121. constructor that takes a length.
  122. (CString::append): Use and set the length properly.
  123. (CString::operator=): Use and set the length properly.
  124. (operator==): Use and the length and memcmp instead of strcmp.
  125. (UString::append): Added new overloads for const char * and for a single string to make
  126. it more efficient to build up a UString from pieces. The old way, a UString was created
  127. and destroyed each time you appended.
  128. (UTF8SequenceLength): New. Helper for decoding UTF-8.
  129. (decodeUTF8Sequence): New. Helper for decoding UTF-8.
  130. (UString::UTF8String): New. Decodes from UTF-16 to UTF-8. Same as the function that
  131. was in regexp.cpp, except has proper handling for UTF-16 surrogates.
  132. (compareStringOffsets): Moved from regexp.cpp.
  133. (createSortedOffsetsArray): Moved from regexp.cpp.
  134. (convertUTF16OffsetsToUTF8Offsets): New. Converts UTF-16 offsets to UTF-8 offsets, given
  135. a UTF-8 string. Same as the function that was in regexp.cpp, except has proper handling
  136. for UTF-16 surrogates.
  137. (convertUTF8OffsetsToUTF16Offsets): New. Converts UTF-8 offsets to UTF-16 offsets, given
  138. a UTF-8 string. Same as the function that was in regexp.cpp, except has proper handling
  139. for UTF-16 surrogates.
  140. - fixed 3381296 -- regular expression matches with UTF-16 surrogates will treat sequences as two characters
  141. * kjs/regexp.cpp:
  142. (RegExp::RegExp): Use the new UString::UTF8String function instead a function in this file.
  143. (RegExp::match): Use the new convertUTF16OffsetsToUTF8Offsets (and the corresponding
  144. reverse) instead of convertCharacterOffsetsToUTF8ByteOffsets in this file.
  145. === Safari-93 ===
  146. 2003-08-14 Vicki Murley <vicki@apple.com>
  147. Reviewed by John.
  148. * JavaScriptCore.pbproj/project.pbxproj: deleted JavaScriptCore.order from the project.
  149. 2003-08-14 Vicki Murley <vicki@apple.com>
  150. Reviewed by John.
  151. * JavaScriptCore.order: Removed. We now link to the order file at /AppleInternal/OrderFiles.
  152. * JavaScriptCore.pbproj/project.pbxproj: change sectorder flag to point to /AppleInternal/OrderFiles/JavaScriptCore.order
  153. === JavaScriptCore-92.1 ===
  154. 2003-08-07 Darin Adler <darin@apple.com>
  155. Reviewed by John Sullivan.
  156. - fixed 3365527 -- subscripting JavaScript strings does not work (leads to hang at www.newmagna.com.au)
  157. The JavaScript specification says nothing about this, but other browsers seem to give
  158. read-only access to the characters in a string as if the string was an array of characters.
  159. * kjs/array_object.cpp:
  160. (ArrayInstanceImp::get): Update to use a public toArrayIndex function instead of our own getArrayIndex
  161. function, so we can share with string.
  162. (ArrayInstanceImp::put): Ditto.
  163. (ArrayInstanceImp::hasProperty): Ditto.
  164. (ArrayInstanceImp::setLength): Ditto.
  165. * kjs/ustring.h: Add toArrayIndex.
  166. * kjs/ustring.cpp: (UString::toArrayIndex): Added. Implements the rule from array.
  167. * kjs/identifier.h: Add a forwarding function so we can use toArrayIndex.
  168. * kjs/string_object.cpp:
  169. (StringInstanceImp::get): Return a single character string if the property name is an array index.
  170. (StringInstanceImp::hasProperty): Return true for property names that are suitable array indices.
  171. * JavaScriptCore.pbproj/project.pbxproj: Let Xcode be Xcode.
  172. === Safari-92 ===
  173. 2003-08-07 Maciej Stachowiak <mjs@apple.com>
  174. Reviewed by Darin.
  175. - fixed 3366975 - repro hang in KJS::Value::Value entering text at eil.com
  176. * kjs/string_object.cpp:
  177. (StringProtoFuncImp::call): When doing a match against a regexp
  178. with the global flag set, make sure to return null rather than an
  179. empty array when there is no match. This is what other browsers do.
  180. 2003-08-05 Maciej Stachowiak <mjs@apple.com>
  181. Reviewed by John.
  182. * kjs/list.cpp:
  183. (List::copyTail): Test for loop termination with < instead of !=,
  184. since i starts at 1 but size could be 0. Do the same for the other
  185. loop for consistency's sake.
  186. 2003-08-01 Maciej Stachowiak <mjs@apple.com>
  187. Reviewed by John.
  188. - fixed 3222621 - Cryptic "anonymous function hack" messages in console (10.2.4)
  189. * kjs/lexer.cpp:
  190. (Lexer::lex): Remove useless debug spew.
  191. === Safari-91 ===
  192. 2003-07-30 Darin Adler <darin@apple.com>
  193. Reviewed by Dave.
  194. - fixed problem where some JavaScriptCore symbols had no namespace or prefix
  195. * kjs/grammar.y: Added a define for yylloc to make it use the kjs prefix.
  196. This is the same thing done for the rest of the symbols automatically by yacc,
  197. but for some reason it's not done for yyloc. Also make automatic() function static.
  198. * kjs/grammar.cpp: Regenerated.
  199. * kjs/lexer.cpp: Use kjsyylloc instead of yyloc.
  200. * pcre/pcre.h: Add defines to prepend kjs prefixes for all the PCRE functions.
  201. 2003-07-30 Darin Adler <darin@apple.com>
  202. * Makefile.am: Include the subdirectory with the PCRE code in it.
  203. 2003-07-30 John Sullivan <sullivan@apple.com>
  204. - JavaScriptCore part of fix for 3284525 -- AutoFill fills in
  205. only e-mail address field of New Account form on Apple Store Japan
  206. Reviewed by Darin
  207. * JavaScriptCore.pbproj/project.pbxproj:
  208. Mark pcre.h as a Private header
  209. 2003-07-28 Maciej Stachowiak <mjs@apple.com>
  210. Reviewed by Richard.
  211. - fixed 3240814 - LEAK: 120 byte leak in JavaScript parser in Sherlock Movies channel
  212. * kjs/internal.cpp:
  213. (Parser::parse): ref() and deref() the program node, to make sure to clean up properly,
  214. before deleting it.
  215. (InterpreterImp::checkSyntax): Likewise.
  216. === Safari-90 ===
  217. 2003-07-22 Maciej Stachowiak <mjs@apple.com>
  218. Reviewed by John.
  219. Remove -seg_addr_table_filename to fix build.
  220. * JavaScriptCore.pbproj/project.pbxproj:
  221. 2003-07-17 Maciej Stachowiak <mjs@apple.com>
  222. Reviewed by John.
  223. - fixed 3330344 - Please change allowable client to "JavaScriptGlue" from "JSGlue"
  224. * JavaScriptCore.pbproj/project.pbxproj: Changed allowable client
  225. to "JavaScriptGlue"
  226. 2003-07-13 Darin Adler <darin@apple.com>
  227. Reviewed by Maciej.
  228. - do some improvements Maciej suggested while reviewing the array index change
  229. * kjs/array_object.cpp:
  230. (getArrayIndex): Return a flag to say whether the index was value separately, to avoid
  231. in-band signalling.
  232. (ArrayInstanceImp::get): Update for new getArrayIndex parameters.
  233. (ArrayInstanceImp::put): Ditto.
  234. (ArrayInstanceImp::hasProperty): Ditto.
  235. (ArrayInstanceImp::setLength): Ditto.
  236. * kjs/ustring.cpp: (UString::toStrictUInt32): Check for overflow in a way that avoids doing
  237. a divide every time through the loop. But note that it adds an extra branch to the loop.
  238. I wonder which is worse.
  239. 2003-07-12 Darin Adler <darin@apple.com>
  240. Fixed broken build.
  241. * kjs/identifier.h: Add toULong back. It's still used in WebCore (and maybe in JavaScriptGlue,
  242. for all I know).
  243. 2003-07-12 Darin Adler <darin@apple.com>
  244. Reviewed by Dave.
  245. - fixed 3272777 -- array object indices treated as integers by Safari, but as strings in other web browsers
  246. JavaScriptCore did not implement the proper rule for what an array index is.
  247. * kjs/array_object.cpp:
  248. (getArrayIndex): Added. Implements the rule from the specification, which also provides a handy
  249. "not an array index" value of 2^32-1.
  250. (ArrayInstanceImp::get): Use getArrayIndex.
  251. (ArrayInstanceImp::put): Ditto.
  252. (ArrayInstanceImp::hasProperty): Ditto.
  253. (ArrayInstanceImp::setLength): Ditto.
  254. * kjs/identifier.h: Removed now-unused toULong, and added toStrictUInt32, in both cases forwarding
  255. functions that forward to UString.
  256. * kjs/ustring.h: Added toStringUInt32.
  257. * kjs/ustring.cpp: (UString::toStrictUInt32): Added. Converts a string to a 32-bit unsigned integer,
  258. and rejects any string that does not exactly match the way the integer would be formatted on output.
  259. This is the rule documented in the ECMA language standard.
  260. === Safari-89 ===
  261. 2003-07-10 Maciej Stachowiak <mjs@apple.com>
  262. Reviewed by Darin.
  263. - fixed 3302021 - v74 and v85 hang with http://e-www.motorola.com/
  264. The crux of this was saving and restoring the prototype objects
  265. for all the standard types when saving and restoring for the page
  266. cache.
  267. * kjs/internal.cpp:
  268. (InterpreterImp::saveBuiltins):
  269. (InterpreterImp::restoreBuiltins):
  270. * kjs/internal.h:
  271. * kjs/interpreter.cpp:
  272. (Interpreter::saveBuiltins):
  273. (Interpreter::restoreBuiltins):
  274. (SavedBuiltins::SavedBuiltins):
  275. (SavedBuiltins::~SavedBuiltins):
  276. * kjs/interpreter.h:
  277. * kjs/property_map.cpp:
  278. 2003-07-07 Maciej Stachowiak <mjs@apple.com>
  279. Reviewed by John.
  280. - fixed 3295916 - b/c JavaScriptCore and WebCore are installing in wrong location, private headers are public
  281. * WebCore.pbproj/project.pbxproj: Install in WebKit.framework/Versions/A/Frameworks.
  282. === Safari-88 ===
  283. 2003-07-02 Maciej Stachowiak <mjs@apple.com>
  284. Reviewed by Ken.
  285. - fixed 3096961 - JavaScriptCore should link only to what it uses, shouldn't drag in Cocoa.framework
  286. * JavaScriptCore.pbproj/project.pbxproj: Don't link Cocoa.framework;
  287. just pull in CoreFoundation and CoreServices.
  288. * kjs/date_object.cpp: Include CoreServices.h instead of Carbon.h
  289. (the stuff we want is in CarbonCore).
  290. 2003-06-20 Darin Adler <darin@apple.com>
  291. Reviewed by Maciej.
  292. - improved the property map sorting technique so that the indices
  293. are separate for each property map, and also preserve the ordering
  294. when property maps are saved and restored
  295. * kjs/property_map.cpp:
  296. (PropertyMap::put): Don't bother setting the index for _singleEntry, since there's
  297. no need to sort a single entry. Use the per-table lastIndexUsed instead of a global.
  298. (PropertyMap::expand): Don't use the index (uninitialized now) out of a _singleEntry
  299. when putting it in a newly-created map; just use 0. Compute a value for the new map's
  300. lastIndexUsed as we walk through the elements we are adding to it (using the same old
  301. indices from the old map).
  302. === Safari-85.1 ===
  303. === Safari-85 ===
  304. 2003-06-13 Darin Adler <darin@apple.com>
  305. Reviewed by Dave.
  306. - fixed 3178438 -- return elements in order of addition in for..in loop (other browsers seem to)
  307. - fixed 3292067 -- REGRESSION (64-65): albertsons.com "Shop A to Z" menus are not sorted alphabetically
  308. * kjs/property_map.h: Add index field to hash table entry and index parameter to insert function.
  309. * kjs/property_map.cpp:
  310. (PropertyMap::put): Set an index for new map entries to an ever-increasing number based on a global.
  311. (PropertyMap::insert): Take an index parameter.
  312. (PropertyMap::expand): Preserve the indices as we rehash the table.
  313. (comparePropertyMapEntryIndices): Added. Compares two property map entries by index.
  314. (PropertyMap::addEnumerablesToReferenceList): Sort the proprty map entries by index before adding
  315. them to the reference list.
  316. === Safari-84 ===
  317. 2003-06-10 Vicki Murley <vicki@apple.com>
  318. Reviewed by john.
  319. * JavaScriptCore.order: new order file for 1.0
  320. === Safari-83 ===
  321. 2003-06-04 Darin Adler <darin@apple.com>
  322. Reviewed by Dave.
  323. - fixed 3224031 -- can't search at rakuten.co.jp b/c of extra characters inserted by regexp replace (8-bit char)
  324. Use PCRE UTF-8 regular expressions instead of just chopping off high bytes.
  325. * kjs/regexp.h: Redo field names, remove some unused stuff.
  326. * kjs/regexp.cpp:
  327. (convertToUTF8): Added.
  328. (compareStringOffsets): Added.
  329. (createSortedOffsetsArray): Added.
  330. (convertCharacterOffsetsToUTF8ByteOffsets): Added.
  331. (convertUTF8ByteOffsetsToCharacterOffsets): Added.
  332. (RegExp::RegExp): Set the PCRE_UTF8 flag, and convert the UString to UTF-8 instead of
  333. using ascii() on it.
  334. (RegExp::~RegExp): Remove unneeded if statement (pcre_free is 0-tolerant as free is).
  335. (RegExp::match): Convert the UString to UTF-8 and convert the character offsets to and
  336. from UTF-8 byte offsets. Also do fixes for the "no offset vector" case so we get the
  337. correct position and matched string.
  338. * JavaScriptCore.pbproj/project.pbxproj: Add a PCRE header that was missing before.
  339. === Safari-82 ===
  340. === Safari-81 ===
  341. 2003-05-21 Vicki Murley <vicki@apple.com>
  342. Reviewed by john
  343. - fixed 3234553: Safari and its frameworks should link using order files
  344. * JavaScriptCore.order: Added.
  345. * JavaScriptCore.pbproj/project.pbxproj: set SECTORDER_FLAGS = -sectorder __TEXT __text JavaScriptCore.order
  346. === Safari-80 ===
  347. 2003-05-19 Maciej Stachowiak <mjs@apple.com>
  348. - fixed 3261096 - Make WebKit an umbrella framework
  349. * JavaScriptCore.pbproj/project.pbxproj: In a B&I build, compile as a
  350. sub-umbrella of WebKit.
  351. 2003-05-16 Maciej Stachowiak <mjs@apple.com>
  352. Reviewed by Ken.
  353. - fixed 3254063 - REGRESSION: hang in KJS PropertyMap with many items in iDisk pictures folder
  354. * kjs/property_map.cpp:
  355. (PropertyMap::expand): Fixed to maintain key count properly - otherwise the hashtable
  356. could get completely full, resulting in disaster.
  357. (PropertyMap::checkConsistency): Fixed compilation. Fixed to know about deleted
  358. sentinel. Fixed to search with double-hashing instead of linear probing.
  359. === Safari-79 ===
  360. 2003-05-15 Maciej Stachowiak <mjs@apple.com>
  361. Reviewed by Chris.
  362. - fixed 3259673 - REGRESSION: marvel.com thinks I don't have the flash plugin any more
  363. * kjs/nodes.cpp:
  364. (ContinueNode::execute): Return a Continue completion, not a Break
  365. completion, in the normal non-exception case.
  366. 2003-05-12 Maciej Stachowiak <mjs@apple.com>
  367. Reviewed by Darin.
  368. - fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
  369. - improved JavaScript error message format
  370. * kjs/error_object.cpp:
  371. (ErrorProtoFuncImp::call): Include line number in toString output.
  372. * kjs/internal.cpp:
  373. (Parser::parse): Remove redundant fprintf.
  374. * kjs/interpreter.cpp:
  375. (Interpreter::evaluate): Log if the flag is on. Include filename in log output.
  376. (Interpreter::shouldPrintExceptions): Check the global flag.
  377. (Interpreter::setShouldPrintExceptions): Set the global flag.
  378. * kjs/interpreter.h:
  379. * kjs/nodes.cpp:
  380. (Node::throwError): Add variants that include value and expression or label in format.
  381. (NewExprNode::evaluate): Improve error message.
  382. (FunctionCallNode::evaluate): Improve error message.
  383. (RelationalNode::evaluate): Improve error message.
  384. (ContinueNode::execute): Improve error message.
  385. (BreakNode::execute): Improve error message.
  386. (LabelNode::execute): Improve error message.
  387. * kjs/nodes.h:
  388. === Safari-78 ===
  389. 2003-05-07 Vicki Murley <vicki@apple.com>
  390. Reviewed by darin.
  391. - modify the Mixed build style to build optimized with symbols
  392. * JavaScriptCore.pbproj/project.pbxproj: removed OPTIMIZATION_CFLAGS
  393. 2003-05-05 Maciej Stachowiak <mjs@apple.com>
  394. Reviewed by Don.
  395. - fixed 3239961 - www.phiffer.com doesn't work; uses "var top; top = n;"
  396. * kjs/nodes.cpp:
  397. (VarDeclNode::evaluate): Check if the property exists with
  398. getDirect() instead of hasProperty().
  399. === Safari-77 ===
  400. 2003-04-29 Darin Adler <darin@apple.com>
  401. Reviewed by John.
  402. - fixed 2959353 -- eliminate globally initialized objects from JavaScriptCore
  403. * JavaScriptCore.pbproj/project.pbxproj: Added fpconst.cpp.
  404. * kjs/fpconst.cpp: Added. Defines KJS::NaN and KJS::Inf in a way that does not require a
  405. framework init routine.
  406. * kjs/identifier.h: Use a new KJS_IDENTIFIER_EACH_GLOBAL macro so we can do things to
  407. the entire set of identifiers easily. Also added an init function that sets up these globals
  408. in a way that does not require a framework init routine.
  409. * kjs/identifier.cpp: (Identifier::init): Initialize the property ane globals in a way that
  410. does not require a framework init routine.
  411. * kjs/internal.cpp: (InterpreterImp::initGlobalObject): Call Identifier::init.
  412. * kjs/ustring.h: Remove UChar::null and UString::null, and add UString::null(). We can't have
  413. a global object of a class that has a constructor if we want to avoid framework init routines,
  414. and luckily very little code relies on these.
  415. * kjs/ustring.cpp:
  416. (UCharReference::ref): Use our own global specific to this function rather than returning
  417. UChar::null when past the end of the string. This is dangerous because if the caller modifies
  418. it, that affects what all subsequent callers will see.
  419. (UString::Rep::create): Added assertions.
  420. (UString::UString): Got rid of code here that used to set up UString::null.
  421. (UString::null): Added. Returns a global null string, and can be used in some of the places
  422. where we used to use the UString::null global.
  423. (UString::operator[]): Fixed case where this used to return UChar::null to return '\0' instead.
  424. * kjs/regexp.cpp: (RegExp::match): Change uses of UString::null to UString::null().
  425. 2003-04-25 Darin Adler <darin@apple.com>
  426. - fixed 3241344 -- REGRESSION: top of page missing on wired.com and cnn.com
  427. Caused by the ResolveNode speedup. Roll it out until I can figure out why.
  428. * kjs/nodes.cpp: (ResolveNode::evaluate): Go back to using evaluateReference.
  429. 2003-04-25 Darin Adler <darin@apple.com>
  430. Reviewed by Maciej.
  431. - a couple improvements that give a 6.6% speedup on iBench JavaScript
  432. * kjs/nodes.cpp: (ResolveNode::evaluate): Don't use evaluateReference.
  433. * kjs/object.cpp: (ObjectImp::get): Do the prototype work with the ValueImp, not a wrapper.
  434. Contributes a tiny bit to the speedup, but cleaner anyway.
  435. (ObjectImp::hasProperty): Same thing here.
  436. 2003-04-25 Darin Adler <darin@apple.com>
  437. Reviewed by Maciej.
  438. - move from linear probing to double hashing, gives an 0.7% speedup in iBench JavaScript
  439. * kjs/property_map.h: Remove the hash function.
  440. * kjs/property_map.cpp: Added statistics for rehashes and removes.
  441. Moved from linear probing to double hashing, using the hash modulo
  442. (table size minus one) plus one for the probing distance.
  443. * kjs/ustring.h: Use unsigned instead of int for hash function result.
  444. === Safari-75 ===
  445. 2003-04-18 Maciej Stachowiak <mjs@apple.com>
  446. Reviewed by Ken.
  447. Improved List pool for 3% speed improvement on cvs-js-ibench
  448. * kjs/list.cpp: Replaced the roving cursor with a free list and
  449. raised the high water mark to 384.
  450. 2003-04-12 Maciej Stachowiak <mjs@apple.com>
  451. Reviewed by Don.
  452. - JavaScriptCore part of fix for 3158769 - JavaScript triggers not as async as they used to be
  453. Added a way to get the current interpreter lock count, so Sherlock
  454. can unlock the interpreter inside JS method implementations that
  455. spend a long time waiting for I/O, allowing more efficient
  456. multi-threaded operation.
  457. * kjs/internal.cpp:
  458. (lockInterpreter):
  459. (unlockInterpreter):
  460. (InterpreterImp::lock):
  461. (InterpreterImp::lockCount):
  462. * kjs/internal.h:
  463. * kjs/interpreter.cpp:
  464. (Interpreter::lockCount):
  465. * kjs/interpreter.h:
  466. === Safari-73 ===
  467. === Safari-72 ===
  468. === Safari-71 ===
  469. 2003-03-31 Darin Adler <darin@apple.com>
  470. * English.lproj/InfoPlist.strings: Changed "1.0 Beta" to "1.0 Beta 2".
  471. * JavaScriptCore.pbproj/project.pbxproj: Changed "1.0 Beta" to "1.0 Beta 2".
  472. === Safari-69 ===
  473. 2003-03-24 Trey Matteson <trey@apple.com>
  474. Pass -seg_addr_table_filename <FILENAME> to ld. This makes our frameworks in
  475. SYMROOT actually work for symbol resolution because they will have the correct
  476. prebinding address. It also fixes obscure B&I problems with prebinding
  477. reported by Matt Reda.
  478. Note the reason all this is tricky for our projects is that we have a different
  479. install location for Jaguar and Panther. The purpose of this arg is to declare
  480. at link time our eventual location, which allows the prebinding address to be
  481. found in /AppleInternal/Developer/seg_addr_table. We use a funky back-tick
  482. expression within OTHER_LDFLAGS to get a conditional value depending on the
  483. build train we are in.
  484. This can all go away once we only build on Panther and don't embed the
  485. frameworks inside the Safari.app wrapper.
  486. In addition I fixed the OTHER_LDFLAGS settings in our build styles to be
  487. additive instead of overriding, so we have the args we used for B&I in force
  488. when building outside of B&I.
  489. Reviewed by Maciej.
  490. * JavaScriptCore.pbproj/project.pbxproj:
  491. === Safari-68 ===
  492. 2003-03-16 Trey Matteson <trey@apple.com>
  493. 3198135 - need to fix our projects so SYMROOT is not stripped
  494. Tweaked stripping options: B&I build does not COPY_PHASE_STRIP.
  495. Deployment build still does.
  496. We strip manually as part of the install that we do ourselves.
  497. Reviewed by Maciej.
  498. * JavaScriptCore.pbproj/project.pbxproj:
  499. === Safari-67 ===
  500. === Safari-66 ===
  501. 2003-03-10 Darin Adler <darin@apple.com>
  502. Reviewed by Ken.
  503. - fixed 3193099 -- date parsing can't handle the time zone format that date formatting produces
  504. * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Allow a "GMT" prefix before the time zone offset.
  505. === Safari-65 ===
  506. 2003-03-04 Darin Adler <darin@apple.com>
  507. Reviewed by Maciej.
  508. - got rid of some framework initialization (working on bug 2959353)
  509. * kjs/identifier.h: Turn Identifier:null into Identifier:null().
  510. * kjs/identifier.cpp: Removed Identifier:null and added Identifier:null().
  511. * kjs/internal.cpp: Made NaN_Bytes and Inf_Bytes const.
  512. * kjs/completion.h: Use Identifier:null() instead of Identifier:null.
  513. * kjs/function.h: Ditto.
  514. * kjs/function_object.cpp: (FunctionObjectImp::construct): Ditto.
  515. * kjs/nodes.cpp: (FuncExprNode::evaluate): Use Identifier:null() instead of Identifier:null.
  516. 2003-03-02 Maciej Stachowiak <mjs@apple.com>
  517. Reviewed by Trey.
  518. - fixed 3158833 - ebay prefs page is so slow, it seems like a hang.
  519. 92% speed improvement on ebay prefs page.
  520. 1% speed improvement on js-ibench and js-performance plt suites.
  521. There were a couple of problems with the identifier hash table that
  522. I fixed:
  523. * kjs/identifier.cpp:
  524. (void Identifier::remove): Adjust the shrink threshold to avoid
  525. constantly growing and shrinking.
  526. * kjs/ustring.cpp:
  527. (UString::Rep::computeHash): Use a better hash function that
  528. avoids collisions for obvious data sets.
  529. === Safari-64 ===
  530. === Safari-63 ===
  531. 2003-02-26 Maciej Stachowiak <mjs@apple.com>
  532. Reviewed by Darin.
  533. - fixed 3156705 - REGRESSION: javascript menus improperly placed at umich.edu store
  534. * kjs/nodes.cpp:
  535. (StatListNode::execute): If the first statement's completion is
  536. not normal, return immediately.
  537. 2003-02-21 Darin Adler <darin@apple.com>
  538. Reviewed by Maciej.
  539. - fixed 3142355 -- nil-deref in CFTimeZoneCopyAbbreviation
  540. The real problem wasn't with the current time zone, but with the UTC time zone.
  541. The poor sod had a broken /usr/share/zoneinfo directory, with a 0-byte-long UTC file.
  542. * kjs/date_object.cpp: (UTCTimeZone): Use CFTimeZoneCreateWithTimeIntervalFromGMT(NULL, 0.0)
  543. to get the universal time zone instead of getting it by name.
  544. === Safari-62 ===
  545. 2003-02-18 Darin Adler <darin@apple.com>
  546. Reviewed by Trey and Ken.
  547. - fixed 3142355 -- nil-deref in CFTimeZoneCopyAbbreviation
  548. Although I can't reproduce this bug, it seems that it's caused by CFTimeZoneCopyDefault returning NULL.
  549. I'm almost certain that the UTC time zone will be created successfully in this case, so I'll just use that.
  550. * kjs/date_object.cpp:
  551. (UTCTimeZone): Added. Gets the UTC time zone (once in a global).
  552. (CopyLocalTimeZone): Added. Gets the local time zone, but falls back to UTC.
  553. (gmtimeUsingCF): Use UTCTimeZone.
  554. (localtimeUsingCF): Use CopyLocalTimeZone.
  555. (mktimeUsingCF): Use CopyLocalTimeZone.
  556. (timegmUsingCF): Use UTCTimeZone.
  557. 2003-02-12 Darin Adler <darin@apple.com>
  558. Reviewed by Dave.
  559. - fixed 3145442 -- toString(16) is not working, causing non-ASCII characters in mac.com homepage to be munged
  560. * kjs/number_object.cpp: (NumberProtoFuncImp::call): Add handling for toString with a radix other than
  561. 10 passed as an argument.
  562. 2003-02-11 Trey Matteson <trey@apple.com>
  563. Set -seg1addr in our build styles, but not for the B&I build.
  564. This makes our SYMROOTS from B&I usable to determine symbols from crash
  565. logs from the field.
  566. Also nuked DeploymentFat build style.
  567. Reviewed by Ken.
  568. * JavaScriptCore.pbproj/project.pbxproj:
  569. 2003-02-04 Maciej Stachowiak <mjs@apple.com>
  570. Reviewed by Darin.
  571. * JavaScriptCore.pbproj/project.pbxproj: Updated to build the framework
  572. standalone instead of embedded when doing a B&I build for Panther.
  573. === Safari-55 ===
  574. 2003-01-29 Darin Adler <darin@apple.com>
  575. Reviewed by John.
  576. * kjs/scope_chain.cpp: Rolled out the fix to bug 3137084.
  577. It caused a massive storage leak, and probably didn't even fix the bug.
  578. 2003-01-28 Darin Adler <darin@apple.com>
  579. Reviewed by Ken.
  580. - fixed 3157318 -- hang at time zone page after clicking on map at www.time.gov
  581. * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Allow a comma after the day.
  582. Given how this code is structured, it allows commas in unwanted contexts too, but
  583. that's almost certainly harmless.
  584. 2003-01-28 Darin Adler <darin@apple.com>
  585. Reviewed by Maciej.
  586. - fixed 3144918 -- Can't drill down multiple levels of categories when selling on ebay
  587. if first item in list is chosen
  588. The bug was caused by having array values in the property map past the storageLength cutoff
  589. in an array object; those values would not be seen when you do a get.
  590. * kjs/array_object.cpp:
  591. (ArrayInstanceImp::put): Implement a new rule for resizing the storage that is independent
  592. of the length. The old rule would sometimes make the storage very big if you added two elements
  593. in a row that both had large, but consecutive indexes. This eliminates any cases where we
  594. make sparse entries in the property map below the sparse array cutoff.
  595. (ArrayInstanceImp::resizeStorage): Don't ever make storage size bigger than the cutoff unless
  596. the caller specifically requests it.
  597. (ArrayInstanceImp::setLength): Change this so it only makes the storage smaller, never larger.
  598. We will actually enlarge the storage when putting elements in.
  599. 2003-01-25 Darin Adler <darin@apple.com>
  600. Reviewed by Maciej.
  601. * kjs/Makefile.am: Add dependencies so the .lut.h files get rebuilt if the script changes.
  602. === Safari-54 ===
  603. 2003-01-22 Darin Adler <darin@apple.com>
  604. Reviewed by Maciej.
  605. - fixed 3137084 -- Many non-reproducible crashers in ContextImp::mark / ScopeChain::mark
  606. * kjs/scope_chain.cpp: (ScopeChain::push): Add assertion.
  607. (ScopeChain::release): Fix while loop so that it decrements refCount of the first node in
  608. the chain too.
  609. 2003-01-21 Darin Adler <darin@apple.com>
  610. - correct our copyrights to 2003; copyright is based on year of publication, not year worked on
  611. 2003-01-16 Maciej Stachowiak <mjs@apple.com>
  612. Reviewed by Darin.
  613. - made minor tweaks to work better with Mozilla's JavaScript tests.
  614. * kjs/testkjs.cpp:
  615. (VersionFunctionImp::call): Implemented
  616. (main): Ignore files named -f (hack to match -f <filename syntax
  617. that moz JavaScript tests expect). Also use return code 3 instead
  618. of 1 for uncaught exception.
  619. 2003-01-16 Darin Adler <darin@apple.com>
  620. * kjs/number_object.cpp: (NumberObjectImp::construct):
  621. Fix build, remove stray space.
  622. 2003-01-16 Darin Adler <darin@apple.com>
  623. Reviewed by Maciej.
  624. - rolled in a change from the KJS folks
  625. * kjs/number_object.h: Use ObjectImp *, not Object, for the proto.
  626. * kjs/number_object.cpp:
  627. (NumberInstanceImp::NumberInstanceImp): Use ObjectImp *, not Object, for the proto.
  628. (NumberPrototypeImp::NumberPrototypeImp): Pass ObjectImp.
  629. (NumberObjectImp::construct): Use ObjectImp.
  630. === Safari-52 ===
  631. 2003-01-14 Darin Adler <darin@apple.com>
  632. Reviewed by Ken.
  633. - rolled in a change from the KJS folks
  634. Fixes a bug where the date functions would not accept non-strings.
  635. And provides a bit of a speedup.
  636. * kjs/date_object.h: Change parameter type for parseDate.
  637. * kjs/date_object.cpp:
  638. (DateObjectFuncImp::call): Always call toString, don't check the type.
  639. (KJS::parseDate): Take a UString parameter, not a String parameter.
  640. 2003-01-13 Darin Adler <darin@apple.com>
  641. * kjs/ustring.h: Fix spelling of occurrence.
  642. 2003-01-12 Darin Adler <darin@apple.com>
  643. Reviewed by Maciej.
  644. - turned more recursion into iteration, and fixed some backwards stuff
  645. * kjs/grammar.y: Use the normal idiom for CaseClauses and FormalParameterList
  646. rather than using append().
  647. * kjs/grammar.cpp: Regenerated.
  648. * kjs/nodes.h: Change ClauseListNode and ParameterNode to use the normal idiom,
  649. and got rid of append methods. Also added friend declarations and calls to reverseList().
  650. * kjs/nodes.cpp:
  651. (StatListNode::ref): Iteration, not recursion.
  652. (StatListNode::deref): Iteration, not recursion.
  653. (StatListNode::execute): Iteration, not recursion.
  654. (StatListNode::processVarDecls): Iteration, not recursion.
  655. (CaseClauseNode::reverseList): Added.
  656. (ClauseListNode::ref): Iteration, not recursion.
  657. (ClauseListNode::deref): Iteration, not recursion.
  658. (ClauseListNode::processVarDecls): Iteration, not recursion.
  659. (CaseBlockNode::reverseLists): Added.
  660. (ParameterNode::ref): Iteration, not recursion.
  661. (ParameterNode::deref): Iteration, not recursion.
  662. (FuncDeclNode::reverseParameterList): Added.
  663. (FuncExprNode::reverseParameterList): Added.
  664. (SourceElementsNode::ref): Iteration, not recursion.
  665. (SourceElementsNode::deref): Iteration, not recursion.
  666. (SourceElementsNode::execute): Use variable name of n to match other functions.
  667. (SourceElementsNode::processFuncDecl): Ditto.
  668. (SourceElementsNode::processVarDecls): Ditto.
  669. * kjs/nodes2string.cpp:
  670. (SourceStream::operator<<): Used a switch statement for a bit of added clarity.
  671. (ElementNode::streamTo): Iteration, not recursion.
  672. (PropertyValueNode::streamTo): Iteration, not recursion.
  673. (ArgumentListNode::streamTo): Iteration, not recursion.
  674. (StatListNode::streamTo): Iteration, not recursion, and fixed order.
  675. (VarDeclListNode::streamTo): Iteration, not recursion.
  676. (ClauseListNode::streamTo): Used for statement to match other functions.
  677. (CaseBlockNode::streamTo): Used for statement to match other functions.
  678. (ParameterNode::streamTo): Iteration, not recursion.
  679. (SourceElementsNode::streamTo): Iteration, not recursion, and fixed order that has been
  680. backwards since I changed how this works in nodes.cpp.
  681. 2003-01-11 Darin Adler <darin@apple.com>
  682. Reviewed by John.
  683. - changes inspired by things I noticed reviewing diffs vs. KDE when preparing the tarball
  684. * kjs/function.cpp: (GlobalFuncImp::call): Use strtol when strtoll is
  685. not available. Do #ifndef NDEBUG, not #if !NDEBUG.
  686. * kjs/function.h: Do #ifndef NDEBUG, not #if !NDEBUG.
  687. * kjs/internal.cpp:
  688. (InterpreterImp::initGlobalObject): Do #ifndef NDEBUG, not #if !NDEBUG.
  689. (KJS::printInfo): Remove case for ListType and remove default case that just
  690. ends up suppressing the "missing case" warning and does no good.
  691. * kjs/interpreter.cpp: (Interpreter::evaluate): Do #ifndef NDEBUG, not #if !NDEBUG.
  692. * kjs/nodes.cpp:
  693. (Node::finalCheck): Fix accidentally-deleted code in an ifdef we never compile.
  694. (FunctionCallNode::evaluate): Remove bogus XXX comment. Maciej put this comment in,
  695. and together we determined it's not needed.
  696. (TypeOfNode::evaluate): Ditto.
  697. * kjs/object.cpp: Remove assert that refers to ListType.
  698. * kjs/value.h: Remove ListType.
  699. 2003-01-09 Darin Adler <darin@apple.com>
  700. * JavaScriptCore.pbproj/project.pbxproj: Add the year 2003, remove CFBundleIconFile,
  701. bump marketing version to 0.8.1 and version to 52u to keep up with the branch,
  702. remove CFHumanReadableCopyright, remove NSPrincipalClass.
  703. * English.lproj/InfoPlist.strings: Updated to match above changes.
  704. 2003-01-05 Maciej Stachowiak <mjs@apple.com>
  705. Reviewed by no one cause I'm just changing copyright strings.
  706. * JavaScriptCore.pbproj/project.pbxproj: Added non-Apple copyrights to
  707. copyright strings.
  708. * English.lproj/InfoPlist.strings: Likewise.
  709. 2003-01-05 Darin Adler <darin@apple.com>
  710. * JavaScriptCore.pbproj/project.pbxproj: Fix "Apple Compupter" typo.
  711. Remove unneeded CFBundleLongVersionString we don't use anywhere else.
  712. 2003-01-02 Darin Adler <darin@apple.com>
  713. Reviewed by Maciej.
  714. - fixed 3138213 -- browser hangs trying to open Apple travel site
  715. * kjs/date_object.cpp: (timetUsingCF): Check for very-negative year numbers too.
  716. === Alexander-48 ===
  717. === Alexander-47 ===
  718. 2002-12-30 Darin Adler <darin@apple.com>
  719. Reviewed by Don and Maciej.
  720. - follow-on to my fix for 3134693 that fixes one more case of recursion and simplifies further
  721. * kjs/grammar.y: Remove SourceElementNode and just use a StatementNode instead.
  722. Reverse SourceElements rule so the recursive rule comes first as in the original
  723. KJS code (avoids actual parser recursion).
  724. * kjs/grammar.cpp: Regenerated.
  725. * kjs/grammar.cpp.h: Regenerated.
  726. * kjs/grammar.h: Regenerated.
  727. * kjs/nodes.h: Make processFuncDecl a virtual function in StatementNode so that we can
  728. use a StatementNode instead of a SourceElementNode. Add a call to reverseList in BlockNode
  729. to correct the order of the linked list in SourceElementsNode, to replace the technique
  730. where we reversed it in the parser. Remove SourceElementNode class, and make the element in
  731. SourceElementsNode be a StatementNode instead.
  732. * kjs/nodes.cpp: Remove SourceElementNode code.
  733. (StatementNode::processFuncDecl): Added empty function.
  734. (BlockNode::reverseList): Added. Used to make the SourceElements list ordered correctly.
  735. * kjs/nodes2string.cpp: Remove SourceElementNode code.
  736. === Alexander-46 ===
  737. 2002-12-28 Darin Adler <darin@apple.com>
  738. Reviewed by Gramps and Ken.
  739. Checked in by Ken.
  740. - fixed 3134693 -- carsdirect.com crash on used car search, due to large JavaScript array
  741. The parser was using recursion to handle many types of lists.
  742. This meant that we crashed out of stack space when any of the lists were extra big.
  743. I applied the same sort of fix we had already applied a while back for argument lists for
  744. all the other types of lists, including the list of ElementNode that was the reason for
  745. the crash reported here.
  746. * kjs/grammar.y: Removed ElisionNode altogether and just use a count.
  747. Use specific node types for PropertyNameAndValueList and PropertyName.
  748. * kjs/grammar.cpp: Regenerated.
  749. * kjs/grammar.cpp.h: Regenerated.
  750. * kjs/grammar.h: Regenerated.
  751. * kjs/nodes.h: Elide "ElisionNode", changing objects to keep elision counts instead.
  752. Make the ObjectLiteralNode list field be PropertyValueNode, not just Node.
  753. Make PropertyValueNode fields have specific types. Add new reverse list functions, calls
  754. to those functions in the constructors, and friend declarations as needed so the class
  755. that holds the head of a list can reverse the list during parsing.
  756. * kjs/nodes.cpp:
  757. (ElementNode::ref): Use iteration instead of recursion. Also elide "elision".
  758. (ElementNode::deref): Ditto.
  759. (ElementNode::evaluate): Use iteration instead of recursion, taking advantage of
  760. the fact that the linked list is reversed. Also use the elision count rather than
  761. an elision list.
  762. (ArrayNode::reverseElementList): Reverse the list so we can iterate normally.
  763. (ArrayNode::ref): Elide "elision".
  764. (ArrayNode::deref): Ditto.
  765. (ArrayNode::evaluate): Use elision count instead of elision list.
  766. (ObjectLiteralNode::reverseList): Reverse the list so we can iterate normally.
  767. (PropertyValueNode::ref): Use iteration instead of recursion.
  768. (PropertyValueNode::deref): Use iteration instead of recursion.
  769. (PropertyValueNode::evaluate): Use iteration instead of recursion, taking advantage
  770. of the fact that the linked list is reversed.
  771. (ArgumentListNode::ref): Change code to match the other similar cases we had to revise.
  772. (ArgumentListNode::deref): Ditto.
  773. (ArgumentListNode::evaluateList): Ditto.
  774. (ArgumentsNode::reverseList): Ditto.
  775. (VarDeclListNode::ref): Use iteration instead of recursion.
  776. (VarDeclListNode::deref): Ditto.
  777. (VarDeclListNode::evaluate): Use iteration instead of recursion, taking advantage
  778. of the fact that the linked list is reversed.
  779. (VarDeclListNode::processVarDecls): Ditto.
  780. (VarStatementNode::reverseList): Reverse the list so we can iterate normally.
  781. (FunctionBodyNode::FunctionBodyNode): Use BlockNode as the base class, removing
  782. most of the FunctionBodyNode class.
  783. * kjs/nodes2string.cpp:
  784. (ElementNode::streamTo): Update for using a count for elision, and reverse linking.
  785. (ArrayNode::streamTo): Update for using a count for elision.
  786. (PropertyValueNode::streamTo): Update for reverse linking.
  787. (ArgumentListNode::streamTo): Update for reverse linking. This has been wrong for
  788. a while, since we added the reverse a long time ago.
  789. (VarDeclListNode::streamTo): Update for reverse linking.
  790. (ParameterNode::streamTo): Update for reverse linking.
  791. === Alexander-45 ===
  792. 2002-12-22 Darin Adler <darin@apple.com>
  793. Reviewed by Don and John.
  794. - fixed 3134449 -- Date.UTC returns NaN (invalid date)
  795. Did more testing of the date functions and made them behave like the other browsers.
  796. There were three problems:
  797. 1) We did a validity check that other browsers don't do (hence the NaN).
  798. 2) We treated passed-in dates as local time even in Date.UTC (hence a wrong result
  799. once I fixed the NaN).
  800. 3) The results of ToUTCString (and ToGMTString) weren't formatted quite the same
  801. as other browsers.
  802. Also found a couple of silly but unrelated coding mistakes.
  803. * kjs/date_object.cpp:
  804. (timetUsingCF): Added. Has the guts of mktimeUsingCF, but without the CFGregorianDateIsValid
  805. check. Other browsers accept invalid dates. Also takes a time zone parameter.
  806. (mktimeUsingCF): Calls timetUsingCF with the current time zone.
  807. (timegmUsingCF): Calls timetUsingCF with the UTC time zone.
  808. (formatDate): Remove the includeComma flag.
  809. (formatDateUTCVariant): Added. For use instead of formatDate with the includeComma flag.
  810. Puts the day before the month name.
  811. (DateProtoFuncImp::call): Use the new formatDateUTCVariant for ToGMTString and ToUTCString.
  812. Without this change the date didn't match other browsers.
  813. (DateObjectImp::DateObjectImp): Use UTCPropertyName. Somehow I declared this and didn't use
  814. it before.
  815. (DateObjectImp::construct): Pass -1 for is_dst literally instead of using invalidDate.
  816. Changing this to invalidDate was just a mistake (although no real difference in compiled
  817. code since invalidDate is just -1).
  818. (DateObjectFuncImp::call): Call timegm for the UTC case instead of mktime.
  819. === Alexander-44 ===
  820. === Alexander-43 ===
  821. 2002-12-20 Trey Matteson <trey@apple.com>
  822. We now build with symbols the B&I. Deployment builds are without symbols,
  823. so it is easy to generate a non-huge app as a one-off.
  824. Reviewed by Darin
  825. * JavaScriptCore.pbproj/project.pbxproj:
  826. === Alexander-42 ===
  827. === Alexander-41 ===
  828. === Alexander-40 ===
  829. 2002-12-18 Maciej Stachowiak <mjs@apple.com>
  830. Reviewed by John.
  831. - fixed 3131171 - Change Alex versions to satisfy both marketing and B&I requirements
  832. * English.lproj/InfoPlist.strings:
  833. * JavaScriptCore.pbproj/project.pbxproj:
  834. 2002-12-17 Darin Adler <darin@apple.com>
  835. Reviewed by Trey.
  836. * JavaScriptCore.pbproj/project.pbxproj: Removed signature.
  837. === Alexander-39 ===
  838. === Alexander-38 ===
  839. 2002-12-16 Darin Adler <darin@apple.com>
  840. Reviewed by Don and Maciej.
  841. - fixed 3129115 -- need Apple copyright added to open source documents
  842. * tons of files: Added our copyright to files we modified, and updated all to standard format.
  843. - other changes
  844. * JavaScriptCore.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2.
  845. Also removed completion.cpp.
  846. * kjs/completion.cpp: Removed.
  847. * kjs/completion.h: Made the Completion constructor inline.
  848. * kjs/grammar.y: Removed an obsolete "pretend ifdef". No need to put these in APPLE_CHANGES now.
  849. === Alexander-37 ===
  850. === JavaScriptCore-37u2 ===
  851. 2002-12-15 Maciej Stachowiak <mjs@apple.com>
  852. Reviewed by Darin.
  853. * JavaScriptCore.pbproj/project.pbxproj: Bump version to 37u2.
  854. 2002-12-14 Darin Adler <darin@apple.com>
  855. Reviewed by Maciej.
  856. * JavaScriptCore.pbproj/project.pbxproj: Make dtoa.h visible as an SPI so I can
  857. use it inside QString.
  858. 2002-12-14 Maciej Stachowiak <mjs@apple.com>
  859. Reviewed by Ken.
  860. - further corrections to number printing.
  861. * kjs/ustring.cpp:
  862. (UString::from): Make number printing match the ECMA standard
  863. algorithm.
  864. 2002-12-14 Maciej Stachowiak <mjs@apple.com>
  865. Reviewed by Dave.
  866. - fix toString() conversion for numbers less than 1. Negative
  867. exponents are still wrong though (things like 1E-34).
  868. * kjs/ustring.cpp:
  869. (UString::from): Don't print empty string for numbers less than 1,
  870. and remember to add extra 0s after the decimal for negative
  871. decimal positions.
  872. === Alexander-37u1 ===
  873. === Alexander-36 ===
  874. 2002-12-12 Maciej Stachowiak <mjs@apple.com>
  875. Reviewed by Darin.
  876. - fixed 3056449 - can't select state at tucows.com
  877. * kjs/array_instance.h:
  878. * kjs/array_object.cpp:
  879. (ArrayInstanceImp::propList): Add numeric proprties that are in
  880. special storage.
  881. * kjs/array_object.h:
  882. * kjs/object.h: Make propList a virtual method.
  883. 2002-12-11 Maciej Stachowiak <mjs@apple.com>
  884. Reviewed by Don.
  885. - Add kjsprint global function in Development build for ease of debugging.
  886. - Print uncaught JavaScript exceptions to the console in Development.
  887. - Improve wording of exception error messages.
  888. * kjs/function.cpp:
  889. (GlobalFuncImp::call):
  890. * kjs/function.h:
  891. * kjs/internal.cpp:
  892. (InterpreterImp::initGlobalObject):
  893. * kjs/interpreter.cpp:
  894. (Interpreter::evaluate):
  895. * kjs/nodes.cpp:
  896. (NewExprNode::evaluate):
  897. (FunctionCallNode::evaluate):
  898. (RelationalNode::evaluate):
  899. 2002-12-10 John Sullivan <sullivan@apple.com>
  900. Fixed more "Alexander"s that were lurking in places I forgot
  901. to look before.
  902. Reviewed by Darin
  903. * Makefile.am:
  904. "rm -rf $(SYMROOTS)/Safari.app/Frameworks/JavaScriptCore.framework"
  905. 2002-12-09 Darin Adler <darin@apple.com>
  906. Reviewed by Maciej.
  907. * JavaScriptCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
  908. * English.lproj/InfoPlist.strings: In here too.
  909. 2002-12-09 Maciej Stachowiak <mjs@apple.com>
  910. Reviewed by Ken.
  911. - fixed 3059637 - all articles missing at excite.com sports page
  912. - fixed 3065903 - most of content missing at excite.com news page
  913. These bugs both came up because a JavaScript function has a var
  914. declaration that collides with a function parameter name.
  915. * kjs/nodes.cpp:
  916. (VarDeclNode::processVarDecls): Don't set the property to
  917. undefined if a property with that name is already set on the
  918. global object. Otherwise we may clobber function parameters with
  919. undefined even before hitting a possible var initializer.
  920. 2002-12-06 Maciej Stachowiak <mjs@apple.com>
  921. Reviewed by: Darin Adler
  922. - made framework embedding work correctly with buildit
  923. * JavaScriptCore.pbproj/project.pbxproj: Give framework a relative
  924. install path, don't install it the normal way, and copy it
  925. manually to /AppleInternal/Library/Frameworks if installing.
  926. === Alexander-35 ===
  927. 2002-12-04 Maciej Stachowiak <mjs@apple.com>
  928. Reviewed by: Richard Williamson
  929. Added explicit lock/unlock methods so Sherlock can grab the
  930. interpreter lock as needed.
  931. - partially addressed 3084320 - JavaScriptCore crash
  932. * kjs/internal.cpp:
  933. (InterpreterImp::InterpreterImp):
  934. (InterpreterImp::lock):
  935. (InterpreterImp::unlock):
  936. * kjs/internal.h:
  937. * kjs/interpreter.cpp:
  938. (Interpreter::lock):
  939. (Interpreter::unlock):
  940. * kjs/interpreter.h:
  941. 2002-12-04 Maciej Stachowiak <mjs@apple.com>
  942. Reviewed by: Darin Adler
  943. Set things up so JavaScriptCore builds in PCRE and uses it for
  944. regular expressions. This fixes many form validation bugs:
  945. - fixed 3103197 - javascript at fidelity.com rejects valid input
  946. - fixed 2942552 - form validation at weather.com fails
  947. - fixed 3079752 - js always reports textarea is empty
  948. - fixed 3079719 - covad.com "check availalbility" fails
  949. * Makefile.am: Add pcre subdir.
  950. * kjs/config.h: define HAVE_PCREPOSIX to true.
  951. * kjs/regexp.h: Don't include pcreposix.h since nothing from there
  952. is used.
  953. * pcre/.cvsignore: Added.
  954. * pcre/ChangeLog: Removed.
  955. * pcre/INSTALL: Removed.
  956. * pcre/Makefile.am: Added.
  957. * pcre/Makefile.in: Removed.
  958. * pcre/NEWS: Removed.
  959. * pcre/NON-UNIX-USE: Removed.
  960. * pcre/README: Removed.
  961. * pcre/chartables.c: Added.
  962. * pcre/config.guess: Removed.
  963. * pcre/config.in: Removed.
  964. * pcre/config.sub: Removed.
  965. * pcre/configure: Removed.
  966. * pcre/configure.in: Removed.
  967. * pcre/dll.mk: Removed.
  968. * pcre/doc/Tech.Notes: Removed.
  969. * pcre/doc/pcre.3: Removed.
  970. * pcre/doc/pcre.html: Removed.
  971. * pcre/doc/pcre.txt: Removed.
  972. * pcre/doc/pcregrep.1: Removed.
  973. * pcre/doc/pcregrep.html: Removed.
  974. * pcre/doc/pcregrep.txt: Removed.
  975. * pcre/doc/pcreposix.3: Removed.
  976. * pcre/doc/pcreposix.html: Removed.
  977. * pcre/doc/pcreposix.txt: Removed.
  978. * pcre/doc/pcretest.1: Removed.
  979. * pcre/doc/pcretest.html: Removed.
  980. * pcre/doc/pcretest.txt: Removed.
  981. * pcre/doc/perltest.txt: Removed.
  982. * pcre/install-sh: Removed.
  983. * pcre/ltmain.sh: Removed.
  984. * pcre/pcre-config.h: Added.
  985. * pcre/pcre-config.in: Removed.
  986. * pcre/internal.h: Include pcre-config.h instead of config.h
  987. * pcre/pcre.c:
  988. (ord2utf8): Fix warnings.
  989. (pcre_compile): Fix warnings.
  990. * pcre/pcre.def: Removed.
  991. * pcre/pcre.h: Added.
  992. * pcre/pcre.in: Removed.
  993. * JavaScriptCore.pbproj/project.pbxproj: Added pcre files to build.
  994. * JavaScriptCorePrefix.h: Guard c++ headers with #ifdef __cplusplus.
  995. 2002-12-04 Maciej Stachowiak <mjs@apple.com>
  996. Reviewed by: Richard Williamson
  997. * pcre/doc/*: Added.
  998. * pcre/testdata/*: Added.
  999. 2002-12-03 Maciej Stachowiak <mjs@apple.com>
  1000. Reviewed by: Darin Adler
  1001. - imported PCRE 3.9 into the tree; this isn't actually compiled or
  1002. used yet.
  1003. * pcre/*: Added.
  1004. == Rolled over to ChangeLog-2002-12-03 ==