-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathChangeLog-2003-10-25
1483 lines (1004 loc) · 54.6 KB
/
ChangeLog-2003-10-25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
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
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
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
319
320
321
322
323
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
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
391
392
393
394
395
396
397
398
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
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
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
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
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
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
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
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
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
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
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
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
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
958
959
960
961
962
963
964
965
966
967
968
969
970
971
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
=== Safari-111 ===
2003-10-22 Maciej Stachowiak <[email protected]>
Fix broken build.
* kjs/simple_number.h:
2003-10-22 Maciej Stachowiak <[email protected]>
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 <[email protected]>
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.
=== Safari-110 ===
=== Safari-109 ===
2003-10-06 Darin Adler <[email protected]>
* 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.
=== Safari-108 ===
2003-10-02 Darin Adler <[email protected]>
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 <[email protected]>
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 <[email protected]>
Roll out build system change since it did not actually work. :-(
* JavaScriptCore.pbproj/project.pbxproj:
* Makefile.am:
2003-09-25 Maciej Stachowiak <[email protected]>
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.
=== Safari-107 ===
2003-09-24 Darin Adler <[email protected]>
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 <[email protected]>
* JavaScriptCore.pbproj/project.pbxproj: Rename Mixed build style to OptimizedWithSymbols.
2003-09-22 Darin Adler <[email protected]>
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 <[email protected]>
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 <[email protected]>
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.
=== Safari-100 ===
=== Safari-99 ===
=== Safari-98 ===
=== Safari-97 ===
=== Safari-96 ===
2003-08-27 Maciej Stachowiak <[email protected]>
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.
=== Safari-95 ===
2003-08-24 Darin Adler <[email protected]>
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.
=== Safari-94 ===
2003-08-17 Darin Adler <[email protected]>
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.
=== Safari-93 ===
2003-08-14 Vicki Murley <[email protected]>
Reviewed by John.
* JavaScriptCore.pbproj/project.pbxproj: deleted JavaScriptCore.order from the project.
2003-08-14 Vicki Murley <[email protected]>
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 ===
2003-08-07 Darin Adler <[email protected]>
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.
=== Safari-92 ===
2003-08-07 Maciej Stachowiak <[email protected]>
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 <[email protected]>
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 <[email protected]>
Reviewed by John.
- fixed 3222621 - Cryptic "anonymous function hack" messages in console (10.2.4)
* kjs/lexer.cpp:
(Lexer::lex): Remove useless debug spew.
=== Safari-91 ===
2003-07-30 Darin Adler <[email protected]>
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 <[email protected]>
* Makefile.am: Include the subdirectory with the PCRE code in it.
2003-07-30 John Sullivan <[email protected]>
- 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 <[email protected]>
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.
=== Safari-90 ===
2003-07-22 Maciej Stachowiak <[email protected]>
Reviewed by John.
Remove -seg_addr_table_filename to fix build.
* JavaScriptCore.pbproj/project.pbxproj:
2003-07-17 Maciej Stachowiak <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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.
=== Safari-89 ===
2003-07-10 Maciej Stachowiak <[email protected]>
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 <[email protected]>
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.
=== Safari-88 ===
2003-07-02 Maciej Stachowiak <[email protected]>
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 <[email protected]>
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).
=== Safari-85.1 ===
=== Safari-85 ===
2003-06-13 Darin Adler <[email protected]>
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.
=== Safari-84 ===
2003-06-10 Vicki Murley <[email protected]>
Reviewed by john.
* JavaScriptCore.order: new order file for 1.0
=== Safari-83 ===
2003-06-04 Darin Adler <[email protected]>
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.
=== Safari-82 ===
=== Safari-81 ===
2003-05-21 Vicki Murley <[email protected]>
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
=== Safari-80 ===
2003-05-19 Maciej Stachowiak <[email protected]>
- 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 <[email protected]>
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.
=== Safari-79 ===
2003-05-15 Maciej Stachowiak <[email protected]>
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.
2003-05-12 Maciej Stachowiak <[email protected]>
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:
=== Safari-78 ===
2003-05-07 Vicki Murley <[email protected]>
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 <[email protected]>
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().
=== Safari-77 ===
2003-04-29 Darin Adler <[email protected]>
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 <[email protected]>
- 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 <[email protected]>
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 <[email protected]>
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.
=== Safari-75 ===
2003-04-18 Maciej Stachowiak <[email protected]>
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 <[email protected]>
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:
=== Safari-73 ===
=== Safari-72 ===
=== Safari-71 ===
2003-03-31 Darin Adler <[email protected]>
* 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".
=== Safari-69 ===
2003-03-24 Trey Matteson <[email protected]>
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:
=== Safari-68 ===
2003-03-16 Trey Matteson <[email protected]>
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:
=== Safari-67 ===
=== Safari-66 ===
2003-03-10 Darin Adler <[email protected]>
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.
=== Safari-65 ===
2003-03-04 Darin Adler <[email protected]>
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 <[email protected]>
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.
=== Safari-64 ===
=== Safari-63 ===
2003-02-26 Maciej Stachowiak <[email protected]>
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 <[email protected]>
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.
=== Safari-62 ===
2003-02-18 Darin Adler <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Reviewed by Darin.
* JavaScriptCore.pbproj/project.pbxproj: Updated to build the framework
standalone instead of embedded when doing a B&I build for Panther.
=== Safari-55 ===
2003-01-29 Darin Adler <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Reviewed by Maciej.
* kjs/Makefile.am: Add dependencies so the .lut.h files get rebuilt if the script changes.
=== Safari-54 ===
2003-01-22 Darin Adler <[email protected]>
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 <[email protected]>
- correct our copyrights to 2003; copyright is based on year of publication, not year worked on
2003-01-16 Maciej Stachowiak <[email protected]>
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 <[email protected]>
* kjs/number_object.cpp: (NumberObjectImp::construct):
Fix build, remove stray space.
2003-01-16 Darin Adler <[email protected]>
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.
=== Safari-52 ===
2003-01-14 Darin Adler <[email protected]>
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 <[email protected]>
* kjs/ustring.h: Fix spelling of occurrence.
2003-01-12 Darin Adler <[email protected]>
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().