Newer
Older
2003-10-22 Maciej Stachowiak <mjs@apple.com>
Fix broken build.
* kjs/simple_number.h:
2003-10-22 Maciej Stachowiak <mjs@apple.com>
Merged 64-bit compilation fixes, and fixes for handling negative 0
from upstream kjs.
* kjs/internal.cpp:
* kjs/simple_number.h:
(KJS::SimpleNumber): fixed constants; added negZero constant.
(KJS::SimpleNumber::is): adjusted to use long and not int.
(KJS::SimpleNumber::value): ditto.
(KJS::SimpleNumber::fits): ditto; also don't allow -0 to fit, so
we don't lose the distinction between -0 and +0.
(KJS::SimpleNumber::make): adjusted to use long.
2003-10-18 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3367015 -- interdependent variable declarations in for loop don't work (they go backwards)
* kjs/nodes.h: (KJS::ForNode::ForNode): Add a new overload of the constructor for when the
first parameter is a variable declaration list. Call reverseList as we do in other constructors
that take lists that are built backwards.
* kjs/nodes.cpp: (ForNode::reverseList): Added. New helper function.
2003-10-06 Darin Adler <darin@apple.com>
* kjs/create_hash_table: Remove stray semicolon.
* kjs/array_object.lut.h:
* kjs/date_object.lut.h:
* kjs/lexer.lut.h:
* kjs/math_object.lut.h:
* kjs/number_object.lut.h:
* kjs/string_object.lut.h:
Regenerated.
2003-10-02 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3441656 -- constructor bad for objs created w/ function as prototype (www.moock.org/asdg/codedepot)
* kjs/nodes.cpp: (FuncDeclNode::processFuncDecl): Set up the constructor as
as specified in the JavaScript spec. We were already doing this right in the
other place we make functions.
2003-09-30 Darin Adler <darin@apple.com>
Reviewed by Dave.
Rolled in Harri Porten's change to accept non-breaking space in JavaScript.
* kjs/lexer.cpp: (Lexer::isWhiteSpace): Accept 00A0 as "whitespace".
2003-09-25 Maciej Stachowiak <mjs@apple.com>
Roll out build system change since it did not actually work. :-(
* JavaScriptCore.pbproj/project.pbxproj:
* Makefile.am:
2003-09-25 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
* JavaScriptCore.pbproj/project.pbxproj: Don't hack install name. Instead
of embedding into Safari, embed into WebKit as sub-umbrella.
* Makefile.am: Don't forget to rebuild if the user removes
JavaScript.framework from symroots manually.
2003-09-24 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3421107 -- some dates that other browsers can parse can't be parsed by KJS's Date.parse()
* kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Added code to be more strict about month names,
to allow a time zone after date even if the date omits the time, and to understand AM and PM.
2003-09-22 Darin Adler <darin@apple.com>
* JavaScriptCore.pbproj/project.pbxproj: Rename Mixed build style to OptimizedWithSymbols.
2003-09-22 Darin Adler <darin@apple.com>
Reviewed by Ken.
* kjs/config.h: Added HAVE_SYS_PARAM_H, since KJS does look for this header, and we do
indeed have it. Just something I noticed in passing while cleaning up configure.in.
2003-09-20 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3419380 -- JavaScript Date.getTimezoneOffset is off by one hour (during daylight savings)
* kjs/date_object.cpp: (DateProtoFuncImp::call): The daylight savings correction
in here was incorrect. Perhaps I should have corrected it for the non-BSD case too,
but I'm not sure the issue is the same.
2003-09-17 Darin Adler <darin@apple.com>
Reviewed by Maciej.
* kjs/date_object.cpp: Removed our CF-based implementations of gmtime, localtime,
mktime, timegm, and time, since they no longer have the slow "hit the filesystem
every time" behavior.
2003-08-27 Maciej Stachowiak <mjs@apple.com>
Reviewed by John
- fixed rdar://problem/3397316 - sherlock crash: KJS::Collector::allocate(unsigned long)
* kjs/internal.cpp:
(InterpreterImp::InterpreterImp): Hold the lock a bit longer, so
the call to initGlobalObject is covered.
2003-08-24 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3098350 -- opt. params to date methods are ignored (can't set end date in Exchange/Outlook web cal.)
* kjs/date_object.cpp: (DateProtoFuncImp::call): Added code to handle the optional parameters.
Strangely, the table of functions already had the right number of parameters listed, but the
code to look at the parameter values was missing.
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
2003-08-17 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3247528 -- encodeURI missing from JavaScriptCore (needed by Crystal Reports)
- fixed 3381297 -- escape method does not escape the null character
- fixed 3381299 -- escape method produces incorrect escape sequences ala WinIE, rather than correct ala Gecko
- fixed 3381303 -- unescape method treats escape sequences as Latin-1 ala WinIE rather than as UTF-8 ala Gecko
- fixed 3381304 -- unescape method garbles strings with bad escape sequences in them
* kjs/function.h: Added constants for decodeURI, decodeURIComponent, encodeURI, and
encodeURIComponent.
* kjs/function.cpp:
(encode): Added. New helper function for escape, encodeURI, and encodeURIComponent.
(decode): Added. New helper function for unescape, decodeURI, and decodeURIComponent.
(GlobalFuncImp::call): Added decodeURI, decodeURIComponent, encodeURI, and encodeURIComponent
implementations. Changed escape and unescape to use new helper functions, which fixes
the four problems above.
* kjs/internal.cpp: (InterpreterImp::initGlobalObject): Add decodeURI, decodeURIComponent,
encodeURI, and encodeURIComponent to the global object.
* kjs/ustring.h: Added a length to the CString class so it can hold strings with null
characters in them, not just null-terminated strings. This allows a null character from
a UString to survive the process of UTF-16 to UTF-8 decoding. Added overloads to
UString::append, UString::UTF8String, UTF8SequenceLength, decodeUTF8Sequence,
convertUTF16OffsetsToUTF8Offsets, and convertUTF8OffsetsToUTF16Offsets.
* kjs/ustring.cpp:
(CString::CString): Set up the length properly in all the constructors. Also add a new
constructor that takes a length.
(CString::append): Use and set the length properly.
(CString::operator=): Use and set the length properly.
(operator==): Use and the length and memcmp instead of strcmp.
(UString::append): Added new overloads for const char * and for a single string to make
it more efficient to build up a UString from pieces. The old way, a UString was created
and destroyed each time you appended.
(UTF8SequenceLength): New. Helper for decoding UTF-8.
(decodeUTF8Sequence): New. Helper for decoding UTF-8.
(UString::UTF8String): New. Decodes from UTF-16 to UTF-8. Same as the function that
was in regexp.cpp, except has proper handling for UTF-16 surrogates.
(compareStringOffsets): Moved from regexp.cpp.
(createSortedOffsetsArray): Moved from regexp.cpp.
(convertUTF16OffsetsToUTF8Offsets): New. Converts UTF-16 offsets to UTF-8 offsets, given
a UTF-8 string. Same as the function that was in regexp.cpp, except has proper handling
for UTF-16 surrogates.
(convertUTF8OffsetsToUTF16Offsets): New. Converts UTF-8 offsets to UTF-16 offsets, given
a UTF-8 string. Same as the function that was in regexp.cpp, except has proper handling
for UTF-16 surrogates.
- fixed 3381296 -- regular expression matches with UTF-16 surrogates will treat sequences as two characters
* kjs/regexp.cpp:
(RegExp::RegExp): Use the new UString::UTF8String function instead a function in this file.
(RegExp::match): Use the new convertUTF16OffsetsToUTF8Offsets (and the corresponding
reverse) instead of convertCharacterOffsetsToUTF8ByteOffsets in this file.
2003-08-14 Vicki Murley <vicki@apple.com>
Reviewed by John.
* JavaScriptCore.pbproj/project.pbxproj: deleted JavaScriptCore.order from the project.
2003-08-14 Vicki Murley <vicki@apple.com>
Reviewed by John.
* JavaScriptCore.order: Removed. We now link to the order file at /AppleInternal/OrderFiles.
* JavaScriptCore.pbproj/project.pbxproj: change sectorder flag to point to /AppleInternal/OrderFiles/JavaScriptCore.order
=== JavaScriptCore-92.1 ===
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
2003-08-07 Darin Adler <darin@apple.com>
Reviewed by John Sullivan.
- fixed 3365527 -- subscripting JavaScript strings does not work (leads to hang at www.newmagna.com.au)
The JavaScript specification says nothing about this, but other browsers seem to give
read-only access to the characters in a string as if the string was an array of characters.
* kjs/array_object.cpp:
(ArrayInstanceImp::get): Update to use a public toArrayIndex function instead of our own getArrayIndex
function, so we can share with string.
(ArrayInstanceImp::put): Ditto.
(ArrayInstanceImp::hasProperty): Ditto.
(ArrayInstanceImp::setLength): Ditto.
* kjs/ustring.h: Add toArrayIndex.
* kjs/ustring.cpp: (UString::toArrayIndex): Added. Implements the rule from array.
* kjs/identifier.h: Add a forwarding function so we can use toArrayIndex.
* kjs/string_object.cpp:
(StringInstanceImp::get): Return a single character string if the property name is an array index.
(StringInstanceImp::hasProperty): Return true for property names that are suitable array indices.
* JavaScriptCore.pbproj/project.pbxproj: Let Xcode be Xcode.
2003-08-07 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3366975 - repro hang in KJS::Value::Value entering text at eil.com
* kjs/string_object.cpp:
(StringProtoFuncImp::call): When doing a match against a regexp
with the global flag set, make sure to return null rather than an
empty array when there is no match. This is what other browsers do.
2003-08-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
* kjs/list.cpp:
(List::copyTail): Test for loop termination with < instead of !=,
since i starts at 1 but size could be 0. Do the same for the other
loop for consistency's sake.
2003-08-01 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3222621 - Cryptic "anonymous function hack" messages in console (10.2.4)
* kjs/lexer.cpp:
(Lexer::lex): Remove useless debug spew.
2003-07-30 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed problem where some JavaScriptCore symbols had no namespace or prefix
* kjs/grammar.y: Added a define for yylloc to make it use the kjs prefix.
This is the same thing done for the rest of the symbols automatically by yacc,
but for some reason it's not done for yyloc. Also make automatic() function static.
* kjs/grammar.cpp: Regenerated.
* kjs/lexer.cpp: Use kjsyylloc instead of yyloc.
* pcre/pcre.h: Add defines to prepend kjs prefixes for all the PCRE functions.
2003-07-30 Darin Adler <darin@apple.com>
* Makefile.am: Include the subdirectory with the PCRE code in it.
2003-07-30 John Sullivan <sullivan@apple.com>
- JavaScriptCore part of fix for 3284525 -- AutoFill fills in
only e-mail address field of New Account form on Apple Store Japan
Reviewed by Darin
* JavaScriptCore.pbproj/project.pbxproj:
Mark pcre.h as a Private header
2003-07-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
- fixed 3240814 - LEAK: 120 byte leak in JavaScript parser in Sherlock Movies channel
* kjs/internal.cpp:
(Parser::parse): ref() and deref() the program node, to make sure to clean up properly,
before deleting it.
(InterpreterImp::checkSyntax): Likewise.
2003-07-22 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
Remove -seg_addr_table_filename to fix build.
* JavaScriptCore.pbproj/project.pbxproj:
2003-07-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3330344 - Please change allowable client to "JavaScriptGlue" from "JSGlue"
* JavaScriptCore.pbproj/project.pbxproj: Changed allowable client
to "JavaScriptGlue"
2003-07-13 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- do some improvements Maciej suggested while reviewing the array index change
* kjs/array_object.cpp:
(getArrayIndex): Return a flag to say whether the index was value separately, to avoid
in-band signalling.
(ArrayInstanceImp::get): Update for new getArrayIndex parameters.
(ArrayInstanceImp::put): Ditto.
(ArrayInstanceImp::hasProperty): Ditto.
(ArrayInstanceImp::setLength): Ditto.
* kjs/ustring.cpp: (UString::toStrictUInt32): Check for overflow in a way that avoids doing
a divide every time through the loop. But note that it adds an extra branch to the loop.
I wonder which is worse.
2003-07-12 Darin Adler <darin@apple.com>
Fixed broken build.
* kjs/identifier.h: Add toULong back. It's still used in WebCore (and maybe in JavaScriptGlue,
for all I know).
2003-07-12 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3272777 -- array object indices treated as integers by Safari, but as strings in other web browsers
JavaScriptCore did not implement the proper rule for what an array index is.
* kjs/array_object.cpp:
(getArrayIndex): Added. Implements the rule from the specification, which also provides a handy
"not an array index" value of 2^32-1.
(ArrayInstanceImp::get): Use getArrayIndex.
(ArrayInstanceImp::put): Ditto.
(ArrayInstanceImp::hasProperty): Ditto.
(ArrayInstanceImp::setLength): Ditto.
* kjs/identifier.h: Removed now-unused toULong, and added toStrictUInt32, in both cases forwarding
functions that forward to UString.
* kjs/ustring.h: Added toStringUInt32.
* kjs/ustring.cpp: (UString::toStrictUInt32): Added. Converts a string to a 32-bit unsigned integer,
and rejects any string that does not exactly match the way the integer would be formatted on output.
This is the rule documented in the ECMA language standard.
2003-07-10 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3302021 - v74 and v85 hang with http://e-www.motorola.com/
The crux of this was saving and restoring the prototype objects
for all the standard types when saving and restoring for the page
cache.
* kjs/internal.cpp:
(InterpreterImp::saveBuiltins):
(InterpreterImp::restoreBuiltins):
* kjs/internal.h:
* kjs/interpreter.cpp:
(Interpreter::saveBuiltins):
(Interpreter::restoreBuiltins):
(SavedBuiltins::SavedBuiltins):
(SavedBuiltins::~SavedBuiltins):
* kjs/interpreter.h:
* kjs/property_map.cpp:
2003-07-07 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3295916 - b/c JavaScriptCore and WebCore are installing in wrong location, private headers are public
* WebCore.pbproj/project.pbxproj: Install in WebKit.framework/Versions/A/Frameworks.
2003-07-02 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
- fixed 3096961 - JavaScriptCore should link only to what it uses, shouldn't drag in Cocoa.framework
* JavaScriptCore.pbproj/project.pbxproj: Don't link Cocoa.framework;
just pull in CoreFoundation and CoreServices.
* kjs/date_object.cpp: Include CoreServices.h instead of Carbon.h
(the stuff we want is in CarbonCore).
2003-06-20 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- improved the property map sorting technique so that the indices
are separate for each property map, and also preserve the ordering
when property maps are saved and restored
* kjs/property_map.cpp:
(PropertyMap::put): Don't bother setting the index for _singleEntry, since there's
no need to sort a single entry. Use the per-table lastIndexUsed instead of a global.
(PropertyMap::expand): Don't use the index (uninitialized now) out of a _singleEntry
when putting it in a newly-created map; just use 0. Compute a value for the new map's
lastIndexUsed as we walk through the elements we are adding to it (using the same old
indices from the old map).
2003-06-13 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3178438 -- return elements in order of addition in for..in loop (other browsers seem to)
- fixed 3292067 -- REGRESSION (64-65): albertsons.com "Shop A to Z" menus are not sorted alphabetically
* kjs/property_map.h: Add index field to hash table entry and index parameter to insert function.
* kjs/property_map.cpp:
(PropertyMap::put): Set an index for new map entries to an ever-increasing number based on a global.
(PropertyMap::insert): Take an index parameter.
(PropertyMap::expand): Preserve the indices as we rehash the table.
(comparePropertyMapEntryIndices): Added. Compares two property map entries by index.
(PropertyMap::addEnumerablesToReferenceList): Sort the proprty map entries by index before adding
them to the reference list.
2003-06-10 Vicki Murley <vicki@apple.com>
Reviewed by john.
* JavaScriptCore.order: new order file for 1.0
2003-06-04 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3224031 -- can't search at rakuten.co.jp b/c of extra characters inserted by regexp replace (8-bit char)
Use PCRE UTF-8 regular expressions instead of just chopping off high bytes.
* kjs/regexp.h: Redo field names, remove some unused stuff.
* kjs/regexp.cpp:
(convertToUTF8): Added.
(compareStringOffsets): Added.
(createSortedOffsetsArray): Added.
(convertCharacterOffsetsToUTF8ByteOffsets): Added.
(convertUTF8ByteOffsetsToCharacterOffsets): Added.
(RegExp::RegExp): Set the PCRE_UTF8 flag, and convert the UString to UTF-8 instead of
using ascii() on it.
(RegExp::~RegExp): Remove unneeded if statement (pcre_free is 0-tolerant as free is).
(RegExp::match): Convert the UString to UTF-8 and convert the character offsets to and
from UTF-8 byte offsets. Also do fixes for the "no offset vector" case so we get the
correct position and matched string.
* JavaScriptCore.pbproj/project.pbxproj: Add a PCRE header that was missing before.
2003-05-21 Vicki Murley <vicki@apple.com>
Reviewed by john
- fixed 3234553: Safari and its frameworks should link using order files
* JavaScriptCore.order: Added.
* JavaScriptCore.pbproj/project.pbxproj: set SECTORDER_FLAGS = -sectorder __TEXT __text JavaScriptCore.order
2003-05-19 Maciej Stachowiak <mjs@apple.com>
- fixed 3261096 - Make WebKit an umbrella framework
* JavaScriptCore.pbproj/project.pbxproj: In a B&I build, compile as a
sub-umbrella of WebKit.
2003-05-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
- fixed 3254063 - REGRESSION: hang in KJS PropertyMap with many items in iDisk pictures folder
* kjs/property_map.cpp:
(PropertyMap::expand): Fixed to maintain key count properly - otherwise the hashtable
could get completely full, resulting in disaster.
(PropertyMap::checkConsistency): Fixed compilation. Fixed to know about deleted
sentinel. Fixed to search with double-hashing instead of linear probing.
2003-05-15 Maciej Stachowiak <mjs@apple.com>
Reviewed by Chris.
- fixed 3259673 - REGRESSION: marvel.com thinks I don't have the flash plugin any more
* kjs/nodes.cpp:
(ContinueNode::execute): Return a Continue completion, not a Break
completion, in the normal non-exception case.
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
2003-05-12 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
- improved JavaScript error message format
* kjs/error_object.cpp:
(ErrorProtoFuncImp::call): Include line number in toString output.
* kjs/internal.cpp:
(Parser::parse): Remove redundant fprintf.
* kjs/interpreter.cpp:
(Interpreter::evaluate): Log if the flag is on. Include filename in log output.
(Interpreter::shouldPrintExceptions): Check the global flag.
(Interpreter::setShouldPrintExceptions): Set the global flag.
* kjs/interpreter.h:
* kjs/nodes.cpp:
(Node::throwError): Add variants that include value and expression or label in format.
(NewExprNode::evaluate): Improve error message.
(FunctionCallNode::evaluate): Improve error message.
(RelationalNode::evaluate): Improve error message.
(ContinueNode::execute): Improve error message.
(BreakNode::execute): Improve error message.
(LabelNode::execute): Improve error message.
* kjs/nodes.h:
2003-05-07 Vicki Murley <vicki@apple.com>
Reviewed by darin.
- modify the Mixed build style to build optimized with symbols
* JavaScriptCore.pbproj/project.pbxproj: removed OPTIMIZATION_CFLAGS
2003-05-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by Don.
- fixed 3239961 - www.phiffer.com doesn't work; uses "var top; top = n;"
* kjs/nodes.cpp:
(VarDeclNode::evaluate): Check if the property exists with
getDirect() instead of hasProperty().
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
Reviewed by John.
- fixed 2959353 -- eliminate globally initialized objects from JavaScriptCore
* JavaScriptCore.pbproj/project.pbxproj: Added fpconst.cpp.
* kjs/fpconst.cpp: Added. Defines KJS::NaN and KJS::Inf in a way that does not require a
framework init routine.
* kjs/identifier.h: Use a new KJS_IDENTIFIER_EACH_GLOBAL macro so we can do things to
the entire set of identifiers easily. Also added an init function that sets up these globals
in a way that does not require a framework init routine.
* kjs/identifier.cpp: (Identifier::init): Initialize the property ane globals in a way that
does not require a framework init routine.
* kjs/internal.cpp: (InterpreterImp::initGlobalObject): Call Identifier::init.
* kjs/ustring.h: Remove UChar::null and UString::null, and add UString::null(). We can't have
a global object of a class that has a constructor if we want to avoid framework init routines,
and luckily very little code relies on these.
* kjs/ustring.cpp:
(UCharReference::ref): Use our own global specific to this function rather than returning
UChar::null when past the end of the string. This is dangerous because if the caller modifies
it, that affects what all subsequent callers will see.
(UString::Rep::create): Added assertions.
(UString::UString): Got rid of code here that used to set up UString::null.
(UString::null): Added. Returns a global null string, and can be used in some of the places
where we used to use the UString::null global.
(UString::operator[]): Fixed case where this used to return UChar::null to return '\0' instead.
* kjs/regexp.cpp: (RegExp::match): Change uses of UString::null to UString::null().
2003-04-25 Darin Adler <darin@apple.com>
- fixed 3241344 -- REGRESSION: top of page missing on wired.com and cnn.com
Caused by the ResolveNode speedup. Roll it out until I can figure out why.
* kjs/nodes.cpp: (ResolveNode::evaluate): Go back to using evaluateReference.
2003-04-25 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- a couple improvements that give a 6.6% speedup on iBench JavaScript
* kjs/nodes.cpp: (ResolveNode::evaluate): Don't use evaluateReference.
* kjs/object.cpp: (ObjectImp::get): Do the prototype work with the ValueImp, not a wrapper.
Contributes a tiny bit to the speedup, but cleaner anyway.
(ObjectImp::hasProperty): Same thing here.
2003-04-25 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- move from linear probing to double hashing, gives an 0.7% speedup in iBench JavaScript
* kjs/property_map.h: Remove the hash function.
* kjs/property_map.cpp: Added statistics for rehashes and removes.
Moved from linear probing to double hashing, using the hash modulo
(table size minus one) plus one for the probing distance.
* kjs/ustring.h: Use unsigned instead of int for hash function result.
2003-04-18 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
Improved List pool for 3% speed improvement on cvs-js-ibench
* kjs/list.cpp: Replaced the roving cursor with a free list and
raised the high water mark to 384.
2003-04-12 Maciej Stachowiak <mjs@apple.com>
Reviewed by Don.
- JavaScriptCore part of fix for 3158769 - JavaScript triggers not as async as they used to be
Added a way to get the current interpreter lock count, so Sherlock
can unlock the interpreter inside JS method implementations that
spend a long time waiting for I/O, allowing more efficient
multi-threaded operation.
* kjs/internal.cpp:
(lockInterpreter):
(unlockInterpreter):
(InterpreterImp::lock):
(InterpreterImp::lockCount):
* kjs/internal.h:
* kjs/interpreter.cpp:
(Interpreter::lockCount):
* kjs/interpreter.h:
2003-03-31 Darin Adler <darin@apple.com>
* English.lproj/InfoPlist.strings: Changed "1.0 Beta" to "1.0 Beta 2".
* JavaScriptCore.pbproj/project.pbxproj: Changed "1.0 Beta" to "1.0 Beta 2".
2003-03-24 Trey Matteson <trey@apple.com>
Pass -seg_addr_table_filename <FILENAME> to ld. This makes our frameworks in
SYMROOT actually work for symbol resolution because they will have the correct
prebinding address. It also fixes obscure B&I problems with prebinding
reported by Matt Reda.
Note the reason all this is tricky for our projects is that we have a different
install location for Jaguar and Panther. The purpose of this arg is to declare
at link time our eventual location, which allows the prebinding address to be
found in /AppleInternal/Developer/seg_addr_table. We use a funky back-tick
expression within OTHER_LDFLAGS to get a conditional value depending on the
build train we are in.
This can all go away once we only build on Panther and don't embed the
frameworks inside the Safari.app wrapper.
In addition I fixed the OTHER_LDFLAGS settings in our build styles to be
additive instead of overriding, so we have the args we used for B&I in force
when building outside of B&I.
Reviewed by Maciej.
* JavaScriptCore.pbproj/project.pbxproj:
2003-03-16 Trey Matteson <trey@apple.com>
3198135 - need to fix our projects so SYMROOT is not stripped
Tweaked stripping options: B&I build does not COPY_PHASE_STRIP.
Deployment build still does.
We strip manually as part of the install that we do ourselves.
Reviewed by Maciej.
* JavaScriptCore.pbproj/project.pbxproj:
2003-03-10 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3193099 -- date parsing can't handle the time zone format that date formatting produces
* kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Allow a "GMT" prefix before the time zone offset.
2003-03-04 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- got rid of some framework initialization (working on bug 2959353)
* kjs/identifier.h: Turn Identifier:null into Identifier:null().
* kjs/identifier.cpp: Removed Identifier:null and added Identifier:null().
* kjs/internal.cpp: Made NaN_Bytes and Inf_Bytes const.
* kjs/completion.h: Use Identifier:null() instead of Identifier:null.
* kjs/function.h: Ditto.
* kjs/function_object.cpp: (FunctionObjectImp::construct): Ditto.
* kjs/nodes.cpp: (FuncExprNode::evaluate): Use Identifier:null() instead of Identifier:null.
2003-03-02 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3158833 - ebay prefs page is so slow, it seems like a hang.
92% speed improvement on ebay prefs page.
1% speed improvement on js-ibench and js-performance plt suites.
There were a couple of problems with the identifier hash table that
I fixed:
* kjs/identifier.cpp:
(void Identifier::remove): Adjust the shrink threshold to avoid
constantly growing and shrinking.
* kjs/ustring.cpp:
(UString::Rep::computeHash): Use a better hash function that
avoids collisions for obvious data sets.
2003-02-26 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3156705 - REGRESSION: javascript menus improperly placed at umich.edu store
* kjs/nodes.cpp:
(StatListNode::execute): If the first statement's completion is
not normal, return immediately.
2003-02-21 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3142355 -- nil-deref in CFTimeZoneCopyAbbreviation
The real problem wasn't with the current time zone, but with the UTC time zone.
The poor sod had a broken /usr/share/zoneinfo directory, with a 0-byte-long UTC file.
* kjs/date_object.cpp: (UTCTimeZone): Use CFTimeZoneCreateWithTimeIntervalFromGMT(NULL, 0.0)
to get the universal time zone instead of getting it by name.
2003-02-18 Darin Adler <darin@apple.com>
Reviewed by Trey and Ken.
- fixed 3142355 -- nil-deref in CFTimeZoneCopyAbbreviation
Although I can't reproduce this bug, it seems that it's caused by CFTimeZoneCopyDefault returning NULL.
I'm almost certain that the UTC time zone will be created successfully in this case, so I'll just use that.
* kjs/date_object.cpp:
(UTCTimeZone): Added. Gets the UTC time zone (once in a global).
(CopyLocalTimeZone): Added. Gets the local time zone, but falls back to UTC.
(gmtimeUsingCF): Use UTCTimeZone.
(localtimeUsingCF): Use CopyLocalTimeZone.
(mktimeUsingCF): Use CopyLocalTimeZone.
(timegmUsingCF): Use UTCTimeZone.
2003-02-12 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3145442 -- toString(16) is not working, causing non-ASCII characters in mac.com homepage to be munged
* kjs/number_object.cpp: (NumberProtoFuncImp::call): Add handling for toString with a radix other than
10 passed as an argument.
2003-02-11 Trey Matteson <trey@apple.com>
Set -seg1addr in our build styles, but not for the B&I build.
This makes our SYMROOTS from B&I usable to determine symbols from crash
logs from the field.
Also nuked DeploymentFat build style.
Reviewed by Ken.
* JavaScriptCore.pbproj/project.pbxproj:
2003-02-04 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
* JavaScriptCore.pbproj/project.pbxproj: Updated to build the framework
standalone instead of embedded when doing a B&I build for Panther.
2003-01-29 Darin Adler <darin@apple.com>
Reviewed by John.
* kjs/scope_chain.cpp: Rolled out the fix to bug 3137084.
It caused a massive storage leak, and probably didn't even fix the bug.
2003-01-28 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3157318 -- hang at time zone page after clicking on map at www.time.gov
* kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Allow a comma after the day.
Given how this code is structured, it allows commas in unwanted contexts too, but
that's almost certainly harmless.
2003-01-28 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3144918 -- Can't drill down multiple levels of categories when selling on ebay
if first item in list is chosen
The bug was caused by having array values in the property map past the storageLength cutoff
in an array object; those values would not be seen when you do a get.
* kjs/array_object.cpp:
(ArrayInstanceImp::put): Implement a new rule for resizing the storage that is independent
of the length. The old rule would sometimes make the storage very big if you added two elements
in a row that both had large, but consecutive indexes. This eliminates any cases where we
make sparse entries in the property map below the sparse array cutoff.
(ArrayInstanceImp::resizeStorage): Don't ever make storage size bigger than the cutoff unless
the caller specifically requests it.
(ArrayInstanceImp::setLength): Change this so it only makes the storage smaller, never larger.
We will actually enlarge the storage when putting elements in.
2003-01-25 Darin Adler <darin@apple.com>
Reviewed by Maciej.
* kjs/Makefile.am: Add dependencies so the .lut.h files get rebuilt if the script changes.
2003-01-22 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3137084 -- Many non-reproducible crashers in ContextImp::mark / ScopeChain::mark
* kjs/scope_chain.cpp: (ScopeChain::push): Add assertion.
(ScopeChain::release): Fix while loop so that it decrements refCount of the first node in
the chain too.
2003-01-21 Darin Adler <darin@apple.com>
- correct our copyrights to 2003; copyright is based on year of publication, not year worked on
2003-01-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- made minor tweaks to work better with Mozilla's JavaScript tests.
* kjs/testkjs.cpp:
(VersionFunctionImp::call): Implemented
(main): Ignore files named -f (hack to match -f <filename syntax
that moz JavaScript tests expect). Also use return code 3 instead
of 1 for uncaught exception.
2003-01-16 Darin Adler <darin@apple.com>
* kjs/number_object.cpp: (NumberObjectImp::construct):
Fix build, remove stray space.
2003-01-16 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- rolled in a change from the KJS folks
* kjs/number_object.h: Use ObjectImp *, not Object, for the proto.
* kjs/number_object.cpp:
(NumberInstanceImp::NumberInstanceImp): Use ObjectImp *, not Object, for the proto.
(NumberPrototypeImp::NumberPrototypeImp): Pass ObjectImp.
(NumberObjectImp::construct): Use ObjectImp.
2003-01-14 Darin Adler <darin@apple.com>
Reviewed by Ken.
- rolled in a change from the KJS folks
Fixes a bug where the date functions would not accept non-strings.
And provides a bit of a speedup.
* kjs/date_object.h: Change parameter type for parseDate.
* kjs/date_object.cpp:
(DateObjectFuncImp::call): Always call toString, don't check the type.
(KJS::parseDate): Take a UString parameter, not a String parameter.
2003-01-13 Darin Adler <darin@apple.com>
* kjs/ustring.h: Fix spelling of occurrence.
2003-01-12 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- turned more recursion into iteration, and fixed some backwards stuff
* kjs/grammar.y: Use the normal idiom for CaseClauses and FormalParameterList
rather than using append().
* kjs/grammar.cpp: Regenerated.
* kjs/nodes.h: Change ClauseListNode and ParameterNode to use the normal idiom,
and got rid of append methods. Also added friend declarations and calls to reverseList().