ChangeLog-2003-10-25 64.6 KB
Newer Older
mjs's avatar
mjs committed
1 2 3 4 5
2002-11-20  Maciej Stachowiak  <mjs@apple.com>

        * kjs/collector.cpp:
        (Collector::allocate): Clear the flags on newly allocated objects.

6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
2002-11-20  Darin Adler  <darin@apple.com>

	- oops, checked in big regression instead of 5% speedup

        * kjs/function.cpp: (ActivationImp::ActivationImp): Make a marking
	list, not a refing list.

	- a cut at the sparse array implementation

        * kjs/array_instance.h: Keep storageLength separate from length.
        * kjs/array_object.cpp:
        (ArrayInstanceImp::ArrayInstanceImp): Start with storageLength == length.
        (ArrayInstanceImp::get): Check against storage length.
        (ArrayInstanceImp::put): Ditto.
        (ArrayInstanceImp::hasProperty): Ditto.
        (ArrayInstanceImp::deleteProperty): Ditto.
        (ArrayInstanceImp::setLength): Only enlarge storage length up to a cutoff.
        (ArrayInstanceImp::mark): Use storageLength.
        (ArrayInstanceImp::pushUndefinedObjectsToEnd): Added FIXME.

26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
2002-11-20  Darin Adler  <darin@apple.com>

	- decrease ref/deref -- 5% speedup in iBench

        * JavaScriptCore.pbproj/project.pbxproj: Added array_instance.h
        * kjs/array_instance.h: Added so it can be shared by function.h.

        * kjs/array_object.cpp:
        * kjs/array_object.h:
        * kjs/bool_object.cpp:
        * kjs/bool_object.h:
        * kjs/collector.cpp:
        * kjs/date_object.cpp:
        * kjs/date_object.h:
        * kjs/error_object.cpp:
        * kjs/function.cpp:
        * kjs/function.h:
        * kjs/function_object.cpp:
        * kjs/internal.cpp:
        * kjs/internal.h:
        * kjs/math_object.cpp:
        * kjs/nodes.cpp:
        * kjs/number_object.cpp:
        * kjs/object.cpp:
        * kjs/object.h:
        * kjs/object_object.cpp:
        * kjs/property_map.cpp:
        * kjs/reference.cpp:
        * kjs/reference.h:
        * kjs/regexp_object.cpp:
        * kjs/string_object.cpp:
        * kjs/string_object.h:
        * kjs/value.cpp:
        * kjs/value.h:
	Switched lots of interfaces so they don't require ref/deref.

62 63 64 65 66 67 68 69 70 71 72
2002-11-20  Maciej Stachowiak  <mjs@apple.com>

	Fixed the two most obvious problems with the new GC for another 6%
	improvement.
	
        * kjs/collector.cpp:
        (Collector::allocate): Don't bother doing the bit tests on a bitmap word if
	all it's bits are on.
        (Collector::collect): Track memoryFull boolean.
        * kjs/collector.h: Inlined outOfMemory since it was showing up on profiles.

mjs's avatar
mjs committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
2002-11-20  Maciej Stachowiak  <mjs@apple.com>

	Rewrote garbage collector to make blocks of actual memory instead
	of blocks of pointers. 7% improvement on JavaScript
	iBench. There's still lots of room to tune the new GC, this is
	just my first cut.
	
        * kjs/collector.cpp:
        (Collector::allocate):
        (Collector::collect):
        (Collector::size):
        (Collector::outOfMemory):
        (Collector::finalCheck):
        (Collector::numGCNotAllowedObjects):
        (Collector::numReferencedObjects):
        (Collector::liveObjectClasses):
        * kjs/collector.h:
        * kjs/function.cpp:
        (ActivationImp::ActivationImp):
        * kjs/function.h:

94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
2002-11-20  Darin Adler  <darin@apple.com>

	- on the road to killing ActivationImp

        * kjs/function.h: Add get/put to FunctionImp. Remove argumentsObject() from
	ActivationImp. Add function() to ActivationImp.
        * kjs/function.cpp:
        (FunctionImp::FunctionImp): No arguments property.
        (FunctionImp::call): No need to set up the arguments property.
        (FunctionImp::parameterString): Remove ** strangeness.
        (FunctionImp::processParameters): Ditto.
        (FunctionImp::get): Added, handles arguments and length properties.
        (FunctionImp::put): Ditto.
        (FunctionImp::hasProperty): Ditto.
        (FunctionImp::deleteProperty): Ditto.
        (ActivationImp::ActivationImp): Store a function pointer so we can find it
	in the context.

        * kjs/function_object.cpp: (FunctionObjectImp::construct): No need to set up
	arguments property.
        * kjs/nodes.cpp: (FuncExprNode::evaluate): No need to set up length property.

        * kjs/internal.h: Return ObjectImp * for activation object.

        * kjs/interpreter.h: Remove stray declaration of ExecStateImp.

120 121 122 123 124 125 126 127 128 129 130 131
2002-11-20  Darin Adler  <darin@apple.com>

	- add a couple of list operations to avoid clearing lists so much during sorting; gives 1.5% iBench

        * kjs/types.h: Added replaceFirst/replaceLast.
        * kjs/types.cpp: (List::replaceFirst), (List::replaceLast): Added.

        * kjs/array_object.cpp: (compareWithCompareFunctionForQSort): Use replaceFirst/replaceLast.

        * kjs/property_map.cpp: Put in an ifdef so I can re-add/remove the single entry to see if
	it has outlived its usefulness. (It hasn't yet.)

132 133 134 135 136 137 138 139 140 141 142
2002-11-20  Darin Adler  <darin@apple.com>

	- atomic identifiers; gives another 6.5% in the iBench suite

        * kjs/identifier.h: Did the real thing.
        * kjs/identifier.cpp: Ditto.

        * kjs/property_map.h: _tableSizeHashMask -> _tableSizeMask
        * kjs/property_map.cpp: The above, plus take advantage of comparing
	by pointer instead of by comparing bytes.

143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
2002-11-19  Darin Adler  <darin@apple.com>

	- a few more globals for often-used property names
	- conversion to Identifier from UString must now be explicit

        * kjs/error_object.cpp:
        * kjs/function.cpp:
        * kjs/function_object.cpp:
        * kjs/identifier.cpp:
        * kjs/identifier.h:
        * kjs/lexer.cpp:
        * kjs/nodes.cpp:
        * kjs/number_object.cpp:
        * kjs/object.cpp:
        * kjs/object.h:
        * kjs/string_object.cpp:
        * kjs/testkjs.cpp:
        * kjs/ustring.cpp:
        * kjs/ustring.h:

163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
2002-11-19  Darin Adler  <darin@apple.com>

	- another step towards atomic identifiers; storing hash in the string rep. gives about
	a 1.5% speedup in the JavaScript iBench

        * kjs/ustring.h: Add a hash field to UString::Rep.
        * kjs/ustring.cpp:
        (UString::Rep::create): Set hash to uninitialized value.
        (UString::Rep::destroy): Do the deleting in her, and call Identifier if needed.
        (UString::Rep::computeHash): Added.
        (UString::append): Set hash to 0 when modifying the string in place.
        (UString::operator=): Ditto.

        * kjs/property_map.cpp: Use the hash from UString.

        * kjs/identifier.h: Added aboutToDestroyUStringRep.
        * kjs/identifier.cpp: (Identifier::aboutToDestroyUStringRep): Added.

darin's avatar
darin committed
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198
2002-11-19  Darin Adler  <darin@apple.com>

	- next step towards atomic identifiers; Identifier is no longer derived from UString

        * kjs/identifier.h: Remove base class and add _ustring member.
        * kjs/identifier.cpp: Add null and an == that works with const char *.
        * kjs/property_map.cpp: Get rep through _ustring.

        * kjs/function.cpp: (FunctionImp::parameterString): Call ustring().
        * kjs/function_object.cpp: (FunctionProtoFuncImp::call): Ditto.
        * kjs/nodes.cpp:
        (PropertyNode::evaluate): Ditto.
        (VarDeclNode::evaluate): Ditto.
        (ForInNode::execute): Ditto.
        * kjs/nodes2string.cpp: (SourceStream::operator<<): Add overload for Identifier.
        * kjs/reference.cpp: (Reference::getValue): Call ustring().
        * kjs/regexp_object.cpp: (RegExpObjectImp::get): Call ustring().

darin's avatar
darin committed
199 200 201 202 203 204
2002-11-19  Darin Adler  <darin@apple.com>

	- fixed memory trasher

        * kjs/ustring.cpp: (UString::from): Fix "end of buffer" computation.

darin's avatar
darin committed
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
2002-11-19  Darin Adler  <darin@apple.com>

	- a first step towards atomic identifiers in JavaScript

	Most places that work with identifiers now use Identifier
	instead of UString.

        * kjs/identifier.cpp: Added.
        * kjs/identifier.h: Added.
        * JavaScriptCore.pbproj/project.pbxproj: Added files.

        * kjs/array_object.cpp:
        * kjs/array_object.h:
        * kjs/completion.cpp:
        * kjs/completion.h:
        * kjs/date_object.cpp:
        * kjs/date_object.h:
        * kjs/function.cpp:
        * kjs/function.h:
        * kjs/function_object.cpp:
        * kjs/grammar.cpp:
        * kjs/grammar.cpp.h:
        * kjs/grammar.h:
        * kjs/grammar.y:
        * kjs/internal.cpp:
        * kjs/internal.h:
        * kjs/lexer.cpp:
        * kjs/lookup.cpp:
        * kjs/lookup.h:
        * kjs/math_object.cpp:
        * kjs/math_object.h:
        * kjs/nodes.cpp:
        * kjs/nodes.h:
        * kjs/number_object.cpp:
        * kjs/number_object.h:
        * kjs/object.cpp:
        * kjs/object.h:
        * kjs/property_map.cpp:
        * kjs/property_map.h:
        * kjs/reference.cpp:
        * kjs/reference.h:
        * kjs/regexp_object.cpp:
        * kjs/regexp_object.h:
        * kjs/string_object.cpp:
        * kjs/string_object.h:

251 252 253 254 255 256 257 258
2002-11-19  Darin Adler  <darin@apple.com>

	- fix hash function and key comparison for the other kind of hash table; yields 3%

        * kjs/lookup.cpp:
        (keysMatch): Added.
        (Lookup::findEntry): Don't allocate and convert to ASCII just to search.

259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
2002-11-19  Darin Adler  <darin@apple.com>

	- another hash table fix; yields a 2% improvement on iBench JavaScript

        * kjs/property_map.cpp: A few more places where we use & instead of %.

	- some List changes that don't affect speed yet

        * kjs/types.cpp:
        (List::prependList): Tighten up a tiny bit.
        (List::copy): Use prependList.
        * kjs/types.h: Remove appendList and globalClear.

        * kjs/interpreter.cpp: (Interpreter::finalCheck): Remove List::globalClear().

274 275 276 277 278 279
2002-11-19  Darin Adler  <darin@apple.com>

	- fixed 3105026 -- REGRESSION: DHTML menus are broken all over the place

        * kjs/types.cpp: (List::prepend): Fix backwards links in new node.

280 281 282 283 284 285
2002-11-19  Darin Adler  <darin@apple.com>

	- a fix that gives another 1.5% on the iBench JavaScript test

        * kjs/ustring.cpp: (UString::from): Stop using sprintf to format integers.

darin's avatar
darin committed
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
2002-11-18  Darin Adler  <darin@apple.com>

	- reduced the creation of Value objects and hoisted the property map
        into Object for another gain of about 6%

        * JavaScriptCore.pbproj/project.pbxproj: Made property_map.h public.
        * kjs/array_object.cpp:
        (compareWithCompareFunctionForQSort): Don't wrap the ValueImp * in a Value
	just to add it to a list.
        (ArrayProtoFuncImp::call): Pass the globalObject directly so we don't have
	to ref/deref.
        * kjs/function.cpp:
        (FunctionImp::call): Use a reference for the global object to avoid ref/deref.
        (GlobalFuncImp::call): Ditto.
        * kjs/internal.cpp:
        (BooleanImp::toObject): Put the object directly into the list, don't create a Value.
        (StringImp::toObject): Ditto.
        (NumberImp::toObject): Ditto.
        (InterpreterImp::evaluate): Use a reference for the global object.
        * kjs/internal.h: Return a reference for the global object.
        * kjs/interpreter.cpp: (Interpreter::globalObject): Ditto.
        * kjs/interpreter.h: Ditto.
        * kjs/object.cpp: Use _prop directly in the object, not a separate pointer.
        * kjs/object.h: Ditto.
        * kjs/types.cpp: Added List methods that work directly with ValueImp.
        (List::append): Added a ValueImp version.
        (List::prepend): Ditto.
        (List::appendList): Work directly with the ValueImp's.
        (List::prependList): Ditto.
        (List::copy): Use appendList.
        (List::empty): Use a shared global List.
        * kjs/types.h: Update for above changes.

319 320 321 322 323
2002-11-18  Darin Adler  <darin@apple.com>

        * kjs/property_map.cpp: Oops, copyright goes to Apple, not me.
        * kjs/property_map.h: Ditto.

324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349
2002-11-18  Darin Adler  <darin@apple.com>

	- property and string improvements giving a 7% or so improvement in JavaScript iBench

        * kjs/property_map.h: Rewrite to use a hash table.
        * kjs/property_map.cpp: Ditto.

        * kjs/string_object.h:
        * kjs/string_object.cpp:
        (StringInstanceImp::StringInstanceImp): Construct a string with the right value
	instead of putting the string in later.
        (StringInstanceImp::get): Get the length from the string, not a separate property.
        (StringInstanceImp::put): Ignore attempts to set length, since we don't put it in
	the property map.
        (StringInstanceImp::hasProperty): Return true for length.
        (StringInstanceImp::deleteProperty): Return false for length.
        (StringObjectImp::construct): Call new StringInstanceImp constructor. Don't try
	to set a length property.

        * kjs/ustring.h: Make the rep deref know how to deallocate the rep.
        * kjs/ustring.cpp:
        (UString::release): Move the real work to the rep's deref, since the hash table
	now uses the rep directly.

        * kjs/object.h: Remove unused field.

350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390
2002-11-18  Maciej Stachowiak  <mjs@apple.com>

	Change List to completely avoid going through the GC
	allocator. 3.6% performance improvement on JavaScript iBench.
	
        * kjs/internal.cpp:
        (InterpreterImp::mark): Don't mark the empty list.

	For all the methods below I basically lifted the ListImp version
	up to the List method with minor tweaks.
	
        * kjs/types.cpp:
        (ListIterator::ListIterator):
        (List::List):
        (List::operator=):
        (List::~List):
        (List::mark):
        (List::append):
        (List::prepend):
        (List::appendList):
        (List::prependList):
        (List::removeFirst):
        (List::removeLast):
        (List::remove):
        (List::clear):
        (List::clearInternal):
        (List::copy):
        (List::begin):
        (List::end):
        (List::isEmpty):
        (List::size):
        (List::at):
        (List::operator[]):
        (List::empty):
        (List::erase):
        (List::refAll):
        (List::derefAll):
        (List::swap):
        (List::globalClear):
        * kjs/types.h:

391 392 393 394 395 396 397 398
2002-11-18  Maciej Stachowiak  <mjs@apple.com>

	Fixed a horrible leak introduced with my last change that
	somehow did not show up on my machine.

        * kjs/types.cpp:
        (List::List): Mark ListImp as GC allowed.

399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425
2002-11-18  Maciej Stachowiak  <mjs@apple.com>

	Another step towards the List conversion: stop inheriting from Value.
	
        * kjs/types.cpp:
        (ListIterator::ListIterator):
        (List::List):
        (List::operator=):
        (List::~List):
        (List::mark):
        (List::append):
        (List::prepend):
        (List::appendList):
        (List::prependList):
        (List::removeFirst):
        (List::removeLast):
        (List::remove):
        (List::clear):
        (List::copy):
        (List::begin):
        (List::end):
        (List::isEmpty):
        (List::size):
        (List::at):
        (List::operator[]):
        * kjs/types.h:

mjs's avatar
mjs committed
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446
2002-11-18  Maciej Stachowiak  <mjs@apple.com>

	Partway to removing Value from List. Created a marking List
	variant, used it in place of ListImp.
	
        * kjs/internal.h: Removed List stuff.
        * kjs/internal.cpp:
        (InterpreterImp::mark): Call appropriate List method to do marking of
	empty ListImp.
        * kjs/object.h:
        * kjs/object.cpp: Use marking List instead of ListImp *.
        * kjs/types.h:
        * kjs/types.cpp:
        (List::List): New boolean needsMarking parameter. 
        (List::operator=): Perform trickery related to needsMarking.
        (List::~List): Likewise.
        (List::mark): Mark the ListImp.
        (List::markEmptyList):
	(ListImp::*): Moved here fron internal.cpp, they will be
	integrated into the relevant List methods soon.

447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475
2002-11-18  Darin Adler  <darin@apple.com>

	- another string constant discovered that can be optimized

        * kjs/object.h: Add a property name constant for "__proto__".
        * kjs/object.cpp: Define it.
	(ObjectImp::get): Use it.
	(ObjectImp::hasProperty): Use it.

	- prepare to turn PropertyMap into a hash table

        * kjs/object.cpp:
	(ObjectImp::mark): Use the new PropertyMap::mark().
	(ObjectImp::put): Use the new overload of PropertyMap::get().
	(ObjectImp::deleteProperty): Use the new overload of PropertyMap::get().
	(ObjectImp::propList): Use PropertyMap::addEnumerablesToReferenceList().

        * kjs/property_map.h: Remove PropertyMapNode and make all node-related methods private.
	Add mark(), a new overload of get() that returns attributes, a clear() that takes no attributes,
	and addEnumerablesToReferenceList().
        * kjs/property_map.cpp:
	(PropertyMap::get): Added new overload.
	(PropertyMap::clear): Added new overload.
	(PropertyMap::mark): Added.
	(PropertyMap::addEnumerablesToReferenceList): Added.

        * kjs/ustring.h: Added a hash function.
        * kjs/ustring.cpp: (KJS::hash): Added.

476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492
2002-11-18  Darin Adler  <darin@apple.com>

	- simplified the ExecState class, which was showing up in profiles
        
        Sped up JavaScript iBench by 6%.

        * kjs/interpreter.h: Removed the level of indirection, and made it all inline.
        * kjs/interpreter.cpp: Removed ExecState implementation from here altogether.

	- fixed an oversight in my sort speedup

        * kjs/array_object.h: Add pushUndefinedObjectsToEnd.
        * kjs/array_object.cpp:
        (ArrayInstanceImp::sort): Call pushUndefinedObjectsToEnd.
        (ArrayInstanceImp::pushUndefinedObjectsToEnd): Added.
	Pushes all undefined to the end of the array.

493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517
2002-11-18  Darin Adler  <darin@apple.com>

	- fix worst speed problems on the sort page of the iBench JavaScript test

	Sped up JavaScript iBench by 70%, the sort page by 88%.

        * kjs/array_object.h: Add array-specific sort functions.
        * kjs/array_object.cpp:
        (compareByStringForQSort): Added.
        (ArrayInstanceImp::sort): Added.
        (compareWithCompareFunctionForQSort): Added.
        (ArrayProtoFuncImp::call): Use ArrayInstanceImp::sort if the object being
	sorted is actually an array.

        * kjs/object.h: Add argumentsPropertyName.
        * kjs/object.cpp: Add argumentsPropertyName.
        * kjs/function.cpp:
        (FunctionImp::FunctionImp): Use argumentsPropertyName to avoid making a UString.
        (FunctionImp::call): Ditto.
        (ActivationImp::ActivationImp): Ditto.
        * kjs/function_object.cpp: (FunctionObjectImp::construct): Ditto.

        * kjs/ustring.h: Added compare function for -1/0/+1 comparison.
        * kjs/ustring.cpp: (KJS::compare): Added.

518 519 520 521 522 523 524 525 526 527 528 529 530
2002-11-18  Maciej Stachowiak  <mjs@apple.com>

	Change ArgumentListNode operations to be iterative instead of
	recursive. This probably fixes 3095446 (Crash in
	KJS::ArgumentListNode::ref()) but I can't reproduce it myself so
	I'm not 100% sure. I think the original bug was a stack overflow
	and this change would remove that possibility.
	
        * kjs/nodes.cpp:
        (ArgumentListNode::ref): Make iterative.
        (ArgumentListNode::deref): Make iterative.
        (ArgumentListNode::evaluateList): Make iterative.

sheridan's avatar
sheridan committed
531 532
=== Alexander-32 ===

533 534 535 536 537 538 539 540
2002-11-14  Darin Adler  <darin@apple.com>

	- fixed 3101243 -- excite passes date that can't be parsed, results in bogus date at top right corner

        * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Handle errors from strtol
	by checking errno. Check the "string in a haystack" to be sure it's a multiple
	of 3. Add case that allows year to be after time.

541 542 543 544 545 546 547 548 549 550 551 552 553 554
2002-11-14  Darin Adler  <darin@apple.com>

	- fixed 3101191 -- REGRESSION: Hang loading excite.com

        * kjs/date_object.cpp:
        (mktimeUsingCF): Pick an arbitrary cutoff of 3000, and return -1 if the
	year passed in is that big so we don't infinite loop. Also validate the
	rest of the date with CFGregorianDateIsValid. 
        (DateProtoFuncImp::call): Handle a -1 result from mktime.
        (DateObjectImp::construct): Check for NaN before calling mktime, and also
	handle a -1 result from mktime.
        (DateObjectFuncImp::call): Check for NaN before calling mktime, and also
	handle a -1 result from mktime.

555 556 557 558 559 560 561 562 563 564 565 566
2002-11-13  Darin Adler  <darin@apple.com>

	- fixed 3099930 -- dates/times without time zones are parsed as UTC by kjs,
	local time by other browsers

        * kjs/date_object.cpp:
        (DateProtoFuncImp::call): Handle the NaN case better, like Mozilla and OmniWeb.
        (DateObjectFuncImp::call): Return NaN rather than Undefined() for bad dates.
        (KJS::parseDate): Return NaN rather than Undefined() or 0 for bad dates.
        (KJS::KRFCDate_parseDate): Return -1 rather than 0 for bad dates.
	Assume local time if no time zone is passed. Don't return 1 if we parse 0.

567 568 569 570 571 572 573 574 575 576 577 578
2002-11-13  Darin Adler  <darin@apple.com>

        - fixed 3073230 -- JavaScript time calls do I/O by lstat()ing /etc/localtime

        * kjs/date_object.cpp:
        (formatDate): Added.
        (formatTime): Added.
        (formatLocaleDate): Added.
        (formatLocaleTime): Added.
        (DateProtoFuncImp::call): Changed to use the above functions instead of
	using strftime.

darin's avatar
darin committed
579 580 581 582 583 584
2002-11-08  Darin Adler  <darin@apple.com>

        * kjs/date_object.cpp:
        (ctimeUsingCF): Added.
        (timeUsingCF): Added.

585 586 587 588
2002-11-07  Darin Adler  <darin@apple.com>

        * kjs/date_object.cpp: (mktimeUsingCF): Fix storage leak.

589 590 591 592 593 594 595 596
2002-11-07  Maciej Stachowiak  <mjs@apple.com>

	- partial fix to 3073230 - JavaScript time calls do I/O by
	lastat()ing /etc/localtime
	
        * kjs/date_object.cpp:
        (mktimeUsingCF): Implementation of mktime using CF.

sheridan's avatar
sheridan committed
597 598
=== Alexander-31 ===

darin's avatar
darin committed
599 600 601 602 603
2002-11-01  Darin Adler  <darin@apple.com>

        * kjs/object.cpp: Make the same change Maciej just did, but to the
	other constructor right next to the one he changed.

604 605 606 607 608 609 610
2002-10-31  Maciej Stachowiak  <mjs@apple.com>

	- fixed 3082660 - REGRESSION: one ListImp leaks opening/closing nearly empty web page
	
        * kjs/object.cpp: Set gc allowed on freshly created ListImp, since
	there is no List wrapper for it.

611 612 613 614 615 616
2002-10-31  Darin Adler  <darin@apple.com>

        * kjs/grammar.y: Fix the APPLE_CHANGES thing here too.
        * kjs/grammar.cpp: Regenerated this file.

=== Alexander-30 ===
sheridan's avatar
sheridan committed
617

618 619 620 621 622 623 624 625 626 627 628 629
2002-10-30  Darin Adler  <darin@apple.com>

	- fixed 3073230 -- Alex is doing file I/O when executing JavaScript by asking for localtime

	I fixed this by using Core Foundation time functions instead.

        * kjs/date_object.cpp:
        (tmUsingCF): Function that uses Core Foundation to get the time and then puts it into
	a tm struct.
        (gmtimeUsingCF): Function used instead of gmtime (used a macro to make the substitution).
        (localtimeUsingCF): Function used instead of localtime (used a macro to make the substitution).

630 631 632 633 634 635 636 637 638 639 640 641
2002-10-26  Darin Adler  <darin@apple.com>

	- changed to use #if APPLE_CHANGES and #if !APPLE_CHANGES consistently

	We no longer do #ifdef APPLE_CHANGES or #ifndef APPLE_CHANGES.

        * kjs/collector.cpp:
        * kjs/collector.h:
        * kjs/grammar.cpp:
        * kjs/internal.cpp:
        * kjs/ustring.h:

642 643 644 645 646 647 648 649 650 651
2002-10-25  Darin Adler  <darin@apple.com>

	- fixed 3038011 -- drop-down menu hierarchy broken at yahoo new acct page

        * kjs/array_object.cpp: (ArrayProtoFuncImp::call):
	Fix bug calling concat on an empty array. The old code tried to
	optimize in a way that would prevent appending any arrays until
	at least one element was in the destination array. So if you were
	concatenating a non-empty array into an empty array, you got an empty array.

sheridan's avatar
sheridan committed
652 653
=== Alexander-29 ===

sheridan's avatar
Alex-28  
sheridan committed
654 655
=== Alexander-28 ===

656 657 658 659 660 661 662 663 664 665 666 667 668
2002-10-10  Darin Adler  <darin@apple.com>

	- fixed 3072643 -- infinite loop in JavaScript code at walgreens.com

	The problem is that "xxx".indexOf("", 1) needs to return 1, but we
	were returning 0.

        * kjs/ustring.cpp:
        (UString::find): Return pos, not 0, when the search string is empty.
        (UString::rfind): Make sure that pos is not past the end of the string,
	taking into account the search string; fixes a potential read off the end
	of the buffer. Also return pos, not 0, when the search string is empty.

sheridan's avatar
sheridan committed
669 670
=== Alexander-27 ===

671 672 673 674 675 676 677 678 679
2002-10-07  Darin Adler  <darin@apple.com>

	Fixed absurdly high memory usage when looking at pages that use a lot of JavaScript.

        * kjs/collector.cpp:
        (Collector::allocate): Implement a new policy of doing a garbage collect every 1000
	allocations. The old policy was both complicated and misguided.
        (Collector::collect): Zero out the "number of allocations since last collect".

680 681 682 683 684 685 686 687 688 689
2002-10-06  Darin Adler  <darin@apple.com>

	I noticed some broken lists at mapblast.com and tracked it down to this.

        * kjs/array_object.cpp:
        (ArrayInstanceImp::put): Don't truncate the list; only extend the length if
	it's not already long enough.
        (ArrayProtoFuncImp::call): Fix some ifdef'd code so it compiles if you turn
	the ifdefs on.

690 691
2002-10-04  Darin Adler  <darin@apple.com>

692 693
        Fixed problems parsing numbers that are larger than a long with parseInt.

694 695 696 697
        * kjs/config.h: Define HAVE_FUNC_STRTOLL.
        * kjs/function.cpp: (GlobalFuncImp::call):
	Change parseInt to use strtoll if available.

sheridan's avatar
sheridan committed
698 699
=== Alexander-26 ===

700 701 702 703 704 705 706
2002-09-27  Darin Adler  <darin@apple.com>

	- fixed 3033969 -- repro crash (infinite recursion in JavaScript)
	clicking on "screens" option at fsv.sf.net

        * kjs/object.h: Change recursion limit to 100 levels rather than 1000.

sheridan's avatar
sheridan committed
707 708
=== Alexander-25 ===

709 710 711 712 713 714 715 716 717 718 719 720
2002-09-26  Darin Adler  <darin@apple.com>

	Fix the infinity problem Dave worked around. We didn't have the
	configuration flags set right to make infinity work. Setting those
	properly made everything work without changes to min and max.

        * kjs/config.h: Define HAVE_FUNC_ISINF, HAVE_STRING_H, and
	also WORDS_BIGENDIAN (if on ppc).

        * kjs/math_object.cpp: (MathFuncImp::call): Roll out min and max
	changes from yesterday.

721 722 723 724 725 726 727 728 729 730
2002-09-25  David Hyatt  <hyatt@apple.com>

	Fix the impls of min/max to not use +inf/-inf when you have
	arguments.  Technically there's still a bug here for the no
	argument case, probably caused by a screwup when +inf/-inf are
	converted to doubles.
	
        * kjs/math_object.cpp:
        (MathFuncImp::call):

731 732 733 734 735 736 737
2002-09-25  Darin Adler  <darin@apple.com>

	- fixed 3057964 -- JS problem performing MD5 script embedded in yahoo login page

        * kjs/simple_number.h: Fix incorrect check for sign bit that was munging numbers
	in the range 0x10000000 to 0x1FFFFFFF.

sheridan's avatar
sheridan committed
738 739
=== Alexander-24 ===

sheridan's avatar
sheridan committed
740 741
=== Alexander-22 ===

742 743 744 745 746 747 748
2002-09-05  Maciej Stachowiak  <mjs@apple.com>

	First baby step towards moving List away from garbage collection.
	
        * kjs/types.h: Add needsMarking boolean and make List inherit from
	Value privately instead of publicly.

darin's avatar
darin committed
749 750 751 752 753
2002-08-30  Darin Adler  <darin@apple.com>

        * JavaScriptCore.pbproj/project.pbxproj: Allowed the new Project Builder to put in
	encodings for each file.

sheridan's avatar
sheridan committed
754 755
=== Alexander-21 ===

vicki's avatar
 
vicki committed
756 757
=== Alexander-20 ===

758 759 760 761 762 763 764 765 766 767 768 769 770 771
2002-08-20  Darin Adler  <darin@apple.com>

	Three small changes to things that showed up in the sample.

	5% speed increase on cvs-js-performance test.
	
        * kjs/simple_number.h: Check if double is an integer with d == (double)(int)d
	instead of remainder(d, 1) == 0, saving a function call each time.

        * kjs/ustring.cpp:
        (UString::find): Compare the first character before calling memcmp for the rest.
        (UString::rfind): Ditto.
        (KJS::operator==): Don't do a strlen before starting to compare the characters.

772 773 774
2002-08-20  Maciej Stachowiak  <mjs@apple.com>

        * kjs/object.cpp: Don't reference other ValueImps in the
darin's avatar
darin committed
775
	destructor, they may have already been destroyed, and will have
776
	GC_ALLOWED set already in any case.
darin's avatar
darin committed
777

778 779 780 781 782 783 784 785 786 787
2002-08-19  Maciej Stachowiak  <mjs@apple.com>

	Fixed the bug that made sony.com menus come out wrong and made
	aa.com crash (Radar 3027762).
	
	Mode most methods inline.
	
        * kjs/completion.cpp:
        * kjs/completion.h:

788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805
2002-08-19  Maciej Stachowiak  <mjs@apple.com>

	Maintain stack of old "arguments" property values for functions
	implicitly on the system stack instead of explicitly in the
	FunctionImp. This eliminates only a trivial number of GC
	allocations (less than 200) but eliminates one of the two cases
	where a ListImp * is stored directly, paving the way to separate
	List from Value.
	
        * kjs/function.h: Remove argStack, pushArgs and popArgs.
        * kjs/function.cpp:
        (FunctionImp::FunctionImp): Don't initalize argStack.
        (FunctionImp::~FunctionImp): Remove comment about argStack.
        (FunctionImp::mark): Don't mark the argStack.
        (FunctionImp::call): Save old "arguments" property in a Value,
	where it will be GC-protected, rather than keeping a list, and
	restore the old value when done executing.

806 807 808 809 810
2002-08-18  Darin Adler  <darin@apple.com>

        * kjs/internal.cpp: (KJS::printInfo): Remove one more CompletionType
	that Maciej missed.

811 812 813 814 815 816 817 818
2002-08-18  Maciej Stachowiak  <mjs@apple.com>

	Remove stray references to CompletionType and CompletionImp.
	
        * kjs/completion.h:
        * kjs/object.cpp:
        * kjs/value.h:

819 820 821 822 823 824
2002-08-18  Maciej Stachowiak  <mjs@apple.com>

	Separated Completion from Value and made it a pure stack
	object. This removed another 160,000 of the remaining 580,000
	garbage collected object allocations.

825
	6% speed increase on cvs-js-performance test.
826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843
	
        * kjs/completion.cpp: Added. New implementation that doesn't
	require a ValueImp *.
        (Completion::Completion):
        (Completion::complType):
        (Completion::value):
        (Completion::target):
        (Completion::isValueCompletion):
        * kjs/completion.h: Added.
        * kjs/function.cpp:
	(GlobalFuncImp::call): Removed some (apparently mistaken) uses of
	Completion as a Value.
        * kjs/internal.cpp:
        * kjs/internal.h:
        * kjs/types.cpp: Removed Completion stuff.
        * kjs/types.h: Removed Completion stuff.
        * JavaScriptCore.pbproj/project.pbxproj: Added new header.

darin's avatar
darin committed
844 845 846 847 848 849 850 851 852
2002-08-16  Darin Adler  <darin@apple.com>

	Fix the Development build.

        * kjs/object.cpp: Take out a use of ReferenceType.

        * kjs/ustring.h: Added a bit more inlining.
        * kjs/ustring.cpp: Moved the function out of here.

853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883
2002-08-16  Maciej Stachowiak  <mjs@apple.com>

	Final step of the Reference change. Completely separate Reference
	from Value, and eliminate ReferenceImp.

	18% speedup on cvs-js-performance test.

        * kjs/internal.cpp, kjs/internal.h: Remove ReferenceImp.
        * kjs/nodes.cpp:
        (Node::evaluateReference): Use Reference::makeValueReference(),
	not ConstReference.
        * kjs/reference.cpp:
        (Reference::Reference): New implementation, handles both regular
	and value references.
        (Reference::makeValueReference): Incorporate functionality of ConstReference
	into this class.
        (Reference::getBase): New implementation (incorporates error vase
	for value references).
	(Reference::getPropertyName): New implementation (incorporates error case
	for value references).
        (Reference::putValue): New implementation (incorporates error case
	for value references).
        (Reference::deleteValue): New implementation (incorporates error case
	for value references).
        (Reference::getValue): New implementation (incorporates special case
	for value references).
        (Reference::isMutable): New implementation.
	* kjs/reference.h: New implementation that merges ReferenceImp
	into the stack object.
        * kjs/value.h, kjs/value.cpp: Removed all reference-related method.

884 885 886 887 888 889 890 891
2002-08-16  Darin Adler  <darin@apple.com>

	- fixed 3026184 -- Hang going to http://aa.com/ while executing JavaScript

        * kjs/simple_number.h: (SimpleNumber::value): Fixed conversion to a negative
	number. The technique of using division was no good. Instead, or in the sign
	bits as needed.

892 893 894 895 896
2002-08-16  Maciej Stachowiak  <mjs@apple.com>

        * kjs/reference_list.h: Must include headers with "", not
	<>. D'oh!

897 898 899 900 901
2002-08-16  Maciej Stachowiak  <mjs@apple.com>

        * JavaScriptCore.pbproj/project.pbxproj: Install reference.h and
	reference_list.h so WebCore compiles (duh).

902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923
2002-08-16  Maciej Stachowiak  <mjs@apple.com>

        * JavaScriptCore.pbproj/project.pbxproj:
        * kjs/internal.cpp:
        * kjs/internal.h:
        * kjs/nodes.cpp:
        (Node::evaluateReference):
        * kjs/reference.cpp:
        (Reference::Reference):
        (Reference::makeValueReference):
        (Reference::getBase):
        (Reference::getPropertyName):
        (Reference::getValue):
        (Reference::putValue):
        (Reference::deleteValue):
        (Reference::isMutable):
        * kjs/reference.h:
        * kjs/reference_list.h:
        * kjs/value.cpp:
        (ValueImp::dispatchToUInt32):
        * kjs/value.h:

924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957
2002-08-16  Maciej Stachowiak  <mjs@apple.com>

	Next step: reimplement ReferenceList from scratch, and store it as
	an actual Reference object, so ReferenceList no longer depends on
	Reference being a Value or having a ReferenceImp. A resizing
	vector might be even better the way this is used.

	Also moved Reference to its own header and implementation file in
	preparation for reimplementing it.
	
        * JavaScriptCore.pbproj/project.pbxproj:
        * kjs/nodes.cpp:
        (ForInNode::execute):
        * kjs/reference.cpp: Added.
        (Reference::Reference):
        (Reference::dynamicCast):
        (ConstReference::ConstReference):
        * kjs/reference.h: Added.
        * kjs/reference_list.cpp: Added.
        (ReferenceList::ReferenceList):
        (ReferenceList::operator=):
        (ReferenceList::swap):
        (ReferenceList::append):
        (ReferenceList::~ReferenceList):
        (ReferenceList::begin):
        (ReferenceList::end):
        (ReferenceListIterator::ReferenceListIterator):
        (ReferenceListIterator::operator!=):
        (ReferenceListIterator::operator->):
        (ReferenceListIterator::operator++):
        * kjs/reference_list.h:
        * kjs/types.cpp:
        * kjs/types.h:

958 959 960 961 962 963 964 965 966 967
2002-08-16  Maciej Stachowiak  <mjs@apple.com>

	Fix Development build - some NDEBUG code had to be changed for the
	Value/Reference split.
	
        * kjs/internal.cpp:
        (KJS::printInfo):
        * kjs/nodes.cpp:
        (FunctionCallNode::evaluate):

968 969 970 971
2002-08-16  Maciej Stachowiak  <mjs@apple.com>

        * kjs/reference_list.h: Added file I forgot to check in last time.

972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040
2002-08-15  Maciej Stachowiak  <mjs@apple.com>

	Phase 1 of optimization to stop allocating references through the
	collector. This step clearly splits evaluating to a reference and
	evaluating to a value, and moves all of the reference-specific
	operations from Value to Reference. A special ConstReference class
	helps out for the one case where you need special reference
	operations if the result is a reference, and not otherwise.

	Also, Reference now inherits privately from Value, and there is a
	new ReferenceList class that inherits privately from List, so the
	uses of Reference and Value are now completely orthogonal. This
	means that as the next step, their implementations can be
	completely disentangled.
	
	This step has no actual performance impact.
	
        * kjs/collector.cpp:
        (Collector::collect):
        * kjs/nodes.cpp:
        (Node::evaluateReference):
        (ResolveNode::evaluate):
        (ResolveNode::evaluateReference):
        (ElementNode::evaluate):
        (PropertyValueNode::evaluate):
        (AccessorNode1::evaluate):
        (AccessorNode1::evaluateReference):
        (AccessorNode2::evaluate):
        (AccessorNode2::evaluateReference):
        (ArgumentListNode::evaluateList):
        (NewExprNode::evaluate):
        (FunctionCallNode::evaluate):
        (PostfixNode::evaluate):
        (DeleteNode::evaluate):
        (VoidNode::evaluate):
        (TypeOfNode::evaluate):
        (PrefixNode::evaluate):
        (UnaryPlusNode::evaluate):
        (NegateNode::evaluate):
        (BitwiseNotNode::evaluate):
        (LogicalNotNode::evaluate):
        (MultNode::evaluate):
        (AddNode::evaluate):
        (ShiftNode::evaluate):
        (RelationalNode::evaluate):
        (EqualNode::evaluate):
        (BitOperNode::evaluate):
        (BinaryLogicalNode::evaluate):
        (ConditionalNode::evaluate):
        (AssignNode::evaluate):
        (CommaNode::evaluate):
        (VarDeclNode::evaluate):
        (ExprStatementNode::execute):
        (IfNode::execute):
        (DoWhileNode::execute):
        (WhileNode::execute):
        (ForNode::execute):
        (ForInNode::execute):
        (ReturnNode::execute):
        (WithNode::execute):
        (CaseClauseNode::evaluate):
        (SwitchNode::execute):
        (ThrowNode::execute):
        * kjs/nodes.h:
        * kjs/types.cpp:
        (ConstReference::ConstReference):
        * kjs/types.h:
        * kjs/value.h:

1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072
2002-08-15  Darin Adler  <darin@apple.com>

	Tweaks and small bug fixes to Maciej's excellent new fixnum optimization.
	Also updated or removed comments that call it "fixnum" instead of "simple number".

        * kjs/simple_number.h: Change constant names so they don't SHOUT the way macro
	names do. Added constants for shift, min, and max. Fixed off-by-1 error that
	prevented us from using the extreme values on either end. Base the range of
	numbers on a fixed 32 bits constant rather than the size of a long, because
	code elsewhere depends on positive numbers fitting into both "unsigned" and
	"UInt32" while assuming it doesn't need to check; we can easily change this
	later. Used int types rather than long for essentially the same reason.
	Fixed the value-extraction function so it will work for negative numbers even
        if the shift is logical, not arithmetic, by using division instead.
	Renamed functions to be quite terse since they are inside a class.

        * kjs/value.h:
        * kjs/value.cpp:
        (ValueImp::dispatchToObject): Call NumberImp::toObject in a "non-virtual"
	way rather than repeating the code here.
        (ValueImp::dispatchToUInt32): Handle the negative number case correctly.
        (ValueImp::dispatchGetBase): Call ValueImp::getBase in a "non-virtual"
	way rather than repeating the code here.
        (ValueImp::dispatchGetPropertyName): Call ValueImp::getPropertyName in a
	"non-virtual" way rather than repeating the code here.
        (ValueImp::dispatchPutValue): Call ValueImp::putValue in a "non-virtual"
	way rather than repeating the code here.
        (ValueImp::dispatchDeleteValue): Call ValueImp::deleteValue in a "non-virtual"
	way rather than repeating the code here.
        (Number::Number): Fixed a bug where the double-based constructor was casting
	to long, so wouldn't do the "remainder" check.

sheridan's avatar
sheridan committed
1073 1074
=== Alexander-19 ===

sheridan's avatar
sheridan committed
1075 1076
=== Alexander-18 ===

1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123
2002-08-15  Maciej Stachowiak  <mjs@apple.com>

	Phase 2 of fixnum optimization. Store any integral number that
	will fit in two bits less than a long inside the ValueImp *
	itself, thus avoiding the need to deal with the garbage collector
	at all for these types. Such numbers comprised .5 million of the
	1.7 million ValueImps created during the cvs-js-performance test,
	so traffic through the garbage collector should be

	20% improvement on cvs-js-performance. This may also show up on
	cvs-base, but I did not compare and I am too lazy to make clean in
	WebCore yet again. 

	This also significantly reduces memory footprint on
	JavaScript-heavy pages. Size after going through
	cvs-js-performance suite is now 22MB to 17.5MB.
	
        * JavaScriptCore.pbproj/project.pbxproj:
        * kjs/simple_number.h: Added. Some inline static methods for handling
	simple numbers that are stored in the pointer.
        * kjs/ustring.h:
        * kjs/ustring.cpp:
        (UString::from): Added new overload for long.
        * kjs/value.cpp:
        (ValueImp::marked): Add special case for simple numbers.
        (ValueImp::setGcAllowed): Likewise.
	(ValueImp::toInteger): Call dispatch version of
	toUInt32(unsigned&), not the real method.
        (ValueImp::toInt32): Likewise.
        (ValueImp::toUInt32): Likewise.
        (ValueImp::toUInt16): Likewise.
        (ValueImp::dispatchType): Add special case for simple numbers.
        (ValueImp::dispatchToPrimitive): Likewise.
        (ValueImp::dispatchToBoolean): Likewise.
        (ValueImp::dispatchToNumber): Likewise.
        (ValueImp::dispatchToString): Likewise.
        (ValueImp::dispatchToObject): Likewise.
        (ValueImp::dispatchToUInt32): Likewise.
        (ValueImp::dispatchGetBase): Likewise.
        (ValueImp::dispatchGetPropertyName): Likewise.
        (ValueImp::dispatchPutValue): Likewise.
        (ValueImp::dispatchDeleteValue): Likewise.
        (Number::Number): Create a simple number instead of a full-blown
	ValueImp when possible.
        (Number::value): Likewise.
        * kjs/value.h:

1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163
2002-08-15  Maciej Stachowiak  <mjs@apple.com>

	Phase one of the "fixnum" optimization (storing small enough
	integers in the pointer). This just paves the way for the change
	by making all the virtual functions of ValueImp private and adding
	non-virtual dispatchers which can call the virtual function or
	handle fixnums specially.

	Also, I marked every place that should need a special case with a
	FIXNUM comment.
	
        * kjs/bool_object.cpp:
        (BooleanObjectImp::construct): Call dispatch method not the real method.
        * kjs/internal.h: Make toUInt32 private to make sure no one calls it directly
	on a NumberImp*.
        * kjs/nodes.cpp:
        (ForInNode::execute): Call dispatch method not the real method.
        * kjs/object.cpp:
	(ObjectImp::propList): Call dispatch method not the real method.
        * kjs/object.h:
        * kjs/string_object.cpp:
        (StringProtoFuncImp::call): Call dispatch method not the real method.
        (StringObjectImp::construct): Call dispatch method not the real method.
        * kjs/value.h:
        * kjs/value.cpp:
        (ValueImp::marked): Put a comment about required FIXNUM change.
        (ValueImp::setGcAllowed): Likewise.
        (ValueImp::dispatchType): Just call the virtual method for now.
        (ValueImp::dispatchToPrimitive): Likewise.
        (ValueImp::dispatchToBoolean): Likewise.
        (ValueImp::dispatchToNumber): Likewise.
        (ValueImp::dispatchToString): Likewise.
        (ValueImp::dispatchToObject): Likewise.
        (ValueImp::dispatchToUInt32): Likewise.
        (ValueImp::dispatchGetBase): Likewise.
        (ValueImp::dispatchGetPropertyName): Likewise.
        (ValueImp::dispatchGetValue): Likewise.
        (ValueImp::dispatchPutValue): Likewise.
        (ValueImp::dispatchDeleteValue): Likewise.

1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174
2002-08-14  Darin Adler  <darin@apple.com>

	Another pass of tweaks, including one bug fix.

        * kjs/array_object.cpp:
        (ArrayInstanceImp::ArrayInstanceImp): Use malloc, not new.
        (ArrayInstanceImp::get): Use a local variable so we don't rely on the optimizer
	to avoid indexing twice.
        (ArrayInstanceImp::hasProperty): Use a local variable, and also check against
	UndefinedImp::staticUndefined rather than doing type() != UndefinedType.

1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189
2002-08-14  Maciej Stachowiak  <mjs@apple.com>

        Simplified array handling by using NULL to represent empty cells
	instead of the Undefined object, so we can use calloc, realloc and
	memset instead of loops. Inspired by a suggestion of Darin's.

	* kjs/array_object.cpp:
        (ArrayInstanceImp::ArrayInstanceImp):
        (ArrayInstanceImp::~ArrayInstanceImp):
        (ArrayInstanceImp::get):
        (ArrayInstanceImp::hasProperty):
        (ArrayInstanceImp::deleteProperty):
        (ArrayInstanceImp::setLength):
        (ArrayInstanceImp::mark):

1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209
2002-08-14  Maciej Stachowiak  <mjs@apple.com>

        Fix major JavaScript memory leak. run-plt says cvs-base improved
	by 2% and cvs-js-performance improved by 7%. However, this was
	within the possible noise level in each case.
        
	The fix was to store ValueImp *'s in the array instead of Value
	objects, since the Value wrapper will keep a ref and make the
	object immortal.

	* kjs/array_object.cpp:
        (ArrayInstanceImp::ArrayInstanceImp):
        (ArrayInstanceImp::get):
        (ArrayInstanceImp::put):
        (ArrayInstanceImp::hasProperty):
        (ArrayInstanceImp::deleteProperty):
        (ArrayInstanceImp::setLength):
        (ArrayInstanceImp::mark):
        * kjs/array_object.h:

mjs's avatar
mjs committed
1210 1211 1212 1213 1214 1215 1216 1217
2002-08-13  Maciej Stachowiak  <mjs@apple.com>

	Add the ability to determine the classes of live JavaScript
	objects, to help with leak fixing.

        * kjs/collector.h, kjs/collector.cpp:
        (Collector::liveObjectClasses):

1218 1219 1220 1221 1222 1223 1224 1225 1226
2002-08-13  Maciej Stachowiak  <mjs@apple.com>

	Small speed improvement. 3% faster on cvs-js-performance, no
	measurable change on cvs-static-urls.
	
        * kjs/collector.cpp:
        (Collector::collect): Combine 3 loops over all objects into one,
	to reduce flat time and improve locality of reference.

darin's avatar
darin committed
1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313
2002-08-12  Darin Adler  <darin@apple.com>

	Speed improvements. 19% faster on cvs-js-performance, 1% on cvs-static-urls.

	Use global string objects for length and other common property names rather
	than constantly making and destroying them. Use integer versions of get() and
	other related calls rather than always making a string.

	Also get rid of many unneeded constructors, destructors, copy constructors, and
	assignment operators. And make some functions non-virtual.

        * kjs/internal.h:
        * kjs/internal.cpp:
        (NumberImp::toUInt32): Implement.
        (ReferenceImp::ReferenceImp): Special case for numeric property names.
        (ReferenceImp::getPropertyName): Moved guts here from ValueImp. Handle numeric case.
        (ReferenceImp::getValue): Moved guts here from ValueImp. Handle numeric case.
        (ReferenceImp::putValue): Moved guts here from ValueImp. Handle numeric case.
        (ReferenceImp::deleteValue): Added. Handle numeric case.

        * kjs/array_object.h:
        * kjs/array_object.cpp: All-new array implementation that stores the elements
	in a C++ array rather than in a property map.
        (ArrayInstanceImp::ArrayInstanceImp): Allocate the C++ array.
        (ArrayInstanceImp::~ArrayInstanceImp): Delete the C++ array.
        (ArrayInstanceImp::get): Implement both the old version and the new overload that
	takes an unsigned index for speed.
        (ArrayInstanceImp::put): Implement both the old version and the new overload that
	takes an unsigned index for speed.
        (ArrayInstanceImp::hasProperty): Implement both the old version and the new overload that
	takes an unsigned index for speed.
        (ArrayInstanceImp::deleteProperty): Implement both the old version and the new overload that
	takes an unsigned index for speed.
        (ArrayInstanceImp::setLength): Added. Used by the above to resize the array.
        (ArrayInstanceImp::mark): Mark the elements of the array too.
        (ArrayPrototypeImp::ArrayPrototypeImp): Pass the length to the array instance constructor.

        * kjs/bool_object.cpp:
        * kjs/date_object.cpp:
        * kjs/error_object.cpp:
        * kjs/function.cpp:
        * kjs/function_object.cpp:
        * kjs/math_object.cpp:
        * kjs/nodes.cpp:
        * kjs/nodes.h:
        * kjs/number_object.cpp:
        * kjs/object_object.cpp:
        * kjs/regexp_object.cpp:
        * kjs/string_object.cpp:

        * kjs/nodes2string.cpp: (SourceStream::operator<<): Add a special case for char now that
	you can't create a UString from a char implicitly.

        * kjs/object.h:
        * kjs/object.cpp:
        (ObjectImp::get): Call through to the string version if the numeric version is not implemented.
        (ObjectImp::put): Call through to the string version if the numeric version is not implemented.
        (ObjectImp::hasProperty): Call through to the string version if the numeric version is not implemented.
        (ObjectImp::deleteProperty): Call through to the string version if the numeric version is not implemented.

        * kjs/types.h:
        * kjs/types.cpp:
        (Reference::Reference): Added constructors for the numeric property name case.

        * kjs/ustring.h: Made the constructor that turns a character into a string be explicit so we
	don't get numbers that turn themselves into strings.
        * kjs/ustring.cpp:
        (UString::UString): Detect the empty string case, and use a shared empty string.
        (UString::find): Add an overload for single character finds.
        (UString::rfind): Add an overload for single character finds.
        (KJS::operator==): Fix bug where it would call strlen(0) if the first string was not null.
	Also handle non-ASCII characters consistently with the rest of the code by casting to unsigned char
	just in case.

        * kjs/value.h: Make ValueImp and all subclasses non-copyable and non-assignable.
        * kjs/value.cpp:
        (ValueImp::toUInt32): New interface, mainly useful so we can detect array indices and not turn
	them into strings and back.
        (ValueImp::toInteger): Use the new toUInt32. Probably can use more improvement.
        (ValueImp::toInt32): Use the new toUInt32. Probably can use more improvement.
        (ValueImp::toUInt16): Use the new toUInt32. Probably can use more improvement.
        (ValueImp::getBase): Remove handling of the Reference case. That's in ReferenceImp now.
        (ValueImp::getPropertyName): Remove handling of the Reference case. That's in ReferenceImp now.
        (ValueImp::getValue): Remove handling of the Reference case. That's in ReferenceImp now.
        (ValueImp::putValue): Remove handling of the Reference case. That's in ReferenceImp now.
        (ValueImp::deleteValue): Added. Used so we can do delete the same way we do put.

kocienda's avatar
kocienda committed
1314 1315
=== Alexander-17 ===

darin's avatar
darin committed
1316 1317
2002-08-09  Darin Adler  <darin@apple.com>

1318 1319
	Some string speedups. Makes sony.com cached 11% faster on Development, but
        the improvement for Deployment should be greater.
darin's avatar
darin committed
1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341

        * kjs/ustring.h: Made it possible for UChar objects to be uninitialized, which
	gives a speed boost. Inlined CString's +=, UString's destructor, +=, and +.
        * kjs/ustring.cpp:
        (UString::UString): Optimize const char * version, which showed up
	heavily in performance analysis. Added new two-UString version, which
	makes the + operator fast. 
        (UString::ascii): Remove thread safety changes. Change static buffer to remember
	its size, and to always be at least 4096 bytes long; that way we never have to
	reallocate unless it's for a long string. Also make code to extract the characters
	significantly faster by getting rid of two pointer dereferences per character.
        (UString::is8Bit): Avoid one pointer dereference per character.
        (UString::toDouble): Use ascii() instead of cstring() to avoid copying the string.

        * kjs/collector.cpp: Remove unneeded APPLE_CHANGES.
        * kjs/regexp.cpp: Remove ifdefs around some APPLE_CHANGES that we
	want to keep, because they just fix warnings.
        * kjs/value.h: Remove obsolete APPLE_CHANGES comment.

        * JavaScriptCore.pbproj/project.pbxproj: Project Builder decided
	to move a line around in the file.

1342 1343 1344 1345 1346 1347 1348 1349 1350 1351
2002-08-09  Maciej Stachowiak  <mjs@apple.com>

	Fix my last change to actually call the versions of the lock functions
	that are recursive and initialize as needed.
	
        * kjs/internal.cpp:
        (InterpreterImp::InterpreterImp):
        (InterpreterImp::clear):
        (InterpreterImp::evaluate):

1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375
2002-08-09  Maciej Stachowiak  <mjs@apple.com>

        - fixed 2948835 - JavaScriptCore locking is too fine grained, makes it too slow

	* kjs/collector.cpp:
        (Collector::allocate):
        (Collector::collect):
        (Collector::finalCheck):
        (Collector::numInterpreters):
        (Collector::numGCNotAllowedObjects):
        (Collector::numReferencedObjects):
        * kjs/collector.h:
        * kjs/internal.cpp:
        (initializeInterpreterLock):
        (lockInterpreter):
        (unlockInterpreter):
        (Parser::parse):
        (InterpreterImp::InterpreterImp):
        (InterpreterImp::clear):
        (InterpreterImp::evaluate):
        * kjs/value.cpp:
        (ValueImp::ValueImp):
        (ValueImp::setGcAllowed):

sheridan's avatar
sheridan committed
1376 1377 1378 1379
=== milestone 0.5 ===

=== Alexander-16 ===

mjs's avatar
mjs committed
1380 1381 1382 1383 1384 1385
2002-08-05  Maciej Stachowiak  <mjs@apple.com>

	- fixed 3007072 - need to be able to build fat
	
        * JavaScriptCore.pbproj/project.pbxproj: Fixed DeploymentFat build.

1386 1387
=== Alexander-15 ===

darin's avatar
darin committed
1388 1389 1390 1391
2002-07-25  Darin Adler  <darin@apple.com>

        * JavaScriptCore.pbproj/project.pbxproj: Add DeploymentFat build style.

sheridan's avatar
sheridan committed
1392 1393
=== Alexander-14 ===

darin's avatar
darin committed
1394 1395 1396 1397 1398
2002-07-21  Darin Adler  <darin@apple.com>

        * kjs/*: Roll KDE 3.0.2 changes in. Also switch to not using APPLE_CHANGES
	for some of the changes that we definitely want to contribute upstream.

mjs's avatar
mjs committed
1399 1400 1401 1402
2002-07-21  Maciej Stachowiak  <mjs@apple.com>

        * Makefile.am: Remove products from symroots on `make clean'.

sheridan's avatar
sheridan committed
1403 1404
=== Alexander-13 ===

darin's avatar
darin committed
1405 1406 1407 1408 1409 1410
2002-07-13  Darin Adler  <darin@apple.com>

        * Makefile.am: Don't use embed.am any more.
        * JavaScriptCore.pbproj/project.pbxproj: Use embed-into-alex instead
	of make embed.

darin's avatar
darin committed
1411 1412 1413 1414 1415
2002-07-12  Darin Adler  <darin@apple.com>

        * kjs/ustring.h: Since <sys/types.h> includes ushort and uint now, had
	to change the includes here to be compatible with that.

1416 1417 1418 1419 1420 1421 1422
2002-07-11  Darin Adler  <darin@apple.com>

        * JavaScriptCore.pbproj/project.pbxproj: To make the build of
	WebCore work without using -I to peek at JavaScriptCore sources,
	made all the Public sources Private so they are all in one directory.
	Also, made lookup.h be Private.

1423 1424
=== Alexander-11 ===

sheridan's avatar
sheridan committed
1425 1426
=== Alexander-10 ===

1427 1428 1429 1430
2002-06-25  Darin Adler  <darin@apple.com>

        * JavaScriptCore.pbproj/project.pbxproj: Re-add -Wmissing-format-attribute.

1431 1432
=== Alexander-9 ===

1433 1434 1435 1436 1437 1438 1439
2002-06-19  Kenneth Kocienda  <kocienda@apple.com>

        I just played alchemical voodoo games with the linker to 
        make all our frameworks and Alexander prebound.

	* JavaScriptCore.pbproj/project.pbxproj

1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451
2002-06-15  Darin Adler  <darin@apple.com>

	* JavaScriptCore.pbproj/project.pbxproj: Removed explicit PFE_FILE_C_DIALECTS now that
	Project Builder handles this automatically. Removed explicit USE_GCC3 since that's implicit
	now. Also, since this project is all C++, only use WARNING_CFLAGS with flags that are appropriate
	for C++; don't bother breaking out C vs. C++.

	* kjs/collector.cpp: Now that the system warning is fixed, use PTHREAD_MUTEX_INITIALIZER and
	PTHREAD_COND_INITIALIZER.
	* kjs/internal.cpp: Use PTHREAD_MUTEX_INITIALIZER.
	* kjs/ustring.cpp: Use PTHREAD_ONCE_INIT.

1452 1453 1454 1455 1456 1457 1458 1459 1460
2002-06-15  Maciej Stachowiak  <mjs@apple.com>

        Made Development build mode mean what Unoptimized used to mean. Removed Unoptimized build mode. 
        Added a Mixed build mode which does what Deployment used to. All this to fix:
        
        Radar 2955367 - Change default build style to "Unoptimized"
        
	* JavaScriptCore.pbproj/project.pbxproj:

1461 1462 1463 1464 1465
2002-06-12  Darin Adler  <darin@apple.com>

	* kjs/nodes.cpp: (Node::finalCheck): A bit of APPLE_CHANGES so we
	can compile with KJS_DEBUG_MEM defined if we want to.

darin's avatar
darin committed
1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488
2002-06-10  Darin Adler  <darin@apple.com>

	Merged in changes from KDE 3.0.1.

	* kjs/collector.cpp:
	* kjs/date_object.cpp:
	* kjs/function.cpp:
	* kjs/internal.cpp:
	* kjs/lookup.h:
	* kjs/object.cpp:
	* kjs/operations.cpp:
	* kjs/regexp.cpp:
	* kjs/regexp_object.cpp:
	* kjs/regexp_object.h:
	* kjs/string_object.cpp:
	* kjs/testkjs.cpp:
	* kjs/ustring.cpp:
	* kjs/value.cpp:
	* kjs/value.h:
	Do the merge, and add APPLE_CHANGES as needed to make things compile.

	* kjs/date_object.lut.h: Re-generated.

1489 1490 1491 1492 1493
2002-06-07  Darin Adler  <darin@apple.com>

	* Makefile.am: Use new shared "embed.am" file so we don't need four copies of
	the embedding rules for WebFoundation, JavaScriptCore, WebCore, and WebKit.

1494 1495 1496 1497 1498
2002-06-07  Darin Adler  <darin@apple.com>

	* JavaScriptCore.pbproj/project.pbxproj: Don't use any warning flags for C that won't work
	for C++, because PFE uses the C warning flags on a C++ compile.

sheridan's avatar
sheridan committed
1499 1500
=== Alexander-8 ===

1501 1502 1503 1504 1505
2002-06-06  Darin Adler  <darin@apple.com>

	* JavaScriptCore.pbproj/project.pbxproj: Update warning flags for compatibility
	with new C++.

1506 1507 1508 1509 1510 1511 1512 1513
2002-06-05  Darin Adler  <darin@apple.com>

	Fix problem seen as build failure on Jersey.

	* Makefile.am: JavaScriptCore-stamp needs to be a dependency, not a
	source file, because it doesn't have a corresponding object file.
	Making it a dependency causes things to compile in the right order.

1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545
2002-06-04  Darin Adler  <darin@apple.com>

	Improve the speed of the JavaScript string append operation by growing
	the capacity so we don't need to reallocate the string every time.

	Also fix script execution so it doesn't use recursion to advance from
	one statement to the next, using iteration instead.

	* Makefile.am: Stop using BUILT_SOURCES to build JavaScriptCore-stamp,
	because this causes the Project Builder project to build *before* the
	subdir. Intead, use an all-am rule in a way more similar to all our
	other directories.

	* kjs/grammar.y: Link the SourceElementsNode in the opposite direction,
	so we can walk the list and execute each element instead of using
	recursion to reverse the list.
	* kjs/grammar.cpp: Check in new generated file.

	* kjs/nodes.cpp:
	(SourceElementsNode::execute):
	(SourceElementsNode::processFuncDecl):
	(SourceElementsNode::processVarDecls):
	Use loops instead of recursion.

	* kjs/ustring.h: Don't initialize all UChar objects to 0. This was
	wasting a *huge* amount of time.
	* kjs/ustring.cpp:
	(UString::Rep::create): Add a "capacity" along with the length.
	(UString::append): Include 50% extra capacity when appending.
	(UString::operator=): Reuse the buffer if possible rather than
	always creating a new one.

1546 1547 1548 1549
2002-06-02  Darin Adler  <darin@apple.com>

	* COPYING.LIB: Fix line endings. It was using CRs.

darin's avatar
darin committed
1550 1551 1552 1553 1554 1555
2002-05-31  Darin Adler  <darin@apple.com>

	* Makefile.am:
	* kjs/Makefile.am:
	Slight improvements to rules that touch stamp files.

mjs's avatar
mjs committed
1556 1557 1558 1559
2002-05-28  Maciej Stachowiak  <mjs@apple.com>

	* THANKS: Demangled.

sheridan's avatar
sheridan committed
1560 1561
=== Alexander-7 ===

mjs's avatar
mjs committed
1562
2002-05-24  Maciej Stachowiak  <mjs@apple.com>
sheridan's avatar
sheridan committed
1563

mjs's avatar
mjs committed
1564
	Added license and acknowledgements.
sheridan's avatar
sheridan committed
1565

mjs's avatar
mjs committed
1566 1567 1568
	* AUTHORS: Added.
	* COPYING.LIB: Added.
	* THANKS: Added.
sheridan's avatar
sheridan committed
1569

mjs's avatar
mjs committed
1570
=== 0.3 ===
1571

mjs's avatar
mjs committed
1572
=== Alexander-6 ===
1573 1574 1575 1576 1577

=== Alexander-5 ===

=== Alexander-4 ===

mjs's avatar
mjs committed
1578 1579
=== JavaScriptCore-5 ===

1580 1581
2002-05-21  Maciej Stachowiak  <mjs@apple.com>

mjs's avatar
mjs committed
1582 1583
	Reviewed by: Richard Williamson

1584 1585 1586 1587 1588 1589 1590
	Fixed Radar 2928775 - Sherlock crashes sitting in stocks channel

	* kjs/internal.cpp:
	(InterpreterImp::InterpreterImp): Set the interp pointer earlier,
	in case garbage collection takes place while creating the global
	values.

darin's avatar
darin committed
1591 1592
2002-05-15  Darin Adler  <darin@apple.com>

mjs's avatar
mjs committed
1593 1594
	Reviewed by: Maciej Stachowiak
	
darin's avatar
darin committed
1595 1596 1597 1598
	* Makefile.am:
	Use all-am and clean-am instead of all and clean because it's better and
	to make "make check" at the top level work right.

darin's avatar
darin committed
1599 1600
2002-05-13  Darin Adler  <darin@apple.com>

mjs's avatar
mjs committed
1601 1602
	Reviewed by: Maciej Stachowiak

darin's avatar
darin committed
1603 1604
	* kjs/value.h: Fix comment typos.

mjs's avatar
mjs committed
1605 1606
=== JavaScriptCore-4 ===

1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642
2002-05-10  Maciej Stachowiak  <mjs@apple.com>

	Reviewed by: Ken Kocienda and Darin Adler

	Fixed the following bug:

	Radar 2890573 - JavaScriptCore needs to be thread-safe

	Actually this is only a weak form of thread-safety - you can safely
	use different interpreters from different threads at the same
	time. If you try to use a single interpreter object from multiple
	threads, you need to provide your own locking.

	* kjs/collector.h, kjs/collector.cpp:
	(Collector::lock, Collector::unlock): Trivial implementation of a
	recursive mutex.
	(Collector::allocate): Lock around the body of this function.
	(Collector::collect): Likewise.
	(Collector::finalCheck): Likewise.
	(Collector::numInterpreters): Likewise.
	(Collector::numGCNotAllowedObjects): Likewise.
	(Collector::numReferencedObjects): Likewise.
	* kjs/internal.cpp:
	(Parser::parse): use a mutex to lock around the whole parse, since
	it uses a bunch of global state.
	(InterpreterImp::InterpreterImp): Grab the Collector lock here,
	both the mutually exclude calls to the body of this function, and
	to protect the s_hook static member which the collector pokes at.
	(InterpreterImp::clear): Likewise.
	* kjs/ustring.cpp:
	(statBufferKeyCleanup, statBufferKeyInit, UString::ascii): Convert
	use of static variable
	* kjs/value.cpp:
	(ValueImp::ValueImp, ValueImp::mark, ValueImp::marked,
	ValueImp::setGcAllowed): Grab the GC lock around any flag changes.

sheridan's avatar
sheridan committed
1643 1644
=== Alexander-3 ===

darin's avatar
darin committed
1645 1646 1647 1648 1649 1650 1651 1652 1653
2002-05-08  Darin Adler  <darin@apple.com>

	* kjs/collector.h:
	* kjs/collector.cpp:
	(Collector::numInterpreters):
	(Collector::numGCNotAllowedObjects):
	(Collector::numReferencedObjects):
	Add three new functions so we can see a bit more about leaking JavaScriptCore.

1654 1655 1656 1657 1658 1659
2002-05-06  Darin Adler  <darin@apple.com>

	* JavaScriptCorePrefix.h: Added.
	* JavaScriptCore.pbproj/project.pbxproj: Use PFE precompiling.
	Also switch from xNDEBUG to NDEBUG.

1660 1661
=== Alexander 0.3c2 (v1) ===

1662 1663 1664 1665 1666
2002-04-18  Darin Adler  <darin@apple.com>

	* JavaScriptCore.pbproj/project.pbxproj: Oops. Take out -Wstrict-prototypes, put back
	-Wmissing-prototypes.

darin's avatar
darin committed
1667 1668 1669 1670 1671 1672
2002-04-18  Darin Adler  <darin@apple.com>

	* JavaScriptCore.pbproj/project.pbxproj: Take out -Wmissing-prototypes
	because system headers are triggering it when we don't have
	precompiled headers on.

1673 1674 1675 1676 1677 1678 1679
2002-04-18  Darin Adler  <darin@apple.com>

	Reviewed by Maciej

	* JavaScriptCore.pbproj/project.pbxproj: Turn on gcc3 and the same set of warnings
	as in the rest of Labyrinth (see top level ChangeLog for details).

1680 1681 1682 1683 1684 1685 1686
2002-04-17  Maciej Stachowiak  <mjs@apple.com>

	Reviewed by: Darin Adler  <darin@apple.com>

	* kjs/testkjs.cpp: Don't include <iostream.h> to avoid gcc3
	warning.

darin's avatar
darin committed
1687 1688
2002-04-15  Darin Adler  <darin@apple.com>

1689 1690
	Reviwed by: Maciej Stachowiak  <mjs@apple.com>

darin's avatar
darin committed
1691 1692 1693 1694 1695 1696 1697 1698
	* kjs/internal.cpp:
	* kjs/property_map.cpp:
	* kjs/ustring.h:
	Removed some unneeded <config.h> includes so we are more similar
	to the real KDE sources.

2002-04-15  Darin Adler  <darin@apple.com>

1699 1700
	Reviwed by: Maciej Stachowiak  <mjs@apple.com>

darin's avatar
darin committed
1701 1702 1703 1704 1705 1706 1707
	Merged changes from KDE 3.0 final and did some build fixes.

	* JavaScriptCore.pbproj/project.pbxproj: Added nodes2string.cpp.

	* kjs/grammar.*: Regenerated.
	* kjs/*.lut.h: Regenerated.

darin's avatar
darin committed
1708 1709
2002-04-08  Darin Adler  <darin@apple.com>

mjs's avatar
mjs committed
1710 1711
	Reviwed by: Maciej Stachowiak  <mjs@apple.com>

darin's avatar
darin committed
1712 1713
	* JavaScriptCore.pbproj/project.pbxproj: Re-added -Wno-format-y2k.

1714 1715 1716 1717 1718
2002-04-04  Darin Adler  <darin@apple.com>

	* JavaScriptCore.pbproj/project.pbxproj: Add an Unoptimized build
	style: exactly like Development except without the -O.

1719 1720 1721 1722
2002-04-03  Darin Adler  <darin@apple.com>

	* kjs/Makefile.am: Gratuitous cleanup.

darin's avatar
darin committed
1723 1724 1725 1726 1727
2002-04-02  Darin Adler  <darin@apple.com>

	* JavaScriptCore.pbproj/project.pbxproj: Update flags as I did for
	WebFoundation.

1728 1729 1730 1731 1732 1733 1734 1735
2002-04-02  Maciej Stachowiak  <mjs@apple.com>

	* JavaScriptCore.pbproj/project.pbxproj: Pass -Wno-format-y2k so
	the project builds with gcc3.
	
	* kjs/nodes.cpp: Avoid including an obsolete header to avoid
	warning with gcc3.

1736 1737 1738 1739 1740
2002-04-02  Darin Adler  <darin@apple.com>

	* kjs/property_map.cpp: (PropertyMap::~PropertyMap): Deallocate the
        map by calling clear so we don't leak the entire map.

1741 1742 1743 1744 1745 1746
2002-04-02  Darin Adler  <darin@apple.com>

	* kjs/internal.cpp: (InterpreterImp::globalClear): Add code to
        deallocate and null out emptyList, because once the last interpreter
        is destroyed there's nothing to keep it from being garbage collected.

darin's avatar
darin committed
1747 1748 1749 1750 1751 1752 1753 1754 1755
2002-04-01  Darin Adler  <darin@apple.com>

        Got rid of KWQDef.h because it's dangerous to have two files with
        the same name and different contents.

	* JavaScriptCore.pbproj/project.pbxproj:
	* kjs/KWQDef.h: Removed.
	* kjs/ustring.h: Defines unsigned int types inline now.

1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771
2002-03-30  Maciej Stachowiak  <mjs@apple.com>

	Fixed Radar 2891272 (JavaScript crashes loading quicktime.com and
	apple.com)

	* kjs/object.cpp: (ObjectImp::~ObjectImp): Don't call setGCAlloc
	on object internals pointed to, because they may have already been
	collected by the time this object is collected, and in that case
	we would corrupt the malloc arena.

	* Makefile.am: Make the stamp file depend on all the sources and
	headers so the framework gets rebuilt properly.

	* JavaScriptCore.pbproj/project.pbxproj: Some random numbers moved
	around. No idea what I really changed.

1772 1773 1774 1775 1776 1777 1778 1779 1780
2002-03-30  Darin Adler  <darin@apple.com>

	* kjs/grammar.y: Took out Id tag so we won't constantly need to
        update grammar.cpp.
	* kjs/grammar.cpp: Regenerated without Id tag.

	* .cvsignore: Ignore some additional autogenerated files.
	* kjs/.cvsignore: Ignore some additional autogenerated files.

1781 1782 1783 1784 1785
2002-03-30  Maciej Stachowiak  <mjs@apple.com>

	* JavaScriptCore.pbproj/project.pbxproj: Install some of the
	headers.

1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820
2002-03-30  Maciej Stachowiak  <mjs@apple.com>

	Converted JavaScriptCore to build with Project Builder, in
	preparation for B&I submission.

	* English.lproj/InfoPlist.strings: Added.
	* JavaScriptCore.pbproj/.cvsignore: Added.
	* JavaScriptCore.pbproj/project.pbxproj: Added.
	
	* .cvsignore: Update the set of ignored things.

	* Makefile.am: Hand off to PB for the main build, but still handle
	the generated files and the test program.

	* kjs/Makefile.am: Don't build anything except the generated
	source files.

	* kjs/KWQDef.h, kjs/config.h: Added minimal versions of these
	files to get kjs to build.

	Check in all the genrated files, since Project Builder isn't up to
	the task of handling built sources:
	
	* kjs/array_object.lut.h: Added.
	* kjs/date_object.lut.h: Added.
	* kjs/grammar.cpp: Added.
	* kjs/grammar.cpp.h: Added.
	* kjs/grammar.h: Added.
	* kjs/lexer.lut.h: Added.
	* kjs/math_object.lut.h: Added.
	* kjs/number_object.lut.h: Added.
	* kjs/string_object.lut.h: Added.

	* kjs/.cvsignore: Update set of ignored things.

mjs's avatar
mjs committed
1821 1822 1823 1824
2002-03-28  Maciej Stachowiak  <mjs@apple.com>

	* kjs/kjs-test.chk: Update output for new test results.

mjs's avatar
mjs committed
1825 1826 1827 1828 1829 1830 1831 1832
2002-03-26  Maciej Stachowiak  <mjs@apple.com>

	Set up kjs to build by itself into libJavaScriptCore.dylib.
	
	* .cvsignore: Added.
	* Makefile.am: Added.
	* dummy.cpp: Added.
	* kjs/.cvsignore: Added.