|
1 2007-10-11 Mark Rowe <mrowe@apple.com> |
|
2 |
|
3 Reviewed by Tim Hatcher. |
|
4 |
|
5 Fix for <rdar://problem/5488678>. Disable debugging symbols in production builds for 10.4 |
|
6 PowerPC to prevent a huge STABS section from being generated. |
|
7 |
|
8 * Configurations/Base.xcconfig: |
|
9 |
|
10 2007-10-08 George Staikos <staikos@kde.org> |
|
11 |
|
12 Reviewed by Adam Roben. |
|
13 |
|
14 Fix Qt build on Win32. |
|
15 |
|
16 * kjs/testkjs.cpp: |
|
17 (main): |
|
18 |
|
19 2007-10-10 Simon Hausmann <hausmann@kde.org> |
|
20 |
|
21 Reviewed by Lars. |
|
22 |
|
23 Fix compilation using gcc 4.3. Header files have been reorganized and as a result some extra |
|
24 includes are needed for INT_MAX, std::auto_ptr and the like. |
|
25 |
|
26 * kjs/collector.cpp: |
|
27 * kjs/collector.h: |
|
28 * kjs/lexer.cpp: |
|
29 * kjs/scope_chain.cpp: |
|
30 * kjs/ustring.cpp: |
|
31 * wtf/Vector.h: |
|
32 |
|
33 2007-10-09 Lars Knoll <lars@trolltech.com> |
|
34 |
|
35 Reviewed by Simon. |
|
36 |
|
37 fix the invokation of slots with return types. Add a JSLock around the conversion from QVariant to JSValue. |
|
38 |
|
39 * bindings/qt/qt_instance.cpp: |
|
40 (KJS::Bindings::QtInstance::invokeMethod): |
|
41 * bindings/qt/qt_runtime.cpp: |
|
42 (KJS::Bindings::convertValueToQVariant): |
|
43 (KJS::Bindings::convertQVariantToValue): |
|
44 |
|
45 2007-10-05 Geoffrey Garen <ggaren@apple.com> |
|
46 |
|
47 Reviewed by Sam Weinig. |
|
48 |
|
49 Added JSObject::removeDirect, to support the fix for |
|
50 <rdar://problem/5522487> REGRESSION: With JavaScript disabled, any |
|
51 page load causes a crash in PropertyMap::put |
|
52 |
|
53 * kjs/object.cpp: |
|
54 (KJS::JSObject::removeDirect): |
|
55 * kjs/object.h: |
|
56 |
|
57 2007-10-04 Mark Rowe <mrowe@apple.com> |
|
58 |
|
59 Reviewed by Oliver. |
|
60 |
|
61 Switch to default level of debugging symbols to resolve <rdar://problem/5488678>. |
|
62 The "full" level appears to offer no observable benefits even though the documentation |
|
63 suggests it be used for dead code stripping. This should also decrease link times. |
|
64 |
|
65 * Configurations/Base.xcconfig: |
|
66 |
|
67 2007-10-03 Lars Knoll <lars@trolltech.com> |
|
68 |
|
69 Reviewed by Rob. |
|
70 |
|
71 Fix a stupid bug in Unicode::toUpper/toLower. |
|
72 Fixes all three test failures in the JavaScriptCore test |
|
73 suite. |
|
74 |
|
75 * wtf/unicode/qt4/UnicodeQt4.h: |
|
76 (WTF::Unicode::toLower): |
|
77 (WTF::Unicode::toUpper): |
|
78 |
|
79 2007-10-02 Darin Adler <darin@apple.com> |
|
80 |
|
81 Reviewed by Adam. |
|
82 |
|
83 - add support for GDI objects to OwnPtr; I plan to use this |
|
84 to fix some GDI handle leaks |
|
85 |
|
86 * kjs/grammar.y: Change parser to avoid macros that conflict |
|
87 with macros defined in Windows system headers: THIS, DELETE, |
|
88 VOID, IN, and CONST. This is needed because OwnPtr.h will now |
|
89 include <windows.h>. |
|
90 * kjs/keywords.table: Ditto. |
|
91 |
|
92 * wtf/OwnPtr.h: For PLATFORM(WIN), add support so that OwnPtr can be |
|
93 a GDI handle, and it will call DeleteObject. Also change to use the |
|
94 RemovePointer technique used by RetainPtr, so you can say OwnPtr<HBITMAP> |
|
95 rather than having to pass in the type pointed to by HBITMAP. |
|
96 |
|
97 * wtf/OwnPtrWin.cpp: Added. |
|
98 (WebCore::deleteOwnedPtr): Put this in a separate file so that we |
|
99 don't have to include <windows.h> in OwnPtr.h. |
|
100 |
|
101 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added OwnPtrWin.cpp. |
|
102 |
|
103 2007-09-29 Holger Hans Peter Freyther <zecke@selfish.org> |
|
104 |
|
105 Reviewed by Mark. |
|
106 |
|
107 -Fix http://bugs.webkit.org/show_bug.cgi?id=13226. |
|
108 Remove Bakefiles from svn. |
|
109 |
|
110 * JavaScriptCoreSources.bkl: Removed. |
|
111 * jscore.bkl: Removed. |
|
112 |
|
113 2007-09-27 Kevin Decker <kdecker@apple.com> |
|
114 |
|
115 Rubber stamped by John Sullivan. |
|
116 |
|
117 <rdar://problem/5493093> |
|
118 |
|
119 * JavaScriptCore.order: Added. |
|
120 * JavaScriptCore.xcodeproj/project.pbxproj: We're changing from using an order file built by |
|
121 another team to using one we actually check into our project repository. Linker settings for |
|
122 Symbol Ordering Flags have been updated accordingly. |
|
123 |
|
124 2007-09-26 Adam Roben <aroben@apple.com> |
|
125 |
|
126 Make testkjs delay-load WebKit.dll so WebKitInitializer can work its magic |
|
127 |
|
128 Rubberstamped by Anders. |
|
129 |
|
130 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: |
|
131 |
|
132 2007-09-25 Adam Roben <aroben@apple.com> |
|
133 |
|
134 Make testkjs delay-load its dependencies |
|
135 |
|
136 This lets WebKitInitializer re-route the dependencies to be loaded out |
|
137 of the Safari installation directory. |
|
138 |
|
139 Rubberstamped by Sam. |
|
140 |
|
141 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: |
|
142 |
|
143 2007-09-25 David Kilzer <ddkilzer@webkit.org> |
|
144 |
|
145 Reviewed by Adam. |
|
146 |
|
147 - Fix http://bugs.webkit.org/show_bug.cgi?id=14885 |
|
148 LGPL'ed files contain incorrect FSF address |
|
149 |
|
150 * COPYING.LIB: |
|
151 * bindings/testbindings.cpp: |
|
152 * kjs/AllInOneFile.cpp: |
|
153 * kjs/DateMath.cpp: |
|
154 * kjs/PropertyNameArray.cpp: |
|
155 * kjs/PropertyNameArray.h: |
|
156 * kjs/config.h: |
|
157 |
|
158 2007-09-25 Sam Weinig <sam@webkit.org> |
|
159 |
|
160 Fix location for build products for Debug_Internal. |
|
161 |
|
162 Reviewed by Adam Roben. |
|
163 |
|
164 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: |
|
165 |
|
166 2007-09-25 Adam Roben <aroben@apple.com> |
|
167 |
|
168 Make testkjs use WebKitInitializer |
|
169 |
|
170 Reviewed by Sam. |
|
171 |
|
172 * JavaScriptCore.vcproj/JavaScriptCore.sln: Add WebKitInitializer and |
|
173 make testkjs depend on it. |
|
174 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Link against |
|
175 WebKitInitializer.lib. |
|
176 * kjs/testkjs.cpp: |
|
177 (main): Call initializeWebKit. |
|
178 |
|
179 2007-09-24 Kevin McCullough <kmccullough@apple.com> |
|
180 |
|
181 Reviewed by Sam. |
|
182 |
|
183 - Continued to update project files to not use Edit and Continue for Debug Information since it doesn't work and breaks some functionality. |
|
184 |
|
185 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
186 * JavaScriptCore.vcproj/WTF/WTF.vcproj: |
|
187 |
|
188 2007-09-21 Kevin McCullough <kmccullough@apple.com> |
|
189 |
|
190 Reviewed by Sam. |
|
191 |
|
192 - Updated project files to not use Edit and Continue for Debug Information since it doesn't work and breaks some functionality. |
|
193 |
|
194 * JavaScriptCore.vcproj/dftables/dftables.vcproj: |
|
195 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: |
|
196 |
|
197 2007-09-20 Holger Hans Peter Freyther <zecke@selfish.org> |
|
198 |
|
199 Rubber stamped by Adam. |
|
200 |
|
201 Renamed files from *Gdk to *Gtk (see #14732) using the |
|
202 work of Juan A. Suarez Romero as a base. |
|
203 |
|
204 GDK -> GTK |
|
205 |
|
206 * JavaScriptCore.pri: |
|
207 * kjs/testkjs.pro: |
|
208 * pcre/dftables.pro: |
|
209 * wtf/Platform.h: PLATFORM(GDK) to PLATFORM(GTK) |
|
210 |
|
211 2007-09-21 Mark Rowe <mrowe@apple.com> |
|
212 |
|
213 Reviewed by Antti Koivisto. |
|
214 |
|
215 http://bugs.webkit.org/show_bug.cgi?id=15250 |
|
216 <rdar://problem/5496942> REGRESSION: Reproducible crash in Safari when evaluating script in Drosera console (15250) |
|
217 |
|
218 * kjs/function.cpp: |
|
219 (KJS::GlobalFuncImp::callAsFunction): Null-check thisObj before passing it to interpreterForGlobalObject. |
|
220 |
|
221 2007-09-19 Holger Hans Peter Freyther <zecke@selfish.org> |
|
222 |
|
223 Rubber stamped by Adam. |
|
224 |
|
225 Make the guard/#if use the same name (ENABLE_FTPDIR) as the #define. This follows |
|
226 the ENABLE_ICONDATABASE example from a couple of lines above. |
|
227 |
|
228 * wtf/Platform.h: |
|
229 |
|
230 2007-09-19 Mark Rowe <mrowe@apple.com> |
|
231 |
|
232 Reviewed by Maciej. |
|
233 |
|
234 <rdar://problem/5487107> NULL dereference crash in FastMallocZone::enumerate when running leaks against Safari |
|
235 |
|
236 Storing remote pointers to their local equivalents in mapped memory was leading to the local pointer being |
|
237 interpreted as a remote pointer. This caused a crash when using the result of mapping this invalid remote pointer. |
|
238 The fix is to follow the pattern used elsewhere in FastMallocZone by always doing the mapping after reading and |
|
239 never storing the mapped pointer. |
|
240 |
|
241 * wtf/FastMalloc.cpp: |
|
242 (WTF::FastMallocZone::enumerate): |
|
243 |
|
244 2007-09-15 Darin Adler <darin@apple.com> |
|
245 |
|
246 - fix Mac build |
|
247 |
|
248 * JavaScriptCore.exp: Export WTFLogVerbose. |
|
249 |
|
250 2007-09-14 Kevin McCullough <kmccullough@apple.com> |
|
251 |
|
252 Reviewed by Sam. |
|
253 |
|
254 - Copy JSRetainPtr to include folder. |
|
255 |
|
256 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
257 |
|
258 2007-09-13 Geoffrey Garen <ggaren@apple.com> |
|
259 |
|
260 Try to fix GDK build. |
|
261 |
|
262 * wtf/MathExtras.h: |
|
263 (wtf_random_init): |
|
264 |
|
265 2007-09-12 Geoff Garen <ggaren@apple.com> |
|
266 |
|
267 Reviewed by Sam Weinig. |
|
268 |
|
269 Fixed <rdar://problem/5429064> 141885 Safari JavaScript: Math.random() slightly less randomly distributed than on Safari / Mac |
|
270 |
|
271 Math.random was skewed slightly upward because it assumed that RAND_MAX was outside the range of |
|
272 values that rand() might return. This problem was particularly pronounced on Windows because |
|
273 the range of values returned by rand() on Windows is 2^16 smaller than the range of values |
|
274 return by rand() on Mac. |
|
275 |
|
276 Fixed by accounting for RAND_MAX return values. Also, switched Windows over to rand_s, which has |
|
277 a range that's equal to rand()'s range on Mac. |
|
278 |
|
279 * kjs/config.h: |
|
280 |
|
281 * kjs/math_object.cpp: |
|
282 (MathFuncImp::callAsFunction): Use the new new thing. |
|
283 |
|
284 * wtf/MathExtras.h: Platform abstraction for random numbers, to cover over differences on Windows. |
|
285 (wtf_random_init): |
|
286 (wtf_random): |
|
287 |
|
288 2007-09-13 Antti Koivisto <antti@apple.com> |
|
289 |
|
290 Reviewed by Maciej. |
|
291 |
|
292 Small addition to previous path to cover |
|
293 http://bugs.webkit.org/show_bug.cgi?id=11399 |
|
294 window.eval runs in the global scope of the calling window |
|
295 |
|
296 Switch variable scope as well. |
|
297 |
|
298 * kjs/function.cpp: |
|
299 (KJS::GlobalFuncImp::callAsFunction): |
|
300 |
|
301 2007-09-12 Antti Koivisto <antti@apple.com> |
|
302 |
|
303 Reviewed by Geoff, Maciej. |
|
304 |
|
305 Fix <rdar://problem/5445058> |
|
306 REGRESSION: Unable to upload picture to eBay auction due to domain security check |
|
307 |
|
308 eBay uses window.eval() between windows. In Firefox window.eval() switches execution |
|
309 and security context to the target window, something WebKit did not do. With WebKit |
|
310 security tightening in r24781, this broke picture uploads. |
|
311 |
|
312 Fix by making WebKit switch context in window.eval(). |
|
313 |
|
314 * kjs/Context.cpp: |
|
315 (KJS::Context::Context): |
|
316 (KJS::Context::~Context): |
|
317 * kjs/context.h: |
|
318 Save and restore interpreter context independently from calling context. |
|
319 |
|
320 * kjs/function.cpp: |
|
321 (KJS::GlobalFuncImp::callAsFunction): |
|
322 If eval is called for global object different than current one, switch execution context |
|
323 to that object and push it to scope. |
|
324 |
|
325 2007-09-12 Sam Weinig <sam@webkit.org> |
|
326 |
|
327 Reviewed by Geoffrey Garen. |
|
328 |
|
329 <rdar://problem/5478717> JSStringCreateWithCFString leaks when passed a zero length CFStringRef |
|
330 |
|
331 * API/JSStringRefCF.cpp: |
|
332 (JSStringCreateWithCFString): Special case the zero length string and remove the |
|
333 UTF16 optimized path since it will always leak due to the fact that we won't be |
|
334 able to free the backing store that the CFStringRef provides. |
|
335 |
|
336 2007-09-10 Timothy Hatcher <timothy@apple.com> |
|
337 |
|
338 Reviewed by Darin Adler. |
|
339 |
|
340 <rdar://problem/5456224> CrashTracer: [USER] 2 crashes in Toast Titanium at com.apple.CoreServices.CarbonCore: CSMemDisposePtr + 37 |
|
341 |
|
342 Removed the implementation of these malloc zone functions. We do not have the ability to |
|
343 check if a pointer is valid or not, so we can't correctly implement them. The system free |
|
344 does not fail if you pass in a bad pointer. |
|
345 |
|
346 * wtf/FastMalloc.cpp: |
|
347 (WTF::FastMallocZone::size): |
|
348 (WTF::FastMallocZone::zoneMalloc): |
|
349 (WTF::FastMallocZone::zoneCalloc): |
|
350 (WTF::FastMallocZone::zoneFree): |
|
351 (WTF::FastMallocZone::zoneRealloc): |
|
352 |
|
353 2007-09-07 Darin Adler <darin@apple.com> |
|
354 |
|
355 Reviewed by Steve Falkenburg. |
|
356 |
|
357 - fix crash seen on Windows release builds |
|
358 |
|
359 * wtf/FastMalloc.cpp: Change pthread_getspecific optimization to be done only |
|
360 on the DARWIN platform. Also correct a couple reinterpret_cast that should be |
|
361 static_cast instead. |
|
362 |
|
363 2007-09-06 Kevin McCullough <kmccullough@apple.com> |
|
364 |
|
365 Reviewed by Maciej. |
|
366 |
|
367 - Moved JSRetainPtr to the API. |
|
368 |
|
369 * API/JSRetainPtr.h: Copied from kjs/JSRetainPtr.h. |
|
370 (JSRetain): |
|
371 (JSRelease): |
|
372 (JSRetainPtr::JSRetainPtr): |
|
373 (JSRetainPtr::~JSRetainPtr): |
|
374 (JSRetainPtr::get): |
|
375 (JSRetainPtr::releaseRef): |
|
376 (JSRetainPtr::operator->): |
|
377 (JSRetainPtr::operator!): |
|
378 (JSRetainPtr::operator UnspecifiedBoolType): |
|
379 (::operator): |
|
380 (::adopt): |
|
381 (::swap): |
|
382 (swap): |
|
383 (operator==): |
|
384 (operator!=): |
|
385 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
386 * kjs/JSRetainPtr.h: Removed. |
|
387 |
|
388 2007-09-05 Maciej Stachowiak <mjs@apple.com> |
|
389 |
|
390 Reviewed by Darin. |
|
391 |
|
392 - Remove single-threaded optimization for FastMalloc. |
|
393 |
|
394 It does not appear to help anywhere but Mac OS X on PPC, due to |
|
395 pthread_getspecific being slow there. On Intel, removing the |
|
396 optimization results in a ~1.5% PLT speedup, a ~1-5% JS iBench |
|
397 speedup, and a ~1.5% HTML iBench speedup. On PPC this change is a |
|
398 speedup on some benchmarks, a slight hit on others. |
|
399 |
|
400 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
401 * kjs/collector.cpp: |
|
402 (KJS::Collector::registerThread): |
|
403 * wtf/FastMalloc.cpp: |
|
404 (WTF::TCMalloc_ThreadCache::GetCache): |
|
405 (WTF::TCMalloc_ThreadCache::GetCacheIfPresent): |
|
406 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): |
|
407 (WTF::do_malloc): |
|
408 * wtf/FastMallocInternal.h: Removed. |
|
409 |
|
410 2007-09-05 Kevin McCullough <kmccullough@apple.com> |
|
411 |
|
412 Reviewed by Adam, Sam, Darin. |
|
413 |
|
414 - Created a JSRetainPtr specifically for JSStringRefs so they can be automatically refed and derefed. |
|
415 |
|
416 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
417 * kjs/JSRetainPtr.h: Copied from wtf/RetainPtr.h. |
|
418 (KJS::JSRetain): |
|
419 (KJS::JSRelease): |
|
420 (KJS::): |
|
421 (KJS::JSRetainPtr::JSRetainPtr): |
|
422 (KJS::JSRetainPtr::~JSRetainPtr): |
|
423 (KJS::JSRetainPtr::get): |
|
424 (KJS::JSRetainPtr::releaseRef): |
|
425 (KJS::JSRetainPtr::operator->): |
|
426 (KJS::JSRetainPtr::operator UnspecifiedBoolType): |
|
427 (KJS::::operator): |
|
428 (KJS::::adopt): |
|
429 (KJS::::swap): |
|
430 (KJS::swap): |
|
431 (KJS::operator==): |
|
432 (KJS::operator!=): |
|
433 |
|
434 2007-09-05 Mark Rowe <mrowe@apple.com> |
|
435 |
|
436 Unreviewed Qt build fix. |
|
437 |
|
438 * wtf/unicode/qt4/UnicodeQt4.h: Fix the constness of the src argument to toUpper to prevent build failures. |
|
439 |
|
440 2007-09-04 Maciej Stachowiak <mjs@apple.com> |
|
441 |
|
442 Back out accidentally committed change. |
|
443 |
|
444 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
445 * kjs/collector.cpp: |
|
446 (KJS::Collector::registerThread): |
|
447 * wtf/FastMalloc.cpp: |
|
448 (WTF::fastMallocSetIsMultiThreaded): |
|
449 (WTF::TCMalloc_ThreadCache::GetCache): |
|
450 (WTF::TCMalloc_ThreadCache::GetCacheIfPresent): |
|
451 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): |
|
452 (WTF::do_malloc): |
|
453 * wtf/FastMallocInternal.h: Added. |
|
454 |
|
455 2007-09-04 Maciej Stachowiak <mjs@apple.com> |
|
456 |
|
457 Reviewed by Darin. |
|
458 |
|
459 - Added Vector::appendRange(), which appends to a vector based on a given start and end iterator |
|
460 - Added keys() and values() functions to HashMap iterators, which give keys-only and values-only iterators |
|
461 |
|
462 Together, these allow easy copying of a set, or the keys or values of a map, into a Vector. Examples: |
|
463 |
|
464 HashMap<int, int> map; |
|
465 HashSet<int> set; |
|
466 Vector<int> vec; |
|
467 // ... |
|
468 vec.appendRange(set.begin(), set.end()); |
|
469 vec.appendRange(map.begin().keys(), map.end().keys()); |
|
470 vec.appendRange(map.begin().values(), map.end().values()); |
|
471 |
|
472 This also allows for a slightly nicer syntax when iterating a map. Instead of saying |
|
473 (*it)->first, you can say *it.values(). Similarly for keys. Example: |
|
474 |
|
475 HashMap<int, int>::const_iterator end = map.end(); |
|
476 for (HashMap<int, int>::const_iterator it = map.begin(); it != end; ++it) |
|
477 printf(" [%d => %d]", *it.keys(), *it.values()); |
|
478 |
|
479 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
480 * wtf/HashIterators.h: Added. |
|
481 (WTF::): |
|
482 (WTF::HashTableConstKeysIterator::HashTableConstKeysIterator): |
|
483 (WTF::HashTableConstKeysIterator::get): |
|
484 (WTF::HashTableConstKeysIterator::operator*): |
|
485 (WTF::HashTableConstKeysIterator::operator->): |
|
486 (WTF::HashTableConstKeysIterator::operator++): |
|
487 (WTF::HashTableConstValuesIterator::HashTableConstValuesIterator): |
|
488 (WTF::HashTableConstValuesIterator::get): |
|
489 (WTF::HashTableConstValuesIterator::operator*): |
|
490 (WTF::HashTableConstValuesIterator::operator->): |
|
491 (WTF::HashTableConstValuesIterator::operator++): |
|
492 (WTF::HashTableKeysIterator::HashTableKeysIterator): |
|
493 (WTF::HashTableKeysIterator::get): |
|
494 (WTF::HashTableKeysIterator::operator*): |
|
495 (WTF::HashTableKeysIterator::operator->): |
|
496 (WTF::HashTableKeysIterator::operator++): |
|
497 (WTF::HashTableKeysIterator::operator HashTableConstKeysIterator<HashTableType, KeyType, MappedType>): |
|
498 (WTF::HashTableValuesIterator::HashTableValuesIterator): |
|
499 (WTF::HashTableValuesIterator::get): |
|
500 (WTF::HashTableValuesIterator::operator*): |
|
501 (WTF::HashTableValuesIterator::operator->): |
|
502 (WTF::HashTableValuesIterator::operator++): |
|
503 (WTF::HashTableValuesIterator::operator HashTableConstValuesIterator<HashTableType, KeyType, MappedType>): |
|
504 (WTF::operator==): |
|
505 (WTF::operator!=): |
|
506 * wtf/HashTable.h: |
|
507 * wtf/Vector.h: |
|
508 (WTF::::appendRange): |
|
509 |
|
510 2007-09-04 Maciej Stachowiak <mjs@apple.com> |
|
511 |
|
512 Reviewed by Darin. |
|
513 |
|
514 - Remove single-threaded optimization for FastMalloc. |
|
515 |
|
516 It does not appear to help anywhere but Mac OS X on PPC, due to |
|
517 pthread_getspecific being slow there. On Intel, removing the |
|
518 optimization results in a 1% PLT speedup, a 2% JS iBench speedup, |
|
519 and no measurable effect on HTML iBench (maybe a slight speedup). |
|
520 |
|
521 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
522 * kjs/collector.cpp: |
|
523 (KJS::Collector::registerThread): |
|
524 * wtf/FastMalloc.cpp: |
|
525 (WTF::TCMalloc_ThreadCache::GetCache): |
|
526 (WTF::TCMalloc_ThreadCache::GetCacheIfPresent): |
|
527 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): |
|
528 (WTF::do_malloc): |
|
529 * wtf/FastMallocInternal.h: Removed. |
|
530 |
|
531 2007-09-03 Mark Rowe <mrowe@apple.com> |
|
532 |
|
533 Reviewed by Tim Hatcher. |
|
534 |
|
535 <rdar://problem/5452164> Production build with in symbols directory has no debug info |
|
536 |
|
537 Enable debug symbol generation on all build configurations. Production builds are stripped |
|
538 of symbols by Xcode during deployment post-processing. |
|
539 |
|
540 * Configurations/Base.xcconfig: |
|
541 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
542 |
|
543 2007-08-30 Riku Voipio <riku.voipio@iki.fi> |
|
544 |
|
545 Reviewed by Dave Kilzer. |
|
546 |
|
547 Better ARM defines. |
|
548 |
|
549 * kjs/ustring.h: Update comments to reflect the change and update test |
|
550 to fit changes to Platform.h. |
|
551 * wtf/Platform.h: Forced packing is only needed on oldabi ARM. |
|
552 Set middle-endian floats only for little-endian oldabi ARM. |
|
553 Set big-endian define for big-endian ARM. |
|
554 |
|
555 2007-08-29 Ryan Leavengood <leavengood@gmail.com> |
|
556 |
|
557 Reviewed by Maciej. |
|
558 |
|
559 http://bugs.webkit.org/show_bug.cgi?id=15043 |
|
560 - posix_memalign takes a void** as its first parameter. My port makes use of this function call. |
|
561 |
|
562 * kjs/collector.cpp: |
|
563 (KJS::allocateBlock): |
|
564 |
|
565 2007-08-26 Darin Adler <darin@apple.com> |
|
566 |
|
567 - quick follow on to that last check-in |
|
568 |
|
569 * API/JSCallbackObject.cpp: (KJS::JSCallbackObject::JSCallbackObject): |
|
570 Need to initialize m_class to 0. |
|
571 |
|
572 2007-08-26 Mark Rowe <mrowe@apple.com> |
|
573 |
|
574 Reviewed by Darin Adler. |
|
575 |
|
576 <rdar://problem/4949002> JSGlobalContextCreate can cause crashes because it passes a NULL JSContextRef to the globalObjectClass's initialize callback |
|
577 |
|
578 JSCallbackObject now tracks whether it was constructed with a null ExecState. This will happen when the object is being used as the global object, |
|
579 as the Interpreter needs to be created after the global object. In this situation the initialization is deferred until after the Interpreter's |
|
580 ExecState is available to be passed down to the initialize callbacks. |
|
581 |
|
582 * API/JSCallbackObject.cpp: |
|
583 (KJS::JSCallbackObject::init): Track whether we successfully initialized. |
|
584 (KJS::JSCallbackObject::initializeIfNeeded): Attempt to initialize with the new ExecState. |
|
585 * API/JSCallbackObject.h: |
|
586 * API/JSContextRef.cpp: |
|
587 (JSGlobalContextCreate): Initialize the JSCallbackObject with the Interpreter's ExecState. |
|
588 * API/testapi.c: |
|
589 (testInitializeOfGlobalObjectClassHasNonNullContext): |
|
590 (main): Verify that the context passed to the initialize callback is non-null. |
|
591 |
|
592 2007-08-26 Mark Rowe <mrowe@apple.com> |
|
593 |
|
594 Reviewed by Darin Adler. |
|
595 |
|
596 <rdar://problem/5438496> JSGlobalContextCreate crashes when passed a custom class |
|
597 |
|
598 * API/JSContextRef.cpp: |
|
599 (JSGlobalContextCreate): Specify jsNull() as the prototype and let Interpreter's constructor fix it up to point at builtinObjectPrototype(). |
|
600 * API/testapi.c: |
|
601 (main): Use an instance of a custom class as the global object to ensure the code path is exercised in the test. |
|
602 |
|
603 2007-08-26 Mike Hommey <glandium@debian.org> |
|
604 |
|
605 Reviewed by Mark Rowe and David Kilzer. |
|
606 |
|
607 Fix build failure on arm. |
|
608 |
|
609 * wtf/Platform.h: Also test if __arm__ is defined. |
|
610 |
|
611 2007-08-25 Peter Kasting <zerodpx@gmail.org> |
|
612 |
|
613 Reviewed by Maciej Stachowiak. |
|
614 |
|
615 Part 3 of http://bugs.webkit.org/show_bug.cgi?id=14967 |
|
616 Bug 14967: Reduce wtf::Vector::operator[]() overloads |
|
617 |
|
618 * wtf/Vector.h: |
|
619 (WTF::Vector::operator[]): Only provide versions of operator[] that takes a size_t argument. |
|
620 |
|
621 2007-08-25 Peter Kasting <zerodpx@gmail.org> |
|
622 |
|
623 Reviewed by Sam Weinig. |
|
624 |
|
625 Part 2 of http://bugs.webkit.org/show_bug.cgi?id=14967. |
|
626 Eliminate all remaining implicit conversions of wtf::Vector<T> to T*. Where code was |
|
627 previously checking that the Vector's data pointer was non-NULL, check !Vector::isEmpty() |
|
628 instead. |
|
629 |
|
630 * wtf/Vector.h: |
|
631 (WTF::Vector::data): |
|
632 |
|
633 2007-08-16 Kevin McCullough <kmccullough@apple.com> |
|
634 |
|
635 Reviewed by Geoff and Adam. |
|
636 |
|
637 - Changing stack depth to 500 (from 100 on mac and win) to help out some apps specifically gmail. <rdar://problem/3590522> JavaScript call stack limit of 99 is too small for some applications; needs to be closer to 500 (4045) |
|
638 |
|
639 * kjs/object.cpp: |
|
640 |
|
641 2007-08-15 Peter Kasting <zerodpx@gmail.org> |
|
642 |
|
643 Reviewed by Darin. |
|
644 |
|
645 http://bugs.webkit.org/show_bug.cgi?id=14967 part 1 - Eliminate most implicit |
|
646 conversions of wtf::Vector<T> to T* by explicitly calling .data() |
|
647 |
|
648 * API/JSCallbackConstructor.cpp: |
|
649 (KJS::JSCallbackConstructor::construct): |
|
650 * API/JSCallbackFunction.cpp: |
|
651 (KJS::JSCallbackFunction::callAsFunction): |
|
652 * API/JSCallbackObject.cpp: |
|
653 (KJS::JSCallbackObject::construct): |
|
654 (KJS::JSCallbackObject::callAsFunction): |
|
655 * bindings/c/c_instance.cpp: |
|
656 (KJS::Bindings::CInstance::invokeMethod): |
|
657 (KJS::Bindings::CInstance::invokeDefaultMethod): |
|
658 * kjs/number_object.cpp: |
|
659 (integer_part_noexp): |
|
660 (char_sequence): |
|
661 * kjs/ustring.cpp: |
|
662 (KJS::UString::UTF8String): |
|
663 |
|
664 2007-08-14 Darin Adler <darin@apple.com> |
|
665 |
|
666 Reviewed by Sam. |
|
667 |
|
668 - fix <rdar://problem/5410570> Global initializer introduced by use of std::numeric_limits in r24919 |
|
669 |
|
670 * kjs/ustring.cpp: |
|
671 (KJS::overflowIndicator): Turned into a function. |
|
672 (KJS::maxUChars): Ditto. |
|
673 (KJS::allocChars): Use the functions. |
|
674 (KJS::reallocChars): Ditto. |
|
675 (KJS::UString::expandedSize): Ditto. |
|
676 |
|
677 2007-08-12 Darin Adler <darin@apple.com> |
|
678 |
|
679 Reviewed by Maciej. |
|
680 |
|
681 - fix http://bugs.webkit.org/show_bug.cgi?id=14931 |
|
682 <rdar://problem/5403816> JavaScript regular expression non-participating capturing parentheses |
|
683 fail in 3 different ways |
|
684 |
|
685 Test: fast/js/regexp-non-capturing-groups.html |
|
686 |
|
687 * kjs/string_object.cpp: |
|
688 (KJS::replace): Add missing code to handle undefined backreferences; before we'd get the empty string |
|
689 instead of a JavaScript "undefined" value. |
|
690 (KJS::StringProtoFunc::callAsFunction): Implemented backreference support for split. |
|
691 * pcre/pcre_exec.c: (match): Made backreferences to undefined groups match the empty string instead |
|
692 of always failing. Only in JAVASCRIPT mode. |
|
693 |
|
694 * tests/mozilla/expected.html: Add a new expected test success, since this fixed one test result. |
|
695 |
|
696 2007-08-10 Timothy Hatcher <timothy@apple.com> |
|
697 |
|
698 Reviewed by Adam. |
|
699 |
|
700 <rdar://problem/5394449> Stop using some Carbon UI APIs for 64 bit |
|
701 |
|
702 Disable the NPAPI for 64-bit on Mac OS X. |
|
703 |
|
704 * Configurations/JavaScriptCore.xcconfig: Use the 64-bit export file. |
|
705 * JavaScriptCore.xcodeproj/project.pbxproj: Create a 64-bit export file |
|
706 that filters out the NPN fnctions. |
|
707 * bindings/NP_jsobject.cpp: #ifdef out this for 64-bit on Mac OS X |
|
708 * bindings/NP_jsobject.h: Ditto. |
|
709 * bindings/c/c_class.cpp: Ditto. |
|
710 * bindings/c/c_class.h: Ditto. |
|
711 * bindings/c/c_instance.cpp: Ditto. |
|
712 * bindings/c/c_instance.h: Ditto. |
|
713 * bindings/c/c_runtime.cpp: Ditto. |
|
714 * bindings/c/c_runtime.h: Ditto. |
|
715 * bindings/c/c_utility.cpp: Ditto. |
|
716 * bindings/c/c_utility.h: Ditto. |
|
717 * bindings/npapi.h: Ditto. |
|
718 * bindings/npruntime.cpp: Ditto. |
|
719 * bindings/npruntime.h: Ditto. |
|
720 * bindings/npruntime_impl.h: Ditto. |
|
721 * bindings/npruntime_priv.h: Ditto. |
|
722 * bindings/runtime.cpp: |
|
723 (KJS::Bindings::Instance::createBindingForLanguageInstance): |
|
724 don't creat an NPObject on Mac OS X in 64-bit. |
|
725 |
|
726 2007-08-09 Mark Rowe <mrowe@apple.com> |
|
727 |
|
728 Reviewed by Antti. |
|
729 |
|
730 <rdar://problem/5400709> Versioning in debug and release builds should include minor and tiny version before + |
|
731 |
|
732 * Configurations/Version.xcconfig: |
|
733 * JavaScriptCore.xcodeproj/project.pbxproj: Add a shell script phase to make to dependency between |
|
734 Version.xcconfig and Info.plist explicit to Xcode. |
|
735 |
|
736 2007-08-08 George Staikos <staikos@kde.org> |
|
737 |
|
738 Make it compile with Qt again. |
|
739 |
|
740 * wtf/unicode/qt4/UnicodeQt4.h: |
|
741 (WTF::Unicode::toUpper): |
|
742 |
|
743 2007-08-07 Sam Weinig <sam@webkit.org> |
|
744 |
|
745 Reviewed by Oliver. |
|
746 |
|
747 Fix for http://bugs.webkit.org/show_bug.cgi?id=14897 |
|
748 Decompilation of double negation fails and produces invalid or incorrect code |
|
749 |
|
750 Test: fast/js/function-decompilation-operators.html |
|
751 |
|
752 * kjs/nodes2string.cpp: |
|
753 (UnaryPlusNode::streamTo): Put space after unary operator. Matches Firefox. |
|
754 (NegateNode::streamTo): Diito. |
|
755 (MultNode::streamTo): Put spaces around binary operator. Matches Firefox. |
|
756 (AddNode::streamTo): Ditto. |
|
757 |
|
758 2007-08-07 Darin Adler <darin@apple.com> |
|
759 |
|
760 Reviewed by Adele. |
|
761 |
|
762 - fix <rdar://problem/5383104> REGRESSION: XHR.responseText is null instead of empty string |
|
763 in http/tests/xmlhttprequest/zero-length-response.html |
|
764 |
|
765 The new code to handle out of memory conditions was turning a "" into a null string. |
|
766 |
|
767 * kjs/ustring.h: Removed UCharReference, which has long been obsolete and unused. |
|
768 Removed copyForWriting, which was only used for the upper/lowercasing code and for |
|
769 UCharReference. |
|
770 * kjs/ustring.cpp: |
|
771 (KJS::allocChars): Removed special case that made this fail (return 0) when passed 0. |
|
772 Instead assert that we're not passed 0. Also added an overflow check for two reasons: |
|
773 1) for sizes that aren't checked this prevents us from allocating a buffer that's too |
|
774 small, and 2) for sizes where we overflowed in the expandedSize function and returned |
|
775 overflowIndicator, it guarantees we fail. |
|
776 (KJS::reallocChars): Ditto. |
|
777 (KJS::UString::expandedSize): Return a large number, overflowIndicator, rather than 0 |
|
778 for cases where we overflow. |
|
779 (KJS::UString::spliceSubstringsWithSeparators): Added a special case for empty string so |
|
780 we don't call allocChars with a length of 0. |
|
781 (KJS::UString::operator=): Added special characters for both 0 and empty string so we |
|
782 match the behavior of the constructor. This avoids calling allocChars with a length of 0 |
|
783 and making a null string rather than an empty string in that case, and also matches the |
|
784 pattern used in the rest of the functions. |
|
785 (KJS::UString::operator[]): Made the return value const so code that tries to use the |
|
786 operator to modify the string will fail. |
|
787 |
|
788 * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction): Rewrote uppercasing and |
|
789 lowercasing functions so they don't need copyForWriting any more -- it wasn't really doing |
|
790 any good for optimization purposes. Instead use a Vector and releaseBuffer. |
|
791 |
|
792 * wtf/unicode/icu/UnicodeIcu.h: Eliminate one of the versions of toLower/toUpper -- we now |
|
793 only need the version where both a source and destination buffer is passed in, not the one |
|
794 that works in place. |
|
795 * wtf/unicode/qt4/UnicodeQt4.h: Ditto. |
|
796 |
|
797 2007-08-06 Sam Weinig <sam@webkit.org> |
|
798 |
|
799 Reviewed by Oliver. |
|
800 |
|
801 Fix for http://bugs.webkit.org/show_bug.cgi?id=14891 |
|
802 Decompilation of try block immediately following "else" fails |
|
803 |
|
804 Test: fast/js/toString-try-else.html |
|
805 |
|
806 * kjs/nodes2string.cpp: |
|
807 (TryNode::streamTo): Add newline before "try". |
|
808 |
|
809 2007-08-07 Mark Rowe <mrowe@apple.com> |
|
810 |
|
811 Reviewed by Maciej. |
|
812 |
|
813 <rdar://problem/5388774> REGRESSION: Hang occurs after clicking "Attach a file " link in a new .Mac message |
|
814 |
|
815 Attempting to acquire the JSLock inside CollectorHeap::forceLock can lead to a deadlock if the thread currently |
|
816 holding the lock is waiting on the thread that is forking. It is not considered safe to use system frameworks |
|
817 after a fork without first execing[*] so it is not particularly important to ensure that the collector and |
|
818 fastMalloc allocators are unlocked in the child process. If the child process wishes to use JavaScriptCore it |
|
819 should exec after forking like it would to use any other system framework. |
|
820 [*]: <http://lists.apple.com/archives/Cocoa-dev/2005/Jan/msg00676.html> |
|
821 |
|
822 * kjs/CollectorHeapIntrospector.cpp: Remove forceLock and forceUnlock implementations. |
|
823 * kjs/CollectorHeapIntrospector.h: Stub out forceLock and forceUnlock methods. |
|
824 * wtf/FastMalloc.cpp: Ditto. |
|
825 |
|
826 2007-08-06 Darin Adler <darin@apple.com> |
|
827 |
|
828 Rubber stamped by Geoff. |
|
829 |
|
830 * kjs/ustring.h: Added an assertion which would have helped us find the |
|
831 previous bug more easily. |
|
832 |
|
833 2007-08-06 Darin Adler <darin@apple.com> |
|
834 |
|
835 Reviewed by Anders. |
|
836 |
|
837 - fix <rdar://problem/5387589> 9A514: Quartz Composer crash on launch in KJS::jsString |
|
838 |
|
839 * API/JSBase.cpp: |
|
840 (JSEvaluateScript): Turn NULL for sourceURL into UString::null(), just as JSObjectMakeFunction already does. |
|
841 (JSCheckScriptSyntax): Ditto. |
|
842 |
|
843 2007-08-06 Matt Lilek <pewtermoose@gmail.com> |
|
844 |
|
845 Not reviewed, build fix. |
|
846 |
|
847 * kjs/string_object.cpp: |
|
848 (KJS::StringProtoFunc::callAsFunction): |
|
849 |
|
850 2007-08-04 Darin Adler <darin@apple.com> |
|
851 |
|
852 Reviewed by Maciej. |
|
853 |
|
854 - fix <rdar://problem/5371862> crash in Dashcode due to Quartz Composer JavaScript garbage collector reentrancy |
|
855 |
|
856 * API/JSBase.cpp: (JSGarbageCollect): Don't call collector() if isBusy() returns true. |
|
857 |
|
858 * kjs/collector.h: Added isBusy(), removed the unused return value from collect() |
|
859 * kjs/collector.cpp: Added an "operation in progress" flag to the allocator. |
|
860 (KJS::Collector::allocate): Call abort() if an operation is already in progress. Set the new flag instead |
|
861 of using the debug-only GCLock. |
|
862 (KJS::Collector::collect): Ditto. |
|
863 (KJS::Collector::isBusy): Added. |
|
864 |
|
865 2007-08-04 Maciej Stachowiak <mjs@apple.com> |
|
866 |
|
867 Reviewed by Darin and Adam. |
|
868 |
|
869 <rdar://problem/5368990> REGRESSION: newsgator.com sign-on 6x slower than Safari 3 beta due to GC changes (14808) |
|
870 |
|
871 * kjs/string_object.cpp: |
|
872 (KJS::replace): if the string didn't change (very common in some cases) reuse the original string value. |
|
873 (KJS::StringProtoFunc::callAsFunction): Pass in the StringImp* when replacing, not just the UString. |
|
874 * kjs/string_object.h: |
|
875 (KJS::StringInstance::internalValue): covariant override to return StringImp for convenience |
|
876 |
|
877 2007-08-04 Mark Rowe <mrowe@apple.com> |
|
878 |
|
879 Reviewed by Oliver Hunt. |
|
880 |
|
881 <rdar://problem/5385145> r24843 introduces a crash on calling fork() (14878) |
|
882 http://bugs.webkit.org/show_bug.cgi?id=14878 |
|
883 |
|
884 Provide no-op functions for all members of the malloc_zone_t and malloc_introspection_t structures that we |
|
885 register to avoid crashes in system code that assumes they will be non-null. |
|
886 |
|
887 * kjs/CollectorHeapIntrospector.cpp: |
|
888 (KJS::CollectorHeapIntrospector::CollectorHeapIntrospector): |
|
889 (KJS::CollectorHeapIntrospector::forceLock): Grab the lock. |
|
890 (KJS::CollectorHeapIntrospector::forceUnlock): Release the lock. |
|
891 * kjs/CollectorHeapIntrospector.h: |
|
892 (KJS::CollectorHeapIntrospector::goodSize): |
|
893 (KJS::CollectorHeapIntrospector::check): |
|
894 (KJS::CollectorHeapIntrospector::print): |
|
895 (KJS::CollectorHeapIntrospector::log): |
|
896 (KJS::CollectorHeapIntrospector::statistics): |
|
897 (KJS::CollectorHeapIntrospector::size): |
|
898 (KJS::CollectorHeapIntrospector::zoneMalloc): |
|
899 (KJS::CollectorHeapIntrospector::zoneCalloc): |
|
900 (KJS::CollectorHeapIntrospector::zoneFree): |
|
901 * wtf/FastMalloc.cpp: |
|
902 (WTF::FastMallocZone::goodSize): |
|
903 (WTF::FastMallocZone::check): |
|
904 (WTF::FastMallocZone::print): |
|
905 (WTF::FastMallocZone::log): |
|
906 (WTF::FastMallocZone::forceLock): Grab the TCMalloc locks. |
|
907 (WTF::FastMallocZone::forceUnlock): Release the TCMalloc locks. |
|
908 (WTF::FastMallocZone::FastMallocZone): |
|
909 |
|
910 2007-08-04 Mark Rowe <mrowe@apple.com> |
|
911 |
|
912 Rubber-stamped by Anders. |
|
913 |
|
914 * pcre/pcre_compile.c: Remove non-ASCII character from a comment. |
|
915 |
|
916 2007-08-02 Mark Rowe <mrowe@apple.com> |
|
917 |
|
918 Reviewed by Geoff Garen. |
|
919 |
|
920 <rdar://problem/4212199> 'leaks' reports false leaks in WebKit (because the WTF allocator uses mmap?) |
|
921 |
|
922 Implement malloc zone introspection routines to allow leaks, heap, and friends to request information |
|
923 about specific memory regions that were allocated by FastMalloc or the JavaScriptCore collector. |
|
924 |
|
925 This requires tool-side support before the regions will be displayed. The addition of that support is |
|
926 tracked by <rdar://problems/5353057&5353060>. |
|
927 |
|
928 * JavaScriptCore.exp: Export the two variables that are used by leaks to introspect the allocators. |
|
929 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
930 * kjs/AllInOneFile.cpp: |
|
931 * kjs/CollectorHeapIntrospector.cpp: Added. |
|
932 (KJS::): |
|
933 (KJS::CollectorHeapIntrospector::init): |
|
934 (KJS::CollectorHeapIntrospector::CollectorHeapIntrospector): Create and register our zone with the system. |
|
935 (KJS::CollectorHeapIntrospector::enumerate): Iterate over the CollectorBlocks that are in use and report them to the caller as being used. |
|
936 * kjs/CollectorHeapIntrospector.h: Added. |
|
937 (KJS::CollectorHeapIntrospector::size): Return zero to indicate the specified pointer does not belong to this zone. |
|
938 * kjs/collector.cpp: |
|
939 (KJS::Collector::registerThread): Register the CollectorHeapIntrospector with the system when the first thread is registered with the collector. |
|
940 * wtf/FastMalloc.cpp: |
|
941 (WTF::TCMalloc_PageHeap::GetDescriptorEnsureSafe): |
|
942 (WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects): Enumerate the objects on the free list. |
|
943 (WTF::TCMalloc_ThreadCache::enumerateFreeObjects): Ditto. |
|
944 (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Ditto. |
|
945 (WTF::TCMalloc_ThreadCache::InitModule): Register the FastMallocZone with the system when initializing TCMalloc. |
|
946 (WTF::FreeObjectFinder::FreeObjectFinder): |
|
947 (WTF::FreeObjectFinder::visit): Add an object to the free list. |
|
948 (WTF::FreeObjectFinder::isFreeObject): |
|
949 (WTF::FreeObjectFinder::freeObjectCount): |
|
950 (WTF::FreeObjectFinder::findFreeObjects): Find the free objects within a thread cache or free list. |
|
951 (WTF::PageMapFreeObjectFinder::PageMapFreeObjectFinder): Find the free objects within a TC_PageMap. |
|
952 (WTF::PageMapFreeObjectFinder::visit): Called once per allocated span. Record whether the span or any subobjects are free. |
|
953 (WTF::PageMapMemoryUsageRecorder::PageMapMemoryUsageRecorder): |
|
954 (WTF::PageMapMemoryUsageRecorder::visit): Called once per allocated span. Report the range of memory as being allocated, and the span or |
|
955 its subobjects as being used if they do not appear on the free list. |
|
956 (WTF::FastMallocZone::enumerate): Map the key remote TCMalloc data structures into our address space. We then locate all free memory ranges |
|
957 before reporting the other ranges as being in use. |
|
958 (WTF::FastMallocZone::size): Determine whether the given pointer originates from within our allocation zone. If so, |
|
959 we return its allocation size. |
|
960 (WTF::FastMallocZone::zoneMalloc): |
|
961 (WTF::FastMallocZone::zoneCalloc): |
|
962 (WTF::FastMallocZone::zoneFree): |
|
963 (WTF::FastMallocZone::zoneRealloc): |
|
964 (WTF::): |
|
965 (WTF::FastMallocZone::FastMallocZone): Create and register our zone with the system. |
|
966 (WTF::FastMallocZone::init): |
|
967 * wtf/MallocZoneSupport.h: Added. |
|
968 (WTF::RemoteMemoryReader::RemoteMemoryReader): A helper class to ease the process of mapping memory in a different process into |
|
969 our local address space |
|
970 (WTF::RemoteMemoryReader::operator()): |
|
971 * wtf/TCPageMap.h: |
|
972 (TCMalloc_PageMap2::visit): Walk over the heap and visit each allocated span. |
|
973 (TCMalloc_PageMap3::visit): Ditto. |
|
974 |
|
975 2007-08-02 Mark Rowe <mrowe@apple.com> |
|
976 |
|
977 Build fix. |
|
978 |
|
979 * kjs/ustring.cpp: |
|
980 (KJS::UString::expandedSize): Use std::numeric_limits<size_t>::max() rather than the non-portable SIZE_T_MAX. |
|
981 |
|
982 2007-08-02 Mark Rowe <mrowe@apple.com> |
|
983 |
|
984 Reviewed by Maciej. |
|
985 |
|
986 <rdar://problem/5352887> "Out of memory" error during repeated JS string concatenation leaks hundreds of MBs of RAM |
|
987 |
|
988 A call to fastRealloc was failing which lead to UString::expandCapacity leaking the buffer it was trying to reallocate. |
|
989 It also resulted in the underlying UString::rep having both a null baseString and buf field, which meant that attempting |
|
990 to access the contents of the string after the failed memory reallocation would crash. |
|
991 |
|
992 A third issue is that expandedSize size was calculating the new length in a way that led to an integer overflow occurring. |
|
993 Attempting to allocate a string more than 190,000,000 characters long would fail a the integer overflow would lead to a |
|
994 memory allocation of around 3.6GB being attempted rather than the expected 390MB. Sizes that would lead to an overflow |
|
995 are now returned as zero and callers are updated to treat this as though the memory allocation has failed. |
|
996 |
|
997 * kjs/array_object.cpp: |
|
998 (ArrayProtoFunc::callAsFunction): Check whether the append failed and raise an "Out of memory" exception if it did. |
|
999 * kjs/ustring.cpp: |
|
1000 (KJS::allocChars): Wrapper around fastMalloc that takes a length in characters. It will return 0 when asked to allocate a zero-length buffer. |
|
1001 (KJS::reallocChars): Wrapper around fastRealloc that takes a length in characters. It will return 0 when asked to allocate a zero-length buffer. |
|
1002 (KJS::UString::expandedSize): Split the size calculation in two and guard against overflow during each step. |
|
1003 (KJS::UString::expandCapacity): Don't leak r->buf if reallocation fails. Instead free the memory and use the null representation. |
|
1004 (KJS::UString::expandPreCapacity): If fastMalloc fails then use the null representation rather than crashing in memcpy. |
|
1005 (KJS::UString::UString): If calls to expandCapacity, expandPreCapacity or fastMalloc fail then use the null representation rather than crashing in memcpy. |
|
1006 (KJS::UString::append): Ditto. |
|
1007 (KJS::UString::operator=): Ditto. |
|
1008 * kjs/ustring.h: Change return type of expandedSize from int to size_t. |
|
1009 |
|
1010 2007-08-01 Darin Adler <darin@apple.com> |
|
1011 |
|
1012 Reviewed by Kevin McCullough. |
|
1013 |
|
1014 - fix <rdar://problem/5375186> pointers to pieces of class definition passed to JSClassCreate should all be const |
|
1015 |
|
1016 * API/JSObjectRef.h: Added const. |
|
1017 |
|
1018 * API/JSClassRef.cpp: |
|
1019 (OpaqueJSClass::OpaqueJSClass): Added const. |
|
1020 (OpaqueJSClass::create): Added const. |
|
1021 * API/JSObjectRef.cpp: |
|
1022 (JSClassCreate): Added const. |
|
1023 |
|
1024 2007-08-01 Steve Falkenburg <sfalken@apple.com> |
|
1025 |
|
1026 Build mod: Fix sln to match configs in vcproj. |
|
1027 |
|
1028 Reviewed by Adam. |
|
1029 |
|
1030 * JavaScriptCore.vcproj/JavaScriptCore.make: |
|
1031 * JavaScriptCore.vcproj/JavaScriptCore.sln: |
|
1032 |
|
1033 2007-07-30 Simon Hausmann <hausmann@kde.org> |
|
1034 |
|
1035 Done with and reviewed by Lars. |
|
1036 |
|
1037 Removed the __BUILDING_QT ifdef in JSStringRef.h and changed UChar for the Qt build to use wchar_t on Windows. |
|
1038 |
|
1039 * API/JSStringRef.h: |
|
1040 * wtf/unicode/qt4/UnicodeQt4.h: |
|
1041 |
|
1042 2007-07-27 Simon Hausmann <hausmann@kde.org> |
|
1043 |
|
1044 Done with and reviewed by Lars and Zack. |
|
1045 |
|
1046 Always define JSChar to be unsigned short for the Qt builds, to ensure compatibility with UChar. |
|
1047 |
|
1048 * API/JSStringRef.h: |
|
1049 |
|
1050 2007-07-27 Simon Hausmann <hausmann@kde.org> |
|
1051 |
|
1052 Done with and reviewed by Lars and Zack. |
|
1053 |
|
1054 Fix compilation with Qt on Windows with MingW: Implemented currentThreadStackBase() for this platform. |
|
1055 |
|
1056 * kjs/collector.cpp: |
|
1057 (KJS::currentThreadStackBase): |
|
1058 |
|
1059 2007-07-27 Simon Hausmann <hausmann@kde.org> |
|
1060 |
|
1061 Done with and reviewed by Lars and Zack. |
|
1062 |
|
1063 Fix compilation with Qt on Windows with MingW: The MingW headers do not provide a prototype for a reentrant version of localtime. But since we don't use multiple threads for the Qt build we can use the plain localtime() function. |
|
1064 |
|
1065 * kjs/DateMath.cpp: |
|
1066 (KJS::getDSTOffsetSimple): |
|
1067 |
|
1068 2007-07-27 Simon Hausmann <hausmann@kde.org> |
|
1069 |
|
1070 Done with and reviewed by Lars and Zack. |
|
1071 |
|
1072 Use $(MOVE) instead of mv to eliminated the shell dependency and replaced the long shell line to call bison and modify the css grammar file with a few lines of portable perl code. |
|
1073 |
|
1074 * JavaScriptCore.pri: |
|
1075 |
|
1076 2007-07-27 Simon Hausmann <hausmann@kde.org> |
|
1077 |
|
1078 Done with and reviewed by Lars and Zack. |
|
1079 |
|
1080 Implemented currentTime() in the interpreter by using QDateTime, so that we don't need timeGetTime() on Windows and therefore also don't need to link against Winmm.dll. |
|
1081 |
|
1082 * kjs/interpreter.cpp: |
|
1083 (KJS::getCurrentTime): |
|
1084 * kjs/testkjs.cpp: |
|
1085 (StopWatch::start): |
|
1086 (StopWatch::stop): |
|
1087 |
|
1088 2007-07-27 Simon Hausmann <hausmann@kde.org> |
|
1089 |
|
1090 Done with and reviewed by Lars and Zack. |
|
1091 |
|
1092 Replace the use of snprintf with QByteArray to compile under msvc 2005 express. |
|
1093 |
|
1094 * bindings/qt/qt_instance.cpp: |
|
1095 (KJS::Bindings::QtInstance::stringValue): |
|
1096 |
|
1097 2007-07-27 Simon Hausmann <hausmann@kde.org> |
|
1098 |
|
1099 Done with and reviewed by Lars and Zack. |
|
1100 |
|
1101 Don't use pthread.h unless thread support is enabled. |
|
1102 |
|
1103 * kjs/collector.cpp: |
|
1104 (KJS::Collector::registerAsMainThread): |
|
1105 (KJS::onMainThread): |
|
1106 |
|
1107 2007-07-27 Simon Hausmann <hausmann@kde.org> |
|
1108 |
|
1109 Done with and reviewed by Lars and Zack. |
|
1110 |
|
1111 Removed TCSystemMalloc from the Qt build, it's not necessary it seems. |
|
1112 |
|
1113 * JavaScriptCore.pri: |
|
1114 |
|
1115 2007-07-27 Simon Hausmann <hausmann@kde.org> |
|
1116 |
|
1117 Done with and reviewed by Lars and Zack. |
|
1118 |
|
1119 Added os-win32 to the include search path for the Qt windows build in order to provide the fake stdint.h header file. |
|
1120 |
|
1121 * JavaScriptCore.pri: |
|
1122 |
|
1123 2007-07-25 Maciej Stachowiak <mjs@apple.com> |
|
1124 |
|
1125 Reviewed by Mark. |
|
1126 |
|
1127 - follow-up to previous change |
|
1128 |
|
1129 * kjs/ustring.cpp: |
|
1130 (KJS::UString::operator=): Make sure to reset the length when |
|
1131 replacing the buffer contents for a single-owned string. |
|
1132 |
|
1133 2007-07-25 Maciej Stachowiak <mjs@apple.com> |
|
1134 |
|
1135 Reviewed by Darin. |
|
1136 |
|
1137 - JavaScriptCore part of fix for <rdar://problem/5300291> Optimize GC to reclaim big, temporary objects (like XMLHttpRequest.responseXML) quickly |
|
1138 |
|
1139 Also, as a side effect of optimizations included in this patch: |
|
1140 - 7% speedup on JavaScript iBench |
|
1141 - 4% speedup on "Celtic Kane" JS benchmark |
|
1142 |
|
1143 The basic idea is explained in a big comment in collector.cpp. When unusually |
|
1144 large objecs are allocated, we push the next GC closer on the assumption that |
|
1145 most objects are short-lived. |
|
1146 |
|
1147 I also did the following two optimizations in the course of tuning |
|
1148 this not to be a performance regression: |
|
1149 |
|
1150 1) Change UString::Rep to hold a self-pointer as the baseString in |
|
1151 the unshared case, instead of a null pointer; this removes a |
|
1152 number of null checks in hot code because many places already |
|
1153 wanted to use the rep itself or the baseString as appropriate. |
|
1154 |
|
1155 2) Avoid creating duplicate StringImpls when creating a |
|
1156 StringInstance (the object wrapper for a JS string) or calling |
|
1157 their methods. Since a temporary wrapper object is made every time |
|
1158 a string method is called, this resulted in two useless extra |
|
1159 StringImpls being allocated for no reason whenever a String method |
|
1160 was invoked on a string value. Now we bypass those. |
|
1161 |
|
1162 * kjs/collector.cpp: |
|
1163 (KJS::): |
|
1164 (KJS::Collector::recordExtraCost): Basics of the extra cost mechanism. |
|
1165 (KJS::Collector::allocate): ditto |
|
1166 (KJS::Collector::collect): ditto |
|
1167 * kjs/collector.h: |
|
1168 (KJS::Collector::reportExtraMemoryCost): ditto |
|
1169 * kjs/array_object.cpp: |
|
1170 (ArrayInstance::ArrayInstance): record extra cost |
|
1171 * kjs/internal.cpp: |
|
1172 (KJS::StringImp::toObject): don't create a whole new StringImpl just |
|
1173 to be the internal value of a StringInstance! StringImpls are immutable |
|
1174 so there's no point tot his. |
|
1175 * kjs/internal.h: |
|
1176 (KJS::StringImp::StringImp): report extra cost |
|
1177 * kjs/string_object.cpp: |
|
1178 (KJS::StringInstance::StringInstance): new version that takes a StringImp |
|
1179 (KJS::StringProtoFunc::callAsFunction): don't create a whole new StringImpl |
|
1180 just to convert self to string! we already have one in the internal value |
|
1181 * kjs/string_object.h: report extra cost |
|
1182 * kjs/ustring.cpp: All changes to handle baseString being self instead of null in the |
|
1183 unshared case. |
|
1184 (KJS::): |
|
1185 (KJS::UString::Rep::create): |
|
1186 (KJS::UString::Rep::destroy): |
|
1187 (KJS::UString::usedCapacity): |
|
1188 (KJS::UString::usedPreCapacity): |
|
1189 (KJS::UString::expandCapacity): |
|
1190 (KJS::UString::expandPreCapacity): |
|
1191 (KJS::UString::UString): |
|
1192 (KJS::UString::append): |
|
1193 (KJS::UString::operator=): |
|
1194 (KJS::UString::copyForWriting): |
|
1195 * kjs/ustring.h: |
|
1196 (KJS::UString::Rep::baseIsSelf): new method, now that baseString is |
|
1197 self instead of null in the unshared case we can't just null check. |
|
1198 (KJS::UString::Rep::data): adjusted as mentioned above |
|
1199 (KJS::UString::cost): new method to compute the cost for a UString, for |
|
1200 use by StringImpl. |
|
1201 |
|
1202 * kjs/value.cpp: |
|
1203 (KJS::jsString): style fixups. |
|
1204 (KJS::jsOwnedString): new method, use this for strings allocated from UStrings |
|
1205 held by the parse tree. Tracking their cost as part of string cost is pointless, |
|
1206 because garbage collecting them will not actually free the relevant string buffer. |
|
1207 * kjs/value.h: prototyped jsOwnedString. |
|
1208 * kjs/nodes.cpp: |
|
1209 (StringNode::evaluate): use jsOwnedString as appropriate |
|
1210 (RegExpNode::evaluate): ditto |
|
1211 (PropertyNameNode::evaluate): ditto |
|
1212 (ForInNode::execute): ditto |
|
1213 |
|
1214 * JavaScriptCore.exp: Exported some new symbols. |
|
1215 |
|
1216 2007-07-23 Anders Carlsson <andersca@apple.com> |
|
1217 |
|
1218 Reviewed by Geoff. |
|
1219 |
|
1220 <rdar://problem/5121461> REGRESSION: Unable to load JigZone puzzle |
|
1221 |
|
1222 * bindings/jni/jni_jsobject.cpp: |
|
1223 (JavaJSObject::createNative): |
|
1224 |
|
1225 Call RootObject::gcProtect on the global object, thereby putting it in the |
|
1226 "protect count" set which is used for checking if a native handle is valid. |
|
1227 |
|
1228 2007-07-23 Darin Adler <darin@apple.com> |
|
1229 |
|
1230 * pcre/pcre_compile.c: Roll back a tiny accidental change in the unused !JAVASCRIPT |
|
1231 side of an #ifdef. This has no effect when using PCRE in JAVASCRIPT mode as we do, |
|
1232 but seems worth rolling back. |
|
1233 |
|
1234 2007-07-23 Maciej Stachowiak <mjs@apple.com> |
|
1235 |
|
1236 Reviewed by Oliver. |
|
1237 |
|
1238 - fix remaining problems with Window shadowing |
|
1239 |
|
1240 * kjs/nodes.cpp: |
|
1241 (VarDeclNode::evaluate): Tweak the special case a little. |
|
1242 |
|
1243 2007-07-23 Maciej Stachowiak <mjs@apple.com> |
|
1244 |
|
1245 Reviewed by Oliver. |
|
1246 |
|
1247 - fix Window shadowing regressions caused by the previous commit. |
|
1248 |
|
1249 * kjs/nodes.cpp: |
|
1250 (VarDeclNode::evaluate): Handle the case of global scope specially. |
|
1251 |
|
1252 2007-07-22 Maciej Stachowiak <mjs@apple.com> |
|
1253 |
|
1254 Reviewed by Darin. |
|
1255 |
|
1256 -fixed <rdar://problem/5353293> REGRESSION (r24287): 1% i-Bench JS slowdown from JavaScript compatibility fix (14719) |
|
1257 http://bugs.webkit.org/show_bug.cgi?id=14719 |
|
1258 |
|
1259 My fix for this actually resulted in JS iBench being 1% faster than before the regression |
|
1260 and the Celtic Kane benchmark being 5% faster than before the regression. |
|
1261 |
|
1262 * kjs/nodes.cpp: |
|
1263 (VarDeclNode::handleSlowCase): factored out the slow code path to be out of line. |
|
1264 (VarDeclNode::evaluate): I did a couple of things: |
|
1265 (1) Don't check if the variable is already declared by looking for the property in |
|
1266 the variable object, that code path was dead code. |
|
1267 (2) Special-case the common case where the top of the scope and the variable object |
|
1268 are the same; in that case the variable must always be in the variable object. |
|
1269 (3) Don't return a jsString() of the variable name, nothing uses the return value |
|
1270 from this node types evaluate method. |
|
1271 * kjs/nodes.h: |
|
1272 |
|
1273 2007-07-22 Darin Adler <darin@apple.com> |
|
1274 |
|
1275 Reviewed by Kevin Decker. |
|
1276 |
|
1277 - fix <rdar://problem/5126394> REGRESSION: Crash after clicking back button in test application (13250) |
|
1278 http://bugs.webkit.org/show_bug.cgi?id=13250 |
|
1279 |
|
1280 * bindings/objc/objc_utility.mm: (KJS::Bindings::convertObjcValueToValue): |
|
1281 If the object returns 0 for _imp, convert that to "undefined", since callers |
|
1282 can't cope with a JSValue of 0. |
|
1283 |
|
1284 2007-07-19 Geoffrey Garen <ggaren@apple.com> |
|
1285 |
|
1286 Reviewed by Darin Adler. |
|
1287 |
|
1288 Fixed http://bugs.webkit.org/show_bug.cgi?id=10880 | <rdar://problem/5335694> |
|
1289 REGRESSION: JavaScript menu doesn't appear on pricepoint.com (14595) |
|
1290 |
|
1291 Though the ECMA spec says auto-semicolon insertion should not occur |
|
1292 without a newline or '}', Firefox treats do-while specially, and the |
|
1293 library used by pricepoint.com requires that special treatment. |
|
1294 |
|
1295 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
1296 * kjs/grammar.y: |
|
1297 |
|
1298 2007-07-19 Darin Adler <darin@apple.com> |
|
1299 |
|
1300 Reviewed by Geoff. |
|
1301 |
|
1302 - fix <rdar://problem/5345440> PCRE computes wrong length for expressions with quantifiers |
|
1303 on named recursion or subexpressions |
|
1304 |
|
1305 It's challenging to implement proper preflighting for compiling these advanced features. |
|
1306 But we don't want them in the JavaScript engine anyway. |
|
1307 |
|
1308 Turned off the following features of PCRE (some of these are simply parsed and not implemented): |
|
1309 |
|
1310 \C \E \G \L \N \P \Q \U \X \Z |
|
1311 \e \l \p \u \z |
|
1312 [::] [..] [==] |
|
1313 (?#) (?<=) (?<!) (?>) |
|
1314 (?C) (?P) (?R) |
|
1315 (?0) (and 1-9) |
|
1316 (?imsxUX) |
|
1317 |
|
1318 Added the following: |
|
1319 |
|
1320 \u \v |
|
1321 |
|
1322 Because of \v, the js1_2/regexp/special_characters.js test now passes. |
|
1323 |
|
1324 To be conservative, I left some features that JavaScript doesn't want, such as |
|
1325 \012 and \x{2013}, in place. We can revisit these later; they're not directly-enough |
|
1326 related to avoiding the incorrect preflighting. |
|
1327 |
|
1328 I also didn't try to remove unused opcodes and remove code from the execution engine. |
|
1329 That could save code size and speed things up a bit, but it would require more changes. |
|
1330 |
|
1331 * kjs/regexp.h: |
|
1332 * kjs/regexp.cpp: (KJS::RegExp::RegExp): Remove the sanitizePattern workaround for |
|
1333 lack of \u support, since the PCRE code now has \u support. |
|
1334 |
|
1335 * pcre/pcre-config.h: Set JAVASCRIPT to 1. |
|
1336 * pcre/pcre_internal.h: Added ESC_v. |
|
1337 |
|
1338 * pcre/pcre_compile.c: Added a different escape table for when JAVASCRIPT is set that |
|
1339 omits all the escapes we don't want interpreted and includes '\v'. |
|
1340 (check_escape): Put !JAVASCRIPT around the code for '\l', '\L', '\N', '\u', and '\U', |
|
1341 and added code to handle '\u2013' inside JAVASCRIPT. |
|
1342 (compile_branch): Put !JAVASCRIPT if around all the code implementing the features we |
|
1343 don't want. |
|
1344 (pcre_compile2): Ditto. |
|
1345 |
|
1346 * tests/mozilla/expected.html: Updated since js1_2/regexp/special_characters.js now |
|
1347 passes. |
|
1348 |
|
1349 2007-07-18 Darin Adler <darin@apple.com> |
|
1350 |
|
1351 Reviewed by Oliver Hunt. |
|
1352 |
|
1353 - fix <rdar://problem/5345432> PCRE computes length wrong for expressions such as "[**]" |
|
1354 |
|
1355 Test: fast/js/regexp-charclass-crash.html |
|
1356 |
|
1357 * pcre/pcre_compile.c: (pcre_compile2): Fix the preflight code that calls |
|
1358 check_posix_syntax to match the actual regular expression compilation code; |
|
1359 before it was missing the check of the first character. |
|
1360 |
|
1361 2007-07-19 Holger Hans Peter Freyther <zecke@selfish.org> |
|
1362 |
|
1363 Reviewed by Mark. |
|
1364 |
|
1365 Define __BUILDING_GDK when building for Gdk to fix building testkjs on OSX. |
|
1366 |
|
1367 * JavaScriptCore.pri: |
|
1368 |
|
1369 2007-07-18 Simon Hausmann <hausmann@kde.org> |
|
1370 |
|
1371 * Fix the Qt build, call dftables from the right directory. |
|
1372 |
|
1373 Reviewed by Adam Treat. |
|
1374 |
|
1375 * pcre/pcre.pri: |
|
1376 |
|
1377 2007-07-18 Simon Hausmann <hausmann@kde.org> |
|
1378 |
|
1379 Reviewed by Zack. |
|
1380 |
|
1381 Don't call gcc directly when building the dftables tool but use a separate .pro file for the Qt build. |
|
1382 |
|
1383 * pcre/dftables.pro: Added. |
|
1384 * pcre/pcre.pri: |
|
1385 |
|
1386 2007-07-17 Cameron Zwarich <cwzwarich@uwaterloo.ca> |
|
1387 |
|
1388 Reviewed by Darin, Maciej, and Adam. |
|
1389 |
|
1390 Fixes <http://bugs.webkit.org/show_bug.cgi?id=9697>, |
|
1391 the failure of ecma/GlobalObject/15.1.2.2-2.js, |
|
1392 the failure of ecma/LexicalConventions/7.7.3-1.js, |
|
1393 and most of the failures of tests in ecma/TypeConversion/9.3.1-3.js. |
|
1394 |
|
1395 Bug 9697: parseInt results may be inaccurate for numbers greater than 2^53 |
|
1396 |
|
1397 This patch also fixes similar issues in the lexer and UString::toDouble(). |
|
1398 |
|
1399 * kjs/function.cpp: |
|
1400 (KJS::parseIntOverflow): |
|
1401 (KJS::parseInt): |
|
1402 * kjs/function.h: |
|
1403 * kjs/lexer.cpp: |
|
1404 (KJS::Lexer::lex): |
|
1405 * kjs/ustring.cpp: |
|
1406 (KJS::UString::toDouble): |
|
1407 * tests/mozilla/expected.html: |
|
1408 |
|
1409 2007-07-16 Sam Weinig <sam@webkit.org> |
|
1410 |
|
1411 Reviewed by Oliver. |
|
1412 |
|
1413 Turn off -Wshorten-64-to-32 warning for 64-bit builds. |
|
1414 |
|
1415 * Configurations/Base.xcconfig: |
|
1416 |
|
1417 2007-07-14 Brady Eidson <beidson@apple.com> |
|
1418 |
|
1419 Reviewed by Sam Weinig |
|
1420 |
|
1421 Initial check-in for <rdar://problem/3154486> - Supporting FTP directory listings in the browser |
|
1422 |
|
1423 * wtf/Platform.h: Add ENABLE_FTPDIR feature to handle building on platforms that don't have the |
|
1424 proper network-layer support |
|
1425 |
|
1426 2007-07-14 Cameron Zwarich <cwzwarich@uwaterloo.ca> |
|
1427 |
|
1428 Reviewed by Darin. |
|
1429 |
|
1430 Fixes http://bugs.webkit.org/show_bug.cgi?id=13517, |
|
1431 http://bugs.webkit.org/show_bug.cgi?id=14237, and |
|
1432 the failure of test js1_5/Scope/regress-185485.js |
|
1433 |
|
1434 Bug 13517: DOM Exception 8 in finance.aol.com sub-page |
|
1435 Bug 14237: Javascript "var" statement interprets initialization in the topmost function scope |
|
1436 |
|
1437 * kjs/nodes.cpp: |
|
1438 (VarDeclNode::evaluate): |
|
1439 * tests/mozilla/expected.html: |
|
1440 |
|
1441 2007-07-12 Alexey Proskuryakov <ap@webkit.org> |
|
1442 |
|
1443 Reviewed by Mitz. |
|
1444 |
|
1445 http://bugs.webkit.org/show_bug.cgi?id=14596 |
|
1446 Fix JSC compilation with KJS_VERBOSE. |
|
1447 |
|
1448 * kjs/function.cpp: |
|
1449 (KJS::FunctionImp::passInParameters): |
|
1450 |
|
1451 2007-07-11 George Staikos <staikos@kde.org> |
|
1452 |
|
1453 Make it compile. |
|
1454 |
|
1455 * ForwardingHeaders: Added. |
|
1456 * ForwardingHeaders/JavaScriptCore: Added. |
|
1457 * ForwardingHeaders/JavaScriptCore/APICast.h: Added. |
|
1458 * ForwardingHeaders/JavaScriptCore/JSBase.h: Added. |
|
1459 * ForwardingHeaders/JavaScriptCore/JSContextRef.h: Added. |
|
1460 * ForwardingHeaders/JavaScriptCore/JSLock.h: Added. |
|
1461 * ForwardingHeaders/JavaScriptCore/JSObjectRef.h: Added. |
|
1462 * ForwardingHeaders/JavaScriptCore/JSStringRef.h: Added. |
|
1463 * ForwardingHeaders/JavaScriptCore/JSStringRefCF.h: Added. |
|
1464 * ForwardingHeaders/JavaScriptCore/JSValueRef.h: Added. |
|
1465 * ForwardingHeaders/JavaScriptCore/JavaScriptCore.h: Added. |
|
1466 |
|
1467 2007-07-11 Holger Hans Peter Freyther <zecke@selfish.org> |
|
1468 |
|
1469 Reviewed by Darin. |
|
1470 |
|
1471 As of http://bugs.webkit.org/show_bug.cgi?id=14527 move the |
|
1472 WebCore/ForwardingHeader/JavaScriptCore to JavaScriptCore |
|
1473 |
|
1474 * ForwardingHeaders: Added. |
|
1475 * ForwardingHeaders/JavaScriptCore: Copied from WebCore/ForwardingHeaders/JavaScriptCore. |
|
1476 |
|
1477 2007-07-11 Nikolas Zimmermann <zimmermann@kde.org> |
|
1478 |
|
1479 Reviewed by Mark. |
|
1480 |
|
1481 Forwardport the hash table fix from CodeGeneratorJS.pm to create_hash_table. |
|
1482 Reran run-jsc-tests, couldn't find any regressions. Suggested by Darin. |
|
1483 |
|
1484 * kjs/create_hash_table: |
|
1485 |
|
1486 2007-07-09 Maciej Stachowiak <mjs@apple.com> |
|
1487 |
|
1488 Reviewed by Oliver. |
|
1489 |
|
1490 - JavaScriptCore part of fix for: <rdar://problem/5295734> Repro crash closing tab/window @ maps.google.com in WTF::HashSet<KJS::RuntimeObjectImp*, WTF::PtrHash<KJS::RuntimeObjectImp*>, WTF::HashTraits<KJS::RuntimeObjectImp*> >::add + 11 |
|
1491 |
|
1492 * JavaScriptCore.exp: Added needed export. |
|
1493 |
|
1494 2007-07-06 Maciej Stachowiak <mjs@apple.com> |
|
1495 |
|
1496 Reviewed by Antti. |
|
1497 |
|
1498 - <rdar://problem/5311093> JavaScriptCore fails to build with strict-aliasing warnings |
|
1499 |
|
1500 * Configurations/Base.xcconfig: Re-enable -Wstrict-aliasing |
|
1501 * bindings/jni/jni_utility.cpp: |
|
1502 (KJS::Bindings::getJNIEnv): Type-pun via a union instead of a pointer cast. |
|
1503 * wtf/HashMap.h: |
|
1504 (WTF::): Instead of doing type-punned assignments via pointer cast, do one of three things: |
|
1505 (1) assign directly w/o cast if storage type matches real type; (2) assign using cast |
|
1506 via union if type does not need reffing; (3) copy with memcpy and ref/deref manually if type |
|
1507 needs reffing. This is ok peref-wise because memcpy of a constant length gets optomized. |
|
1508 HashTraits are now expected to make ref()/deref() take the storage type, not the true type. |
|
1509 * wtf/HashSet.h: |
|
1510 (WTF::): Same basic idea. |
|
1511 * wtf/HashTable.h: |
|
1512 (WTF::): Added Assigner template for use by HashMap/HashSet. Change RefCounter to call ref() |
|
1513 and deref() via storage type, avoiding the need to |
|
1514 type-pun. |
|
1515 (WTF::RefCounter::ref): ditto |
|
1516 (WTF::RefCounter::deref): ditto |
|
1517 * wtf/HashTraits.h: |
|
1518 (WTF::): Change ref() and deref() for RefPtr HashTraits to take the storage type; cast |
|
1519 via union to pointer type. |
|
1520 * wtf/FastMalloc.cpp: |
|
1521 (WTF::TCMalloc_PageHeap::init): Changed from constructor to init function so this can go in a union. |
|
1522 (WTF::): redefine pageheap macro in terms of getPageHeap(). |
|
1523 (WTF::getPageHeap): new inline function, helper for pageheap macro. This hides the cast in a union. |
|
1524 (WTF::TCMalloc_ThreadCache::InitModule): Call init() instead of using placement new to initialize page |
|
1525 heap. |
|
1526 * wtf/TCPageMap.h: |
|
1527 (TCMalloc_PageMap1::init): Changed from constructor to init function. |
|
1528 (TCMalloc_PageMap2::init): ditto |
|
1529 (TCMalloc_PageMap3::init): ditto |
|
1530 |
|
1531 |
|
1532 2007-07-06 George Staikos <staikos@kde.org> |
|
1533 |
|
1534 Reviewed by Maciej. |
|
1535 |
|
1536 Switch USE(ICONDATABASE) to ENABLE(ICONDATABASE) |
|
1537 |
|
1538 * wtf/Platform.h: |
|
1539 |
|
1540 2007-07-03 Sam Weinig <sam@webkit.org> |
|
1541 |
|
1542 Reviewed by Darin. |
|
1543 |
|
1544 Eleventh round of fixes for implicit 64-32 bit conversion errors. |
|
1545 <rdar://problem/5292262> |
|
1546 |
|
1547 - Fixes a real bug where where we were setting long long and unsigned long long |
|
1548 values to a long field. |
|
1549 |
|
1550 * bindings/objc/objc_utility.mm: |
|
1551 (KJS::Bindings::convertValueToObjcValue): |
|
1552 |
|
1553 2007-07-03 Sam Weinig <sam@webkit.org> |
|
1554 |
|
1555 Reviewed by Brady Eidson. |
|
1556 |
|
1557 Tenth round of fixes for implicit 64-32 bit conversion errors. |
|
1558 <rdar://problem/5292262> |
|
1559 |
|
1560 - Add explicit casts. |
|
1561 |
|
1562 * kjs/dtoa.cpp: |
|
1563 (Bigint::): |
|
1564 |
|
1565 2007-07-02 Sam Weinig <sam@webkit.org> |
|
1566 |
|
1567 Reviewed by Kevin McCullough. |
|
1568 |
|
1569 Fourth round of fixes for implicit 64-32 bit conversion errors. |
|
1570 <rdar://problem/5292262> |
|
1571 |
|
1572 Add custom piDouble and piFloat constants to use instead of M_PI. |
|
1573 |
|
1574 * kjs/math_object.cpp: |
|
1575 (MathObjectImp::getValueProperty): |
|
1576 * wtf/MathExtras.h: |
|
1577 (wtf_atan2): |
|
1578 |
|
1579 2007-06-29 Sam Weinig <sam@webkit.org> |
|
1580 |
|
1581 Reviewed by Darin. |
|
1582 |
|
1583 Second pass at fixing implicit 64-32 bit conversion errors. |
|
1584 <rdar://problem/5292262> |
|
1585 |
|
1586 - Add a toFloat() method to JSValue for float conversion. |
|
1587 |
|
1588 * JavaScriptCore.exp: |
|
1589 * kjs/value.cpp: |
|
1590 (KJS::JSValue::toFloat): |
|
1591 * kjs/value.h: |
|
1592 |
|
1593 2007-06-27 Kevin McCullough <kmccullough@apple.com> |
|
1594 |
|
1595 Reviewed by Darin. |
|
1596 |
|
1597 - <rdar://problem/5271937> REGRESSION: Apparent WebKit JavaScript memory smasher when submitting comment to iWeb site (crashes in kjs_pcre_compile2) |
|
1598 - Correctly evaluate the return value of _pcre_ucp_findchar. |
|
1599 |
|
1600 * pcre/pcre_compile.c: |
|
1601 (compile_branch): |
|
1602 * pcre/pcre_exec.c: |
|
1603 (match): |
|
1604 |
|
1605 2007-06-27 Sam Weinig <sam@webkit.org> |
|
1606 |
|
1607 Reviewed by Darin. |
|
1608 |
|
1609 First pass at fixing implicit 64-32 bit conversion errors. |
|
1610 <rdar://problem/5292262> |
|
1611 |
|
1612 - Add 'f' suffix where necessary. |
|
1613 |
|
1614 * kjs/testkjs.cpp: |
|
1615 (StopWatch::getElapsedMS): |
|
1616 |
|
1617 2007-06-26 Geoffrey Garen <ggaren@apple.com> |
|
1618 |
|
1619 Reviewed by Maciej Stachowiak. |
|
1620 |
|
1621 Fixed <rdar://problem/5296627> JSGarbageCollect headerdoc suggests that |
|
1622 using JavaScriptCore requires leaking memory |
|
1623 |
|
1624 * API/JSBase.h: Changed documentation to explain that you can pass NULL |
|
1625 to JSGarbageCollect. |
|
1626 |
|
1627 2007-06-26 Adam Treat <adam@staikos.net> |
|
1628 |
|
1629 Reviewed by Adam Roben. |
|
1630 |
|
1631 Make the SQLite icon database optional. |
|
1632 |
|
1633 * wtf/Platform.h: |
|
1634 |
|
1635 2007-06-15 George Staikos <staikos@kde.org> |
|
1636 |
|
1637 More missing files for Qt. |
|
1638 |
|
1639 * JavaScriptCore.pri: |
|
1640 * kjs/testkjs.pro: |
|
1641 |
|
1642 2007-06-15 George Staikos <staikos@kde.org> |
|
1643 |
|
1644 Another Qt build fix. |
|
1645 |
|
1646 * JavaScriptCore.pri: |
|
1647 * kjs/testkjs.pro: |
|
1648 |
|
1649 2007-06-15 George Staikos <staikos@kde.org> |
|
1650 |
|
1651 Fixing Qt build. |
|
1652 |
|
1653 * JavaScriptCore.pri: |
|
1654 |
|
1655 2007-06-20 Mark Rowe <mrowe@apple.com> |
|
1656 |
|
1657 Reviewed by Mitz. |
|
1658 |
|
1659 Fix http://bugs.webkit.org/show_bug.cgi?id=14244 |
|
1660 Bug 14244: Data corruption when using a replace() callback function with data containing "$" |
|
1661 |
|
1662 * kjs/string_object.cpp: |
|
1663 (KJS::replace): When 'replacement' is a function, do not replace $n placeholders in its return value. |
|
1664 This matches the behaviour described in ECMA 262 3rd Ed section 15.5.4.1, and as implemented in Firefox. |
|
1665 |
|
1666 2007-06-14 Anders Carlsson <andersca@apple.com> |
|
1667 |
|
1668 Fix Windows build. |
|
1669 |
|
1670 * bindings/runtime_object.cpp: |
|
1671 (RuntimeObjectImp::canPut): |
|
1672 |
|
1673 2007-06-14 Anders Carlsson <andersca@apple.com> |
|
1674 |
|
1675 Reviewed by Darin. |
|
1676 |
|
1677 <rdar://problem/5103077> |
|
1678 Crash at _NPN_ReleaseObject when quitting page at http://eshop.macsales.com/shop/ModBook |
|
1679 |
|
1680 <rdar://problem/5183692> |
|
1681 http://bugs.webkit.org/show_bug.cgi?id=13547 |
|
1682 REGRESSION: Crash in _NPN_ReleaseObject when closing Safari on nba.com (13547) |
|
1683 |
|
1684 <rdar://problem/5261499> |
|
1685 CrashTracer: [USER] 75 crashes in Safari at com.apple.JavaScriptCore: KJS::Bindings::CInstance::~CInstance + 40 |
|
1686 |
|
1687 Have the root object track all live instances of RuntimeObjectImp. When invalidating |
|
1688 the root object, also invalidate all live runtime objects by zeroing out their instance ivar. |
|
1689 This prevents instances from outliving their plug-ins which lead to crashes. |
|
1690 |
|
1691 * bindings/c/c_utility.cpp: |
|
1692 (KJS::Bindings::convertValueToNPVariant): |
|
1693 * bindings/jni/jni_jsobject.cpp: |
|
1694 (JavaJSObject::convertValueToJObject): |
|
1695 * bindings/jni/jni_utility.cpp: |
|
1696 (KJS::Bindings::convertValueToJValue): |
|
1697 * bindings/objc/objc_runtime.mm: |
|
1698 (ObjcFallbackObjectImp::callAsFunction): |
|
1699 * bindings/runtime_array.cpp: |
|
1700 (RuntimeArray::RuntimeArray): |
|
1701 * bindings/runtime_array.h: |
|
1702 (KJS::RuntimeArray::getConcreteArray): |
|
1703 * bindings/runtime_method.cpp: |
|
1704 (RuntimeMethod::callAsFunction): |
|
1705 * bindings/runtime_method.h: |
|
1706 * bindings/runtime_object.cpp: |
|
1707 (RuntimeObjectImp::RuntimeObjectImp): |
|
1708 (RuntimeObjectImp::~RuntimeObjectImp): |
|
1709 (RuntimeObjectImp::invalidate): |
|
1710 (RuntimeObjectImp::fallbackObjectGetter): |
|
1711 (RuntimeObjectImp::fieldGetter): |
|
1712 (RuntimeObjectImp::methodGetter): |
|
1713 (RuntimeObjectImp::getOwnPropertySlot): |
|
1714 (RuntimeObjectImp::put): |
|
1715 (RuntimeObjectImp::canPut): |
|
1716 (RuntimeObjectImp::defaultValue): |
|
1717 (RuntimeObjectImp::implementsCall): |
|
1718 (RuntimeObjectImp::callAsFunction): |
|
1719 (RuntimeObjectImp::getPropertyNames): |
|
1720 (RuntimeObjectImp::throwInvalidAccessError): |
|
1721 * bindings/runtime_object.h: |
|
1722 * bindings/runtime_root.cpp: |
|
1723 (KJS::Bindings::RootObject::invalidate): |
|
1724 (KJS::Bindings::RootObject::addRuntimeObject): |
|
1725 (KJS::Bindings::RootObject::removeRuntimeObject): |
|
1726 * bindings/runtime_root.h: |
|
1727 |
|
1728 2007-06-14 Anders Carlsson <andersca@apple.com> |
|
1729 |
|
1730 Reviewed by Mitz. |
|
1731 |
|
1732 <rdar://problem/5244948> |
|
1733 Safari keeps on complaining about slow script playing NBC TV video (14133) |
|
1734 |
|
1735 http://bugs.webkit.org/show_bug.cgi?id=14133 |
|
1736 Runaway JavaScript timer fires when spinning around in Google Maps street view |
|
1737 |
|
1738 Make sure to start and stop the timeout checker around calls to JS. |
|
1739 |
|
1740 * bindings/NP_jsobject.cpp: |
|
1741 (_NPN_InvokeDefault): |
|
1742 (_NPN_Invoke): |
|
1743 (_NPN_Evaluate): |
|
1744 * bindings/jni/jni_jsobject.cpp: |
|
1745 (JavaJSObject::call): |
|
1746 (JavaJSObject::eval): |
|
1747 |
|
1748 2007-06-13 Darin Adler <darin@apple.com> |
|
1749 |
|
1750 Reviewed by Mark Rowe. |
|
1751 |
|
1752 - fix http://bugs.webkit.org/show_bug.cgi?id=14132 |
|
1753 array sort with > 10000 elements sets elements > 10000 undefined |
|
1754 |
|
1755 Test: fast/js/sort-large-array.html |
|
1756 |
|
1757 * kjs/array_instance.h: Replaced pushUndefinedObjectsToEnd with |
|
1758 compactForSorting, and removed ExecState parameters. |
|
1759 |
|
1760 * kjs/array_object.cpp: |
|
1761 (ArrayInstance::sort): Changed to call compactForSorting. |
|
1762 (ArrayInstance::compactForSorting): Do the get and delete of the |
|
1763 properties directly on the property map instead of using public |
|
1764 calls from JSObject. The public calls would just read the undefined |
|
1765 values from the compacted sort results array! |
|
1766 |
|
1767 2007-06-13 George Staikos <staikos@kde.org> |
|
1768 |
|
1769 Reviewed by Lars. |
|
1770 |
|
1771 Fix Mac OS X build after last checkin. |
|
1772 |
|
1773 * wtf/FastMalloc.h: |
|
1774 |
|
1775 2007-06-14 Lars Knoll <lars@trolltech.com> |
|
1776 |
|
1777 Reviewed by Maciej. |
|
1778 |
|
1779 Disable FastMalloc for the Qt build and make sure we |
|
1780 don't reimplement the global new/delete operators |
|
1781 when using the system malloc. |
|
1782 |
|
1783 * wtf/FastMalloc.cpp: |
|
1784 * wtf/FastMalloc.h: |
|
1785 * wtf/Platform.h: |
|
1786 |
|
1787 2007-06-13 Anders Carlsson <andersca@apple.com> |
|
1788 |
|
1789 Reviewed by Geoff. |
|
1790 |
|
1791 Make sure that bindings instances get correct root objects. |
|
1792 |
|
1793 * JavaScriptCore.exp: |
|
1794 * bindings/NP_jsobject.cpp: |
|
1795 (listFromVariantArgs): |
|
1796 (_NPN_InvokeDefault): |
|
1797 (_NPN_Invoke): |
|
1798 (_NPN_SetProperty): |
|
1799 * bindings/c/c_instance.cpp: |
|
1800 (KJS::Bindings::CInstance::invokeMethod): |
|
1801 (KJS::Bindings::CInstance::invokeDefaultMethod): |
|
1802 * bindings/c/c_runtime.cpp: |
|
1803 (KJS::Bindings::CField::valueFromInstance): |
|
1804 * bindings/c/c_utility.cpp: |
|
1805 (KJS::Bindings::convertNPVariantToValue): |
|
1806 * bindings/c/c_utility.h: |
|
1807 * bindings/objc/objc_instance.mm: |
|
1808 (ObjcInstance::invokeMethod): |
|
1809 (ObjcInstance::invokeDefaultMethod): |
|
1810 (ObjcInstance::getValueOfUndefinedField): |
|
1811 * bindings/objc/objc_runtime.mm: |
|
1812 (ObjcField::valueFromInstance): |
|
1813 (ObjcArray::valueAt): |
|
1814 * bindings/objc/objc_utility.h: |
|
1815 * bindings/objc/objc_utility.mm: |
|
1816 (KJS::Bindings::convertObjcValueToValue): |
|
1817 * bindings/runtime.h: |
|
1818 |
|
1819 2007-06-13 Simon Hausmann <hausmann@kde.org> |
|
1820 |
|
1821 Reviewed by Lars. |
|
1822 |
|
1823 * kjs/testkjs.pro: WebKitQt is now called QtWebKit. |
|
1824 |
|
1825 2007-06-12 Anders Carlsson <andersca@apple.com> |
|
1826 |
|
1827 Another build fix. |
|
1828 |
|
1829 * bindings/qt/qt_instance.cpp: |
|
1830 (KJS::Bindings::QtInstance::invokeMethod): |
|
1831 |
|
1832 2007-06-12 Anders Carlsson <andersca@apple.com> |
|
1833 |
|
1834 Reviewed by Geoff. |
|
1835 |
|
1836 Move the notion of field type to the JNI runtime since that's the only |
|
1837 one that was actually using it. |
|
1838 |
|
1839 * bindings/c/c_runtime.h: |
|
1840 (KJS::Bindings::CField::CField): |
|
1841 * bindings/jni/jni_runtime.h: |
|
1842 * bindings/objc/objc_runtime.h: |
|
1843 * bindings/objc/objc_runtime.mm: |
|
1844 * bindings/qt/qt_runtime.h: |
|
1845 * bindings/runtime.h: |
|
1846 * bindings/runtime_method.cpp: |
|
1847 |
|
1848 2007-06-12 Anders Carlsson <andersca@apple.com> |
|
1849 |
|
1850 Build fix. |
|
1851 |
|
1852 * bindings/qt/qt_class.cpp: |
|
1853 (KJS::Bindings::QtClass::methodsNamed): |
|
1854 * bindings/qt/qt_instance.cpp: |
|
1855 (KJS::Bindings::QtInstance::invokeMethod): |
|
1856 |
|
1857 2007-06-12 Anders Carlsson <andersca@apple.com> |
|
1858 |
|
1859 Reviewed by Oliver. |
|
1860 |
|
1861 Get rid of the MethodList class and use a good ol' Vector instead. |
|
1862 |
|
1863 * bindings/c/c_class.cpp: |
|
1864 (KJS::Bindings::CClass::methodsNamed): |
|
1865 * bindings/c/c_instance.cpp: |
|
1866 (KJS::Bindings::CInstance::invokeMethod): |
|
1867 * bindings/jni/jni_class.cpp: |
|
1868 (JavaClass::JavaClass): |
|
1869 (JavaClass::~JavaClass): |
|
1870 * bindings/jni/jni_instance.cpp: |
|
1871 (JavaInstance::invokeMethod): |
|
1872 * bindings/objc/objc_class.mm: |
|
1873 (KJS::Bindings::ObjcClass::methodsNamed): |
|
1874 * bindings/objc/objc_instance.mm: |
|
1875 (ObjcInstance::invokeMethod): |
|
1876 * bindings/objc/objc_runtime.mm: |
|
1877 (ObjcFallbackObjectImp::callAsFunction): |
|
1878 * bindings/runtime.cpp: |
|
1879 * bindings/runtime.h: |
|
1880 * bindings/runtime_method.cpp: |
|
1881 (RuntimeMethod::lengthGetter): |
|
1882 (RuntimeMethod::callAsFunction): |
|
1883 * bindings/runtime_object.cpp: |
|
1884 (RuntimeObjectImp::getOwnPropertySlot): |
|
1885 |
|
1886 2007-06-12 Anders Carlsson <andersca@apple.com> |
|
1887 |
|
1888 Reviewed by Geoff. |
|
1889 |
|
1890 Make RuntimeMethod's method list a pointer so that the object size doesn't |
|
1891 grow beyond 32 bytes when we later will replace MethodList with a Vector. |
|
1892 |
|
1893 * bindings/runtime_method.cpp: |
|
1894 (RuntimeMethod::RuntimeMethod): |
|
1895 (RuntimeMethod::lengthGetter): |
|
1896 (RuntimeMethod::callAsFunction): |
|
1897 * bindings/runtime_method.h: |
|
1898 |
|
1899 2007-06-12 Anders Carlsson <andersca@apple.com> |
|
1900 |
|
1901 Reviewed by Geoff. |
|
1902 |
|
1903 Get rid of the Parameter class. |
|
1904 |
|
1905 * bindings/jni/jni_instance.cpp: |
|
1906 (JavaInstance::invokeMethod): |
|
1907 * bindings/jni/jni_runtime.cpp: |
|
1908 (JavaMethod::signature): |
|
1909 * bindings/jni/jni_runtime.h: |
|
1910 (KJS::Bindings::JavaParameter::JavaParameter): |
|
1911 (KJS::Bindings::JavaParameter::~JavaParameter): |
|
1912 (KJS::Bindings::JavaParameter::type): |
|
1913 (KJS::Bindings::JavaMethod::parameterAt): |
|
1914 (KJS::Bindings::JavaMethod::numParameters): |
|
1915 * bindings/runtime.h: |
|
1916 |
|
1917 2007-06-12 Anders Carlsson <andersca@apple.com> |
|
1918 |
|
1919 Build fix. |
|
1920 |
|
1921 * bindings/qt/qt_class.h: |
|
1922 |
|
1923 2007-06-12 Mark Rowe <mrowe@apple.com> |
|
1924 |
|
1925 Build fix. |
|
1926 |
|
1927 * bindings/objc/objc_runtime.h: |
|
1928 |
|
1929 2007-06-12 Anders Carlsson <andersca@apple.com> |
|
1930 |
|
1931 Reviewed by Geoff. |
|
1932 |
|
1933 Get rid of Constructor and its only subclass JavaConstructor. |
|
1934 |
|
1935 * bindings/c/c_class.h: |
|
1936 * bindings/jni/jni_class.cpp: |
|
1937 (JavaClass::JavaClass): |
|
1938 (JavaClass::~JavaClass): |
|
1939 * bindings/jni/jni_class.h: |
|
1940 * bindings/jni/jni_runtime.cpp: |
|
1941 * bindings/jni/jni_runtime.h: |
|
1942 * bindings/objc/objc_class.h: |
|
1943 * bindings/runtime.h: |
|
1944 |
|
1945 2007-06-12 Anders Carlsson <andersca@apple.com> |
|
1946 |
|
1947 Reviewed by Geoff. |
|
1948 |
|
1949 Use RetainPtr throughout the bindings code. |
|
1950 |
|
1951 * bindings/objc/objc_class.h: |
|
1952 * bindings/objc/objc_class.mm: |
|
1953 (KJS::Bindings::ObjcClass::ObjcClass): |
|
1954 (KJS::Bindings::ObjcClass::methodsNamed): |
|
1955 (KJS::Bindings::ObjcClass::fieldNamed): |
|
1956 * bindings/objc/objc_instance.h: |
|
1957 (KJS::Bindings::ObjcInstance::getObject): |
|
1958 * bindings/objc/objc_instance.mm: |
|
1959 (ObjcInstance::ObjcInstance): |
|
1960 (ObjcInstance::~ObjcInstance): |
|
1961 (ObjcInstance::implementsCall): |
|
1962 (ObjcInstance::invokeMethod): |
|
1963 (ObjcInstance::invokeDefaultMethod): |
|
1964 (ObjcInstance::defaultValue): |
|
1965 * bindings/objc/objc_runtime.h: |
|
1966 (KJS::Bindings::ObjcMethod::setJavaScriptName): |
|
1967 (KJS::Bindings::ObjcMethod::javaScriptName): |
|
1968 (KJS::Bindings::ObjcArray::getObjcArray): |
|
1969 * bindings/objc/objc_runtime.mm: |
|
1970 (ObjcField::name): |
|
1971 (ObjcArray::ObjcArray): |
|
1972 (ObjcArray::setValueAt): |
|
1973 (ObjcArray::valueAt): |
|
1974 (ObjcArray::getLength): |
|
1975 * wtf/RetainPtr.h: |
|
1976 |
|
1977 2007-06-12 Anders Carlsson <andersca@apple.com> |
|
1978 |
|
1979 Reviewed by Maciej. |
|
1980 |
|
1981 Have JSCell inherit from Noncopyable. |
|
1982 |
|
1983 * bindings/objc/objc_runtime.h: |
|
1984 * bindings/runtime_object.h: |
|
1985 * kjs/value.h: |
|
1986 |
|
1987 2007-06-12 Anders Carlsson <andersca@apple.com> |
|
1988 |
|
1989 Reviewed by Darin and Maciej. |
|
1990 |
|
1991 More cleanup. Use our Noncopyable WTF class, add a root object member |
|
1992 to the Array class. |
|
1993 |
|
1994 * bindings/c/c_class.h: |
|
1995 * bindings/jni/jni_class.h: |
|
1996 * bindings/jni/jni_instance.h: |
|
1997 * bindings/jni/jni_runtime.cpp: |
|
1998 (JavaArray::JavaArray): |
|
1999 * bindings/jni/jni_runtime.h: |
|
2000 * bindings/objc/objc_class.h: |
|
2001 * bindings/objc/objc_runtime.h: |
|
2002 * bindings/objc/objc_runtime.mm: |
|
2003 (ObjcArray::ObjcArray): |
|
2004 * bindings/objc/objc_utility.mm: |
|
2005 (KJS::Bindings::convertObjcValueToValue): |
|
2006 * bindings/runtime.cpp: |
|
2007 (KJS::Bindings::Array::Array): |
|
2008 (KJS::Bindings::Array::~Array): |
|
2009 * bindings/runtime.h: |
|
2010 * bindings/runtime_object.h: |
|
2011 * bindings/runtime_root.h: |
|
2012 |
|
2013 2007-06-08 Zack Rusin <zrusin@trolltech.com> |
|
2014 |
|
2015 Fix the Qt build |
|
2016 |
|
2017 * bindings/qt/qt_instance.cpp: |
|
2018 (KJS::Bindings::QtInstance::QtInstance): |
|
2019 * bindings/qt/qt_instance.h: |
|
2020 |
|
2021 2007-06-07 Anders Carlsson <andersca@apple.com> |
|
2022 |
|
2023 Reviewed by Geoff. |
|
2024 |
|
2025 Get rid of Instance::setRootObject and pass the root object to the instance constructor instead. |
|
2026 |
|
2027 * bindings/c/c_instance.cpp: |
|
2028 (KJS::Bindings::CInstance::CInstance): |
|
2029 * bindings/c/c_instance.h: |
|
2030 * bindings/jni/jni_instance.cpp: |
|
2031 (JavaInstance::JavaInstance): |
|
2032 * bindings/jni/jni_instance.h: |
|
2033 * bindings/jni/jni_jsobject.cpp: |
|
2034 (JavaJSObject::convertJObjectToValue): |
|
2035 * bindings/objc/objc_instance.h: |
|
2036 * bindings/objc/objc_instance.mm: |
|
2037 (ObjcInstance::ObjcInstance): |
|
2038 * bindings/runtime.cpp: |
|
2039 (KJS::Bindings::Instance::Instance): |
|
2040 (KJS::Bindings::Instance::createBindingForLanguageInstance): |
|
2041 * bindings/runtime.h: |
|
2042 |
|
2043 2007-06-07 Anders Carlsson <andersca@apple.com> |
|
2044 |
|
2045 Reviewed by Adam. |
|
2046 |
|
2047 Don't use a JavaInstance to store the field when all we want to do is to keep the field |
|
2048 from being garbage collected. Instead, use a JObjectWrapper. |
|
2049 |
|
2050 * bindings/jni/jni_instance.h: |
|
2051 * bindings/jni/jni_runtime.cpp: |
|
2052 (JavaField::JavaField): |
|
2053 (JavaField::dispatchValueFromInstance): |
|
2054 (JavaField::dispatchSetValueToInstance): |
|
2055 * bindings/jni/jni_runtime.h: |
|
2056 (KJS::Bindings::JavaField::JavaField): |
|
2057 (KJS::Bindings::JavaField::operator=): |
|
2058 |
|
2059 2007-05-30 Alp Toker <alp.toker@collabora.co.uk> |
|
2060 |
|
2061 Reviewed by Brady. |
|
2062 |
|
2063 Enable logging in the Gdk port. |
|
2064 http://bugs.webkit.org/show_bug.cgi?id=13936 |
|
2065 |
|
2066 * wtf/Assertions.cpp: |
|
2067 * wtf/Assertions.h: Add WTFLogVerbose which also logs |
|
2068 the file, line number and function. |
|
2069 |
|
2070 2007-05-30 Mark Rowe <mrowe@apple.com> |
|
2071 |
|
2072 Mac build fix. Update #include. |
|
2073 |
|
2074 * API/JSCallbackFunction.h: |
|
2075 |
|
2076 2007-05-30 Luciano Montanaro <mikelima@cirulla.net> |
|
2077 |
|
2078 Reviewed by Maciej. |
|
2079 |
|
2080 - cross-port Harri Porten's commits 636099 and 636108 from KJS: |
|
2081 "publish a class anyway public already" and "class is being used from |
|
2082 outside for quite some time" in preparation for further syncronizations |
|
2083 |
|
2084 * kjs/context.h: |
|
2085 * kjs/date_object.cpp: |
|
2086 * kjs/date_object.h: |
|
2087 * kjs/function.h: |
|
2088 (KJS::): |
|
2089 (KJS::InternalFunctionImp::classInfo): |
|
2090 (KJS::InternalFunctionImp::functionName): |
|
2091 * kjs/function_object.h: |
|
2092 * kjs/internal.h: |
|
2093 * kjs/lookup.h: |
|
2094 (KJS::getStaticPropertySlot): |
|
2095 (KJS::getStaticFunctionSlot): |
|
2096 (KJS::getStaticValueSlot): |
|
2097 * kjs/object_object.h: |
|
2098 |
|
2099 2007-05-29 Sam Weinig <sam@webkit.org> |
|
2100 |
|
2101 Reviewed by Adam Roben. |
|
2102 |
|
2103 Cleanup function and fix to match comparison API. |
|
2104 |
|
2105 * kjs/string_object.cpp: |
|
2106 (KJS::substituteBackreferences): |
|
2107 (KJS::localeCompare): |
|
2108 |
|
2109 2007-05-28 Geoffrey Garen <ggaren@apple.com> |
|
2110 |
|
2111 Slight clarification to an exception message. |
|
2112 |
|
2113 * API/JSCallbackObject.cpp: |
|
2114 (KJS::JSCallbackObject::put): |
|
2115 |
|
2116 2007-05-27 Holger Freyther <zecke@selfish.org> |
|
2117 |
|
2118 Reviewed by Mark Rowe. |
|
2119 |
|
2120 * wtf/Platform.h: Move Gdk up to allow building WebKit/Gdk on Darwin |
|
2121 |
|
2122 2007-05-27 Darin Adler <darin@apple.com> |
|
2123 |
|
2124 - fix a couple ifdefs that said WIN instead of WIN_OS |
|
2125 |
|
2126 * kjs/collector.cpp: |
|
2127 (KJS::allocateBlock): WIN -> WIN_OS |
|
2128 (KJS::freeBlock): Ditto. |
|
2129 |
|
2130 2007-05-26 Sam Weinig <sam@webkit.org> |
|
2131 |
|
2132 Reviewed by Darin. |
|
2133 |
|
2134 Patch for http://bugs.webkit.org/show_bug.cgi?id=13854 |
|
2135 Port of commit 667785 from kjs |
|
2136 |
|
2137 - special case calling String.localeCompare() with no parameters to return 0. |
|
2138 |
|
2139 * kjs/string_object.cpp: |
|
2140 (KJS::StringProtoFunc::callAsFunction): |
|
2141 |
|
2142 2007-05-25 Kimmo Kinnunen <kimmok@iki.fi> |
|
2143 |
|
2144 Reviewed by Darin. |
|
2145 |
|
2146 - Fix for http://bugs.webkit.org/show_bug.cgi?id=13456 |
|
2147 REGRESSION: setTimeout "arguments" object gets shadowed by a local variable |
|
2148 |
|
2149 - Add a explicit check for arguments. Previously check was done with getDirect, |
|
2150 but since the arguments is created on-demand in ActivationImp, it doesn't |
|
2151 show up in the test. 'arguments' should always be in the VarDeclNode's |
|
2152 evaluation scope. |
|
2153 |
|
2154 * kjs/nodes.cpp: |
|
2155 (VarDeclNode::evaluate): Additional check if the var decl identifier is 'arguments' |
|
2156 |
|
2157 2007-05-25 George Staikos <staikos@kde.org> |
|
2158 |
|
2159 Reviewed by Maciej. |
|
2160 |
|
2161 - Use COMPILER(GCC), not PLATFORM(GCC) - as Platform.h defines |
|
2162 |
|
2163 * wtf/FastMalloc.h: |
|
2164 |
|
2165 2007-05-25 Kimmo Kinnunen <kimmok@iki.fi> |
|
2166 |
|
2167 Reviewed by Darin. |
|
2168 |
|
2169 - http://bugs.webkit.org/show_bug.cgi?id=13623 (Decompilation of function |
|
2170 doesn't compile with "++(x,y)") |
|
2171 - Create the error node based on the actual node, not the node inside |
|
2172 parenthesis |
|
2173 - Fix applies to postfix, prefix and typeof operators |
|
2174 - Produces run-time ReferenceError like other non-lvalue assignments etc. |
|
2175 |
|
2176 * kjs/grammar.y: Create {Prefix,Postfix}ErrorNode based on the actual node, |
|
2177 not the based on the node returned by "nodeInsideAllParens()". Same for |
|
2178 TypeOfValueNode. |
|
2179 |
|
2180 2007-05-25 Simon Hausmann <hausmann@kde.org> |
|
2181 |
|
2182 Reviewed by Zack. |
|
2183 |
|
2184 Fix crash in Qt JavaScript bindings when the arguments used on the Qt side are not |
|
2185 registered with QMetaType. |
|
2186 |
|
2187 * bindings/qt/qt_instance.cpp: |
|
2188 (KJS::Bindings::QtInstance::invokeMethod): |
|
2189 * bindings/qt/qt_runtime.cpp: |
|
2190 |
|
2191 2007-05-24 Luciano Montanaro <mikelima@cirulla.net> |
|
2192 |
|
2193 Reviewed by Darin |
|
2194 |
|
2195 Patch for http://bugs.webkit.org/show_bug.cgi?id=13855 |
|
2196 Port patch 666176 to JavaScriptCore |
|
2197 |
|
2198 - Renamed JSValue::downcast() to JSValue::asCell() which makes the |
|
2199 function meaning cleaner. It's modeled after Harri Porten change in |
|
2200 KDE trunk. |
|
2201 |
|
2202 * kjs/collector.cpp: |
|
2203 (KJS::Collector::protect): |
|
2204 (KJS::Collector::unprotect): |
|
2205 (KJS::Collector::collectOnMainThreadOnly): |
|
2206 * kjs/object.h: |
|
2207 (KJS::JSValue::isObject): |
|
2208 * kjs/string_object.cpp: |
|
2209 (KJS::StringProtoFunc::callAsFunction): |
|
2210 * kjs/value.h: |
|
2211 (KJS::JSValue::asCell): |
|
2212 (KJS::JSValue::isNumber): |
|
2213 (KJS::JSValue::isString): |
|
2214 (KJS::JSValue::isObject): |
|
2215 (KJS::JSValue::getNumber): |
|
2216 (KJS::JSValue::getString): |
|
2217 (KJS::JSValue::getObject): |
|
2218 (KJS::JSValue::getUInt32): |
|
2219 (KJS::JSValue::mark): |
|
2220 (KJS::JSValue::marked): |
|
2221 (KJS::JSValue::type): |
|
2222 (KJS::JSValue::toPrimitive): |
|
2223 (KJS::JSValue::toBoolean): |
|
2224 (KJS::JSValue::toNumber): |
|
2225 (KJS::JSValue::toString): |
|
2226 (KJS::JSValue::toObject): |
|
2227 |
|
2228 2007-05-18 Holger Hans Peter Freyther <zecke@selfish.org> |
|
2229 |
|
2230 Reviewed by Mark Rowe. |
|
2231 |
|
2232 * kjs/testkjs.pro: Make the Gdk port link to icu |
|
2233 |
|
2234 2007-05-15 Geoffrey Garen <ggaren@apple.com> |
|
2235 |
|
2236 Reviewed by Adele Peterson. |
|
2237 |
|
2238 It helps if you swap the right variable. |
|
2239 |
|
2240 * wtf/HashSet.h: |
|
2241 (WTF::::operator): |
|
2242 |
|
2243 2007-05-15 Lars Knoll <lars@trolltech.com> |
|
2244 |
|
2245 Reviewed by Zack |
|
2246 |
|
2247 Extend the QObject JavaScript bindings to work for slots with |
|
2248 arguments. |
|
2249 |
|
2250 * bindings/qt/qt_instance.cpp: |
|
2251 (KJS::Bindings::QtInstance::invokeMethod): |
|
2252 |
|
2253 2007-05-14 Kimmo Kinnunen <kimmok@iki.fi> |
|
2254 |
|
2255 Reviewed by Darin. |
|
2256 |
|
2257 - Fixes http://bugs.webkit.org/show_bug.cgi?id=13622 (Decompiler |
|
2258 omits trailing comma in array literal) |
|
2259 |
|
2260 * kjs/nodes2string.cpp: |
|
2261 (ArrayNode::streamTo): print extra ',' in case there was elision |
|
2262 commas (check opt member var) and array elements present |
|
2263 in the array expression |
|
2264 |
|
2265 2007-05-14 Geoffrey Garen <ggaren@apple.com> |
|
2266 |
|
2267 Reviewed by Oliver Hunt. |
|
2268 |
|
2269 Added HashMap::swap and HashSet::swap. WebCore now uses HashSet::swap. |
|
2270 I figured while I was in the neighborhood I might as well add HashMap::swap, |
|
2271 too. |
|
2272 |
|
2273 * wtf/HashMap.h: |
|
2274 (WTF::::operator): |
|
2275 (WTF::::swap): |
|
2276 * wtf/HashSet.h: |
|
2277 (WTF::::operator): |
|
2278 (WTF::::swap): |
|
2279 |
|
2280 2007-05-11 Kimmo Kinnunen <kimmok@iki.fi> |
|
2281 |
|
2282 Reviewed by Darin. |
|
2283 |
|
2284 - Fix for bug http://bugs.webkit.org/show_bug.cgi?id=13620 |
|
2285 Bogus decompilation of "for (var j = 1 in [])" |
|
2286 - ForInNode toString()'ed to syntax error if there was var decl |
|
2287 and initializer |
|
2288 - ForNode toStringed()'ed lost 'var ' if it was present |
|
2289 |
|
2290 * kjs/nodes2string.cpp: |
|
2291 (VarDeclListNode::streamTo): Print "var " here |
|
2292 (VarStatementNode::streamTo): Don't print "var " here |
|
2293 (ForNode::streamTo): Remove TODO comment, VarDeclListNode will |
|
2294 stream the "var " |
|
2295 (ForInNode::streamTo): ForIn initializer is printed by VarDeclNode |
|
2296 |
|
2297 2007-05-11 Kimmo Kinnunen <kimmok@iki.fi> |
|
2298 |
|
2299 Reviewed by Darin. |
|
2300 |
|
2301 - Fixes http://bugs.webkit.org/show_bug.cgi?id=10878 |
|
2302 (Incorrect decompilation for "4..x") |
|
2303 - Group numbers in dotted expressions in toString() output, so we |
|
2304 avoid the 4.x constructs when the original input is 4..x. |
|
2305 4..x means the same as 4. .x or (4).x or Number(4).x |
|
2306 |
|
2307 * kjs/nodes2string.cpp: |
|
2308 (KJS::SourceStream::): |
|
2309 Add boolean flag to indicate that if next item is a number, it should be grouped. |
|
2310 Add new formatting enum which turns on the boolean flag. |
|
2311 (KJS::SourceStream::SourceStream): Added. Initialize the flag. |
|
2312 (SourceStream::operator<<): Added. New overloaded operator with double value as parameter. |
|
2313 (NumberNode::streamTo): Use the double operator |
|
2314 (ArrayNode::streamTo): |
|
2315 (DotAccessorNode::streamTo): |
|
2316 (FunctionCallDotNode::streamTo): |
|
2317 (FunctionCallParenDotNode::streamTo): |
|
2318 (PostfixDotNode::streamTo): |
|
2319 (DeleteDotNode::streamTo): |
|
2320 (PrefixDotNode::streamTo): |
|
2321 (AssignDotNode::streamTo): Use the new formatting enum to turn on the grouping flag. |
|
2322 |
|
2323 2007-05-10 Lars Knoll <lars@trolltech.com> |
|
2324 |
|
2325 Reviewed by Zack |
|
2326 |
|
2327 Fix our last three test failures in the JavaScript |
|
2328 tests. |
|
2329 |
|
2330 * wtf/unicode/qt4/UnicodeQt4.h: |
|
2331 (WTF::Unicode::toLower): |
|
2332 (WTF::Unicode::toUpper): |
|
2333 |
|
2334 2007-05-08 Geoffrey Garen <ggaren@apple.com> |
|
2335 |
|
2336 Reviewed by Darin Adler. |
|
2337 |
|
2338 Fixed #includes of JSStringRefCF.h and use of CF datatypes. I think I |
|
2339 misunderstood this issue before. |
|
2340 |
|
2341 * API/JavaScriptCore.h: #include JSStringRefCF.h. Platforms that don't |
|
2342 want this behavior can just #include individual headers, instead of the |
|
2343 umbrella framework header. But we definitely want Mac OS X clients to |
|
2344 get the #include of JSStringRefCF.h "for free." |
|
2345 * API/minidom.c: Don't #include JSStringRefCF.h. (Don't need to #include |
|
2346 JavaScriptCore.h, either.) |
|
2347 * API/testapi.c: Don't #include JSStringRefCF.h. Do use CF datatypes |
|
2348 regardless of whether __APPLE__ is defined. Platforms that don't support |
|
2349 CF just shouldn't compile this file. |
|
2350 (main): |
|
2351 |
|
2352 2007-05-09 Eric Seidel <eric@webkit.org> |
|
2353 |
|
2354 Reviewed by mjs. |
|
2355 |
|
2356 http://bugs.webkit.org/show_bug.cgi?id=6985 |
|
2357 Cyclic __proto__ values cause WebKit to hang |
|
2358 |
|
2359 * kjs/object.cpp: |
|
2360 (KJS::JSObject::put): do a cycle check before setting __proto__ |
|
2361 |
|
2362 2007-05-08 Kimmo Kinnunen <kimmok@iki.fi> |
|
2363 |
|
2364 Reviewed by darin. Landed by eseidel. |
|
2365 |
|
2366 - http://bugs.webkit.org/show_bug.cgi?id=10880 (Do..while loop gains |
|
2367 a semicolon each time it is toStringed) |
|
2368 Grammar in Ecma-66262, 12.6: "do Statement while ( Expression );" |
|
2369 EmptyStatement was created after every do..while(expr) which |
|
2370 had semicolon at the end. |
|
2371 |
|
2372 * kjs/grammar.y: Require semicolon at the end of do..while |
|
2373 |
|
2374 2007-05-08 Geoffrey Garen <ggaren@apple.com> |
|
2375 |
|
2376 Build fix -- this time for sure. |
|
2377 |
|
2378 APICast.h, being private, ends up in a different folder than JSValueRef.h, |
|
2379 so we can't include one from the other using "". Instead, just forward |
|
2380 declare the relevant data types. |
|
2381 |
|
2382 * API/APICast.h: |
|
2383 |
|
2384 2007-05-08 Geoffrey Garen <ggaren@apple.com> |
|
2385 |
|
2386 Build fix: export APICast.h for WebCore and WebKit. |
|
2387 |
|
2388 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
2389 |
|
2390 2007-05-04 Darin Adler <darin@apple.com> |
|
2391 |
|
2392 Reviewed by Adele. |
|
2393 |
|
2394 - fix http://bugs.webkit.org/show_bug.cgi?id=12821 |
|
2395 <rdar://problem/5007921> Number.toExponential doesn't work for negative numbers |
|
2396 |
|
2397 * kjs/number_object.cpp: (NumberProtoFunc::callAsFunction): |
|
2398 Added a call to fabs before calling log10. |
|
2399 |
|
2400 2007-05-03 Holger Freyther <freyther@kde.org> |
|
2401 |
|
2402 Reviewed by Zack, landed by Simon. |
|
2403 This is bugzilla bug 13499. |
|
2404 |
|
2405 * JavaScriptCore.pri: Place Qt into the qt-port scope |
|
2406 * bindings/testbindings.pro: Place Qt into the qt-port scope |
|
2407 * kjs/testkjs.pro: Place Qt into the qt-port scope |
|
2408 * pcre/pcre.pri: Place Qt into the qt-port scope |
|
2409 |
|
2410 2007-05-02 David Harrison <harrison@apple.com> |
|
2411 |
|
2412 Reviewed by Antti. |
|
2413 |
|
2414 <rdar://problem/5174862> Crash resulting from DeprecatedString::insert() |
|
2415 |
|
2416 Added insertion support for more than one value. |
|
2417 |
|
2418 * wtf/Vector.h: |
|
2419 (WTF::::insert): |
|
2420 Added support for inserting multiple values. |
|
2421 |
|
2422 (WTF::::prepend): |
|
2423 New. Insert at the start of vectors. Convenient for vectors used as strings. |
|
2424 |
|
2425 2007-05-01 Jungshik Shin <jungshik.shin@gmail.com> |
|
2426 |
|
2427 Reviewed by Alexey. |
|
2428 |
|
2429 - get rid of non-ASCII lteral characters : suppress compiler warnings |
|
2430 http://bugs.webkit.org/show_bug.cgi?id=13551 |
|
2431 |
|
2432 * kjs/testkjs.cpp: |
|
2433 * pcre/pcre_compile.c: |
|
2434 |
|
2435 2007-04-28 Jungshik Shin <jungshik.shin@gmail.com> |
|
2436 |
|
2437 Reviewed by Sam Weinig. |
|
2438 |
|
2439 - Replace copyright sign in Latin-1 (0xA9) with '(C)' |
|
2440 http://bugs.webkit.org/show_bug.cgi?id=13531 |
|
2441 |
|
2442 * bindings/npruntime.h: |
|
2443 |
|
2444 2007-04-28 Darin Adler <darin@apple.com> |
|
2445 |
|
2446 Reviewed by Maciej. |
|
2447 |
|
2448 - fix <rdar://problem/5154144> Hamachi test fails: assertion failure in ListHashSet |
|
2449 |
|
2450 Test: fast/forms/add-remove-form-elements-stress-test.html |
|
2451 |
|
2452 * wtf/ListHashSet.h: |
|
2453 (WTF::ListHashSetNodeAllocator::ListHashSetNodeAllocator): Initialize |
|
2454 m_isDoneWithInitialFreeList to false. |
|
2455 (WTF::ListHashSetNodeAllocator::allocate): Added assertions based on a debug-only |
|
2456 m_isAllocated flag that make sure we don't allocate a block that's already allocated. |
|
2457 These assertions helped pinpoint the bug. Set m_isDoneWithInitialFreeList when we |
|
2458 allocate the last block of the initial free list. Once we're done with the initial |
|
2459 free list, turn off the rule that says that the next node in the pool after the last |
|
2460 node in the free list is also free. This rule works because any free nodes are added |
|
2461 to the head of the free list, so a node that hasn't been allocated even once is always |
|
2462 at the tail of the free list and all the nodes after it also haven't been allocated |
|
2463 even once. But it doesn't work any longer once the entire pool has been used at least |
|
2464 once, because there's nothing special about the last node on the free list any more. |
|
2465 (WTF::ListHashSetNodeAllocator::deallocate): Set the node's m_isAllocated to false. |
|
2466 (WTF::ListHashSetNodeAllocator::pastPool): Added. Used above. |
|
2467 (WTF::ListHashSetNodeAllocator::inPool): Changed to use the pastPool function. |
|
2468 (WTF::ListHashSetNode::ListHashSetNode): Initialize m_isAllocated to true. |
|
2469 (WTF::ListHashSetNode::operator new): Removed variable name for unused size |
|
2470 parameter. |
|
2471 (WTF::ListHashSetNode::destroy): Changed to call the destructor rather than |
|
2472 delete -- this gets rid of the need to define an operator delete. |
|
2473 |
|
2474 2007-04-27 Christopher Brichford <chrisb@adobe.com> |
|
2475 |
|
2476 Reviewed by Timothy Hatcher. |
|
2477 |
|
2478 Fix for: Bug 13211: Move JavaScriptCore mac project files for apollo port |
|
2479 http://bugs.webkit.org/show_bug.cgi?id=13211 |
|
2480 |
|
2481 * JavaScriptCore.apolloproj/mac/JavaScriptCore.Debug.xcconfig: Added. |
|
2482 * JavaScriptCore.apolloproj/mac/JavaScriptCore.Release.xcconfig: Added. |
|
2483 * JavaScriptCore.apolloproj/mac/JavaScriptCore.xcconfig: Added. |
|
2484 * JavaScriptCore.apolloproj/mac/JavaScriptCore.xcodeproj/project.pbxproj: Added. |
|
2485 * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Debug.xcconfig: Removed. |
|
2486 * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Release.xcconfig: Removed. |
|
2487 * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcconfig: Removed. |
|
2488 * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: Removed. |
|
2489 |
|
2490 2007-04-27 Holger Freyther <freyther@kde.org> |
|
2491 |
|
2492 Reviewed by Maciej. |
|
2493 |
|
2494 Remove unmaintained CMake build system. |
|
2495 |
|
2496 * CMakeLists.txt: Removed. |
|
2497 * pcre/CMakeLists.txt: Removed. |
|
2498 |
|
2499 2007-04-27 Mark Rowe <mrowe@apple.com> |
|
2500 |
|
2501 Reviewed by Oliver. |
|
2502 |
|
2503 * JavaScriptCore.xcodeproj/project.pbxproj: Improve dependencies in Xcode project |
|
2504 by marking dftables as a dependency of Generate Derived Sources rather than of |
|
2505 JavaScriptCore itself. |
|
2506 |
|
2507 2007-04-26 Geoffrey Garen <ggaren@apple.com> |
|
2508 |
|
2509 Build fix -- added #includes that we used to get implicitly through |
|
2510 JSStringRef.h. |
|
2511 |
|
2512 * API/JSNode.c: |
|
2513 * API/JSNodeList.c: |
|
2514 * API/minidom.c: |
|
2515 * API/testapi.c: |
|
2516 |
|
2517 2007-04-26 Geoffrey Garen <ggaren@apple.com> |
|
2518 |
|
2519 Reviewed by Maciej Stachowiak, Adam Roben. |
|
2520 |
|
2521 Fixed |
|
2522 <rdar://problem/4885130> Remove #include of JSStringRefCF.h from JSStringRef.h |
|
2523 <rdar://problem/4885123> JavaScriptCore is not cross-platform -- JSStringRef.h references CF datatypes |
|
2524 |
|
2525 * API/JSStringRef.h: Removed #include -- no clients need it anymore. |
|
2526 |
|
2527 2007-04-25 David Kilzer <ddkilzer@apple.com> |
|
2528 |
|
2529 Reviewed by Maciej. |
|
2530 |
|
2531 Add assertions for debug builds. |
|
2532 |
|
2533 * kjs/JSLock.cpp: |
|
2534 (KJS::JSLock::lock): Assert the return value of pthread_mutex_lock() in debug builds. |
|
2535 (KJS::JSLock::unlock): Assert the return value of pthread_mutex_unlock() in debug builds. |
|
2536 |
|
2537 2007-04-25 Maciej Stachowiak <mjs@apple.com> |
|
2538 |
|
2539 Reviewed by Anders. |
|
2540 |
|
2541 - fix build problems |
|
2542 |
|
2543 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Disable warning that |
|
2544 gives often downright incorrect results based on guessing what will happen in 64-bit. |
|
2545 |
|
2546 2007-04-25 Darin Adler <darin@apple.com> |
|
2547 |
|
2548 Reviewed by Geoff. |
|
2549 |
|
2550 - tweak the allocator for a small speedup -- Shark showed this was a win, but I can't |
|
2551 measure an improvement right now, but it's also clear these changes do no harm |
|
2552 |
|
2553 * wtf/FastMalloc.cpp: |
|
2554 (WTF::LgFloor): Use ALWAYS_INLINE here; in testing I did a while back this was necessary |
|
2555 to get this single-instruction function to be inlined. |
|
2556 (WTF::SizeClass): Use ALWAYS_INLINE here too for the same reason. Also change the special |
|
2557 case for a size of 0 to work without a branch for a bit of extra speed. |
|
2558 (WTF::ByteSizeForClass): Use ALWAYS_INLINE here too for the same reason. |
|
2559 |
|
2560 2007-04-24 Maciej Stachowiak <mjs@apple.com> |
|
2561 |
|
2562 Reviewed by Oliver. |
|
2563 |
|
2564 - use custom calling convention for everything in nodes.cpp on intel gcc for 1.5% speed boost |
|
2565 |
|
2566 Nearly all functions in nodes.cpp were marked up to use the |
|
2567 regparm(3) calling convention under GCC for x86, since this is |
|
2568 faster and they are all guaranteed to be called only internally to |
|
2569 kjs. |
|
2570 |
|
2571 The only exception is destructors, since delete doesn't know how to use a custom calling convention. |
|
2572 |
|
2573 * kjs/nodes.cpp: |
|
2574 (dotExprDoesNotAllowCallsString): |
|
2575 * kjs/nodes.h: |
|
2576 (KJS::Node::): |
|
2577 (KJS::StatementNode::): |
|
2578 (KJS::NullNode::): |
|
2579 (KJS::BooleanNode::): |
|
2580 (KJS::NumberNode::): |
|
2581 (KJS::StringNode::): |
|
2582 (KJS::RegExpNode::): |
|
2583 (KJS::ThisNode::): |
|
2584 (KJS::ResolveNode::): |
|
2585 (KJS::GroupNode::): |
|
2586 (KJS::ElementNode::): |
|
2587 (KJS::ArrayNode::): |
|
2588 (KJS::PropertyNameNode::): |
|
2589 (KJS::PropertyNode::): |
|
2590 (KJS::PropertyListNode::): |
|
2591 (KJS::ObjectLiteralNode::): |
|
2592 (KJS::BracketAccessorNode::): |
|
2593 (KJS::DotAccessorNode::): |
|
2594 (KJS::ArgumentListNode::): |
|
2595 (KJS::ArgumentsNode::): |
|
2596 (KJS::NewExprNode::): |
|
2597 (KJS::FunctionCallValueNode::): |
|
2598 (KJS::FunctionCallResolveNode::): |
|
2599 (KJS::FunctionCallBracketNode::): |
|
2600 (KJS::FunctionCallParenBracketNode::): |
|
2601 (KJS::FunctionCallDotNode::): |
|
2602 (KJS::FunctionCallParenDotNode::): |
|
2603 (KJS::PostfixResolveNode::): |
|
2604 (KJS::PostfixBracketNode::): |
|
2605 (KJS::PostfixDotNode::): |
|
2606 (KJS::PostfixErrorNode::): |
|
2607 (KJS::DeleteResolveNode::): |
|
2608 (KJS::DeleteBracketNode::): |
|
2609 (KJS::DeleteDotNode::): |
|
2610 (KJS::DeleteValueNode::): |
|
2611 (KJS::VoidNode::): |
|
2612 (KJS::TypeOfResolveNode::): |
|
2613 (KJS::TypeOfValueNode::): |
|
2614 (KJS::PrefixResolveNode::): |
|
2615 (KJS::PrefixBracketNode::): |
|
2616 (KJS::PrefixDotNode::): |
|
2617 (KJS::PrefixErrorNode::): |
|
2618 (KJS::UnaryPlusNode::): |
|
2619 (KJS::NegateNode::): |
|
2620 (KJS::BitwiseNotNode::): |
|
2621 (KJS::LogicalNotNode::): |
|
2622 (KJS::MultNode::): |
|
2623 (KJS::AddNode::): |
|
2624 (KJS::ShiftNode::): |
|
2625 (KJS::RelationalNode::): |
|
2626 (KJS::EqualNode::): |
|
2627 (KJS::BitOperNode::): |
|
2628 (KJS::BinaryLogicalNode::): |
|
2629 (KJS::ConditionalNode::): |
|
2630 (KJS::AssignResolveNode::): |
|
2631 (KJS::AssignBracketNode::): |
|
2632 (KJS::AssignDotNode::): |
|
2633 (KJS::AssignErrorNode::): |
|
2634 (KJS::CommaNode::): |
|
2635 (KJS::AssignExprNode::): |
|
2636 (KJS::VarDeclListNode::): |
|
2637 (KJS::VarStatementNode::): |
|
2638 (KJS::EmptyStatementNode::): |
|
2639 (KJS::ExprStatementNode::): |
|
2640 (KJS::IfNode::): |
|
2641 (KJS::DoWhileNode::): |
|
2642 (KJS::WhileNode::): |
|
2643 (KJS::ForNode::): |
|
2644 (KJS::ContinueNode::): |
|
2645 (KJS::BreakNode::): |
|
2646 (KJS::ReturnNode::): |
|
2647 (KJS::WithNode::): |
|
2648 (KJS::LabelNode::): |
|
2649 (KJS::ThrowNode::): |
|
2650 (KJS::TryNode::): |
|
2651 (KJS::ParameterNode::): |
|
2652 (KJS::Parameter::): |
|
2653 (KJS::FunctionBodyNode::): |
|
2654 (KJS::FuncExprNode::): |
|
2655 (KJS::FuncDeclNode::): |
|
2656 (KJS::SourceElementsNode::): |
|
2657 (KJS::CaseClauseNode::): |
|
2658 (KJS::ClauseListNode::): |
|
2659 (KJS::SwitchNode::): |
|
2660 |
|
2661 2007-04-24 Oliver Hunt <oliver@apple.com> |
|
2662 |
|
2663 GTK Build fix, ::findEntry->KJS::findEntry |
|
2664 |
|
2665 * kjs/lookup.cpp: |
|
2666 (KJS::Lookup::findEntry): |
|
2667 (KJS::Lookup::find): |
|
2668 |
|
2669 2007-04-23 Maciej Stachowiak <mjs@apple.com> |
|
2670 |
|
2671 Reviewed by Geoff. |
|
2672 |
|
2673 - compile most of JavaScriptCore as one file for 4% JS iBench speed improvement |
|
2674 |
|
2675 * JavaScriptCore.xcodeproj/project.pbxproj: Add AllInOneFile.cpp, and remove files it includes |
|
2676 from the build. |
|
2677 * kjs/AllInOneFile.cpp: Added. |
|
2678 * kjs/dtoa.cpp: Renamed CONST to CONST_ to avoid conflict. |
|
2679 (Bigint::): |
|
2680 (Bigint::nrv_alloc): |
|
2681 * kjs/lookup.cpp: Use "namspace KJS { ... }" instead of "using namespace KJS;" |
|
2682 |
|
2683 2007-04-23 Maciej Stachowiak <mjs@apple.com> |
|
2684 |
|
2685 Build fix, not reviewed. |
|
2686 |
|
2687 * kjs/collector.h: Fix struct/class mismatch. |
|
2688 |
|
2689 2007-04-23 Maciej Stachowiak <mjs@apple.com> |
|
2690 |
|
2691 Reviewed by Darin. |
|
2692 |
|
2693 - raise ALLOCATIONS_PER_COLLECTION to 4000, for 3.7% iBench speed improvement |
|
2694 |
|
2695 Now that the cell size is smaller and the block size is bigger, we can fit 4000 objects in |
|
2696 the two spare cells the collector is willing to keep around, so collect a bit less often. |
|
2697 |
|
2698 * kjs/collector.cpp: |
|
2699 |
|
2700 2007-04-23 Maciej Stachowiak <mjs@apple.com> |
|
2701 |
|
2702 Reviewed by Darin and Geoff. |
|
2703 |
|
2704 - move mark and collectOnMainThreadOnly bits into separate bitmaps |
|
2705 |
|
2706 This saves 4 bytes per cell, allowing shrink of cell size to 32, |
|
2707 which leads to a .8% speed improvement on iBench. |
|
2708 |
|
2709 This is only feasible because of all the previous changes on the branch. |
|
2710 |
|
2711 * kjs/collector.cpp: |
|
2712 (KJS::allocateBlock): Adjust for some renames of constants. |
|
2713 (KJS::Collector::markStackObjectsConservatively): Now that cells are 32 bytes (64 |
|
2714 bytes on 64-bit) the cell alignment check can be made much more strict, and also |
|
2715 obsoletes the need for a % sizeof(CollectorCell) check. Also, we can mask off the low |
|
2716 bits of the pointer to have a potential block pointer to look for. |
|
2717 (KJS::Collector::collectOnMainThreadOnly): Use bitmap. |
|
2718 (KJS::Collector::markMainThreadOnlyObjects): Use bitmap. |
|
2719 (KJS::Collector::collect): When sweeping, use bitmaps directly to find mark bits. |
|
2720 * kjs/collector.h: |
|
2721 (KJS::): Move needed constants and type declarations here. |
|
2722 (KJS::CollectorBitmap::get): Bit twiddling to get a bitmap value. |
|
2723 (KJS::CollectorBitmap::set): Bit twiddling to set a bitmap bit to true. |
|
2724 (KJS::CollectorBitmap::clear): Bit twiddling to set a bitmap bit to false. |
|
2725 (KJS::CollectorBitmap::clearAll): Clear whole bitmap at one go. |
|
2726 (KJS::Collector::cellBlock): New operation, compute the block pointer for |
|
2727 a cell by masking off low bits. |
|
2728 (KJS::Collector::cellOffset): New operation, compute the cell offset for a |
|
2729 cell by masking off high bits and dividing (actually a shift). |
|
2730 (KJS::Collector::isCellMarked): Check mark bit in bitmap |
|
2731 (KJS::Collector::markCell): Set mark bit in bitmap. |
|
2732 * kjs/value.h: |
|
2733 (KJS::JSCell::JSCell): No more bits. |
|
2734 (KJS::JSCell::marked): Let collector handle it. |
|
2735 (KJS::JSCell::mark): Let collector handle it. |
|
2736 |
|
2737 2007-04-23 Anders Carlsson <andersca@apple.com> |
|
2738 |
|
2739 Build fix. |
|
2740 |
|
2741 * kjs/regexp_object.h: |
|
2742 RegExpObjectImpPrivate is a struct, not a class. |
|
2743 |
|
2744 2007-04-23 Maciej Stachowiak <mjs@apple.com> |
|
2745 |
|
2746 Reviewed by Darin. |
|
2747 |
|
2748 - shrink FunctionImp / DeclaredFunctionImp by 4 bytes, by moving parameter list to function body |
|
2749 |
|
2750 I reconciled this with a similar change in KDE kjs by Maks Orlovich <maksim@kde.org>. |
|
2751 |
|
2752 * kjs/function.cpp: |
|
2753 (KJS::FunctionImp::callAsFunction): |
|
2754 (KJS::FunctionImp::passInParameters): |
|
2755 (KJS::FunctionImp::lengthGetter): |
|
2756 (KJS::FunctionImp::getParameterName): |
|
2757 * kjs/function.h: |
|
2758 * kjs/function_object.cpp: |
|
2759 (FunctionProtoFunc::callAsFunction): |
|
2760 (FunctionObjectImp::construct): |
|
2761 * kjs/nodes.cpp: |
|
2762 (FunctionBodyNode::addParam): |
|
2763 (FunctionBodyNode::paramString): |
|
2764 (FuncDeclNode::addParams): |
|
2765 (FuncDeclNode::processFuncDecl): |
|
2766 (FuncExprNode::addParams): |
|
2767 (FuncExprNode::evaluate): |
|
2768 * kjs/nodes.h: |
|
2769 (KJS::Parameter::Parameter): |
|
2770 (KJS::FunctionBodyNode::numParams): |
|
2771 (KJS::FunctionBodyNode::paramName): |
|
2772 (KJS::FunctionBodyNode::parameters): |
|
2773 (KJS::FuncExprNode::FuncExprNode): |
|
2774 (KJS::FuncDeclNode::FuncDeclNode): |
|
2775 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Disable 64-bit warnings because |
|
2776 they handle size_t badly. |
|
2777 |
|
2778 2007-04-23 Maciej Stachowiak <mjs@apple.com> |
|
2779 |
|
2780 Reviewed by Darin. |
|
2781 |
|
2782 - shrink RegexpObjectImp by 4 bytes |
|
2783 |
|
2784 Somewhat inexplicably, this seems to be a .33% speedup on JS iBench. |
|
2785 |
|
2786 * kjs/regexp_object.cpp: |
|
2787 (KJS::RegExpObjectImpPrivate::RegExpObjectImpPrivate): |
|
2788 (RegExpObjectImp::RegExpObjectImp): |
|
2789 (RegExpObjectImp::performMatch): |
|
2790 (RegExpObjectImp::arrayOfMatches): |
|
2791 (RegExpObjectImp::getBackref): |
|
2792 (RegExpObjectImp::getLastMatch): |
|
2793 (RegExpObjectImp::getLastParen): |
|
2794 (RegExpObjectImp::getLeftContext): |
|
2795 (RegExpObjectImp::getRightContext): |
|
2796 (RegExpObjectImp::getValueProperty): |
|
2797 (RegExpObjectImp::putValueProperty): |
|
2798 * kjs/regexp_object.h: |
|
2799 |
|
2800 2007-04-23 Maciej Stachowiak <mjs@apple.com> |
|
2801 |
|
2802 Reviewed by Oliver. |
|
2803 |
|
2804 - change to 1-bit bitfields instead of 8-bit, this turns out to lead to a .51% speedup on JS iBench |
|
2805 |
|
2806 The 1-bit bitfields are actually faster than just plain bools, at least on Intel (go figure). |
|
2807 |
|
2808 * kjs/property_map.h: |
|
2809 |
|
2810 2007-04-23 Maciej Stachowiak <mjs@apple.com> |
|
2811 |
|
2812 Reviewed by Darin. |
|
2813 |
|
2814 - shrink ArrayInstance objects by 4 bytes |
|
2815 http://bugs.webkit.org/show_bug.cgi?id=13386 |
|
2816 |
|
2817 I did this by storing the capacity before the beginning of the storage array. It turns out |
|
2818 it is rarely needed and is by definition 0 when the storage array is null. |
|
2819 |
|
2820 * kjs/array_instance.h: |
|
2821 (KJS::ArrayInstance::capacity): Get it from the secret stash |
|
2822 * kjs/array_object.cpp: |
|
2823 (allocateStorage): New function to encapsulate allocating the storage with extra space ahead |
|
2824 for the capacity. |
|
2825 (reallocateStorage): ditto for realloc |
|
2826 (ArrayInstance::ArrayInstance): |
|
2827 (ArrayInstance::~ArrayInstance): |
|
2828 (ArrayInstance::resizeStorage): |
|
2829 |
|
2830 2007-04-23 Darin Adler <darin@apple.com> |
|
2831 |
|
2832 Reviewed by Maciej. |
|
2833 |
|
2834 - fix <rdar://problem/4840688> REGRESSION (r10588, r10621): JavaScript won't parse |
|
2835 modifications of non-references (breaks 300themovie.warnerbros.com, fedex.com) |
|
2836 |
|
2837 Despite the ECMAScript specification's claim that you can treat these as syntax |
|
2838 errors, doing so creates some website incompatibilities. So this patch turns them back |
|
2839 into evaluation errors instead. |
|
2840 |
|
2841 Test: fast/js/modify-non-references.html |
|
2842 |
|
2843 * kjs/grammar.y: Change makeAssignNode, makePrefixNode, and makePostfixNode so that they |
|
2844 never fail to parse. Update rules that use them. Fix a little bit of indenting. Use |
|
2845 new PostfixErrorNode, PrefixErrorNode, and AssignErrorNode classes. |
|
2846 |
|
2847 * kjs/nodes.h: Added an overload of throwError that takes a char* argument. |
|
2848 Replaced setExceptionDetailsIfNeeded and debugExceptionIfNeeded with handleException, |
|
2849 which does both. Added PostfixErrorNode, PrefixErrorNode, and AssignErrorNode classes. |
|
2850 |
|
2851 * kjs/nodes.cpp: Changed exception macros to use handleException; simpler and smaller |
|
2852 code size than the two functions that we used before. |
|
2853 (Node::throwError): Added the overload mentioned above. |
|
2854 (Node::handleException): Added. Contains the code from both setExceptionDetailsIfNeeded |
|
2855 and debugExceptionIfNeeded. |
|
2856 (PostfixErrorNode::evaluate): Added. Throws an exception. |
|
2857 (PrefixErrorNode::evaluate): Ditto. |
|
2858 (AssignErrorNode::evaluate): Ditto. |
|
2859 (ThrowNode::execute): Call handleException instead of debugExceptionIfNeeded; this |
|
2860 effectively adds a call to setExceptionDetailsIfNeeded, which may help with getting |
|
2861 the correct file and line number for these exceptions. |
|
2862 |
|
2863 * kjs/nodes2string.cpp: |
|
2864 (PostfixErrorNode::streamTo): Added. |
|
2865 (PrefixErrorNode::streamTo): Added. |
|
2866 (AssignErrorNode::streamTo): Added. |
|
2867 |
|
2868 2007-04-23 Maciej Stachowiak <mjs@apple.com> |
|
2869 |
|
2870 Reviewed by Darin. |
|
2871 |
|
2872 - fix test failures / crashes on PPC |
|
2873 |
|
2874 * kjs/property_map.h: Make the bool fields explicitly 8-bit bitfields, since bool is a full |
|
2875 word there otherwise :-( |
|
2876 |
|
2877 2007-04-23 Maciej Stachowiak <mjs@apple.com> |
|
2878 |
|
2879 Reviewed by Darin. |
|
2880 |
|
2881 - fix more test case failures |
|
2882 |
|
2883 * bindings/runtime_array.cpp: |
|
2884 (RuntimeArray::RuntimeArray): inherit from JSObject instead of ArrayInstance; it turns |
|
2885 out that this class only needs the prototype and classInfo from ArrayInstance, not the |
|
2886 actual class itself, and it was too big otherwise. |
|
2887 (RuntimeArray::getOwnPropertySlot): |
|
2888 * bindings/runtime_array.h: |
|
2889 |
|
2890 2007-04-23 Maciej Stachowiak <mjs@apple.com> |
|
2891 |
|
2892 Reviewed by Darin. |
|
2893 |
|
2894 - fix some test failures |
|
2895 |
|
2896 * bindings/runtime_method.cpp: |
|
2897 (RuntimeMethod::RuntimeMethod): inherit from InternalFunctionImp instead of FunctionImpl, |
|
2898 otherwise this is too big |
|
2899 (RuntimeMethod::getOwnPropertySlot): |
|
2900 * bindings/runtime_method.h: |
|
2901 |
|
2902 2007-04-22 Maciej Stachowiak <mjs@apple.com> |
|
2903 |
|
2904 Reviewed by Darin. |
|
2905 |
|
2906 - discard the arguments List for an ActivationImp when the corresponding Context is destroyed (1.7% speedup) |
|
2907 http://bugs.webkit.org/show_bug.cgi?id=13385 |
|
2908 |
|
2909 Based an idea by Christopher E. Hyde <C.Hyde@parableuk.force9.co.uk>. His patch to do |
|
2910 this also had many other List changes and I found this much simpler subset of the changes |
|
2911 was actually a hair faster. |
|
2912 |
|
2913 This optimization is valid because the arguments list is only kept around to |
|
2914 lazily make the arguments object. If it's not made by the time the function |
|
2915 exits, it never will be, since any function that captures the continuation will |
|
2916 have its own local arguments variable in scope. |
|
2917 |
|
2918 Besides the 1.7% speed improvement, it shrinks List by 4 bytes |
|
2919 (which in turn shrinks ActivationImp by 4 bytes). |
|
2920 |
|
2921 * kjs/Context.cpp: |
|
2922 (KJS::Context::~Context): Clear the activation's arguments list. |
|
2923 * kjs/function.cpp: |
|
2924 (KJS::ActivationImp::ActivationImp): Adjusted for list changes. |
|
2925 (KJS::ActivationImp::mark): No need to mark, lists are always protected (this doesn't |
|
2926 cause a ref-cycle for reasons stated above). |
|
2927 (KJS::ActivationImp::createArgumentsObject): Clear arguments list. |
|
2928 * kjs/function.h: |
|
2929 * kjs/list.cpp: |
|
2930 (KJS::List::List): No more needsMarking boolean |
|
2931 (KJS::List::operator=): ditto |
|
2932 * kjs/list.h: |
|
2933 (KJS::List::List): ditto |
|
2934 (KJS::List::reset): ditto |
|
2935 (KJS::List::deref): ditto |
|
2936 |
|
2937 2007-04-22 Maciej Stachowiak <mjs@apple.com> |
|
2938 |
|
2939 Reviewed by Darin. |
|
2940 |
|
2941 - shrink PropertyMap by 8 bytes and therefore shrink CELL_SIZE to 40 (for 32-bit; |
|
2942 similar shrinkage for 64-bit) |
|
2943 http://bugs.webkit.org/show_bug.cgi?id=13384 |
|
2944 |
|
2945 Inspired by similar changes by Christopher E. Hyde <C.Hyde@parableuk.force9.co.uk> |
|
2946 done in the kjs-tweaks branch of KDE's kjs. However, this version is somewhat |
|
2947 cleaner style-wise and avoids some of the negative speed impact (at least on gcc/x86) |
|
2948 of his version. |
|
2949 |
|
2950 This is nearly a wash performance-wise, maybe a slight slowdown, but worth doing |
|
2951 to eventually reach cell size 32. |
|
2952 |
|
2953 * kjs/collector.cpp: |
|
2954 (KJS::): |
|
2955 * kjs/property_map.cpp: |
|
2956 (KJS::PropertyMap::~PropertyMap): |
|
2957 (KJS::PropertyMap::clear): |
|
2958 (KJS::PropertyMap::get): |
|
2959 (KJS::PropertyMap::getLocation): |
|
2960 (KJS::PropertyMap::put): |
|
2961 (KJS::PropertyMap::insert): |
|
2962 (KJS::PropertyMap::expand): |
|
2963 (KJS::PropertyMap::rehash): |
|
2964 (KJS::PropertyMap::remove): |
|
2965 (KJS::PropertyMap::mark): |
|
2966 (KJS::PropertyMap::containsGettersOrSetters): |
|
2967 (KJS::PropertyMap::getEnumerablePropertyNames): |
|
2968 (KJS::PropertyMap::getSparseArrayPropertyNames): |
|
2969 (KJS::PropertyMap::save): |
|
2970 (KJS::PropertyMap::checkConsistency): |
|
2971 * kjs/property_map.h: |
|
2972 (KJS::PropertyMap::hasGetterSetterProperties): |
|
2973 (KJS::PropertyMap::setHasGetterSetterProperties): |
|
2974 (KJS::PropertyMap::): |
|
2975 (KJS::PropertyMap::PropertyMap): |
|
2976 |
|
2977 2007-04-22 Maciej Stachowiak <mjs@apple.com> |
|
2978 |
|
2979 Reviewed by Darin. |
|
2980 |
|
2981 - change blocks to 64k in size, and use various platform-specific calls to allocate at 64k-aligned addresses |
|
2982 http://bugs.webkit.org/show_bug.cgi?id=13383 |
|
2983 |
|
2984 * kjs/collector.cpp: |
|
2985 (KJS::allocateBlock): New function to allocate 64k of 64k-aligned memory |
|
2986 (KJS::freeBlock): Corresponding free |
|
2987 (KJS::Collector::allocate): |
|
2988 (KJS::Collector::collect): |
|
2989 |
|
2990 2007-04-22 Maciej Stachowiak <mjs@apple.com> |
|
2991 |
|
2992 Reviewed by Darin and Geoff. |
|
2993 |
|
2994 - remove the concept of oversize objects, now that there aren't any (for now |
|
2995 only enforced with an assert). |
|
2996 http://bugs.webkit.org/show_bug.cgi?id=13382 |
|
2997 |
|
2998 This change is a .66% speedup on JS iBench for 32-bit platforms, probably much more |
|
2999 for 64-bit since it finally gives a reasonable cell size, but I did not test that. |
|
3000 |
|
3001 * kjs/collector.cpp: |
|
3002 (KJS::): Use different cell size for 32-bit and 64-bit, now that there is no |
|
3003 oversize allocation. |
|
3004 (KJS::Collector::allocate): Remove oversize allocator. |
|
3005 (KJS::Collector::markStackObjectsConservatively): Don't check oversize objects. |
|
3006 (KJS::Collector::markMainThreadOnlyObjects): Ditto. |
|
3007 (KJS::Collector::collect): Ditto. |
|
3008 |
|
3009 2007-04-21 Mitz Pettel <mitz@webkit.org> |
|
3010 |
|
3011 Reviewed by Adam. |
|
3012 |
|
3013 - fix http://bugs.webkit.org/show_bug.cgi?id=13428 |
|
3014 REGRESSION (r20973-r20976): Failing ecma/Array/15.4.4.5-3.js |
|
3015 |
|
3016 - fix http://bugs.webkit.org/show_bug.cgi?id=13429 |
|
3017 REGRESSION (r20973-r20976): Crashing in fast/dom/plugin-attributes-enumeration.html |
|
3018 |
|
3019 * kjs/array_object.cpp: |
|
3020 (ArrayInstance::sort): Free the old storage, not the new one. |
|
3021 |
|
3022 2007-04-20 Maciej Stachowiak <mjs@apple.com> |
|
3023 |
|
3024 Not reviewed, build fix. |
|
3025 |
|
3026 - fix build problem with last change - -O3 complains more about uninitialized variables |
|
3027 |
|
3028 * pcre/pcre_compile.c: |
|
3029 (compile_branch): |
|
3030 (pcre_compile2): |
|
3031 |
|
3032 2007-04-20 Maciej Stachowiak <mjs@apple.com> |
|
3033 |
|
3034 Reviewed by Darin. |
|
3035 |
|
3036 - <rdar://problem/5149915> use mergesort when possible, since it leads to fewer compares (2% JS iBench speedup) |
|
3037 |
|
3038 * kjs/array_object.cpp: |
|
3039 (ArrayInstance::sort): Use mergesort(3) on platforms that have it, since it tends |
|
3040 to do fewer compares than qsort; but avoid it very on large arrays since it uses extra |
|
3041 memory. Also added comments identifying possibly even better sorting algorithms |
|
3042 for sort by string value and sort by compare function. |
|
3043 * kjs/config.h: |
|
3044 |
|
3045 2007-04-20 Maciej Stachowiak <mjs@apple.com> |
|
3046 |
|
3047 Reviewed by Darin. |
|
3048 |
|
3049 - bump optimization flags up to -O3 for 1% JS iBench speed improvement |
|
3050 |
|
3051 * Configurations/Base.xcconfig: |
|
3052 |
|
3053 2007-04-20 Mark Rowe <mrowe@apple.com> |
|
3054 |
|
3055 Reviewed by Maciej. |
|
3056 |
|
3057 Fix bogus optimisation in the generic pthread code path. |
|
3058 |
|
3059 * kjs/collector.cpp: |
|
3060 (KJS::currentThreadStackBase): |
|
3061 |
|
3062 2007-04-20 Mark Rowe <mrowe@apple.com> |
|
3063 |
|
3064 Reviewed by Anders. |
|
3065 |
|
3066 Improve FreeBSD compatibility, as suggested by Alexander Botero-Lowry. |
|
3067 |
|
3068 * kjs/collector.cpp: |
|
3069 (KJS::currentThreadStackBase): FreeBSD requires that pthread_attr_t's are |
|
3070 initialized via pthread_attr_init before being used in any context. |
|
3071 |
|
3072 2007-04-19 Mark Rowe <mrowe@apple.com> |
|
3073 |
|
3074 Reviewed by Darin. |
|
3075 |
|
3076 Fix http://bugs.webkit.org/show_bug.cgi?id=13401 |
|
3077 Bug 13401: Reproducible crash calling myArray.sort(compareFn) from within |
|
3078 a sort comparison function |
|
3079 |
|
3080 * kjs/array_object.cpp: |
|
3081 (ArrayInstance::sort): Save/restore the static variables around calls to qsort |
|
3082 to ensure nested calls to ArrayInstance::sort behave correctly. |
|
3083 |
|
3084 2007-04-12 Deneb Meketa <dmeketa@adobe.com> |
|
3085 |
|
3086 Reviewed by Darin Adler. |
|
3087 |
|
3088 http://bugs.webkit.org/show_bug.cgi?id=13029 |
|
3089 rdar://problem/4994849 |
|
3090 Bug 13029: Permit NPAPI plug-ins to see HTTP response headers. |
|
3091 This doesn't actually change JavaScriptCore, but that's where npapi.h is. |
|
3092 |
|
3093 * bindings/npapi.h: |
|
3094 Add headers member to NPStream struct. Also increase NP_VERSION_MINOR to 18. |
|
3095 Increasing to >= 17 allows plug-ins to safely detect whether to look for |
|
3096 NPStream::headers. Increasing from 17 to 18 reflects presence of NPObject |
|
3097 enumeration, which was added in a prior patch, and which has been agreed to |
|
3098 constitute version 18 by the plugin-futures list. Also add other missing |
|
3099 bits of npapi.h to catch up from 14 to 18. This includes features that are |
|
3100 not implemented in WebKit, but those are safely stubbed. |
|
3101 |
|
3102 2007-04-10 Geoffrey Garen <ggaren@apple.com> |
|
3103 |
|
3104 Reviewed by Mark Rowe. |
|
3105 |
|
3106 Fixed last check-in to print in release builds, too. |
|
3107 |
|
3108 * kjs/collector.cpp: |
|
3109 (KJS::getPlatformThreadRegisters): |
|
3110 |
|
3111 2007-04-10 Geoffrey Garen <ggaren@apple.com> |
|
3112 |
|
3113 Reviewed by John Sullivan, Darin Adler. |
|
3114 |
|
3115 Fixed <rdar://problem/5121899> JavaScript garbage collection leads to |
|
3116 later crash under Rosetta (should abort or leak instead?) |
|
3117 |
|
3118 Log an error message and crash if the kernel reports failure during GC. |
|
3119 We decided to do this instead of just leaking because we don't want people |
|
3120 to get the mistaken impression that running in Rosetta is a supported |
|
3121 configurtion. |
|
3122 |
|
3123 The CRASH macro will also hook into CrashReporter, which will tell us if |
|
3124 many (any?) users run into this issue. |
|
3125 |
|
3126 * kjs/collector.cpp: |
|
3127 (KJS::getPlatformThreadRegisters): |
|
3128 |
|
3129 2007-04-06 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
3130 |
|
3131 Reviewed by darin. |
|
3132 |
|
3133 Coverity fix. Coverity says: |
|
3134 "Event var_deref_model: Variable "sourceRanges" tracked as NULL was passed to a |
|
3135 function that dereferences it" |
|
3136 |
|
3137 * kjs/string_object.cpp: |
|
3138 (KJS::replace): |
|
3139 |
|
3140 2007-04-06 Geoffrey Garen <ggaren@apple.com> |
|
3141 |
|
3142 Rubber stamped by Adele Peterson. |
|
3143 |
|
3144 * kjs/ExecState.h: Removed obsolete forward/friend declaration of |
|
3145 RuntimeMethodImp. |
|
3146 |
|
3147 2007-04-05 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
3148 |
|
3149 Reviewed by darin. |
|
3150 |
|
3151 Coverity fix. Coverity says: |
|
3152 "Event check_after_deref: Pointer "dateString" dereferenced before NULL check" |
|
3153 |
|
3154 * kjs/date_object.cpp: |
|
3155 (KJS::parseDate): |
|
3156 |
|
3157 2007-04-05 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
3158 |
|
3159 Reviewed by darin. |
|
3160 |
|
3161 Coverity fix. Coverity says: |
|
3162 "Event check_after_deref: Pointer "re" dereferenced before NULL check" |
|
3163 |
|
3164 * pcre/pcre_study.c: |
|
3165 (pcre_study): |
|
3166 |
|
3167 2007-04-05 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
3168 |
|
3169 Reviewed by darin. |
|
3170 |
|
3171 Coverity fixes. Coverity says: |
|
3172 "Event leaked_storage: Returned without freeing storage "buffer"" |
|
3173 and: |
|
3174 "Event leaked_storage: Returned without freeing storage "script"" |
|
3175 |
|
3176 * kjs/testkjs.cpp: |
|
3177 (doIt): |
|
3178 (createStringWithContentsOfFile): |
|
3179 |
|
3180 2007-04-05 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
3181 |
|
3182 Reviewed by darin. |
|
3183 |
|
3184 Coverity fix: in single-threaded case currentThreadIsMainThread is always true |
|
3185 so the code in if (!currentThreadIsMainThread) cannot possibly be reached |
|
3186 and Coverity complains about dead code. |
|
3187 |
|
3188 * kjs/collector.cpp: |
|
3189 (KJS::Collector::collect): |
|
3190 |
|
3191 === Safari-5522.6 === |
|
3192 |
|
3193 2007-04-03 Kevin McCullough <kmccullough@apple.com> |
|
3194 |
|
3195 Reviewed by Adam. |
|
3196 |
|
3197 - Testing a post-commit hook. |
|
3198 |
|
3199 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: |
|
3200 |
|
3201 2007-04-03 Anders Carlsson <andersca@apple.com> |
|
3202 |
|
3203 Reviewed by Adam. |
|
3204 |
|
3205 <rdar://problem/5107534> |
|
3206 http://bugs.webkit.org/show_bug.cgi?id=13265 |
|
3207 REGRESSION: Crash in KJS::Bindings::convertValueToNPVariant |
|
3208 |
|
3209 * bindings/NP_jsobject.cpp: |
|
3210 (_NPN_InvokeDefault): |
|
3211 Return false if the object isn't a function. Set the return value to undefined by default |
|
3212 (to match Firefox). |
|
3213 |
|
3214 2007-03-30 Anders Carlsson <andersca@apple.com> |
|
3215 |
|
3216 Build fix. |
|
3217 |
|
3218 * bindings/NP_jsobject.cpp: |
|
3219 (_NPN_Enumerate): |
|
3220 |
|
3221 2007-03-30 Anders Carlsson <andersca@apple.com> |
|
3222 |
|
3223 Reviewed by Geoff. |
|
3224 |
|
3225 Implement _NPN_Enumerate support. |
|
3226 |
|
3227 * JavaScriptCore.exp: |
|
3228 * bindings/NP_jsobject.cpp: |
|
3229 (_NPN_Enumerate): |
|
3230 * bindings/c/c_instance.cpp: |
|
3231 (KJS::Bindings::CInstance::getPropertyNames): |
|
3232 * bindings/c/c_instance.h: |
|
3233 * bindings/npapi.h: |
|
3234 * bindings/npruntime.h: |
|
3235 * bindings/npruntime_impl.h: |
|
3236 * bindings/runtime.h: |
|
3237 (KJS::Bindings::Instance::getPropertyNames): |
|
3238 * bindings/runtime_object.cpp: |
|
3239 (RuntimeObjectImp::getPropertyNames): |
|
3240 * bindings/runtime_object.h: |
|
3241 (KJS::RuntimeObjectImp::getInternalInstance): |
|
3242 |
|
3243 2007-03-28 Jeff Walden <jwalden+code@mit.edu> |
|
3244 |
|
3245 Reviewed by Darin. |
|
3246 |
|
3247 http://bugs.webkit.org/show_bug.cgi?id=12963 |
|
3248 Fix some inconsistencies in the Mozilla JS Array extras implementations |
|
3249 with respect to the Mozilla implementation: |
|
3250 |
|
3251 - holes in arrays should be skipped, not treated as undefined, |
|
3252 by all such methods |
|
3253 - an element with value undefined is not a hole |
|
3254 - Array.prototype.forEach should return undefined |
|
3255 |
|
3256 * kjs/array_object.cpp: |
|
3257 (ArrayInstance::getOwnPropertySlot): |
|
3258 (ArrayProtoFunc::callAsFunction): |
|
3259 |
|
3260 2007-03-27 Anders Carlsson <acarlsson@apple.com> |
|
3261 |
|
3262 Reviewed by Geoff. |
|
3263 |
|
3264 * bindings/NP_jsobject.cpp: |
|
3265 (_NPN_InvokeDefault): |
|
3266 Call JSObject:call for native JavaScript objects. |
|
3267 |
|
3268 2007-03-26 David Carson <dacarson@gmail.com> |
|
3269 |
|
3270 Reviewed by Darin, landed by Anders. |
|
3271 |
|
3272 Fix for: REGRESSION (r19559): Java applet crash |
|
3273 http://bugs.webkit.org/show_bug.cgi?id=13142 |
|
3274 <rdar://problem/5080340> |
|
3275 |
|
3276 The previous fix http://bugs.webkit.org/show_bug.cgi?id=12636 |
|
3277 introduced new JNIType to enum in jni_utility.h This is a |
|
3278 problem on the Mac as it seems that the JNIType enum is also |
|
3279 used in the JVM, it is used to specify the return type in |
|
3280 jni_objc.mm |
|
3281 Corrected the fix by moving type to the end, and changing |
|
3282 jni_objc.mm to convert the new type to an old compatible |
|
3283 type. |
|
3284 |
|
3285 * bindings/jni/jni_objc.mm: |
|
3286 (KJS::Bindings::dispatchJNICall): |
|
3287 * bindings/jni/jni_utility.h: |
|
3288 |
|
3289 2007-03-26 Christopher Brichford <chrisb@adobe.com> |
|
3290 |
|
3291 Reviewed/landed by Adam. |
|
3292 |
|
3293 Bug 13198: Move build settings from project file to xcconfig file for apollo |
|
3294 port JSCore |
|
3295 http://bugs.webkit.org/show_bug.cgi?id=13198 |
|
3296 |
|
3297 - Moving build settings from xcode project file to xcconfig files. |
|
3298 |
|
3299 * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Debug.xcconfig: |
|
3300 * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Release.xcconfig: |
|
3301 * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcconfig: |
|
3302 * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: |
|
3303 |
|
3304 2007-03-26 Brady Eidson <beidson@apple.com> |
|
3305 |
|
3306 Rubberstamped by Anders and Maciej aand Geoff (oh my!) |
|
3307 |
|
3308 Since CFTypeRef is really void*, a RetainPtr couldn't be used. |
|
3309 RefType was "void", which doesn't actually exist as a type. |
|
3310 Since RefType only existed for operator*(), and since that operator |
|
3311 doesn't make any sense for RetainPtr, I removed them! |
|
3312 |
|
3313 * kjs/nodes.cpp: Touch this to force a rebuild and (hopefully) help the |
|
3314 compiler with dependencies |
|
3315 * wtf/RetainPtr.h: Nuke RefType and operator*() |
|
3316 |
|
3317 2007-03-26 Geoffrey Garen <ggaren@apple.com> |
|
3318 |
|
3319 Touched a file to (hopefully) help the compiler with RetainPtr dependencies. |
|
3320 |
|
3321 * kjs/nodes.cpp: |
|
3322 (Node::deref): |
|
3323 |
|
3324 2007-03-24 Brady Eidson <beidson@apple.com> |
|
3325 |
|
3326 Reviewed by Adam |
|
3327 |
|
3328 Whoops, RetainPtr should be in the WTF namespace |
|
3329 |
|
3330 * wtf/RetainPtr.h: |
|
3331 |
|
3332 2007-03-24 Brady Eidson <beidson@apple.com> |
|
3333 |
|
3334 Reviewed by Adam |
|
3335 |
|
3336 <rdar://problem/5086210> - Move RetainPtr to WTF |
|
3337 |
|
3338 * wtf/RetainPtr.h: Added |
|
3339 * JavaScriptCore.xcodeproj/project.pbxproj: Add it to the project file |
|
3340 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto |
|
3341 |
|
3342 |
|
3343 2007-03-23 Christopher Brichford <chrisb@adobe.com> |
|
3344 |
|
3345 Reviewed/landed by Adam. |
|
3346 |
|
3347 Bug 13175: Make apollo mac project files for JavaScriptCore actually |
|
3348 build something |
|
3349 http://bugs.webkit.org/show_bug.cgi?id=13175 |
|
3350 |
|
3351 - Changing apollo mac project files for JavaScriptCore such that they actually build |
|
3352 JavaScriptCore source code. |
|
3353 |
|
3354 * JavaScriptCore.apolloproj/ForwardingSources/grammar.cpp: Added. |
|
3355 * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcconfig: |
|
3356 * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: |
|
3357 |
|
3358 2007-03-24 Mark Rowe <mrowe@apple.com> |
|
3359 |
|
3360 Rubber-stamped by Darin. |
|
3361 |
|
3362 * Configurations/JavaScriptCore.xcconfig: Remove unnecessary INFOPLIST_PREPROCESS. |
|
3363 |
|
3364 2007-03-22 Christopher Brichford <chrisb@adobe.com> |
|
3365 |
|
3366 Reviewed/landed by Adam. |
|
3367 |
|
3368 Bug 13164: Initial version of mac JavaScriptCore project files for |
|
3369 apollo port |
|
3370 http://bugs.webkit.org/show_bug.cgi?id=13164 |
|
3371 |
|
3372 - Adding mac project files for apollo port of JavaScriptCore. Currently project |
|
3373 just builds dftables. |
|
3374 |
|
3375 * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Debug.xcconfig: Added. |
|
3376 * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Release.xcconfig: Added. |
|
3377 * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcconfig: Added. |
|
3378 * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: Added. |
|
3379 |
|
3380 2007-03-21 Timothy Hatcher <timothy@apple.com> |
|
3381 |
|
3382 Reviewed by Darin. |
|
3383 |
|
3384 <rdar://problem/5076599> JavaScriptCore has a weak export (vtable for KJS::JSCell) |
|
3385 |
|
3386 * JavaScriptCore.exp: Remove __ZTVN3KJS6JSCellE. |
|
3387 |
|
3388 2007-03-21 Adele Peterson <adele@apple.com> |
|
3389 |
|
3390 Reviewed by Geoff. |
|
3391 |
|
3392 * API/JSStringRef.cpp: (JSStringIsEqual): Added JSLock. |
|
3393 |
|
3394 2007-03-21 Zack Rusin <zrusin@trolltech.com> |
|
3395 |
|
3396 Fix the compile when USE(MULTIPLE_THREADS) isn't |
|
3397 defined |
|
3398 |
|
3399 * kjs/JSLock.cpp: |
|
3400 (KJS::JSLock::currentThreadIsHoldingLock): |
|
3401 |
|
3402 2007-03-20 Maciej Stachowiak <mjs@apple.com> |
|
3403 |
|
3404 Reviewed by Geoff and Adam. |
|
3405 |
|
3406 - make USE(MULTIPLE_THREADS) support more portable |
|
3407 http://bugs.webkit.org/show_bug.cgi?id=13069 |
|
3408 |
|
3409 - fixed a threadsafety bug discovered by testing this |
|
3410 |
|
3411 - enhanced threadsafety assertions in collector |
|
3412 |
|
3413 * API/JSCallbackObject.cpp: |
|
3414 (KJS::JSCallbackObject::~JSCallbackObject): This destructor can't |
|
3415 DropAllLocks around the finalize callback, because it gets called |
|
3416 from garbage collection and we can't let other threads collect! |
|
3417 |
|
3418 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
3419 * kjs/JSLock.cpp: |
|
3420 (KJS::JSLock::currentThreadIsHoldingLock): Added new function |
|
3421 to allow stronger assertions than just that the lock is held |
|
3422 by some thread (you can now assert that the current thread is |
|
3423 holding it, given the new JSLock design). |
|
3424 * kjs/JSLock.h: |
|
3425 * kjs/collector.cpp: Refactored for portability plus added some |
|
3426 stronger assertions. |
|
3427 (KJS::Collector::allocate): |
|
3428 (KJS::currentThreadStackBase): |
|
3429 (KJS::Collector::registerAsMainThread): |
|
3430 (KJS::onMainThread): |
|
3431 (KJS::PlatformThread::PlatformThread): |
|
3432 (KJS::getCurrentPlatformThread): |
|
3433 (KJS::Collector::Thread::Thread): |
|
3434 (KJS::destroyRegisteredThread): |
|
3435 (KJS::Collector::registerThread): |
|
3436 (KJS::Collector::markCurrentThreadConservatively): |
|
3437 (KJS::suspendThread): |
|
3438 (KJS::resumeThread): |
|
3439 (KJS::getPlatformThreadRegisters): |
|
3440 (KJS::otherThreadStackPointer): |
|
3441 (KJS::otherThreadStackBase): |
|
3442 (KJS::Collector::markOtherThreadConservatively): |
|
3443 (KJS::Collector::markStackObjectsConservatively): |
|
3444 (KJS::Collector::protect): |
|
3445 (KJS::Collector::unprotect): |
|
3446 (KJS::Collector::collectOnMainThreadOnly): |
|
3447 (KJS::Collector::markMainThreadOnlyObjects): |
|
3448 (KJS::Collector::collect): |
|
3449 * kjs/collector.h: |
|
3450 * wtf/FastMalloc.cpp: |
|
3451 (WTF::fastMallocSetIsMultiThreaded): |
|
3452 * wtf/FastMallocInternal.h: |
|
3453 * wtf/Platform.h: |
|
3454 |
|
3455 2007-03-19 Darin Adler <darin@apple.com> |
|
3456 |
|
3457 * kjs/value.h: Roll ~JSValue change out. It was causing problems. I'll do it right later. |
|
3458 |
|
3459 2007-03-19 Geoffrey Garen <ggaren@apple.com> |
|
3460 |
|
3461 Reviewed by John Sullivan. |
|
3462 |
|
3463 Fixed <rdar://problem/5073380> REGRESSION: Crash occurs at WTF::fastFree() |
|
3464 when reloading liveconnect page (applet) |
|
3465 |
|
3466 Best to use free when you use malloc, especially when malloc and delete |
|
3467 use completely different libraries. |
|
3468 |
|
3469 * bindings/jni/jni_runtime.cpp: |
|
3470 (JavaMethod::~JavaMethod): |
|
3471 |
|
3472 2007-03-19 Andrew Wellington <proton@wiretapped.net> |
|
3473 |
|
3474 Reviewed by Maciej. |
|
3475 |
|
3476 Really set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html) |
|
3477 |
|
3478 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
3479 |
|
3480 2007-03-19 Darin Adler <darin@apple.com> |
|
3481 |
|
3482 Reviewed by Geoff. |
|
3483 |
|
3484 - Changed list size threshold to 5 based on testing. |
|
3485 |
|
3486 I was testing the i-Bench JavaScript with the list statistics |
|
3487 dumping on, and discovered that there were many 5-element lists. |
|
3488 The fast case for lists was for 4 elements and fewer. By changing |
|
3489 the threshold to 5 elements we get a measurable speedup. I believe |
|
3490 this will help real web pages too, not just the benchmark. |
|
3491 |
|
3492 * kjs/list.cpp: Change constant from 4 to 5. |
|
3493 |
|
3494 2007-03-19 Darin Adler <darin@apple.com> |
|
3495 |
|
3496 * kjs/value.h: Oops, fix build. |
|
3497 |
|
3498 2007-03-19 Darin Adler <darin@apple.com> |
|
3499 |
|
3500 Reviewed by Geoff. |
|
3501 |
|
3502 - remove ~JSValue; tiny low-risk performance boost |
|
3503 |
|
3504 * kjs/value.h: Remove unneeded empty virtual destructor from JSValue. |
|
3505 The only class derived from JSValue is JSCell and it already has a |
|
3506 virtual destructor. Declaring an empty constructor in JSValue had one |
|
3507 good effect: it marked the destructor private, making it a compile |
|
3508 time error to try to destroy a JSValue; but that's not a likely |
|
3509 mistake for someone to make. It had two bad effects: (1) it caused gcc, |
|
3510 at least, to generate code to fix up the virtual table pointer to |
|
3511 point to the JSValue version of the virtual table inside the destructor |
|
3512 of all classes derived from JSValue directly or indirectly; (2) it |
|
3513 caused JSValue to be a polymorphic class so required a virtual table for |
|
3514 it. It's cleaner to not have either of those. |
|
3515 |
|
3516 2007-03-18 Maciej Stachowiak <mjs@apple.com> |
|
3517 |
|
3518 Reviewed by Mark. |
|
3519 |
|
3520 - avoid static construction (and global variable access) in a smarter, more portable way, |
|
3521 to later enable MUTLI_THREAD mode to work on other platforms and compilers. |
|
3522 |
|
3523 * kjs/CommonIdentifiers.cpp: Added. New class to hold all the shared identifiers. |
|
3524 (KJS::CommonIdentifiers::CommonIdentifiers): |
|
3525 (KJS::CommonIdentifiers::shared): |
|
3526 * kjs/CommonIdentifiers.h: Added. |
|
3527 |
|
3528 * kjs/ExecState.h: |
|
3529 (KJS::ExecState::propertyNames): Hand the CommonIdentifiers instance here for easy access. |
|
3530 (KJS::ExecState::ExecState): |
|
3531 |
|
3532 * API/JSObjectRef.cpp: |
|
3533 (JSObjectMakeConstructor): |
|
3534 * CMakeLists.txt: |
|
3535 * JavaScriptCore.exp: |
|
3536 * JavaScriptCore.pri: |
|
3537 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
3538 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
3539 * JavaScriptCoreSources.bkl: |
|
3540 * bindings/runtime_array.cpp: |
|
3541 (RuntimeArray::getOwnPropertySlot): |
|
3542 (RuntimeArray::put): |
|
3543 * bindings/runtime_method.cpp: |
|
3544 (RuntimeMethod::getOwnPropertySlot): |
|
3545 * kjs/array_object.cpp: |
|
3546 (ArrayInstance::getOwnPropertySlot): |
|
3547 (ArrayInstance::put): |
|
3548 (ArrayInstance::deleteProperty): |
|
3549 (ArrayProtoFunc::ArrayProtoFunc): |
|
3550 (ArrayProtoFunc::callAsFunction): |
|
3551 (ArrayObjectImp::ArrayObjectImp): |
|
3552 * kjs/bool_object.cpp: |
|
3553 (BooleanPrototype::BooleanPrototype): |
|
3554 (BooleanProtoFunc::BooleanProtoFunc): |
|
3555 (BooleanProtoFunc::callAsFunction): |
|
3556 (BooleanObjectImp::BooleanObjectImp): |
|
3557 * kjs/completion.h: |
|
3558 (KJS::Completion::Completion): |
|
3559 * kjs/date_object.cpp: |
|
3560 (KJS::DateProtoFunc::DateProtoFunc): |
|
3561 (KJS::DateObjectImp::DateObjectImp): |
|
3562 (KJS::DateObjectFuncImp::DateObjectFuncImp): |
|
3563 * kjs/error_object.cpp: |
|
3564 (ErrorPrototype::ErrorPrototype): |
|
3565 (ErrorProtoFunc::ErrorProtoFunc): |
|
3566 (ErrorProtoFunc::callAsFunction): |
|
3567 (ErrorObjectImp::ErrorObjectImp): |
|
3568 (ErrorObjectImp::construct): |
|
3569 (NativeErrorPrototype::NativeErrorPrototype): |
|
3570 (NativeErrorImp::NativeErrorImp): |
|
3571 (NativeErrorImp::construct): |
|
3572 (NativeErrorImp::callAsFunction): |
|
3573 * kjs/function.cpp: |
|
3574 (KJS::FunctionImp::getOwnPropertySlot): |
|
3575 (KJS::FunctionImp::put): |
|
3576 (KJS::FunctionImp::deleteProperty): |
|
3577 (KJS::FunctionImp::getParameterName): |
|
3578 (KJS::DeclaredFunctionImp::construct): |
|
3579 (KJS::IndexToNameMap::unMap): |
|
3580 (KJS::Arguments::Arguments): |
|
3581 (KJS::ActivationImp::getOwnPropertySlot): |
|
3582 (KJS::ActivationImp::deleteProperty): |
|
3583 (KJS::GlobalFuncImp::GlobalFuncImp): |
|
3584 * kjs/function_object.cpp: |
|
3585 (FunctionPrototype::FunctionPrototype): |
|
3586 (FunctionProtoFunc::FunctionProtoFunc): |
|
3587 (FunctionProtoFunc::callAsFunction): |
|
3588 (FunctionObjectImp::FunctionObjectImp): |
|
3589 (FunctionObjectImp::construct): |
|
3590 * kjs/grammar.y: |
|
3591 * kjs/identifier.cpp: |
|
3592 * kjs/identifier.h: |
|
3593 * kjs/interpreter.cpp: |
|
3594 (KJS::Interpreter::init): |
|
3595 (KJS::Interpreter::initGlobalObject): |
|
3596 * kjs/interpreter.h: |
|
3597 * kjs/lookup.h: |
|
3598 * kjs/math_object.cpp: |
|
3599 (MathFuncImp::MathFuncImp): |
|
3600 * kjs/nodes.cpp: |
|
3601 (ArrayNode::evaluate): |
|
3602 (FuncDeclNode::processFuncDecl): |
|
3603 (FuncExprNode::evaluate): |
|
3604 * kjs/number_object.cpp: |
|
3605 (NumberPrototype::NumberPrototype): |
|
3606 (NumberProtoFunc::NumberProtoFunc): |
|
3607 (NumberObjectImp::NumberObjectImp): |
|
3608 * kjs/object.cpp: |
|
3609 (KJS::JSObject::put): |
|
3610 (KJS::JSObject::defaultValue): |
|
3611 (KJS::JSObject::hasInstance): |
|
3612 * kjs/object.h: |
|
3613 (KJS::JSObject::getOwnPropertySlot): |
|
3614 * kjs/object_object.cpp: |
|
3615 (ObjectPrototype::ObjectPrototype): |
|
3616 (ObjectProtoFunc::ObjectProtoFunc): |
|
3617 (ObjectObjectImp::ObjectObjectImp): |
|
3618 * kjs/regexp_object.cpp: |
|
3619 (RegExpPrototype::RegExpPrototype): |
|
3620 (RegExpProtoFunc::RegExpProtoFunc): |
|
3621 (RegExpObjectImp::RegExpObjectImp): |
|
3622 * kjs/string_object.cpp: |
|
3623 (KJS::StringInstance::getOwnPropertySlot): |
|
3624 (KJS::StringInstance::put): |
|
3625 (KJS::StringInstance::deleteProperty): |
|
3626 (KJS::StringPrototype::StringPrototype): |
|
3627 (KJS::StringProtoFunc::StringProtoFunc): |
|
3628 (KJS::StringProtoFunc::callAsFunction): |
|
3629 (KJS::StringObjectImp::StringObjectImp): |
|
3630 (KJS::StringObjectFuncImp::StringObjectFuncImp): |
|
3631 * kjs/testkjs.cpp: |
|
3632 (TestFunctionImp::TestFunctionImp): |
|
3633 |
|
3634 2007-03-18 Andrew Wellington <proton@wiretapped.net> |
|
3635 |
|
3636 Reviewed by Mark Rowe |
|
3637 |
|
3638 Set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html) |
|
3639 |
|
3640 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
3641 |
|
3642 2007-03-19 Mark Rowe <mrowe@apple.com> |
|
3643 |
|
3644 Rubber-stamped by Brady. |
|
3645 |
|
3646 Update references to bugzilla.opendarwin.org with bugs.webkit.org. |
|
3647 |
|
3648 * bindings/c/c_utility.cpp: |
|
3649 (KJS::Bindings::convertUTF8ToUTF16): |
|
3650 * kjs/function.cpp: |
|
3651 (KJS::FunctionImp::callAsFunction): |
|
3652 * kjs/grammar.y: |
|
3653 * kjs/keywords.table: |
|
3654 * kjs/lexer.cpp: |
|
3655 (KJS::Lexer::shift): |
|
3656 |
|
3657 2007-03-18 Geoffrey Garen <ggaren@apple.com> |
|
3658 |
|
3659 Reviewed by Oliver Hunt. |
|
3660 |
|
3661 Exposed some extra toUInt32 functionality, as part of the fix for |
|
3662 REGRESSION: Incomplete document.all implementation breaks abtelectronics.com |
|
3663 (Style Change Through JavaScript Blanks Content) |
|
3664 |
|
3665 * JavaScriptCore.exp: |
|
3666 * kjs/identifier.h: |
|
3667 (KJS::Identifier::toUInt32): |
|
3668 |
|
3669 2007-03-18 Geoffrey Garen <ggaren@apple.com> |
|
3670 |
|
3671 Removed duplicate export name. |
|
3672 |
|
3673 * JavaScriptCore.exp: |
|
3674 |
|
3675 2007-03-15 Geoffrey Garen <ggaren@apple.com> |
|
3676 |
|
3677 Reviewed by Maciej Stachowiak. |
|
3678 |
|
3679 Fixed <rdar://problem/5064964> Repro ASSERT failure in JS Bindings when |
|
3680 closing window @ lowtrades.bptrade.com |
|
3681 |
|
3682 Unfortunately, the bindings depend on UString and Identifier as string |
|
3683 representations. So, they need to acquire the JSLock when doing something |
|
3684 that will ref/deref their strings. |
|
3685 |
|
3686 Layout tests, the original site, and Java, Flash, and Quicktime on the |
|
3687 web work. No leaks reported. No automated test for this because testing |
|
3688 the Java bindings, like math, is hard. |
|
3689 |
|
3690 * bindings/runtime.h: Made Noncopyable, just to be sure. |
|
3691 |
|
3692 * bindings/c/c_class.cpp: |
|
3693 (KJS::Bindings::CClass::~CClass): Acquire the JSLock and explicitly clear the keys |
|
3694 in our hashtable, since they're UString::Reps, and ref/deref aren't thread-safe. |
|
3695 (KJS::Bindings::CClass::methodsNamed): Also acquire the JSLock when adding |
|
3696 keys to the table, since the table ref's them. |
|
3697 (KJS::Bindings::CClass::fieldNamed): ditto. |
|
3698 |
|
3699 * bindings/c/c_utility.cpp: Removed dead function. |
|
3700 (KJS::Bindings::convertValueToNPVariant): Acquire the JSLock because doing |
|
3701 it recursively is pretty cheap, and it's just too confusing to tell whether |
|
3702 all our callers do it for us. |
|
3703 (KJS::Bindings::convertNPVariantToValue): ditto |
|
3704 * bindings/c/c_utility.h: |
|
3705 |
|
3706 * bindings/jni/jni_class.cpp: Same deal as c_class.cpp. |
|
3707 (JavaClass::JavaClass): |
|
3708 (JavaClass::~JavaClass): |
|
3709 |
|
3710 * bindings/jni/jni_instance.cpp: Same deal as c_utility.cpp. |
|
3711 (JavaInstance::stringValue): |
|
3712 * bindings/jni/jni_jsobject.cpp: |
|
3713 (JavaJSObject::convertValueToJObject): |
|
3714 |
|
3715 * bindings/jni/jni_runtime.cpp: |
|
3716 (JavaMethod::~JavaMethod): Moved from header, for clarity. |
|
3717 (appendClassName): Made this static, so the set of callers is known, and |
|
3718 we can assert that we hold the JSLock. Also changed it to take a UString |
|
3719 reference, which makes the calling code simpler. |
|
3720 (JavaMethod::signature): Store the ASCII value we care about instead of |
|
3721 a UString, since UString is so much more hassle. Hold the JSLock while |
|
3722 building up the temporary UString. |
|
3723 |
|
3724 * bindings/jni/jni_runtime.h: Nixed dead code in JavaMethod. |
|
3725 (KJS::Bindings::JavaString::JavaString): Hold a UString::Rep instead of |
|
3726 a UString, so we can acquire the JSLock and explicitly release it. |
|
3727 (KJS::Bindings::JavaString::_commonInit): |
|
3728 (KJS::Bindings::JavaString::~JavaString): |
|
3729 (KJS::Bindings::JavaString::UTF8String): |
|
3730 (KJS::Bindings::JavaString::uchars): |
|
3731 (KJS::Bindings::JavaString::length): |
|
3732 (KJS::Bindings::JavaString::ustring): |
|
3733 |
|
3734 * bindings/jni/jni_utility.cpp: |
|
3735 (KJS::Bindings::convertArrayInstanceToJavaArray): Made this static, so |
|
3736 the set of callers is known, and we can assert that we hold the JSLock. |
|
3737 (KJS::Bindings::convertValueToJValue): Acquire the JSLock because doing |
|
3738 it recursively is pretty cheap, and it's just too confusing to tell whether |
|
3739 all our callers do it for us. |
|
3740 |
|
3741 * bindings/objc/objc_runtime.h: Nixed some dead code. |
|
3742 * bindings/objc/objc_utility.mm: |
|
3743 (KJS::Bindings::convertNSStringToString): Same drill as above. |
|
3744 |
|
3745 2007-03-18 Alexey Proskuryakov <ap@webkit.org> |
|
3746 |
|
3747 Reviewed by Geoff. |
|
3748 |
|
3749 http://bugs.webkit.org/show_bug.cgi?id=13105 |
|
3750 REGRESSION: an exception raised when calculating base value of a dot expression is not returned |
|
3751 |
|
3752 Test: fast/js/dot-node-base-exception.html |
|
3753 |
|
3754 * kjs/nodes.cpp: |
|
3755 (FunctionCallDotNode::evaluate): Added the necessary KJS_CHECKEXCEPTIONVALUE. |
|
3756 |
|
3757 2007-03-18 Steve Falkenburg <sfalken@apple.com> |
|
3758 |
|
3759 Build fix. |
|
3760 |
|
3761 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: |
|
3762 |
|
3763 2007-03-17 Timothy Hatcher <timothy@apple.com> |
|
3764 |
|
3765 Reviewed by Mark Rowe. |
|
3766 |
|
3767 Made Version.xcconfig smarter when building for different configurations. |
|
3768 Now uses the 522+ OpenSource version for Debug and Release, while using the |
|
3769 full 522.4 version for Production builds. The system prefix is also computed |
|
3770 based on the current system, so 4522.4 on Tiger and 5522.4 on Leopard. |
|
3771 |
|
3772 * Configurations/JavaScriptCore.xcconfig: |
|
3773 * Configurations/Version.xcconfig: |
|
3774 |
|
3775 2007-03-15 Maciej Stachowiak <mjs@apple.com> |
|
3776 |
|
3777 Not reviewed. |
|
3778 |
|
3779 - build fix |
|
3780 |
|
3781 * wtf/TCSystemAlloc.cpp: |
|
3782 |
|
3783 2007-03-15 Maciej Stachowiak <mjs@apple.com> |
|
3784 |
|
3785 Reviewed by Geoff and Steve. |
|
3786 |
|
3787 - fix some portability issues with TCMalloc. |
|
3788 |
|
3789 * JavaScriptCore.vcproj/WTF/WTF.vcproj: |
|
3790 * kjs/config.h: |
|
3791 * wtf/FastMalloc.cpp: |
|
3792 (WTF::SizeClass): |
|
3793 (WTF::InitSizeClasses): |
|
3794 (WTF::TCMalloc_PageHeap::Split): |
|
3795 (WTF::TCMalloc_PageHeap::RegisterSizeClass): |
|
3796 (WTF::TCMalloc_Central_FreeList::length): |
|
3797 (WTF::TCMalloc_ThreadCache::InitTSD): |
|
3798 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): |
|
3799 * wtf/TCSpinLock.h: |
|
3800 * wtf/TCSystemAlloc.cpp: |
|
3801 (TryVirtualAlloc): |
|
3802 (TCMalloc_SystemAlloc): |
|
3803 |
|
3804 2007-03-15 Timothy Hatcher <timothy@apple.com> |
|
3805 |
|
3806 Reviewed by John. |
|
3807 |
|
3808 * Factored out most of our common build settings into .xcconfig files. Anything that was common in |
|
3809 each build configuration was factored out into the shared .xcconfig file. |
|
3810 * Adds a Version.xcconfig file to define the current framework version, to be used in other places. |
|
3811 * Use the new $(BUNDLE_VERSION) (defined in Version.xcconfig) in the preprocessed Info.plist. |
|
3812 * Use the versions defined in Version.xcconfig to set $(DYLIB_CURRENT_VERSION). |
|
3813 |
|
3814 * Configurations/Base.xcconfig: Added. |
|
3815 * Configurations/DebugRelease.xcconfig: Added. |
|
3816 * Configurations/JavaScriptCore.xcconfig: Added. |
|
3817 * Configurations/Version.xcconfig: Added. |
|
3818 * Info.plist: |
|
3819 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
3820 |
|
3821 2007-03-16 Shrikant Gangoda <shrikant.gangoda@celunite.com> |
|
3822 |
|
3823 Gdk build fix. |
|
3824 |
|
3825 * kjs/DateMath.cpp: gettimeofday comes from <sys/time.h> on Linux. |
|
3826 |
|
3827 2007-03-14 Kevin McCullough <kmccullough@apple.com> |
|
3828 |
|
3829 Reviewed by . |
|
3830 |
|
3831 - Fixed one more build breakage |
|
3832 |
|
3833 * kjs/date_object.cpp: |
|
3834 (KJS::formatLocaleDate): |
|
3835 |
|
3836 2007-03-14 Kevin McCullough <kmccullough@apple.com> |
|
3837 |
|
3838 Reviewed by . |
|
3839 |
|
3840 - Fixed a build breakage. |
|
3841 |
|
3842 * kjs/DateMath.cpp: |
|
3843 * kjs/date_object.cpp: |
|
3844 (KJS::formatLocaleDate): |
|
3845 (KJS::DateObjectImp::construct): |
|
3846 |
|
3847 2007-03-14 Kevin McCullough <kmccullough@apple.com> |
|
3848 |
|
3849 Reviewed by Geoff. |
|
3850 |
|
3851 - rdar://problem/5045720 |
|
3852 - DST changes in US affect JavaScript date calculations (12975) |
|
3853 This fix was to ensure we properly test for the new changes to DST in the US. |
|
3854 Also this fixes when we apply DST, now we correctly map most past years to current |
|
3855 DST rules. We still have a small issue with years before 1900 or after 2100. |
|
3856 rdar://problem/5055038 |
|
3857 |
|
3858 * kjs/DateMath.cpp: Fix DST to match spec better. |
|
3859 (KJS::getCurrentUTCTime): |
|
3860 (KJS::mimimumYearForDST): |
|
3861 (KJS::maximumYearForDST): |
|
3862 (KJS::equivalentYearForDST): |
|
3863 (KJS::getDSTOffset): |
|
3864 * kjs/DateMath.h: Consolodated common funtionality. |
|
3865 * kjs/date_object.cpp: Consolodated common functionality. |
|
3866 (KJS::formatLocaleDate): |
|
3867 (KJS::DateObjectImp::construct): |
|
3868 * tests/mozilla/ecma/jsref.js: Added functions for finding the correct days when DST starts and ends. |
|
3869 * tests/mozilla/ecma/shell.js: Added back in the old DST functions for ease of merging with mozilla if needed. |
|
3870 * tests/mozilla/ecma_2/jsref.js: Added functions for finding the correct days when DST starts and ends. |
|
3871 * tests/mozilla/ecma_3/Date/shell.js: Added functions for finding the correct days when DST starts and ends. |
|
3872 * tests/mozilla/expected.html: Updated to show all date tests passing. |
|
3873 |
|
3874 === Safari-5522.4 === |
|
3875 |
|
3876 2007-03-13 Kevin McCullough <kmccullough@apple.com> |
|
3877 |
|
3878 Reviewed by . |
|
3879 |
|
3880 - Adding expected failures until the are truly fixed. |
|
3881 - rdar://problem/5060302 |
|
3882 |
|
3883 * tests/mozilla/expected.html: |
|
3884 |
|
3885 2007-03-12 Kevin McCullough <kmccullough@apple.com> |
|
3886 |
|
3887 Reviewed by . |
|
3888 |
|
3889 - Actually update tests for new DST rules. |
|
3890 |
|
3891 * tests/mozilla/ecma/Date/15.9.3.1-1.js: |
|
3892 * tests/mozilla/ecma/Date/15.9.3.1-2.js: |
|
3893 * tests/mozilla/ecma/Date/15.9.3.1-3.js: |
|
3894 * tests/mozilla/ecma/Date/15.9.3.1-4.js: |
|
3895 * tests/mozilla/ecma/Date/15.9.3.1-5.js: |
|
3896 * tests/mozilla/ecma/Date/15.9.3.2-1.js: |
|
3897 * tests/mozilla/ecma/Date/15.9.3.2-2.js: |
|
3898 * tests/mozilla/ecma/Date/15.9.3.2-3.js: |
|
3899 * tests/mozilla/ecma/Date/15.9.3.2-4.js: |
|
3900 * tests/mozilla/ecma/Date/15.9.3.2-5.js: |
|
3901 * tests/mozilla/ecma/Date/15.9.3.8-1.js: |
|
3902 * tests/mozilla/ecma/Date/15.9.3.8-2.js: |
|
3903 * tests/mozilla/ecma/Date/15.9.3.8-3.js: |
|
3904 * tests/mozilla/ecma/Date/15.9.3.8-4.js: |
|
3905 * tests/mozilla/ecma/Date/15.9.3.8-5.js: |
|
3906 * tests/mozilla/ecma/Date/15.9.5.10-1.js: |
|
3907 * tests/mozilla/ecma/Date/15.9.5.10-10.js: |
|
3908 * tests/mozilla/ecma/Date/15.9.5.10-11.js: |
|
3909 * tests/mozilla/ecma/Date/15.9.5.10-12.js: |
|
3910 * tests/mozilla/ecma/Date/15.9.5.10-13.js: |
|
3911 * tests/mozilla/ecma/Date/15.9.5.10-2.js: |
|
3912 * tests/mozilla/ecma/Date/15.9.5.10-3.js: |
|
3913 * tests/mozilla/ecma/Date/15.9.5.10-4.js: |
|
3914 * tests/mozilla/ecma/Date/15.9.5.10-5.js: |
|
3915 * tests/mozilla/ecma/Date/15.9.5.10-6.js: |
|
3916 * tests/mozilla/ecma/Date/15.9.5.10-7.js: |
|
3917 * tests/mozilla/ecma/Date/15.9.5.10-8.js: |
|
3918 * tests/mozilla/ecma/Date/15.9.5.10-9.js: |
|
3919 * tests/mozilla/ecma/jsref.js: |
|
3920 * tests/mozilla/ecma_2/jsref.js: |
|
3921 * tests/mozilla/ecma_3/Date/shell.js: |
|
3922 |
|
3923 2007-03-12 Kevin McCullough <kmccullough@apple.com> |
|
3924 |
|
3925 Reviewed by . |
|
3926 |
|
3927 - Update tests for new DST rules. |
|
3928 |
|
3929 * tests/mozilla/ecma/shell.js: |
|
3930 |
|
3931 2007-03-11 Geoffrey Garen <ggaren@apple.com> |
|
3932 |
|
3933 Reviewed by Oliver Hunt. |
|
3934 |
|
3935 Fixed <rdar://problem/4681051> Installer crashes in KJS::Collector:: |
|
3936 markOtherThreadConservatively(KJS::Collector::Thread*) trying to install |
|
3937 iLife 06 using Rosetta on an Intel Machine |
|
3938 |
|
3939 The problem was that our thread-specific data destructor would modify the |
|
3940 list of active JavaScript threads without holding the JSLock, corrupting |
|
3941 the list. Corruption was especially likely if one JavaScript thread exited |
|
3942 while another was starting up. |
|
3943 |
|
3944 * JavaScriptCore.exp: |
|
3945 * kjs/JSLock.cpp: Don't conflate locking the JSLock with registering a |
|
3946 thread, since the thread-specific data destructor needs to lock |
|
3947 without registering a thread. Instead, treat thread registration as a |
|
3948 part of the convenience of the JSLock object, and whittle down JSLock::lock() |
|
3949 to just the bits that actually do the locking. |
|
3950 (KJS::JSLock::lock): |
|
3951 (KJS::JSLock::registerThread): |
|
3952 * kjs/JSLock.h: Updated comments to mention the new behavior above, and |
|
3953 other recent changes. |
|
3954 (KJS::JSLock::JSLock): |
|
3955 * kjs/collector.cpp: |
|
3956 (KJS::destroyRegisteredThread): Lock here. |
|
3957 (KJS::Collector::registerThread): To match, assert that we're locked here. |
|
3958 |
|
3959 2007-03-10 Geoffrey Garen <ggaren@apple.com> |
|
3960 |
|
3961 Reviewed by Darin Adler. |
|
3962 |
|
3963 Fixed <rdar://problem/4587763> PAC file: lock inversion between QT and |
|
3964 JSCore causes a hang @ www.panoramas.dk |
|
3965 |
|
3966 With a PAC file, run-webkit-tests --threaded passes, the reported site |
|
3967 works, and all the Quicktime/JavaScript and Flash/JavaScript examples |
|
3968 I found through Google work, too. |
|
3969 |
|
3970 Any time JavaScript causes arbitrary non-JavaScript code to execute, it |
|
3971 risks deadlock, because that code may block, trying to acquire a lock |
|
3972 owned by a thread that is waiting to execute JavaScript. In this case, |
|
3973 the thread was a networking thread that was waiting to interpret a PAC file. |
|
3974 |
|
3975 Because non-JavaScript code may execute in response to, well, anything, |
|
3976 a perfect solution to this problem is impossible. I've implemented an |
|
3977 optimistic solution, instead: JavaScript will drop its lock whenever it |
|
3978 makes a direct call to non-JavaScript code through a bridging/plug-in API, |
|
3979 but will blissfully ignore the indirect ways it may cause non-JavaScript |
|
3980 code to run (resizing a window, for example). |
|
3981 |
|
3982 Unfortunately, this solution introduces significant locking overhead in |
|
3983 the bridging APIs. I don't see a way around that. |
|
3984 |
|
3985 This patch includes some distinct bug fixes I saw along the way: |
|
3986 |
|
3987 * bindings/objc/objc_instance.mm: Fixed a bug where a nested begin() call |
|
3988 would leak its autorelease pool, because it would NULL out _pool without |
|
3989 draining it. |
|
3990 |
|
3991 * bindings/runtime_object.cpp: |
|
3992 (RuntimeObjectImp::methodGetter): Don't copy an Identifier to ASCII only |
|
3993 to turn around and make an Identifier from the ASCII. In an earlier |
|
3994 version of this patch, the copy caused an assertion failure. Now it's |
|
3995 just unnecessary work. |
|
3996 (RuntimeObjectImp::getOwnPropertySlot): ditto |
|
3997 |
|
3998 * bindings/objc/objc_instance.h: Removed overrides of setVAlueOfField and |
|
3999 getValueOfField, because they did exactly what the base class versions did. |
|
4000 Removed overrides of Noncopyable declarations for the same reason. |
|
4001 |
|
4002 * bindings/runtime.h: Inherit from Noncopyable instead of rolling our own. |
|
4003 * bindings/c/c_instance.h: ditto |
|
4004 |
|
4005 And the actual patch: |
|
4006 |
|
4007 * API/JSCallbackConstructor.cpp: Drop all locks when calling out to C. |
|
4008 (KJS::JSCallbackConstructor::construct): |
|
4009 * API/JSCallbackFunction.cpp: ditto |
|
4010 (KJS::JSCallbackFunction::callAsFunction): |
|
4011 * API/JSCallbackObject.cpp: ditto |
|
4012 (KJS::JSCallbackObject::init): |
|
4013 (KJS::JSCallbackObject::~JSCallbackObject): |
|
4014 (KJS::JSCallbackObject::getOwnPropertySlot): |
|
4015 (KJS::JSCallbackObject::put): |
|
4016 (KJS::JSCallbackObject::deleteProperty): |
|
4017 (KJS::JSCallbackObject::construct): |
|
4018 (KJS::JSCallbackObject::hasInstance): |
|
4019 (KJS::JSCallbackObject::callAsFunction): |
|
4020 (KJS::JSCallbackObject::getPropertyNames): |
|
4021 (KJS::JSCallbackObject::toNumber): |
|
4022 (KJS::JSCallbackObject::toString): |
|
4023 (KJS::JSCallbackObject::staticValueGetter): |
|
4024 (KJS::JSCallbackObject::callbackGetter): |
|
4025 |
|
4026 * bindings/c/c_instance.cpp: Drop all locks when calling out to C. |
|
4027 (KJS::Bindings::CInstance::invokeMethod): |
|
4028 (KJS::Bindings::CInstance::invokeDefaultMethod): |
|
4029 * bindings/c/c_runtime.cpp: Drop all locks when calling out to C. |
|
4030 (KJS::Bindings::CField::valueFromInstance): |
|
4031 (KJS::Bindings::CField::setValueToInstance): |
|
4032 * bindings/jni/jni_objc.mm: |
|
4033 (KJS::Bindings::dispatchJNICall): Drop all locks when calling out to Java. |
|
4034 |
|
4035 * bindings/objc/objc_instance.mm: The changes here are to accomodate the |
|
4036 fact that C++ unwinding of DropAllLocks goes crazy when you put it inside |
|
4037 a @try block. I moved all JavaScript stuff outside of the @try blocks, and |
|
4038 then prefixed the whole blocks with DropAllLocks objects. This required some |
|
4039 supporting changes in other functions, which now acquire the JSLock for |
|
4040 themselves, intead of relying on their callers to do so. |
|
4041 (ObjcInstance::end): |
|
4042 (ObjcInstance::invokeMethod): |
|
4043 (ObjcInstance::invokeDefaultMethod): |
|
4044 (ObjcInstance::setValueOfUndefinedField): |
|
4045 (ObjcInstance::getValueOfUndefinedField): |
|
4046 * bindings/objc/objc_runtime.mm: Same as above, except I didn't want to |
|
4047 change throwError to acquire the JSLock for itself. |
|
4048 (ObjcField::valueFromInstance): |
|
4049 (ObjcField::setValueToInstance): |
|
4050 * bindings/objc/objc_utility.mm: Supporting changes mentioned above. |
|
4051 (KJS::Bindings::convertValueToObjcValue): |
|
4052 (KJS::Bindings::convertObjcValueToValue): |
|
4053 |
|
4054 * kjs/JSLock.cpp: |
|
4055 (1) Fixed DropAllLocks to behave as advertised, and drop the JSLock only |
|
4056 if the current thread actually acquired it in the first place. This is |
|
4057 important because WebKit needs to ensure that the JSLock has been |
|
4058 dropped before it makes a plug-in call, even though it doesn't know if |
|
4059 the current thread actually acquired the JSLock. (We don't want WebKit |
|
4060 to accidentally drop a lock belonging to *another thread*.) |
|
4061 (2) Used the new per-thread code written for (1) to make recursive calls |
|
4062 to JSLock very cheap. JSLock now knows to call pthread_mutext_lock/ |
|
4063 pthread_mutext_unlock only at nesting level 0. |
|
4064 (KJS::createDidLockJSMutex): |
|
4065 (KJS::JSLock::lock): |
|
4066 (KJS::JSLock::unlock): |
|
4067 (KJS::DropAllLocks::DropAllLocks): |
|
4068 (KJS::DropAllLocks::~DropAllLocks): |
|
4069 (KJS::JSLock::lockCount): |
|
4070 * kjs/JSLock.h: Don't duplicate Noncopyable. |
|
4071 (KJS::JSLock::~JSLock): |
|
4072 |
|
4073 * wtf/Assertions.h: Blind attempt at helping the Windows build. |
|
4074 |
|
4075 2007-03-08 MorganL <morganl.webkit@yahoo.com> |
|
4076 |
|
4077 Reviewed by Darin. |
|
4078 |
|
4079 http://bugs.webkit.org/show_bug.cgi?id=13018 |
|
4080 Bug 13018: allow embedders to override the definition of CRASH. |
|
4081 |
|
4082 * wtf/Assertions.h: make it possible to override CRASH. |
|
4083 |
|
4084 2007-03-07 Anrong Hu <huanr@yahoo.com> |
|
4085 |
|
4086 Reviewed by Maciej. |
|
4087 |
|
4088 Fix http://bugs.webkit.org/show_bug.cgi?id=12535 |
|
4089 Bug 12535: Stack-optimizing compilers can trick GC into freeing in-use objects |
|
4090 |
|
4091 * kjs/internal.cpp: |
|
4092 (KJS::StringImp::toObject): Copy val onto the stack so it is not subject to garbage collection. |
|
4093 |
|
4094 2007-03-07 Geoffrey Garen <ggaren@apple.com> |
|
4095 |
|
4096 Build fix for non-multiple-thread folks. |
|
4097 |
|
4098 Use a shared global in the non-multiple-thread case. |
|
4099 |
|
4100 * wtf/FastMalloc.cpp: |
|
4101 (WTF::isForbidden): |
|
4102 (WTF::fastMallocForbid): |
|
4103 (WTF::fastMallocAllow): |
|
4104 |
|
4105 2007-03-07 Geoffrey Garen <ggaren@apple.com> |
|
4106 |
|
4107 Reviewed by Darin Adler. |
|
4108 |
|
4109 Fixed ASSERT failure I just introduced. |
|
4110 |
|
4111 Made the fastMalloc isForbidden flag per thread. (Oops!) We expect that |
|
4112 other threads will malloc while we're marking -- we just want to prevent |
|
4113 our own marking from malloc'ing. |
|
4114 |
|
4115 * wtf/FastMalloc.cpp: |
|
4116 (WTF::initializeIsForbiddenKey): |
|
4117 (WTF::isForbidden): |
|
4118 (WTF::fastMallocForbid): |
|
4119 (WTF::fastMallocAllow): |
|
4120 (WTF::fastMalloc): |
|
4121 (WTF::fastCalloc): |
|
4122 (WTF::fastFree): |
|
4123 (WTF::fastRealloc): |
|
4124 (WTF::do_malloc): |
|
4125 |
|
4126 2007-03-07 Shrikant Gangoda <shrikant.gangoda@celunite.com> |
|
4127 |
|
4128 Reviewed by Maciej. |
|
4129 |
|
4130 http://bugs.webkit.org/show_bug.cgi?id=12997 |
|
4131 |
|
4132 Wrap pthread-specific assertion in #if USE(MULTIPLE_THREADS). |
|
4133 |
|
4134 * kjs/collector.cpp: |
|
4135 (KJS::Collector::markMainThreadOnlyObjects): |
|
4136 |
|
4137 2007-03-06 Geoffrey Garen <ggaren@apple.com> |
|
4138 |
|
4139 Reviewed by Maciej Stachowiak. |
|
4140 |
|
4141 Fixed <rdar://problem/4576242> | http://bugs.webkit.org/show_bug.cgi?id=12586 |
|
4142 PAC file: malloc deadlock sometimes causes a hang @ www.apple.com/pro/profiles/ (12586) |
|
4143 |
|
4144 This is a modified version of r14752 on the branch. |
|
4145 |
|
4146 These changes just add debugging functionality. They ASSERT that we don't |
|
4147 malloc during the mark phase of a garbage collection, which can cause a |
|
4148 deadlock. |
|
4149 |
|
4150 * kjs/collector.cpp: |
|
4151 (KJS::Collector::collect): |
|
4152 * wtf/FastMalloc.cpp: |
|
4153 (WTF::fastMallocForbid): |
|
4154 (WTF::fastMallocAllow): |
|
4155 (WTF::fastMalloc): |
|
4156 (WTF::fastCalloc): |
|
4157 (WTF::fastFree): |
|
4158 (WTF::fastRealloc): |
|
4159 (WTF::do_malloc): |
|
4160 * wtf/FastMalloc.h: |
|
4161 |
|
4162 2007-03-06 Geoffrey Garen <ggaren@apple.com> |
|
4163 |
|
4164 Reviewed by Maciej Stachowiak. |
|
4165 |
|
4166 Fixed all known crashers exposed by run-webkit-tests --threaded. This covers: |
|
4167 |
|
4168 <rdar://problem/4565394> | http://bugs.webkit.org/show_bug.cgi?id=12585 |
|
4169 PAC file: after closing a window that contains macworld.com, new window |
|
4170 crashes (KJS::PropertyMap::mark()) (12585) |
|
4171 <rdar://problem/4571215> | http://bugs.webkit.org/show_bug.cgi?id=9211 |
|
4172 PAC file: Crash occurs when clicking on the navigation tabs at http://www.businessweek.com/ (9211) |
|
4173 <rdar://problem/4557926> |
|
4174 PAC file: Crash occurs when attempting to view image in slideshow mode |
|
4175 at http://d.smugmug.com/gallery/581716 ( KJS::IfNode::execute (KJS:: |
|
4176 ExecState*) + 312) if you use a PAC file |
|
4177 |
|
4178 (1) Added some missing JSLocks, along with related ASSERTs. |
|
4179 |
|
4180 (2) Fully implemented support for objects that can only be garbage collected |
|
4181 on the main thread. So far, only WebCore uses this. We can add it to API |
|
4182 later if we learn that it's needed. |
|
4183 |
|
4184 The implementation uses a "main thread only" flag inside each object. When |
|
4185 collecting on a secondary thread, the Collector does an extra pass through |
|
4186 the heap to mark all flagged objects before sweeping. This solution makes |
|
4187 the common case -- flag lots of objects, but never collect on a secondary |
|
4188 thread -- very fast, even though the uncommon case of garbage collecting |
|
4189 on a secondary thread isn't as fast as it could be. I left some notes |
|
4190 about how to speed it up, if we ever care. |
|
4191 |
|
4192 For posterity, here are some things I learned about GC while investigating: |
|
4193 |
|
4194 * Each collect must either mark or delete every heap object. "Zombie" |
|
4195 objects, which are neither marked nor deleted, raise these issues: |
|
4196 |
|
4197 * On the next pass, the conservative marking algorithm might mark a |
|
4198 zombie, causing it to mark freed objects. |
|
4199 |
|
4200 * The client might try to use a zombie, which would seem live because |
|
4201 its finalizer had not yet run. |
|
4202 |
|
4203 * A collect on the main thread is free to delete any object. Presumably, |
|
4204 objects allocated on secondary threads have thread-safe finalizers. |
|
4205 |
|
4206 * A collect on a secondary thread must not delete thread-unsafe objects. |
|
4207 |
|
4208 * The mark function must be thread-safe. |
|
4209 |
|
4210 Line by line comments: |
|
4211 |
|
4212 * API/JSObjectRef.h: Added comment specifying that the finalize callback |
|
4213 may run on any thread. |
|
4214 |
|
4215 * JavaScriptCore.exp: Nothing to see here. |
|
4216 |
|
4217 * bindings/npruntime.cpp: |
|
4218 (_NPN_GetStringIdentifier): Added JSLock. |
|
4219 |
|
4220 * bindings/objc/objc_instance.h: |
|
4221 * bindings/objc/objc_instance.mm: |
|
4222 (ObjcInstance::~ObjcInstance): Use an autorelease pool. The other callers |
|
4223 to CFRelease needed one, too, but they were dead code, so I removed them |
|
4224 instead. (This fixes a leak seen while running run-webkit-tests --threaded, |
|
4225 although I don't think it's specifically a threading issue.) |
|
4226 |
|
4227 * kjs/collector.cpp: |
|
4228 (KJS::Collector::collectOnMainThreadOnly): New function. Tells the collector |
|
4229 to collect a value only if it's collecting on the main thread. |
|
4230 (KJS::Collector::markMainThreadOnlyObjects): New function. Scans the heap |
|
4231 for "main thread only" objects and marks them. |
|
4232 |
|
4233 * kjs/date_object.cpp: |
|
4234 (KJS::DateObjectImp::DateObjectImp): To make the new ASSERTs happy, allocate |
|
4235 our globals on the heap, avoiding a seemingly unsafe destructor call at |
|
4236 program exit time. |
|
4237 * kjs/function_object.cpp: |
|
4238 (FunctionPrototype::FunctionPrototype): ditto |
|
4239 |
|
4240 * kjs/interpreter.cpp: |
|
4241 (KJS::Interpreter::mark): Removed boolean parameter, which was an incomplete |
|
4242 and arguably hackish way to implement markMainThreadOnlyObjects() inside WebCore. |
|
4243 * kjs/interpreter.h: |
|
4244 |
|
4245 * kjs/identifier.cpp: |
|
4246 (KJS::identifierTable): Added some ASSERTs to check for thread safety |
|
4247 problems. |
|
4248 |
|
4249 * kjs/list.cpp: Added some ASSERTs to check for thread safety problems. |
|
4250 (KJS::allocateListImp): |
|
4251 (KJS::List::release): |
|
4252 (KJS::List::append): |
|
4253 (KJS::List::empty): Make the new ASSERTs happy. |
|
4254 |
|
4255 * kjs/object.h: |
|
4256 (KJS::JSObject::JSObject): "m_destructorIsThreadSafe" => "m_collectOnMainThreadOnly". |
|
4257 I removed the constructor parameter because m_collectOnMainThreadOnly, |
|
4258 like m_marked, is a Collector bit, so only the Collector should set or get it. |
|
4259 |
|
4260 * kjs/object_object.cpp: |
|
4261 (ObjectPrototype::ObjectPrototype): Make the ASSERTs happy. |
|
4262 * kjs/regexp_object.cpp: |
|
4263 (RegExpPrototype::RegExpPrototype): ditto |
|
4264 |
|
4265 * kjs/ustring.cpp: Added some ASSERTs to check for thread safety problems. |
|
4266 (KJS::UCharReference::ref): |
|
4267 (KJS::UString::Rep::createCopying): |
|
4268 (KJS::UString::Rep::create): |
|
4269 (KJS::UString::Rep::destroy): |
|
4270 (KJS::UString::null): Make the new ASSERTs happy. |
|
4271 * kjs/ustring.h: |
|
4272 (KJS::UString::Rep::ref): Added some ASSERTs to check for thread safety problems. |
|
4273 (KJS::UString::Rep::deref): |
|
4274 |
|
4275 * kjs/value.h: |
|
4276 (KJS::JSCell::JSCell): |
|
4277 |
|
4278 2007-03-06 Geoffrey Garen <ggaren@apple.com> |
|
4279 |
|
4280 Reviewed by Maciej Stachowiak. |
|
4281 |
|
4282 2% speedup on super accurate JS iBench. |
|
4283 |
|
4284 (KJS::Collector::collect): Removed anti-optimization to call |
|
4285 pthread_is_threaded_np() before calling pthread_main_np(). Almost all |
|
4286 apps have more than one thread, so the extra call is actually worse. |
|
4287 Interestingly, even the single-threaded testkjs shows a speed gain |
|
4288 from removing the pthread_is_threaded_np() short-circuit. Not sure why. |
|
4289 |
|
4290 2007-03-04 Don Gibson <dgibson77@gmail.com> |
|
4291 |
|
4292 Reviewed by Nikolas Zimmermann. |
|
4293 |
|
4294 - fix http://bugs.webkit.org/show_bug.cgi?id=12950 |
|
4295 Assertions.cpp should not #define macros that are already defined |
|
4296 |
|
4297 * wtf/Assertions.cpp: Don't #define WINVER and _WIN32_WINNT if they |
|
4298 are already defined. |
|
4299 |
|
4300 2007-03-02 Steve Falkenburg <sfalken@apple.com> |
|
4301 |
|
4302 Reviewed by Anders. |
|
4303 |
|
4304 Add unsigned int hash traits (matches existing unsigned long version) |
|
4305 |
|
4306 * wtf/HashTraits.h: |
|
4307 (WTF::): |
|
4308 |
|
4309 2007-03-02 Adam Roben <aroben@apple.com> |
|
4310 |
|
4311 Reviewed by Kevin M. |
|
4312 |
|
4313 Try to fix the Qt build. |
|
4314 |
|
4315 * kjs/DateMath.cpp: |
|
4316 (KJS::msToGregorianDateTime): Removed unnecessary "struct" keyword. |
|
4317 * kjs/DateMath.h: Moved forward declarations to the top of the file |
|
4318 before they are used. |
|
4319 * kjs/date_object.cpp: |
|
4320 (KJS::formatLocaleDate): Changed to take a const GregorianDateTime& |
|
4321 since GregorianDateTime is Noncopyable. |
|
4322 |
|
4323 2007-03-02 Darin Adler <darin@apple.com> |
|
4324 |
|
4325 Reviewed by Kevin McCullough. |
|
4326 |
|
4327 - fix http://bugs.webkit.org/show_bug.cgi?id=12867 |
|
4328 REGRESSION: BenchJS test 7 (dates) is 220% slower than in Safari 2.0.4 |
|
4329 |
|
4330 * kjs/DateMath.h: Marked GregorianDateTime as noncopyable, since it has a non-trivial |
|
4331 destructor and not the correspoding copy constructor or assignment operator. |
|
4332 Changed the GregorianDateTime constructor to use member initialization syntax. |
|
4333 Fixed the destructor to use the array delete operator, since timeZone is an array. |
|
4334 |
|
4335 * kjs/DateMath.cpp: |
|
4336 (KJS::daysInYear): Changed to call isLeapYear so the rule is not repeated twice. |
|
4337 (KJS::getUTCOffset): Added caching on PLATFORM(DARWIN), since we can rely on the |
|
4338 notify_check function and "com.apple.system.timezone" to let us know when the |
|
4339 offset has changed. |
|
4340 |
|
4341 2007-02-27 Geoffrey Garen <ggaren@apple.com> |
|
4342 |
|
4343 Reviewed by Darin Adler. |
|
4344 |
|
4345 Follow-up to fixing http://bugs.webkit.org/show_bug.cgi?id=12659 | <rdar://problem/4954306> |
|
4346 JS objects not collected after closing window @ ebay.com/maps.google.com |
|
4347 |
|
4348 Changed Interpreter cache of global constructors and prototypes from |
|
4349 ProtectedPtrs to bare, marked pointers. ProtectedPtrs are inefficient, |
|
4350 and they increase the risk of reference cycles. Also, Darin said something |
|
4351 about ProtectedPtrs giving him warts. |
|
4352 |
|
4353 Also changed data members to precise types from generic JSObject*'s. |
|
4354 |
|
4355 Layout tests and JS tests pass. |
|
4356 |
|
4357 * kjs/SavedBuiltins.h: |
|
4358 * kjs/interpreter.cpp: |
|
4359 (KJS::Interpreter::init): |
|
4360 (KJS::Interpreter::~Interpreter): |
|
4361 (KJS::Interpreter::initGlobalObject): Moved Identifier::init() call to |
|
4362 constructor, for clarity. |
|
4363 (KJS::Interpreter::mark): |
|
4364 * kjs/interpreter.h: |
|
4365 |
|
4366 2007-02-27 Geoffrey Garen <ggaren@apple.com> |
|
4367 |
|
4368 Reviewed by Maciej Stachowiak. |
|
4369 |
|
4370 Fixed http://bugs.webkit.org/show_bug.cgi?id=12659 | <rdar://problem/4954306> |
|
4371 JS objects not collected after closing window @ ebay.com/maps.google.com |
|
4372 |
|
4373 Don't GC in the Interpreter destructor. For that to work, the Interpreter |
|
4374 would have to NULL out all of its ProtectedPtrs before calling collect(). But |
|
4375 we've decided that we don't want things to work that way, anyway. We want the |
|
4376 client to be in charge of manual GC so that it can optimize cases when |
|
4377 it will be destroying many interpreters at once |
|
4378 (e.g., http://bugs.webkit.org/show_bug.cgi?id=12900). |
|
4379 |
|
4380 Also removed Interpreter::collect() because it was redundant with |
|
4381 Collector::collect(). |
|
4382 |
|
4383 * JavaScriptCore.exp: |
|
4384 * kjs/interpreter.cpp: |
|
4385 (KJS::Interpreter::~Interpreter): |
|
4386 * kjs/testkjs.cpp: |
|
4387 (TestFunctionImp::callAsFunction): |
|
4388 |
|
4389 2007-02-26 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
4390 |
|
4391 Reviewed by Adam Roben. |
|
4392 |
|
4393 Rename *_SUPPORT defines to ENABLE_*. |
|
4394 |
|
4395 * jscore.bkl: |
|
4396 |
|
4397 2007-02-26 Maciej Stachowiak <mjs@apple.com> |
|
4398 |
|
4399 Reviewed by Lars. |
|
4400 |
|
4401 - <rdar://problem/5021698> Disable experimental SVG features (12883) |
|
4402 |
|
4403 * wtf/Platform.h: Add ENABLE() macro similar to HAVE() and USE(), to |
|
4404 allow nicer handling of optional WebKit features. |
|
4405 |
|
4406 2007-02-22 George Staikos <staikos@kde.org> |
|
4407 |
|
4408 Reviewed by Lars. |
|
4409 |
|
4410 Add return values |
|
4411 |
|
4412 * wtf/unicode/qt4/UnicodeQt4.h: |
|
4413 (WTF::Unicode::toLower): |
|
4414 (WTF::Unicode::toUpper): |
|
4415 |
|
4416 2007-02-22 Oscar Cwajbaum <public@oscarc.net> |
|
4417 |
|
4418 Reviewed by Maciej. |
|
4419 |
|
4420 Fix ARM-specific alignment problem in FastMalloc |
|
4421 http://bugs.webkit.org/show_bug.cgi?id=12841 |
|
4422 |
|
4423 * wtf/FastMalloc.cpp: |
|
4424 Modify how pageheap_memory is declared to ensure proper alignment |
|
4425 on architectures such as ARM |
|
4426 |
|
4427 2007-02-20 Zack Rusin <zrusin@trolltech.com> |
|
4428 |
|
4429 Reviewed by Lars |
|
4430 |
|
4431 Make sure that non-void methods always return something. |
|
4432 |
|
4433 * wtf/unicode/qt4/UnicodeQt4.h: |
|
4434 (WTF::Unicode::toLower): |
|
4435 (WTF::Unicode::toUpper): |
|
4436 (WTF::Unicode::foldCase): |
|
4437 |
|
4438 2007-02-18 Kevin Ollivier <kevino@theolliviers.com> |
|
4439 |
|
4440 Reviewed by Adam Roben. |
|
4441 |
|
4442 Fix cases where MSVC-specific code was identified as Win32 platform |
|
4443 code. (as it should be compiled for e.g. wx port when using MSVC too) |
|
4444 |
|
4445 * wtf/Assertions.h: |
|
4446 * wtf/MathExtras.h: |
|
4447 * wtf/StringExtras.h: |
|
4448 changed PLATFORM(WIN) sections to COMPILER(MSVC) as necessary |
|
4449 |
|
4450 2007-02-17 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
4451 |
|
4452 Reviewed by Adam Roben. |
|
4453 |
|
4454 Fix crashes on ARM due to different struct packing. Based on a patch |
|
4455 by Mike Emmel. |
|
4456 * kjs/ustring.cpp: compile-time assert to make sure sizeof(UChar) == 2 |
|
4457 * kjs/ustring.h: pack UChar struct to ensure that sizeof(UChar) == 2 |
|
4458 * wtf/Assertions.h: add COMPILE_ASSERT macro for compile-time assertions |
|
4459 |
|
4460 2007-02-16 George Staikos <staikos@kde.org> |
|
4461 |
|
4462 Reviewed by Maciej. |
|
4463 |
|
4464 Fix uninitialized variable |
|
4465 |
|
4466 * bindings/testbindings.cpp: |
|
4467 (myAllocate): |
|
4468 |
|
4469 2007-02-16 Anders Carlsson <acarlsson@apple.com> |
|
4470 |
|
4471 Reviewed by Mitz. |
|
4472 |
|
4473 http://bugs.webkit.org/show_bug.cgi?id=12788 |
|
4474 REGRESSION: Going back one page in history has a noticeable delay |
|
4475 |
|
4476 Um...if all elements in two vectors are equal, then I guess we could say that |
|
4477 the two vectors are equal too. |
|
4478 |
|
4479 * wtf/Vector.h: |
|
4480 (WTF::): |
|
4481 |
|
4482 2007-02-14 Anders Carlsson <acarlsson@apple.com> |
|
4483 |
|
4484 Reviewed by Darin. |
|
4485 |
|
4486 Add new canCompareWithMemcmp vector trait and use it to determine whether |
|
4487 operator== can use memcmp. |
|
4488 |
|
4489 * wtf/Vector.h: |
|
4490 (WTF::): |
|
4491 (WTF::VectorTypeOperations::compare): |
|
4492 (WTF::operator==): |
|
4493 * wtf/VectorTraits.h: |
|
4494 (WTF::): |
|
4495 |
|
4496 2007-02-13 Brady Eidson <beidson@apple.com> |
|
4497 |
|
4498 Reviewed by Darin |
|
4499 |
|
4500 Tweaked vector a bit |
|
4501 |
|
4502 * wtf/Vector.h: |
|
4503 (WTF::operator==): |
|
4504 |
|
4505 2007-02-13 Dex Deacon <occupant4@gmail.com> |
|
4506 |
|
4507 Reviewed by Darin. |
|
4508 |
|
4509 - fix for http://bugs.webkit.org/show_bug.cgi?id=12750 |
|
4510 Vector operator== was not defined correctly. It returned void, |
|
4511 did not accept const Vectors, and used an int instead of size_t. |
|
4512 |
|
4513 * wtf/Vector.h: fixed comparison operators |
|
4514 (WTF::operator==): |
|
4515 (WTF::operator!=): |
|
4516 |
|
4517 2007-02-10 David Carson <dacarson@gmail.com> |
|
4518 |
|
4519 Reviewed by Maciej. |
|
4520 |
|
4521 - fix for http://bugs.webkit.org/show_bug.cgi?id=12636 |
|
4522 Corrected the generation of method signatures when the parameter |
|
4523 is an Array. |
|
4524 Added support for converting a Javascript array to a Java array. |
|
4525 |
|
4526 * bindings/jni/jni_utility.h: added new type for array, array_type |
|
4527 * bindings/jni/jni_runtime.cpp: add support for new array type |
|
4528 (JavaField::valueFromInstance): |
|
4529 (JavaField::setValueToInstance): |
|
4530 (JavaMethod::JavaMethod): |
|
4531 (JavaMethod::signature): |
|
4532 * bindings/jni/jni_utility.cpp: add support for new array type |
|
4533 (KJS::Bindings::callJNIMethod): |
|
4534 (KJS::Bindings::callJNIStaticMethod): |
|
4535 (KJS::Bindings::callJNIMethodIDA): |
|
4536 (KJS::Bindings::JNITypeFromClassName): |
|
4537 (KJS::Bindings::signatureFromPrimitiveType): |
|
4538 (KJS::Bindings::JNITypeFromPrimitiveType): |
|
4539 (KJS::Bindings::getJNIField): |
|
4540 (KJS::Bindings::convertArrayInstanceToJavaArray): new method |
|
4541 converts the Javascript array to the requested Java array. |
|
4542 (KJS::Bindings::convertValueToJValue): |
|
4543 |
|
4544 2007-02-08 Anders Carlsson <acarlsson@apple.com> |
|
4545 |
|
4546 Reviewed by Geoff. |
|
4547 |
|
4548 <rdar://problem/4930614> |
|
4549 Safari complains about "Slow Script" if GMail is left open and machine is busy |
|
4550 |
|
4551 <rdar://problem/4649516> |
|
4552 Turn off slow script dialog or crank up time that makes it come up |
|
4553 |
|
4554 <rdar://problem/4963589> |
|
4555 Slow script warning is displayed after closing of PROMPT or PRINT dialog |
|
4556 |
|
4557 Re-do the way script timeouts are handled. No longer use a unix timer that sends signals. Instead, add a |
|
4558 tick count and increment it in loop bodies. If the tick count reaches a threshold, do a timeout check. If the total time executing |
|
4559 is higher than the timeout value, (possibly) interrupt the script. The timeout checker also adjusts the threshold dynamically |
|
4560 to prevent doing the timeout check too often. |
|
4561 |
|
4562 * JavaScriptCore.exp: |
|
4563 Remove pause and resume calls. |
|
4564 |
|
4565 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
4566 Add winmm.lib. |
|
4567 |
|
4568 * kjs/interpreter.cpp: |
|
4569 (KJS::Interpreter::init): |
|
4570 (KJS::Interpreter::~Interpreter): |
|
4571 (KJS::Interpreter::startTimeoutCheck): |
|
4572 (KJS::Interpreter::stopTimeoutCheck): |
|
4573 (KJS::Interpreter::resetTimeoutCheck): |
|
4574 (KJS::getCurrentTime): |
|
4575 (KJS::Interpreter::checkTimeout): |
|
4576 * kjs/interpreter.h: |
|
4577 (KJS::Interpreter::timedOut): |
|
4578 * kjs/nodes.cpp: |
|
4579 (DoWhileNode::execute): |
|
4580 (WhileNode::execute): |
|
4581 (ForNode::execute): |
|
4582 |
|
4583 2007-02-07 Darin Adler <darin@apple.com> |
|
4584 |
|
4585 * JavaScriptCore.vcproj/JavaScriptCore.sln: Reenable testkjs. |
|
4586 |
|
4587 2007-02-07 Darin Adler <darin@apple.com> |
|
4588 |
|
4589 Reviewed by Geoff. |
|
4590 |
|
4591 - another build fix; this time for sure |
|
4592 |
|
4593 * pcre/pcre_exec.c: (match): |
|
4594 The compiler caught an incorrect use of the othercase variable across |
|
4595 a call to RMATCH in character repeat processing. Local variables can |
|
4596 change in the crazy NO_RECURSE mode that we use, so we instead need |
|
4597 the value in othercase to be in one of the special stack frame variables. |
|
4598 Added a new stack frame variable for this purpose named repeat_othercase. |
|
4599 Also noted a similar error in the non-UTF-16 side of the #ifdef, but |
|
4600 didn't try to fix that one. Also removed a SUPPORT_UCP #ifdef from the |
|
4601 PCRE_UTF16 side; that code doesn't work without the Unicde properties |
|
4602 table, and we don't try to use it that way. |
|
4603 |
|
4604 2007-02-06 Steve Falkenburg <sfalken@apple.com> |
|
4605 |
|
4606 Disable testkjs in sln until we figure out mysterious compiler warning. |
|
4607 |
|
4608 * JavaScriptCore.vcproj/JavaScriptCore.sln: |
|
4609 |
|
4610 2007-02-06 Steve Falkenburg <sfalken@apple.com> |
|
4611 |
|
4612 Build fix by ggaren |
|
4613 |
|
4614 * pcre/pcre_exec.c: |
|
4615 (match): |
|
4616 |
|
4617 2007-02-06 Darin Adler <darin@apple.com> |
|
4618 |
|
4619 Reviewed by Geoff. |
|
4620 |
|
4621 - fix <rdar://problem/4979089> PCRE should avoid setjmp/longjmp even when compiler |
|
4622 is not GCC |
|
4623 |
|
4624 Added a new code path that's slower and way uglier but doesn't rely on GCC's |
|
4625 computed gotos. |
|
4626 |
|
4627 * pcre/pcre_exec.c: Added a numeric parameter to the RMATCH function. It must be |
|
4628 different at every RMATCH call site. Changed the non-GCC NO_RECURSE version of |
|
4629 the macro to use a label incorporating the number. Changed the RRETURN macro to |
|
4630 use a goto instead of longjmp. |
|
4631 (match): Added a different number at each callsite, using a perl script for the |
|
4632 first-time task. Going forward it should be easy to maintain by hand. Added a |
|
4633 switch statement at the bottom of the function. We'll get compile time errors |
|
4634 if we have anything in the switch statement that's never used in an RMATCH, |
|
4635 but errors in the other direction are silent except at runtime. |
|
4636 |
|
4637 2007-02-06 Darin Adler <darin@apple.com> |
|
4638 |
|
4639 Reviewed by John. |
|
4640 |
|
4641 - fix <rdar://problem/4687840> 9A241: JavaScript RegExp 25-30x slower than on 10.4.7 |
|
4642 |
|
4643 I used Shark to figure out what to do. The test case is now 15% faster than with |
|
4644 stock Safari. Some other regular expression cases might still be a few % slower |
|
4645 than before, but the >10x slowdown is now completely gone. |
|
4646 |
|
4647 1) Fix slowness caused by setjmp/longjmp by using computed goto instead. |
|
4648 |
|
4649 Use GCC extensions - locally declared labels, labels as values, and computed goto - |
|
4650 instead of using setjmp/longjmp to implemement non-recursive version of the regular |
|
4651 expression system. We could probably make this even faster if we reduced the use |
|
4652 of malloc a bit too. |
|
4653 |
|
4654 2) Fix slowness caused by allocating heapframe objects by allocating the first |
|
4655 16 of them from the stack. |
|
4656 |
|
4657 3) Speed up use of malloc and free in PCRE by making it use fastMalloc and fastFree. |
|
4658 |
|
4659 4) Speed up the test case by adding a special case to a UString function. |
|
4660 |
|
4661 5) Made a small improvement to the innermost hottest loop of match by hoisting |
|
4662 the conversion from int to pcre_uchar out of the loop. |
|
4663 |
|
4664 * JavaScriptCore.xcodeproj/project.pbxproj: Compile FastMallocPCRE.cpp, and don't |
|
4665 compile pcre_globals.c. |
|
4666 |
|
4667 * wtf/FastMallocPCRE.cpp: Added. A copy of pcre_globals.c that uses FastMalloc.h. |
|
4668 This is better than code that sets the PCRE allocation globals because by doing it |
|
4669 this way there's guaranteed to be no problem with order of initialization. |
|
4670 |
|
4671 * kjs/ustring.cpp: (KJS::UString::spliceSubstringsWithSeparators): Add a fast |
|
4672 special case when this is called for only one subrange and no seaprators. This |
|
4673 was happening a lot in the test case and it seems quite reasonable to optimize this. |
|
4674 |
|
4675 * pcre/pcre_exec.c: Create a copy of the RMATCH and RRETURN macros that use goto |
|
4676 instead of setjmp/longjmp. Change code that calls pcre_stack_malloc to first use |
|
4677 storage on the stack inside the match function. |
|
4678 (match): Move initialization of utf8 up a couple lines to avoid "possibly used |
|
4679 uninitialized" warning. Use a local variable so we compare with pcre_uchar instead |
|
4680 of with int inside the inner "find a character" loop. |
|
4681 |
|
4682 2007-02-03 George Staikos <staikos@kde.org> |
|
4683 |
|
4684 Reviewed by Alexey. |
|
4685 |
|
4686 -1 is not a valid point. We can't handle anything > 0xffff anyway. |
|
4687 Fixes crash on cases like eval("x"); |
|
4688 |
|
4689 * wtf/unicode/qt4/UnicodeQt4.h: |
|
4690 (WTF::Unicode::category): |
|
4691 |
|
4692 2007-02-02 Darin Adler <darin@apple.com> |
|
4693 |
|
4694 Reviewed by Anders. |
|
4695 |
|
4696 - fix copying and assigning a ListHashSet |
|
4697 |
|
4698 No test because the code path with bugs I am fixing is not used yet. |
|
4699 |
|
4700 * wtf/ListHashSet.h: Tweaked ListHashSetNodeAllocator a little bit for clarity. |
|
4701 Changed m_allocator to be an OwnPtr instead of doing an explicit delete. |
|
4702 Fixed bug in copy constructor where we'd have an uninitialized m_allocator. |
|
4703 Fixed bug in assignment operator where it would swap only the hash table, and |
|
4704 not the head, tail, and allocator pointers. |
|
4705 |
|
4706 2007-02-02 Geoffrey Garen <ggaren@apple.com> |
|
4707 |
|
4708 Reviewed by Maciej Stachowiak. |
|
4709 |
|
4710 Use WTFLog instead of fprintf for logging KJS::Node leaks. |
|
4711 |
|
4712 * kjs/nodes.cpp: |
|
4713 (NodeCounter::~NodeCounter): Changed count to unsigned, updated |
|
4714 to match style guidelines. |
|
4715 |
|
4716 2007-02-02 Maciej Stachowiak <mjs@apple.com> |
|
4717 |
|
4718 - not reviewed, build fix |
|
4719 |
|
4720 * wtf/ListHashSet.h: |
|
4721 (WTF::ListHashSetNodeAllocator::ListHashSetNodeAllocator): ummm, use union correctly |
|
4722 |
|
4723 2007-02-01 Maciej Stachowiak <mjs@apple.com> |
|
4724 |
|
4725 Reviewed by Darin. |
|
4726 |
|
4727 - use a custom allocator for ListHashSet, to fix ~1% perf regression using it for form control |
|
4728 |
|
4729 * wtf/ListHashSet.h: |
|
4730 (WTF::ListHashSetNodeAllocator::ListHashSetNodeAllocator): |
|
4731 (WTF::ListHashSetNodeAllocator::allocate): |
|
4732 (WTF::ListHashSetNodeAllocator::deallocate): |
|
4733 (WTF::ListHashSetNode::operator new): |
|
4734 (WTF::ListHashSetNode::operator delete): |
|
4735 (WTF::ListHashSetNode::destroy): |
|
4736 (WTF::ListHashSetTranslator::translate): |
|
4737 (WTF::::ListHashSet): |
|
4738 (WTF::::~ListHashSet): |
|
4739 (WTF::::add): |
|
4740 (WTF::::unlinkAndDelete): |
|
4741 (WTF::::deleteAllNodes): |
|
4742 |
|
4743 2007-01-31 Maciej Stachowiak <mjs@apple.com> |
|
4744 |
|
4745 Reviewed by Adam. |
|
4746 |
|
4747 - fix sporadic crash |
|
4748 |
|
4749 * wtf/ListHashSet.h: |
|
4750 (WTF::::remove): remove before deleting |
|
4751 |
|
4752 2007-01-31 Maciej Stachowiak <mjs@apple.com> |
|
4753 |
|
4754 Reviewed by Mark with help from Lars. |
|
4755 |
|
4756 - added new ListHashSet class, which combines a hashtable and a linked list to provide a set |
|
4757 that keeps elements in inserted order |
|
4758 |
|
4759 This is to assist in fixing the following: |
|
4760 <rdar://problem/4751164> REGRESSION: Safari places text on incorrect button when returning to a page via back [10541] |
|
4761 http://bugs.webkit.org/show_bug.cgi?id=10541 |
|
4762 |
|
4763 * JavaScriptCore.vcproj/WTF/WTF.vcproj: |
|
4764 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
4765 * wtf/HashTable.h: |
|
4766 (WTF::HashTable::find): |
|
4767 (WTF::HashTable::contains): |
|
4768 (WTF::::find): |
|
4769 (WTF::::contains): |
|
4770 * wtf/ListHashSet.h: Added. |
|
4771 (WTF::ListHashSetNode::ListHashSetNode): |
|
4772 (WTF::ListHashSetNodeHashFunctions::hash): |
|
4773 (WTF::ListHashSetNodeHashFunctions::equal): |
|
4774 (WTF::ListHashSetIterator::ListHashSetIterator): |
|
4775 (WTF::ListHashSetIterator::get): |
|
4776 (WTF::ListHashSetIterator::operator*): |
|
4777 (WTF::ListHashSetIterator::operator->): |
|
4778 (WTF::ListHashSetIterator::operator++): |
|
4779 (WTF::ListHashSetIterator::operator--): |
|
4780 (WTF::ListHashSetIterator::operator==): |
|
4781 (WTF::ListHashSetIterator::operator!=): |
|
4782 (WTF::ListHashSetIterator::operator const_iterator): |
|
4783 (WTF::ListHashSetIterator::node): |
|
4784 (WTF::ListHashSetConstIterator::ListHashSetConstIterator): |
|
4785 (WTF::ListHashSetConstIterator::get): |
|
4786 (WTF::ListHashSetConstIterator::operator*): |
|
4787 (WTF::ListHashSetConstIterator::operator->): |
|
4788 (WTF::ListHashSetConstIterator::operator++): |
|
4789 (WTF::ListHashSetConstIterator::operator--): |
|
4790 (WTF::ListHashSetConstIterator::operator==): |
|
4791 (WTF::ListHashSetConstIterator::operator!=): |
|
4792 (WTF::ListHashSetConstIterator::node): |
|
4793 (WTF::ListHashSetTranslator::hash): |
|
4794 (WTF::ListHashSetTranslator::equal): |
|
4795 (WTF::ListHashSetTranslator::translate): |
|
4796 (WTF::::ListHashSet): |
|
4797 (WTF::::operator): |
|
4798 (WTF::::~ListHashSet): |
|
4799 (WTF::::size): |
|
4800 (WTF::::capacity): |
|
4801 (WTF::::isEmpty): |
|
4802 (WTF::::begin): |
|
4803 (WTF::::end): |
|
4804 (WTF::::find): |
|
4805 (WTF::::contains): |
|
4806 (WTF::::add): |
|
4807 (WTF::::remove): |
|
4808 (WTF::::clear): |
|
4809 (WTF::::unlinkAndDelete): |
|
4810 (WTF::::appendNode): |
|
4811 (WTF::::deleteAllNodes): |
|
4812 (WTF::::makeIterator): |
|
4813 (WTF::::makeConstIterator): |
|
4814 (WTF::deleteAllValues): |
|
4815 |
|
4816 2007-01-30 Darin Adler <darin@apple.com> |
|
4817 |
|
4818 * kjs/DateMath.cpp: Fix license header to reflect LGPL as the first license |
|
4819 mentioned. We still mention the option of using under MPL or GPL since some |
|
4820 of this code came from the Mozilla project with those license terms. |
|
4821 |
|
4822 2007-01-30 Simon Hausmann <hausmann@kde.org> |
|
4823 |
|
4824 Reviewed by Zack. |
|
4825 |
|
4826 Turned JavaScriptCore from a separate library into an includable |
|
4827 project, to combine it all into libWebKitQt. |
|
4828 |
|
4829 * JavaScriptCore.pri: Added. |
|
4830 * JavaScriptCore.pro: Removed. |
|
4831 * kjs/testkjs.pro: |
|
4832 |
|
4833 2007-01-29 Geoffrey Garen <ggaren@apple.com> |
|
4834 |
|
4835 Reviewed by Maciej Stachowiak. |
|
4836 |
|
4837 Fixed <rdar://problem/4485644> REGRESSION: JavaScriptCore has init routines |
|
4838 |
|
4839 The TCMalloc module now initializes, if needed, inside GetCache() and |
|
4840 fastMallocSetIsMultiThreaded(). We leverage the same synchronization |
|
4841 technique used for enabling / disabling the single-threaded optimization |
|
4842 to synchronize initialization of the library without requiring a lock |
|
4843 for every malloc. |
|
4844 |
|
4845 1,251 runs of tcmalloc_unittest, 2 runs of a custom, massively multi-threaded |
|
4846 tcmalloc_unittest, and my custom version of the PLT show no regressions. |
|
4847 Super-accurate JS iBench reports a .24% regression, which is right at the |
|
4848 limit of its error range, so I'm declaring victory. |
|
4849 |
|
4850 * wtf/FastMalloc.cpp: |
|
4851 (WTF::fastMallocSetIsMultiThreaded): Initialize, if needed. (InitModule() |
|
4852 checks the "if needed" part.) |
|
4853 (WTF::TCMalloc_ThreadCache::GetCache): Restored original TCMalloc code |
|
4854 inside #ifdef, for posterity. Added new initialization logic. |
|
4855 (WTF::TCMalloc_ThreadCache::InitModule): Call InitTSD(), since we don't |
|
4856 have a static initializer to call it for us, now. This means that fastMalloc |
|
4857 is not usable as a general libc allocator, but it never was, and if it were |
|
4858 the general libc allocator, we wouldn't be here in the first place, so whatever. |
|
4859 (WTF::TCMalloc_ThreadCache::InitTSD): Don't try to take the pageheap_lock, |
|
4860 since InitModule already has it. |
|
4861 |
|
4862 2007-01-29 Kevin McCullough <KMcCullough@apple.com> |
|
4863 |
|
4864 Reviewed by Geoff and Oliver. |
|
4865 |
|
4866 - rdar://problem/4955561 |
|
4867 - missusing JavaScript shouldn't crash webkit. Now it doesn't, in this case. |
|
4868 |
|
4869 * bindings/objc/objc_runtime.mm: |
|
4870 (ObjcFallbackObjectImp::callAsFunction): |
|
4871 * bindings/runtime_method.cpp: |
|
4872 (RuntimeMethod::callAsFunction): |
|
4873 * bindings/runtime_object.cpp: |
|
4874 (RuntimeObjectImp::callAsFunction): |
|
4875 |
|
4876 2007-01-28 Geoffrey Garen <ggaren@apple.com> |
|
4877 |
|
4878 Reviewed by Maciej Stachowiak. |
|
4879 |
|
4880 First step in fixing <rdar://problem/4485644> REGRESSION: JavaScriptCore |
|
4881 has init routines |
|
4882 |
|
4883 Don't rely on a static initializer to store the main thread's ID (which |
|
4884 we would use to detect allocations on secondary threads). Instead, require |
|
4885 the caller to notify fastMalloc if it might allocate on a secondary thread. |
|
4886 |
|
4887 Also fixed what seemed like a race condition in do_malloc. |
|
4888 |
|
4889 tcmalloc_unittest and my custom versions of JS iBench and PLT show no |
|
4890 regressions. |
|
4891 |
|
4892 * wtf/FastMalloc.cpp: |
|
4893 (WTF::fastMallocSetIsMultiThreaded): |
|
4894 (1) Renamed from "fastMallocRegisterThread", which was a misleading name because |
|
4895 not all threads need to register with fastMalloc -- only secondary threads |
|
4896 need to, and only for the purpose of disabling its single-threaded optimization. |
|
4897 |
|
4898 (2) Use the pageheap_lock instead of a custom one, since we need to synchronize |
|
4899 with the read of isMultiThreaded inside CreateCacheIfNecessary. This is a new |
|
4900 requirement, now that we can't guarantee that the first call to CreateCacheIfNecessary |
|
4901 will occur on the main thread at init time, before any other threads have been created. |
|
4902 |
|
4903 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): |
|
4904 (WTF::do_malloc): Reverted WTF change only to call GetCache() if size <= kMaxSize. |
|
4905 The WTF code would read phinited without holding the pageheap_lock, which |
|
4906 seemed like a race condition. Regardless, calling GetCache reduces the number |
|
4907 of code paths to module initialization, which will help in writing the |
|
4908 final fix for this bug. |
|
4909 |
|
4910 2007-01-28 David Kilzer <ddkilzer@webkit.org> |
|
4911 |
|
4912 Reviewed by Darin. |
|
4913 |
|
4914 - fix http://bugs.webkit.org/show_bug.cgi?id=9815 |
|
4915 JavaScript TypeError loading Dean Edwards' JS compressor/obfuscator |
|
4916 |
|
4917 Creating a function using 'new Function()' was not setting its prototype with the |
|
4918 same flags as 'function() { }'. |
|
4919 |
|
4920 Test: fast/js/function-prototype.html |
|
4921 |
|
4922 * kjs/function_object.cpp: |
|
4923 (FunctionObjectImp::construct): Change flags from DontEnum|DontDelete|ReadOnly to |
|
4924 Internal|DontDelete to match FuncDeclNode::processFuncDecl() and |
|
4925 FuncExprNode::evaluate() in kjs/nodes.cpp. |
|
4926 |
|
4927 2007-01-27 Geoffrey Garen <ggaren@apple.com> |
|
4928 |
|
4929 Reviewed by Beth Dakin. |
|
4930 |
|
4931 Added some missing JSLocks, which might fix <rdar://problem/4889707>. |
|
4932 |
|
4933 We need to lock whenever we might allocate memory because our FastMalloc |
|
4934 implementation requires clients to register their threads, which we do |
|
4935 through JSLock. |
|
4936 |
|
4937 We also need to lock whenever modifying ref-counts because they're not |
|
4938 thread-safe. |
|
4939 |
|
4940 * API/JSObjectRef.cpp: |
|
4941 (JSClassCreate): Allocates memory |
|
4942 (JSClassRetain): Modifies a ref-count |
|
4943 (JSClassRelease): Modifies a ref-count |
|
4944 (JSPropertyNameArrayRetain): Modifies a ref-count |
|
4945 (JSPropertyNameArrayRelease): Modifies a ref-count |
|
4946 * API/JSStringRef.cpp: |
|
4947 (JSStringRetain): Modifies a ref-count |
|
4948 * API/JSValueRef.cpp: |
|
4949 (JSValueIsInstanceOfConstructor): Might allocate memory if an exception |
|
4950 is thrown. |
|
4951 |
|
4952 2007-01-27 Lars Knoll <lars@trolltech.com> |
|
4953 |
|
4954 Fix the Qt build. |
|
4955 |
|
4956 * bindings/qt/qt_instance.h: |
|
4957 |
|
4958 2007-01-25 Geoffrey Garen <ggaren@apple.com> |
|
4959 |
|
4960 Reviewed by Maciej Stachowiak. |
|
4961 |
|
4962 Fixed <rdar://problem/4608404> WebScriptObject's _rootObject lack |
|
4963 of ownership policy causes crashes (e.g., in Dashcode) |
|
4964 |
|
4965 The old model for RootObject ownership was either to (1) leak them or (2) assign |
|
4966 them to a single owner -- the WebCore::Frame -- which would destroy them |
|
4967 when it believed that all of its plug-ins had unloaded. |
|
4968 |
|
4969 This model was broken because of (1) and also because plug-ins are not the only |
|
4970 RootObject clients. All Bindings clients are RootObjects clients, including |
|
4971 applications, which outlive any particular WebCore::Frame. |
|
4972 |
|
4973 The new model for RootObject ownership is to reference-count them, with a |
|
4974 throw-back to the old model: The WebCore::Frame tracks the RootObjects |
|
4975 it creates, and invalidates them when it believes that all of its plug-ins |
|
4976 have unloaded. |
|
4977 |
|
4978 We maintain this throw-back to avoid plug-in leaks, particularly from Java. |
|
4979 Java is completely broken when it comes to releasing JavaScript objects. |
|
4980 Comments in our code allege that Java does not always call finalize when |
|
4981 collecting objects. Moreoever, my own testing reveals that, when Java does |
|
4982 notify JavaScript of a finalize, the data it provides is totally bogus. |
|
4983 |
|
4984 This setup is far from ideal, but I don't think we can do better without |
|
4985 completely rewriting the bindings code, and possibly part of the Java |
|
4986 plug-in / VM. |
|
4987 |
|
4988 Layout tests pass. No additional leaks reported. WebCore/manual-tests/*liveconnect* |
|
4989 and a few LiveConnect demos on the web also run without a hitch. |
|
4990 |
|
4991 const RootObject* => RootObject*, since we need to ref/deref |
|
4992 |
|
4993 * bindings/NP_jsobject.cpp: |
|
4994 (jsDeallocate): deref our RootObjects. Also unprotect or JSObject, instead |
|
4995 of just relying on the RootObject to do it for us when it's invalidated. |
|
4996 (_isSafeScript): Check RootObject validity. |
|
4997 (_NPN_CreateScriptObject): ditto |
|
4998 (_NPN_Invoke): ditto |
|
4999 (_NPN_Evaluate): ditto |
|
5000 (_NPN_GetProperty): ditto |
|
5001 (_NPN_SetProperty): ditto |
|
5002 (_NPN_RemoveProperty): ditto |
|
5003 (_NPN_HasProperty): ditto |
|
5004 (_NPN_HasMethod): ditto |
|
5005 (_NPN_SetException): ditto |
|
5006 |
|
5007 * bindings/runtime_root.cpp: |
|
5008 Revived bit-rotted LIAR LIAR LIAR comment. |
|
5009 |
|
5010 LOOK: Added support for invalidating RootObjects without deleting them, |
|
5011 which is the main goal of this patch. |
|
5012 |
|
5013 Moved protect counting into the RootObject class, to emphasize that |
|
5014 the RootObject protects the JSObject, and unprotects it upon being invalidated. |
|
5015 addNativeReference => RootObject::gcProtect |
|
5016 removeNativeReference => RootObject::gcUnprotect |
|
5017 ProtectCountSet::contains => RootObject::gcIsProtected |
|
5018 |
|
5019 I know we'll all be sad to see the word "native" go. |
|
5020 |
|
5021 * bindings/runtime_root.h: Added ref-counting support to RootObject, with |
|
5022 all the standard accoutrements. |
|
5023 |
|
5024 * bindings/c/c_utility.cpp: |
|
5025 (KJS::Bindings::convertValueToNPVariant): If we can't find a valid RootObject, |
|
5026 return void instead of just leaking. |
|
5027 |
|
5028 * bindings/jni/jni_instance.cpp: |
|
5029 (JavaInstance::JavaInstance): Don't take a RootObject in our constructor; |
|
5030 be like other Instances and require the caller to call setRootObject. This |
|
5031 reduces the number of ownership code paths. |
|
5032 (JavaInstance::invokeMethod): Check RootObject for validity. |
|
5033 * bindings/jni/jni_instance.h: Removed private no-arg constructor. Having |
|
5034 an arg constructor accomplishes the same thing. |
|
5035 |
|
5036 * bindings/jni/jni_jsobject.cpp: |
|
5037 (JavaJSObject::invoke): No need to call findProtectCountSet, because finalize() |
|
5038 checks for RootObject validity. |
|
5039 (JavaJSObject::JavaJSObject): check RootObject for validity |
|
5040 (JavaJSObject::call): ditto |
|
5041 (JavaJSObject::eval): ditto |
|
5042 (JavaJSObject::getMember): ditto |
|
5043 (JavaJSObject::setMember): ditto |
|
5044 (JavaJSObject::removeMember): ditto |
|
5045 (JavaJSObject::getSlot): ditto |
|
5046 (JavaJSObject::setSlot): ditto |
|
5047 (JavaJSObject::toString): ditto |
|
5048 (JavaJSObject::finalize): ditto |
|
5049 (JavaJSObject::createNative): No need to tell the RootObject to protect |
|
5050 the global object, since the RootObject already owns the interpreter. |
|
5051 |
|
5052 * bindings/jni/jni_runtime.cpp: |
|
5053 (JavaArray::JavaArray): Removed copy construcutor becaue it was unused. |
|
5054 Dead code is dangerous code. |
|
5055 |
|
5056 * bindings/objc/objc_runtime.mm: Added WebUndefined protocol. Previous use |
|
5057 of WebScriptObject was bogus, because WebUndefined is not a subclass of |
|
5058 WebScriptObject. |
|
5059 (convertValueToObjcObject): If we can't find a valid RootObject, |
|
5060 return nil instead of just leaking. |
|
5061 |
|
5062 * bindings/objc/objc_utility.mm: |
|
5063 (KJS::Bindings::convertValueToObjcValue): If we can't find a valid RootObject, |
|
5064 return nil instead of just leaking. |
|
5065 |
|
5066 2007-01-27 Andrew Wellington <proton@wiretapped.net> |
|
5067 |
|
5068 Reviewed by Maciej. |
|
5069 |
|
5070 Fix for Repeated string concatenation results in OOM crash |
|
5071 http://bugs.webkit.org/show_bug.cgi?id=11131 |
|
5072 |
|
5073 * kjs/operations.cpp: |
|
5074 (KJS::add): Throw exception if string addition result is null |
|
5075 * kjs/ustring.cpp: |
|
5076 (KJS::UString::UString): Don't call memcpy when malloc failed |
|
5077 |
|
5078 2007-01-25 Jan Kraemer <camel@gmx.de> |
|
5079 |
|
5080 Reviewed by Maciej |
|
5081 |
|
5082 Fix for http://bugs.webkit.org/show_bug.cgi?id=12382 |
|
5083 |
|
5084 Fix crash on architectures with 32 bit ints and |
|
5085 64 bit longs (For example Linux on AMD64) |
|
5086 |
|
5087 * kjs/dtoa.cpp: #define Long int as suggested in comment |
|
5088 |
|
5089 2007-01-24 Geoffrey Garen <ggaren@apple.com> |
|
5090 |
|
5091 Fixed up #include order for style. No review necessary. |
|
5092 |
|
5093 * API/JSStringRef.cpp: |
|
5094 |
|
5095 2007-01-24 Geoffrey Garen <ggaren@apple.com> |
|
5096 |
|
5097 Reviewed by Maciej Stachowiak. |
|
5098 |
|
5099 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
5100 Copy JSStringRefCF, in case anybody wants to use it. (I just added |
|
5101 it recently.) |
|
5102 |
|
5103 2007-01-24 Maciej Stachowiak <mjs@apple.com> |
|
5104 |
|
5105 Not reviewed, trivial property change. |
|
5106 |
|
5107 * JavaScriptCore.vcproj/JavaScriptCore.sln: remove svn:mime-type |
|
5108 property which made this binary. |
|
5109 |
|
5110 2007-01-25 Mark Rowe <mrowe@apple.com> |
|
5111 |
|
5112 Reviewed by Darin. |
|
5113 |
|
5114 * Info.plist: Update copyright string. |
|
5115 |
|
5116 2007-01-24 Darin Adler <darin@apple.com> |
|
5117 |
|
5118 Reviewed by Mark Rowe. |
|
5119 |
|
5120 * JavaScriptCore.xcodeproj/project.pbxproj: Changed to /usr/sbin/sysctl |
|
5121 so we don't rely on people's paths. |
|
5122 |
|
5123 2007-01-23 Alice Liu <alice.liu@apple.com> |
|
5124 |
|
5125 release build fix |
|
5126 |
|
5127 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
5128 Copy APICasts.h |
|
5129 |
|
5130 2007-01-23 Geoffrey Garen <ggaren@apple.com> |
|
5131 |
|
5132 build fix |
|
5133 |
|
5134 * API/JSStringRef.h: |
|
5135 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
5136 |
|
5137 2007-01-24 Mark Rowe <mrowe@apple.com> |
|
5138 |
|
5139 Build fix for DumpRenderTree. |
|
5140 |
|
5141 * JavaScriptCore.xcodeproj/project.pbxproj: Make JSStringRefCF.h public so it's copied into built framework. |
|
5142 |
|
5143 2007-01-23 Anders Carlsson <acarlsson@apple.com> |
|
5144 |
|
5145 Reviewed by Darin. |
|
5146 |
|
5147 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
5148 Copy APICasts.h |
|
5149 |
|
5150 2007-01-23 Geoffrey Garen <ggaren@apple.com> |
|
5151 |
|
5152 Reviewed by Maciej Stachowiak. |
|
5153 |
|
5154 Fixed <rdar://problem/4885131> Move CFString function declarations from |
|
5155 JSStringRef.h to JSStringRefCF.h |
|
5156 |
|
5157 Also removed remaining API FIXMEs and changed them into Radars. |
|
5158 |
|
5159 * API/JSClassRef.cpp: |
|
5160 (OpaqueJSClass::OpaqueJSClass): Added Radar numbers for UTF8 conversion. |
|
5161 |
|
5162 * API/JSContextRef.cpp: |
|
5163 (JSGlobalContextCreate): Replaced FIXME for NULL JSContextRef with Radar number. |
|
5164 |
|
5165 * API/JSObjectRef.h: Removed FIXME, which is unprofessional in a public header. |
|
5166 |
|
5167 * API/JSStringRef.cpp: Moved CF related implementations to JSStringRefCF.cpp. |
|
5168 (JSStringCreateWithUTF8CString): Replaced FIXME with Radar number. |
|
5169 * API/JSStringRef.h: Moved CF related declarations to JSStringRefCF.h. Added |
|
5170 #include of JSStringRefCF.h as a stopgap until clients start #including |
|
5171 it as needed by themselves. |
|
5172 |
|
5173 * API/JSStringRefCF.cpp: Added. |
|
5174 (JSStringCreateWithCFString): |
|
5175 (JSStringCopyCFString): Replaced JSChar cast with UniChar cast, which is |
|
5176 more appropriate for a CF call. |
|
5177 * API/JSStringRefCF.h: Added. |
|
5178 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
5179 |
|
5180 2007-01-18 Sanjay Madhav <sanjay12@gmail.com> |
|
5181 |
|
5182 Reviewed by Darin. |
|
5183 |
|
5184 Add JavaScriptCore define to help with tracing of when objects are marked. |
|
5185 |
|
5186 * kjs/object.cpp: |
|
5187 (KJS::JSObject::mark): |
|
5188 |
|
5189 2007-01-18 Simon Hausmann <hausmann@kde.org> |
|
5190 |
|
5191 Reviewed by Zack. |
|
5192 |
|
5193 * JavaScriptCore.pro: Remove generated files on make clean. |
|
5194 * pcre/pcre.pri: |
|
5195 |
|
5196 2007-01-16 Alexey Proskuryakov <ap@webkit.org> |
|
5197 |
|
5198 Reviewed by Maciej. |
|
5199 |
|
5200 http://bugs.webkit.org/show_bug.cgi?id=12268 |
|
5201 Give object prototypes their own names |
|
5202 |
|
5203 * kjs/lookup.h: Append "Prototype" to ClassName in KJS_IMPLEMENT_PROTOTYPE. |
|
5204 |
|
5205 2007-01-16 Geoffrey Garen <ggaren@apple.com> |
|
5206 |
|
5207 Reviewed by Darin Adler. |
|
5208 |
|
5209 Added re-entrency checking to GC allocation and collection. It is an error |
|
5210 to allocate or collect from within a collection. We've had at least one |
|
5211 case of each bug in the past. |
|
5212 |
|
5213 Added a comment to the API header, explaining that API clients must not |
|
5214 make this mistake, either. |
|
5215 |
|
5216 Layout tests and JS tests pass. |
|
5217 |
|
5218 * API/JSObjectRef.h: |
|
5219 * kjs/collector.cpp: |
|
5220 (KJS::GCLock::GCLock): |
|
5221 (KJS::GCLock::~GCLock): |
|
5222 (KJS::Collector::allocate): |
|
5223 (KJS::Collector::collect): |
|
5224 |
|
5225 2007-01-14 Mark Rowe <mrowe@apple.com> |
|
5226 |
|
5227 Reviewed by Mitz. |
|
5228 |
|
5229 Minor fixes to JavaScript pretty-printing. |
|
5230 |
|
5231 * JavaScriptCore.exp: |
|
5232 * kjs/Parser.cpp: |
|
5233 (KJS::Parser::prettyPrint): Return line number and error message if parsing fails. |
|
5234 * kjs/Parser.h: |
|
5235 * kjs/nodes2string.cpp: |
|
5236 (ElementNode::streamTo): Include comma delimiters in array literals. |
|
5237 (PropertyNameNode::streamTo): Quote property names in object literals to handle the case when the property name is not a valid identifier. |
|
5238 * kjs/testkjs.cpp: |
|
5239 (doIt): Print any errors encountered while pretty-printing. |
|
5240 |
|
5241 2007-01-12 Anders Carlsson <acarlsson@apple.com> |
|
5242 |
|
5243 Reviewed by Darin. |
|
5244 |
|
5245 * wtf/HashTraits.h: |
|
5246 Add hash traits for unsigned long and unsigned long long. |
|
5247 |
|
5248 2007-01-12 Geoffrey Garen <ggaren@apple.com> |
|
5249 |
|
5250 RS by Brady Eidson. |
|
5251 |
|
5252 Rolling back in r18786 with leaks fixed, and these renames slightly reworked: |
|
5253 |
|
5254 Because they can return 0: |
|
5255 rootObjectForImp => findRootObject (overloaded for JSObject* and Interpreter*) |
|
5256 rootObjectForInterpreter => findRootObject (ditto) |
|
5257 findReferenceSet => findProtectCountSet |
|
5258 |
|
5259 2007-01-11 Geoffrey Garen <ggaren@apple.com> |
|
5260 |
|
5261 RS by Brady Eidson. |
|
5262 |
|
5263 Rolling out r18786 because it caused leaks. |
|
5264 |
|
5265 2007-01-11 Geoffrey Garen <ggaren@apple.com> |
|
5266 |
|
5267 Reviewed by Anders Carlsson. |
|
5268 |
|
5269 Even more cleanup in preparation for fixing <rdar://problem/4608404> |
|
5270 WebScriptObject's _executionContext lack of ownership policy causes |
|
5271 crashes (e.g., in Dashcode) |
|
5272 |
|
5273 Layout tests pass. |
|
5274 |
|
5275 Renames: |
|
5276 ReferencesSet | ProtectCounts => ProtectCountSet (because it's a typename for a set of GC protect counts) |
|
5277 ReferencesByRootMap => RootObjectMap (because RootObjectToProtectCountSetMap would have been confusing) |
|
5278 pv => protectedValues |
|
5279 rootObjectForImp => getRootObject (overloaded for JSObject* and Interpreter*) |
|
5280 rootObjectForInterpreter => getRootObject (ditto) |
|
5281 findReferenceSet => getProtectCountSet |
|
5282 imp => jsObject |
|
5283 |
|
5284 (KJS::Bindings::getRootObjectMap): Changed to take advantage of built-in |
|
5285 facility for initializing static variables. |
|
5286 |
|
5287 (KJS::Bindings::getProtectCountSet): |
|
5288 (KJS::Bindings::destroyProtectCountSet): Added. Helps encapsulate the fact |
|
5289 that getting a ProtectCountSet entails adding a RootObject to a hash table, |
|
5290 and destroying one entails the reverse. |
|
5291 |
|
5292 (KJS::Bindings::getRootObject): Removed spurious NULL check. |
|
5293 |
|
5294 (KJS::Bindings::findReferenceSet): Renamed. Changed to use getRootObject() |
|
5295 instead of iterating on its own. |
|
5296 |
|
5297 (KJS::Bindings::addNativeReference): Changed to use an early return instead |
|
5298 of indenting the whole function. |
|
5299 (KJS::Bindings::removeNativeReference): Ditto. |
|
5300 |
|
5301 2007-01-11 Geoffrey Garen <ggaren@apple.com> |
|
5302 |
|
5303 Reviewed by Anders Carlsson. |
|
5304 |
|
5305 Even more cleanup in preparation for fixing <rdar://problem/4608404> |
|
5306 WebScriptObject's _executionContext lack of ownership policy causes |
|
5307 crashes (e.g., in Dashcode) |
|
5308 |
|
5309 Layout tests pass. |
|
5310 |
|
5311 Renames: |
|
5312 findRootObjectForNativeHandleFunction => createRootObject |
|
5313 FindRootObjectForNativeHandleFunctionPtr => CreateRootObjectFunction |
|
5314 |
|
5315 Also removed unnecessary use of "Bindings::" prefix. |
|
5316 |
|
5317 * JavaScriptCore.exp: |
|
5318 * bindings/jni/jni_jsobject.cpp: |
|
5319 (JavaJSObject::createNative): |
|
5320 (JavaJSObject::convertValueToJObject): |
|
5321 (JavaJSObject::convertJObjectToValue): |
|
5322 * bindings/runtime_root.cpp: |
|
5323 (KJS::Bindings::RootObject::setCreateRootObject): |
|
5324 * bindings/runtime_root.h: |
|
5325 (KJS::Bindings::RootObject::createRootObject): |
|
5326 |
|
5327 2007-01-11 George Staikos <staikos@kde.org> |
|
5328 |
|
5329 Reviewed by Maciej |
|
5330 |
|
5331 Appears to be Mac specific right now. |
|
5332 |
|
5333 * kjs/config.h: |
|
5334 |
|
5335 2007-01-10 Lars Knoll <lars@trolltech.com> |
|
5336 |
|
5337 Reviewed by Zack |
|
5338 |
|
5339 Use the new functionality in Qt 4.3, to make |
|
5340 the methods closer compliant with the Unicode |
|
5341 spec. |
|
5342 |
|
5343 Keep the old code so that it still compiles against |
|
5344 Qt 4.2. |
|
5345 |
|
5346 * wtf/unicode/qt4/UnicodeQt4.h: |
|
5347 (WTF::Unicode::toLower): |
|
5348 (WTF::Unicode::toUpper): |
|
5349 (WTF::Unicode::toTitleCase): |
|
5350 (WTF::Unicode::foldCase): |
|
5351 (WTF::Unicode::isFormatChar): |
|
5352 (WTF::Unicode::isPrintableChar): |
|
5353 (WTF::Unicode::isSeparatorSpace): |
|
5354 (WTF::Unicode::isPunct): |
|
5355 (WTF::Unicode::isDigit): |
|
5356 (WTF::Unicode::isLower): |
|
5357 (WTF::Unicode::isUpper): |
|
5358 (WTF::Unicode::digitValue): |
|
5359 (WTF::Unicode::mirroredChar): |
|
5360 (WTF::Unicode::combiningClass): |
|
5361 (WTF::Unicode::decompositionType): |
|
5362 (WTF::Unicode::umemcasecmp): |
|
5363 (WTF::Unicode::direction): |
|
5364 (WTF::Unicode::category): |
|
5365 |
|
5366 2007-01-09 Darin Adler <darin@apple.com> |
|
5367 |
|
5368 - update 2007 Apple copyright for the new company name |
|
5369 |
|
5370 * kjs/DateMath.cpp: |
|
5371 |
|
5372 2007-01-09 Darin Adler <darin@apple.com> |
|
5373 |
|
5374 - fix build |
|
5375 |
|
5376 * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction): |
|
5377 Actually compile it this time. |
|
5378 |
|
5379 2007-01-09 Darin Adler <darin@apple.com> |
|
5380 |
|
5381 - fix build |
|
5382 |
|
5383 * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction): |
|
5384 Change types. |
|
5385 |
|
5386 2007-01-09 Darin Adler <darin@apple.com> |
|
5387 |
|
5388 - fix build on platforms where Unicode::UChar is != uint16_t |
|
5389 |
|
5390 * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction): |
|
5391 Change types. |
|
5392 |
|
5393 2007-01-09 Mitz Pettel <mitz@webkit.org> |
|
5394 |
|
5395 Reviewed by Darin. |
|
5396 |
|
5397 - changes for http://bugs.webkit.org/show_bug.cgi?id=11078 |
|
5398 Forms Don't Submit (ASP Pages) |
|
5399 |
|
5400 * JavaScriptCore.exp: |
|
5401 * kjs/value.cpp: |
|
5402 (KJS::JSValue::toInt32): Folded toInt32Inline into this method, which was its |
|
5403 only caller. |
|
5404 (KJS::JSValue::toUInt32): Added a variant that reports if the conversion has |
|
5405 succeeded. |
|
5406 * kjs/value.h: |
|
5407 |
|
5408 2007-01-09 Darin Adler <darin@apple.com> |
|
5409 |
|
5410 Reviewed by Maciej. |
|
5411 |
|
5412 - fix http://bugs.webkit.org/show_bug.cgi?id=12174 |
|
5413 improve Unicode use (less WTF::Unicode:: prefix, centralized character names) |
|
5414 |
|
5415 * wtf/unicode/icu/UnicodeIcu.h: Change parameter and return types |
|
5416 to UChar32 and UChar. Removed unneeded type casts and added some |
|
5417 const to functions that lacked it. Removed WTF::Unicode::memcmp. |
|
5418 (WTF::Unicode::umemcasecmp): Renamed from strcasecmp since this |
|
5419 doesn't work on 0-terminated strings as the str functions do. |
|
5420 * wtf/unicode/qt4/UnicodeQt4.h: Ditto. |
|
5421 |
|
5422 - got rid of namespace prefixes from most uses of WTF::Unicode |
|
5423 |
|
5424 * kjs/function.cpp: |
|
5425 (KJS::isStrWhiteSpace): |
|
5426 (KJS::escapeStringForPrettyPrinting): |
|
5427 * kjs/lexer.cpp: |
|
5428 (KJS::Lexer::isWhiteSpace): |
|
5429 (KJS::Lexer::isIdentStart): |
|
5430 (KJS::Lexer::isIdentPart): |
|
5431 * kjs/string_object.cpp: |
|
5432 (KJS::StringProtoFunc::callAsFunction): |
|
5433 |
|
5434 2007-01-07 David Kilzer <ddkilzer@webkit.org> |
|
5435 |
|
5436 Reviewed by Darin. |
|
5437 |
|
5438 - fix http://bugs.webkit.org/show_bug.cgi?id=11917 |
|
5439 setlocale() can return null |
|
5440 |
|
5441 * kjs/date_object.cpp: |
|
5442 (KJS::DateProtoFunc::callAsFunction): Removed dead code. |
|
5443 |
|
5444 2007-01-07 David Carson <dacarson@gmail.com> |
|
5445 |
|
5446 Reviewed by Darin. |
|
5447 |
|
5448 - fix http://bugs.webkit.org/show_bug.cgi?id=12100 |
|
5449 JNI bindings should be available to non-Mac platforms that have JNI |
|
5450 |
|
5451 Change JNI so that it is not wrapped in the PLATFORM(MAC) ifdef, enabling |
|
5452 other platforms who have JNI to use it. |
|
5453 |
|
5454 * bindings/jni/jni_instance.h: |
|
5455 Removed unnecessary include of <CoreFoundation/CoreFoundation.h> |
|
5456 * bindings/jni/jni_utility.cpp: |
|
5457 (KJS::Bindings::setJavaVM): |
|
5458 * bindings/jni/jni_utility.h: |
|
5459 Added new method for clients to set the JavaVM |
|
5460 * bindings/runtime.cpp: |
|
5461 (KJS::Bindings::Instance::createBindingForLanguageInstance): |
|
5462 Changed code to utilize new #if HAVE(JNI) |
|
5463 * kjs/config.h: |
|
5464 Added new #define for JNI, ie HAVE_JNI |
|
5465 |
|
5466 2007-01-07 David Carson <dacarson@gmail.com> |
|
5467 |
|
5468 Reviewed by Darin. |
|
5469 |
|
5470 Fix http://bugs.webkit.org/show_bug.cgi?id=11431 |
|
5471 ARM platform has some byte alignment issues |
|
5472 |
|
5473 Fix for NaN being 4 bytes and it must start on a byte boundary |
|
5474 for ARM architectures. |
|
5475 |
|
5476 * kjs/fpconst.cpp: |
|
5477 (KJS::): |
|
5478 |
|
5479 2007-01-04 David Kilzer <ddkilzer@webkit.org> |
|
5480 |
|
5481 Reviewed by Kevin McCullough. |
|
5482 |
|
5483 - fix http://bugs.webkit.org/show_bug.cgi?id=12070 |
|
5484 REGRESSION: KJS::getUTCOffset() caches UTC offset but ignores time zone changes |
|
5485 |
|
5486 * kjs/DateMath.cpp: |
|
5487 (KJS::getUTCOffset): Don't cache UTC offset. |
|
5488 |
|
5489 2007-01-02 Darin Adler <darin@apple.com> |
|
5490 |
|
5491 - minor tweak (hope this doesn't re-break Windows) |
|
5492 |
|
5493 * pcre/pcre_compile.c: Removed use of const pcre_uchar const * -- Mitz probably |
|
5494 meant const pcre_uchar *const, but I think we can do without the explicit const here. |
|
5495 |
|
5496 * pcre/pcre_internal.h: Re-enabled warning C4114. |
|
5497 |
|
5498 2007-01-02 David Kilzer <ddkilzer@webkit.org> |
|
5499 |
|
5500 Reviewed by NOBODY (Windows build fix). |
|
5501 |
|
5502 The MSVC compiler requires variables to be declared at the top of the enclosing block in C source. |
|
5503 |
|
5504 Disable this warning to prevent MSVC from complaining about the 'const pcre_uchar const *' type: |
|
5505 warning C4114: same type qualifier used more than once |
|
5506 |
|
5507 * pcre/pcre_compile.c: |
|
5508 (pcre_compile2): Moved variable declarations to top of their respective enclosing blocks. |
|
5509 * pcre/pcre_internal.h: Added pragma to disable compiler warning. |
|
5510 |
|
5511 2007-01-01 Mitz Pettel <mitz@webkit.org> |
|
5512 |
|
5513 Reviewed by Darin. |
|
5514 |
|
5515 - fix http://bugs.webkit.org/show_bug.cgi?id=11849 |
|
5516 REGRESSION (r18182): Google Calendar is broken (a regular expression containing a null character is not parsed correctly) |
|
5517 |
|
5518 Modified pcre_compile() (and the functions that it calls) to work with patterns |
|
5519 containing null characters. |
|
5520 |
|
5521 Covered by JavaScriptCore tests ecma_3/RegExp/octal-002.js and ecma_3/RegExp/regress-85721.js |
|
5522 |
|
5523 * kjs/regexp.cpp: |
|
5524 (KJS::RegExp::RegExp): Changed to not null-terminate the pattern string and instead |
|
5525 pass its length to pcre_compile. |
|
5526 * pcre/pcre.h: |
|
5527 * pcre/pcre_compile.c: |
|
5528 (check_escape): |
|
5529 (get_ucp): |
|
5530 (is_counted_repeat): |
|
5531 (check_posix_syntax): |
|
5532 (compile_branch): |
|
5533 (compile_regex): |
|
5534 (pcre_compile): Added a parameter specifying the length of the pattern, which |
|
5535 is no longer required to be null-terminated and may contain null characters. |
|
5536 (pcre_compile2): |
|
5537 * pcre/pcre_internal.h: |
|
5538 * tests/mozilla/expected.html: Updated for the two tests that this patch |
|
5539 fixes. Also updated failing results for ecma_3/RegExp/regress-100199.js |
|
5540 which were not updated after bug 6257 was fixed. |
|
5541 |
|
5542 2007-01-01 David Kilzer <ddkilzer@webkit.org> |
|
5543 |
|
5544 Reviewed by Darin. |
|
5545 |
|
5546 - fix http://bugs.webkit.org/show_bug.cgi?id=12057 |
|
5547 REGRESSION: JavaScript Date Is One Day In The Future in GMT time zone |
|
5548 |
|
5549 Because Mac OS X returns geographically and historically accurate time zone information, |
|
5550 converting Jan 02, 1970 12:00:00 AM to local time then subtracting 24 hours did not work |
|
5551 in GMT (London - England) since it was in BST (+0100) all year in 1970[1]. Instead, the |
|
5552 UTC offset is calculated by converting Jan 01, 2000 12:00:00 AM to local time then |
|
5553 subtracting that from the same date in UTC. |
|
5554 |
|
5555 [1] http://en.wikipedia.org/wiki/British_Summer_Time |
|
5556 |
|
5557 * kjs/DateMath.cpp: |
|
5558 (KJS::getUTCOffset): Updated UTC offset calculation. |
|
5559 (KJS::getDSTOffset): Improved comment. |
|
5560 |
|
5561 2006-12-31 David Kilzer <ddkilzer@webkit.org> |
|
5562 |
|
5563 Reviewed by Geoff. |
|
5564 |
|
5565 Update embedded pcre library from version 6.2 to 6.4. Changes from pcre 6.2 to 6.3 |
|
5566 did not include any files in JavaScriptCore/pcre. |
|
5567 |
|
5568 All changes include renaming EXPORT to PCRE_EXPORT, renaming of ucp_findchar() to |
|
5569 _pcre_ucp_findchar(), or comment changes. Additional changes noted below. |
|
5570 |
|
5571 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Updated source file list. |
|
5572 * JavaScriptCore.xcodeproj/project.pbxproj: Renamed pcre_printint.c to pcre_printint.src |
|
5573 and changed it from a source file to a header file. |
|
5574 * JavaScriptCoreSources.bkl: Updated source file list. |
|
5575 * pcre/CMakeLists.txt: Updated source file list. |
|
5576 * pcre/pcre-config.h: |
|
5577 * pcre/pcre.h: Updated version. |
|
5578 * pcre/pcre.pri: Updated source file list. |
|
5579 * pcre/pcre_compile.c: Include pcre_printint.src #if DEBUG. |
|
5580 (pcre_compile2): |
|
5581 * pcre/pcre_config.c: |
|
5582 * pcre/pcre_exec.c: |
|
5583 (match): |
|
5584 * pcre/pcre_fullinfo.c: |
|
5585 * pcre/pcre_info.c: |
|
5586 * pcre/pcre_internal.h: Added header guard. Removed export of _pcre_printint(). |
|
5587 * pcre/pcre_ord2utf8.c: |
|
5588 * pcre/pcre_printint.c: Renamed to pcre_printint.src. |
|
5589 * pcre/pcre_printint.src: Added. Renamed _pcre_printint() to pcre_printint(). |
|
5590 * pcre/pcre_refcount.c: |
|
5591 * pcre/pcre_study.c: |
|
5592 * pcre/pcre_tables.c: |
|
5593 * pcre/pcre_try_flipped.c: |
|
5594 * pcre/pcre_ucp_findchar.c: Added contents of ucp_findchar.c. |
|
5595 * pcre/pcre_version.c: |
|
5596 * pcre/pcre_xclass.c: |
|
5597 (_pcre_xclass): |
|
5598 * pcre/ucp.h: Removed export of ucp_findchar(). |
|
5599 * pcre/ucp_findchar.c: Removed. Contents moved to pcre_ucp_findchar.c. |
|
5600 |
|
5601 2006-12-29 David Kilzer <ddkilzer@webkit.org> |
|
5602 |
|
5603 Reviewed by Geoff. |
|
5604 |
|
5605 Update embedded pcre library from version 6.1 to 6.2. From the pcre ChangeLog: |
|
5606 |
|
5607 3. Added "b" to the 2nd argument of fopen() in dftables.c, for non-Unix-like |
|
5608 operating environments where this matters. |
|
5609 |
|
5610 5. Named capturing subpatterns were not being correctly counted when a pattern |
|
5611 was compiled. This caused two problems: (a) If there were more than 100 |
|
5612 such subpatterns, the calculation of the memory needed for the whole |
|
5613 compiled pattern went wrong, leading to an overflow error. (b) Numerical |
|
5614 back references of the form \12, where the number was greater than 9, were |
|
5615 not recognized as back references, even though there were sufficient |
|
5616 previous subpatterns. |
|
5617 |
|
5618 * pcre/dftables.c: Item 3. |
|
5619 (main): |
|
5620 * pcre/pcre.h: Updated version. |
|
5621 * pcre/pcre_compile.c: Item 5. |
|
5622 (read_repeat_counts): |
|
5623 (pcre_compile2): |
|
5624 |
|
5625 2006-12-29 Geoffrey Garen <ggaren@apple.com> |
|
5626 |
|
5627 Reviewed by Brian Dash... err... Mark Rowe. |
|
5628 |
|
5629 More cleanup in preparation for fixing <rdar://problem/4608404> |
|
5630 WebScriptObject's _executionContext lack of ownership policy causes |
|
5631 crashes (e.g., in Dashcode) |
|
5632 |
|
5633 The key change here is to RootObject::RootObject(). |
|
5634 |
|
5635 * JavaScriptCore.exp: |
|
5636 |
|
5637 * bindings/c/c_utility.cpp: |
|
5638 (KJS::Bindings::convertValueToNPVariant): Changed to use new constructor. |
|
5639 |
|
5640 * bindings/jni/jni_jsobject.cpp: |
|
5641 (JavaJSObject::createNative): Changed to use new constructor. Replaced |
|
5642 large 'if' followed by default condition with "if !" and explicit default |
|
5643 condition. |
|
5644 |
|
5645 * bindings/objc/objc_runtime.mm: |
|
5646 (convertValueToObjcObject): Changed to use new constructor. |
|
5647 |
|
5648 * bindings/runtime_root.cpp: |
|
5649 (KJS::Bindings::RootObject::destroy): "removeAllNativeReferences" => "destroy" |
|
5650 because this function actually destroys the RootObject. |
|
5651 |
|
5652 * bindings/runtime_root.h: Changed Interpreter* to RefPtr<Interpreter> |
|
5653 to prevent a RootObject from holding a stale Interperter*. |
|
5654 |
|
5655 (KJS::Bindings::RootObject::RootObject): Changed constructor to take an |
|
5656 Interpreter*, since it's pointless to create a RootObject without one. |
|
5657 Removed setRootObjectImp() and rootObjectImp() because they were just |
|
5658 a confusing way of setting and getting the Interpreter's global object. |
|
5659 |
|
5660 (KJS::Bindings::RootObject::nativeHandle): "_nativeHandle" => "m_nativeHandle" |
|
5661 (KJS::Bindings::RootObject::interpreter): "_interpreter" => "m_interpreter" |
|
5662 |
|
5663 2006-12-28 George Staikos <staikos@kde.org> |
|
5664 |
|
5665 Reviewed by Olliej. |
|
5666 |
|
5667 * bindings/qt/qt_instance.cpp: build |
|
5668 (KJS::Bindings::QtInstance::QtInstance): |
|
5669 |
|
5670 2006-12-28 Geoffrey Garen <ggaren@apple.com> |
|
5671 |
|
5672 Reviewed by Oliver Hunt. |
|
5673 |
|
5674 More cleanup. Layout tests pass. |
|
5675 |
|
5676 Use a helper function to initialize and access WebUndefined and WebScriptObject. |
|
5677 |
|
5678 * bindings/objc/objc_runtime.h: |
|
5679 * bindings/objc/objc_runtime.mm: |
|
5680 (KJS::Bindings::webScriptObjectClass): |
|
5681 (KJS::Bindings::webUndefinedClass): |
|
5682 (convertValueToObjcObject): |
|
5683 * bindings/objc/objc_utility.mm: |
|
5684 (KJS::Bindings::convertValueToObjcValue): |
|
5685 (KJS::Bindings::convertObjcValueToValue): |
|
5686 |
|
5687 2006-12-28 Geoffrey Garen <ggaren@apple.com> |
|
5688 |
|
5689 Reviewed by Brady Eidson. |
|
5690 |
|
5691 Some cleanup in preparation for fixing <rdar://problem/4608404> |
|
5692 WebScriptObject's _executionContext lack of ownership policy causes |
|
5693 crashes (e.g., in Dashcode) |
|
5694 |
|
5695 I'm just trying to make heads or tails of this baffling code. |
|
5696 |
|
5697 Renamed "root" | "execContext" | "executionContext" => "rootObject", because |
|
5698 that's the object's (admittedly vague) type name. |
|
5699 |
|
5700 * bindings/runtime.cpp: Removed createLanguageInstanceForValue |
|
5701 because I'll give you a dollar if you can explain to me what it actually did. |
|
5702 |
|
5703 * bindings/runtime_root.cpp: Put everything in the KJS::Bindings namespace, |
|
5704 removing the KJS::Bindings prefix from individual functions and datatypes. |
|
5705 This matches the header and eliminates a lot of syntax cruft. |
|
5706 |
|
5707 * bindings/c/c_utility.cpp: |
|
5708 (KJS::Bindings::convertValueToNPVariant): Replaced use of createLanguageInstanceForValue |
|
5709 with call to _NPN_CreateScriptObject because that's what createLanguageInstanceForValue |
|
5710 actually did (but don't ask me for that dollar now; that's cheating.) |
|
5711 |
|
5712 * bindings/objc/objc_utility.h: |
|
5713 * bindings/objc/objc_utility.mm: |
|
5714 (KJS::Bindings::convertValueToObjcValue): Removed. Its only purpose was |
|
5715 to call a single function for WebKit, which WebKit can do on its own. |
|
5716 |
|
5717 * kjs/interpreter.h: Removed rtti() because it was unused, and this class |
|
5718 is scheduled for demolition anyway. |
|
5719 |
|
5720 * kjs/interpreter.cpp: Removed createLanguageInstanceForValue because it had |
|
5721 nothing to do with the Interpreter, and nothing makes Chuck Norris more mad |
|
5722 than a function whose sole purpose is to call another function of the same |
|
5723 name. (Really, I asked him.) |
|
5724 |
|
5725 2006-12-26 Geoffrey Garen <ggaren@apple.com> |
|
5726 |
|
5727 Reviewed by Eric Seidel. |
|
5728 |
|
5729 Some cleanup in preparation for fixing <rdar://problem/4740328> Safari |
|
5730 crash on quit in _NPN_ReleaseObject from KJS::Bindings::CInstance::~CInstance |
|
5731 |
|
5732 * bindings/c/c_instance.cpp: |
|
5733 * bindings/c/c_instance.h: Removed unused copy constructor and assignment |
|
5734 operator. They made tracking data flow more difficult. Unused code is also |
|
5735 dangerous because it can succumb to bit rot with the stealth of a Ninja. |
|
5736 |
|
5737 Replaced #include with forward declaration to reduce header dependency. |
|
5738 |
|
5739 * bindings/npruntime.cpp: Sorted #includes. |
|
5740 (_NPN_GetStringIdentifier): Replaced assert with ASSERT. |
|
5741 (_NPN_GetStringIdentifiers): ditto |
|
5742 (_NPN_ReleaseVariantValue): ditto |
|
5743 (_NPN_CreateObject): ditto |
|
5744 (_NPN_RetainObject): ditto |
|
5745 (_NPN_ReleaseObject): ditto |
|
5746 (_NPN_DeallocateObject): ditto |
|
5747 |
|
5748 2006-12-20 Anders Carlsson <acarlsson@apple.com> |
|
5749 |
|
5750 * kjs/string_object.cpp: |
|
5751 (localeCompare): |
|
5752 Another speculative Win32 fix. |
|
5753 |
|
5754 2006-12-20 Anders Carlsson <acarlsson@apple.com> |
|
5755 |
|
5756 * kjs/string_object.cpp: |
|
5757 (localeCompare): |
|
5758 Speculative Win32 fix. |
|
5759 |
|
5760 2006-12-20 Anders Carlsson <acarlsson@apple.com> |
|
5761 |
|
5762 Reviewed by Darin. |
|
5763 |
|
5764 <rdar://problem/4235733> |
|
5765 <http://bugs.webkit.org/?show_bug.cgi?id=10193> |
|
5766 support String.localeCompare. |
|
5767 |
|
5768 Implement localeCompare. |
|
5769 |
|
5770 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
5771 * kjs/string_object.cpp: |
|
5772 (localeCompare): |
|
5773 (StringProtoFunc::callAsFunction): |
|
5774 * kjs/string_object.h: |
|
5775 (KJS::StringProtoFunc::): |
|
5776 |
|
5777 2006-12-20 Timothy Hatcher <timothy@apple.com> |
|
5778 |
|
5779 Reviewed by Mark Rowe. |
|
5780 |
|
5781 * JavaScriptCore.xcodeproj/project.pbxproj: use GCC 4.0 for all the other test targets |
|
5782 |
|
5783 2006-12-20 Timothy Hatcher <timothy@apple.com> |
|
5784 |
|
5785 Reviewed by Mark Rowe. |
|
5786 |
|
5787 <rdar://problem/4871613> JavaScriptCore-421.31's dftables target needs to override default compiler and use gcc-4.0 |
|
5788 |
|
5789 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
5790 |
|
5791 2006-12-20 Lars Knoll <lars@trolltech.com> |
|
5792 |
|
5793 Reviewed by David Hyatt |
|
5794 |
|
5795 Added support to bind QObject's to |
|
5796 JavaScript. |
|
5797 |
|
5798 * JavaScriptCore.pro: |
|
5799 * bindings/qt/qt_class.cpp: Added. |
|
5800 (KJS::Bindings::QtClass::QtClass): |
|
5801 (KJS::Bindings::QtClass::~QtClass): |
|
5802 (KJS::Bindings::QtClass::classForObject): |
|
5803 (KJS::Bindings::QtClass::name): |
|
5804 (KJS::Bindings::QtClass::methodsNamed): |
|
5805 (KJS::Bindings::QtClass::fieldNamed): |
|
5806 * bindings/qt/qt_class.h: Added. |
|
5807 (KJS::Bindings::QtClass::constructorAt): |
|
5808 (KJS::Bindings::QtClass::numConstructors): |
|
5809 * bindings/qt/qt_instance.cpp: Added. |
|
5810 (KJS::Bindings::QtInstance::QtInstance): |
|
5811 (KJS::Bindings::QtInstance::~QtInstance): |
|
5812 (KJS::Bindings::QtInstance::operator=): |
|
5813 (KJS::Bindings::QtInstance::getClass): |
|
5814 (KJS::Bindings::QtInstance::begin): |
|
5815 (KJS::Bindings::QtInstance::end): |
|
5816 (KJS::Bindings::QtInstance::implementsCall): |
|
5817 (KJS::Bindings::QtInstance::invokeMethod): |
|
5818 (KJS::Bindings::QtInstance::invokeDefaultMethod): |
|
5819 (KJS::Bindings::QtInstance::defaultValue): |
|
5820 (KJS::Bindings::QtInstance::stringValue): |
|
5821 (KJS::Bindings::QtInstance::numberValue): |
|
5822 (KJS::Bindings::QtInstance::booleanValue): |
|
5823 (KJS::Bindings::QtInstance::valueOf): |
|
5824 * bindings/qt/qt_instance.h: Added. |
|
5825 (KJS::Bindings::QtInstance::getObject): |
|
5826 * bindings/qt/qt_runtime.cpp: Added. |
|
5827 (KJS::Bindings::convertValueToQVariant): |
|
5828 (KJS::Bindings::convertQVariantToValue): |
|
5829 (KJS::Bindings::QtField::name): |
|
5830 (KJS::Bindings::QtField::valueFromInstance): |
|
5831 (KJS::Bindings::QtField::setValueToInstance): |
|
5832 * bindings/qt/qt_runtime.h: Added. |
|
5833 (KJS::Bindings::QtField::QtField): |
|
5834 (KJS::Bindings::QtField::type): |
|
5835 (KJS::Bindings::QtMethod::QtMethod): |
|
5836 (KJS::Bindings::QtMethod::name): |
|
5837 (KJS::Bindings::QtMethod::numParameters): |
|
5838 * bindings/runtime.cpp: |
|
5839 (KJS::Bindings::Instance::createBindingForLanguageInstance): |
|
5840 * bindings/runtime.h: |
|
5841 (KJS::Bindings::Instance::): |
|
5842 * bindings/testbindings.pro: Added. |
|
5843 * bindings/testqtbindings.cpp: Added. |
|
5844 (MyObject::MyObject): |
|
5845 (MyObject::setTestString): |
|
5846 (MyObject::setTestInt): |
|
5847 (MyObject::testString): |
|
5848 (MyObject::testInt): |
|
5849 (MyObject::foo): |
|
5850 (Global::className): |
|
5851 (main): |
|
5852 |
|
5853 2006-12-19 Anders Carlsson <acarlsson@apple.com> |
|
5854 |
|
5855 Reviewed by Geoff. |
|
5856 |
|
5857 Add -p option to testkjs which pretty prints the files instead of executing them. |
|
5858 |
|
5859 * JavaScriptCore.exp: |
|
5860 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
5861 * kjs/Parser.cpp: |
|
5862 (KJS::Parser::prettyPrint): |
|
5863 * kjs/Parser.h: |
|
5864 * kjs/testkjs.cpp: |
|
5865 (doIt): |
|
5866 |
|
5867 2006-12-19 Brady Eidson <beidson@apple.com> |
|
5868 |
|
5869 Rubberstamped by Lou |
|
5870 |
|
5871 Removed unneccessary "else" |
|
5872 |
|
5873 * wtf/Assertions.cpp: |
|
5874 |
|
5875 2006-12-19 Timothy Hatcher <timothy@apple.com> |
|
5876 |
|
5877 Reviewed by Darin. |
|
5878 |
|
5879 <rdar://problem/4891774> Local WebCore/WebBrowser builds fail in 9A328 due to warning about ObjC-2.0 language features |
|
5880 |
|
5881 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
5882 |
|
5883 2006-12-17 Simon Hausmann <hausmann@kde.org> |
|
5884 |
|
5885 Reviewed by Zack. |
|
5886 |
|
5887 * kjs/testkjs.pro: Oops, make it also build on machines other than |
|
5888 mine :) |
|
5889 |
|
5890 2006-12-17 Simon Hausmann <hausmann@kde.org> |
|
5891 |
|
5892 Reviewed by Rob Buis. |
|
5893 |
|
5894 * kjs/testkjs.pro: Added .pro file to build testkjs. |
|
5895 |
|
5896 2006-12-16 Alexey Proskuryakov <ap@webkit.org> |
|
5897 |
|
5898 Reviewed by Rob. |
|
5899 |
|
5900 A deleted object was accessed to prepare RegExp construction error messages. |
|
5901 |
|
5902 * kjs/regexp_object.cpp: |
|
5903 (RegExpObjectImp::construct): Wrap the RegExp into an OwnPtr. |
|
5904 |
|
5905 2006-12-16 Mitz Pettel <mitz@webkit.org> |
|
5906 |
|
5907 Reviewed by Alexey. |
|
5908 |
|
5909 - fix http://bugs.webkit.org/show_bug.cgi?id=11814 |
|
5910 REGRESSION(r18098): Find does not work with capital letters |
|
5911 |
|
5912 Test: editing/execCommand/findString-3.html |
|
5913 |
|
5914 * wtf/unicode/icu/UnicodeIcu.h: |
|
5915 (WTF::Unicode::foldCase): Changed to not return an error if the result fits |
|
5916 in the buffer without a null terminator. |
|
5917 |
|
5918 2006-12-13 Maciej Stachowiak <mjs@apple.com> |
|
5919 |
|
5920 Reviewed by Anders. |
|
5921 |
|
5922 - added equality and inequality operations for HashMap and Vector, useful for comparing more complex types |
|
5923 |
|
5924 * wtf/HashMap.h: |
|
5925 (WTF::operator==): |
|
5926 (WTF::operator!=): |
|
5927 * wtf/Vector.h: |
|
5928 (WTF::operator==): |
|
5929 (WTF::operator!=): |
|
5930 |
|
5931 2006-12-12 Alexey Proskuryakov <ap@webkit.org> |
|
5932 |
|
5933 Reviewed by Geoff. Based on a patch by Maks Orlovich. |
|
5934 |
|
5935 http://bugs.webkit.org/show_bug.cgi?id=6257 |
|
5936 Throw errors on invalid expressions (KJS merge) |
|
5937 |
|
5938 * kjs/regexp.cpp: |
|
5939 (KJS::RegExp::RegExp): |
|
5940 (KJS::RegExp::~RegExp): |
|
5941 (KJS::RegExp::match): |
|
5942 * kjs/regexp.h: |
|
5943 (KJS::RegExp::flags): |
|
5944 (KJS::RegExp::isValid): |
|
5945 (KJS::RegExp::errorMessage): |
|
5946 (KJS::RegExp::subPatterns): |
|
5947 Remember and report RegExp construction failures. Renamed data members not to start with underscores. |
|
5948 |
|
5949 * kjs/regexp_object.cpp: |
|
5950 (RegExpObjectImp::construct): Raise an exception if RegExp construction fails. |
|
5951 (RegExpObjectImp::callAsFunction): Removed an obsolete comment. |
|
5952 |
|
5953 * tests/mozilla/ecma_3/RegExp/regress-119909.js: Reduced the number of nested parentheses to |
|
5954 a value supported by PCRE. |
|
5955 |
|
5956 2006-12-11 Alexey Proskuryakov <ap@webkit.org> |
|
5957 |
|
5958 Reviewed by Darin. |
|
5959 |
|
5960 http://bugs.webkit.org/show_bug.cgi?id=9673 |
|
5961 Add support for window.atob() and window.btoa() |
|
5962 |
|
5963 * JavaScriptCore.exp: Export UString::is8Bit(). |
|
5964 * JavaScriptCore.xcodeproj/project.pbxproj: Added StringExtras.h as |
|
5965 a private header. |
|
5966 |
|
5967 2006-12-11 Darin Adler <darin@apple.com> |
|
5968 |
|
5969 Reviewed by Brady. |
|
5970 |
|
5971 * JavaScriptCore.xcodeproj/project.pbxproj: Let Xcode update this |
|
5972 (I think Hyatt is using an old Xcode). |
|
5973 |
|
5974 2006-12-11 David Hyatt <hyatt@apple.com> |
|
5975 |
|
5976 Fix the failing layout test. Just remove Unicode::isSpace and |
|
5977 revert StringImpl to do the same thing it was doing before. |
|
5978 |
|
5979 Reviewed by darin |
|
5980 |
|
5981 * wtf/unicode/icu/UnicodeIcu.h: |
|
5982 * wtf/unicode/qt4/UnicodeQt4.h: |
|
5983 |
|
5984 2006-12-09 George Staikos <staikos@kde.org> |
|
5985 |
|
5986 Reviewed by Zack. |
|
5987 |
|
5988 Fix bison again on qmake build. |
|
5989 |
|
5990 * JavaScriptCore.pro: |
|
5991 |
|
5992 2006-12-09 Lars Knoll <lars@trolltech.com> |
|
5993 |
|
5994 Reviewed by Zack |
|
5995 |
|
5996 Make it possible to build WebKit with qmake. |
|
5997 |
|
5998 * JavaScriptCore.pro: Added. |
|
5999 * kjs/kjs.pro: Removed. |
|
6000 * pcre/pcre.pri: Added. |
|
6001 |
|
6002 2006-12-09 Zack Rusin <zack@kde.org> |
|
6003 |
|
6004 Fixing the compilation with platform kde after the icu changes. |
|
6005 |
|
6006 * CMakeLists.txt: |
|
6007 |
|
6008 2006-12-09 Adam Roben <aroben@apple.com> |
|
6009 |
|
6010 Reviewed by Darin. |
|
6011 |
|
6012 Some updates in reaction to r18098. |
|
6013 |
|
6014 * wtf/unicode/icu/UnicodeIcu.h: Use !! to convert UBool to bool in all |
|
6015 cases. |
|
6016 (WTF::Unicode::toLower): |
|
6017 (WTF::Unicode::toUpper): |
|
6018 (WTF::Unicode::isDigit): |
|
6019 (WTF::Unicode::isSpace): |
|
6020 (WTF::Unicode::isPunct): |
|
6021 (WTF::Unicode::isLower): |
|
6022 (WTF::Unicode::isUpper): |
|
6023 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
6024 * JavaScriptCore.vcproj/WTF/WTF.vcproj: |
|
6025 |
|
6026 2006-12-09 George Staikos <staikos@kde.org> |
|
6027 |
|
6028 Patch by Lars Knoll, comment out ICU dependency on Qt platform (unused code). |
|
6029 |
|
6030 Reviewed by Darin. |
|
6031 |
|
6032 * bindings/c/c_utility.cpp: |
|
6033 (KJS::Bindings::convertUTF8ToUTF16): |
|
6034 |
|
6035 2006-12-08 David Hyatt <hyatt@apple.com> |
|
6036 |
|
6037 Land the new ICU abstraction layer. Patch by Lars. |
|
6038 |
|
6039 Reviewed by me |
|
6040 |
|
6041 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
6042 * wtf/Platform.h: |
|
6043 * wtf/unicode/UnicodeCategory.h: Removed. |
|
6044 * wtf/unicode/UnicodeDecomposition.h: Removed. |
|
6045 * wtf/unicode/UnicodeDirection.h: Removed. |
|
6046 * wtf/unicode/icu/UnicodeIcu.h: |
|
6047 (WTF::Unicode::): |
|
6048 (WTF::Unicode::foldCase): |
|
6049 (WTF::Unicode::toLower): |
|
6050 (WTF::Unicode::toUpper): |
|
6051 (WTF::Unicode::toTitleCase): |
|
6052 (WTF::Unicode::isDigit): |
|
6053 (WTF::Unicode::isSpace): |
|
6054 (WTF::Unicode::isPunct): |
|
6055 (WTF::Unicode::mirroredChar): |
|
6056 (WTF::Unicode::category): |
|
6057 (WTF::Unicode::direction): |
|
6058 (WTF::Unicode::isLower): |
|
6059 (WTF::Unicode::isUpper): |
|
6060 (WTF::Unicode::digitValue): |
|
6061 (WTF::Unicode::combiningClass): |
|
6062 (WTF::Unicode::decompositionType): |
|
6063 (WTF::Unicode::strcasecmp): |
|
6064 (WTF::Unicode::memset): |
|
6065 * wtf/unicode/qt4/UnicodeQt4.cpp: Removed. |
|
6066 * wtf/unicode/qt4/UnicodeQt4.h: |
|
6067 (WTF::Unicode::): |
|
6068 (WTF::Unicode::toLower): |
|
6069 (WTF::Unicode::toUpper): |
|
6070 (WTF::Unicode::toTitleCase): |
|
6071 (WTF::Unicode::foldCase): |
|
6072 (WTF::Unicode::isPrintableChar): |
|
6073 (WTF::Unicode::isLower): |
|
6074 (WTF::Unicode::isUpper): |
|
6075 (WTF::Unicode::digitValue): |
|
6076 (WTF::Unicode::combiningClass): |
|
6077 (WTF::Unicode::decompositionType): |
|
6078 (WTF::Unicode::strcasecmp): |
|
6079 (WTF::Unicode::memset): |
|
6080 (WTF::Unicode::direction): |
|
6081 (WTF::Unicode::category): |
|
6082 |
|
6083 === Safari-521.32 === |
|
6084 |
|
6085 2006-12-08 Adam Roben <aroben@apple.com> |
|
6086 |
|
6087 Reviewed by Anders. |
|
6088 |
|
6089 This is a mo' better fix for ensuring we don't use macro definitions |
|
6090 of min/max. |
|
6091 |
|
6092 * kjs/config.h: |
|
6093 * wtf/Vector.h: |
|
6094 |
|
6095 2006-12-07 Kevin Fyure <digdog@macports.org> |
|
6096 |
|
6097 Reviewed by Darin. |
|
6098 |
|
6099 http://bugs.webkit.org/show_bug.cgi?id=11545 |
|
6100 Disable the testcases do not follow the ECMA-262v3 specification. |
|
6101 |
|
6102 * tests/mozilla/expected.html: Update Results. |
|
6103 * tests/mozilla/js1_2/String/concat.js: |
|
6104 4 tests disabled. The result of concat Array object is not followinig |
|
6105 ECMA 15.5.4.6 |
|
6106 * tests/mozilla/js1_2/function/Number.js: |
|
6107 1 test disabled. The result of Array object to Number object conversion |
|
6108 is not following ECMA 9.3. And the test was duplicated in |
|
6109 ecma/TypeConversion/9.3-1.js |
|
6110 * tests/mozilla/js1_2/function/String.js: |
|
6111 2 tests disabled. The result of Object/Array object to String object |
|
6112 conversion is not following ECMA 15.5.1.1 and ECMA 9.8 |
|
6113 |
|
6114 2006-11-30 Steve Falkenburg <sfalken@apple.com> |
|
6115 |
|
6116 Reviewed by Oliver. |
|
6117 |
|
6118 Move WTF from JavaScriptCore project into a new WTF project. |
|
6119 |
|
6120 * JavaScriptCore.vcproj/JavaScriptCore.sln: Add WTF.vcproj to sln |
|
6121 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Remove WTF source files |
|
6122 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added. |
|
6123 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Add dependency on WTF.lib |
|
6124 |
|
6125 2006-11-30 Geoffrey Garen <ggaren@apple.com> |
|
6126 |
|
6127 Reviewed by Beth Dakin. |
|
6128 |
|
6129 Fixed up garbage collection at window close time. |
|
6130 |
|
6131 * kjs/interpreter.cpp: |
|
6132 (KJS::Interpreter::~Interpreter): Garbage collect here, since |
|
6133 destroying the interpreter frees the global object and |
|
6134 therefore creates a lot of garbage. |
|
6135 |
|
6136 2006-11-20 W. Andy Carrel <wac@google.com> |
|
6137 |
|
6138 Reviewed by Maciej. |
|
6139 |
|
6140 http://bugs.webkit.org/show_bug.cgi?id=11501 |
|
6141 REGRESSION: \u no longer escapes metacharacters in RegExps |
|
6142 http://bugs.webkit.org/show_bug.cgi?id=11502 |
|
6143 Serializing RegExps doesn't preserve Unicode escapes |
|
6144 |
|
6145 * kjs/lexer.cpp: |
|
6146 (Lexer::Lexer): |
|
6147 (Lexer::setCode): |
|
6148 (Lexer::shift): |
|
6149 (Lexer::scanRegExp): |
|
6150 Push \u parsing back down into the RegExp object rather than in the |
|
6151 parser. This backs out r17354 in favor of a new fix that better |
|
6152 matches the behavior of other browsers. |
|
6153 |
|
6154 * kjs/lexer.h: |
|
6155 * kjs/regexp.cpp: |
|
6156 (KJS::RegExp::RegExp): |
|
6157 (KJS::sanitizePattern): |
|
6158 (KJS::isHexDigit): |
|
6159 (KJS::convertHex): |
|
6160 (KJS::convertUnicode): |
|
6161 * kjs/regexp.h: |
|
6162 Translate \u escaped unicode characters for the benefit of pcre. |
|
6163 |
|
6164 * kjs/ustring.cpp: |
|
6165 (KJS::UString::append): |
|
6166 Fix failure to increment length on the first UChar appended to a |
|
6167 UString that was copy-on-write. |
|
6168 |
|
6169 * tests/mozilla/ecma_2/RegExp/properties-001.js: |
|
6170 Adjust tests back to the uniform standards. |
|
6171 |
|
6172 2006-11-20 Samuel Weinig <sam@webkit.org> |
|
6173 |
|
6174 Reviewed by Maciej. |
|
6175 |
|
6176 Fix for http://bugs.webkit.org/show_bug.cgi?id=11647 |
|
6177 Fix Win32 build |
|
6178 |
|
6179 * kjs/config.h: define NOMINMAX instead of min/max |
|
6180 as themselves. |
|
6181 * wtf/Vector.h: put back hack to ensure that min/max |
|
6182 are not defined as macros. |
|
6183 |
|
6184 2006-11-19 Simon Hausmann <hausmann@kde.org> |
|
6185 |
|
6186 Reviewed by Zack. |
|
6187 |
|
6188 http://bugs.webkit.org/show_bug.cgi?id=11649 |
|
6189 Fix CMake Qt-only build without KDE CMake files |
|
6190 |
|
6191 * CMakeLists.txt: |
|
6192 * pcre/CMakeLists.txt: |
|
6193 |
|
6194 2006-11-17 Anders Carlsson <acarlsson@apple.com> |
|
6195 |
|
6196 Reviewed by Adam. |
|
6197 |
|
6198 Make sure that we always use std::min and std::max instead of macros. |
|
6199 |
|
6200 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
6201 * kjs/config.h: |
|
6202 * wtf/Vector.h: |
|
6203 |
|
6204 === Safari-521.31 === |
|
6205 |
|
6206 2006-11-12 Geoffrey Garen <ggaren@apple.com> |
|
6207 |
|
6208 Reviewed by Beth Dakin. |
|
6209 |
|
6210 Added project-wide setting to disable Microsoft's made-up deprecation |
|
6211 warnings related to std:: functions. (Doesn't have any affect yet, |
|
6212 since we currently disable all deprecation warnings.) |
|
6213 |
|
6214 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
6215 |
|
6216 2006-11-12 Mark Rowe <bdash@webkit.org> |
|
6217 |
|
6218 Reviewed by Mitz. |
|
6219 |
|
6220 Clean up of JavaScriptCore bakefiles. |
|
6221 |
|
6222 * JavaScriptCoreSources.bkl: |
|
6223 * jscore.bkl: |
|
6224 |
|
6225 2006-11-11 Alexey Proskuryakov <ap@webkit.org> |
|
6226 |
|
6227 Reviewed by Maciej. |
|
6228 |
|
6229 http://bugs.webkit.org/show_bug.cgi?id=11508 |
|
6230 Undisable some warnings for JSImmediate.h |
|
6231 |
|
6232 Fix suggested by Don Gibson. |
|
6233 |
|
6234 * kjs/JSImmediate.h: |
|
6235 Re-enable all MSVC warnings, move the remaining runtime checks |
|
6236 to compile-time. |
|
6237 |
|
6238 2006-11-10 Zalan Bujtas <zalan.bujtas@nokia.com> |
|
6239 |
|
6240 Reviewed by Maciej. |
|
6241 |
|
6242 Added s60/symbian platform defines. |
|
6243 http://bugs.webkit.org/show_bug.cgi?id=11540 |
|
6244 |
|
6245 * wtf/Platform.h: |
|
6246 |
|
6247 === Safari-521.30 === |
|
6248 |
|
6249 2006-11-08 Ada Chan <adachan@apple.com> |
|
6250 |
|
6251 Reviewed by darin. |
|
6252 |
|
6253 Added a method to delete all the keys in a HashMap. |
|
6254 |
|
6255 * wtf/HashMap.h: |
|
6256 (WTF::deleteAllPairFirsts): |
|
6257 (WTF::deleteAllKeys): |
|
6258 |
|
6259 2006-11-07 Anders Carlsson <acarlsson@apple.com> |
|
6260 |
|
6261 Reviewed by Geoff. |
|
6262 |
|
6263 * API/JSClassRef.cpp: |
|
6264 (OpaqueJSClass::OpaqueJSClass): |
|
6265 Initialize cachedPrototype to 0. |
|
6266 |
|
6267 2006-11-06 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
6268 |
|
6269 Reviewed by Maciej. |
|
6270 |
|
6271 Remove warning about garbage after #else. #else clause applies for all |
|
6272 non-mac platforms, not only win. |
|
6273 |
|
6274 * kjs/date_object.cpp: |
|
6275 |
|
6276 2006-11-06 Mark Rowe <bdash@webkit.org> |
|
6277 |
|
6278 Reviewed by the wonderful Mitz Pettel. |
|
6279 |
|
6280 http://bugs.webkit.org/show_bug.cgi?id=11524 |
|
6281 Bug 11524: REGRESSION(r9842): Array.prototype.join should use ToString operator rather than calling toString on each element |
|
6282 |
|
6283 * kjs/array_object.cpp: |
|
6284 (ArrayProtoFunc::callAsFunction): Use ToString operator on each element rather than calling their toString method. |
|
6285 |
|
6286 2006-11-03 Steve Falkenburg <sfalken@apple.com> |
|
6287 |
|
6288 Fix build |
|
6289 |
|
6290 * kjs/JSImmediate.h: |
|
6291 |
|
6292 2006-11-03 Alexey Proskuryakov <ap@nypop.com> |
|
6293 |
|
6294 Reviewed by Darin. |
|
6295 |
|
6296 http://bugs.webkit.org/show_bug.cgi?id=11504 |
|
6297 Fix warnings on non 32 bit platforms |
|
6298 |
|
6299 * kjs/JSImmediate.h: |
|
6300 (KJS::JSImmediate::NanAsBits): |
|
6301 (KJS::JSImmediate::oneAsBits): |
|
6302 Rewrite in a way that moves runtime checks to compile-time. |
|
6303 |
|
6304 (KJS::): |
|
6305 (KJS::JSImmediate::fromDouble): |
|
6306 (KJS::JSImmediate::toDouble): |
|
6307 |
|
6308 2006-11-02 George Staikos <staikos@kde.org> |
|
6309 |
|
6310 Reviewed by Maciej. |
|
6311 |
|
6312 * collector.cpp: |
|
6313 Remove a deprecated pthreads call. |
|
6314 |
|
6315 2006-11-02 Anders Carlsson <acarlsson@apple.com> |
|
6316 |
|
6317 Reviewed by Maciej, landed by Anders. |
|
6318 |
|
6319 * CMakeLists.txt: |
|
6320 Make KDE support optional. |
|
6321 |
|
6322 2006-11-01 Kevin McCullough <KMcCullough@apple.com> |
|
6323 |
|
6324 Reviewed by Brady. |
|
6325 |
|
6326 - Fixes many JavaScriptCore tests in other timezones. The root problem is that on mac localtime() returns historically accurate information for DST, but the JavaScript spec explicitly states to not take into account historical information but rather to interpolate from valid years. |
|
6327 |
|
6328 * kjs/DateMath.cpp: |
|
6329 (KJS::equivalentYearForDST): |
|
6330 (KJS::getDSTOffsetSimple): |
|
6331 (KJS::getDSTOffset): |
|
6332 |
|
6333 2006-10-31 Geoffrey Garen <ggaren@apple.com> |
|
6334 |
|
6335 Reviewed by Beth. |
|
6336 |
|
6337 Fixed http://bugs.webkit.org/show_bug.cgi?id=11477 |
|
6338 REGRESSION: GMail crashes in KJS::FunctionImp::callerGetter |
|
6339 |
|
6340 * kjs/function.cpp: |
|
6341 (KJS::FunctionImp::argumentsGetter): Removed unnecessary braces. |
|
6342 (KJS::FunctionImp::callerGetter): More logical NULL checking. |
|
6343 |
|
6344 2006-10-31 Oliver Hunt <oliver@apple.com> |
|
6345 |
|
6346 Reviewed by Geoff. |
|
6347 |
|
6348 Adding definition for PLATFORM(CI) |
|
6349 |
|
6350 * wtf/Platform.h: |
|
6351 |
|
6352 2006-10-31 Vladimir Olexa <vladimir.olexa@gmail.com> |
|
6353 |
|
6354 Reviewed by Geoff. |
|
6355 |
|
6356 http://bugs.webkit.org/show_bug.cgi?id=4166 |
|
6357 Function object does not support caller property |
|
6358 |
|
6359 Test: fast/js/caller-property.html |
|
6360 |
|
6361 * kjs/function.cpp: |
|
6362 (KJS::FunctionImp::callerGetter): added |
|
6363 (KJS::FunctionImp::getOwnPropertySlot): added if statement to handle callerGetter() |
|
6364 * kjs/function.h: added callerGetter() declaration |
|
6365 * kjs/identifier.h: added caller property macro |
|
6366 * tests/mozilla/expected.html: |
|
6367 |
|
6368 2006-10-30 Kevin McCullough <KMcCullough@apple.com> |
|
6369 |
|
6370 Reviewed by Adam. |
|
6371 |
|
6372 - Fix some timezone issues and JavaScriptCore date tests. Addresses bugzilla 4930. |
|
6373 |
|
6374 * kjs/DateMath.h: |
|
6375 (KJS::GregorianDateTime::GregorianDateTime): Here's the fix, to add parenthesis for order of precedence. |
|
6376 * kjs/date_object.cpp: |
|
6377 (KJS::DateProtoFunc::callAsFunction): |
|
6378 (KJS::DateObjectImp::construct): memset not needed as GregorianDateTime initializes itself. |
|
6379 |
|
6380 2006-10-30 Darin Adler <darin@apple.com> |
|
6381 |
|
6382 Reviewed by John Sullivan. |
|
6383 |
|
6384 * kjs/SavedBuiltins.h: Added needed include. |
|
6385 * wtf/OwnPtr.h: (WTF::OwnPtr::set): Fixed mistake in assertion. |
|
6386 |
|
6387 2006-10-28 Darin Adler <darin@apple.com> |
|
6388 |
|
6389 Reviewed by Maciej. |
|
6390 |
|
6391 - renamed PassRefPtr::release to releaseRef to make it clearer that |
|
6392 it's the counterpart of adoptRef, and to make it harder to confuse |
|
6393 it with the safer-to-use RefPtr::release |
|
6394 |
|
6395 * kjs/identifier.cpp: |
|
6396 (KJS::CStringTranslator::translate): |
|
6397 (KJS::UCharBufferTranslator::translate): |
|
6398 * kjs/ustring.cpp: |
|
6399 (KJS::UString::Rep::create): |
|
6400 * wtf/PassRefPtr.h: |
|
6401 (WTF::PassRefPtr::PassRefPtr): |
|
6402 (WTF::PassRefPtr::~PassRefPtr): |
|
6403 (WTF::PassRefPtr::get): |
|
6404 (WTF::PassRefPtr::releaseRef): |
|
6405 (WTF::PassRefPtr::operator->): |
|
6406 (WTF::PassRefPtr::operator=): |
|
6407 (WTF::adoptRef): |
|
6408 (WTF::static_pointer_cast): |
|
6409 (WTF::const_pointer_cast): |
|
6410 * wtf/RefPtr.h: |
|
6411 (WTF::RefPtr::RefPtr): |
|
6412 (WTF::RefPtr::operator=): |
|
6413 |
|
6414 2006-10-28 Darin Adler <darin@apple.com> |
|
6415 |
|
6416 Reviewed by Steve. |
|
6417 |
|
6418 * kjs/grammar.y: Add definitions of YYMALLOC and YYFREE to fix |
|
6419 a warning some people see (not sure why others don't see it). |
|
6420 |
|
6421 * JavaScriptCore.vcproj/JavaScriptCore/grammarWrapper.cpp: Touch |
|
6422 this file to force it to re-build grammar.cpp. |
|
6423 |
|
6424 2006-10-28 Darin Adler <darin@apple.com> |
|
6425 |
|
6426 Reviewed by Geoff. |
|
6427 |
|
6428 - made changes so the code compiles with the highest warning level |
|
6429 under MSVC (disabling some warnings, making some code fixes) |
|
6430 |
|
6431 * API/JSCallbackConstructor.cpp: |
|
6432 (KJS::JSCallbackConstructor::construct): |
|
6433 * API/JSCallbackFunction.cpp: |
|
6434 (KJS::JSCallbackFunction::callAsFunction): |
|
6435 * API/JSCallbackObject.cpp: |
|
6436 (KJS::JSCallbackObject::init): |
|
6437 (KJS::JSCallbackObject::construct): |
|
6438 (KJS::JSCallbackObject::callAsFunction): |
|
6439 * API/JSObjectRef.cpp: |
|
6440 (JSPropertyNameArrayGetNameAtIndex): |
|
6441 * API/JSStringRef.cpp: |
|
6442 (JSStringCreateWithCharacters): |
|
6443 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
6444 * bindings/c/c_utility.cpp: |
|
6445 (KJS::Bindings::convertUTF8ToUTF16): |
|
6446 (KJS::Bindings::coerceValueToNPVariantStringType): |
|
6447 (KJS::Bindings::convertValueToNPVariant): |
|
6448 * kjs/DateMath.h: |
|
6449 (KJS::GregorianDateTime::GregorianDateTime): |
|
6450 * kjs/ExecState.h: |
|
6451 (KJS::ExecState::hadException): |
|
6452 * kjs/JSImmediate.h: |
|
6453 (KJS::JSImmediate::fromDouble): |
|
6454 (KJS::JSImmediate::toDouble): |
|
6455 (KJS::JSImmediate::NanAsBits): |
|
6456 (KJS::JSImmediate::oneAsBits): |
|
6457 * kjs/Parser.h: |
|
6458 * kjs/PropertyNameArray.h: |
|
6459 (KJS::PropertyNameArray::size): |
|
6460 * kjs/array_object.cpp: |
|
6461 (ArrayObjectImp::callAsFunction): |
|
6462 * kjs/bool_object.cpp: |
|
6463 (BooleanObjectImp::callAsFunction): |
|
6464 * kjs/collector.cpp: |
|
6465 (KJS::Collector::allocate): |
|
6466 (KJS::Collector::markCurrentThreadConservatively): |
|
6467 (KJS::Collector::collect): |
|
6468 * kjs/completion.h: |
|
6469 (KJS::Completion::isValueCompletion): |
|
6470 * kjs/date_object.cpp: |
|
6471 (KJS::findMonth): |
|
6472 * kjs/debugger.cpp: |
|
6473 (Debugger::sourceParsed): |
|
6474 (Debugger::sourceUnused): |
|
6475 (Debugger::exception): |
|
6476 (Debugger::atStatement): |
|
6477 (Debugger::callEvent): |
|
6478 (Debugger::returnEvent): |
|
6479 * kjs/dtoa.cpp: |
|
6480 * kjs/error_object.cpp: |
|
6481 (ErrorObjectImp::callAsFunction): |
|
6482 (NativeErrorImp::callAsFunction): |
|
6483 * kjs/function.cpp: |
|
6484 (KJS::FunctionImp::processVarDecls): |
|
6485 (KJS::GlobalFuncImp::callAsFunction): |
|
6486 * kjs/function_object.cpp: |
|
6487 (FunctionPrototype::callAsFunction): |
|
6488 * kjs/grammar.y: |
|
6489 * kjs/identifier.cpp: |
|
6490 (KJS::CStringTranslator::translate): |
|
6491 (KJS::Identifier::add): |
|
6492 * kjs/internal.h: |
|
6493 * kjs/lexer.cpp: |
|
6494 (Lexer::lex): |
|
6495 (Lexer::isIdentStart): |
|
6496 (Lexer::isIdentPart): |
|
6497 (isDecimalDigit): |
|
6498 (Lexer::isHexDigit): |
|
6499 (Lexer::isOctalDigit): |
|
6500 (Lexer::matchPunctuator): |
|
6501 (Lexer::singleEscape): |
|
6502 (Lexer::convertOctal): |
|
6503 (Lexer::convertHex): |
|
6504 (Lexer::convertUnicode): |
|
6505 (Lexer::record8): |
|
6506 * kjs/lexer.h: |
|
6507 * kjs/math_object.cpp: |
|
6508 (MathFuncImp::callAsFunction): |
|
6509 * kjs/number_object.cpp: |
|
6510 (integer_part_noexp): |
|
6511 (intPow10): |
|
6512 (NumberProtoFunc::callAsFunction): |
|
6513 (NumberObjectImp::callAsFunction): |
|
6514 * kjs/object.cpp: |
|
6515 (KJS::JSObject::deleteProperty): |
|
6516 (KJS::JSObject::callAsFunction): |
|
6517 (KJS::JSObject::toBoolean): |
|
6518 (KJS::JSObject::toObject): |
|
6519 * kjs/object.h: |
|
6520 (KJS::JSObject::getPropertySlot): |
|
6521 * kjs/property_map.cpp: |
|
6522 (KJS::isValid): |
|
6523 (KJS::PropertyMap::put): |
|
6524 (KJS::PropertyMap::insert): |
|
6525 (KJS::PropertyMap::containsGettersOrSetters): |
|
6526 * kjs/property_map.h: |
|
6527 (KJS::PropertyMap::hasGetterSetterProperties): |
|
6528 * kjs/property_slot.h: |
|
6529 * kjs/string_object.cpp: |
|
6530 (StringInstance::getPropertyNames): |
|
6531 (StringObjectImp::callAsFunction): |
|
6532 (StringObjectFuncImp::callAsFunction): |
|
6533 * kjs/ustring.cpp: |
|
6534 (KJS::UString::Rep::computeHash): |
|
6535 (KJS::UString::UString): |
|
6536 (KJS::UString::from): |
|
6537 (KJS::UString::append): |
|
6538 (KJS::UString::ascii): |
|
6539 (KJS::UString::operator=): |
|
6540 (KJS::UString::find): |
|
6541 (KJS::UString::rfind): |
|
6542 * kjs/ustring.h: |
|
6543 (KJS::UChar::high): |
|
6544 (KJS::UChar::low): |
|
6545 (KJS::UCharReference::low): |
|
6546 (KJS::UCharReference::high): |
|
6547 * kjs/value.cpp: |
|
6548 (KJS::JSValue::toUInt16): |
|
6549 * kjs/value.h: |
|
6550 * pcre/pcre_compile.c: |
|
6551 (get_othercase_range): |
|
6552 * pcre/pcre_exec.c: |
|
6553 (match): |
|
6554 * pcre/pcre_internal.h: |
|
6555 * wtf/HashFunctions.h: |
|
6556 (WTF::intHash): |
|
6557 (WTF::PtrHash::hash): |
|
6558 * wtf/MathExtras.h: |
|
6559 (isnan): |
|
6560 (lround): |
|
6561 (lroundf): |
|
6562 * wtf/StringExtras.h: |
|
6563 (strncasecmp): |
|
6564 * wtf/unicode/icu/UnicodeIcu.h: |
|
6565 (WTF::Unicode::isPrintableChar): |
|
6566 |
|
6567 2006-10-26 W. Andy Carrel <wac@google.com> |
|
6568 |
|
6569 Reviewed by Maciej. |
|
6570 |
|
6571 - Fix http://bugs.webkit.org/show_bug.cgi?id=7445 / |
|
6572 <rdar://problem/4614195> (and 7253 / <rdar://4694011>) by changing |
|
6573 inline regexps so that they can have \u escaped Unicode sequences and |
|
6574 still work properly. |
|
6575 |
|
6576 * kjs/lexer.cpp: |
|
6577 (Lexer::Lexer): |
|
6578 (Lexer::setCode): |
|
6579 (Lexer::shift): Looking ahead one additional character for the benefit |
|
6580 of scanRegExp |
|
6581 (Lexer::scanRegExp): Change code to support unicode escapes in inline |
|
6582 regexps. |
|
6583 * kjs/lexer.h: Extra lookahead added. |
|
6584 |
|
6585 === Safari-521.29 === |
|
6586 |
|
6587 2006-10-26 Nikolas Zimmermann <zimmermann@kde.org> |
|
6588 |
|
6589 Reviewed by Darin. |
|
6590 |
|
6591 Fix build with older gcc 3.3.4. |
|
6592 |
|
6593 * kjs/DateMath.cpp: Remove inline prefix. |
|
6594 (KJS::equivalentYearForDST): |
|
6595 |
|
6596 2006-10-26 Darin Adler <darin@apple.com> |
|
6597 |
|
6598 Reviewed by John. |
|
6599 |
|
6600 - fix iteration of properties of string objects (found because of a warning |
|
6601 emitted by the MSVC compiler) |
|
6602 |
|
6603 * kjs/string_object.cpp: (StringInstance::getPropertyNames): Change code that |
|
6604 wants to format a number as a string to use UString::from. Before it was using |
|
6605 the UString constructor that makes a string from a character! |
|
6606 |
|
6607 * kjs/ustring.h: |
|
6608 * kjs/ustring.cpp: Remove the dangerous and not all that helpful UString(char) |
|
6609 constructor. |
|
6610 |
|
6611 * kjs/grammar.y: Change code to not depend on the UString(char) constructor. |
|
6612 This is potentially more efficient anyway because we could overload the + operator |
|
6613 some day to handle char* directly instead of creating a UString. |
|
6614 |
|
6615 * kjs/nodes2string.cpp: (SourceStream::operator<<): Change code to not depend on |
|
6616 the UString(char) constructor. |
|
6617 |
|
6618 2006-10-25 Kevin McCullough <KMcCullough@apple.com> |
|
6619 |
|
6620 Reviewed by Steve (rubber stamp). |
|
6621 |
|
6622 - Link against your local build of JavaScriptCore.lib first, this fixes some errors on release builds of testkjs. |
|
6623 |
|
6624 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: |
|
6625 |
|
6626 2006-10-25 Geoffrey Garen <ggaren@apple.com> |
|
6627 |
|
6628 Reviewed by Lou. |
|
6629 |
|
6630 Removed duplicate symbol declaration. |
|
6631 |
|
6632 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
6633 * kjs/grammar.y: |
|
6634 |
|
6635 2006-10-24 Steve Falkenburg <sfalken@apple.com> |
|
6636 |
|
6637 Build config change |
|
6638 |
|
6639 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: |
|
6640 |
|
6641 2006-10-24 Kevin McCullough <KMcCullough@apple.com> |
|
6642 |
|
6643 Reviewed by Brady. |
|
6644 |
|
6645 - Fixes a date formatting issue on win. Specifically strftime cannot handle some ranges of time so we shift time call strftime and then manipulate the returned string, if needed. |
|
6646 |
|
6647 * kjs/date_object.cpp: |
|
6648 (KJS::): |
|
6649 (KJS::formatLocaleDate): |
|
6650 (KJS::DateProtoFunc::callAsFunction): |
|
6651 |
|
6652 2006-10-23 Kevin McCullough <KMcCullough@apple.com> |
|
6653 |
|
6654 Reviewed by |
|
6655 |
|
6656 - Build fix |
|
6657 |
|
6658 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
6659 * kjs/grammar.y: |
|
6660 |
|
6661 2006-10-23 Kevin McCullough <KMcCullough@apple.com> |
|
6662 |
|
6663 Reviewed by Maciej. |
|
6664 |
|
6665 - Makes the toTM function an operator. Was going to piggy back on a patch but the patch needs more work. |
|
6666 |
|
6667 * kjs/DateMath.cpp: |
|
6668 (KJS::equivalentYearForDST): |
|
6669 * kjs/DateMath.h: |
|
6670 (KJS::GregorianDateTime::operator tm): |
|
6671 * kjs/date_object.cpp: |
|
6672 (KJS::formatTime): |
|
6673 (KJS::DateProtoFunc::callAsFunction): |
|
6674 |
|
6675 2006-10-23 Kevin McCullough <KMcCullough@apple.com> |
|
6676 |
|
6677 Reviewed by Maciej. |
|
6678 |
|
6679 - Fixes two regressions on win. Both are stack overflows. For one the number of recursions is capped at 100, and for the other, nested parenthesis pairs are not evaluated (since they would evaluate to whatever is in them anyway). |
|
6680 |
|
6681 * kjs/grammar.y: |
|
6682 * kjs/object.cpp: |
|
6683 |
|
6684 2006-10-21 Steve Falkenburg <sfalken@apple.com> |
|
6685 |
|
6686 Reviewed by Adam. |
|
6687 |
|
6688 Add minimal compatibility with MSVCRT leak checker |
|
6689 |
|
6690 * wtf/FastMalloc.h: |
|
6691 |
|
6692 2006-10-23 Kevin McCullough <KMcCullough@apple.com> |
|
6693 |
|
6694 Reviewed by Geof. |
|
6695 |
|
6696 - Sets the lowercase range correctly in the test and consolidates a variable to make the test more readable. |
|
6697 |
|
6698 * tests/mozilla/ecma/String/15.5.4.11-2.js: |
|
6699 |
|
6700 2006-10-21 Darin Adler <darin@apple.com> |
|
6701 |
|
6702 Reviewed by Anders. |
|
6703 |
|
6704 - http://bugs.webkit.org/show_bug.cgi?id=11377 |
|
6705 swap(Vector, Vector) should be O(1) instead of O(n) |
|
6706 |
|
6707 * wtf/Vector.h: |
|
6708 (WTF::VectorBuffer::swap): Added. |
|
6709 (WTF::Vector::swap): Added. |
|
6710 (WTF::swap): Added overload that takes two Vector objects. |
|
6711 |
|
6712 2006-10-21 Darin Adler <darin@apple.com> |
|
6713 |
|
6714 Reviewed by Adam. |
|
6715 |
|
6716 - http://bugs.webkit.org/show_bug.cgi?id=11376 |
|
6717 build scripts should invoke make with "-j" option for multiple processors |
|
6718 |
|
6719 * JavaScriptCore.xcodeproj/project.pbxproj: Pass -j `sysctl -n hw.ncpu` to make. |
|
6720 |
|
6721 2006-10-19 Kevin McCullough <KMcCullough@apple.com> |
|
6722 |
|
6723 Reviewed by Geof. |
|
6724 |
|
6725 Changed test to make us pass Georgian case changing for Unicode 4.0 and 5.0. This incorporates changes from the 1.4 revision of the same mozilla test. |
|
6726 On Tiger we are still using Unicode 4.0 but on win and Leopard we are using Unicode 5.0, so this test currently allows for either answer. |
|
6727 |
|
6728 * tests/mozilla/ecma/String/15.5.4.11-2.js: |
|
6729 |
|
6730 2006-10-18 Maciej Stachowiak <mjs@apple.com> |
|
6731 |
|
6732 Reviewed by Geoff. |
|
6733 |
|
6734 - remove vestiges of KXMLCore name (former name of WTF). |
|
6735 |
|
6736 * wtf/Assertions.h: |
|
6737 * wtf/FastMalloc.h: |
|
6738 (operator new): |
|
6739 (operator delete): |
|
6740 (operator new[]): |
|
6741 (operator delete[]): |
|
6742 * wtf/FastMallocInternal.h: |
|
6743 * wtf/Forward.h: |
|
6744 * wtf/GetPtr.h: |
|
6745 * wtf/HashCountedSet.h: |
|
6746 * wtf/HashFunctions.h: |
|
6747 * wtf/HashMap.h: |
|
6748 * wtf/HashSet.h: |
|
6749 * wtf/HashTable.h: |
|
6750 * wtf/HashTraits.h: |
|
6751 * wtf/ListRefPtr.h: |
|
6752 * wtf/MathExtras.h: |
|
6753 * wtf/Noncopyable.h: |
|
6754 * wtf/OwnArrayPtr.h: |
|
6755 * wtf/OwnPtr.h: |
|
6756 * wtf/PassRefPtr.h: |
|
6757 * wtf/Platform.h: |
|
6758 * wtf/RefPtr.h: |
|
6759 * wtf/StringExtras.h: |
|
6760 (snprintf): |
|
6761 * wtf/UnusedParam.h: |
|
6762 * wtf/Vector.h: |
|
6763 * wtf/VectorTraits.h: |
|
6764 |
|
6765 2006-10-17 Steve Falkenburg <sfalken@apple.com> |
|
6766 |
|
6767 Reviewed by Maciej. |
|
6768 |
|
6769 Adjust include paths |
|
6770 |
|
6771 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
6772 |
|
6773 2006-10-17 Kevin McCullough <KMcCullough@apple.com> |
|
6774 |
|
6775 Reviewed by Darin. |
|
6776 |
|
6777 Fixed a date issue where the UTC offset was not set in win. |
|
6778 |
|
6779 * kjs/DateMath.cpp: |
|
6780 (KJS::getDSTOffsetSimple): |
|
6781 (KJS::getDSTOffset): |
|
6782 (KJS::msToGregorianDateTime): |
|
6783 * kjs/DateMath.h: |
|
6784 (KJS::): |
|
6785 (KJS::GregorianDateTime::GregorianDateTime): |
|
6786 |
|
6787 2006-10-17 Kevin McCullough <KMcCullough@apple.com> |
|
6788 |
|
6789 Reviewed by Brady. |
|
6790 |
|
6791 Fixes a JavaScriptCore math issue on win. |
|
6792 |
|
6793 * kjs/math_object.cpp: |
|
6794 (MathFuncImp::callAsFunction): |
|
6795 * wtf/MathExtras.h: |
|
6796 (wtf_atan2): |
|
6797 |
|
6798 2006-10-16 Kevin McCullough <kmccullough@apple.com> |
|
6799 |
|
6800 Reviewed by Geof. |
|
6801 |
|
6802 Removed unecessary global specifiers. |
|
6803 |
|
6804 * kjs/math_object.cpp: |
|
6805 (MathFuncImp::callAsFunction): |
|
6806 |
|
6807 2006-10-16 Kevin McCullough <KMcCullough@apple.com> |
|
6808 |
|
6809 Reviewed by John. |
|
6810 |
|
6811 Fixes a compile order issue for testkjs on win. |
|
6812 |
|
6813 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: |
|
6814 |
|
6815 2006-10-15 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
6816 |
|
6817 Reviewed by Anders. |
|
6818 |
|
6819 Remove junk (as gcc calls it) after #else clause. |
|
6820 |
|
6821 * wtf/FastMalloc.cpp: |
|
6822 (WTF::do_free): |
|
6823 |
|
6824 2006-10-14 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
6825 |
|
6826 Reviewed by Maciej. |
|
6827 |
|
6828 Define KXMLCORE_USE_CURL for platforms that wish to use CURL as |
|
6829 networking, and set it for GDK build |
|
6830 |
|
6831 * wtf/Platform.h: |
|
6832 |
|
6833 2006-10-13 Marvin Decker <marv.decker@gmail.com> |
|
6834 |
|
6835 Reviewed by Kevin McCullough. |
|
6836 |
|
6837 Fixes http://bugs.webkit.org/show_bug.cgi?id=11283 |
|
6838 Fixes Qt/Linux and Windows build |
|
6839 |
|
6840 * kjs/DateMath.cpp: |
|
6841 * kjs/DateMath.h: |
|
6842 * kjs/date_object.cpp: |
|
6843 (KJS::DateProtoFunc::callAsFunction): |
|
6844 |
|
6845 2006-10-13 Kevin McCullough <KMcCullough@apple.com> |
|
6846 |
|
6847 Reviewed by Adam, Geoff, Darin. |
|
6848 |
|
6849 Fixed displaying the UTC offset and time zone string, as well as renamed the GregorianDateTime structure and clean up. |
|
6850 |
|
6851 * ChangeLog: |
|
6852 * kjs/DateMath.cpp: |
|
6853 (KJS::getUTCOffset): |
|
6854 (KJS::getDSTOffsetSimple): |
|
6855 (KJS::gregorianDateTimeToMS): |
|
6856 (KJS::msToGregorianDateTime): |
|
6857 * kjs/DateMath.h: |
|
6858 (KJS::GregorianDateTime::GregorianDateTime): |
|
6859 (KJS::GregorianDateTime::~GregorianDateTime): |
|
6860 (KJS::GregorianDateTime::toTM): |
|
6861 * kjs/date_object.cpp: |
|
6862 (KJS::gmtoffset): |
|
6863 (KJS::formatDate): |
|
6864 (KJS::formatDateUTCVariant): |
|
6865 (KJS::formatTime): |
|
6866 (KJS::fillStructuresUsingTimeArgs): |
|
6867 (KJS::fillStructuresUsingDateArgs): |
|
6868 (KJS::DateInstance::getTime): |
|
6869 (KJS::DateInstance::getUTCTime): |
|
6870 (KJS::DateProtoFunc::callAsFunction): |
|
6871 (KJS::DateObjectImp::construct): |
|
6872 (KJS::DateObjectImp::callAsFunction): |
|
6873 (KJS::DateObjectFuncImp::callAsFunction): |
|
6874 (KJS::parseDate): |
|
6875 * kjs/date_object.h: |
|
6876 |
|
6877 2006-10-13 Kevin McCullough <KMcCullough@apple.com> |
|
6878 |
|
6879 Reviewed by Adam. |
|
6880 |
|
6881 Gets JavaScripCore tests running on windows. |
|
6882 |
|
6883 * Scripts/run-javascriptcore-tests: |
|
6884 * Scripts/webkitdirs.pm: |
|
6885 |
|
6886 2006-10-12 Geoffrey Garen <ggaren@apple.com> |
|
6887 |
|
6888 Reviewed by Maciej. |
|
6889 |
|
6890 Removed JSObjectMakeWithPrototype, clarified some comments. We really |
|
6891 don't want people to manage their own prototypes, so we don't want an |
|
6892 extra function in the API devoted to just that. People can still manage |
|
6893 their own prototypes if they really want by using JSObjectSetPrototype. |
|
6894 |
|
6895 * API/JSClassRef.cpp: |
|
6896 (OpaqueJSClass::createNoAutomaticPrototype): |
|
6897 (OpaqueJSClass::create): |
|
6898 * API/JSClassRef.h: |
|
6899 * API/JSObjectRef.cpp: |
|
6900 (JSClassCreate): |
|
6901 (JSObjectMake): |
|
6902 * API/JSObjectRef.h: |
|
6903 * API/testapi.c: |
|
6904 (main): |
|
6905 * JavaScriptCore.exp: |
|
6906 |
|
6907 2006-10-12 Kevin McCullough <KMcCullough@apple.com> |
|
6908 |
|
6909 Reviewed by Adam. |
|
6910 |
|
6911 Build breakage fix |
|
6912 |
|
6913 * kjs/DateMath.cpp: |
|
6914 (KJS::msToTM): |
|
6915 * kjs/date_object.cpp: |
|
6916 (KJS::gmtoffset): |
|
6917 |
|
6918 2006-10-11 Kevin McCullough <KMcCullough@apple.com> |
|
6919 |
|
6920 Reviewed by Geoff. |
|
6921 |
|
6922 Added our own tm struct to have a consistent set of fields, which lets us display the DST offset and timezone strings correctly. Also there is some code cleanup. |
|
6923 |
|
6924 * kjs/DateMath.cpp: |
|
6925 (KJS::timeToMS): |
|
6926 (KJS::getUTCOffset): |
|
6927 (KJS::getDSTOffsetSimple): |
|
6928 (KJS::dateToMS): |
|
6929 (KJS::msToTM): |
|
6930 (KJS::tmToKJStm): |
|
6931 (KJS::KJStmToTm): |
|
6932 * kjs/DateMath.h: |
|
6933 * kjs/date_object.cpp: |
|
6934 (KJS::gmtoffset): |
|
6935 (KJS::formatTime): |
|
6936 (KJS::DateProtoFunc::callAsFunction): |
|
6937 (KJS::DateObjectImp::construct): |
|
6938 (KJS::DateObjectImp::callAsFunction): |
|
6939 (KJS::DateObjectFuncImp::callAsFunction): |
|
6940 (KJS::parseDate): |
|
6941 * kjs/date_object.h: |
|
6942 |
|
6943 2006-10-09 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
6944 |
|
6945 Reviewed by Geoff. |
|
6946 |
|
6947 Improve gdk build compiler flags (show warning, no rtti and exceptions). |
|
6948 |
|
6949 * jscore.bkl: |
|
6950 |
|
6951 2006-10-06 Kevin McCullough <KMcCullough@apple.com> |
|
6952 |
|
6953 Reviewed by Brady. |
|
6954 |
|
6955 DST and TimeZones were wrong in some cases, specifically on some of the dates where DST changes. |
|
6956 |
|
6957 * kjs/DateMath.cpp: |
|
6958 (KJS::equivalentYearForDST): |
|
6959 (KJS::getUTCOffset): |
|
6960 (KJS::getDSTOffsetSimple): |
|
6961 (KJS::getDSTOffset): |
|
6962 (KJS::dateToMseconds): |
|
6963 (KJS::msToTM): |
|
6964 * kjs/DateMath.h: |
|
6965 * kjs/date_object.cpp: |
|
6966 (KJS::gmtoffset): |
|
6967 |
|
6968 2006-10-05 Darin Adler <darin@apple.com> |
|
6969 |
|
6970 Reviewed by Kevin McCullough. |
|
6971 |
|
6972 * wtf/Assertions.cpp: Fix build when _DEBUG is not defined. |
|
6973 |
|
6974 2006-10-04 Kevin McCullough <KMcCullough@apple.com> |
|
6975 |
|
6976 Reviewed by Adam. |
|
6977 |
|
6978 - Removed an unnecessary assert that was stopping many pages. tm_gmtoff was not set for UTC time in mozilla but is always set for us. |
|
6979 |
|
6980 * kjs/DateMath.cpp: |
|
6981 (KJS::getUTCOffset): |
|
6982 (KJS::msToTM): |
|
6983 * kjs/date_object.cpp: |
|
6984 (KJS::gmtoffset): |
|
6985 (KJS::formatTime): |
|
6986 |
|
6987 2006-10-04 Geoffrey Garen <ggaren@apple.com> |
|
6988 |
|
6989 Patch by Darin and me, reviewed by Maciej. |
|
6990 |
|
6991 Fixed <rdar://problem/4518397> REGRESSION(?): Oft-seen but unrepro crash |
|
6992 in JavaScript garbage collection (KJS::Collector::collect()) |
|
6993 <rdar://problem/4752492> Crash in KJS::collect |
|
6994 |
|
6995 The issue here was allocating one garbage-collected object in the midst |
|
6996 of allocating a second garbage-collected object. In such a case, the |
|
6997 zeroIfFree word lies. |
|
6998 |
|
6999 * kjs/collector.cpp: |
|
7000 (KJS::Collector::allocate): |
|
7001 (KJS::Collector::collect): |
|
7002 |
|
7003 2006-10-04 Kevin McCullough <KMcCullough@apple.com> |
|
7004 |
|
7005 Reviewed by Adam. |
|
7006 |
|
7007 - Layout test fix |
|
7008 |
|
7009 * kjs/DateMath.cpp: |
|
7010 (KJS::dateToDayInYear): accept and correctly handle negative months |
|
7011 |
|
7012 2006-10-05 Kevin McCullough <KMcCullough@apple.com> |
|
7013 |
|
7014 build fix |
|
7015 |
|
7016 * kjs/DateMath.cpp: |
|
7017 (KJS::dateToDayInYear): |
|
7018 |
|
7019 2006-10-05 Mark Rowe <bdash@webkit.org> |
|
7020 |
|
7021 Reviewed by maculloch. |
|
7022 |
|
7023 Gdk build fix. |
|
7024 |
|
7025 * JavaScriptCoreSources.bkl: Add DateMath.cpp to file list. |
|
7026 |
|
7027 2006-10-05 Kevin McCullough <KMcCullough@apple.com> |
|
7028 |
|
7029 Reviewed by aroben |
|
7030 |
|
7031 - build fix |
|
7032 |
|
7033 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
7034 |
|
7035 2006-10-04 Nikolas Zimmermann <zimmermann@kde.org> |
|
7036 |
|
7037 Reviewed by Mitz. |
|
7038 |
|
7039 Fix Qt/Linux build by adding DateMath.cpp to compilation. |
|
7040 |
|
7041 * CMakeLists.txt: Also replace tabs with spaces. |
|
7042 |
|
7043 2006-10-04 Kevin McCullough <KMcCullough@apple.com> |
|
7044 |
|
7045 Reviewed by DethBakin. |
|
7046 |
|
7047 - Apparently the build bot uses an older version of XCode which warns about conversions and the newest version does not. I hope this fixes the build but I cann't be sure on my system. |
|
7048 |
|
7049 * kjs/DateMath.cpp: |
|
7050 (KJS::msToYear): |
|
7051 (KJS::dayInYear): |
|
7052 (KJS::dateToDayInYear): |
|
7053 |
|
7054 2006-10-05 Darin Adler <darin@apple.com> |
|
7055 |
|
7056 Reviewed by Adam. |
|
7057 |
|
7058 * wtf/Assertions.cpp: Changed assertion formatting to omit the "======" |
|
7059 lines so you can see more assertions in less space. Also improved format |
|
7060 of file/line information so it works with more development environments. |
|
7061 |
|
7062 2006-10-04 Kevin McCullough <KMcCullough@apple.com> |
|
7063 |
|
7064 Reviewed by Tim H. |
|
7065 |
|
7066 - The build machine is more sensitive about automatic conversions. These fixes exp |
|
7067 licitly cast or change the input and return types of functions to avoid conversions. |
|
7068 |
|
7069 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
7070 * kjs/DateMath.cpp: |
|
7071 (KJS::): |
|
7072 (KJS::msToDays): |
|
7073 (KJS::msToYear): |
|
7074 (KJS::dayInYear): |
|
7075 (KJS::monthToDayInYear): |
|
7076 (KJS::dateToDayInYear): |
|
7077 (KJS::getDSTOffsetSimple): |
|
7078 (KJS::getDSTOffset): |
|
7079 (KJS::dateToMseconds): |
|
7080 (KJS::msToTM): |
|
7081 |
|
7082 2006-10-04 Kevin McCullough <KMcCullough@apple.com> |
|
7083 |
|
7084 Reviewed by GGaren |
|
7085 |
|
7086 - This is a big makeover for our Date implemenetation. This solves many platform specific issues, specifically dates before 1970, and simplifies some ugly code. The purpose of this was to get us to pass many of the JavaScriptCore tests on windows. |
|
7087 |
|
7088 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7089 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
7090 * kjs/DateMath.cpp: Added. |
|
7091 (KJS::): |
|
7092 (KJS::daysInYear): |
|
7093 (KJS::daysFrom1970ToYear): |
|
7094 (KJS::msFrom1970ToYear): |
|
7095 (KJS::msToDays): |
|
7096 (KJS::msToYear): |
|
7097 (KJS::isLeapYear): |
|
7098 (KJS::isInLeapYear): |
|
7099 (KJS::dayInYear): |
|
7100 (KJS::msToMilliseconds): |
|
7101 (KJS::msToWeekDay): |
|
7102 (KJS::msToSeconds): |
|
7103 (KJS::msToMinutes): |
|
7104 (KJS::msToHours): |
|
7105 (KJS::msToMonth): |
|
7106 (KJS::msToDayInMonth): |
|
7107 (KJS::monthToDayInYear): |
|
7108 (KJS::timeToMseconds): |
|
7109 (KJS::dateToDayInYear): |
|
7110 (KJS::equivalentYearForDST): |
|
7111 (KJS::getUTCOffset): |
|
7112 (KJS::getDSTOffsetSimple): |
|
7113 (KJS::getDSTOffset): |
|
7114 (KJS::localTimeToUTC): |
|
7115 (KJS::UTCToLocalTime): |
|
7116 (KJS::dateToMseconds): |
|
7117 (KJS::msToTM): |
|
7118 (KJS::isDST): |
|
7119 * kjs/DateMath.h: Added. |
|
7120 (KJS::): |
|
7121 * kjs/date_object.cpp: |
|
7122 (KJS::gmtoffset): |
|
7123 (KJS::formatTime): |
|
7124 (KJS::DateInstance::getTime): |
|
7125 (KJS::DateInstance::getUTCTime): |
|
7126 (KJS::DateProtoFunc::callAsFunction): |
|
7127 (KJS::DateObjectImp::construct): |
|
7128 (KJS::DateObjectFuncImp::callAsFunction): |
|
7129 (KJS::parseDate): |
|
7130 * kjs/testkjs.cpp: |
|
7131 * os-win32/stdint.h: |
|
7132 |
|
7133 2006-10-02 Nikolas Zimmermann <zimmermann@kde.org> |
|
7134 |
|
7135 Reviewed/landed by Adam. |
|
7136 |
|
7137 Build testkjs on Qt/Linux. |
|
7138 |
|
7139 * CMakeLists.txt: |
|
7140 |
|
7141 2006-10-02 Nikolas Zimmermann <zimmermann@kde.org> |
|
7142 |
|
7143 Reviewed by eseidel. Landed by eseidel. |
|
7144 |
|
7145 Fix win32 build, which has no inttypes.h |
|
7146 |
|
7147 * wtf/Assertions.h: |
|
7148 |
|
7149 2006-10-02 Nikolas Zimmermann <zimmermann@kde.org> |
|
7150 |
|
7151 Reviewed by eseidel & mjs. Landed by eseidel. |
|
7152 |
|
7153 Fix Qt/Linux build with older gcc 3.3.4. |
|
7154 http://bugs.webkit.org/show_bug.cgi?id=11116 |
|
7155 |
|
7156 * kjs/lookup.h: Move cacheGlobalObject into KJS namespace. |
|
7157 (KJS::cacheGlobalObject): Also remove GCC_ROOT_NS_HACK. |
|
7158 * wtf/Assertions.h: Include inttypes.h for uintptr_t. |
|
7159 |
|
7160 2006-09-28 Steve Falkenburg <sfalken@apple.com> |
|
7161 |
|
7162 Reviewed by Maciej. |
|
7163 |
|
7164 Use $(ConfigSuffix) set via vsprops files to add _debug |
|
7165 to end of debug filenames. |
|
7166 |
|
7167 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7168 * JavaScriptCore.vcproj/debug.vsprops: Added. |
|
7169 * JavaScriptCore.vcproj/dftables/dftables.vcproj: |
|
7170 * JavaScriptCore.vcproj/release.vsprops: Added. |
|
7171 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: |
|
7172 |
|
7173 2006-09-28 Darin Adler <darin@apple.com> |
|
7174 |
|
7175 Reviewed by Alice. |
|
7176 |
|
7177 - support for change that should fix <rdar://problem/4733044> |
|
7178 REGRESSION: XML iBench shows 10% perf. regression (copying |
|
7179 strings while decoding) |
|
7180 |
|
7181 * wtf/Vector.h: Changed VectorBuffer so that the general case |
|
7182 contains an instance of the 0 case, since deriving from it |
|
7183 was violating the Liskov Substitution Principle. |
|
7184 (WTF::VectorBuffer::releaseBuffer): Added. Releases the buffer so it can |
|
7185 be adopted by another data structure that uses the FastMalloc.h allocator. |
|
7186 Returns 0 if the internal buffer was being used. |
|
7187 (WTF::Vector::releaseBuffer): Added. Releases the buffer as above or creates |
|
7188 a new one in the case where the internal buffer was being used. |
|
7189 |
|
7190 2006-09-28 Maciej Stachowiak <mjs@apple.com> |
|
7191 |
|
7192 Reviewed by Geoff. |
|
7193 |
|
7194 - change garbage collection to happen at increments proportional to number of live objects, not always |
|
7195 every 1000 allocations |
|
7196 |
|
7197 * kjs/collector.cpp: |
|
7198 (KJS::Collector::allocate): |
|
7199 |
|
7200 2006-09-28 Maciej Stachowiak <mjs@apple.com> |
|
7201 |
|
7202 Reviewed by Mitz. |
|
7203 |
|
7204 - fixed REGRESSION (r16606): javascriptCore Crash on website load |
|
7205 |
|
7206 Plus style fixes. |
|
7207 |
|
7208 - fixed some possible off-by-one bugs |
|
7209 - use indexing, not iterators, for Vectors |
|
7210 - store Vector by pointer instead of by value to avoid blowing out FunctionImp size |
|
7211 |
|
7212 * kjs/function.cpp: |
|
7213 (KJS::FunctionImp::addParameter): |
|
7214 (KJS::FunctionImp::parameterString): |
|
7215 (KJS::FunctionImp::processParameters): |
|
7216 (KJS::FunctionImp::lengthGetter): |
|
7217 (KJS::FunctionImp::getParameterName): |
|
7218 * kjs/function.h: |
|
7219 |
|
7220 2006-09-27 Steve Falkenburg <sfalken@apple.com> |
|
7221 |
|
7222 Reviewed by Maciej. |
|
7223 |
|
7224 More build tweaks |
|
7225 |
|
7226 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7227 * JavaScriptCore.vcproj/JavaScriptCore/dstroot-to-sdk.cmd: Removed. |
|
7228 |
|
7229 2006-09-27 John Sullivan <sullivan@apple.com> |
|
7230 |
|
7231 * kjs/function.cpp: |
|
7232 (KJS::FunctionImp::getParameterName): |
|
7233 removed assertion that displeased gcc 4.0.1 (build 5420): |
|
7234 ASSERT(static_cast<size_t>(index) == index); |
|
7235 |
|
7236 2006-09-27 Kevin McCullough <KMcCullough@apple.com> |
|
7237 |
|
7238 Reviewed by GGaren. |
|
7239 |
|
7240 Cleanup of previous fix which was to address Radar: 4752492 |
|
7241 |
|
7242 * kjs/function.cpp: |
|
7243 (KJS::FunctionImp::addParameter): |
|
7244 (KJS::FunctionImp::parameterString): |
|
7245 (KJS::FunctionImp::processParameters): |
|
7246 (KJS::FunctionImp::lengthGetter): |
|
7247 (KJS::FunctionImp::getParameterName): |
|
7248 * kjs/function.h: |
|
7249 |
|
7250 2006-09-27 Kevin McCullough <KMcCullough@apple.com> |
|
7251 |
|
7252 Reviewed by Adele. |
|
7253 |
|
7254 Fixes a GC stack overflow crash. |
|
7255 The change is to move from a linked list implementation of Parameters to a Vector. |
|
7256 The problem with the linked list is that each one creates it's own stack frame when being destroyed and in extreme cases this caused the stack to overflow. |
|
7257 |
|
7258 * kjs/function.cpp: |
|
7259 (KJS::Parameter::Parameter): |
|
7260 (KJS::FunctionImp::addParameter): |
|
7261 (KJS::FunctionImp::parameterString): |
|
7262 (KJS::FunctionImp::processParameters): |
|
7263 (KJS::FunctionImp::lengthGetter): |
|
7264 (KJS::FunctionImp::getParameterName): |
|
7265 * kjs/function.h: |
|
7266 |
|
7267 2006-09-27 Steve Falkenburg <sfalken@apple.com> |
|
7268 |
|
7269 Fix last path fix. |
|
7270 |
|
7271 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7272 |
|
7273 2006-09-27 Steve Falkenburg <sfalken@apple.com> |
|
7274 |
|
7275 Set path before build. |
|
7276 |
|
7277 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7278 |
|
7279 2006-09-27 Sean Gies <seangies@apple.com> |
|
7280 |
|
7281 Reviewed by Adam Roben. |
|
7282 |
|
7283 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Debug config should link to debug runtime. |
|
7284 * JavaScriptCore.vcproj/dftables/dftables.vcproj: Debug config should link to debug runtime. |
|
7285 |
|
7286 2006-09-27 Don Melton <gramps@apple.com> |
|
7287 |
|
7288 Reviewed by Adam Roben. |
|
7289 |
|
7290 Changed line ending from DOS to UNIX format so it doesn't die running |
|
7291 on my machine. ;) |
|
7292 |
|
7293 * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: |
|
7294 |
|
7295 2006-09-23 Alexey Proskuryakov <ap@nypop.com> |
|
7296 |
|
7297 Reviewed by Maciej. |
|
7298 |
|
7299 http://bugs.webkit.org/show_bug.cgi?id=10183 |
|
7300 REGRESSION: obfuscated JS decoding breaks because of soft hyphen removal |
|
7301 (Fanfiction.net author pages not listing stories) |
|
7302 |
|
7303 Rolled out the fix for bug 4139. |
|
7304 |
|
7305 * kjs/lexer.cpp: |
|
7306 (Lexer::setCode): |
|
7307 (Lexer::shift): |
|
7308 * tests/mozilla/ecma/Array/15.4.5.1-1.js: |
|
7309 * tests/mozilla/expected.html: |
|
7310 |
|
7311 2006-09-22 Steve Falkenburg <sfalken@apple.com> |
|
7312 |
|
7313 Build fix. |
|
7314 |
|
7315 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7316 |
|
7317 2006-09-22 Darin Adler <darin@apple.com> |
|
7318 |
|
7319 Reviewed by Alice. |
|
7320 |
|
7321 * wtf/Vector.h: Add an append that takes a pointer and length. |
|
7322 Generalize the existing Vector append to work on vectors with |
|
7323 any value for inlineCapacity. Change the append algorithm so |
|
7324 it doesn't check capacity each time through the loop. |
|
7325 |
|
7326 2006-09-22 Steve Falkenburg <sfalken@apple.com> |
|
7327 |
|
7328 Fix release build. |
|
7329 |
|
7330 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7331 |
|
7332 2006-09-21 Geoffrey Garen <ggaren@apple.com> |
|
7333 |
|
7334 Reviewed by Maciej. |
|
7335 |
|
7336 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7337 Updated to include the right path. |
|
7338 * wtf/FastMalloc.h: #include Platform.h, since we use Platform macros. |
|
7339 |
|
7340 === Safari-521.27 === |
|
7341 |
|
7342 2006-09-20 Anders Carlsson <acarlsson@apple.com> |
|
7343 |
|
7344 Reviewed by Dave Hyatt. |
|
7345 |
|
7346 * wtf/MathExtras.h: |
|
7347 Get rid of lrint. |
|
7348 |
|
7349 2006-09-20 Sean Gies <seangies@apple.com> |
|
7350 |
|
7351 Reviewed by Steve Falkenburg. |
|
7352 |
|
7353 * wtf/Assertions.cpp: Debug messages should go into debugger console. |
|
7354 |
|
7355 2006-09-20 David Hyatt <hyatt@apple.com> |
|
7356 |
|
7357 Add an implementation of lrint for Win32. |
|
7358 |
|
7359 Reviewed by anders |
|
7360 |
|
7361 * wtf/MathExtras.h: |
|
7362 (lrint): |
|
7363 |
|
7364 2006-09-15 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
7365 |
|
7366 Reviewed by Adam. |
|
7367 |
|
7368 http://bugs.webkit.org/show_bug.cgi?id=10864 |
|
7369 Bug 10864: Linux\GDK build fixes |
|
7370 |
|
7371 * JavaScriptCoreSources.bkl: |
|
7372 * jscore.bkl: |
|
7373 |
|
7374 2006-09-15 Adam Roben <aroben@apple.com> |
|
7375 |
|
7376 Windows build fix. |
|
7377 |
|
7378 * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: |
|
7379 |
|
7380 2006-09-15 Anders Carlsson <acarlsson@apple.com> |
|
7381 |
|
7382 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7383 Fix the release build. |
|
7384 |
|
7385 2006-09-15 Anders Carlsson <acarlsson@apple.com> |
|
7386 |
|
7387 Reviewed by Steve. |
|
7388 |
|
7389 Add JavaScriptCore API to the build. |
|
7390 * API/JSBase.cpp: |
|
7391 * API/JSCallbackConstructor.cpp: |
|
7392 * API/JSCallbackFunction.cpp: |
|
7393 * API/JSCallbackObject.cpp: |
|
7394 * API/JSClassRef.cpp: |
|
7395 * API/JSContextRef.cpp: |
|
7396 * API/JSObjectRef.cpp: |
|
7397 * API/JSStringRef.cpp: |
|
7398 * API/JSValueRef.cpp: |
|
7399 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7400 * os-win32/stdbool.h: Added. |
|
7401 |
|
7402 2006-09-12 Steve Falkenburg <sfalken@apple.com> |
|
7403 |
|
7404 Reviewed by Ada. |
|
7405 |
|
7406 Build tweaks (doing JavaScriptCore now since it doesn't have |
|
7407 dependencies). |
|
7408 |
|
7409 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7410 * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: |
|
7411 * JavaScriptCore.vcproj/JavaScriptCore/dstroot-to-sdk.cmd: Added. |
|
7412 * JavaScriptCore.vcproj/dftables/dftables.vcproj: |
|
7413 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: |
|
7414 |
|
7415 2006-09-11 Brady Eidson <beidson@apple.com> |
|
7416 |
|
7417 Build fix - I think Tim's last checkin wasn't tested on Tiger, possibly. I simply |
|
7418 commented out the undefined constants until he can have a chance to make the right call |
|
7419 |
|
7420 * bindings/objc/objc_utility.mm: |
|
7421 (KJS::Bindings::objcValueTypeForType): Commented out undefined symbols |
|
7422 |
|
7423 2006-09-11 Timothy Hatcher <timothy@apple.com> |
|
7424 |
|
7425 Reviewed by Tim O. and Darin. |
|
7426 |
|
7427 Add support for more method signatures affecting ObjC methods called from JavaScript: |
|
7428 - Added unsigned types and long long. |
|
7429 - Allow methods that use const, oneway, bycopy and byref type modifiers. |
|
7430 |
|
7431 * bindings/objc/objc_instance.mm: |
|
7432 (ObjcInstance::invokeMethod): |
|
7433 * bindings/objc/objc_utility.h: |
|
7434 (KJS::Bindings::): |
|
7435 * bindings/objc/objc_utility.mm: |
|
7436 (KJS::Bindings::convertValueToObjcValue): |
|
7437 (KJS::Bindings::convertObjcValueToValue): |
|
7438 (KJS::Bindings::objcValueTypeForType): |
|
7439 |
|
7440 2006-09-05 Timothy Hatcher <timothy@apple.com> |
|
7441 |
|
7442 Reviewed by Tim O. |
|
7443 |
|
7444 <rdar://problem/4715840> SEL is not char* |
|
7445 |
|
7446 * bindings/objc/objc_class.mm: |
|
7447 (KJS::Bindings::ObjcClass::methodsNamed): use sel_getName instead of a char* cast. |
|
7448 * bindings/objc/objc_runtime.mm: |
|
7449 (ObjcFallbackObjectImp::callAsFunction): ditto |
|
7450 |
|
7451 2006-09-03 Alexey Proskuryakov <ap@nypop.com> |
|
7452 |
|
7453 Reviewed by Tim H. |
|
7454 |
|
7455 http://bugs.webkit.org/show_bug.cgi?id=10693 |
|
7456 Convert JavaScript arrays to AppleScript lists |
|
7457 |
|
7458 * JavaScriptCore.exp: Export ArrayInstance::info and ArrayInstance::getItem(). |
|
7459 * kjs/array_instance.h: |
|
7460 * kjs/array_object.cpp: |
|
7461 (ArrayInstance::getItem): Added a method to access array items from C++. |
|
7462 |
|
7463 2006-09-02 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
7464 |
|
7465 Reviewed by Tim H. |
|
7466 |
|
7467 Bug 10454: Unix bakefile fixes |
|
7468 http://bugs.webkit.org/show_bug.cgi?id=10454 |
|
7469 |
|
7470 * JavaScriptCoreSources.bkl: |
|
7471 |
|
7472 2006-09-01 Nikolas Zimmermann <zimmermann@kde.org> |
|
7473 |
|
7474 Reviewed by hyatt. Landed by eseidel. |
|
7475 |
|
7476 Fix build on Linux. |
|
7477 |
|
7478 * pcre/CMakeLists.txt: Add wtf/ include. |
|
7479 |
|
7480 2006-09-01 Nikolas Zimmermann <zimmermann@kde.org> |
|
7481 |
|
7482 Reviewed and landed by ap. |
|
7483 |
|
7484 Fix build on Linux (C89 without gcc extensions enabled). |
|
7485 |
|
7486 * pcre/pcre_internal.h: Use C style comments. |
|
7487 * wtf/Assertions.h: Use C style comments. |
|
7488 * wtf/Platform.h: Use C style comments. |
|
7489 |
|
7490 2006-09-01 Steve Falkenburg <sfalken@apple.com> |
|
7491 |
|
7492 Fix build. |
|
7493 |
|
7494 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7495 * JavaScriptCore.vcproj/dftables/dftables.vcproj: |
|
7496 |
|
7497 2006-08-31 Anders Carlsson <acarlsson@apple.com> |
|
7498 |
|
7499 Reviewed by Darin. |
|
7500 |
|
7501 Add new portability functions to MathExtras.h and add StringExtras.h which is for |
|
7502 string portability functions. |
|
7503 |
|
7504 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7505 * bindings/c/c_instance.cpp: |
|
7506 * kjs/date_object.cpp: |
|
7507 * wtf/MathExtras.h: |
|
7508 (copysign): |
|
7509 (isfinite): |
|
7510 * wtf/StringExtras.h: Added. |
|
7511 (snprintf): |
|
7512 (strncasecmp): |
|
7513 |
|
7514 2006-08-31 Anders Carlsson <acarlsson@apple.com> |
|
7515 |
|
7516 Reviewed by Tim H. |
|
7517 |
|
7518 Fix Windows build. |
|
7519 |
|
7520 * JavaScriptCore.vcproj/dftables/dftables.vcproj: |
|
7521 * pcre/pcre_internal.h: |
|
7522 |
|
7523 2006-08-31 Timothy Hatcher <timothy@apple.com> |
|
7524 |
|
7525 Reviewed by Geoff. |
|
7526 |
|
7527 Band-aid fix for PCRE to compile for ppc64 and x86_64 now that |
|
7528 we use -Wshorten-64-to-32. Adds an INT_CAST macro that ASSERTs |
|
7529 the value <= INT_MAX. |
|
7530 |
|
7531 I filed <rdar://problem/4712064> to track the need to verify |
|
7532 PCRE's 64-bit compliance. |
|
7533 |
|
7534 * pcre/pcre_compile.c: |
|
7535 (complete_callout): |
|
7536 (compile_branch): |
|
7537 (compile_regex): |
|
7538 (pcre_compile2): |
|
7539 * pcre/pcre_exec.c: |
|
7540 (match): |
|
7541 (pcre_exec): |
|
7542 * pcre/pcre_get.c: |
|
7543 (pcre_get_substring_list): |
|
7544 * pcre/pcre_internal.h: |
|
7545 * pcre/pcre_tables.c: |
|
7546 * pcre/pcre_try_flipped.c: |
|
7547 (_pcre_try_flipped): |
|
7548 |
|
7549 2006-08-30 Darin Adler <darin@apple.com> |
|
7550 |
|
7551 Reviewed by Tim Hatcher. |
|
7552 |
|
7553 - add WTF::getPtr, a function template that makes it possible to write |
|
7554 generic code that gets a raw pointer out of any of our pointer types |
|
7555 |
|
7556 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
7557 * wtf/GetPtr.h: Added. |
|
7558 * wtf/ListRefPtr.h: (WTF::getPtr): Added. |
|
7559 * wtf/OwnArrayPtr.h: (WTF::getPtr): Added. |
|
7560 * wtf/OwnPtr.h: (WTF::getPtr): Added. |
|
7561 * wtf/PassRefPtr.h: (WTF::getPtr): Added. |
|
7562 * wtf/RefPtr.h: (WTF::getPtr): Added. |
|
7563 |
|
7564 2006-08-29 waylonis <waylonis@google.com> |
|
7565 |
|
7566 Reviewed, tweaked by ggaren. |
|
7567 |
|
7568 - Added storage and accessor functions for ExecState as a fix for |
|
7569 http://bugs.webkit.org/show_bug.cgi?id=10114 |
|
7570 |
|
7571 * kjs/ExecState.cpp: |
|
7572 (KJS::ExecState::ExecState): |
|
7573 * kjs/ExecState.h: |
|
7574 * kjs/context.h: |
|
7575 (KJS::Context::setExecState): |
|
7576 (KJS::Context::execState): |
|
7577 |
|
7578 2006-08-30 Nikolas Zimmermann <zimmermann@kde.org> |
|
7579 |
|
7580 Reviewed by Tim H. |
|
7581 |
|
7582 Commit KDE related tweaks, to be able to |
|
7583 differentiate between a Qt-only or a KDE build. |
|
7584 |
|
7585 * CMakeLists.txt: Install wtf-unity library. |
|
7586 * wtf/Platform.h: Add define for the KDE platform. |
|
7587 |
|
7588 2006-08-28 Darin Adler <darin@apple.com> |
|
7589 |
|
7590 Reviewed by Geoff. |
|
7591 |
|
7592 * kjs/list.h: Use explicit in constructor (as appropriate). |
|
7593 |
|
7594 2006-08-24 Nikolas Zimmermann <zimmermann@kde.org> |
|
7595 |
|
7596 Reviewed, tweaked and landed by ap |
|
7597 |
|
7598 http://bugs.webkit.org/show_bug.cgi?id=10467 |
|
7599 WebKit should have Qt platform support (Part II) |
|
7600 |
|
7601 * CMakeLists.txt: Adjust to Anders' build fixes. |
|
7602 * wtf/Platform.h: Fix define for the Qt platform (we don't use/need Cairo.) |
|
7603 |
|
7604 2006-08-23 David Hyatt <hyatt@apple.com> |
|
7605 |
|
7606 Fix Platform.h to include #defines for graphics features. |
|
7607 |
|
7608 Reviewed by darin |
|
7609 |
|
7610 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7611 * wtf/Platform.h: |
|
7612 |
|
7613 2006-08-23 Anders Carlsson <acarlsson@apple.com> |
|
7614 |
|
7615 Reviewed by Darin. |
|
7616 |
|
7617 Make the bindings compile without CoreFoundation. |
|
7618 |
|
7619 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7620 * bindings/c/c_instance.cpp: |
|
7621 * bindings/c/c_utility.cpp: |
|
7622 (KJS::Bindings::convertUTF8ToUTF16): |
|
7623 * bindings/npapi.h: |
|
7624 * bindings/runtime.cpp: |
|
7625 (KJS::Bindings::Instance::createBindingForLanguageInstance): |
|
7626 (KJS::Bindings::Instance::createLanguageInstanceForValue): |
|
7627 * bindings/runtime_root.cpp: |
|
7628 * bindings/runtime_root.h: |
|
7629 * kjs/interpreter.cpp: |
|
7630 (KJS::Interpreter::createLanguageInstanceForValue): |
|
7631 * kjs/interpreter.h: |
|
7632 |
|
7633 2006-08-22 Anders Carlsson <acarlsson@apple.com> |
|
7634 |
|
7635 Reviewed by Darin. |
|
7636 |
|
7637 Move the npruntime code over to using HashMap and the runtime_root code over to using |
|
7638 HashMap and HashCountedSet. |
|
7639 |
|
7640 * bindings/NP_jsobject.cpp: |
|
7641 * bindings/c/c_utility.cpp: |
|
7642 (KJS::Bindings::identifierFromNPIdentifier): |
|
7643 * bindings/c/c_utility.h: |
|
7644 * bindings/jni/jni_jsobject.cpp: |
|
7645 (JavaJSObject::invoke): |
|
7646 * bindings/npruntime.cpp: |
|
7647 (getStringIdentifierMap): |
|
7648 (getIntIdentifierMap): |
|
7649 (_NPN_GetStringIdentifier): |
|
7650 (_NPN_GetIntIdentifier): |
|
7651 * bindings/runtime_root.cpp: |
|
7652 (getReferencesByRootMap): |
|
7653 (getReferencesSet): |
|
7654 (KJS::Bindings::findReferenceSet): |
|
7655 (KJS::Bindings::rootForImp): |
|
7656 (KJS::Bindings::rootForInterpreter): |
|
7657 (KJS::Bindings::addNativeReference): |
|
7658 (KJS::Bindings::removeNativeReference): |
|
7659 (RootObject::removeAllNativeReferences): |
|
7660 * bindings/runtime_root.h: |
|
7661 |
|
7662 2006-08-22 Anders Carlsson <acarlsson@apple.com> |
|
7663 |
|
7664 Reviewed by Geoff. |
|
7665 |
|
7666 Switch over the NPAPI and Java bindings to using HashMaps instead of dictionaries. |
|
7667 |
|
7668 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
7669 * bindings/c/c_class.cpp: |
|
7670 (KJS::Bindings::CClass::CClass): |
|
7671 (KJS::Bindings::CClass::~CClass): |
|
7672 (KJS::Bindings::CClass::classForIsA): |
|
7673 (KJS::Bindings::CClass::methodsNamed): |
|
7674 (KJS::Bindings::CClass::fieldNamed): |
|
7675 * bindings/c/c_class.h: |
|
7676 * bindings/jni/jni_class.cpp: |
|
7677 (JavaClass::JavaClass): |
|
7678 (JavaClass::~JavaClass): |
|
7679 (JavaClass::methodsNamed): |
|
7680 (JavaClass::fieldNamed): |
|
7681 * bindings/jni/jni_class.h: |
|
7682 * bindings/objc/objc_class.h: |
|
7683 * bindings/objc/objc_class.mm: |
|
7684 (KJS::Bindings::deleteMethod): |
|
7685 (KJS::Bindings::deleteField): |
|
7686 (KJS::Bindings::): |
|
7687 (KJS::Bindings::ObjcClass::methodsNamed): |
|
7688 (KJS::Bindings::ObjcClass::fieldNamed): |
|
7689 * bindings/runtime.cpp: |
|
7690 * bindings/runtime.h: |
|
7691 * bindings/runtime_object.cpp: |
|
7692 (RuntimeObjectImp::fieldGetter): |
|
7693 (RuntimeObjectImp::getOwnPropertySlot): |
|
7694 (RuntimeObjectImp::put): |
|
7695 (RuntimeObjectImp::canPut): |
|
7696 |
|
7697 2006-08-21 Vladimir Olexa <vladimir.olexa@gmail.com> |
|
7698 |
|
7699 Reviewed by Darin. |
|
7700 |
|
7701 http://bugs.webkit.org/show_bug.cgi?id=6252 |
|
7702 JavaScript 1.6 Array.lastIndexOf |
|
7703 |
|
7704 Test: fast/js/array-lastIndexOf.html |
|
7705 |
|
7706 * kjs/array_object.cpp: |
|
7707 (ArrayProtoFunc::callAsFunction): Added a LastIndexOf case. |
|
7708 * kjs/array_object.h: |
|
7709 (KJS::ArrayProtoFunc::): Added LastIndexOf to enum. |
|
7710 * tests/mozilla/expected.html: Two more tests now pass. |
|
7711 |
|
7712 2006-08-20 Nikolas Zimmermann <zimmermann@kde.org> |
|
7713 |
|
7714 Reviewed by Maciej. Landed by rwlbuis. |
|
7715 |
|
7716 Fixes parts of: http://bugs.webkit.org/show_bug.cgi?id=10463 |
|
7717 WebKit should have Qt platform support |
|
7718 |
|
7719 Removing obsolete QConstString/QString constructors in kjs code. |
|
7720 |
|
7721 * kjs/identifier.h: |
|
7722 * kjs/ustring.h: |
|
7723 |
|
7724 2006-08-17 Nikolas Zimmermann <zimmermann@kde.org> |
|
7725 |
|
7726 Reviewed by Maciej. Landed by rwlbuis. |
|
7727 |
|
7728 Fixes: http://bugs.webkit.org/show_bug.cgi?id=10463 |
|
7729 WTF Changes needed for Qt platform code. |
|
7730 |
|
7731 * wtf/Platform.h: |
|
7732 * wtf/unicode/UnicodeDecomposition.h: Added. |
|
7733 (WTF::Unicode::): |
|
7734 * wtf/unicode/UnicodeDirection.h: Added. |
|
7735 (WTF::Unicode::): |
|
7736 * wtf/unicode/qt4/UnicodeQt4.cpp: Added. |
|
7737 (WTF::Unicode::direction): |
|
7738 (WTF::Unicode::category): |
|
7739 (WTF::Unicode::decomposition): |
|
7740 * wtf/unicode/qt4/UnicodeQt4.h: |
|
7741 (WTF::Unicode::toLower): |
|
7742 (WTF::Unicode::toUpper): |
|
7743 (WTF::Unicode::isPrintableChar): |
|
7744 (WTF::Unicode::isSpace): |
|
7745 (WTF::Unicode::isPunct): |
|
7746 (WTF::Unicode::isDigit): |
|
7747 (WTF::Unicode::mirroredChar): |
|
7748 (WTF::Unicode::compare): |
|
7749 |
|
7750 2006-08-17 Nikolas Zimmermann <zimmermann@kde.org> |
|
7751 |
|
7752 Reviewed by Eric. Landed by rwlbuis. |
|
7753 |
|
7754 Fixes: http://bugs.webkit.org/show_bug.cgi?id=10464 |
|
7755 Offer a cmake build system for Qt platform. |
|
7756 |
|
7757 * CMakeLists.txt: Added. |
|
7758 * pcre/CMakeLists.txt: Added. |
|
7759 |
|
7760 2006-08-17 Anders Carlsson <acarlsson@apple.com> |
|
7761 |
|
7762 Reviewed by Maciej. |
|
7763 |
|
7764 * bindings/npapi.h: |
|
7765 Fix ifdef. |
|
7766 |
|
7767 2006-08-15 Steve Falkenburg <sfalken@apple.com> |
|
7768 |
|
7769 Reviewed by mjs. |
|
7770 |
|
7771 Build fix. |
|
7772 |
|
7773 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7774 * wtf/Assertions.h: |
|
7775 |
|
7776 2006-08-15 Mark Rowe <opendarwin.org@bdash.net.nz> |
|
7777 |
|
7778 Reviewed by Tim H. |
|
7779 |
|
7780 Build fix: DWARF and -gfull are incompatible with symbol separation. |
|
7781 |
|
7782 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
7783 |
|
7784 2006-08-15 Mark Rowe <opendarwin.org@bdash.net.nz> |
|
7785 |
|
7786 Reviewed by Tim H. |
|
7787 |
|
7788 http://bugs.webkit.org/show_bug.cgi?id=10394 |
|
7789 Bug 10394: WebKit Release and Production configurations should enable dead code stripping |
|
7790 |
|
7791 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
7792 |
|
7793 2006-08-15 Mark Rowe <opendarwin.org@bdash.net.nz> |
|
7794 |
|
7795 Reviewed by Tim H. |
|
7796 |
|
7797 http://bugs.webkit.org/show_bug.cgi?id=10384 |
|
7798 Bug 10384: Switch to DWARF for Release configuration |
|
7799 |
|
7800 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
7801 |
|
7802 2006-08-13 Maks Orlovich <maksim@kde.org> |
|
7803 |
|
7804 Reviewed (and tweaked a little) by Maciej. |
|
7805 |
|
7806 - shrank the size of JSObject by 8 bytes and made the corresponding reduction to the cell size, resulting |
|
7807 in a 1.2% speed improvement on JS iBench (and probably overall memory savings). |
|
7808 |
|
7809 This was done by removing _scope and _internalValue data members |
|
7810 from JSObject and moving them only to the subclasses that actually |
|
7811 make use of them. |
|
7812 |
|
7813 * kjs/object.cpp: |
|
7814 (KJS::JSObject::mark): No need to mark scope or internal value here. |
|
7815 * kjs/object.h: |
|
7816 (KJS::JSObject::JSObject): Don't initialize them. |
|
7817 * kjs/JSWrapperObject.cpp: Added. New base class for object types that |
|
7818 wrap primitive values (Number, String, Boolean, Date). |
|
7819 (KJS::JSWrapperObject::mark): |
|
7820 * kjs/JSWrapperObject.h: Added. |
|
7821 (KJS::JSWrapperObject::JSWrapperObject): |
|
7822 (KJS::JSWrapperObject::internalValue): |
|
7823 (KJS::JSWrapperObject::setInternalValue): |
|
7824 * kjs/array_object.cpp: |
|
7825 (ArrayPrototype::ArrayPrototype): Don't set useless internal value. |
|
7826 * kjs/bool_object.cpp: |
|
7827 (BooleanInstance::BooleanInstance): Inherit from JSWrapperObject. |
|
7828 (BooleanProtoFunc::callAsFunction): Fixed to account for fact that not all |
|
7829 JSObjects have an internal value. |
|
7830 (BooleanObjectImp::construct): ditto. |
|
7831 * kjs/bool_object.h: |
|
7832 * kjs/collector.cpp: Lowered cell size to 48. |
|
7833 (KJS::Collector::allocate): meaningless whitespace change |
|
7834 * kjs/date_object.cpp: |
|
7835 (KJS::DateInstance::DateInstance): Inherit from JSWrapperObject. |
|
7836 (KJS::DateProtoFunc::callAsFunction): adjusted for move of internalValue |
|
7837 (KJS::DateObjectImp::construct): ditto |
|
7838 * kjs/date_object.h: |
|
7839 * kjs/error_object.cpp: |
|
7840 (ErrorPrototype::ErrorPrototype): don't set internal value |
|
7841 * kjs/function.cpp: move _scope and related handling here |
|
7842 (KJS::FunctionImp::mark): mark scope |
|
7843 * kjs/function.h: |
|
7844 (KJS::FunctionImp::scope): moved here from JSObject |
|
7845 (KJS::FunctionImp::setScope): ditto |
|
7846 * kjs/number_object.cpp: |
|
7847 (NumberInstance::NumberInstance): inherit from JSWrapperObject |
|
7848 (NumberProtoFunc::callAsFunction): adjusted |
|
7849 (NumberObjectImp::construct): adjusted |
|
7850 * kjs/number_object.h: shring RegExp-related objects a little |
|
7851 * kjs/regexp_object.cpp: |
|
7852 (RegExpPrototype::RegExpPrototype): Adjust for size tweaks |
|
7853 (RegExpObjectImp::RegExpObjectImp): ditto |
|
7854 * kjs/regexp_object.h: |
|
7855 * kjs/string_object.cpp: |
|
7856 (StringInstance::StringInstance): inherit from JSWrapperObject |
|
7857 (StringProtoFunc::callAsFunction): adjusted |
|
7858 * kjs/string_object.h: |
|
7859 * JavaScriptCore.exp: Exported new methods as needed. |
|
7860 * JavaScriptCore.xcodeproj/project.pbxproj: Added new files to build. |
|
7861 |
|
7862 2006-08-04 Brady Eidson <beidson@apple.com> |
|
7863 |
|
7864 Reviewed by Geoff's rubber stamp |
|
7865 |
|
7866 Fix a build break on Intel hardware causes by adapting stricter |
|
7867 compiler warnings (-Wshorten-64-to-32) |
|
7868 |
|
7869 * API/testapi.c: |
|
7870 (assertEqualsAsNumber): manually cast some doubles to floats |
|
7871 (main): ditto |
|
7872 |
|
7873 2006-08-04 Sam Weinig <sam.weinig@gmail.com> |
|
7874 |
|
7875 Reviewed by Darin. |
|
7876 |
|
7877 - patch for http://bugs.webkit.org/show_bug.cgi?id=10192 |
|
7878 Make WebCore (and friends) compile with -Wshorten-64-to-32 |
|
7879 |
|
7880 * Adds -Wshorten-64-to-32 flag to Xcode project. |
|
7881 * Adds explicit casts where OK. |
|
7882 |
|
7883 * API/JSNodeList.c: |
|
7884 (JSNodeList_item): |
|
7885 (JSNodeList_getProperty): |
|
7886 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
7887 |
|
7888 2006-08-04 Adam Roben <aroben@apple.com> |
|
7889 |
|
7890 Reviewed by Anders. |
|
7891 |
|
7892 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Convert |
|
7893 spaces to tabs |
|
7894 |
|
7895 2006-08-03 Sam Weinig <sam.weinig@gmail.com> |
|
7896 |
|
7897 Reviewed by Darin. |
|
7898 |
|
7899 - patch for http://bugs.webkit.org/show_bug.cgi?id=10176 |
|
7900 Make WebCore compile with -Wundef |
|
7901 |
|
7902 * Adds -Wundef flag to Xcode project |
|
7903 * Converts #ifs to #ifdef and #ifndefs where needed. |
|
7904 * Added #define YYMAXDEPTH 10000 in kjs/grammar.y |
|
7905 to fix a warning from within Bison. |
|
7906 |
|
7907 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
7908 * bindings/jni/jni_jsobject.cpp: |
|
7909 (JavaJSObject::getSlot): |
|
7910 (JavaJSObject::setSlot): |
|
7911 * bindings/npapi.h: |
|
7912 * bindings/objc/objc_class.mm: |
|
7913 (KJS::Bindings::ObjcClass::methodsNamed): |
|
7914 (KJS::Bindings::ObjcClass::fieldNamed): |
|
7915 * bindings/objc/objc_instance.mm: |
|
7916 (ObjcInstance::invokeMethod): |
|
7917 * bindings/objc/objc_runtime.mm: |
|
7918 (ObjcMethod::getMethodSignature): |
|
7919 (ObjcField::name): |
|
7920 (ObjcField::type): |
|
7921 * kjs/grammar.y: |
|
7922 * kjs/identifier.h: |
|
7923 |
|
7924 2006-08-03 Anders Carlsson <acarlsson@apple.com> |
|
7925 |
|
7926 Reviewed by John Sullivan. |
|
7927 |
|
7928 * wtf/HashSet.h: |
|
7929 (WTF::::operator): |
|
7930 Return *this in operator= |
|
7931 |
|
7932 2006-08-03 Adam Roben <aroben@apple.com> |
|
7933 |
|
7934 Reviewed by Anders. |
|
7935 |
|
7936 - Fixed Windows build |
|
7937 |
|
7938 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
7939 * wtf/MathExtras.h: Implement inline versions of these functions |
|
7940 (nextafter): |
|
7941 (nextafterf): |
|
7942 |
|
7943 2006-08-02 Adam Roben <aroben@apple.com> |
|
7944 |
|
7945 Reviewed by Darin. |
|
7946 |
|
7947 - Fixed build |
|
7948 |
|
7949 * kjs/date_object.cpp: |
|
7950 (KJS::formatTime): |
|
7951 |
|
7952 2006-07-29 Darin Adler <darin@apple.com> |
|
7953 |
|
7954 - Removed tabs from these source files that still had them. |
|
7955 We don't use them; that way source files look fine in editors |
|
7956 that have tabs set to 8 spaces or to 4 spaces. |
|
7957 - Removed allow-tabs Subversion property from the files too. |
|
7958 |
|
7959 * bindings/NP_jsobject.cpp: |
|
7960 * bindings/c/c_utility.cpp: |
|
7961 * bindings/jni/jni_runtime.cpp: |
|
7962 * bindings/jni/jni_utility.cpp: |
|
7963 * bindings/objc/objc_utility.mm: |
|
7964 * bindings/runtime.cpp: |
|
7965 * bindings/runtime_method.cpp: |
|
7966 * bindings/testbindings.cpp: |
|
7967 * bindings/testbindings.mm: |
|
7968 * kjs/date_object.cpp: |
|
7969 * kjs/function.cpp: |
|
7970 * kjs/list.cpp: |
|
7971 * kjs/nodes.cpp: |
|
7972 * kjs/nodes.h: |
|
7973 * kjs/string_object.cpp: |
|
7974 * kjs/ustring.cpp: |
|
7975 |
|
7976 2006-07-29 Darin Adler <darin@apple.com> |
|
7977 |
|
7978 * tests/mozilla/expected.html: Update test results now that regress-185165.js |
|
7979 is succeeding. I suspect Anders fix for bug 4620655 is the reason. |
|
7980 |
|
7981 2006-07-29 Sam Weinig <sam.weinig@gmail.com> |
|
7982 |
|
7983 Reviewed by Darin. |
|
7984 |
|
7985 - patch for http://bugs.webkit.org/show_bug.cgi?id=10080 |
|
7986 Adopt pedantic changes from the Unity project to improve |
|
7987 cross-compiler compatibility |
|
7988 |
|
7989 Changes include: |
|
7990 * Removing trailing semicolon from namespace braces. |
|
7991 * Removing trailing comma from last enum declaration. |
|
7992 * Updating to match style guidelines. |
|
7993 * Adding missing newline to the end of the file. |
|
7994 * Turning on gcc warning for missing newline at the end of a source file |
|
7995 (GCC_WARN_ABOUT_MISSING_NEWLINE in Xcode, -Wnewline in gcc). |
|
7996 * Alphabetical sorting of Xcode source list files. |
|
7997 * Replace use of non-portable variable-size array with Vector. |
|
7998 * Use C-style comments instead of C++ comments in files that might |
|
7999 be included by either C or C++ files. |
|
8000 |
|
8001 * API/JSCallbackConstructor.cpp: |
|
8002 (KJS::JSCallbackConstructor::construct): |
|
8003 * API/JSCallbackFunction.cpp: |
|
8004 (KJS::JSCallbackFunction::callAsFunction): |
|
8005 * API/JSCallbackObject.cpp: |
|
8006 (KJS::JSCallbackObject::construct): |
|
8007 (KJS::JSCallbackObject::callAsFunction): |
|
8008 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
8009 * JavaScriptCorePrefix.h: |
|
8010 * bindings/jni/jni_class.cpp: |
|
8011 (JavaClass::fieldNamed): |
|
8012 * bindings/jni/jni_class.h: |
|
8013 * bindings/jni/jni_instance.cpp: |
|
8014 (JavaInstance::JavaInstance): |
|
8015 (JavaInstance::valueOf): |
|
8016 * bindings/jni/jni_objc.mm: |
|
8017 (KJS::Bindings::dispatchJNICall): |
|
8018 * bindings/jni/jni_runtime.cpp: |
|
8019 (JavaParameter::JavaParameter): |
|
8020 (JavaArray::JavaArray): |
|
8021 * bindings/jni/jni_runtime.h: |
|
8022 * bindings/jni/jni_utility.h: |
|
8023 * bindings/objc/objc_instance.h: |
|
8024 * bindings/runtime_array.h: |
|
8025 * kjs/collector.h: |
|
8026 * kjs/config.h: |
|
8027 * kjs/ustring.cpp: |
|
8028 * wtf/Platform.h: |
|
8029 |
|
8030 2006-07-29 Mike Emmel <mike.emmel@gmail.com> |
|
8031 |
|
8032 Reviewed by Darin. |
|
8033 |
|
8034 - fixes for Linux build |
|
8035 |
|
8036 * JavaScriptCoreSources.bkl: Added new files to build, kjs/PropertyNameArray.cpp |
|
8037 and kjs/testkjs.cpp, and removed old files. |
|
8038 |
|
8039 2006-07-24 Dan Waylonis <waylonis@google.com> |
|
8040 |
|
8041 Reviewed and tweaked a bit by Darin. |
|
8042 |
|
8043 - fix http://bugs.webkit.org/show_bug.cgi?id=9902 |
|
8044 jsNull and NSNull not properly converted between JS and ObjC |
|
8045 |
|
8046 * bindings/objc/objc_utility.mm: (KJS::Bindings::convertObjcValueToValue): |
|
8047 Added case for converting NSNull to jsNull. |
|
8048 |
|
8049 2006-07-24 Rob Buis <buis@kde.org> |
|
8050 |
|
8051 Reviewed by Darin. |
|
8052 |
|
8053 http://bugs.webkit.org/show_bug.cgi?id=4258 |
|
8054 Date().toString() only includes GMT offset, not timezone string |
|
8055 |
|
8056 Use the info in tm_zone to append timezone abbreviation |
|
8057 to Date().toString(). |
|
8058 |
|
8059 * kjs/date_object.cpp: |
|
8060 (KJS::formatTime): |
|
8061 |
|
8062 2006-07-24 Rob Buis <buis@kde.org> |
|
8063 |
|
8064 Reviewed by Darin. |
|
8065 |
|
8066 http://bugs.webkit.org/show_bug.cgi?id=5257 |
|
8067 setYear() does not match FireFox/IE behavior |
|
8068 |
|
8069 Make sure the right values end up in tm_year. |
|
8070 |
|
8071 * kjs/date_object.cpp: |
|
8072 (KJS::formatTime): |
|
8073 |
|
8074 2006-07-23 Mark Rowe <opendarwin.org@bdash.net.nz> |
|
8075 |
|
8076 Reviewed by Maciej. |
|
8077 |
|
8078 Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions |
|
8079 http://bugs.webkit.org/show_bug.cgi?id=9686 |
|
8080 |
|
8081 JavaScriptCore portion of the fix. |
|
8082 |
|
8083 * JavaScriptCore.exp: Update symbol for change in argument type. |
|
8084 * kjs/debugger.cpp: |
|
8085 (Debugger::detach): Clear map of recent exceptions. |
|
8086 (Debugger::hasHandledException): Track the most recent exception |
|
8087 thrown by an interpreter. |
|
8088 (Debugger::exception): Change exception argument to a JSValue. |
|
8089 * kjs/debugger.h: |
|
8090 * kjs/nodes.cpp: |
|
8091 (Node::debugExceptionIfNeeded): Notify the debugger of an exception |
|
8092 if it hasn't seen it before. |
|
8093 (ThrowNode::execute): Notify the debugger that an exception is being thrown. |
|
8094 * kjs/nodes.h: |
|
8095 |
|
8096 2006-07-23 Geoffrey Garen <ggaren@apple.com> |
|
8097 |
|
8098 Patch by Eric Albert, reviewed by Darin and me. |
|
8099 |
|
8100 - Fixed <rdar://problem/4645931> JavaScriptCore stack-scanning code |
|
8101 crashes (Collector::markStackObjectsConservatively) |
|
8102 |
|
8103 * bindings/jni/jni_jsobject.cpp: On 64bit systems, jint is a long, not an |
|
8104 int. |
|
8105 (JavaJSObject::getSlot): |
|
8106 (JavaJSObject::setSlot): |
|
8107 * kjs/collector.cpp: |
|
8108 (KJS::Collector::markCurrentThreadConservatively): Use a pointer instead of |
|
8109 an int as 'dummy,' because on LP64 systems, an int is not pointer-aligned, |
|
8110 and we want to scan the stack for pointers. |
|
8111 * JavaScriptCore.xcodeproj/project.pbxproj: After a tense cease-fire, the |
|
8112 XCode war has started up again! |
|
8113 |
|
8114 === Safari-521.20 === |
|
8115 |
|
8116 2006-07-21 Geoffrey Garen <ggaren@apple.com> |
|
8117 |
|
8118 Reviewed by Darin. |
|
8119 |
|
8120 <rdar://problem/4507265> REGRESSION: overlays don't work on HousingMaps.com (Google Maps-based site) |
|
8121 |
|
8122 - Added support for strings that masquerade as undefined. Currently used |
|
8123 by WebCore to implement undetectable style.filter. |
|
8124 |
|
8125 The name is a little long, but it's only used in one line of code, so I |
|
8126 thought clarity should win over brevity. |
|
8127 |
|
8128 * JavaScriptCore.exp: |
|
8129 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
8130 * kjs/object.h: |
|
8131 * kjs/string_object.h: |
|
8132 (KJS::StringInstanceThatMasqueradesAsUndefined::StringInstanceThatMasqueradesAsUndefined): |
|
8133 (KJS::StringInstanceThatMasqueradesAsUndefined::masqueradeAsUndefined): |
|
8134 (KJS::StringInstanceThatMasqueradesAsUndefined::toBoolean): |
|
8135 |
|
8136 === Safari-521.19 === |
|
8137 |
|
8138 2006-07-20 Steve Falkenburg <sfalken@apple.com> |
|
8139 |
|
8140 Fix the build |
|
8141 |
|
8142 * kjs/function.cpp: |
|
8143 (KJS::escapeStringForPrettyPrinting): |
|
8144 |
|
8145 2006-07-19 Anders Carlsson <acarlsson@apple.com> |
|
8146 |
|
8147 Reviewed by Darin. |
|
8148 |
|
8149 <rdar://problem/4620655> REGRESSION(10.4.7-10.5): preview button for a blogger.com post doesn't work |
|
8150 |
|
8151 * kjs/nodes2string.cpp: |
|
8152 (StringNode::streamTo): |
|
8153 Return the escaped string. |
|
8154 |
|
8155 (RegExpNode::streamTo): |
|
8156 Use the correct syntax. |
|
8157 |
|
8158 * kjs/function.cpp: |
|
8159 (KJS::escapeStringForPrettyPrinting): |
|
8160 * kjs/function.h: |
|
8161 Add escape function which escapes a string for pretty-printing so it can be parsed again. |
|
8162 |
|
8163 * wtf/unicode/icu/UnicodeIcu.h: |
|
8164 (WTF::Unicode::isPrintableChar): |
|
8165 New function. |
|
8166 |
|
8167 2006-07-18 Maciej Stachowiak <mjs@apple.com> |
|
8168 |
|
8169 Reviewed by Adele Peterson. |
|
8170 |
|
8171 <rdar://problem/4589530> REGRESSION: null character in JS string causes parse error (works in Tiger and in other browsers) |
|
8172 |
|
8173 * kjs/lexer.cpp: |
|
8174 (Lexer::shift): |
|
8175 (Lexer::lex): |
|
8176 (Lexer::record16): |
|
8177 (Lexer::scanRegExp): |
|
8178 * kjs/lexer.h: |
|
8179 |
|
8180 2006-07-18 Tim Omernick <timo@apple.com> |
|
8181 |
|
8182 Reviewed by Tim Hatcher. |
|
8183 |
|
8184 Removed a misleading comment; we recently added support for the NPNVPluginElementNPObject |
|
8185 variable. |
|
8186 |
|
8187 * bindings/npapi.h: |
|
8188 |
|
8189 === Safari-521.18 === |
|
8190 |
|
8191 2006-07-18 Timothy Hatcher <timothy@apple.com> |
|
8192 |
|
8193 Made the following headers public: |
|
8194 |
|
8195 * JavaScriptCore.h |
|
8196 * JSBase.h |
|
8197 * JSContextRef.h |
|
8198 * JSObjectRef.h |
|
8199 * JSStringRef.h |
|
8200 * JSValueRef.h |
|
8201 |
|
8202 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
8203 |
|
8204 2006-07-17 Geoffrey Garen <ggaren@apple.com> |
|
8205 |
|
8206 Reviewed by Maciej. |
|
8207 |
|
8208 - Added automatic prototype creation for classes. |
|
8209 |
|
8210 A class stores a weak reference to a prototype, which is cleared when |
|
8211 the prototype is garbage collected, to avoid a reference cycle. |
|
8212 |
|
8213 We now have an attributes field in JSClassDefinition, that currently is |
|
8214 used only to override automatic prototype creation when you want to manage your |
|
8215 own prototypes, but can be extended in the future for other nefarious purposes. |
|
8216 |
|
8217 Similarly, we have JSObjectMake and JSObjectMakeWithPrototype, the latter |
|
8218 allowing you to manage your own prototypes. |
|
8219 |
|
8220 JSObjectMakeConstructor is more interesting now, able to make a constructor |
|
8221 on your behalf if you just give it a class. |
|
8222 |
|
8223 - Removed bogus old code from minidom.js. |
|
8224 |
|
8225 - Tweaked the headerdocs. |
|
8226 |
|
8227 - Added more GC testing, which caught some leaks, and tested more funny |
|
8228 edge cases in lookup, which caught a lookup bug. Removed some testing |
|
8229 we used to do with MyObject because it was redundant with the new, cool |
|
8230 stuff. |
|
8231 |
|
8232 While fixing the lookup bug I retracted this change: |
|
8233 |
|
8234 "If a static setProperty callback returns 'false', to indicate that the |
|
8235 property was not set, we no longer forward the set request up the class |
|
8236 chain, because that's almost certainly not what the programmer expected." |
|
8237 |
|
8238 Returning false when setting a static property is a little silly, but you can see |
|
8239 it being useful when shadowing a base class's static properties, and, regardless |
|
8240 of usefullness, this is the defined behavior of the setProperty callback. |
|
8241 |
|
8242 - Plus a little ASCII art, for the kids. |
|
8243 |
|
8244 2006-07-17 Timothy Hatcher <timothy@apple.com> |
|
8245 |
|
8246 Reviewed by Maciej. |
|
8247 |
|
8248 <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit |
|
8249 |
|
8250 Moves WebScriptObject and WebUndefined up to WebCore. |
|
8251 This change does create an upwards-dependancy on WebScriptObject existing |
|
8252 in the loaded process, but this code path in JavaScriptCore does not get used |
|
8253 unless it is through WebKit/WebCore. Moving all of the binding code out of |
|
8254 JavaScriptCore might make sense in the future. |
|
8255 |
|
8256 * JavaScriptCore.exp: |
|
8257 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
8258 * bindings/objc/WebScriptObject.h: Replaced. |
|
8259 * bindings/objc/WebScriptObject.mm: Removed. |
|
8260 * bindings/objc/WebScriptObjectPrivate.h: Removed. |
|
8261 * bindings/objc/objc_class.h: |
|
8262 * bindings/objc/objc_instance.h: |
|
8263 * bindings/objc/objc_instance.mm: |
|
8264 (ObjcInstance::~ObjcInstance): |
|
8265 * bindings/objc/objc_runtime.h: |
|
8266 * bindings/objc/objc_runtime.mm: |
|
8267 (convertValueToObjcObject): |
|
8268 * bindings/objc/objc_utility.mm: |
|
8269 (KJS::Bindings::convertValueToObjcValue): |
|
8270 (KJS::Bindings::convertObjcValueToValue): |
|
8271 (KJS::Bindings::createObjcInstanceForValue): |
|
8272 |
|
8273 2006-07-17 Darin Adler <darin@apple.com> |
|
8274 |
|
8275 * API/JSBase.h: Fix comment formatting where things used to be lined up but |
|
8276 are now ragged. Got rid of spaces that attempted to line things up. |
|
8277 * API/JSObjectRef.h: Ditto. Also add missing periods for a couple of comments. |
|
8278 |
|
8279 2006-07-17 Geoffrey Garen <ggaren@apple.com> |
|
8280 |
|
8281 Reviewed by Maciej. |
|
8282 |
|
8283 - Removed the exception parameter from the initialize callback and, by extension, |
|
8284 JSObjectMake. We have never had a need for exceptions when iniitializing, |
|
8285 so the parameter seemed likely to "get in the way." |
|
8286 |
|
8287 Also, an exception in JavaScript is thrown in response to input -- |
|
8288 "invalid URL", "index not a number", etc., so it's the job of the |
|
8289 constructor function, not the initialize method, to throw. |
|
8290 |
|
8291 If initialize *really* wants to throw, it can communicate the throw to |
|
8292 the constructor through the constructed object's private data (e.g., set |
|
8293 it to NULL, signaling to the consntructor that initialization failed.) |
|
8294 |
|
8295 - Added JSObjectMakeWithData, which enables a constructor to set private |
|
8296 data on an object *before* it has been initialized. That way, the initialize |
|
8297 methods can properly operate on the data. |
|
8298 |
|
8299 * API/JSNode.c: Moved ref into the initialize method, for better encapsulation, |
|
8300 now that it's possible. |
|
8301 * API/JSNodeList.c: ditto |
|
8302 * API/minidom.c: |
|
8303 (main): Do more aggressive garbage collection to test ref/deref and |
|
8304 initialize/finalize. |
|
8305 * API/minidom.js: store childNodes in a temporary so it doesn't get re-created |
|
8306 like a thousand times. This makes debugging ref/deref easier |
|
8307 |
|
8308 2006-07-17 Geoffrey Garen <ggaren@apple.com> |
|
8309 |
|
8310 Reviewed by Maciej. |
|
8311 |
|
8312 - Changed the initialize callback to run from least derived class (parent |
|
8313 class) to most derived class. This enables C++ style initialization, |
|
8314 and derived class overriding of member data. |
|
8315 |
|
8316 - Added excpetion propopgation to JSObjectMake, to support initialize |
|
8317 exceptions, and generally round out our policy of making function |
|
8318 signatures as long as possible. |
|
8319 |
|
8320 * API/JSCallbackObject.h: Use ExecState instead of ContextRef, cuz we're |
|
8321 in C++ land now. |
|
8322 |
|
8323 2006-07-17 Geoffrey Garen <ggaren@apple.com> |
|
8324 |
|
8325 Reviewed by Maciej. |
|
8326 |
|
8327 - Changed JSObjectMakeConstructor to JSObjectMakeConstructorWithCallback, |
|
8328 to match JSObjectMakeFunctionWithCallback. |
|
8329 |
|
8330 - Added prototype parameter, so the generated constructor |
|
8331 automatically works with hasInstance / instanceof |
|
8332 |
|
8333 - Moved hasInstance implementation from InternalFunctionImp to JSObject |
|
8334 so that subclasses can inherit it without inheriting function-related baggage. |
|
8335 More refactoring here would be good, but this seems like a good short-term |
|
8336 solution. |
|
8337 |
|
8338 (KJS::JSCallbackFunction::implementsHasInstance): override and return false, |
|
8339 because callback functions aren't constructors. |
|
8340 |
|
8341 2006-07-17 Maciej Stachowiak <mjs@apple.com> |
|
8342 |
|
8343 Reviewed by Geoff. |
|
8344 |
|
8345 - add a JSContextRef parameter to all JSValueRef, JSObjectRef, and JSContextRef operations; |
|
8346 except JSObject{Get,Set}PrivateData which can be assumed to be simple pure accessors. |
|
8347 |
|
8348 Also renamed the parameter "context" to "ctx" because it makes the code read better with this pervasive |
|
8349 but usually uninteresting parameter. |
|
8350 |
|
8351 * API/JSBase.cpp: |
|
8352 (JSEvaluateScript): |
|
8353 (JSCheckScriptSyntax): |
|
8354 (JSGarbageCollect): |
|
8355 * API/JSBase.h: |
|
8356 * API/JSCallbackObject.cpp: |
|
8357 (KJS::JSCallbackObject::JSCallbackObject): |
|
8358 (KJS::JSCallbackObject::init): |
|
8359 (KJS::JSCallbackObject::getOwnPropertySlot): |
|
8360 (KJS::JSCallbackObject::put): |
|
8361 (KJS::JSCallbackObject::deleteProperty): |
|
8362 (KJS::JSCallbackObject::toNumber): |
|
8363 (KJS::JSCallbackObject::toString): |
|
8364 * API/JSContextRef.cpp: |
|
8365 (JSGlobalContextCreate): |
|
8366 (JSGlobalContextRetain): |
|
8367 (JSGlobalContextRelease): |
|
8368 (JSContextGetGlobalObject): |
|
8369 * API/JSContextRef.h: |
|
8370 * API/JSNode.c: |
|
8371 (JSNodePrototype_appendChild): |
|
8372 (JSNodePrototype_removeChild): |
|
8373 (JSNodePrototype_replaceChild): |
|
8374 (JSNode_getNodeType): |
|
8375 (JSNode_getFirstChild): |
|
8376 (JSNode_prototype): |
|
8377 * API/JSNodeList.c: |
|
8378 (JSNodeListPrototype_item): |
|
8379 (JSNodeList_length): |
|
8380 (JSNodeList_getProperty): |
|
8381 (JSNodeList_prototype): |
|
8382 * API/JSObjectRef.cpp: |
|
8383 (JSObjectMake): |
|
8384 (JSObjectMakeFunctionWithCallback): |
|
8385 (JSObjectMakeConstructor): |
|
8386 (JSObjectMakeFunction): |
|
8387 (JSObjectGetPrototype): |
|
8388 (JSObjectSetPrototype): |
|
8389 (JSObjectHasProperty): |
|
8390 (JSObjectGetProperty): |
|
8391 (JSObjectSetProperty): |
|
8392 (JSObjectGetPropertyAtIndex): |
|
8393 (JSObjectSetPropertyAtIndex): |
|
8394 (JSObjectDeleteProperty): |
|
8395 (JSObjectIsFunction): |
|
8396 (JSObjectCallAsFunction): |
|
8397 (JSObjectIsConstructor): |
|
8398 (JSObjectCallAsConstructor): |
|
8399 (JSObjectCopyPropertyNames): |
|
8400 * API/JSObjectRef.h: |
|
8401 * API/JSStringRef.cpp: |
|
8402 * API/JSValueRef.cpp: |
|
8403 (JSValueGetType): |
|
8404 (JSValueIsUndefined): |
|
8405 (JSValueIsNull): |
|
8406 (JSValueIsBoolean): |
|
8407 (JSValueIsNumber): |
|
8408 (JSValueIsString): |
|
8409 (JSValueIsObject): |
|
8410 (JSValueIsObjectOfClass): |
|
8411 (JSValueIsEqual): |
|
8412 (JSValueIsStrictEqual): |
|
8413 (JSValueIsInstanceOfConstructor): |
|
8414 (JSValueMakeUndefined): |
|
8415 (JSValueMakeNull): |
|
8416 (JSValueMakeBoolean): |
|
8417 (JSValueMakeNumber): |
|
8418 (JSValueMakeString): |
|
8419 (JSValueToBoolean): |
|
8420 (JSValueToNumber): |
|
8421 (JSValueToStringCopy): |
|
8422 (JSValueToObject): |
|
8423 (JSValueProtect): |
|
8424 (JSValueUnprotect): |
|
8425 * API/JSValueRef.h: |
|
8426 * API/minidom.c: |
|
8427 (print): |
|
8428 * API/testapi.c: |
|
8429 (MyObject_getProperty): |
|
8430 (MyObject_deleteProperty): |
|
8431 (MyObject_callAsFunction): |
|
8432 (MyObject_callAsConstructor): |
|
8433 (MyObject_convertToType): |
|
8434 (print_callAsFunction): |
|
8435 (main): |
|
8436 |
|
8437 2006-07-16 Geoffrey Garen <ggaren@apple.com> |
|
8438 |
|
8439 Approved by Maciej, RS by Beth. |
|
8440 |
|
8441 JSObjectMakeFunction -> JSObjectMakeFunctionWithCallback |
|
8442 JSObjectMakeFunctionWithBody -> JSObjectMakeFunction |
|
8443 |
|
8444 because the latter is more common, and more fundamental, than the former. |
|
8445 |
|
8446 * API/APICast.h: |
|
8447 (toJS): |
|
8448 * API/JSBase.h: |
|
8449 * API/JSCallbackObject.cpp: |
|
8450 (KJS::JSCallbackObject::getOwnPropertySlot): |
|
8451 (KJS::JSCallbackObject::put): |
|
8452 (KJS::JSCallbackObject::deleteProperty): |
|
8453 (KJS::JSCallbackObject::getPropertyNames): |
|
8454 (KJS::JSCallbackObject::staticValueGetter): |
|
8455 (KJS::JSCallbackObject::staticFunctionGetter): |
|
8456 * API/JSClassRef.cpp: |
|
8457 (OpaqueJSClass::OpaqueJSClass): |
|
8458 (OpaqueJSClass::~OpaqueJSClass): |
|
8459 * API/JSClassRef.h: |
|
8460 * API/JSObjectRef.cpp: |
|
8461 (JSClassCreate): |
|
8462 (JSObjectMakeFunctionWithCallback): |
|
8463 (JSObjectMakeFunction): |
|
8464 (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray): |
|
8465 (JSObjectCopyPropertyNames): |
|
8466 * API/JSObjectRef.h: |
|
8467 * API/minidom.c: |
|
8468 (main): |
|
8469 * API/testapi.c: |
|
8470 (main): |
|
8471 * ChangeLog: |
|
8472 * JavaScriptCore.exp: |
|
8473 |
|
8474 2006-07-16 Geoffrey Garen <ggaren@apple.com> |
|
8475 |
|
8476 Laughed at by Beth. |
|
8477 |
|
8478 Replace __JS with OpaqueJS because the former, while used by CF, is |
|
8479 a prefix that's triply-reserved by the compiler. (_* is reserved in global |
|
8480 names, _[A-Z] is reserved in all names, and __ is reserved in all names |
|
8481 in C++.) |
|
8482 |
|
8483 Opaque is an alternative used by other Mac OS X framewokrs. |
|
8484 |
|
8485 * API/APICast.h: |
|
8486 (toJS): |
|
8487 * API/JSBase.h: |
|
8488 * API/JSCallbackObject.cpp: |
|
8489 (KJS::JSCallbackObject::getOwnPropertySlot): |
|
8490 (KJS::JSCallbackObject::put): |
|
8491 (KJS::JSCallbackObject::deleteProperty): |
|
8492 (KJS::JSCallbackObject::getPropertyNames): |
|
8493 (KJS::JSCallbackObject::staticValueGetter): |
|
8494 (KJS::JSCallbackObject::staticFunctionGetter): |
|
8495 * API/JSClassRef.cpp: |
|
8496 (OpaqueJSClass::OpaqueJSClass): |
|
8497 (OpaqueJSClass::~OpaqueJSClass): |
|
8498 * API/JSClassRef.h: |
|
8499 * API/JSObjectRef.cpp: |
|
8500 (JSClassCreate): |
|
8501 (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray): |
|
8502 (JSObjectCopyPropertyNames): |
|
8503 |
|
8504 2006-07-16 Darin Adler <darin@apple.com> |
|
8505 |
|
8506 - try to fix Windows build |
|
8507 |
|
8508 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
8509 Added some recently added files, removed some recently removed. |
|
8510 |
|
8511 2006-07-16 Geoffrey Garen <ggaren@apple.com> |
|
8512 |
|
8513 Reviewed by Maciej. |
|
8514 |
|
8515 - Change getProperty* to return undefined, rather than NULL, for missing |
|
8516 properties, since that's what the spec says. Also added exception out |
|
8517 parameters to the *Index functions, because they can call through to the |
|
8518 regular functions, which can throw for custom objects. |
|
8519 |
|
8520 * API/JSObjectRef.cpp: |
|
8521 (JSObjectGetProperty): |
|
8522 (JSObjectGetPropertyAtIndex): |
|
8523 (JSObjectSetPropertyAtIndex): |
|
8524 * API/JSObjectRef.h: |
|
8525 * API/testapi.c: |
|
8526 (main): |
|
8527 |
|
8528 2006-07-16 Geoffrey Garen <ggaren@apple.com> |
|
8529 |
|
8530 Reviewed by Maciej. |
|
8531 |
|
8532 - Properly document and handle NULL callbacks for static properties. We |
|
8533 throw an exception in any case other than a ReadOnly property with a NULL |
|
8534 setProperty callback, because a NULL callback almost certainly indicates |
|
8535 a programming error. Also throw an exception if hasProperty returns true |
|
8536 for a property that getProperty can't get. |
|
8537 |
|
8538 - If a static setProperty callback returns 'false', to indicate that the |
|
8539 property was not set, we no longer forward the set request up the class |
|
8540 chain, because that's almost certainly not what the programmer expected. |
|
8541 |
|
8542 * API/JSCallbackObject.cpp: |
|
8543 (KJS::JSCallbackObject::getOwnPropertySlot): |
|
8544 (KJS::JSCallbackObject::put): |
|
8545 (KJS::JSCallbackObject::staticValueGetter): |
|
8546 (KJS::JSCallbackObject::staticFunctionGetter): |
|
8547 (KJS::JSCallbackObject::callbackGetter): |
|
8548 * API/JSObjectRef.h: |
|
8549 * API/minidom.js: |
|
8550 * API/testapi.c: |
|
8551 (MyObject_hasProperty): |
|
8552 * API/testapi.js: |
|
8553 |
|
8554 2006-07-16 Geoffrey Garen <ggaren@apple.com> |
|
8555 |
|
8556 Reviewed by Maciej. |
|
8557 |
|
8558 - Added names to functions. |
|
8559 |
|
8560 - Removed GetPrivate/SetPrivate from callbackFunctions and callbackConstructors. |
|
8561 The private data idiom is that a JS object stores its native implementation |
|
8562 as private data. For functions and constructors, the native implementation is nothing |
|
8563 more than the callback they already store, so supporting private data, too, |
|
8564 confuses the idiom. If you *really* want, you can still create a custom |
|
8565 function with private data. |
|
8566 |
|
8567 * API/JSCallbackConstructor.cpp: |
|
8568 * API/JSCallbackConstructor.h: |
|
8569 * API/JSCallbackFunction.cpp: |
|
8570 (KJS::JSCallbackFunction::JSCallbackFunction): |
|
8571 * API/JSCallbackFunction.h: |
|
8572 * API/JSCallbackObject.cpp: |
|
8573 (KJS::JSCallbackObject::staticFunctionGetter): |
|
8574 * API/JSObjectRef.cpp: |
|
8575 (JSObjectMakeFunction): |
|
8576 (JSObjectMakeFunctionWithBody): |
|
8577 (JSObjectGetPrivate): |
|
8578 (JSObjectSetPrivate): |
|
8579 * API/JSObjectRef.h: |
|
8580 * API/minidom.c: |
|
8581 (main): |
|
8582 * API/testapi.c: |
|
8583 (main): |
|
8584 |
|
8585 2006-07-15 Maciej Stachowiak <mjs@apple.com> |
|
8586 |
|
8587 Reviewed by Darin. |
|
8588 |
|
8589 - switch property lists to be vector+set of Identifiers instead of list of References |
|
8590 |
|
8591 This has the following benefits: |
|
8592 |
|
8593 - no duplicates in property lists |
|
8594 - simplifies API calls |
|
8595 - probably more efficient, since linked list is gone |
|
8596 - entirely removed Reference, ReferenceList and ProtectedReference types from the API |
|
8597 |
|
8598 * kjs/PropertyNameArray.cpp: Added. |
|
8599 (KJS::PropertyNameArray::add): Check set, if not already there, add to |
|
8600 vector. |
|
8601 * kjs/PropertyNameArray.h: Added. |
|
8602 (KJS::PropertyNameArray::PropertyNameArray): Newly added type, combines |
|
8603 a set and a vector to make a unique but ordered list of identifiers. |
|
8604 (KJS::PropertyNameArray::begin): ditto |
|
8605 (KJS::PropertyNameArray::end): ditto |
|
8606 (KJS::PropertyNameArray::size): ditto |
|
8607 (KJS::PropertyNameArray::operator[]): ditto |
|
8608 * kjs/array_instance.h: |
|
8609 * kjs/array_object.cpp: |
|
8610 (ArrayInstance::getPropertyNames): renamed from getPropertyList, updated |
|
8611 for PropertyNameArray |
|
8612 (ArrayInstance::setLength): updated for PropertyNameArray |
|
8613 (ArrayInstance::pushUndefinedObjectsToEnd): ditto |
|
8614 * kjs/nodes.cpp: |
|
8615 (ForInNode::execute): updated for PropertyNameArray |
|
8616 * kjs/nodes.h: |
|
8617 * kjs/object.cpp: |
|
8618 (KJS::JSObject::getPropertyNames): renamed from getPropertyList, updated |
|
8619 for PropertyNameArray |
|
8620 * kjs/object.h: |
|
8621 * kjs/property_map.cpp: |
|
8622 (KJS::PropertyMap::getEnumerablePropertyNames): updated for PropertyNameArray |
|
8623 (KJS::PropertyMap::getSparseArrayPropertyNames): ditto |
|
8624 * kjs/property_map.h: |
|
8625 * kjs/protected_reference.h: Removed. |
|
8626 * kjs/reference.cpp: Removed. |
|
8627 * kjs/reference.h: Removed. |
|
8628 * kjs/reference_list.cpp: Removed. |
|
8629 * kjs/reference_list.h: Removed. |
|
8630 * kjs/scope_chain.cpp: |
|
8631 (KJS::ScopeChain::print): Use PropertyNamesArray instead of ReferenceList. |
|
8632 * kjs/string_object.cpp: |
|
8633 (StringInstance::getPropertyNames): Updated for new approach. |
|
8634 * kjs/string_object.h: |
|
8635 * kjs/ustring.h: |
|
8636 * API/APICast.h: |
|
8637 (toJS): Added overload for PropertyNameAccumulatorRef / PropertyNameArray* |
|
8638 (toRef): ditto |
|
8639 * API/JSBase.h: |
|
8640 * API/JSCallbackObject.cpp: |
|
8641 (KJS::JSCallbackObject::getPropertyNames): Fixed for new API. |
|
8642 * API/JSCallbackObject.h: |
|
8643 * API/JSObjectRef.cpp: |
|
8644 (__JSPropertyNameArray::__JSPropertyNameArray): Type used for a publicly vended |
|
8645 JSPropertyNameArrayRef. |
|
8646 (JSObjectCopyPropertyNames): New API call - renamed / refactored from |
|
8647 JSObjectCreatePropertyList |
|
8648 (JSPropertyNameArrayRetain): new retain call for JSPropertyNameArray. |
|
8649 (JSPropertyNameArrayRelease): new release call for - " -. |
|
8650 (JSPropertyNameArrayGetCount): Instead of having to use a stateful enumerator you |
|
8651 can now get the count and items in any order. |
|
8652 (JSPropertyNameArrayGetNameAtIndex): See above. |
|
8653 (JSPropertyNameAccumulatorAddName): What you add properties to is now an opaque |
|
8654 accumulator object. |
|
8655 * API/JSObjectRef.h: Prototyped new functions, removed old ones |
|
8656 * JavaScriptCore.exp: Updated exported symbols. |
|
8657 * JavaScriptCore.xcodeproj/project.pbxproj: Added new files, removed old. |
|
8658 * API/testapi.c: |
|
8659 (MyObject_getPropertyNames): Renamed / fixed callback to fit new paradigm. |
|
8660 (main): Updated for new API. |
|
8661 |
|
8662 2006-07-15 Darin Adler <darin@apple.com> |
|
8663 |
|
8664 - oops, missed a few more arrays that had to be const |
|
8665 |
|
8666 * API/JSNode.c: |
|
8667 (JSNodePrototype_appendChild): Added const. |
|
8668 (JSNodePrototype_removeChild): Ditto. |
|
8669 (JSNodePrototype_replaceChild): Ditto. |
|
8670 (JSNode_construct): Ditto. |
|
8671 * API/JSNodeList.c: |
|
8672 (JSNodeListPrototype_item): Ditto. |
|
8673 * API/JSObjectRef.cpp: |
|
8674 (JSObjectMakeFunctionWithBody): Ditto. |
|
8675 (JSObjectCallAsFunction): Ditto. |
|
8676 (JSObjectCallAsConstructor): Ditto. |
|
8677 * API/minidom.c: |
|
8678 (print): Ditto. |
|
8679 * API/testapi.c: |
|
8680 (MyObject_callAsFunction): Ditto. |
|
8681 (MyObject_callAsConstructor): Ditto. |
|
8682 (print_callAsFunction): Ditto. |
|
8683 (myConstructor_callAsConstructor): Ditto. |
|
8684 |
|
8685 2006-07-15 Darin Adler <darin@apple.com> |
|
8686 |
|
8687 Reviewed by Maciej. |
|
8688 |
|
8689 * API/JSNode.h: Made an array parameter const. |
|
8690 * API/JSObjectRef.h: Made array parameters const. Fixed a comment. |
|
8691 |
|
8692 2006-07-15 Geoffrey Garen <ggaren@apple.com> |
|
8693 |
|
8694 Reviewed by Maciej. |
|
8695 |
|
8696 - JSObjectMakeFunctionWithBody includes a function name and named parameters now. |
|
8697 |
|
8698 * API/JSObjectRef.cpp: |
|
8699 (JSObjectMakeFunctionWithBody): |
|
8700 * API/JSObjectRef.h: |
|
8701 * API/testapi.c: |
|
8702 (assertEqualsAsUTF8String): More informative failure reporting. |
|
8703 (main): Test more function cases. |
|
8704 |
|
8705 2006-07-15 Geoffrey Garen <ggaren@apple.com> |
|
8706 |
|
8707 Reviewed by Maciej. |
|
8708 |
|
8709 - Moved the arguments passed to JSClassCreate into a single structure, |
|
8710 called JSClassDefinition. This will enable easier structure |
|
8711 migration/versioning in the future, if necessary. |
|
8712 |
|
8713 - Added support for class names. |
|
8714 |
|
8715 - kJSClassDefinitionNull replaces kJSObjectCallbacksNone. |
|
8716 |
|
8717 - JSClass is becoming a fairly complex struct, so I migrated all of its |
|
8718 implementation other than reference counting to the sruct. |
|
8719 |
|
8720 - Also moved JSClass* functions in the API to JSObjectRef.cpp, since they're |
|
8721 declared in JSObjectRef.h |
|
8722 |
|
8723 - Also added some more informative explanation to the class structure doc. |
|
8724 |
|
8725 2006-07-15 Darin Adler <darin@apple.com> |
|
8726 |
|
8727 Reviewed by Geoff. |
|
8728 |
|
8729 - fix http://bugs.webkit.org/show_bug.cgi?id=8395 |
|
8730 <rdar://problem/4613467> |
|
8731 REGRESSION: RegEx seems broken for hex escaped non breaking space |
|
8732 |
|
8733 Test: fast/js/regexp-extended-characters-more.html |
|
8734 |
|
8735 * pcre/pcre_exec.c: |
|
8736 (match): Got rid of utf16Length local variable to guarantee there's no |
|
8737 extra stack usage in recursive calls. Fixed two places in the PCRE_UTF16 |
|
8738 code that were using the length variable, which is the UTF-8 length of |
|
8739 a character in the pattern, to move in the UTF-16 subject string. Instead |
|
8740 they hardcode lengths of 1 and 2 since the code already handles BMP |
|
8741 characters and surrogate pairs separately. Also fixed some DPRINTF so |
|
8742 I could compile with DEBUG on. |
|
8743 (pcre_exec): Changed a place that was checking for multibyte characters |
|
8744 in the subject string to use ISMIDCHAR. Instead it was using hardcoded |
|
8745 logic that was right for UTF-8 but wrong for UTF-16. |
|
8746 |
|
8747 * pcre/pcre_compile.c: (pcre_compile2): Fixed a DPRINTF so I could compile |
|
8748 with DEBUG on. |
|
8749 |
|
8750 2006-07-14 Geoffrey Garen <ggaren@apple.com> |
|
8751 |
|
8752 RS by Maciej. |
|
8753 |
|
8754 Global replace in the API of argc/argv with argumentCount/arguments. |
|
8755 |
|
8756 2006-07-14 Geoffrey Garen <ggaren@apple.com> |
|
8757 |
|
8758 Reviewed by Maciej. |
|
8759 |
|
8760 - Finalized exception handling in the API. |
|
8761 |
|
8762 setProperty can throw because it throws for built-in arrays. getProperty |
|
8763 and deleteProperty can throw because setProperty can throw and we want |
|
8764 to be consistent, and also because they seem like "actions." callAsFunction, |
|
8765 callAsConstructor, and hasInstance can throw, because they caan throw for |
|
8766 all built-ins. |
|
8767 |
|
8768 toBoolean can't throw because it's defined that way in the spec. |
|
8769 |
|
8770 - Documented that toBoolean and toObject can't be overridden by custom |
|
8771 objects because they're defined that way in the spec. |
|
8772 |
|
8773 === Safari-521.17 === |
|
8774 |
|
8775 2006-07-14 Geoffrey Garen <ggaren@apple.com> |
|
8776 |
|
8777 Reviewed by Maciej. |
|
8778 |
|
8779 - Implemented ref-counting of JSContexts by splitting into two datatypes: |
|
8780 JSGlobalContext, which you can create/retain/release, and JSContext, which |
|
8781 you can't. |
|
8782 |
|
8783 Internally, you retain a JSGlobalContext/ExecState by retaining its |
|
8784 interpreter, which, in the case of a global ExecState, owns it. |
|
8785 |
|
8786 - Also made ~Interpreter() protected to catch places where Interpreter |
|
8787 is manually deleted. (Can't make it private because some crazy fool |
|
8788 decided it would be a good idea to subclass Interpreter in other frameworks. |
|
8789 I pity da fool.) |
|
8790 |
|
8791 * API/APICast.h: |
|
8792 (toJS): Added cast for new JSGlobalContext |
|
8793 * API/JSStringRef.h: Changed vague "you must" language to more specific |
|
8794 (but, ultimately, equally vague) "behavior is undefined if you don't" |
|
8795 language. |
|
8796 (KJS::Interpreter::Interpreter): Factored more common initialization into |
|
8797 init() |
|
8798 * kjs/interpreter.h: |
|
8799 (KJS::Interpreter::ref): new |
|
8800 (KJS::Interpreter::deref): new |
|
8801 (KJS::Interpreter::refCount): new |
|
8802 * kjs/testkjs.cpp: |
|
8803 (doIt): Ref-count the interpreter. |
|
8804 |
|
8805 2006-07-14 Maciej Stachowiak <mjs@apple.com> |
|
8806 |
|
8807 Reviewed by Geoff. |
|
8808 |
|
8809 - removed bool return value from JSObjectSetProperty, since it is inefficient and |
|
8810 also doesn't work quite right |
|
8811 - added JSObjectGetPropertyAtIndex and JSObjectSetPropertyAtIndex |
|
8812 |
|
8813 * API/JSObjectRef.cpp: |
|
8814 (JSObjectSetProperty): Removed return value and canPut stuff. |
|
8815 (JSObjectGetPropertyAtIndex): Added. |
|
8816 (JSObjectSetPropertyAtIndex): Added. |
|
8817 * API/JSObjectRef.h: Prototyped and documented new functions. |
|
8818 |
|
8819 2006-07-14 Geoffrey Garen <ggaren@apple.com> |
|
8820 |
|
8821 Reviewed by Beth. |
|
8822 |
|
8823 Moved JSCheckScriptSyntax, JSEvaluateScript, and JSGarbageCollect into |
|
8824 JSBase.h/.cpp. They don't belong in the value-specific or context-specific |
|
8825 files because they're not part of the value or context implementations. |
|
8826 |
|
8827 * API/JSBase.h: |
|
8828 * API/JSContextRef.cpp: |
|
8829 (JSContextGetGlobalObject): |
|
8830 * API/JSContextRef.h: |
|
8831 * API/JSValueRef.cpp: |
|
8832 (JSValueUnprotect): |
|
8833 * API/JSValueRef.h: |
|
8834 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
8835 |
|
8836 2006-07-13 Timothy Hatcher <timothy@apple.com> |
|
8837 |
|
8838 Reviewed by Maciej. |
|
8839 |
|
8840 Moved JavaScriptCore to be a public framework. |
|
8841 |
|
8842 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
8843 |
|
8844 2006-07-13 Mark Rowe <opendarwin.org@bdash.net.nz> |
|
8845 |
|
8846 Reviewed by Geoffrey. |
|
8847 |
|
8848 http://bugs.webkit.org/show_bug.cgi?id=9742 |
|
8849 Bug 9742: REGRESSION: WebKit hangs when loading <http://www.vtbook.com> |
|
8850 |
|
8851 * kjs/value.h: |
|
8852 (KJS::JSValue::getUInt32): Only types tagged as numeric can be converted to UInt32. |
|
8853 |
|
8854 2006-07-13 Geoffrey Garen <ggaren@apple.com> |
|
8855 |
|
8856 Pleasing to Maciej. |
|
8857 |
|
8858 - Renamed JSEvaluate -> JSEvaluateScript, JSCheckSyntax -> JSCheckScriptSyntax |
|
8859 - Added exception out parameters to JSValueTo* and JSValueIsEqual because |
|
8860 they can throw |
|
8861 - Removed JSObjectGetDescription because it's useless and vague, and |
|
8862 JSValueToString/JSValueIsObjectOfClass do a better job, anyway |
|
8863 - Clarified comments about "IsFunction/Constructor" to indicate that they |
|
8864 are true of all functions/constructors, not just those created by JSObjectMake* |
|
8865 |
|
8866 2006-07-12 Geoffrey Garen <ggaren@apple.com> |
|
8867 |
|
8868 RS by Beth. |
|
8869 |
|
8870 Finished previously approved JSInternalString -> JSString conversion |
|
8871 by renaming the files. |
|
8872 |
|
8873 * API/JSCallbackObject.cpp: |
|
8874 * API/JSInternalStringRef.cpp: Removed. |
|
8875 * API/JSInternalStringRef.h: Removed. |
|
8876 * API/JSStringRef.cpp: Added. |
|
8877 * API/JSStringRef.h: Added. |
|
8878 * API/JavaScriptCore.h: |
|
8879 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
8880 |
|
8881 2006-07-12 Geoffrey Garen <ggaren@apple.com> |
|
8882 |
|
8883 Reviewed by Maciej. |
|
8884 |
|
8885 - Removed context and exception parameters from JSObjectGetPropertyEnumerator, |
|
8886 removing the spurious use of ExecState inside JavaScriptCore that made |
|
8887 us think this was necessary in the first place. |
|
8888 |
|
8889 (StringInstance::getPropertyList): Use getString instead of toString because |
|
8890 we know we're dealing with a string -- we put it there in the first place. |
|
8891 While we're at it, store the string's size instead of retrieving it each time |
|
8892 through the loop, to avoid the unnecessary killing of puppies. |
|
8893 * kjs/string_object.h: |
|
8894 |
|
8895 2006-07-12 Maciej Stachowiak <mjs@apple.com> |
|
8896 |
|
8897 Reviewed by Geoff. |
|
8898 |
|
8899 - add handling of hasInstance callback for API objects |
|
8900 |
|
8901 * API/JSCallbackObject.cpp: |
|
8902 (KJS::JSCallbackObject::implementsHasInstance): Check if callback is present. |
|
8903 (KJS::JSCallbackObject::hasInstance): Invoke appropriate callback. |
|
8904 * API/JSCallbackObject.h: |
|
8905 * API/JSClassRef.cpp: |
|
8906 * API/JSObjectRef.h: |
|
8907 * API/testapi.c: |
|
8908 (MyObject_hasInstance): Test case; should match what construct would do. |
|
8909 * API/testapi.js: |
|
8910 |
|
8911 2006-07-11 Geoffrey Garen <ggaren@apple.com> |
|
8912 |
|
8913 Reviewed by Maciej. |
|
8914 |
|
8915 - Implemented a vast number of renames and comment clarifications |
|
8916 suggested during API review. |
|
8917 |
|
8918 JSInternalString -> JSString |
|
8919 JS*Make -> JSValueMake*, JSObjectMake* |
|
8920 JSTypeCode -> JSType |
|
8921 JSValueIsInstanceOf -> JSValueIsInstanceOfConstructor (reads strangely well in client code) |
|
8922 JSGC*Protect -> JSValue*Protect |
|
8923 JS*Callback -> JSObject*Callback |
|
8924 JSGetPropertyListCallback -> JSObjectAddPropertiesToListCallback |
|
8925 JSPropertyEnumeratorGetNext -> JSPropertyEnumeratorGetNextName |
|
8926 JSString* -> |
|
8927 JSStringCreateWithUTF8CString, JSStringGetUTF8CString, |
|
8928 JSStringGetMaximumUTF8CStringSize JSStringIsEqualToUTF8CString, |
|
8929 JSStringCreateWithCFString, JSStringCopyCFString, JSStringCreateWithCharacters. |
|
8930 |
|
8931 - Changed functions taking a JSValue out arg and returning a bool indicating |
|
8932 whether it was set to simply return a JSValue or NULL. |
|
8933 |
|
8934 - Removed JSStringGetCharacters because it's more documentation than code, |
|
8935 and it's just a glorified memcpy built on existing API functionality. |
|
8936 |
|
8937 - Moved standard library includes into the headers that actually require them. |
|
8938 |
|
8939 - Standardized use of the phrase "Create Rule." |
|
8940 |
|
8941 - Removed JSLock from make functions that don't allocate. |
|
8942 |
|
8943 - Added exception handling to JSValueToBoolean, since we now allow |
|
8944 callback objects to throw exceptions upon converting to boolean. |
|
8945 |
|
8946 - Renamed JSGCCollect to JSGarbageCollect. |
|
8947 |
|
8948 2006-07-10 Geoffrey Garen <ggaren@apple.com> |
|
8949 |
|
8950 Reviewed by Darin. |
|
8951 |
|
8952 - Changed public header includes to the <JavaScriptCore/ style. |
|
8953 - Changed instances of 'buffer' to 'string' since we decided on |
|
8954 JSInternalString instead of JSStringBuffer. |
|
8955 |
|
8956 * API/JSContextRef.h: |
|
8957 * API/JSInternalStringRef.cpp: |
|
8958 (JSStringMake): |
|
8959 (JSInternalStringRetain): |
|
8960 (JSInternalStringRelease): |
|
8961 (JSValueCopyStringValue): |
|
8962 (JSInternalStringGetLength): |
|
8963 (JSInternalStringGetCharactersPtr): |
|
8964 (JSInternalStringGetCharacters): |
|
8965 (JSInternalStringGetMaxLengthUTF8): |
|
8966 (JSInternalStringGetCharactersUTF8): |
|
8967 (CFStringCreateWithJSInternalString): |
|
8968 * API/JSInternalStringRef.h: |
|
8969 * API/JSNode.c: |
|
8970 (JSNodePrototype_appendChild): |
|
8971 (JSNode_getNodeType): |
|
8972 * API/JSObjectRef.cpp: |
|
8973 (JSObjectCallAsConstructor): |
|
8974 * API/JSValueRef.h: |
|
8975 * API/JavaScriptCore.h: |
|
8976 * API/minidom.c: |
|
8977 (main): |
|
8978 (print): |
|
8979 * API/testapi.c: |
|
8980 (MyObject_getPropertyList): |
|
8981 (myConstructor_callAsConstructor): |
|
8982 (main): I noticed that we were prematurely releasing some string buffers, |
|
8983 so I moved their release calls to the end of main(). I got rid of 'Buf' in *Buf |
|
8984 (sometimes changing to 'IString', when necessary to differentiate a variable) |
|
8985 to match the buffer->string change. |
|
8986 |
|
8987 === Safari-521.16 === |
|
8988 |
|
8989 2006-07-10 Darin Adler <darin@apple.com> |
|
8990 |
|
8991 * kjs/value.cpp: (KJS::JSValue::toInt32Inline): Added inline keyword one more place. |
|
8992 Just in case. |
|
8993 |
|
8994 2006-07-10 Darin Adler <darin@apple.com> |
|
8995 |
|
8996 - fix the release build |
|
8997 |
|
8998 * kjs/value.h: |
|
8999 * kjs/value.cpp: |
|
9000 (KJS::JSValue::toInt32Inline): Move the code here to an inline. |
|
9001 (KJS::JSValue::toInt32): Call the inline from both overloaded toInt32 functions. |
|
9002 |
|
9003 2006-07-10 David Kilzer <ddkilzer@kilzer.net> |
|
9004 |
|
9005 Reviewed by Darin. |
|
9006 |
|
9007 - fix http://bugs.webkit.org/show_bug.cgi?id=9179 |
|
9008 Implement select.options.add() method |
|
9009 |
|
9010 * JavaScriptCore.exp: Added overloaded KJS::JSValue::toInt32() method. |
|
9011 * JavaScriptCore.xcodeproj/project.pbxproj: Altered attributes metadata for |
|
9012 kjs/value.h to make it available as a forwarded header. |
|
9013 * kjs/lookup.h: |
|
9014 (KJS::lookupPut): Extracted a lookupPut() method from the existing lookupPut() method. |
|
9015 The new method returns a boolean value if no entry is found in the lookup table. |
|
9016 * kjs/value.cpp: |
|
9017 (KJS::JSValue::toInt32): Overloaded toInt32() method with boolean "Ok" argument. |
|
9018 * kjs/value.h: Ditto. |
|
9019 |
|
9020 2006-07-10 Geoffrey Garen <ggaren@apple.com> |
|
9021 |
|
9022 No review necessary. Removed bogus file I accidentally checked in before. |
|
9023 |
|
9024 * API/JSInternalSringRef.h: Removed. |
|
9025 |
|
9026 2006-07-10 Geoffrey Garen <ggaren@apple.com> |
|
9027 |
|
9028 Reviewed by Darin. |
|
9029 |
|
9030 Added exception out parameter to API object callbacks, removed semi-bogus |
|
9031 JSContext(.*)Exception functions. |
|
9032 |
|
9033 To make these calls syntactically simple, I added an exceptionSlot() |
|
9034 method to the ExecState class, which provides a JSValue** slot in which to |
|
9035 store a JSValue* exception. |
|
9036 |
|
9037 * API/APICast.h: |
|
9038 (toRef): |
|
9039 * API/JSCallbackConstructor.cpp: |
|
9040 (KJS::JSCallbackConstructor::construct): |
|
9041 * API/JSCallbackFunction.cpp: |
|
9042 (KJS::JSCallbackFunction::callAsFunction): |
|
9043 * API/JSCallbackObject.cpp: |
|
9044 (KJS::JSCallbackObject::init): |
|
9045 (KJS::JSCallbackObject::getOwnPropertySlot): |
|
9046 (KJS::JSCallbackObject::put): |
|
9047 (KJS::JSCallbackObject::deleteProperty): |
|
9048 (KJS::JSCallbackObject::construct): |
|
9049 (KJS::JSCallbackObject::callAsFunction): |
|
9050 (KJS::JSCallbackObject::getPropertyList): |
|
9051 (KJS::JSCallbackObject::toBoolean): |
|
9052 (KJS::JSCallbackObject::toNumber): |
|
9053 (KJS::JSCallbackObject::toString): |
|
9054 (KJS::JSCallbackObject::staticValueGetter): |
|
9055 (KJS::JSCallbackObject::callbackGetter): |
|
9056 * API/JSContextRef.cpp: |
|
9057 (JSCheckSyntax): |
|
9058 * API/JSContextRef.h: |
|
9059 * API/JSNode.c: |
|
9060 (JSNodePrototype_appendChild): |
|
9061 (JSNodePrototype_removeChild): |
|
9062 (JSNodePrototype_replaceChild): |
|
9063 (JSNode_getNodeType): |
|
9064 (JSNode_getChildNodes): |
|
9065 (JSNode_getFirstChild): |
|
9066 (JSNode_construct): |
|
9067 * API/JSNode.h: |
|
9068 * API/JSNodeList.c: |
|
9069 (JSNodeListPrototype_item): |
|
9070 (JSNodeList_length): |
|
9071 (JSNodeList_getProperty): |
|
9072 * API/JSObjectRef.h: |
|
9073 * API/minidom.c: |
|
9074 (print): |
|
9075 * API/testapi.c: |
|
9076 (MyObject_initialize): |
|
9077 (MyObject_hasProperty): |
|
9078 (MyObject_getProperty): |
|
9079 (MyObject_setProperty): |
|
9080 (MyObject_deleteProperty): |
|
9081 (MyObject_getPropertyList): |
|
9082 (MyObject_callAsFunction): |
|
9083 (MyObject_callAsConstructor): |
|
9084 (MyObject_convertToType): |
|
9085 (print_callAsFunction): |
|
9086 (myConstructor_callAsConstructor): |
|
9087 (main): |
|
9088 * JavaScriptCore.exp: |
|
9089 * kjs/ExecState.h: |
|
9090 (KJS::ExecState::exceptionHandle): |
|
9091 |
|
9092 2006-07-10 Geoffrey Garen <ggaren@apple.com> |
|
9093 |
|
9094 Reviewed by Darin. |
|
9095 |
|
9096 Improved type safety by implementing opaque JSValue/JSObject typing through |
|
9097 abuse of 'const', not void*. Also fixed an alarming number of bugs |
|
9098 exposed by this new type safety. |
|
9099 |
|
9100 I made one design change in JavaScriptCore, which is that the JSObject |
|
9101 constructor should take a JSValue* as its prototype argument, not a JSObject*, |
|
9102 since we allow the prototype to be any JSValue*, including jsNull(), for |
|
9103 example. |
|
9104 |
|
9105 * API/APICast.h: |
|
9106 (toJS): |
|
9107 * API/JSBase.h: |
|
9108 * API/JSCallbackConstructor.cpp: |
|
9109 (KJS::JSCallbackConstructor::construct): |
|
9110 * API/JSCallbackFunction.cpp: |
|
9111 (KJS::JSCallbackFunction::callAsFunction): |
|
9112 * API/JSCallbackObject.cpp: |
|
9113 (KJS::JSCallbackObject::JSCallbackObject): |
|
9114 (KJS::JSCallbackObject::getOwnPropertySlot): |
|
9115 (KJS::JSCallbackObject::put): |
|
9116 (KJS::JSCallbackObject::construct): |
|
9117 (KJS::JSCallbackObject::callAsFunction): |
|
9118 (KJS::JSCallbackObject::staticFunctionGetter): |
|
9119 * API/JSCallbackObject.h: |
|
9120 * API/JSContextRef.cpp: |
|
9121 (JSEvaluate): |
|
9122 * API/JSNode.c: |
|
9123 (JSNodePrototype_appendChild): |
|
9124 (JSNodePrototype_removeChild): |
|
9125 (JSNodePrototype_replaceChild): |
|
9126 * API/JSObjectRef.cpp: |
|
9127 (JSObjectMake): |
|
9128 (JSFunctionMakeWithBody): |
|
9129 (JSObjectGetProperty): |
|
9130 (JSObjectCallAsFunction): |
|
9131 (JSObjectCallAsConstructor): |
|
9132 * API/JSObjectRef.h: |
|
9133 * API/testapi.c: |
|
9134 (main): |
|
9135 * ChangeLog: |
|
9136 * kjs/object.h: |
|
9137 (KJS::JSObject::JSObject): |
|
9138 |
|
9139 2006-07-10 Geoffrey Garen <ggaren@apple.com> |
|
9140 |
|
9141 Approved by Maciej, Darin. |
|
9142 |
|
9143 Renamed JSStringBufferRef to JSInternalStringRef. "Internal string" means the |
|
9144 JavaScript engine's internal string representation, which is the most |
|
9145 low-level and efficient representation to use when interfacing with JavaScript. |
|
9146 |
|
9147 * API/APICast.h: |
|
9148 (toJS): |
|
9149 (toRef): |
|
9150 * API/JSBase.h: |
|
9151 * API/JSCallbackObject.cpp: |
|
9152 (KJS::JSCallbackObject::getOwnPropertySlot): |
|
9153 (KJS::JSCallbackObject::put): |
|
9154 (KJS::JSCallbackObject::deleteProperty): |
|
9155 (KJS::JSCallbackObject::staticValueGetter): |
|
9156 (KJS::JSCallbackObject::callbackGetter): |
|
9157 * API/JSContextRef.cpp: |
|
9158 (JSEvaluate): |
|
9159 (JSCheckSyntax): |
|
9160 * API/JSContextRef.h: |
|
9161 * API/JSInternalStringRef.cpp: Added. |
|
9162 (JSStringMake): |
|
9163 (JSInternalStringCreate): |
|
9164 (JSInternalStringCreateUTF8): |
|
9165 (JSInternalStringRetain): |
|
9166 (JSInternalStringRelease): |
|
9167 (JSValueCopyStringValue): |
|
9168 (JSInternalStringGetLength): |
|
9169 (JSInternalStringGetCharactersPtr): |
|
9170 (JSInternalStringGetCharacters): |
|
9171 (JSInternalStringGetMaxLengthUTF8): |
|
9172 (JSInternalStringGetCharactersUTF8): |
|
9173 (JSInternalStringIsEqual): |
|
9174 (JSInternalStringIsEqualUTF8): |
|
9175 (JSInternalStringCreateCF): |
|
9176 (CFStringCreateWithJSInternalString): |
|
9177 * API/JSInternalStringRef.h: Added. |
|
9178 * API/JSNode.c: |
|
9179 (JSNodePrototype_appendChild): |
|
9180 (JSNode_getNodeType): |
|
9181 (JSNode_getChildNodes): |
|
9182 (JSNode_getFirstChild): |
|
9183 * API/JSNodeList.c: |
|
9184 (JSNodeList_length): |
|
9185 (JSNodeList_getProperty): |
|
9186 * API/JSObjectRef.cpp: |
|
9187 (JSFunctionMakeWithBody): |
|
9188 (JSObjectGetDescription): |
|
9189 (JSObjectHasProperty): |
|
9190 (JSObjectGetProperty): |
|
9191 (JSObjectSetProperty): |
|
9192 (JSObjectDeleteProperty): |
|
9193 (JSPropertyEnumeratorGetNext): |
|
9194 (JSPropertyListAdd): |
|
9195 * API/JSObjectRef.h: |
|
9196 * API/JSStringBufferRef.cpp: Removed. |
|
9197 * API/JSStringBufferRef.h: Removed. |
|
9198 * API/JSValueRef.h: |
|
9199 * API/JavaScriptCore.h: |
|
9200 * API/minidom.c: |
|
9201 (main): |
|
9202 (print): |
|
9203 * API/testapi.c: |
|
9204 (assertEqualsAsUTF8String): |
|
9205 (assertEqualsAsCharactersPtr): |
|
9206 (assertEqualsAsCharacters): |
|
9207 (MyObject_hasProperty): |
|
9208 (MyObject_getProperty): |
|
9209 (MyObject_setProperty): |
|
9210 (MyObject_deleteProperty): |
|
9211 (MyObject_getPropertyList): |
|
9212 (print_callAsFunction): |
|
9213 (myConstructor_callAsConstructor): |
|
9214 (main): |
|
9215 * JavaScriptCore.exp: |
|
9216 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
9217 |
|
9218 2006-07-08 Tim Omernick <timo@apple.com> |
|
9219 |
|
9220 Reviewed by Maciej. |
|
9221 |
|
9222 Added an OpenGL drawing model to the Netscape Plug-in API. |
|
9223 |
|
9224 * bindings/npapi.h: |
|
9225 |
|
9226 2006-07-08 Timothy Hatcher <timothy@apple.com> |
|
9227 |
|
9228 Reviewed by Maciej. |
|
9229 |
|
9230 Moved KJS_GetCreatedJavaVMs to jni_utility.cpp. |
|
9231 Switched KJS_GetCreatedJavaVMs over to use dlopen and dlsym |
|
9232 now that NSAddImage, NSLookupSymbolInImage and NSAddressOfSymbol |
|
9233 are deprecated in Leopard. |
|
9234 |
|
9235 * JavaScriptCore.exp: |
|
9236 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
9237 * bindings/jni/jni_utility.cpp: |
|
9238 (KJS::Bindings::KJS_GetCreatedJavaVMs): |
|
9239 * bindings/softlinking.c: Removed. |
|
9240 * bindings/softlinking.h: Removed. |
|
9241 |
|
9242 2006-07-08 Geoffrey Garen <ggaren@apple.com> |
|
9243 |
|
9244 Reviewed by Anders. |
|
9245 |
|
9246 - Make JSObjectGetProperty return a JSValue or NULL, like JSEvaluate does. |
|
9247 |
|
9248 * API/JSObjectRef.cpp: |
|
9249 (JSObjectGetProperty): |
|
9250 * API/JSObjectRef.h: |
|
9251 * API/testapi.c: |
|
9252 (main): |
|
9253 |
|
9254 2006-07-08 Geoffrey Garen <ggaren@apple.com> |
|
9255 |
|
9256 Style change -- no review necessary. |
|
9257 |
|
9258 Use 0 instead of NULL in API .cpp files, to match our style guidelines. |
|
9259 |
|
9260 * API/JSContextRef.cpp: |
|
9261 (JSEvaluate): |
|
9262 * API/JSObjectRef.cpp: |
|
9263 (JSFunctionMakeWithBody): |
|
9264 (JSObjectCallAsFunction): |
|
9265 (JSObjectCallAsConstructor): |
|
9266 * API/JSValueRef.cpp: |
|
9267 (JSValueToObject): |
|
9268 |
|
9269 2006-07-08 Geoffrey Garen <ggaren@apple.com> |
|
9270 |
|
9271 Reviewed by TimO. |
|
9272 |
|
9273 - Added ability to pass NULL for thisObject when calling JSObjectCallAsFunction, |
|
9274 to match JSEvaluate. |
|
9275 |
|
9276 * API/JSObjectRef.cpp: |
|
9277 (JSObjectCallAsFunction): |
|
9278 * API/JSObjectRef.h: |
|
9279 * API/testapi.c: |
|
9280 (main): |
|
9281 |
|
9282 === Safari-521.15 === |
|
9283 |
|
9284 2006-07-07 Geoffrey Garen <ggaren@apple.com> |
|
9285 |
|
9286 Reviewed by Maciej. |
|
9287 |
|
9288 - Standardized which functions take a JSContext as an argument. The rule is: |
|
9289 if you might execute JavaScript, you take a JSContext, otherwise you don't. |
|
9290 |
|
9291 The FIXME in JSObjectRef.h requires refactoring some parts of Interpreter, |
|
9292 but not API changes, so I'm putting it off until later. |
|
9293 |
|
9294 * API/JSCallbackObject.cpp: |
|
9295 (KJS::JSCallbackObject::JSCallbackObject): |
|
9296 (KJS::JSCallbackObject::init): |
|
9297 * API/JSCallbackObject.h: |
|
9298 * API/JSContextRef.cpp: |
|
9299 (JSContextCreate): |
|
9300 * API/JSContextRef.h: |
|
9301 * API/JSObjectRef.cpp: |
|
9302 (JSObjectMake): |
|
9303 (JSPropertyEnumeratorGetNext): |
|
9304 * API/JSObjectRef.h: |
|
9305 * API/testapi.c: |
|
9306 (MyObject_initialize): |
|
9307 (main): |
|
9308 * JavaScriptCore.exp: |
|
9309 * kjs/array_object.cpp: |
|
9310 (ArrayInstance::setLength): |
|
9311 (ArrayInstance::pushUndefinedObjectsToEnd): |
|
9312 * kjs/nodes.cpp: |
|
9313 (ForInNode::execute): |
|
9314 * kjs/reference.cpp: |
|
9315 (KJS::Reference::getPropertyName): |
|
9316 (KJS::Reference::getValue): |
|
9317 * kjs/reference.h: |
|
9318 * kjs/scope_chain.cpp: |
|
9319 (KJS::ScopeChain::print): |
|
9320 |
|
9321 2006-07-06 Geoffrey Garen <ggaren@apple.com> |
|
9322 |
|
9323 Reviewed by Maciej. |
|
9324 |
|
9325 More API action. |
|
9326 |
|
9327 - Headerdoc finished |
|
9328 |
|
9329 Semantic Changes: |
|
9330 - Added a JSContextRef argument to many functions, because you need a |
|
9331 JSContextRef for doing virtually anything. I expect to add this argument |
|
9332 to even more functions in a future patch. |
|
9333 |
|
9334 - Removed the globalObjectPrototype argument to JSContextCreate because |
|
9335 you can't create an object until you have a context, so it's impossible |
|
9336 to pass a prototype object to JSContextCreate. That's OK because (1) there's |
|
9337 no reason to give the global object a prototype and (2) if you really want |
|
9338 to, you can just use a separate call to JSObjectSetPrototype. |
|
9339 |
|
9340 - Removed the JSClassRef argument to JSClassCreate because it was unnecessary, |
|
9341 and you need to be able to make the global object's class before you've |
|
9342 created a JSContext. |
|
9343 |
|
9344 - Added an optional exception parameter to JSFunctionMakeWithBody because anything |
|
9345 less would be uncivilized. |
|
9346 |
|
9347 - Made the return value parameter to JSObjectGetProperty optional to match |
|
9348 all other return value parameters in the API. |
|
9349 |
|
9350 - Made JSObjectSetPrivate/JSObjectGetPrivate work on JSCallbackFunctions |
|
9351 and JSCallbackConstructors. You could use an abstract base class or strategic |
|
9352 placement of m_privateData in the class structure to implement this, but |
|
9353 the former seemed like overkill, and the latter seemed too dangerous. |
|
9354 |
|
9355 - Fixed a bug where JSPropertyEnumeratorGetNext would skip the first property. |
|
9356 |
|
9357 Cosmetic Changes: |
|
9358 - Reversed the logic of the JSChar #ifdef to avoid confusing headerdoc |
|
9359 |
|
9360 - Removed function names from @function declarations because headeroc |
|
9361 can parse them automatically, and I wanted to rule out manual mismatch. |
|
9362 |
|
9363 - Changed Error::create to take a const UString& instead of a UString* |
|
9364 because it was looking at me funny. |
|
9365 |
|
9366 - Renamed JSStringBufferCreateWithCFString to JSStringBufferCreateCF |
|
9367 because the latter is more concise and it matches JSStringBufferCreateUTF8. |
|
9368 |
|
9369 * API/JSCallbackObject.cpp: |
|
9370 (KJS::JSCallbackObject::getOwnPropertySlot): |
|
9371 (KJS::JSCallbackObject::put): |
|
9372 (KJS::JSCallbackObject::deleteProperty): |
|
9373 (KJS::JSCallbackObject::getPropertyList): |
|
9374 (KJS::JSCallbackObject::toBoolean): |
|
9375 (KJS::JSCallbackObject::toNumber): |
|
9376 (KJS::JSCallbackObject::toString): |
|
9377 * API/JSClassRef.cpp: |
|
9378 (JSClassCreate): |
|
9379 * API/JSContextRef.cpp: |
|
9380 (JSContextCreate): |
|
9381 (JSContextSetException): |
|
9382 * API/JSContextRef.h: |
|
9383 * API/JSNode.c: |
|
9384 (JSNodePrototype_class): |
|
9385 (JSNode_class): |
|
9386 * API/JSNodeList.c: |
|
9387 (JSNodeListPrototype_class): |
|
9388 (JSNodeList_class): |
|
9389 * API/JSObjectRef.cpp: |
|
9390 (JSObjectGetProperty): |
|
9391 (JSObjectGetPrivate): |
|
9392 (JSObjectSetPrivate): |
|
9393 (JSObjectCallAsFunction): |
|
9394 (JSObjectCallAsConstructor): |
|
9395 (JSPropertyEnumeratorGetNext): |
|
9396 * API/JSObjectRef.h: |
|
9397 * API/JSStringBufferRef.cpp: |
|
9398 (JSStringBufferCreateCF): |
|
9399 * API/JSStringBufferRef.h: |
|
9400 * API/JSValueRef.cpp: |
|
9401 (JSValueIsInstanceOf): |
|
9402 * API/JSValueRef.h: |
|
9403 * API/minidom.c: |
|
9404 (main): |
|
9405 * API/minidom.js: |
|
9406 * API/testapi.c: |
|
9407 (MyObject_hasProperty): |
|
9408 (MyObject_setProperty): |
|
9409 (MyObject_deleteProperty): |
|
9410 (MyObject_getPropertyList): |
|
9411 (MyObject_convertToType): |
|
9412 (MyObject_class): |
|
9413 (main): |
|
9414 * JavaScriptCore.exp: |
|
9415 |
|
9416 2006-07-07 Geoffrey Garen <ggaren@apple.com> |
|
9417 |
|
9418 Reviewed by John. |
|
9419 |
|
9420 - Fixed a few crashes resulting from NULL parameters to JSClassCreate. |
|
9421 |
|
9422 * API/JSClassRef.cpp: |
|
9423 (JSClassCreate): |
|
9424 (JSClassRelease): |
|
9425 * API/testapi.c: Added test for NULL parameters. |
|
9426 (main): |
|
9427 |
|
9428 2006-07-07 Geoffrey Garen <ggaren@apple.com> |
|
9429 |
|
9430 Reviewed by John, mocked by Darin. |
|
9431 |
|
9432 - Changed JSEvaluate to take a JSObjectRef instead of a JSValueRef as |
|
9433 "this," since "this" must be an object. |
|
9434 |
|
9435 * API/JSContextRef.cpp: |
|
9436 (JSEvaluate): |
|
9437 * API/JSContextRef.h: |
|
9438 |
|
9439 2006-07-07 Geoffrey Garen <ggaren@apple.com> |
|
9440 |
|
9441 Reviewed by John. |
|
9442 |
|
9443 - More headerdoc |
|
9444 |
|
9445 * API/JSBase.h: |
|
9446 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
9447 |
|
9448 2006-07-05 Geoffrey Garen <ggaren@apple.com> |
|
9449 |
|
9450 RS by Beth. |
|
9451 |
|
9452 Renamed JSCharBufferRef, which was universally unpopular, to JSStringBufferRef, |
|
9453 which, hopefully, will be less unpopular. |
|
9454 |
|
9455 * API/APICast.h: |
|
9456 (toJS): |
|
9457 (toRef): |
|
9458 * API/JSBase.h: |
|
9459 * API/JSCallbackObject.cpp: |
|
9460 (KJS::JSCallbackObject::getOwnPropertySlot): |
|
9461 (KJS::JSCallbackObject::put): |
|
9462 (KJS::JSCallbackObject::deleteProperty): |
|
9463 (KJS::JSCallbackObject::staticValueGetter): |
|
9464 (KJS::JSCallbackObject::callbackGetter): |
|
9465 * API/JSCharBufferRef.cpp: Removed. |
|
9466 * API/JSCharBufferRef.h: Removed. |
|
9467 * API/JSContextRef.cpp: |
|
9468 (JSEvaluate): |
|
9469 (JSCheckSyntax): |
|
9470 * API/JSContextRef.h: |
|
9471 * API/JSNode.c: |
|
9472 (JSNodePrototype_appendChild): |
|
9473 (JSNode_getNodeType): |
|
9474 (JSNode_getChildNodes): |
|
9475 (JSNode_getFirstChild): |
|
9476 * API/JSNodeList.c: |
|
9477 (JSNodeList_length): |
|
9478 (JSNodeList_getProperty): |
|
9479 * API/JSObjectRef.cpp: |
|
9480 (JSFunctionMakeWithBody): |
|
9481 (JSObjectGetDescription): |
|
9482 (JSObjectHasProperty): |
|
9483 (JSObjectGetProperty): |
|
9484 (JSObjectSetProperty): |
|
9485 (JSObjectDeleteProperty): |
|
9486 (JSPropertyEnumeratorGetNext): |
|
9487 (JSPropertyListAdd): |
|
9488 * API/JSObjectRef.h: |
|
9489 * API/JSStringBufferRef.cpp: Added. |
|
9490 (JSStringMake): |
|
9491 (JSStringBufferCreate): |
|
9492 (JSStringBufferCreateUTF8): |
|
9493 (JSStringBufferRetain): |
|
9494 (JSStringBufferRelease): |
|
9495 (JSValueCopyStringValue): |
|
9496 (JSStringBufferGetLength): |
|
9497 (JSStringBufferGetCharactersPtr): |
|
9498 (JSStringBufferGetCharacters): |
|
9499 (JSStringBufferGetMaxLengthUTF8): |
|
9500 (JSStringBufferGetCharactersUTF8): |
|
9501 (JSStringBufferIsEqual): |
|
9502 (JSStringBufferIsEqualUTF8): |
|
9503 (JSStringBufferCreateWithCFString): |
|
9504 (CFStringCreateWithJSStringBuffer): |
|
9505 * API/JSStringBufferRef.h: Added. |
|
9506 * API/JSValueRef.h: |
|
9507 * API/JavaScriptCore.h: |
|
9508 * API/minidom.c: |
|
9509 (main): |
|
9510 (print): |
|
9511 * API/testapi.c: |
|
9512 (assertEqualsAsUTF8String): |
|
9513 (assertEqualsAsCharactersPtr): |
|
9514 (assertEqualsAsCharacters): |
|
9515 (MyObject_hasProperty): |
|
9516 (MyObject_getProperty): |
|
9517 (MyObject_setProperty): |
|
9518 (MyObject_deleteProperty): |
|
9519 (MyObject_getPropertyList): |
|
9520 (print_callAsFunction): |
|
9521 (myConstructor_callAsConstructor): |
|
9522 (main): |
|
9523 * JavaScriptCore.exp: |
|
9524 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
9525 |
|
9526 2006-07-05 Geoffrey Garen <ggaren@apple.com> |
|
9527 |
|
9528 RS by Beth. |
|
9529 |
|
9530 Moved some code around for more logical file separation. |
|
9531 |
|
9532 * API/JSBase.h: |
|
9533 * API/JSContextRef.h: |
|
9534 * API/JSObjectRef.cpp: |
|
9535 * API/JSValueRef.cpp: |
|
9536 (JSValueToObject): |
|
9537 * API/JSValueRef.h: |
|
9538 |
|
9539 2006-07-03 Geoffrey Garen <ggaren@apple.com> |
|
9540 |
|
9541 Reviewed by Maciej. |
|
9542 |
|
9543 Implemented JSFunctionMakeWithBody, which parses a script as a function body |
|
9544 in the global scope, and returns the resulting anonymous function. |
|
9545 |
|
9546 I also removed private data from JSCallbackFunction. It never worked, |
|
9547 since JSCallbackFunction doesn't inherit from JSCallbackObject. |
|
9548 |
|
9549 * API/JSCallbackConstructor.cpp: Removed. |
|
9550 * API/JSCallbackConstructor.h: Removed. |
|
9551 * API/JSCallbackFunction.cpp: |
|
9552 (KJS::JSCallbackFunction::JSCallbackFunction): |
|
9553 (KJS::JSCallbackFunction::implementsConstruct): |
|
9554 (KJS::JSCallbackFunction::construct): |
|
9555 (KJS::JSCallbackFunction::implementsCall): |
|
9556 (KJS::JSCallbackFunction::callAsFunction): |
|
9557 * API/JSCallbackFunction.h: |
|
9558 * API/JSCallbackObject.cpp: |
|
9559 (KJS::JSCallbackObject::staticFunctionGetter): |
|
9560 * API/JSObjectRef.cpp: |
|
9561 (JSFunctionMake): |
|
9562 (JSFunctionMakeWithCallbacks): |
|
9563 * API/JSObjectRef.h: |
|
9564 * API/JSValueRef.h: |
|
9565 * API/minidom.c: |
|
9566 (main): |
|
9567 * API/testapi.c: |
|
9568 (main): |
|
9569 * JavaScriptCore.exp: Programmatically added all symbols exported by |
|
9570 API object files, and sorted results |
|
9571 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
9572 |
|
9573 2006-07-03 Geoffrey Garen <ggaren@apple.com> |
|
9574 |
|
9575 Reviewed by Maciej. |
|
9576 |
|
9577 - Return syntax error in JSCheckSyntax through a JSValueRef* exception |
|
9578 argument |
|
9579 |
|
9580 * API/JSBase.h: |
|
9581 * API/JSContextRef.cpp: |
|
9582 (JSCheckSyntax): |
|
9583 * API/testapi.c: |
|
9584 (main): |
|
9585 * JavaScriptCore.exp: |
|
9586 * kjs/interpreter.cpp: |
|
9587 (KJS::Interpreter::checkSyntax): |
|
9588 * kjs/interpreter.h: |
|
9589 |
|
9590 2006-07-04 Darin Adler <darin@apple.com> |
|
9591 |
|
9592 - fixed build |
|
9593 |
|
9594 * wtf/MathExtras.h: Oops. Added missing #endif. |
|
9595 |
|
9596 2006-07-04 Bjoern Graf <bjoern.graf@gmail.com> |
|
9597 |
|
9598 Reviewed by Maciej. |
|
9599 Tweaked a bit by Darin. |
|
9600 |
|
9601 - http://bugs.webkit.org/show_bug.cgi?id=9678 |
|
9602 work around MSVCRT's fmod function returning NaN for fmod(x, infinity) instead of x |
|
9603 |
|
9604 * wtf/MathExtras.h: Added include of <float.h>. |
|
9605 (isinf): Fix to return false for NAN. |
|
9606 (wtf_fmod): Added. An inline that works around the bug. |
|
9607 |
|
9608 * kjs/nodes.cpp: |
|
9609 * kjs/number_object.cpp: |
|
9610 * kjs/operations.cpp: |
|
9611 * kjs/value.cpp: |
|
9612 Added includes of MathExtras.h to all files using fmod. |
|
9613 |
|
9614 * JavaScriptCore.xcodeproj/project.pbxproj: Let Xcode 2.3 have its way with |
|
9615 the project. |
|
9616 |
|
9617 2006-07-01 Geoffrey Garen <ggaren@apple.com> |
|
9618 |
|
9619 Reviewed by Darin. |
|
9620 |
|
9621 - Refined value conversions in the API: |
|
9622 - failed toNumber returns NaN |
|
9623 - failed toObject returns NULL |
|
9624 - failed toString returns empty string |
|
9625 |
|
9626 - Refined excpetion handling in the API: |
|
9627 - failed value conversions do not throw exceptions |
|
9628 - uncaught exceptions in JSEvaluate, JSObjectCallAsFunction, and |
|
9629 JSObjectCallAsConstructor are returned through a JSValueRef* exception |
|
9630 argument |
|
9631 - removed JSContextHasException, because JSContextGetException does |
|
9632 the same job |
|
9633 |
|
9634 * API/JSBase.h: |
|
9635 * API/JSCharBufferRef.cpp: |
|
9636 (JSValueCopyStringValue): |
|
9637 * API/JSContextRef.cpp: |
|
9638 (JSEvaluate): |
|
9639 * API/JSContextRef.h: |
|
9640 * API/JSNodeList.c: Added test code demonstrating how you would use |
|
9641 toNumber, and why you probably don't need toUInt32, etc. |
|
9642 (JSNodeListPrototype_item): |
|
9643 (JSNodeList_getProperty): |
|
9644 * API/JSObjectRef.cpp: |
|
9645 (JSValueToObject): |
|
9646 (JSObjectCallAsFunction): |
|
9647 (JSObjectCallAsConstructor): |
|
9648 * API/JSObjectRef.h: |
|
9649 * API/JSValueRef.cpp: |
|
9650 (JSValueToNumber): |
|
9651 * API/JSValueRef.h: |
|
9652 * API/minidom.c: |
|
9653 (main): |
|
9654 * API/testapi.c: |
|
9655 (main): Added tests for new rules, and call to JSGCProtect to fix Intel |
|
9656 crash |
|
9657 * JavaScriptCore.exp: |
|
9658 |
|
9659 2006-07-03 Darin Adler <darin@apple.com> |
|
9660 |
|
9661 - Rolled out HashMap implementation of NPRuntime, at least temporarily. |
|
9662 |
|
9663 Fixes hang in the bindings section of layout tests seen on the |
|
9664 buildbot. |
|
9665 |
|
9666 This code was using HashMap<const char*, PrivateIdentifier*>. |
|
9667 But that hashes based on pointer identity, not string value. |
|
9668 The default hash for any pointer type is to hash based on the pointer. |
|
9669 And WTF doesn't currently have a string hash for char*. |
|
9670 We'll need to fix that before re-landing this patch. |
|
9671 |
|
9672 (Formatting was also incorrect -- extra spaces in parentheses.) |
|
9673 |
|
9674 * bindings/npruntime.cpp: Rolled out last change. |
|
9675 |
|
9676 2006-07-02 Justin Haygood <jhaygood@spsu.edu> |
|
9677 |
|
9678 Reviewed, tweaked, landed by ggaren. |
|
9679 |
|
9680 - Port NPRuntime from CFDictionary to HashMap. |
|
9681 |
|
9682 * bindings/npruntime.cpp: |
|
9683 (getStringIdentifierDictionary): |
|
9684 (getIntIdentifierDictionary): |
|
9685 (_NPN_GetStringIdentifier): |
|
9686 (_NPN_GetIntIdentifier): |
|
9687 * bindings/npruntime.h: |
|
9688 |
|
9689 2006-07-01 Geoffrey Garen <ggaren@apple.com> |
|
9690 |
|
9691 Reviewed by Adele. |
|
9692 |
|
9693 - Fixed <rdar://problem/4611197> REGRESSION: Liveconnect with Java test |
|
9694 fails at http://www-sor.inria.fr/~dedieu/notes/liveconnect/simple_example.html |
|
9695 |
|
9696 * JavaScriptCore.exp: Export symbols used by liveconnect |
|
9697 |
|
9698 2006-06-29 Geoffrey Garen <ggaren@apple.com> |
|
9699 |
|
9700 Reviewed by Maciej. |
|
9701 |
|
9702 - Phase 2 in the JS API. |
|
9703 |
|
9704 - Added support for specifying static tables of values -- this should |
|
9705 obviate the need for using complicated callbacks for most lookups. |
|
9706 |
|
9707 - API objects are now created with classes (JSClassRef) -- in order to support |
|
9708 static values, and in order to prevent API objects from storing their |
|
9709 data inline, and thus falling into the oversized (read: slow and prone to |
|
9710 giving Maciej the frowny face) heap. |
|
9711 |
|
9712 - Added two specialized JSObject subclasses -- JSCallbackFunction and JSCallbackConstructor -- |
|
9713 to allow JSFunctionMake and JSConstructorMake to continue to work with |
|
9714 the new class model. Another solution to this problem would be to create |
|
9715 a custom class object for each function and constructor you make. This |
|
9716 solution is more code but also more efficient. |
|
9717 |
|
9718 - Substantially beefed up the minidom example to demonstrate and test a |
|
9719 lot of these techniques. Its output is still pretty haphazard, though. |
|
9720 |
|
9721 - Gave the <kjs/ preface to some includes -- I'm told this matters to |
|
9722 building on some versions of Linux. |
|
9723 |
|
9724 - Implemented JSValueIsInstanceOf and JSValueIsObjectOfClass |
|
9725 |
|
9726 - Removed GetDescription callback. Something in the class datastructure |
|
9727 should take care of this. |
|
9728 |
|
9729 * API/JSBase.h: |
|
9730 * API/JSCallbackConstructor.cpp: Added. |
|
9731 (KJS::): |
|
9732 (KJS::JSCallbackConstructor::JSCallbackConstructor): |
|
9733 (KJS::JSCallbackConstructor::implementsConstruct): |
|
9734 (KJS::JSCallbackConstructor::construct): |
|
9735 (KJS::JSCallbackConstructor::setPrivate): |
|
9736 (KJS::JSCallbackConstructor::getPrivate): |
|
9737 * API/JSCallbackConstructor.h: Added. |
|
9738 (KJS::JSCallbackConstructor::classInfo): |
|
9739 * API/JSCallbackFunction.cpp: Added. |
|
9740 (KJS::): |
|
9741 (KJS::JSCallbackFunction::JSCallbackFunction): |
|
9742 (KJS::JSCallbackFunction::implementsCall): |
|
9743 (KJS::JSCallbackFunction::callAsFunction): |
|
9744 (KJS::JSCallbackFunction::setPrivate): |
|
9745 (KJS::JSCallbackFunction::getPrivate): |
|
9746 * API/JSCallbackFunction.h: Added. |
|
9747 (KJS::JSCallbackFunction::classInfo): |
|
9748 * API/JSCallbackObject.cpp: |
|
9749 (KJS::): |
|
9750 (KJS::JSCallbackObject::JSCallbackObject): |
|
9751 (KJS::JSCallbackObject::init): |
|
9752 (KJS::JSCallbackObject::~JSCallbackObject): |
|
9753 (KJS::JSCallbackObject::className): |
|
9754 (KJS::JSCallbackObject::getOwnPropertySlot): |
|
9755 (KJS::JSCallbackObject::put): |
|
9756 (KJS::JSCallbackObject::deleteProperty): |
|
9757 (KJS::JSCallbackObject::implementsConstruct): |
|
9758 (KJS::JSCallbackObject::construct): |
|
9759 (KJS::JSCallbackObject::implementsCall): |
|
9760 (KJS::JSCallbackObject::callAsFunction): |
|
9761 (KJS::JSCallbackObject::getPropertyList): |
|
9762 (KJS::JSCallbackObject::toBoolean): |
|
9763 (KJS::JSCallbackObject::toNumber): |
|
9764 (KJS::JSCallbackObject::toString): |
|
9765 (KJS::JSCallbackObject::inherits): |
|
9766 (KJS::JSCallbackObject::staticValueGetter): |
|
9767 (KJS::JSCallbackObject::staticFunctionGetter): |
|
9768 (KJS::JSCallbackObject::callbackGetter): |
|
9769 * API/JSCallbackObject.h: |
|
9770 * API/JSCharBufferRef.cpp: |
|
9771 * API/JSClassRef.cpp: Added. |
|
9772 (JSClassCreate): |
|
9773 (JSClassRetain): |
|
9774 (JSClassRelease): |
|
9775 * API/JSClassRef.h: Added. |
|
9776 (StaticValueEntry::StaticValueEntry): |
|
9777 (StaticFunctionEntry::StaticFunctionEntry): |
|
9778 (__JSClass::__JSClass): |
|
9779 * API/JSContextRef.cpp: |
|
9780 (JSContextCreate): |
|
9781 (JSEvaluate): |
|
9782 * API/JSContextRef.h: |
|
9783 * API/JSNode.c: Added. |
|
9784 (JSNodePrototype_appendChild): |
|
9785 (JSNodePrototype_removeChild): |
|
9786 (JSNodePrototype_replaceChild): |
|
9787 (JSNodePrototype_class): |
|
9788 (JSNode_getNodeType): |
|
9789 (JSNode_getChildNodes): |
|
9790 (JSNode_getFirstChild): |
|
9791 (JSNode_finalize): |
|
9792 (JSNode_class): |
|
9793 (JSNode_prototype): |
|
9794 (JSNode_new): |
|
9795 (JSNode_construct): |
|
9796 * API/JSNode.h: Added. |
|
9797 * API/JSNodeList.c: Added. |
|
9798 (JSNodeListPrototype_item): |
|
9799 (JSNodeListPrototype_class): |
|
9800 (JSNodeList_length): |
|
9801 (JSNodeList_getProperty): |
|
9802 (JSNodeList_finalize): |
|
9803 (JSNodeList_class): |
|
9804 (JSNodeList_prototype): |
|
9805 (JSNodeList_new): |
|
9806 * API/JSNodeList.h: Added. |
|
9807 * API/JSObjectRef.cpp: |
|
9808 (JSObjectMake): |
|
9809 (JSFunctionMake): |
|
9810 (JSConstructorMake): |
|
9811 (__JSPropertyEnumerator::__JSPropertyEnumerator): |
|
9812 (JSObjectCreatePropertyEnumerator): |
|
9813 (JSPropertyEnumeratorGetNext): |
|
9814 (JSPropertyEnumeratorRetain): |
|
9815 (JSPropertyEnumeratorRelease): |
|
9816 * API/JSObjectRef.h: |
|
9817 (__JSObjectCallbacks::): |
|
9818 * API/JSValueRef.cpp: |
|
9819 (JSValueIsObjectOfClass): |
|
9820 (JSValueIsInstanceOf): |
|
9821 * API/JSValueRef.h: |
|
9822 * API/Node.c: Added. |
|
9823 (Node_new): |
|
9824 (Node_appendChild): |
|
9825 (Node_removeChild): |
|
9826 (Node_replaceChild): |
|
9827 (Node_ref): |
|
9828 (Node_deref): |
|
9829 * API/Node.h: Added. |
|
9830 * API/NodeList.c: Added. |
|
9831 (NodeList_new): |
|
9832 (NodeList_length): |
|
9833 (NodeList_item): |
|
9834 (NodeList_ref): |
|
9835 (NodeList_deref): |
|
9836 * API/NodeList.h: Added. |
|
9837 * API/minidom.c: |
|
9838 (main): |
|
9839 (print): |
|
9840 (createStringWithContentsOfFile): |
|
9841 * API/minidom.js: |
|
9842 * API/testapi.c: |
|
9843 (assertEqualsAsCharacters): |
|
9844 (MyObject_getProperty): |
|
9845 (MyObject_class): |
|
9846 (myConstructor_callAsConstructor): |
|
9847 (main): |
|
9848 * API/testapi.js: |
|
9849 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
9850 |
|
9851 2006-06-26 Kevin Ollivier <kevino@theolliviers.com> |
|
9852 |
|
9853 Reviewed and tweaked by Darin. |
|
9854 |
|
9855 - Compile fixes for wx port / gcc 4.0.2 |
|
9856 |
|
9857 * kjs/array_object.cpp: |
|
9858 Added missing headers. |
|
9859 |
|
9860 * kjs/ExecState.h: |
|
9861 gcc needs class prototypes before defining those classes as friend classes |
|
9862 |
|
9863 2006-06-30 Mike Emmel <mike.emmel@gmail.com> |
|
9864 |
|
9865 Reviewed by Darin. |
|
9866 |
|
9867 Compilation fixes for Linux/Gdk. |
|
9868 |
|
9869 * JavaScriptCore/kjs/interpreter.cpp: added include of signal.h |
|
9870 * JavaScriptCore/kjs/ExecState.h: added missing class declaration |
|
9871 * JavaScriptCore/kjs/ExecState.cpp: case wrong on include of context.h |
|
9872 * JavaScriptCore/JavaScriptCoreSources.bkl: added Context.cpp and ExecState.cpp |
|
9873 |
|
9874 === Safari-521.14 === |
|
9875 |
|
9876 2006-06-29 Maciej Stachowiak <mjs@apple.com> |
|
9877 |
|
9878 Reviewed by Geoff. |
|
9879 |
|
9880 - add headerdoc comments to some of the new JS API headers |
|
9881 |
|
9882 * API/JSBase.h: |
|
9883 * API/JSValueRef.h: |
|
9884 |
|
9885 2006-06-28 Timothy Hatcher <timothy@apple.com> |
|
9886 |
|
9887 Prefer the Stabs debugging symbols format until DWARF bugs are fixed. |
|
9888 |
|
9889 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
9890 |
|
9891 2006-06-27 Timothy Hatcher <timothy@apple.com> |
|
9892 |
|
9893 Reviewed by Tim O. |
|
9894 |
|
9895 <rdar://problem/4448350> Deprecated ObjC language API used in JavaScriptCore, WebCore, WebKit and WebBrowser |
|
9896 |
|
9897 Switch to the new ObjC 2 API, ifdefed the old code around OBJC_API_VERSION so it still works on Tiger. |
|
9898 Removed the use of the old stringWithCString, switched to the new Tiger version that accepts an encoding. |
|
9899 Lots of code style cleanup. |
|
9900 |
|
9901 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
9902 * bindings/objc/objc_class.h: |
|
9903 * bindings/objc/objc_class.mm: |
|
9904 (KJS::Bindings::ObjcClass::~ObjcClass): |
|
9905 (KJS::Bindings::_createClassesByIsAIfNecessary): |
|
9906 (KJS::Bindings::ObjcClass::classForIsA): |
|
9907 (KJS::Bindings::ObjcClass::name): |
|
9908 (KJS::Bindings::ObjcClass::methodsNamed): |
|
9909 (KJS::Bindings::ObjcClass::fieldNamed): |
|
9910 (KJS::Bindings::ObjcClass::fallbackObject): |
|
9911 * bindings/objc/objc_header.h: |
|
9912 * bindings/objc/objc_instance.h: |
|
9913 * bindings/objc/objc_instance.mm: |
|
9914 (ObjcInstance::ObjcInstance): |
|
9915 (ObjcInstance::~ObjcInstance): |
|
9916 (ObjcInstance::operator=): |
|
9917 (ObjcInstance::begin): |
|
9918 (ObjcInstance::end): |
|
9919 (ObjcInstance::getClass): |
|
9920 (ObjcInstance::invokeMethod): |
|
9921 (ObjcInstance::invokeDefaultMethod): |
|
9922 (ObjcInstance::setValueOfField): |
|
9923 (ObjcInstance::supportsSetValueOfUndefinedField): |
|
9924 (ObjcInstance::setValueOfUndefinedField): |
|
9925 (ObjcInstance::getValueOfField): |
|
9926 (ObjcInstance::getValueOfUndefinedField): |
|
9927 (ObjcInstance::defaultValue): |
|
9928 (ObjcInstance::stringValue): |
|
9929 (ObjcInstance::numberValue): |
|
9930 (ObjcInstance::booleanValue): |
|
9931 (ObjcInstance::valueOf): |
|
9932 * bindings/objc/objc_runtime.h: |
|
9933 * bindings/objc/objc_runtime.mm: |
|
9934 (ObjcMethod::ObjcMethod): |
|
9935 (ObjcMethod::name): |
|
9936 (ObjcMethod::getMethodSignature): |
|
9937 (ObjcMethod::setJavaScriptName): |
|
9938 (ObjcField::name): |
|
9939 (ObjcField::type): |
|
9940 (ObjcField::valueFromInstance): |
|
9941 (convertValueToObjcObject): |
|
9942 (ObjcField::setValueToInstance): |
|
9943 (ObjcArray::operator=): |
|
9944 (ObjcArray::setValueAt): |
|
9945 (ObjcArray::valueAt): |
|
9946 (ObjcFallbackObjectImp::ObjcFallbackObjectImp): |
|
9947 (ObjcFallbackObjectImp::callAsFunction): |
|
9948 (ObjcFallbackObjectImp::defaultValue): |
|
9949 |
|
9950 2006-06-28 Anders Carlsson <acarlsson@apple.com> |
|
9951 |
|
9952 Reviewed by Geoff. |
|
9953 |
|
9954 http://bugs.webkit.org/show_bug.cgi?id=8636 |
|
9955 REGRESSION: JavaScript access to Java applet causes hang (_webViewURL not implemented) |
|
9956 |
|
9957 * bindings/jni/jni_objc.mm: |
|
9958 (KJS::Bindings::dispatchJNICall): |
|
9959 Just pass nil as the calling URL. This will cause the Java plugin to use the URL of the page |
|
9960 containing the applet (which is what we used to do). |
|
9961 |
|
9962 2006-06-27 Timothy Hatcher <timothy@apple.com> |
|
9963 |
|
9964 Reviewed by Darin. |
|
9965 |
|
9966 <rdar://problem/4406785> Add an export file to TOT JavaScriptCore like the Safari-2-0-branch |
|
9967 |
|
9968 * JavaScriptCore.exp: Added. |
|
9969 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
9970 |
|
9971 2006-06-25 Geoffrey Garen <ggaren@apple.com> |
|
9972 |
|
9973 Reviewed by Adele. |
|
9974 |
|
9975 - Added JSConstructorMake to match JSFunctionMake, along with test code. |
|
9976 |
|
9977 [ I checked in the ChangeLog before without the actual files. ] |
|
9978 |
|
9979 * API/JSObjectRef.cpp: |
|
9980 (JSConstructorMake): |
|
9981 * API/JSObjectRef.h: |
|
9982 * API/testapi.c: |
|
9983 (myConstructor_callAsConstructor): |
|
9984 (main): |
|
9985 * API/testapi.js: |
|
9986 * ChangeLog: |
|
9987 * JavaScriptCore.xcodeproj/project.pbxproj: Moved testapi.c to the testapi |
|
9988 target -- this was an oversight in my earlier check-in. |
|
9989 |
|
9990 2006-06-25 Timothy Hatcher <timothy@apple.com> |
|
9991 |
|
9992 Reviewed by Darin. |
|
9993 |
|
9994 Bug 9574: Drosera should show inline scripts within the original HTML |
|
9995 http://bugs.webkit.org/show_bug.cgi?id=9574 |
|
9996 |
|
9997 Pass the starting line number and error message to the debugger. |
|
9998 |
|
9999 * kjs/debugger.cpp: |
|
10000 (Debugger::sourceParsed): |
|
10001 * kjs/debugger.h: |
|
10002 * kjs/function.cpp: |
|
10003 (KJS::GlobalFuncImp::callAsFunction): |
|
10004 * kjs/function_object.cpp: |
|
10005 (FunctionObjectImp::construct): |
|
10006 * kjs/interpreter.cpp: |
|
10007 (KJS::Interpreter::evaluate): |
|
10008 |
|
10009 2006-06-24 Alexey Proskuryakov <ap@nypop.com> |
|
10010 |
|
10011 Rubber-stamped by Eric. |
|
10012 |
|
10013 Add a -h (do not follow symlinks) option to ln in derived sources build script (without it, |
|
10014 a symlink was created inside the source directory on second build). |
|
10015 |
|
10016 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
10017 |
|
10018 2006-06-24 David Kilzer <ddkilzer@kilzer.net> |
|
10019 |
|
10020 Reviewed by Timothy. |
|
10021 |
|
10022 * Info.plist: Fixed copyright to include 2003-2006. |
|
10023 |
|
10024 2006-06-24 Alexey Proskuryakov <ap@nypop.com> |
|
10025 |
|
10026 Reviewed by Darin. |
|
10027 |
|
10028 - http://bugs.webkit.org/show_bug.cgi?id=9418 |
|
10029 WebKit will not build when Space exists in path |
|
10030 |
|
10031 * JavaScriptCore.xcodeproj/project.pbxproj: Enclose search paths in quotes; create symlinks to |
|
10032 avoid passing paths with spaces to make. |
|
10033 |
|
10034 2006-06-23 Timothy Hatcher <timothy@apple.com> |
|
10035 |
|
10036 Reviewed by Darin. |
|
10037 |
|
10038 Adding more operator[] overloads for long and short types. |
|
10039 |
|
10040 * wtf/Vector.h: |
|
10041 (WTF::Vector::operator[]): |
|
10042 |
|
10043 === JavaScriptCore-521.13 === |
|
10044 |
|
10045 2006-06-22 Alexey Proskuryakov <ap@nypop.com> |
|
10046 |
|
10047 Build fix. |
|
10048 |
|
10049 - http://bugs.webkit.org/show_bug.cgi?id=9539 |
|
10050 Another case error preventing build |
|
10051 |
|
10052 * API/JSObjectRef.cpp: Changed "identifier.h" to "Identifier.h" |
|
10053 |
|
10054 2006-06-22 David Kilzer <ddkilzer@kilzer.net> |
|
10055 |
|
10056 Build fix. |
|
10057 |
|
10058 http://bugs.webkit.org/show_bug.cgi?id=9539 |
|
10059 Another case error preventing build |
|
10060 |
|
10061 * API/APICast.h: Changed "UString.h" to "ustring.h". |
|
10062 |
|
10063 2006-06-21 Geoffrey Garen <ggaren@apple.com> |
|
10064 |
|
10065 Fixed release build, fixed accidental infinite recursion due to |
|
10066 last minute global replace gone awry. |
|
10067 |
|
10068 * API/APICast.h: |
|
10069 (toRef): |
|
10070 * API/testapi.c: |
|
10071 (assertEqualsAsBoolean): |
|
10072 (assertEqualsAsNumber): |
|
10073 (assertEqualsAsUTF8String): |
|
10074 (assertEqualsAsCharactersPtr): |
|
10075 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
10076 |
|
10077 2006-06-21 Geoffrey Garen <ggaren@apple.com> |
|
10078 |
|
10079 Reviewed by Anders. |
|
10080 |
|
10081 - First cut at C API to JavaScript. Includes a unit test, 'testapi.c', |
|
10082 and the outline of a test app, 'minidom.c'. |
|
10083 |
|
10084 Includes one change to JSC internals: Rename propList to getPropertyList and have it |
|
10085 take its target property list by reference so that subclasses can |
|
10086 add properties to the list before calling through to their superclasses. |
|
10087 |
|
10088 Also, I just ran prepare-ChangeLog in about 10 seconds, and I would like |
|
10089 to give a shout-out to that. |
|
10090 |
|
10091 * API/APICast.h: Added. |
|
10092 (toJS): |
|
10093 (toRef): |
|
10094 * API/JSBase.h: Added. |
|
10095 * API/JSCallbackObject.cpp: Added. |
|
10096 (KJS::): |
|
10097 (KJS::JSCallbackObject::JSCallbackObject): |
|
10098 (KJS::JSCallbackObject::~JSCallbackObject): |
|
10099 (KJS::JSCallbackObject::className): |
|
10100 (KJS::JSCallbackObject::getOwnPropertySlot): |
|
10101 (KJS::JSCallbackObject::put): |
|
10102 (KJS::JSCallbackObject::deleteProperty): |
|
10103 (KJS::JSCallbackObject::implementsConstruct): |
|
10104 (KJS::JSCallbackObject::construct): |
|
10105 (KJS::JSCallbackObject::implementsCall): |
|
10106 (KJS::JSCallbackObject::callAsFunction): |
|
10107 (KJS::JSCallbackObject::getPropertyList): |
|
10108 (KJS::JSCallbackObject::toBoolean): |
|
10109 (KJS::JSCallbackObject::toNumber): |
|
10110 (KJS::JSCallbackObject::toString): |
|
10111 (KJS::JSCallbackObject::setPrivate): |
|
10112 (KJS::JSCallbackObject::getPrivate): |
|
10113 (KJS::JSCallbackObject::cachedValueGetter): |
|
10114 (KJS::JSCallbackObject::callbackGetter): |
|
10115 * API/JSCallbackObject.h: Added. |
|
10116 (KJS::JSCallbackObject::classInfo): |
|
10117 * API/JSCharBufferRef.cpp: Added. |
|
10118 (JSStringMake): |
|
10119 (JSCharBufferCreate): |
|
10120 (JSCharBufferCreateUTF8): |
|
10121 (JSCharBufferRetain): |
|
10122 (JSCharBufferRelease): |
|
10123 (JSValueCopyStringValue): |
|
10124 (JSCharBufferGetLength): |
|
10125 (JSCharBufferGetCharactersPtr): |
|
10126 (JSCharBufferGetCharacters): |
|
10127 (JSCharBufferGetMaxLengthUTF8): |
|
10128 (JSCharBufferGetCharactersUTF8): |
|
10129 (JSCharBufferIsEqual): |
|
10130 (JSCharBufferIsEqualUTF8): |
|
10131 (JSCharBufferCreateWithCFString): |
|
10132 (CFStringCreateWithJSCharBuffer): |
|
10133 * API/JSCharBufferRef.h: Added. |
|
10134 * API/JSContextRef.cpp: Added. |
|
10135 (JSContextCreate): |
|
10136 (JSContextDestroy): |
|
10137 (JSContextGetGlobalObject): |
|
10138 (JSEvaluate): |
|
10139 (JSCheckSyntax): |
|
10140 (JSContextHasException): |
|
10141 (JSContextGetException): |
|
10142 (JSContextClearException): |
|
10143 (JSContextSetException): |
|
10144 * API/JSContextRef.h: Added. |
|
10145 * API/JSObjectRef.cpp: Added. |
|
10146 (JSValueToObject): |
|
10147 (JSObjectMake): |
|
10148 (JSFunctionMake): |
|
10149 (JSObjectGetDescription): |
|
10150 (JSObjectGetPrototype): |
|
10151 (JSObjectSetPrototype): |
|
10152 (JSObjectHasProperty): |
|
10153 (JSObjectGetProperty): |
|
10154 (JSObjectSetProperty): |
|
10155 (JSObjectDeleteProperty): |
|
10156 (JSObjectGetPrivate): |
|
10157 (JSObjectSetPrivate): |
|
10158 (JSObjectIsFunction): |
|
10159 (JSObjectCallAsFunction): |
|
10160 (JSObjectIsConstructor): |
|
10161 (JSObjectCallAsConstructor): |
|
10162 (__JSPropertyListEnumerator::__JSPropertyListEnumerator): |
|
10163 (JSObjectCreatePropertyEnumerator): |
|
10164 (JSPropertyEnumeratorGetNext): |
|
10165 (JSPropertyEnumeratorRetain): |
|
10166 (JSPropertyEnumeratorRelease): |
|
10167 (JSPropertyListAdd): |
|
10168 * API/JSObjectRef.h: Added. |
|
10169 * API/JSValueRef.cpp: Added. |
|
10170 (JSValueGetType): |
|
10171 (JSValueIsUndefined): |
|
10172 (JSValueIsNull): |
|
10173 (JSValueIsBoolean): |
|
10174 (JSValueIsNumber): |
|
10175 (JSValueIsString): |
|
10176 (JSValueIsObject): |
|
10177 (JSValueIsEqual): |
|
10178 (JSValueIsStrictEqual): |
|
10179 (JSUndefinedMake): |
|
10180 (JSNullMake): |
|
10181 (JSBooleanMake): |
|
10182 (JSNumberMake): |
|
10183 (JSValueToBoolean): |
|
10184 (JSValueToNumber): |
|
10185 (JSGCProtect): |
|
10186 (JSGCUnprotect): |
|
10187 (JSGCCollect): |
|
10188 * API/JSValueRef.h: Added. |
|
10189 * API/JavaScriptCore.h: Added. |
|
10190 * API/minidom.c: Added. |
|
10191 (main): |
|
10192 * API/minidom.html: Added. |
|
10193 * API/minidom.js: Added. |
|
10194 * API/testapi.c: Added. |
|
10195 (assertEqualsAsBoolean): |
|
10196 (assertEqualsAsNumber): |
|
10197 (assertEqualsAsUTF8String): |
|
10198 (assertEqualsAsCharactersPtr): |
|
10199 (assertEqualsAsCharacters): |
|
10200 (MyObject_initialize): |
|
10201 (MyObject_copyDescription): |
|
10202 (MyObject_hasProperty): |
|
10203 (MyObject_getProperty): |
|
10204 (MyObject_setProperty): |
|
10205 (MyObject_deleteProperty): |
|
10206 (MyObject_getPropertyList): |
|
10207 (MyObject_callAsFunction): |
|
10208 (MyObject_callAsConstructor): |
|
10209 (MyObject_convertToType): |
|
10210 (MyObject_finalize): |
|
10211 (print_callAsFunction): |
|
10212 (main): |
|
10213 (createStringWithContentsOfFile): |
|
10214 * API/testapi.js: Added. |
|
10215 * ChangeLog: |
|
10216 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
10217 * bindings/npruntime_impl.h: |
|
10218 * kjs/array_instance.h: |
|
10219 * kjs/array_object.cpp: |
|
10220 (ArrayInstance::getPropertyList): |
|
10221 * kjs/interpreter.cpp: |
|
10222 (KJS::Interpreter::evaluate): |
|
10223 * kjs/nodes.cpp: |
|
10224 (ForInNode::execute): |
|
10225 * kjs/object.cpp: |
|
10226 (KJS::JSObject::put): |
|
10227 (KJS::JSObject::canPut): |
|
10228 (KJS::JSObject::deleteProperty): |
|
10229 (KJS::JSObject::propertyIsEnumerable): |
|
10230 (KJS::JSObject::getPropertyAttributes): |
|
10231 (KJS::JSObject::getPropertyList): |
|
10232 * kjs/object.h: |
|
10233 * kjs/property_map.cpp: |
|
10234 (KJS::PropertyMap::get): |
|
10235 * kjs/property_map.h: |
|
10236 * kjs/scope_chain.cpp: |
|
10237 (KJS::ScopeChain::print): |
|
10238 * kjs/string_object.cpp: |
|
10239 (StringInstance::getPropertyList): |
|
10240 * kjs/string_object.h: |
|
10241 * kjs/ustring.h: |
|
10242 (KJS::UString::Rep::ref): |
|
10243 |
|
10244 2006-06-20 Timothy Hatcher <timothy@apple.com> |
|
10245 |
|
10246 Reviewed by Geoff. |
|
10247 |
|
10248 Make sure we clear the exception before returning so |
|
10249 that future calls will not fail because of an earlier |
|
10250 exception state. Assert on entry that the WebScriptObject |
|
10251 is working with an ExecState that dose not have an exception. |
|
10252 Document that evaluateWebScript and callWebScriptMethod return |
|
10253 WebUndefined when an exception is thrown. |
|
10254 |
|
10255 * bindings/objc/WebScriptObject.h: |
|
10256 * bindings/objc/WebScriptObject.mm: |
|
10257 (-[WebScriptObject callWebScriptMethod:withArguments:]): |
|
10258 (-[WebScriptObject evaluateWebScript:]): |
|
10259 (-[WebScriptObject setValue:forKey:]): |
|
10260 (-[WebScriptObject valueForKey:]): |
|
10261 (-[WebScriptObject removeWebScriptKey:]): |
|
10262 (-[WebScriptObject webScriptValueAtIndex:]): |
|
10263 (-[WebScriptObject setWebScriptValueAtIndex:value:]): |
|
10264 |
|
10265 2006-06-19 Anders Carlsson <acarlsson@apple.com> |
|
10266 |
|
10267 Reviewed by John. |
|
10268 |
|
10269 * kjs/interpreter.cpp: |
|
10270 (KJS::TimeoutChecker::pauseTimeoutCheck): |
|
10271 (KJS::TimeoutChecker::resumeTimeoutCheck): |
|
10272 Fix argument order in setitimer calls. |
|
10273 |
|
10274 2006-06-18 Anders Carlsson <acarlsson@apple.com> |
|
10275 |
|
10276 Reviewed by Geoff. |
|
10277 |
|
10278 * kjs/interpreter.cpp: |
|
10279 (KJS::TimeoutChecker::pauseTimeoutCheck): |
|
10280 Do nothing if the timeout check hasn't been started. |
|
10281 |
|
10282 (KJS::TimeoutChecker::resumeTimeoutCheck): |
|
10283 Do nothing if the timeout check hasn't been started. |
|
10284 Use the right signal handler when unblocking. |
|
10285 |
|
10286 (KJS::Interpreter::handleTimeout): |
|
10287 pause/resume the timeout check around the call to |
|
10288 shouldInterruptScript(). |
|
10289 |
|
10290 2006-06-16 Ben Goodger <beng@google.com> |
|
10291 |
|
10292 Reviewed by Maciej |
|
10293 |
|
10294 http://bugs.webkit.org/show_bug.cgi?id=9491 |
|
10295 Windows build breaks in interpreter.cpp |
|
10296 |
|
10297 * kjs/interpreter.cpp |
|
10298 (KJS::TimeoutChecker::pauseTimeoutCheck): |
|
10299 (KJS::TimeoutChecker::resumeTimeoutCheck): |
|
10300 Make sure to only assert equality with s_executingInterpreter when it |
|
10301 is being used (i.e. when HAVE(SYS_TIME_H) == true) |
|
10302 |
|
10303 2006-06-17 David Kilzer <ddkilzer@kilzer.net> |
|
10304 |
|
10305 Reviewed by darin. |
|
10306 |
|
10307 http://bugs.webkit.org/show_bug.cgi?id=9477 |
|
10308 REGRESSION: fast/dom/replaceChild.html crashes on WebKit ToT in debug build |
|
10309 |
|
10310 * kjs/function.cpp: |
|
10311 (KJS::FunctionImp::callAsFunction): Refetch the debugger after executing the function |
|
10312 in case the WebFrame it was running in has since been destroyed. |
|
10313 |
|
10314 2006-06-17 David Kilzer <ddkilzer@kilzer.net> |
|
10315 |
|
10316 Reviewed by ggaren. |
|
10317 |
|
10318 http://bugs.webkit.org/show_bug.cgi?id=9476 |
|
10319 REGRESSION: Reproducible crash after closing window after viewing |
|
10320 css2.1/t0803-c5501-imrgn-t-00-b-ag.html |
|
10321 |
|
10322 * kjs/debugger.cpp: |
|
10323 (Debugger::detach): Call setDebugger(0) for all interpreters removed from |
|
10324 the 'attached to a debugger' list. |
|
10325 |
|
10326 2006-06-17 Anders Carlsson <acarlsson@apple.com> |
|
10327 |
|
10328 Reviewed by Maciej and Geoff. |
|
10329 |
|
10330 http://bugs.webkit.org/show_bug.cgi?id=7080 |
|
10331 Provide some way to stop a JavaScript infinite loop |
|
10332 |
|
10333 * kjs/completion.h: |
|
10334 (KJS::): |
|
10335 Add Interrupted completion type. |
|
10336 |
|
10337 * kjs/function.cpp: |
|
10338 (KJS::FunctionImp::callAsFunction): |
|
10339 (KJS::GlobalFuncImp::callAsFunction): |
|
10340 Only set the exception on the new ExecState if the current one has had one. |
|
10341 |
|
10342 * kjs/interpreter.cpp: |
|
10343 (KJS::TimeoutChecker::startTimeoutCheck): |
|
10344 (KJS::TimeoutChecker::stopTimeoutCheck): |
|
10345 (KJS::TimeoutChecker::alarmHandler): |
|
10346 (KJS::TimeoutChecker::pauseTimeoutCheck): |
|
10347 (KJS::TimeoutChecker::resumeTimeoutCheck): |
|
10348 New TimeoutChecker class which handles setting Interpreter::m_timedOut flag after a given |
|
10349 period of time. This currently only works on Unix platforms where setitimer and signals are used. |
|
10350 |
|
10351 (KJS::Interpreter::Interpreter): |
|
10352 Initialize new member variables. |
|
10353 |
|
10354 (KJS::Interpreter::~Interpreter): |
|
10355 Destroy the timeout checker. |
|
10356 |
|
10357 (KJS::Interpreter::startTimeoutCheck): |
|
10358 (KJS::Interpreter::stopTimeoutCheck): |
|
10359 (KJS::Interpreter::pauseTimeoutCheck): |
|
10360 (KJS::Interpreter::resumeTimeoutCheck): |
|
10361 Call the timeout checker. |
|
10362 |
|
10363 (KJS::Interpreter::handleTimeout): |
|
10364 Called on timeout. Resets the m_timedOut flag and calls shouldInterruptScript. |
|
10365 |
|
10366 * kjs/interpreter.h: |
|
10367 (KJS::Interpreter::setTimeoutTime): |
|
10368 New function for setting the timeout time. |
|
10369 |
|
10370 (KJS::Interpreter::shouldInterruptScript): |
|
10371 New function. The idea is that this should be overridden by subclasses in order to for example |
|
10372 pop up a dialog asking the user if the script should be interrupted. |
|
10373 |
|
10374 (KJS::Interpreter::checkTimeout): |
|
10375 New function which checks the m_timedOut flag and calls handleTimeout if it's set. |
|
10376 |
|
10377 * kjs/nodes.cpp: |
|
10378 (DoWhileNode::execute): |
|
10379 (WhileNode::execute): |
|
10380 (ForNode::execute): |
|
10381 Call Interpreter::checkTimeout after each iteration of the loop. |
|
10382 |
|
10383 2006-06-15 Timothy Hatcher <timothy@apple.com> |
|
10384 |
|
10385 Reviewed by Geoff and Darin. |
|
10386 |
|
10387 Prefer the DWARF debugging symbols format for use in Xcode 2.3. |
|
10388 |
|
10389 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
10390 |
|
10391 2006-06-14 Geoffrey Garen <ggaren@apple.com> |
|
10392 |
|
10393 Reviewed by Beth. |
|
10394 |
|
10395 - fixed http://bugs.webkit.org/show_bug.cgi?id=9438 |
|
10396 Someone broke ToT: cannot build |
|
10397 |
|
10398 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
10399 * bindings/runtime_root.h: Changed "Interpreter.h" to "interpreter.h" |
|
10400 |
|
10401 2006-06-12 Geoffrey Garen <ggaren@apple.com> |
|
10402 |
|
10403 build fix |
|
10404 |
|
10405 * bindings/objc/WebScriptObject.mm: |
|
10406 (+[WebScriptObject throwException:]): Restore assignment I accidentally |
|
10407 deleted in previous commit |
|
10408 |
|
10409 2006-06-12 Geoffrey Garen <ggaren@apple.com> |
|
10410 |
|
10411 Reviewed by TimO, Maciej. |
|
10412 |
|
10413 - Merged InterpreterImp code into Interpreter, which implements |
|
10414 all interpreter functionality now. This is part of my continuing quest |
|
10415 to create an external notion of JS "execution context" that is unified and simple -- |
|
10416 something to replace the mix of Context, ContextImp, ExecState, Interpreter, |
|
10417 InterpreterImp, and JSRun. |
|
10418 |
|
10419 All tests pass. Leaks test has not regressed from its baseline ~207 leaks |
|
10420 with ~3460 leaked nodes. |
|
10421 |
|
10422 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
10423 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
10424 * bindings/NP_jsobject.cpp: |
|
10425 * bindings/objc/WebScriptObject.mm: |
|
10426 (+[WebScriptObject throwException:]): |
|
10427 * bindings/runtime_root.cpp: |
|
10428 * bindings/runtime_root.h: |
|
10429 * kjs/Context.cpp: |
|
10430 (KJS::Context::Context): |
|
10431 * kjs/ExecState.cpp: Added. |
|
10432 (KJS::ExecState::lexicalInterpreter): |
|
10433 * kjs/ExecState.h: Added. |
|
10434 (KJS::ExecState::dynamicInterpreter): |
|
10435 * kjs/SavedBuiltins.h: Added. |
|
10436 * kjs/bool_object.cpp: |
|
10437 (BooleanPrototype::BooleanPrototype): |
|
10438 * kjs/collector.cpp: |
|
10439 (KJS::Collector::collect): |
|
10440 (KJS::Collector::numInterpreters): |
|
10441 * kjs/context.h: |
|
10442 * kjs/debugger.cpp: |
|
10443 (Debugger::attach): |
|
10444 (Debugger::detach): |
|
10445 * kjs/function.cpp: |
|
10446 (KJS::FunctionImp::callAsFunction): |
|
10447 (KJS::GlobalFuncImp::callAsFunction): |
|
10448 * kjs/function_object.cpp: |
|
10449 (FunctionObjectImp::construct): |
|
10450 * kjs/internal.cpp: |
|
10451 * kjs/internal.h: |
|
10452 * kjs/interpreter.cpp: |
|
10453 (KJS::interpreterMap): |
|
10454 (KJS::Interpreter::Interpreter): |
|
10455 (KJS::Interpreter::init): |
|
10456 (KJS::Interpreter::~Interpreter): |
|
10457 (KJS::Interpreter::globalObject): |
|
10458 (KJS::Interpreter::initGlobalObject): |
|
10459 (KJS::Interpreter::globalExec): |
|
10460 (KJS::Interpreter::checkSyntax): |
|
10461 (KJS::Interpreter::evaluate): |
|
10462 (KJS::Interpreter::builtinObject): |
|
10463 (KJS::Interpreter::builtinFunction): |
|
10464 (KJS::Interpreter::builtinArray): |
|
10465 (KJS::Interpreter::builtinBoolean): |
|
10466 (KJS::Interpreter::builtinString): |
|
10467 (KJS::Interpreter::builtinNumber): |
|
10468 (KJS::Interpreter::builtinDate): |
|
10469 (KJS::Interpreter::builtinRegExp): |
|
10470 (KJS::Interpreter::builtinError): |
|
10471 (KJS::Interpreter::builtinObjectPrototype): |
|
10472 (KJS::Interpreter::builtinFunctionPrototype): |
|
10473 (KJS::Interpreter::builtinArrayPrototype): |
|
10474 (KJS::Interpreter::builtinBooleanPrototype): |
|
10475 (KJS::Interpreter::builtinStringPrototype): |
|
10476 (KJS::Interpreter::builtinNumberPrototype): |
|
10477 (KJS::Interpreter::builtinDatePrototype): |
|
10478 (KJS::Interpreter::builtinRegExpPrototype): |
|
10479 (KJS::Interpreter::builtinErrorPrototype): |
|
10480 (KJS::Interpreter::builtinEvalError): |
|
10481 (KJS::Interpreter::builtinRangeError): |
|
10482 (KJS::Interpreter::builtinReferenceError): |
|
10483 (KJS::Interpreter::builtinSyntaxError): |
|
10484 (KJS::Interpreter::builtinTypeError): |
|
10485 (KJS::Interpreter::builtinURIError): |
|
10486 (KJS::Interpreter::builtinEvalErrorPrototype): |
|
10487 (KJS::Interpreter::builtinRangeErrorPrototype): |
|
10488 (KJS::Interpreter::builtinReferenceErrorPrototype): |
|
10489 (KJS::Interpreter::builtinSyntaxErrorPrototype): |
|
10490 (KJS::Interpreter::builtinTypeErrorPrototype): |
|
10491 (KJS::Interpreter::builtinURIErrorPrototype): |
|
10492 (KJS::Interpreter::mark): |
|
10493 (KJS::Interpreter::interpreterWithGlobalObject): |
|
10494 (KJS::Interpreter::saveBuiltins): |
|
10495 (KJS::Interpreter::restoreBuiltins): |
|
10496 * kjs/interpreter.h: |
|
10497 (KJS::Interpreter::setCompatMode): |
|
10498 (KJS::Interpreter::compatMode): |
|
10499 (KJS::Interpreter::firstInterpreter): |
|
10500 (KJS::Interpreter::nextInterpreter): |
|
10501 (KJS::Interpreter::prevInterpreter): |
|
10502 (KJS::Interpreter::debugger): |
|
10503 (KJS::Interpreter::setDebugger): |
|
10504 (KJS::Interpreter::setContext): |
|
10505 (KJS::Interpreter::context): |
|
10506 * kjs/nodes.cpp: |
|
10507 (StatementNode::hitStatement): |
|
10508 (RegExpNode::evaluate): |
|
10509 * kjs/protect.h: |
|
10510 |
|
10511 2006-06-12 Geoffrey Garen <ggaren@apple.com> |
|
10512 |
|
10513 Reviewed by Maciej. |
|
10514 |
|
10515 - Have *.lut.h files #include lookup.h to eliminate surprising header |
|
10516 include order dependency. |
|
10517 |
|
10518 * DerivedSources.make: |
|
10519 * kjs/array_object.cpp: |
|
10520 * kjs/date_object.cpp: |
|
10521 * kjs/date_object.h: |
|
10522 (KJS::DateProtoFunc::): |
|
10523 * kjs/lexer.cpp: |
|
10524 * kjs/math_object.cpp: |
|
10525 * kjs/number_object.cpp: |
|
10526 * kjs/regexp_object.cpp: |
|
10527 * kjs/string_object.cpp: |
|
10528 |
|
10529 2006-06-10 Geoffrey Garen <ggaren@apple.com> |
|
10530 |
|
10531 - http://bugs.webkit.org/show_bug.cgi?id=8515 |
|
10532 Linux porting compile bug |
|
10533 |
|
10534 Fix by Mike Emmel, Reviewed by Darin. |
|
10535 |
|
10536 * JavaScriptCoreSources.bkl: |
|
10537 * jscore.bkl: |
|
10538 * wtf/Platform.h: |
|
10539 |
|
10540 2006-06-09 Geoffrey Garen <ggaren@apple.com> |
|
10541 |
|
10542 Build fix -- I think :). |
|
10543 |
|
10544 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
10545 * kjs/context.h: |
|
10546 |
|
10547 2006-06-09 Geoffrey Garen <ggaren@apple.com> |
|
10548 |
|
10549 Reviewed by Eric (yay!). |
|
10550 |
|
10551 - Removed Context wrapper for ContextImp, renamed ContextImp to Context, |
|
10552 split Context into its own file -- Context.cpp -- renamed _var to m_var, |
|
10553 change ' *' to '* '. |
|
10554 |
|
10555 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
10556 * kjs/Context.cpp: Added. |
|
10557 (KJS::Context::Context): |
|
10558 (KJS::Context::~Context): |
|
10559 (KJS::Context::mark): |
|
10560 * kjs/context.h: |
|
10561 (KJS::Context::scopeChain): |
|
10562 (KJS::Context::variableObject): |
|
10563 (KJS::Context::setVariableObject): |
|
10564 (KJS::Context::thisValue): |
|
10565 (KJS::Context::callingContext): |
|
10566 (KJS::Context::activationObject): |
|
10567 (KJS::Context::currentBody): |
|
10568 (KJS::Context::function): |
|
10569 (KJS::Context::arguments): |
|
10570 (KJS::Context::pushScope): |
|
10571 (KJS::Context::seenLabels): |
|
10572 * kjs/function.cpp: |
|
10573 (KJS::FunctionImp::callAsFunction): |
|
10574 (KJS::FunctionImp::processParameters): |
|
10575 (KJS::FunctionImp::argumentsGetter): |
|
10576 (KJS::GlobalFuncImp::callAsFunction): |
|
10577 * kjs/internal.cpp: |
|
10578 (KJS::InterpreterImp::evaluate): |
|
10579 * kjs/internal.h: |
|
10580 (KJS::InterpreterImp::setContext): |
|
10581 (KJS::InterpreterImp::context): |
|
10582 * kjs/interpreter.cpp: |
|
10583 * kjs/interpreter.h: |
|
10584 (KJS::ExecState::context): |
|
10585 (KJS::ExecState::ExecState): |
|
10586 * kjs/nodes.cpp: |
|
10587 (currentSourceId): |
|
10588 (currentSourceURL): |
|
10589 (ThisNode::evaluate): |
|
10590 (ResolveNode::evaluate): |
|
10591 (FunctionCallResolveNode::evaluate): |
|
10592 (PostfixResolveNode::evaluate): |
|
10593 (DeleteResolveNode::evaluate): |
|
10594 (TypeOfResolveNode::evaluate): |
|
10595 (PrefixResolveNode::evaluate): |
|
10596 (AssignResolveNode::evaluate): |
|
10597 (VarDeclNode::evaluate): |
|
10598 (VarDeclNode::processVarDecls): |
|
10599 (DoWhileNode::execute): |
|
10600 (WhileNode::execute): |
|
10601 (ForNode::execute): |
|
10602 (ForInNode::execute): |
|
10603 (ContinueNode::execute): |
|
10604 (BreakNode::execute): |
|
10605 (ReturnNode::execute): |
|
10606 (WithNode::execute): |
|
10607 (SwitchNode::execute): |
|
10608 (LabelNode::execute): |
|
10609 (TryNode::execute): |
|
10610 (FuncDeclNode::processFuncDecl): |
|
10611 (FuncExprNode::evaluate): |
|
10612 |
|
10613 2006-06-07 Geoffrey Garen <ggaren@apple.com> |
|
10614 |
|
10615 Removed API directory I prematurely/accidentally added. |
|
10616 |
|
10617 * API: Removed. |
|
10618 |
|
10619 2006-06-05 Mitz Pettel <opendarwin.org@mitzpettel.com> |
|
10620 |
|
10621 Reviewed and landed by Geoff. |
|
10622 |
|
10623 - fix a regression in ecma_3/String/regress-104375.js |
|
10624 |
|
10625 * kjs/string_object.cpp: |
|
10626 (substituteBackreferences): If a 2-digit back reference is out of range, |
|
10627 parse it as a 1-digit reference (followed by the other digit). This matches |
|
10628 Firefox's behavior. |
|
10629 |
|
10630 2006-06-05 Geoffrey Garen <ggaren@apple.com> |
|
10631 |
|
10632 Reviewed By Maciej. |
|
10633 Darin already reviewed this change on the branch. See <rdar://problem/4317701>. |
|
10634 |
|
10635 - Fixed <rdar://problem/4291345> PCRE overflow in Safari JavaScriptCore |
|
10636 |
|
10637 No test case because there's no behavior change. |
|
10638 |
|
10639 * pcre/pcre_compile.c: |
|
10640 (read_repeat_counts): Check for integer overflow / out of bounds |
|
10641 |
|
10642 2006-06-05 Geoffrey Garen <ggaren@apple.com> |
|
10643 |
|
10644 Reviewed by aliu. |
|
10645 |
|
10646 - Changed CString length from int to size_t. We sould probably do this |
|
10647 for UString, too. (Darin, if you're reading this: Maciej said so.) |
|
10648 |
|
10649 * kjs/function.cpp: |
|
10650 (KJS::encode): |
|
10651 * kjs/ustring.cpp: |
|
10652 (KJS::CString::CString): |
|
10653 (KJS::operator==): |
|
10654 * kjs/ustring.h: |
|
10655 (KJS::CString::size): |
|
10656 |
|
10657 2006-06-04 Geoffrey Garen <ggaren@apple.com> |
|
10658 |
|
10659 Reviewed by Maciej. |
|
10660 |
|
10661 - http://bugs.webkit.org/show_bug.cgi?id=9304 |
|
10662 Minor cleanup in JavaScriptCore |
|
10663 |
|
10664 * kjs/value.h: Removed redundant declarations |
|
10665 |
|
10666 2006-06-04 Darin Adler <darin@apple.com> |
|
10667 |
|
10668 Reviewed by Anders. |
|
10669 |
|
10670 - changed deleteAllValues so it can work on "const" collections |
|
10671 Deleting the values affects the values, not the pointers in the |
|
10672 collection, so it's legitimate to do it to a const collection, |
|
10673 and a case of that actually came up in the XPath code. |
|
10674 |
|
10675 * wtf/HashMap.h: |
|
10676 (WTF::deleteAllPairSeconds): Use const iterators. |
|
10677 (WTF::deleteAllValues): Take const HashMap reference as a parameter. |
|
10678 * wtf/HashSet.h: |
|
10679 (WTF::deleteAllValues): Take const HashSet reference as a parameter, |
|
10680 and use const iterators. |
|
10681 * wtf/Vector.h: |
|
10682 (WTF::deleteAllValues): Take const Vector reference as a parameter. |
|
10683 |
|
10684 - added more functions that are present in <math.h> on some platforms, |
|
10685 but not on others; moved here from various files in WebCore |
|
10686 |
|
10687 * wtf/MathExtras.h: |
|
10688 (isinf): Added. |
|
10689 (isnan): Added. |
|
10690 (lround): Added. |
|
10691 (lroundf): Tweaked. |
|
10692 (round): Added. |
|
10693 (roundf): Tweaked. |
|
10694 (signbit): Added. |
|
10695 |
|
10696 2006-06-02 Mitz Pettel <opendarwin.org@mitzpettel.com> |
|
10697 |
|
10698 Reviewed by ggaren. |
|
10699 |
|
10700 - http://bugs.webkit.org/show_bug.cgi?id=9234 |
|
10701 Implement $&, $' and $` replacement codes in String.prototype.replace |
|
10702 |
|
10703 Test: fast/js/string-replace-3.html |
|
10704 |
|
10705 * kjs/string_object.cpp: |
|
10706 (substituteBackreferences): Added support for $& (matched substring), |
|
10707 $` (everything preceding matched substring), $' (everything following |
|
10708 matched substring) and 2-digit back references, and cleaned up a little. |
|
10709 |
|
10710 2006-06-02 Adele Peterson <adele@apple.com> |
|
10711 |
|
10712 Reviewed by Darin. |
|
10713 |
|
10714 Set incremental linking to no. This seems to fix a build problem I was seeing |
|
10715 where dftables couldn't find a dll. |
|
10716 |
|
10717 * JavaScriptCore.vcproj/dftables/dftables.vcproj: |
|
10718 |
|
10719 2006-05-26 Steve Falkenburg <sfalken@apple.com> |
|
10720 |
|
10721 Build fixes/tweaks |
|
10722 |
|
10723 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
10724 |
|
10725 === JavaScriptCore-521.11 === |
|
10726 |
|
10727 2006-05-24 Geoffrey Garen <ggaren@apple.com> |
|
10728 |
|
10729 Reviewed by mjs. |
|
10730 |
|
10731 - JSC half of fix for <rdar://problem/4557926> TOT REGRESSSION: Crash |
|
10732 occurs when attempting to view image in slideshow mode at |
|
10733 http://d.smugmug.com/gallery/581716 ( KJS::IfNode::execute |
|
10734 (KJS::ExecState*) + 312) |
|
10735 |
|
10736 On alternate threads, DOMObjects remain in the |
|
10737 ScriptInterpreter's cache because they're not collected. So, they |
|
10738 need an opportunity to mark their children. |
|
10739 |
|
10740 I'm not particularly happy with this solution because it fails to |
|
10741 resolve many outstanding issues with the DOM object cache. Since none |
|
10742 of those issues is a crasher or a serious compatibility concern, |
|
10743 and since the behavior of other browsers is not much to go on in this |
|
10744 case, I've filed <rdar://problem/4561439> about that, and I'm moving on |
|
10745 with my life. |
|
10746 |
|
10747 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
10748 * kjs/collector.cpp: |
|
10749 (KJS::Collector::collect): |
|
10750 * kjs/internal.cpp: |
|
10751 (KJS::InterpreterImp::mark): |
|
10752 * kjs/internal.h: |
|
10753 * kjs/interpreter.cpp: |
|
10754 (KJS::Interpreter::mark): |
|
10755 * kjs/interpreter.h: |
|
10756 |
|
10757 === JavaScriptCore-521.10 === |
|
10758 |
|
10759 2006-05-22 Timothy Hatcher <timothy@apple.com> |
|
10760 |
|
10761 Reviewed by Eric, Kevin and Geoff. |
|
10762 |
|
10763 Merge open source build fixes. <rdar://problem/4555500> |
|
10764 |
|
10765 * kjs/collector.cpp: look at the rsp register in x86_64 |
|
10766 (KJS::Collector::markOtherThreadConservatively): |
|
10767 * wtf/Platform.h: add x86_64 to the platform list |
|
10768 |
|
10769 2006-05-19 Anders Carlsson <acarlsson@apple.com> |
|
10770 |
|
10771 Reviewed by Geoff. |
|
10772 |
|
10773 http://bugs.webkit.org/show_bug.cgi?id=8993 |
|
10774 Support function declaration in case statements |
|
10775 |
|
10776 * kjs/grammar.y: Get rid of StatementList and use SourceElements instead. |
|
10777 |
|
10778 * kjs/nodes.cpp: |
|
10779 (CaseClauseNode::evalStatements): |
|
10780 (CaseClauseNode::processVarDecls): |
|
10781 (CaseClauseNode::processFuncDecl): |
|
10782 (ClauseListNode::processFuncDecl): |
|
10783 (CaseBlockNode::processFuncDecl): |
|
10784 (SwitchNode::processFuncDecl): |
|
10785 * kjs/nodes.h: |
|
10786 (KJS::CaseClauseNode::CaseClauseNode): |
|
10787 (KJS::ClauseListNode::ClauseListNode): |
|
10788 (KJS::ClauseListNode::getClause): |
|
10789 (KJS::ClauseListNode::getNext): |
|
10790 (KJS::ClauseListNode::releaseNext): |
|
10791 (KJS::SwitchNode::SwitchNode): |
|
10792 Add processFuncDecl for the relevant nodes. |
|
10793 |
|
10794 * kjs/nodes2string.cpp: |
|
10795 (CaseClauseNode::streamTo): |
|
10796 next got renamed to source. |
|
10797 |
|
10798 2006-05-17 George Staikos <staikos@kde.org> |
|
10799 |
|
10800 Reviewed by Maciej, Alexey, and Eric. |
|
10801 |
|
10802 * pcre/pcre_compile.c: |
|
10803 * pcre/pcre_get.c: |
|
10804 * pcre/pcre_exec.c: |
|
10805 * wtf/UnusedParam.h: |
|
10806 Use /**/ in .c files to compile with non-C99 and non-GCC compilers. |
|
10807 |
|
10808 * kjs/testkjs.cpp: |
|
10809 Change include to <wtf/HashTraits.h> from "HashTraits.h" to avoid -I |
|
10810 |
|
10811 * wtf/unicode/qt4/UnicodeQt4.h: |
|
10812 Use correct parentheses and correct mask for utf-32 support. |
|
10813 |
|
10814 2006-05-17 Alexey Proskuryakov <ap@nypop.com> |
|
10815 |
|
10816 Reviewed by Darin. |
|
10817 |
|
10818 - fix http://bugs.webkit.org/show_bug.cgi?id=8870 |
|
10819 Crash typing in Yahoo auto-complete widget. |
|
10820 |
|
10821 Test: fast/js/regexp-stack-overflow.html |
|
10822 |
|
10823 * pcre/pcre-config.h: Define NO_RECURSE. |
|
10824 |
|
10825 2006-05-16 George Staikos <staikos@kde.org> |
|
10826 |
|
10827 Reviewed by Maciej. |
|
10828 |
|
10829 Fix some warnings and strict compilation errors. |
|
10830 |
|
10831 * kjs/nodes.cpp: |
|
10832 * kjs/value.cpp: |
|
10833 |
|
10834 2006-05-15 Alexey Proskuryakov <ap@nypop.com> |
|
10835 |
|
10836 * make-generated-sources.sh: Changed to be executable and removed |
|
10837 text in the file generated by "svn diff". |
|
10838 |
|
10839 2006-05-15 Geoffrey Garen <ggaren@apple.com> |
|
10840 |
|
10841 Reviewed by Maciej. |
|
10842 |
|
10843 - Fixed <rdar://problem/4534904> please do not treat "debugger" as |
|
10844 a reserved word while parsing JavaScript (and other ECMA reserved |
|
10845 words) |
|
10846 |
|
10847 AKA |
|
10848 |
|
10849 http://bugs.webkit.org/show_bug.cgi?id=6179 |
|
10850 We treat "char" as a reserved word in JavaScript and firefox/IE do |
|
10851 not |
|
10852 |
|
10853 (1) I unreserved most of the spec's "future reserved words" because |
|
10854 they're not reserved in IE or FF. (Most, but not all, because IE |
|
10855 somewhat randomly *does* reserve a few of them.) |
|
10856 (2) I made 'debugger' a legitimate statement that acts like an empty |
|
10857 statement because FF and IE support it. |
|
10858 |
|
10859 * kjs/grammar.y: |
|
10860 * kjs/keywords.table: |
|
10861 |
|
10862 2006-05-15 Tim Omernick <timo@apple.com> |
|
10863 |
|
10864 Reviewed by John Sullivan. |
|
10865 |
|
10866 Part of <rdar://problem/4466508> Add 64-bit support to the Netscape Plugin API |
|
10867 |
|
10868 Added to the Netscape Plugin API the concept of "plugin drawing models". The drawing model |
|
10869 determines the kind of graphics context created by the browser for the plugin, as well as |
|
10870 the Mac types of various Netscape Plugin API data structures. |
|
10871 |
|
10872 There is a drawing model to represent the old QuickDraw-based API. It is used by default |
|
10873 if QuickDraw is available on the system, unless the plugin specifies another drawing model. |
|
10874 |
|
10875 The big change is the addition of the CoreGraphics drawing model. A plugin may request this |
|
10876 drawing model to obtain access to a CGContextRef for drawing, instead of a QuickDraw CGrafPtr. |
|
10877 |
|
10878 * bindings/npapi.h: |
|
10879 Define NP_NO_QUICKDRAW when compiling 64-bit; there is no 64-bit QuickDraw. |
|
10880 Added NPNVpluginDrawingModel, NPNVsupportsQuickDrawBool, and NPNVsupportsCoreGraphicsBool |
|
10881 variables. |
|
10882 Added NPDrawingModel enumeration. Currently the only drawing models are QuickDraw and |
|
10883 CoreGraphics. |
|
10884 NPRegion's type now depends on the drawing model specified by the plugin. |
|
10885 NP_Port is now only defined when QuickDraw is available. |
|
10886 Added NP_CGContext, which is the type of the NPWindow's "window" member in CoreGraphics mode. |
|
10887 |
|
10888 2006-05-13 Kevin M. Ollivier <kevino@theolliviers.com> |
|
10889 |
|
10890 Reviewed by Darin, landed by ap. |
|
10891 |
|
10892 - http://bugs.webkit.org/show_bug.cgi?id=8528 |
|
10893 Bakefiles (and generated Makefiles) for wx and gdk ports |
|
10894 |
|
10895 * make-generated-sources.sh: |
|
10896 Added script to configure environment to run DerivedSources.make |
|
10897 |
|
10898 * JavaScriptCoreSources.bkl: |
|
10899 Added JavaScriptCore sources list for Bakefile. |
|
10900 |
|
10901 * jscore.bkl: |
|
10902 Bakefile used to generate JavaScriptCore project files |
|
10903 (currently only used by wx and gdk ports) |
|
10904 |
|
10905 2006-05-09 Steve Falkenburg <sfalken@apple.com> |
|
10906 |
|
10907 Fix Windows build. |
|
10908 Minor fixes to WTF headers. |
|
10909 |
|
10910 Reviewed by kevin. |
|
10911 |
|
10912 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Fix include dirs, paths to files. |
|
10913 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Fix include dirs. |
|
10914 * wtf/Assertions.h: include Platform.h to get definition for COMPILER() |
|
10915 * wtf/Vector.h: include FastMalloc.h for definition of fastMalloc, fastFree |
|
10916 |
|
10917 2006-05-09 Maciej Stachowiak <mjs@apple.com> |
|
10918 |
|
10919 Rubber stamped by Anders. |
|
10920 |
|
10921 - renamed kxmlcore to wtf |
|
10922 |
|
10923 kxmlcore --> wtf |
|
10924 KXMLCore --> WTF |
|
10925 KXC --> WTF |
|
10926 |
|
10927 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
10928 * bindings/c/c_instance.cpp: |
|
10929 * bindings/objc/WebScriptObject.mm: |
|
10930 * kjs/JSImmediate.h: |
|
10931 * kjs/Parser.cpp: |
|
10932 * kjs/Parser.h: |
|
10933 * kjs/array_object.cpp: |
|
10934 * kjs/collector.cpp: |
|
10935 (KJS::Collector::registerThread): |
|
10936 * kjs/collector.h: |
|
10937 * kjs/config.h: |
|
10938 * kjs/function.cpp: |
|
10939 (KJS::isStrWhiteSpace): |
|
10940 * kjs/function.h: |
|
10941 * kjs/identifier.cpp: |
|
10942 * kjs/internal.cpp: |
|
10943 * kjs/internal.h: |
|
10944 * kjs/lexer.cpp: |
|
10945 (Lexer::shift): |
|
10946 (Lexer::isWhiteSpace): |
|
10947 (Lexer::isIdentStart): |
|
10948 (Lexer::isIdentPart): |
|
10949 * kjs/lookup.cpp: |
|
10950 * kjs/nodes.cpp: |
|
10951 * kjs/nodes.h: |
|
10952 * kjs/number_object.cpp: |
|
10953 * kjs/object.h: |
|
10954 * kjs/property_map.cpp: |
|
10955 * kjs/property_map.h: |
|
10956 * kjs/string_object.cpp: |
|
10957 (StringProtoFunc::callAsFunction): |
|
10958 * kjs/testkjs.cpp: |
|
10959 (testIsInteger): |
|
10960 * kjs/ustring.cpp: |
|
10961 * kjs/ustring.h: |
|
10962 * kxmlcore: Removed. |
|
10963 * kxmlcore/AlwaysInline.h: Removed. |
|
10964 * kxmlcore/Assertions.cpp: Removed. |
|
10965 * kxmlcore/Assertions.h: Removed. |
|
10966 * kxmlcore/FastMalloc.cpp: Removed. |
|
10967 * kxmlcore/FastMalloc.h: Removed. |
|
10968 * kxmlcore/FastMallocInternal.h: Removed. |
|
10969 * kxmlcore/Forward.h: Removed. |
|
10970 * kxmlcore/HashCountedSet.h: Removed. |
|
10971 * kxmlcore/HashFunctions.h: Removed. |
|
10972 * kxmlcore/HashMap.h: Removed. |
|
10973 * kxmlcore/HashSet.h: Removed. |
|
10974 * kxmlcore/HashTable.cpp: Removed. |
|
10975 * kxmlcore/HashTable.h: Removed. |
|
10976 * kxmlcore/HashTraits.h: Removed. |
|
10977 * kxmlcore/ListRefPtr.h: Removed. |
|
10978 * kxmlcore/Noncopyable.h: Removed. |
|
10979 * kxmlcore/OwnArrayPtr.h: Removed. |
|
10980 * kxmlcore/OwnPtr.h: Removed. |
|
10981 * kxmlcore/PassRefPtr.h: Removed. |
|
10982 * kxmlcore/Platform.h: Removed. |
|
10983 * kxmlcore/RefPtr.h: Removed. |
|
10984 * kxmlcore/TCPageMap.h: Removed. |
|
10985 * kxmlcore/TCSpinLock.h: Removed. |
|
10986 * kxmlcore/TCSystemAlloc.cpp: Removed. |
|
10987 * kxmlcore/TCSystemAlloc.h: Removed. |
|
10988 * kxmlcore/UnusedParam.h: Removed. |
|
10989 * kxmlcore/Vector.h: Removed. |
|
10990 * kxmlcore/VectorTraits.h: Removed. |
|
10991 * kxmlcore/unicode: Removed. |
|
10992 * kxmlcore/unicode/Unicode.h: Removed. |
|
10993 * kxmlcore/unicode/UnicodeCategory.h: Removed. |
|
10994 * kxmlcore/unicode/icu: Removed. |
|
10995 * kxmlcore/unicode/icu/UnicodeIcu.h: Removed. |
|
10996 * kxmlcore/unicode/posix: Removed. |
|
10997 * kxmlcore/unicode/qt3: Removed. |
|
10998 * kxmlcore/unicode/qt4: Removed. |
|
10999 * kxmlcore/unicode/qt4/UnicodeQt4.h: Removed. |
|
11000 * pcre/pcre_get.c: |
|
11001 * wtf: Added. |
|
11002 * wtf/Assertions.cpp: |
|
11003 * wtf/Assertions.h: |
|
11004 * wtf/FastMalloc.cpp: |
|
11005 (WTF::TCMalloc_ThreadCache::Scavenge): |
|
11006 (WTF::do_malloc): |
|
11007 (WTF::do_free): |
|
11008 (WTF::TCMallocGuard::TCMallocGuard): |
|
11009 (WTF::malloc): |
|
11010 (WTF::free): |
|
11011 (WTF::calloc): |
|
11012 (WTF::cfree): |
|
11013 (WTF::realloc): |
|
11014 * wtf/FastMalloc.h: |
|
11015 * wtf/FastMallocInternal.h: |
|
11016 * wtf/Forward.h: |
|
11017 * wtf/HashCountedSet.h: |
|
11018 * wtf/HashFunctions.h: |
|
11019 * wtf/HashMap.h: |
|
11020 * wtf/HashSet.h: |
|
11021 * wtf/HashTable.cpp: |
|
11022 * wtf/HashTable.h: |
|
11023 * wtf/HashTraits.h: |
|
11024 * wtf/ListRefPtr.h: |
|
11025 * wtf/Noncopyable.h: |
|
11026 * wtf/OwnArrayPtr.h: |
|
11027 * wtf/OwnPtr.h: |
|
11028 * wtf/PassRefPtr.h: |
|
11029 * wtf/RefPtr.h: |
|
11030 * wtf/TCSystemAlloc.cpp: |
|
11031 (TCMalloc_SystemAlloc): |
|
11032 * wtf/Vector.h: |
|
11033 * wtf/VectorTraits.h: |
|
11034 * wtf/unicode/UnicodeCategory.h: |
|
11035 * wtf/unicode/icu/UnicodeIcu.h: |
|
11036 |
|
11037 2006-05-08 Timothy Hatcher <timothy@apple.com> |
|
11038 |
|
11039 Reviewed by Tim O. |
|
11040 |
|
11041 * bindings/npapi.h: do not define #pragma options align=mac68k if we are 64-bit |
|
11042 |
|
11043 2006-05-07 Darin Adler <darin@apple.com> |
|
11044 |
|
11045 Reviewed and landed by Maciej. |
|
11046 |
|
11047 - fix http://bugs.webkit.org/show_bug.cgi?id=8765 |
|
11048 Random crashes on TOT since the form state change |
|
11049 |
|
11050 I haven't figured out how to construct a test for this, but this does seem to fix the |
|
11051 problem; Mitz mentioned that a double-destroy was occurring in these functions. |
|
11052 |
|
11053 * kxmlcore/HashMap.h: (KXMLCore::HashMap::remove): Use RefCounter::deref instead of calling |
|
11054 ~ValueType, because ~ValueType often results in a double-destroy, since the HashTable also |
|
11055 destroys the element based on the storage type. The RefCounter template correctly does work |
|
11056 only in cases where ValueType and ValueStorageType differ and this class is what's used |
|
11057 elsewhere for the same purpose; I somehow missed this case when optimizing HashMap. |
|
11058 * kxmlcore/HashSet.h: (KXMLCore::HashSet::remove): Ditto. |
|
11059 |
|
11060 2006-05-05 Darin Adler <darin@apple.com> |
|
11061 |
|
11062 - http://bugs.webkit.org/show_bug.cgi?id=8722 |
|
11063 IE compatibility fix in date parsing |
|
11064 |
|
11065 * kjs/date_object.cpp: (KJS::parseDate): Merged change that George Staikos provided |
|
11066 from KDE 3.4.3 branch that allows day values of 0 and values that are > 1000. |
|
11067 |
|
11068 2006-05-04 Anders Carlsson <andersca@mac.com> |
|
11069 |
|
11070 Reviewed by Maciej. |
|
11071 |
|
11072 http://bugs.webkit.org/show_bug.cgi?id=8734 |
|
11073 Would like a Vector::append that takes another Vector |
|
11074 |
|
11075 * kxmlcore/Vector.h: |
|
11076 (KXMLCore::::append): |
|
11077 New function that takes another array. |
|
11078 |
|
11079 2006-05-02 Steve Falkenburg <sfalken@apple.com> |
|
11080 |
|
11081 Reviewed by eric. |
|
11082 |
|
11083 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: set NDEBUG for release build |
|
11084 * kxmlcore/FastMalloc.cpp: Prevent USE_SYSTEM_MALLOC from being defined twice |
|
11085 |
|
11086 2006-05-02 Anders Carlsson <andersca@mac.com> |
|
11087 |
|
11088 Reviewed by Maciej. |
|
11089 |
|
11090 * kxmlcore/HashMap.h: |
|
11091 (KXMLCore::::operator): |
|
11092 Return *this |
|
11093 |
|
11094 2006-05-01 Tim Omernick <timo@apple.com> |
|
11095 |
|
11096 Reviewed by Tim Hatcher. |
|
11097 |
|
11098 <rdar://problem/4476875> Support printing for embedded Netscape plugins |
|
11099 |
|
11100 * bindings/npapi.h: |
|
11101 Fixed struct alignment problem in our npapi.h. Structs must be 68k-aligned on both pre-Mac OS X |
|
11102 and Mac OS X systems, as this is what plugins expect. |
|
11103 |
|
11104 2006-05-01 Timothy Hatcher <timothy@apple.com> |
|
11105 |
|
11106 Reviewed by Maciej. |
|
11107 |
|
11108 <rdar://problem/4308243> 8F36 Regression: crash in malloc_consolidate if you use a .PAC file |
|
11109 |
|
11110 The original fix missed the oversized cell case. Added a test for "currentThreadIsMainThread || |
|
11111 imp->m_destructorIsThreadSafe" where we collect oversized cells. |
|
11112 |
|
11113 We don't have a way to test PAC files yet, so there's no test attached. |
|
11114 |
|
11115 * kjs/collector.cpp: |
|
11116 (KJS::Collector::collect): test the thread when we collect oversized cells |
|
11117 |
|
11118 2006-05-01 Tim Omernick <timo@apple.com> |
|
11119 |
|
11120 Reviewed by Adele. |
|
11121 |
|
11122 <rdar://problem/4526114> REGRESSION (two days ago): LOG() just prints @ for NSObject substitutions |
|
11123 |
|
11124 * kxmlcore/Assertions.cpp: |
|
11125 Changed sense of strstr("%@") check. I already made the same fix to the WebBrowser assertions. |
|
11126 |
|
11127 2006-04-28 Steve Falkenburg <sfalken@apple.com> |
|
11128 |
|
11129 Reviewed by kdecker |
|
11130 |
|
11131 Actually apply the change that was reviewed insted of checking it in with an #if 0 (oops). |
|
11132 |
|
11133 * kjs/testkjs.cpp: |
|
11134 (main): Suppress C runtime alerts |
|
11135 |
|
11136 2006-04-28 Steve Falkenburg <sfalken@apple.com> |
|
11137 |
|
11138 Reviewed by kdecker |
|
11139 |
|
11140 Suppress error reporting dialog that blocks Javascript tests from completing. |
|
11141 |
|
11142 Real error is due to an overflow in the date/time handling functions that needs |
|
11143 to be addressed, but this will prevent the hang running the Javascript tests |
|
11144 on the build bot (along with the related changes). |
|
11145 |
|
11146 * kjs/testkjs.cpp: |
|
11147 (main): Suppress C runtime alerts |
|
11148 |
|
11149 2006-04-27 Geoffrey Garen <ggaren@apple.com> |
|
11150 |
|
11151 Reviewed by Maciej |
|
11152 |
|
11153 - Minor fixups I discovered while working on the autogenerator. |
|
11154 |
|
11155 * kjs/lookup.cpp: |
|
11156 (findEntry): ASSERT that size is not 0, because otherwise we'll % by 0, |
|
11157 compute a garbage address, and possibly crash. |
|
11158 * kjs/lookup.h: |
|
11159 (cacheGlobalObject): Don't enumerate cached objects -- ideally, they |
|
11160 would be hidden entirely. |
|
11161 |
|
11162 2006-04-21 Kevin M. Ollivier <kevino@theolliviers.com> |
|
11163 |
|
11164 Reviewed by Darin. |
|
11165 |
|
11166 - http://bugs.webkit.org/show_bug.cgi?id=8507 |
|
11167 Compilation fixes for building on gcc 4.0.2, and without precomp headers |
|
11168 |
|
11169 * kjs/operations.h: |
|
11170 * kxmlcore/Assertions.cpp: |
|
11171 * kxmlcore/FastMalloc.cpp: |
|
11172 Added necessary headers to resolve compilation issues when not using |
|
11173 precompiled headers. |
|
11174 |
|
11175 * kjs/value.h: Declare the JSCell class before friend declaration |
|
11176 to resolve compilation issues with gcc 4.0.2. |
|
11177 |
|
11178 * kxmlcore/Platform.h: Set Unicode support to use ICU on platforms |
|
11179 other than KDE (previously only defined for Win and Mac OS) |
|
11180 |
|
11181 2006-04-18 Eric Seidel <eseidel@apple.com> |
|
11182 |
|
11183 Reviewed by ggaren. |
|
11184 |
|
11185 Fix "new Function()" to correctly use lexical scoping. |
|
11186 Add ScopeChain::print() function for debugging. |
|
11187 <rdar://problem/4067864> REGRESSION (125-407): JavaScript failure on PeopleSoft REN Server |
|
11188 |
|
11189 * kjs/function_object.cpp: |
|
11190 (FunctionObjectImp::construct): |
|
11191 * kjs/scope_chain.cpp: |
|
11192 (KJS::ScopeChain::print): |
|
11193 * kjs/scope_chain.h: |
|
11194 |
|
11195 2006-04-14 James G. Speth <speth@end.com> |
|
11196 |
|
11197 Reviewed by Timothy. |
|
11198 |
|
11199 Bug 8389: support for Cocoa bindings - binding an NSTreeController to the WebView's DOM |
|
11200 http://bugs.webkit.org/show_bug.cgi?id=8389 |
|
11201 |
|
11202 Adds a category to WebScriptObject with array accessors for KVC/KVO. |
|
11203 |
|
11204 If super valueForKey: fails it will call valueForUndefinedKey:, which is |
|
11205 important because it causes the right behavior to happen with bindings using |
|
11206 the "Raises for Not Applicable Keys" flag and the "Not Applicable Placeholder" |
|
11207 |
|
11208 * bindings/objc/WebScriptObject.mm: |
|
11209 (-[WebScriptObject valueForKey:]): |
|
11210 (-[WebScriptObject count]): |
|
11211 (-[WebScriptObject objectAtIndex:]): |
|
11212 (-[WebUndefined description]): return "undefined" |
|
11213 |
|
11214 2006-04-13 Geoffrey Garen <ggaren@apple.com> |
|
11215 |
|
11216 Reviewed by Darin. |
|
11217 |
|
11218 * kjs/internal.cpp: |
|
11219 (KJS::InterpreterImp::initGlobalObject): Add the built-in object |
|
11220 prototype to the end of the global object's prototype chain instead of |
|
11221 just blowing away its existing prototype. We need to do this because |
|
11222 the window object has a meaningful prototype now. |
|
11223 |
|
11224 2006-04-13 Maciej Stachowiak <mjs@apple.com> |
|
11225 |
|
11226 Reviewed by Geoff. |
|
11227 |
|
11228 - fix testkjs to not show false-positive KJS::Node leaks in debug builds |
|
11229 |
|
11230 * kjs/testkjs.cpp: |
|
11231 (doIt): |
|
11232 (kjsmain): |
|
11233 |
|
11234 2006-04-11 Geoffrey Garen <ggaren@apple.com> |
|
11235 |
|
11236 Reviewed by Maciej. |
|
11237 |
|
11238 Minor code cleanup -- passes all the JS tests. |
|
11239 |
|
11240 * kjs/object_object.cpp: |
|
11241 (ObjectObjectImp::construct): |
|
11242 (ObjectObjectImp::callAsFunction): |
|
11243 |
|
11244 2006-04-11 Darin Adler <darin@apple.com> |
|
11245 |
|
11246 - another attempt to fix Windows build -- Vector in Forward.h was not working |
|
11247 |
|
11248 * kxmlcore/Forward.h: Remove Vector. |
|
11249 * kxmlcore/Vector.h: Add back default arguments, remove include of |
|
11250 Forward.h. |
|
11251 |
|
11252 2006-04-11 Darin Adler <darin@apple.com> |
|
11253 |
|
11254 - try to fix Windows build -- HashForward.h was not working |
|
11255 |
|
11256 * kxmlcore/HashForward.h: Removed. |
|
11257 |
|
11258 * JavaScriptCore.xcodeproj/project.pbxproj: Remove HashForward.h. |
|
11259 * kjs/collector.h: Remove use of HashForward.h. |
|
11260 * kxmlcore/HashCountedSet.h: Remove include of HashForward.h, restore |
|
11261 default arguments. |
|
11262 * kxmlcore/HashMap.h: Ditto. |
|
11263 * kxmlcore/HashSet.h: Ditto. |
|
11264 |
|
11265 2006-04-11 David Harrison <harrison@apple.com> |
|
11266 |
|
11267 Reviewed by Darin. |
|
11268 |
|
11269 - fixed clean build, broken by Darin's check-in |
|
11270 |
|
11271 * kjs/date_object.cpp: Add needed include of lookup.h. |
|
11272 * kjs/regexp_object.cpp: Move include of .lut.h file below other includes. |
|
11273 |
|
11274 2006-04-10 Darin Adler <darin@apple.com> |
|
11275 |
|
11276 Rubber-stamped by John Sullivan. |
|
11277 |
|
11278 - switched from a shell script to a makefile for generated files |
|
11279 - removed lots of unneeded includes |
|
11280 - added new Forward.h and HashForward.h headers that allow compiling with |
|
11281 fewer unneeded templates |
|
11282 |
|
11283 * DerivedSources.make: Added. |
|
11284 * generate-derived-sources: Removed. |
|
11285 * JavaScriptCore.xcodeproj/project.pbxproj: Added new files, changed to use |
|
11286 DerivedSources.make. |
|
11287 |
|
11288 * kxmlcore/Forward.h: Added. |
|
11289 * kxmlcore/HashForward.h: Added. |
|
11290 |
|
11291 * kxmlcore/HashCountedSet.h: Include HashForward for default args. |
|
11292 * kxmlcore/HashMap.h: Ditto. |
|
11293 * kxmlcore/HashSet.h: Ditto. |
|
11294 |
|
11295 * kjs/object.h: |
|
11296 * kjs/object.cpp: |
|
11297 Moved KJS_MAX_STACK into the .cpp file. |
|
11298 |
|
11299 * bindings/NP_jsobject.cpp: |
|
11300 * bindings/c/c_instance.h: |
|
11301 * bindings/jni/jni_class.h: |
|
11302 * bindings/jni/jni_runtime.h: |
|
11303 * bindings/jni/jni_utility.h: |
|
11304 * bindings/objc/WebScriptObject.mm: |
|
11305 * bindings/objc/WebScriptObjectPrivate.h: |
|
11306 * bindings/objc/objc_class.h: |
|
11307 * bindings/objc/objc_class.mm: |
|
11308 * bindings/objc/objc_instance.h: |
|
11309 * bindings/objc/objc_instance.mm: |
|
11310 * bindings/objc/objc_runtime.mm: |
|
11311 * bindings/objc/objc_utility.mm: |
|
11312 * bindings/runtime.h: |
|
11313 * bindings/runtime_array.cpp: |
|
11314 * bindings/runtime_array.h: |
|
11315 * bindings/runtime_method.cpp: |
|
11316 * bindings/runtime_method.h: |
|
11317 * bindings/runtime_object.cpp: |
|
11318 * bindings/runtime_root.h: |
|
11319 * kjs/JSImmediate.cpp: |
|
11320 * kjs/Parser.h: |
|
11321 * kjs/array_object.cpp: |
|
11322 * kjs/array_object.h: |
|
11323 * kjs/bool_object.cpp: |
|
11324 * kjs/bool_object.h: |
|
11325 * kjs/collector.h: |
|
11326 * kjs/context.h: |
|
11327 * kjs/debugger.cpp: |
|
11328 * kjs/error_object.h: |
|
11329 * kjs/function_object.h: |
|
11330 * kjs/internal.h: |
|
11331 * kjs/lexer.cpp: |
|
11332 * kjs/math_object.cpp: |
|
11333 * kjs/math_object.h: |
|
11334 * kjs/nodes.cpp: |
|
11335 * kjs/nodes.h: |
|
11336 * kjs/number_object.cpp: |
|
11337 * kjs/number_object.h: |
|
11338 * kjs/object_object.cpp: |
|
11339 * kjs/operations.cpp: |
|
11340 * kjs/protected_reference.h: |
|
11341 * kjs/reference.h: |
|
11342 * kjs/reference_list.h: |
|
11343 * kjs/regexp_object.h: |
|
11344 * kjs/string_object.cpp: |
|
11345 * kjs/string_object.h: |
|
11346 * kjs/testkjs.cpp: |
|
11347 * kjs/value.cpp: |
|
11348 * kjs/value.h: |
|
11349 * kxmlcore/HashTable.h: |
|
11350 * kxmlcore/ListRefPtr.h: |
|
11351 * kxmlcore/TCPageMap.h: |
|
11352 * kxmlcore/Vector.h: |
|
11353 Removed unneeded header includes. |
|
11354 |
|
11355 2006-04-09 Geoffrey Garen <ggaren@apple.com> |
|
11356 |
|
11357 Reviewed by eric. |
|
11358 |
|
11359 - Fixed http://bugs.webkit.org/show_bug.cgi?id=8284 |
|
11360 prevent unnecessary entries in the "nodes with extra refs" hash table |
|
11361 |
|
11362 This patch switches manually RefPtr exchange with use of |
|
11363 RefPtr::release to ensure that a node's ref count never tops 1 |
|
11364 (in the normal case). |
|
11365 |
|
11366 * kjs/nodes.cpp: |
|
11367 (BlockNode::BlockNode): |
|
11368 (CaseBlockNode::CaseBlockNode): |
|
11369 * kjs/nodes.h: |
|
11370 (KJS::ArrayNode::ArrayNode): |
|
11371 (KJS::ObjectLiteralNode::ObjectLiteralNode): |
|
11372 (KJS::ArgumentsNode::ArgumentsNode): |
|
11373 (KJS::VarStatementNode::VarStatementNode): |
|
11374 (KJS::ForNode::ForNode): |
|
11375 (KJS::CaseClauseNode::CaseClauseNode): |
|
11376 (KJS::FuncExprNode::FuncExprNode): |
|
11377 (KJS::FuncDeclNode::FuncDeclNode): |
|
11378 |
|
11379 2006-04-08 Alexey Proskuryakov <ap@nypop.com> |
|
11380 |
|
11381 Reviewed by Darin. |
|
11382 |
|
11383 One more attempt - use reinterpret_cast, rather than static_cast. |
|
11384 |
|
11385 2006-04-08 Alexey Proskuryakov <ap@nypop.com> |
|
11386 |
|
11387 Reviewed by Darin. |
|
11388 |
|
11389 An attempt to fix Win32 build - ICU uses wchar_t on Windows, so we need a type cast. |
|
11390 |
|
11391 * kxmlcore/unicode/icu/UnicodeIcu.h: |
|
11392 (KXMLCore::Unicode::toLower): |
|
11393 (KXMLCore::Unicode::toUpper): |
|
11394 |
|
11395 2006-04-08 Alexey Proskuryakov <ap@nypop.com> |
|
11396 |
|
11397 Reviewed by Darin. |
|
11398 |
|
11399 - fix http://bugs.webkit.org/show_bug.cgi?id=8264 |
|
11400 toLowerCase and toUpperCase don't honor special mappings |
|
11401 |
|
11402 Test: fast/js/string-capitalization.html |
|
11403 |
|
11404 * JavaScriptCore.xcodeproj/project.pbxproj: Added KXMLCore::Unicode headers to the project. |
|
11405 * icu/unicode/putil.h: Added (copied from WebCore). |
|
11406 * icu/unicode/uiter.h: Ditto. |
|
11407 * icu/unicode/ustring.h: Ditto. |
|
11408 * kjs/string_object.cpp: |
|
11409 (StringProtoFunc::callAsFunction): Use the new KXMLCore::Unicode::toUpper() and toLower(). |
|
11410 * kjs/ustring.cpp: Removed unused (and evil) UChar::toLower() and toUpper(). |
|
11411 * kjs/ustring.h: Ditto. |
|
11412 |
|
11413 * kxmlcore/unicode/Unicode.h: Corrected capitalization of the word Unicode. |
|
11414 * kxmlcore/unicode/UnicodeCategory.h: Renamed include guard macro to match file name. |
|
11415 |
|
11416 * kxmlcore/unicode/icu/UnicodeIcu.h: |
|
11417 (KXMLCore::Unicode::toLower): Work on strings, not individual characters. Use ICU root locale. |
|
11418 (KXMLCore::Unicode::toUpper): Ditto. |
|
11419 (KXMLCore::Unicode::isFormatChar): Use int32_t, which can hold a complete code point. |
|
11420 (KXMLCore::Unicode::isSeparatorSpace): Ditto. |
|
11421 (KXMLCore::Unicode::category): Ditto. |
|
11422 * kxmlcore/unicode/qt4/UnicodeQt4.h: |
|
11423 (KXMLCore::Unicode::toLower): Work on strings, not individual characters. |
|
11424 (KXMLCore::Unicode::toUpper): Ditto. |
|
11425 (KXMLCore::Unicode::isFormatChar): Use int32_t, which can hold a complete code point. |
|
11426 (KXMLCore::Unicode::isSeparatorSpace): Ditto. |
|
11427 (KXMLCore::Unicode::category): Ditto. |
|
11428 |
|
11429 * tests/mozilla/ecma/String/15.5.4.12-1.js: Corrected expected results. |
|
11430 * tests/mozilla/ecma/String/15.5.4.12-5.js: Corrected expected results. |
|
11431 |
|
11432 2006-04-05 Darin Adler <darin@apple.com> |
|
11433 |
|
11434 - attempt to fix Windows build |
|
11435 |
|
11436 * kxmlcore/HashMap.h: (KXMLCore::HashMap::remove): Use (*it). instead of it->. |
|
11437 * kxmlcore/HashSet.h: (KXMLCore::HashSet::remove): Ditto. |
|
11438 |
|
11439 2006-04-05 Darin Adler <darin@apple.com> |
|
11440 |
|
11441 - attempt to fix Windows build |
|
11442 |
|
11443 * os-win32/stdint.h: Add int8_t, uint8_t, int64_t. |
|
11444 |
|
11445 2006-04-05 Darin Adler <darin@apple.com> |
|
11446 |
|
11447 Reviewed by Maciej. |
|
11448 |
|
11449 - fix memory leak introduced by the previous change |
|
11450 |
|
11451 * kxmlcore/HashTable.h: Specialize NeedsRef so that it correctly returns true when |
|
11452 the value in question is a pair where one of the pair needs a ref and the other |
|
11453 of the pair does not. |
|
11454 |
|
11455 2006-04-05 Darin Adler <darin@apple.com> |
|
11456 |
|
11457 Reviewed by Maciej. |
|
11458 |
|
11459 - JavaScriptCore part of fix for http://bugs.webkit.org/show_bug.cgi?id=8049 |
|
11460 StringImpl hash traits deleted value creates an init routine for WebCore |
|
11461 <rdar://problem/4442248> REGRESSION: WebCore has init routines (8049) |
|
11462 |
|
11463 Change HashMap and HashSet implementation so they fold various types together. |
|
11464 This allows us to implement maps and sets that use RefPtr<WebCore::StringImpl> |
|
11465 and WebCore::String in terms of the underlying raw pointer type, and hence use |
|
11466 -1 for the deleted value. |
|
11467 |
|
11468 * kxmlcore/HashTraits.h: Added a new type to HashTraits, StorageTraits, which is a |
|
11469 type to be used when storing a value that has the same layout as the type itself. |
|
11470 This is used only for non-key cases. In the case of keys, the hash function must also |
|
11471 be considered. Moved emptyValue out of GenericHashTraitsBase into GenericHashTraits. |
|
11472 Added a new bool to HashTraits, needsRef, which indicates whether the type needs |
|
11473 explicit reference counting. If the type itself has needsRef true, but the storage |
|
11474 type has needsRef false, then the HashSet or HashMap has to handle the reference |
|
11475 counting explicitly. Added hash trait specializations for all signed integer values |
|
11476 that give -1 as the deleted value. Gave all integers StorageTraits of the canonical |
|
11477 integer type of the same size so int and long will share code. Gave all pointers and |
|
11478 RefPtrs StorageTraits of the appropriately sized integer type. Removed redundant |
|
11479 TraitType and emptyValue definitions in the pointer specialization for HashTraits. |
|
11480 Added PairBaseHashTraits, which doesn't try to set up needsDestruction and deletedValue. |
|
11481 Useful for types where we don't want to force the existence of deletedValue, such as |
|
11482 the type of a pair in a HashMap which is not the actual storage type. Removed an |
|
11483 unneeded parameter from the DeletedValueAssigner template. Added HashKeyStorageTraits |
|
11484 template, which determines what type can be used to store a given hash key type with |
|
11485 a given hash function, and specialized it for pointers and RefPtr so that pointer |
|
11486 hash tables share an underlying HashTable that uses IntHash. |
|
11487 |
|
11488 * kxmlcore/HashTable.h: Added HashTableConstIteratorAdapter, HashTableIteratorAdapter, |
|
11489 NeedsRef, RefCountManagerBase, RefCountManager, HashTableRefCountManagerBase, and |
|
11490 HashTableRefCountManager. All are used by both HashSet and HashMap to handle hash |
|
11491 tables where the type stored is not the same as the real value type. |
|
11492 |
|
11493 * kxmlcore/HashFunctions.h: Added a new struct named IntTypes that finds an |
|
11494 integer type given a sizeof value. Renamed pointerHash to intHash and made it |
|
11495 use overloading and take integer parameters. Added an IntHash struct which is |
|
11496 a hash function that works for integers. Changed PtrHash to call IntHash with |
|
11497 an appropriately sized integer. Made IntHash the default hash function for |
|
11498 many integer types. Made PtrHash the default hash function for RefPtr as well |
|
11499 as for raw pointers. |
|
11500 |
|
11501 * kxmlcore/HashSet.h: Changed implementation to use a separate "storage type" |
|
11502 derived from the new traits. The HashTable will use the storage type and all |
|
11503 necessary translation and ref/deref is done at the HashSet level. Also reorganized |
|
11504 the file so that the HashSet is at the top and has no inline implementation inside |
|
11505 it so it's easy to read the interface to HashSet. |
|
11506 |
|
11507 * kxmlcore/HashMap.h: Changed implementation to use a separate "storage type" |
|
11508 derived from the new traits. The HashTable will use the storage type and all |
|
11509 necessary translation and ref/deref is done at the HashMap level. Also reorganized |
|
11510 the file so that the HashMap is at the top and has no inline implementation inside |
|
11511 it so it's easy to read the interface to HashMap. |
|
11512 |
|
11513 * kxmlcore/HashMapPtrSpec.h: Removed. Superceded by optimizations in HashMap itself. |
|
11514 |
|
11515 * JavaScriptCore.xcodeproj/project.pbxproj: Remove HashMapPtrSpec.h, resort files, |
|
11516 and also remove some unnecessary build settings from the aggregate target that |
|
11517 generates derived sources. |
|
11518 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. |
|
11519 |
|
11520 2006-04-04 Timothy Hatcher <timothy@apple.com> |
|
11521 |
|
11522 Reviewed by Darin. |
|
11523 |
|
11524 The Debug and Release frameworks are now built with install paths relative to the build products directory. |
|
11525 This removes the need for other projects to build with -framework WebCore and -framework JavaScriptCore. |
|
11526 |
|
11527 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
11528 |
|
11529 2006-04-04 Eric Seidel <eseidel@apple.com> |
|
11530 |
|
11531 Reviewed by ggaren. |
|
11532 |
|
11533 Fix win32 build. |
|
11534 Disable ASSERT redefinition warnings for now. |
|
11535 |
|
11536 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: |
|
11537 * kxmlcore/Assertions.h: |
|
11538 |
|
11539 2006-04-04 Bjrn Graf <bjoern.graf@gmail.com> |
|
11540 |
|
11541 Reviewed by ggaren & darin. Landed by eseidel. |
|
11542 |
|
11543 Integrate CURL version of gettimeofday |
|
11544 http://bugs.webkit.org/show_bug.cgi?id=7399 |
|
11545 Disable crash report dialogs for testkjs.exe in Release mode |
|
11546 http://bugs.webkit.org/show_bug.cgi?id=8113 |
|
11547 |
|
11548 * kjs/testkjs.cpp: |
|
11549 (StopWatch::start): |
|
11550 (StopWatch::stop): |
|
11551 (StopWatch::getElapsedMS): |
|
11552 (main): |
|
11553 (kjsmain): |
|
11554 |
|
11555 2006-04-04 Eric Seidel <eseidel@apple.com> |
|
11556 |
|
11557 Reviewed by mjs. |
|
11558 |
|
11559 * kjs/number_object.cpp: |
|
11560 (NumberProtoFunc::callAsFunction): remove trunc() to fix win32. |
|
11561 |
|
11562 2006-03-12 Maciej Stachowiak <mjs@apple.com> |
|
11563 |
|
11564 Reviewed by Darin. |
|
11565 |
|
11566 - fixed "toPrecision sometimes messes up the last digit on intel Macs" |
|
11567 http://bugs.webkit.org/show_bug.cgi?id=7748 |
|
11568 |
|
11569 * kjs/number_object.cpp: |
|
11570 (intPow10): Compute integer powers of 10 using exponentiation by squaring. |
|
11571 (NumberProtoFunc::callAsFunction): Use intPow10(n) in place of all pow(10.0, n), |
|
11572 plus a bit of refactoring. |
|
11573 |
|
11574 2006-04-03 Darin Adler <darin@apple.com> |
|
11575 |
|
11576 - tweak config.h and Platform.h to try to get buildbot working |
|
11577 (making some small changes at the same time) |
|
11578 |
|
11579 * kjs/config.h: Removed now-unneeded HAVE_ICU. |
|
11580 * kxmlcore/Platform.h: Tweak how platform gets set up. Move all the |
|
11581 USE stuff to the end. |
|
11582 |
|
11583 2006-04-03 George Staikos <staikos@opensource.apple.com> |
|
11584 |
|
11585 Reviewed by Maciej. |
|
11586 |
|
11587 Fix Win32 build breakage from previous commit, remove unused forward. |
|
11588 |
|
11589 2006-04-03 George Staikos <staikos@opensource.apple.com> |
|
11590 |
|
11591 Reviewed by Maciej. |
|
11592 |
|
11593 Implement a unicode abstraction layer to make JavaScriptCore much more |
|
11594 easily ported to other platforms without having to take in libicu. Also |
|
11595 makes the unicode related code easier to understand. |
|
11596 |
|
11597 2006-04-03 Timothy Hatcher <timothy@apple.com> |
|
11598 |
|
11599 Reviewed by Adele. |
|
11600 |
|
11601 Fixes <rdar://problem/4498338> JavaScriptCore fails to compile for ppc64 |
|
11602 Other 64 bit build fixes. |
|
11603 |
|
11604 * kjs/collector.cpp: |
|
11605 (KJS::Collector::markOtherThreadConservatively): test for __DARWIN_UNIX03 and use __r1 |
|
11606 * kjs/dtoa.cpp: |
|
11607 (Bigint::): cast PRIVATE_mem to unsigned to prevent warning |
|
11608 * bindings/jni/jni_utility.cpp: |
|
11609 (KJS::Bindings::getJavaVM): cast jniError to long to prevent format warning |
|
11610 (KJS::Bindings::getJNIEnv): cast jniError to long to prevent format warning |
|
11611 * bindings/runtime_root.cpp: |
|
11612 (KJS::Bindings::addNativeReference): cast CFDictionaryGetValue to unsigned long to prevent warning |
|
11613 (KJS::Bindings::removeNativeReference): cast CFDictionaryGetValue to unsigned long to prevent warning |
|
11614 |
|
11615 2006-03-31 Darin Adler <darin@apple.com> |
|
11616 |
|
11617 Reviewed by Geoff. |
|
11618 |
|
11619 - <rdar://problem/4395622> API: WebScriptObject.h incorrectly reports that -isSelectorExcludedFromWebScript returns NO by default |
|
11620 |
|
11621 * bindings/objc/WebScriptObject.h: Fixed comment. |
|
11622 |
|
11623 2006-03-31 Eric Seidel <eseidel@apple.com> |
|
11624 |
|
11625 Reviewed by mjs. |
|
11626 |
|
11627 A bit more code cleanup. |
|
11628 |
|
11629 * bindings/c/c_utility.cpp: |
|
11630 (KJS::Bindings::convertValueToNPVariant): |
|
11631 * bindings/objc/objc_runtime.mm: |
|
11632 (convertValueToObjcObject): |
|
11633 * bindings/objc/objc_utility.mm: |
|
11634 (KJS::Bindings::convertValueToObjcValue): |
|
11635 * kjs/function.cpp: |
|
11636 (KJS::GlobalFuncImp::callAsFunction): |
|
11637 * kjs/interpreter.cpp: |
|
11638 (KJS::ExecState::lexicalInterpreter): |
|
11639 * kjs/interpreter.h: |
|
11640 * kjs/operations.cpp: |
|
11641 (KJS::equal): |
|
11642 |
|
11643 2006-03-30 Eric Seidel <eseidel@apple.com> |
|
11644 |
|
11645 Reviewed by anders. |
|
11646 |
|
11647 Small code-style update. |
|
11648 |
|
11649 * kjs/operations.cpp: |
|
11650 (KJS::isNaN): |
|
11651 (KJS::isInf): |
|
11652 (KJS::isPosInf): |
|
11653 (KJS::isNegInf): |
|
11654 (KJS::equal): |
|
11655 (KJS::strictEqual): |
|
11656 (KJS::relation): |
|
11657 (KJS::maxInt): |
|
11658 (KJS::minInt): |
|
11659 (KJS::add): |
|
11660 (KJS::mult): |
|
11661 |
|
11662 2006-03-31 Anders Carlsson <andersca@mac.com> |
|
11663 |
|
11664 Reviewed by Maciej. |
|
11665 |
|
11666 Make sure the GetterSetterImp objects are marked as well. |
|
11667 |
|
11668 * kjs/internal.cpp: |
|
11669 (KJS::GetterSetterImp::mark): |
|
11670 Call JSCell::mark(). |
|
11671 |
|
11672 2006-03-30 Eric Seidel <eseidel@apple.com> |
|
11673 |
|
11674 Reviewed by ggaren. |
|
11675 |
|
11676 * kjs/nodes.h: Some various small style fixes. |
|
11677 |
|
11678 2006-03-30 Eric Seidel <eseidel@apple.com> |
|
11679 |
|
11680 Reviewed by ggaren. |
|
11681 |
|
11682 Clean-up style issues in node.h, remove redundant initializations. |
|
11683 |
|
11684 * kjs/nodes.h: |
|
11685 (KJS::StatementNode::evaluate): |
|
11686 (KJS::ArrayNode::ArrayNode): |
|
11687 (KJS::ObjectLiteralNode::ObjectLiteralNode): |
|
11688 (KJS::ArgumentsNode::ArgumentsNode): |
|
11689 (KJS::NewExprNode::NewExprNode): |
|
11690 (KJS::CaseClauseNode::CaseClauseNode): |
|
11691 (KJS::FuncDeclNode::FuncDeclNode): |
|
11692 |
|
11693 2006-03-30 Tim Omernick <timo@apple.com> |
|
11694 |
|
11695 Reviewed by Geoff. |
|
11696 |
|
11697 <rdar://problem/4212626> REGRESSION: LIVECONNECT: JavaScript type for Java Strings is function, |
|
11698 not object |
|
11699 |
|
11700 * bindings/runtime.h: |
|
11701 (KJS::Bindings::Instance::implementsCall): |
|
11702 New method. Returns false by default. Concrete subclasses can override this return true when |
|
11703 the bound object may be called as a function. |
|
11704 (KJS::Bindings::Instance::invokeDefaultMethod): |
|
11705 Since bound objects are no longer treated as functions by default, we can return jsUndefined() |
|
11706 here instead of in concrete subclasses that decide not to implement the default method |
|
11707 functionality. |
|
11708 |
|
11709 * bindings/runtime_object.cpp: |
|
11710 (RuntimeObjectImp::implementsCall): |
|
11711 Don't assume that the bound object is a function; instead, let the object instance decide whether |
|
11712 it is callable. |
|
11713 |
|
11714 * bindings/c/c_instance.h: |
|
11715 * bindings/c/c_instance.cpp: |
|
11716 (KJS::Bindings::CInstance::implementsCall): |
|
11717 The object is callable if its class has an invokeDefault function. |
|
11718 |
|
11719 * bindings/objc/objc_instance.h: |
|
11720 * bindings/objc/objc_instance.mm: |
|
11721 (ObjcInstance::implementsCall): |
|
11722 The object is callable if the ObjC instance responds to -invokeDefaultMethodWithArguments:. |
|
11723 |
|
11724 * bindings/jni/jni_instance.h: |
|
11725 * bindings/jni/jni_instance.cpp: |
|
11726 Moved bogus invokeDefaultMethod() to superclass. |
|
11727 |
|
11728 2006-03-29 Geoffrey Garen <ggaren@apple.com> |
|
11729 |
|
11730 Reviewed by Darin. |
|
11731 |
|
11732 - JavaScriptCore side of fix for <rdar://problem/4308243> 8F36 |
|
11733 Regression: crash in malloc_consolidate if you use a .PAC file |
|
11734 |
|
11735 The crash was a result of threaded deallocation of thread-unsafe |
|
11736 objects. Pure JS objects are thread-safe because all JS execution |
|
11737 is synchronized through JSLock. However, JS objects that wrap WebCore |
|
11738 objects are thread-unsafe because JS and WebCore execution are not |
|
11739 synchronized. That unsafety comes into play when the collector |
|
11740 deallocates a JS object that wraps a WebCore object, thus causing the |
|
11741 WebCore object to be deallocated. |
|
11742 |
|
11743 The solution here is to have each JSCell know whether it is safe to |
|
11744 collect on a non-main thread, and to avoid collecting unsafe cells |
|
11745 when on a non-main thread. |
|
11746 |
|
11747 We don't have a way to test PAC files yet, so there's no test |
|
11748 attached to this patch. |
|
11749 |
|
11750 * kjs/collector.cpp: |
|
11751 (KJS::Collector::collect): |
|
11752 (1) Added the test "currentThreadIsMainThread || |
|
11753 imp->m_destructorIsThreadSafe". |
|
11754 |
|
11755 * kjs/protect.h: |
|
11756 (KJS::gcProtectNullTolerant): |
|
11757 (KJS::gcUnprotectNullTolerant): |
|
11758 * kjs/value.h: |
|
11759 (KJS::JSCell::JSCell): The bools here must be bitfields, otherwise |
|
11760 m_destructorIsThreadSafe becomes another whole word, ruining the |
|
11761 collector optimizations we've made based on the size of a JSObject. |
|
11762 * kxmlcore/FastMalloc.cpp: |
|
11763 (KXMLCore::currentThreadIsMainThread): |
|
11764 (KXMLCore::fastMallocRegisterThread): |
|
11765 * kxmlcore/FastMalloc.h: |
|
11766 |
|
11767 2006-03-28 Darin Adler <darin@apple.com> |
|
11768 |
|
11769 Reviewed by Geoff. |
|
11770 |
|
11771 - change some code that resulted in init routines on Mac OS X -- if the framework has |
|
11772 init routines it will use memory and slow down applications that link with WebKit |
|
11773 even in cases where those applications don't use WebKit |
|
11774 |
|
11775 * kjs/date_object.cpp: Changed constants that were derived by multiplying other constants |
|
11776 to use immediate numbers instead. Apparently, double constant expressions of the type we |
|
11777 had here are evaluated at load time. |
|
11778 |
|
11779 * kjs/list.cpp: Can't use OwnArrayPtr in ListImp because of the global instances of |
|
11780 ListImp, so go back to using a plain old pointer. |
|
11781 (KJS::List::List): Set overflow to 0 when initializing ListImp. |
|
11782 (KJS::List::release): Replace a clear call with a delete and explicit set to 0. |
|
11783 (KJS::List::append): Use raw pointers, and do a delete [] instead of finessing it with |
|
11784 a swap of OwnArrayPtr. |
|
11785 (KJS::List::copyFrom): Remove now-unneeded get(). |
|
11786 (KJS::List::copyTail): Ditto. |
|
11787 |
|
11788 * kjs/ustring.cpp: Changed UString::Rep::empty initializer a bit so that it doesn't get |
|
11789 a static initializer routine. Had to get rid of one level of constant to get the compiler |
|
11790 to understand it could initialize without any code. |
|
11791 |
|
11792 - added a build step that checks for init routines |
|
11793 |
|
11794 * JavaScriptCore.xcodeproj/project.pbxproj: Deleted now-unused custom build rule that |
|
11795 was replaced by the generate-derived-sources script a while back. Added a custom build |
|
11796 phase that invokes the check-for-global-initializers script. |
|
11797 |
|
11798 2006-03-28 Timothy Hatcher <timothy@apple.com> |
|
11799 |
|
11800 Reviewed by Eric. |
|
11801 |
|
11802 fixes <rdar://problem/4458539> Unable to include Security(public) and WebKit(private) headers |
|
11803 |
|
11804 * bindings/npapi.h: added #defines after the #ifndefs |
|
11805 |
|
11806 2006-03-27 Maciej Stachowiak <mjs@apple.com> |
|
11807 |
|
11808 Reviewed by Anders. |
|
11809 |
|
11810 - fixed <rdar://problem/4489745> REGRESSION: Safari crashes at to display http://www.lgphilips-lcd.com/ |
|
11811 |
|
11812 * kjs/nodes.cpp: |
|
11813 (Node::deref): take into account the case where the extra refcount table was never created |
|
11814 |
|
11815 2006-03-23 David Carson <dacarson@gmail.com> |
|
11816 |
|
11817 Reviewed by Darin. |
|
11818 |
|
11819 - JSObject in LiveConnect not working. |
|
11820 http://bugs.webkit.org/show_bug.cgi?id=7917 |
|
11821 |
|
11822 * bindings/jni_jsobject.cpp: |
|
11823 (JavaJSObject::convertJObjectToValue): Was trying to retrieve the native pointer from the wrong base |
|
11824 class, and the GetFieldID was using the wrong signature. |
|
11825 |
|
11826 2006-03-23 Darin Adler <darin@apple.com> |
|
11827 |
|
11828 Reviewed by Maciej. |
|
11829 |
|
11830 - fix buildbot |
|
11831 |
|
11832 * JavaScriptCore.xcodeproj/project.pbxproj: Change target name to JavaScriptCore (it was "include"!?). |
|
11833 Also add -Y 3 option for linker. |
|
11834 |
|
11835 2006-03-23 Darin Adler <darin@apple.com> |
|
11836 |
|
11837 Reviewed by Maciej. |
|
11838 |
|
11839 - fix http://bugs.webkit.org/show_bug.cgi?id=7726 |
|
11840 REGRESSION: orbitz calendar fails (JavaScript function serialization/parsing) |
|
11841 |
|
11842 * kjs/object.h: Take function name, as well as source URL and line number, when |
|
11843 using the special overloaded construct for making functions. |
|
11844 * kjs/object.cpp: (KJS::JSObject::construct): Ditto. |
|
11845 * kjs/function_object.h: Ditto. |
|
11846 * kjs/function_object.cpp: (FunctionObjectImp::construct): Pass a name when |
|
11847 constructing the function rather than null. Use "anonymous" when making a |
|
11848 function using the default function constructor. |
|
11849 |
|
11850 * kjs/nodes2string.cpp: (FuncDeclNode::streamTo): Put a line break just before |
|
11851 a function declaration. |
|
11852 |
|
11853 - unrelated fix |
|
11854 |
|
11855 * kxmlcore/HashMapPtrSpec.h: Add missing needed friend declaration. |
|
11856 |
|
11857 2006-03-23 Darin Adler <darin@apple.com> |
|
11858 |
|
11859 Reviewed by Maciej. |
|
11860 |
|
11861 - fix http://bugs.webkit.org/show_bug.cgi?id=7805 |
|
11862 LEAK: method name leaks in KJS::Bindings::CInstance::invokeMethod |
|
11863 |
|
11864 * bindings/c/c_utility.h: Remove NPN_UTF16FromString declaration (not implemented). |
|
11865 * bindings/c/c_utility.cpp: |
|
11866 (KJS::Bindings::convertValueToNPVariant): Use DOUBLE_TO_NPVARIANT, |
|
11867 BOOLEAN_TO_NPVARIANT, VOID_TO_NPVARIANT, NULL_TO_NPVARIANT, and |
|
11868 OBJECT_TO_NPVARIANT. In the case of OBJECT, call _NPN_RetainObject in |
|
11869 one case and remove a _NPN_ReleaseObject in another because this |
|
11870 should return a retained value. |
|
11871 (KJS::Bindings::convertNPVariantToValue): Use NPVARIANT_TO_BOOLEAN, |
|
11872 NPVARIANT_TO_INT32, and NPVARIANT_TO_DOUBLE. |
|
11873 |
|
11874 * bindings/c/c_runtime.h: Removed implementations of CMethod::name and |
|
11875 CField::name that called _NPN_UTF8FromIdentifier and hence leaked. |
|
11876 * bindings/c/c_runtime.cpp: |
|
11877 (KJS::Bindings::CMethod::name): Added. Returns the string from inside the |
|
11878 method object. |
|
11879 (KJS::Bindings::CField::name): Added. Returns the string from inside the |
|
11880 field object. |
|
11881 (KJS::Bindings::CField::valueFromInstance): Added call to _NPN_ReleaseVariantValue |
|
11882 on the result of getProperty after using it to fix a storage leak. |
|
11883 (KJS::Bindings::CField::setValueToInstance): Added call to _NPN_ReleaseVariantValue |
|
11884 after pasing a value to setProperty now that the conversion function does a retain. |
|
11885 |
|
11886 * bindings/c/c_instance.cpp: |
|
11887 (KJS::Bindings::CInstance::invokeMethod): Changed to use Vector for a local |
|
11888 stack buffer. Removed special case for NPVARIANT_IS_VOID because the |
|
11889 convertNPVariantToValue function handles that properly. |
|
11890 (KJS::Bindings::CInstance::invokeDefaultMethod): Ditto. |
|
11891 |
|
11892 * bindings/NP_jsobject.h: Formatting changes only. |
|
11893 * bindings/NP_jsobject.cpp: |
|
11894 (jsDeallocate): Changed parameter type so we don't need a function cast. |
|
11895 (_NPN_InvokeDefault): Use VOID_TO_NPVARIANT. |
|
11896 (_NPN_Invoke): Use NULL_TO_NPVARIANT and VOID_TO_NPVARIANT. |
|
11897 (_NPN_Evaluate): Use VOID_TO_NPVARIANT. |
|
11898 (_NPN_GetProperty): Use NULL_TO_NPVARIANT and VOID_TO_NPVARIANT. |
|
11899 |
|
11900 * bindings/c/c_class.cpp: Formatting changes only. |
|
11901 * bindings/c/c_class.h: Formatting changes only. |
|
11902 |
|
11903 * bindings/npruntime_priv.h: Removed obsolete and now-unused functions: |
|
11904 NPN_VariantIsVoid, NPN_VariantIsNull, NPN_VariantIsUndefined, |
|
11905 NPN_VariantIsBool, NPN_VariantIsInt32, NPN_VariantIsDouble, |
|
11906 NPN_VariantIsString, NPN_VariantIsObject, NPN_VariantToBool, |
|
11907 NPN_VariantToInt32, NPN_VariantToDouble, NPN_VariantToString, |
|
11908 NPN_VariantToStringCopy, NPN_VariantToObject, NPN_InitializeVariantAsVoid, |
|
11909 NPN_InitializeVariantAsNull, NPN_InitializeVariantAsUndefined, |
|
11910 NPN_InitializeVariantWithBool, NPN_InitializeVariantWithInt32, |
|
11911 NPN_InitializeVariantWithDouble, NPN_InitializeVariantWithString, |
|
11912 NPN_InitializeVariantWithObject, and NPN_InitializeVariantWithVariant. |
|
11913 * bindings/npruntime.cpp: |
|
11914 (getIntIdentifierDictionary): Don't bother creating custom callbacks for the |
|
11915 integer dictionary since the default behavior is fine for integers. |
|
11916 |
|
11917 2006-03-23 Mark Rowe <opendarwin.org@bdash.net.nz> |
|
11918 |
|
11919 Reviewed and landed by Maciej. |
|
11920 |
|
11921 - WebKit no longer builds with bison 2.1 |
|
11922 http://bugs.webkit.org/show_bug.cgi?id=7923 |
|
11923 |
|
11924 * generate-derived-sources: Handle generated header named either grammar.cpp.h |
|
11925 or grammar.hpp. |
|
11926 |
|
11927 2006-03-22 Maciej Stachowiak <mjs@apple.com> |
|
11928 |
|
11929 - fix the build |
|
11930 |
|
11931 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
11932 |
|
11933 2006-03-21 Maciej Stachowiak <mjs@apple.com> |
|
11934 |
|
11935 * kjs/generate-derived-sources: Set executable property. |
|
11936 |
|
11937 2006-03-21 Maciej Stachowiak <mjs@apple.com> |
|
11938 |
|
11939 Reviewed by Darin. |
|
11940 |
|
11941 Ensure that generated source dependencies are handled properly, as follows: |
|
11942 |
|
11943 - Made an external script that generates the sources into a |
|
11944 DerivedSources dir in the build products directory. |
|
11945 - Added a new build target that builds all the generated sources |
|
11946 if needed. Sadly it has to be a target, not a phase for Xcode to notice changes. |
|
11947 - Added the DerivedSources dir in question to the include path. |
|
11948 - Added the new DerivedSources dir and its contents to the project as build-relative. |
|
11949 |
|
11950 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
11951 * kjs/generate-derived-sources: Added. Based on the windows version - maybe someday they |
|
11952 can share more. |
|
11953 |
|
11954 2006-03-11 Maciej Stachowiak <mjs@apple.com> |
|
11955 |
|
11956 Reviewed by Darin. |
|
11957 |
|
11958 - fixed "charAt layout test fails on intel macs; some NaNs are printed as -NaN" |
|
11959 http://bugs.webkit.org/show_bug.cgi?id=7745 |
|
11960 |
|
11961 * kjs/ustring.cpp: |
|
11962 (KJS::UString::from): Use "NaN" for all NaN values, regardless of sign. |
|
11963 |
|
11964 2006-03-16 Maciej Stachowiak <mjs@apple.com> |
|
11965 |
|
11966 Reviewed by Darin. |
|
11967 |
|
11968 - tweaks to my change to redo KJS::Node refcounting |
|
11969 |
|
11970 * kjs/nodes.cpp: |
|
11971 (Node::ref): |
|
11972 (Node::deref): |
|
11973 (Node::refcount): |
|
11974 (Node::clearNewNodes): |
|
11975 * kjs/nodes.h: |
|
11976 |
|
11977 2006-03-16 Darin Adler <darin@apple.com> |
|
11978 |
|
11979 Reviewed by Maciej. |
|
11980 |
|
11981 - fixed Vector so that you can pass a reference to something in the vector |
|
11982 to the append or insert functions |
|
11983 |
|
11984 * kxmlcore/Vector.h: |
|
11985 (KXMLCore::Vector::expandCapacity): Added new overloads that take a pointer to adjust |
|
11986 and return the adjusted value of the pointer. |
|
11987 (KXMLCore::Vector::append): Pass a pointer when expanding the vector, and use it when |
|
11988 adding the new element. Makes the case where the element moves when the vector |
|
11989 is expanded work. |
|
11990 (KXMLCore::Vector::insert): Ditto. |
|
11991 |
|
11992 2006-03-15 Eric Seidel <eseidel@apple.com> |
|
11993 |
|
11994 Reviewed by adele. |
|
11995 |
|
11996 Build fix. |
|
11997 |
|
11998 * kjs/date_object.cpp: |
|
11999 (KJS::DateProtoFunc::callAsFunction): use size() not "len()" |
|
12000 |
|
12001 2006-03-15 Eric Seidel <eseidel@apple.com> |
|
12002 |
|
12003 Reviewed by mjs. |
|
12004 |
|
12005 Fix CString copy constructor, fixes Date.parse("") on Win32. |
|
12006 |
|
12007 * kjs/date_object.cpp: |
|
12008 (KJS::DateProtoFunc::callAsFunction): |
|
12009 * kjs/ustring.cpp: |
|
12010 (KJS::CString::CString): |
|
12011 (KJS::CString::operator=): |
|
12012 |
|
12013 2006-03-13 Maciej Stachowiak <mjs@apple.com> |
|
12014 |
|
12015 Reviewed by Anders. |
|
12016 |
|
12017 - KJS::Node and KJS::StatementNode are bigger than they need to be |
|
12018 http://bugs.webkit.org/show_bug.cgi?id=7775 |
|
12019 |
|
12020 The memory usage of Node was reduced by 2 machine words per node: |
|
12021 |
|
12022 - sourceURL was removed and only kept on FunctionBodyNode. The |
|
12023 source URL can only be distinct per function or top-level program node, |
|
12024 and you always have one. |
|
12025 |
|
12026 - refcount was removed and kept in a separate hashtable when |
|
12027 greater than 1. newNodes set represents floating nodes with |
|
12028 refcount of 0. This helps because almost all nodes have a refcount of 1 |
|
12029 for almost all of their lifetime. |
|
12030 |
|
12031 * bindings/runtime_method.cpp: |
|
12032 (RuntimeMethod::RuntimeMethod): Pass null body, added FIXME. |
|
12033 * kjs/Parser.cpp: |
|
12034 (KJS::clearNewNodes): New nodes are tracked in nodes.cpp now, but still clear |
|
12035 them at the appropriate time. |
|
12036 * kjs/context.h: |
|
12037 (KJS::ContextImp::currentBody): added; used to retrieve source URL and sid |
|
12038 for current code. |
|
12039 (KJS::ContextImp::pushIteration): moved here from LabelStack |
|
12040 (KJS::ContextImp::popIteration): ditto |
|
12041 (KJS::ContextImp::inIteration): ditto |
|
12042 (KJS::ContextImp::pushSwitch): ditto |
|
12043 (KJS::ContextImp::popSwitch): ditto |
|
12044 (KJS::ContextImp::inSwitch): ditto |
|
12045 * kjs/function.cpp: |
|
12046 (KJS::FunctionImp::FunctionImp): Add FunctionBodyNode* parameter. |
|
12047 (KJS::FunctionImp::callAsFunction): Pass body to ContextImp. |
|
12048 (KJS::FunctionImp::argumentsGetter): _context renamed to m_context. |
|
12049 (KJS::DeclaredFunctionImp::DeclaredFunctionImp): Pass body to superclass |
|
12050 constructor. |
|
12051 (KJS::GlobalFuncImp::callAsFunction): Pass progNode as body for ContextImp in |
|
12052 eval. |
|
12053 * kjs/function.h: Move body field from DeclaredFunctionImp to |
|
12054 FunctionImp. |
|
12055 * kjs/grammar.y: Change DBG; statements no longer have a sourceid. |
|
12056 * kjs/internal.cpp: |
|
12057 (KJS::ContextImp::ContextImp): Initialize new m_currentBody, m_iterationDepth |
|
12058 and m_switchDepth data members. New FunctionBodyNode* parameter - the |
|
12059 function body provides source URL and SourceId. |
|
12060 (KJS::InterpreterImp::mark): Use exception() function, not _exception directly. |
|
12061 (KJS::InterpreterImp::evaluate): Pass progNode to ContextImp constructor |
|
12062 to use as the body. |
|
12063 * kjs/internal.h: |
|
12064 (KJS::LabelStack::LabelStack): Remove iteration depth and switch depth; |
|
12065 statement label stacks don't need these and it bloats their size. Put them |
|
12066 in the ContextImp instead. |
|
12067 * kjs/interpreter.cpp: |
|
12068 (KJS::ExecState::lexicalInterpreter): Renamed _context to m_context. |
|
12069 * kjs/interpreter.h: |
|
12070 (KJS::ExecState::dynamicInterpreter): Renamed _context to m_context. |
|
12071 (KJS::ExecState::context): ditto |
|
12072 (KJS::ExecState::setException): Renamed _exception to m_exception |
|
12073 (KJS::ExecState::clearException): ditto |
|
12074 (KJS::ExecState::exception): ditto |
|
12075 (KJS::ExecState::hadException): ditto |
|
12076 (KJS::ExecState::ExecState): ditto both above renames |
|
12077 * kjs/nodes.cpp: |
|
12078 (Node::Node): Removed initialization of line, source URL and refcount. Add to |
|
12079 local newNodes set instead of involving parser. |
|
12080 (Node::ref): Instead of managing refcount directly, story refcount over 1 in a |
|
12081 HashCountedSet, and keep a separate HashSet of "floating" nodes with refcount |
|
12082 0. |
|
12083 (Node::deref): ditto |
|
12084 (Node::refcount): ditto |
|
12085 (Node::clearNewNodes): Destroy anything left in the new nodes set. |
|
12086 (currentSourceId): Inline helper to get sourceId from function body via context. |
|
12087 (currentSourceURL): ditto for sourceURL. |
|
12088 (Node::createErrorCompletion): use new helper |
|
12089 (Node::throwError): ditto |
|
12090 (Node::setExceptionDetailsIfNeeded): ditto |
|
12091 (StatementNode::StatementNode): remove initialization of l0 and sid, rename |
|
12092 l1 to m_lastLine. |
|
12093 (StatementNode::setLoc): Set own m_lastLine and Node's m_line. |
|
12094 (StatementNode::hitStatement): Get sid, first line, last line in the proper new ways. |
|
12095 (StatListNode::StatListNode): updated for setLoc changes |
|
12096 (BlockNode::BlockNode): ditto |
|
12097 (DoWhileNode::execute): excpect iteraton counts on ContextImp, not LabelStack |
|
12098 (WhileNode::execute): ditto |
|
12099 (ForNode::execute): ditto |
|
12100 (ForInNode::execute): ditto |
|
12101 (ContinueNode::execute): excpect inIteration on ContextImp, not LabelStack |
|
12102 (BreakNode::execute): excpect inIteration and inSwitch on ContextImp, not LabelStack |
|
12103 (SwitchNode::execute): expect switch counts on ContextImp, not LabelStack |
|
12104 (FunctionBodyNode::FunctionBodyNode): update for new setLoc |
|
12105 (FunctionBodyNode::processFuncDecl): reindent |
|
12106 (SourceElementsNode::SourceElementsNode): update for new setLoc |
|
12107 * kjs/nodes.h: |
|
12108 (KJS::Node::lineNo): Renamed _line to m_line |
|
12109 (KJS::StatementNode::firstLine): Use lineNo() |
|
12110 (KJS::StatementNode::lastLine): Renamed l1 to m_lastLine |
|
12111 (KJS::FunctionBodyNode::sourceId): added |
|
12112 (KJS::FunctionBodyNode::sourceURL): added |
|
12113 * kjs/testkjs.cpp: |
|
12114 |
|
12115 2006-03-14 Geoffrey Garen <ggaren@apple.com> |
|
12116 |
|
12117 - Fixed <rdar://problem/4478239> string sort puts "closed" before |
|
12118 "close" |
|
12119 |
|
12120 Reviewed by Eric. |
|
12121 |
|
12122 * kjs/ustring.cpp: |
|
12123 (KJS::compare): Inverted a < in order to treat the longer string as > |
|
12124 the shorter string. |
|
12125 |
|
12126 2006-03-12 Alexey Proskuryakov <ap@nypop.com> |
|
12127 |
|
12128 Reviewed by Maciej. |
|
12129 |
|
12130 - fix http://bugs.webkit.org/show_bug.cgi?id=7708 |
|
12131 REGRESSION: Flash callback to JavaScript function not working. |
|
12132 |
|
12133 Test: plugins/invoke.html |
|
12134 |
|
12135 * bindings/c/c_utility.cpp: |
|
12136 (KJS::Bindings::convertUTF8ToUTF16): Return a correct string length. |
|
12137 |
|
12138 2006-03-08 Eric Seidel <eseidel@apple.com> |
|
12139 |
|
12140 Reviewed by darin. |
|
12141 |
|
12142 Partially fix JS on win32 by fixing hash table generation. |
|
12143 |
|
12144 * kjs/create_hash_table: limit << results to 32 bits. |
|
12145 * kjs/testkjs.cpp: |
|
12146 (TestFunctionImp::callAsFunction): |
|
12147 |
|
12148 2006-03-07 Darin Adler <darin@apple.com> |
|
12149 |
|
12150 * kxmlcore/Vector.h: Quick fix to try to get Windows compiling again. |
|
12151 |
|
12152 2006-03-07 Darin Adler <darin@apple.com> |
|
12153 |
|
12154 Reviewed by Anders. |
|
12155 |
|
12156 - fix http://bugs.webkit.org/show_bug.cgi?id=7655 |
|
12157 unwanted output while running layout tests |
|
12158 |
|
12159 * kjs/lexer.cpp: (Lexer::lex): Turn off the "yylex: ERROR" message. |
|
12160 * kjs/regexp.cpp: (KJS::RegExp::RegExp): Remove the code to log errors from PCRE |
|
12161 to standard output. I think we should arrange for the error text to be in JavaScript |
|
12162 exceptions instead at some point. |
|
12163 * kxmlcore/Vector.h: Add a check for overflow so that we'll abort if we pass a |
|
12164 too-large size rather than allocating a buffer smaller than requested. |
|
12165 |
|
12166 2006-03-06 David Carson <dacarson@gmail.com> |
|
12167 |
|
12168 Reviewed by Darin, landed by ap. |
|
12169 |
|
12170 - Fixed http://bugs.webkit.org/show_bug.cgi?id=7582 |
|
12171 c_utility.cpp contains CFString OS X platform-dependent code; should use ICU |
|
12172 |
|
12173 Tested with test case from: |
|
12174 http://bugs.webkit.org/show_bug.cgi?id=5163 |
|
12175 |
|
12176 * bindings/c_utility.cpp |
|
12177 (convertUTF8ToUTF16): Changed to using Unicode converter from ICU, and manual Latin-1 conversion. |
|
12178 * icu/unicode/ucnv.h: Copied from WebCore. |
|
12179 * icu/unicode/ucnv_err.h: Ditto. |
|
12180 * icu/unicode/uenum.h: Ditto. |
|
12181 |
|
12182 2006-03-05 Darin Adler <darin@apple.com> |
|
12183 |
|
12184 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Updated. |
|
12185 |
|
12186 2006-03-06 Mitz Pettel <opendarwin.org@mitzpettel.com> |
|
12187 |
|
12188 Fix suggested by Alexey Proskuryakov <ap@nypop.com>, reviewed by Maciej and Hyatt. |
|
12189 |
|
12190 - fix http://bugs.webkit.org/show_bug.cgi?id=7601 |
|
12191 REGRESSION (r13089): Reproducible crash dereferencing a deallocated element on google image search |
|
12192 |
|
12193 * kxmlcore/Platform.h: Corrected the define to enable USE(MULTIPLE_THREADS) on Mac OS X. |
|
12194 |
|
12195 2006-03-05 Darin Adler <darin@apple.com> |
|
12196 |
|
12197 Reviewed by Maciej. |
|
12198 |
|
12199 - http://bugs.webkit.org/show_bug.cgi?id=7616 |
|
12200 get all references to KJS::Node out of internal.h |
|
12201 |
|
12202 * JavaScriptCore.xcodeproj/project.pbxproj: Updated for file changes. |
|
12203 |
|
12204 * kjs/Parser.cpp: Added. |
|
12205 * kjs/Parser.h: Added. |
|
12206 |
|
12207 * kjs/internal.cpp: Removed the Parser class. |
|
12208 * kjs/internal.h: Ditto. Also removed unnecessary declarations of classes |
|
12209 not used in this header. |
|
12210 |
|
12211 * kjs/nodes.h: Added an include of "Parser.h". |
|
12212 * kjs/function.h: Added a declaration of FunctionBodyNode. |
|
12213 |
|
12214 2006-03-05 Geoffrey Garen <ggaren@apple.com> |
|
12215 |
|
12216 Reviewed by Maciej. |
|
12217 |
|
12218 - JSC support for the fix for <rdar://problem/4467143> JavaScript |
|
12219 enumeration of HTML element properties skips DOM node properties |
|
12220 |
|
12221 * kjs/lookup.h: |
|
12222 (1) Added the KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE macro. The |
|
12223 class definiton macro needs to know about the prototype's prototype so |
|
12224 that the class constructor properly sets it. |
|
12225 (2) Removed the KJS_IMPLEMENT_PROTOTYPE_WITH_PARENT macro. The class |
|
12226 implementation macro does not need to know about the prototype's |
|
12227 prototype, since getOwnPropertySlot should only look in the current |
|
12228 object's property map, and not its prototype's. |
|
12229 |
|
12230 2006-03-05 Andrew Wellington <proton@wiretapped.net> |
|
12231 |
|
12232 Reviewed by Eric, landed by ap. |
|
12233 |
|
12234 - Remove unused breakpoint bool from StatementNodes. No test provided as |
|
12235 there is no functionality change. |
|
12236 |
|
12237 * kjs/nodes.cpp: |
|
12238 (StatementNode::StatementNode): |
|
12239 * kjs/nodes.h: |
|
12240 |
|
12241 2006-03-03 Geoffrey Garen <ggaren@apple.com> |
|
12242 |
|
12243 Reviewed by Darin. |
|
12244 |
|
12245 - Fixed <rdar://problem/4465598> REGRESSION (TOT): Crash occurs at |
|
12246 http://maps.google.com/?output=html ( KJS::Identifier::add(KJS::UString::Rep*) |
|
12247 |
|
12248 This regression was caused by my fix for 4448098. I failed to account for the |
|
12249 deleted entry sentinel in the mehtod that saves the contents of a property map to |
|
12250 the back/forward cache. |
|
12251 |
|
12252 Manual test in WebCore/manual-tests/property-map-save-crash.html |
|
12253 |
|
12254 * kjs/property_map.cpp: |
|
12255 (KJS::deletedSentinel): Use 1 instead of -1 to facilitate an easy bit mask |
|
12256 (KJS::isValid): New function: checks if a key is null or the deleted sentinel |
|
12257 (KJS::PropertyMap::~PropertyMap): Fixed up the branch logic here for readability |
|
12258 and a slight performance win |
|
12259 (KJS::PropertyMap::clear): |
|
12260 (KJS::PropertyMap::rehash): |
|
12261 (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): |
|
12262 (KJS::PropertyMap::save): Check keys with isValid() |
|
12263 |
|
12264 2006-03-02 Maciej Stachowiak <mjs@apple.com> |
|
12265 |
|
12266 - now fix mac build again |
|
12267 |
|
12268 * kjs/identifier.cpp: |
|
12269 |
|
12270 2006-03-02 Maciej Stachowiak <mjs@apple.com> |
|
12271 |
|
12272 Rubber stamped by Anders and Eric. |
|
12273 |
|
12274 - add fpconst.cpp to win32 build, it is now needed |
|
12275 |
|
12276 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
12277 * kjs/fpconst.cpp: |
|
12278 |
|
12279 2006-03-02 Maciej Stachowiak <mjs@apple.com> |
|
12280 |
|
12281 Reviewed by Eric. |
|
12282 |
|
12283 - fix windows build, broken by my last patch |
|
12284 |
|
12285 * kjs/JSImmediate.cpp: |
|
12286 * kjs/identifier.cpp: |
|
12287 * kxmlcore/FastMalloc.cpp: |
|
12288 * kxmlcore/Platform.h: |
|
12289 |
|
12290 2006-03-01 Maciej Stachowiak <mjs@apple.com> |
|
12291 |
|
12292 Reviewed by Darin. |
|
12293 |
|
12294 - Set up new prototype macros and avoid using #if without defined() in JSC |
|
12295 |
|
12296 Added new PLATFORM macros and related, to make sure #if's all check if relevant macros |
|
12297 are defined, and to separate core OS-level dependencies from operating environment |
|
12298 dependencies so you can, e.g., build KDE on Mac or Windows. |
|
12299 |
|
12300 * kxmlcore/Platform.h: Added. |
|
12301 |
|
12302 - deploy them everywhere in JavaScriptCore |
|
12303 |
|
12304 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
12305 * bindings/jni/jni_utility.cpp: |
|
12306 (KJS::Bindings::convertValueToJValue): |
|
12307 * bindings/objc/WebScriptObject.mm: |
|
12308 * bindings/objc/objc_instance.mm: |
|
12309 (ObjcInstance::end): |
|
12310 * bindings/softlinking.h: |
|
12311 * bindings/testbindings.mm: |
|
12312 (main): |
|
12313 * kjs/JSLock.cpp: |
|
12314 * kjs/collector.cpp: |
|
12315 (KJS::Collector::markCurrentThreadConservatively): |
|
12316 (KJS::Collector::markOtherThreadConservatively): |
|
12317 (KJS::Collector::markStackObjectsConservatively): |
|
12318 * kjs/config.h: |
|
12319 * kjs/date_object.cpp: |
|
12320 (gmtoffset): |
|
12321 (KJS::formatTime): |
|
12322 (KJS::DateProtoFunc::callAsFunction): |
|
12323 (KJS::DateObjectImp::construct): |
|
12324 (KJS::makeTime): |
|
12325 * kjs/dtoa.cpp: |
|
12326 * kjs/fpconst.cpp: |
|
12327 (KJS::sizeof): |
|
12328 (KJS::): |
|
12329 * kjs/grammar.y: |
|
12330 * kjs/identifier.cpp: |
|
12331 * kjs/internal.cpp: |
|
12332 * kjs/interpreter.cpp: |
|
12333 (KJS::Interpreter::evaluate): |
|
12334 (KJS::Interpreter::createLanguageInstanceForValue): |
|
12335 * kjs/interpreter.h: |
|
12336 * kjs/lookup.cpp: |
|
12337 * kjs/lookup.h: |
|
12338 * kjs/math_object.cpp: |
|
12339 * kjs/object.cpp: |
|
12340 * kjs/object.h: |
|
12341 * kjs/operations.cpp: |
|
12342 (KJS::isNaN): |
|
12343 (KJS::isInf): |
|
12344 (KJS::isPosInf): |
|
12345 (KJS::isNegInf): |
|
12346 * kjs/operations.h: |
|
12347 * kjs/regexp.cpp: |
|
12348 (KJS::RegExp::RegExp): |
|
12349 (KJS::RegExp::~RegExp): |
|
12350 (KJS::RegExp::match): |
|
12351 * kjs/regexp.h: |
|
12352 * kjs/testkjs.cpp: |
|
12353 (StopWatch::start): |
|
12354 (StopWatch::stop): |
|
12355 (StopWatch::getElapsedMS): |
|
12356 * kjs/ustring.cpp: |
|
12357 * kjs/ustring.h: |
|
12358 * kxmlcore/AlwaysInline.h: |
|
12359 * kxmlcore/Assertions.cpp: |
|
12360 * kxmlcore/Assertions.h: |
|
12361 * kxmlcore/FastMalloc.cpp: |
|
12362 (KXMLCore::): |
|
12363 * kxmlcore/FastMalloc.h: |
|
12364 * kxmlcore/FastMallocInternal.h: |
|
12365 * kxmlcore/HashTable.h: |
|
12366 * kxmlcore/TCPageMap.h: |
|
12367 * kxmlcore/TCSpinLock.h: |
|
12368 (TCMalloc_SpinLock::Lock): |
|
12369 (TCMalloc_SpinLock::Unlock): |
|
12370 (TCMalloc_SlowLock): |
|
12371 * kxmlcore/TCSystemAlloc.cpp: |
|
12372 (TCMalloc_SystemAlloc): |
|
12373 * os-win32/stdint.h: |
|
12374 |
|
12375 2006-02-28 Geoffrey Garen <ggaren@apple.com> |
|
12376 |
|
12377 Reviewed by Darin. |
|
12378 |
|
12379 - Fixed <rdar://problem/4448098> Switch PropertyMap deleted entry |
|
12380 placeholder to -1 from UString::Rep::null |
|
12381 |
|
12382 This turned out to be only a small speedup (.12%). That's within the |
|
12383 margin of error for super accurate JS iBench, but Shark confirms the |
|
12384 same, so I think it's worth landing. |
|
12385 |
|
12386 FYI, I also confirmed that the single entry optimization in |
|
12387 PropertyMap is a 3.2% speedup. |
|
12388 |
|
12389 * kjs/property_map.cpp: |
|
12390 (KJS::PropertyMap::~PropertyMap): |
|
12391 (KJS::PropertyMap::clear): |
|
12392 (KJS::PropertyMap::put): |
|
12393 (KJS::PropertyMap::insert): |
|
12394 (KJS::PropertyMap::rehash): |
|
12395 (KJS::PropertyMap::remove): |
|
12396 (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): |
|
12397 (KJS::PropertyMap::checkConsistency): |
|
12398 * kjs/property_map.h: |
|
12399 (KJS::PropertyMap::deletedSentinel): |
|
12400 |
|
12401 2006-02-27 Eric Seidel <eseidel@apple.com> |
|
12402 |
|
12403 Rubber-stamped by darin. |
|
12404 |
|
12405 Remove fpconst.cpp, unused on win32 and the cause of linker warnings. |
|
12406 |
|
12407 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
12408 |
|
12409 2006-02-27 Eric Seidel <eseidel@apple.com> |
|
12410 |
|
12411 Reviewed by mjs. |
|
12412 |
|
12413 Fix Assertions.cpp to compile on win32. |
|
12414 |
|
12415 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
12416 * kxmlcore/Assertions.cpp: |
|
12417 |
|
12418 2006-02-27 Eric Seidel <eseidel@apple.com> |
|
12419 |
|
12420 Reviewed by mjs. |
|
12421 |
|
12422 Made Assertions.cpp platform independent. |
|
12423 Moved mac-specific logging logic up into WebCore. |
|
12424 http://bugs.webkit.org/show_bug.cgi?id=7503 |
|
12425 |
|
12426 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
12427 * kxmlcore/Assertions.cpp: Added. |
|
12428 * kxmlcore/Assertions.h: |
|
12429 * kxmlcore/Assertions.mm: Removed. |
|
12430 |
|
12431 2006-02-27 Darin Adler <darin@apple.com> |
|
12432 |
|
12433 - fixed Mac Debug build, there was an unused parameter |
|
12434 |
|
12435 * kxmlcore/FastMalloc.cpp: (KXMLCore::fastMallocRegisterThread): |
|
12436 Remove parameter name. |
|
12437 |
|
12438 * kjs/debugger.h: Fixed comment. |
|
12439 |
|
12440 2006-02-27 Eric Seidel <eseidel@apple.com> |
|
12441 |
|
12442 Reviewed by darin. |
|
12443 |
|
12444 * kxmlcore/Vector.h: |
|
12445 (KXMLCore::deleteAllValues): fix unused variable warning |
|
12446 |
|
12447 2006-02-21 Maciej Stachowiak <mjs@apple.com> |
|
12448 |
|
12449 Reviewed by Darin. |
|
12450 |
|
12451 - Turn off -Wno-unused-param for JavaScriptCore and get rid of unused params |
|
12452 http://bugs.webkit.org/show_bug.cgi?id=7384 |
|
12453 |
|
12454 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
12455 * bindings/NP_jsobject.cpp: |
|
12456 (jsAllocate): |
|
12457 (_NPN_InvokeDefault): |
|
12458 (_NPN_Evaluate): |
|
12459 (_NPN_GetProperty): |
|
12460 (_NPN_SetProperty): |
|
12461 (_NPN_RemoveProperty): |
|
12462 (_NPN_HasProperty): |
|
12463 (_NPN_HasMethod): |
|
12464 * bindings/c/c_class.h: |
|
12465 (KJS::Bindings::CClass::constructorAt): |
|
12466 * bindings/c/c_utility.cpp: |
|
12467 (KJS::Bindings::convertNPVariantToValue): |
|
12468 * bindings/jni/jni_class.cpp: |
|
12469 (JavaClass::methodsNamed): |
|
12470 (JavaClass::fieldNamed): |
|
12471 * bindings/jni/jni_instance.cpp: |
|
12472 (JavaInstance::invokeDefaultMethod): |
|
12473 * bindings/jni/jni_jsobject.cpp: |
|
12474 * bindings/jni/jni_objc.mm: |
|
12475 (-[NSObject KJS::Bindings::]): |
|
12476 * bindings/objc/WebScriptObject.mm: |
|
12477 (+[WebUndefined allocWithZone:]): |
|
12478 (-[WebUndefined initWithCoder:]): |
|
12479 (-[WebUndefined encodeWithCoder:]): |
|
12480 (-[WebUndefined copyWithZone:]): |
|
12481 * bindings/objc/objc_class.h: |
|
12482 (KJS::Bindings::ObjcClass::constructorAt): |
|
12483 * bindings/objc/objc_class.mm: |
|
12484 (KJS::Bindings::ObjcClass::methodsNamed): |
|
12485 (KJS::Bindings::ObjcClass::fallbackObject): |
|
12486 * bindings/objc/objc_instance.mm: |
|
12487 (ObjcInstance::getValueOfUndefinedField): |
|
12488 * bindings/objc/objc_runtime.mm: |
|
12489 (ObjcFallbackObjectImp::getOwnPropertySlot): |
|
12490 (ObjcFallbackObjectImp::put): |
|
12491 (ObjcFallbackObjectImp::canPut): |
|
12492 (ObjcFallbackObjectImp::deleteProperty): |
|
12493 (ObjcFallbackObjectImp::toBoolean): |
|
12494 * bindings/runtime.cpp: |
|
12495 (KJS::Bindings::Instance::createLanguageInstanceForValue): |
|
12496 * bindings/runtime.h: |
|
12497 (KJS::Bindings::Instance::getValueOfUndefinedField): |
|
12498 (KJS::Bindings::Instance::setValueOfUndefinedField): |
|
12499 * bindings/runtime_array.cpp: |
|
12500 (RuntimeArray::lengthGetter): |
|
12501 (RuntimeArray::indexGetter): |
|
12502 (RuntimeArray::put): |
|
12503 (RuntimeArray::deleteProperty): |
|
12504 * bindings/runtime_method.cpp: |
|
12505 (RuntimeMethod::lengthGetter): |
|
12506 (RuntimeMethod::execute): |
|
12507 * bindings/runtime_object.cpp: |
|
12508 (RuntimeObjectImp::fallbackObjectGetter): |
|
12509 (RuntimeObjectImp::fieldGetter): |
|
12510 (RuntimeObjectImp::methodGetter): |
|
12511 (RuntimeObjectImp::put): |
|
12512 (RuntimeObjectImp::canPut): |
|
12513 (RuntimeObjectImp::deleteProperty): |
|
12514 (RuntimeObjectImp::defaultValue): |
|
12515 (RuntimeObjectImp::callAsFunction): |
|
12516 * bindings/runtime_root.cpp: |
|
12517 (performJavaScriptAccess): |
|
12518 * kjs/array_object.cpp: |
|
12519 (ArrayInstance::lengthGetter): |
|
12520 (ArrayInstance::getOwnPropertySlot): |
|
12521 (ArrayPrototype::ArrayPrototype): |
|
12522 (ArrayPrototype::getOwnPropertySlot): |
|
12523 * kjs/bool_object.cpp: |
|
12524 (BooleanObjectImp::BooleanObjectImp): |
|
12525 * kjs/date_object.cpp: |
|
12526 (KJS::DateObjectFuncImp::DateObjectFuncImp): |
|
12527 (KJS::DateObjectFuncImp::callAsFunction): |
|
12528 * kjs/error_object.cpp: |
|
12529 (ErrorObjectImp::ErrorObjectImp): |
|
12530 (NativeErrorPrototype::NativeErrorPrototype): |
|
12531 (NativeErrorImp::NativeErrorImp): |
|
12532 * kjs/function.cpp: |
|
12533 (KJS::FunctionImp::argumentsGetter): |
|
12534 (KJS::FunctionImp::lengthGetter): |
|
12535 (KJS::Arguments::mappedIndexGetter): |
|
12536 (KJS::ActivationImp::argumentsGetter): |
|
12537 (KJS::ActivationImp::put): |
|
12538 * kjs/function_object.cpp: |
|
12539 (FunctionObjectImp::FunctionObjectImp): |
|
12540 * kjs/internal.cpp: |
|
12541 (KJS::GetterSetterImp::toPrimitive): |
|
12542 (KJS::GetterSetterImp::toBoolean): |
|
12543 * kjs/interpreter.cpp: |
|
12544 (KJS::Interpreter::evaluate): |
|
12545 * kjs/interpreter.h: |
|
12546 (KJS::Interpreter::isGlobalObject): |
|
12547 (KJS::Interpreter::interpreterForGlobalObject): |
|
12548 (KJS::Interpreter::isSafeScript): |
|
12549 * kjs/lexer.cpp: |
|
12550 (Lexer::makeIdentifier): |
|
12551 (Lexer::makeUString): |
|
12552 * kjs/lookup.h: |
|
12553 (KJS::staticFunctionGetter): |
|
12554 (KJS::staticValueGetter): |
|
12555 * kjs/nodes.cpp: |
|
12556 (StatementNode::processFuncDecl): |
|
12557 (PropertyNode::evaluate): |
|
12558 (PropertyNameNode::evaluate): |
|
12559 * kjs/number_object.cpp: |
|
12560 (NumberObjectImp::NumberObjectImp): |
|
12561 (NumberObjectImp::getOwnPropertySlot): |
|
12562 * kjs/object.cpp: |
|
12563 (KJS::JSObject::defineGetter): |
|
12564 (KJS::JSObject::defineSetter): |
|
12565 (KJS::JSObject::hasInstance): |
|
12566 (KJS::JSObject::propertyIsEnumerable): |
|
12567 * kjs/object_object.cpp: |
|
12568 (ObjectObjectImp::ObjectObjectImp): |
|
12569 * kjs/property_slot.cpp: |
|
12570 (KJS::PropertySlot::undefinedGetter): |
|
12571 (KJS::PropertySlot::functionGetter): |
|
12572 * kjs/reference.cpp: |
|
12573 (KJS::Reference::getPropertyName): |
|
12574 * kjs/reference_list.cpp: |
|
12575 (ReferenceListIterator::operator++): |
|
12576 * kjs/regexp_object.cpp: |
|
12577 (RegExpObjectImp::RegExpObjectImp): |
|
12578 (RegExpObjectImp::getValueProperty): |
|
12579 (RegExpObjectImp::putValueProperty): |
|
12580 * kjs/string_object.cpp: |
|
12581 (StringInstance::lengthGetter): |
|
12582 (StringInstance::indexGetter): |
|
12583 (StringPrototype::StringPrototype): |
|
12584 * kxmlcore/Assertions.mm: |
|
12585 * kxmlcore/FastMalloc.cpp: |
|
12586 (KXMLCore::TCMalloc_PageHeap::CheckList): |
|
12587 * kxmlcore/HashTable.h: |
|
12588 (KXMLCore::HashTableConstIterator::checkValidity): |
|
12589 (KXMLCore::IdentityHashTranslator::translate): |
|
12590 * pcre/pcre_get.c: |
|
12591 (pcre_get_stringnumber): |
|
12592 |
|
12593 2006-02-23 Darin Adler <darin@apple.com> |
|
12594 |
|
12595 - try to fix buildbot failure |
|
12596 |
|
12597 * bindings/c/c_utility.cpp: Touch this file, which seems to not have been |
|
12598 recompiled after additional inlining was introduced (Xcode bug?). |
|
12599 |
|
12600 2006-02-23 Geoffrey Garen <ggaren@apple.com> |
|
12601 |
|
12602 Reviewed by Darin, Maciej. |
|
12603 |
|
12604 - Inline some functions suggested by Shark. 2.9% speedup on super |
|
12605 accurate JS iBench. |
|
12606 |
|
12607 http://bugs.webkit.org/show_bug.cgi?id=7411 |
|
12608 <rdar://problem/4448116> |
|
12609 |
|
12610 * kjs/nodes.h: |
|
12611 (KJS::ArgumentsNode::evaluateList): |
|
12612 * kjs/object.cpp: |
|
12613 * kjs/object.h: |
|
12614 (KJS::ScopeChain::release): |
|
12615 (KJS::JSObject::toPrimitive): |
|
12616 * kjs/scope_chain.cpp: |
|
12617 * kjs/ustring.cpp: |
|
12618 * kjs/ustring.h: |
|
12619 (KJS::UString::toArrayIndex): |
|
12620 * kjs/value.cpp: |
|
12621 * kjs/value.h: |
|
12622 (KJS::JSValue::toObject): |
|
12623 * kxmlcore/FastMalloc.cpp: |
|
12624 (KXMLCore::TCMalloc_ThreadCache_FreeList::Push): |
|
12625 (KXMLCore::TCMalloc_ThreadCache_FreeList::Pop): |
|
12626 |
|
12627 2006-02-21 Eric Seidel <eseidel@apple.com> |
|
12628 |
|
12629 Added *.user to ignore list. |
|
12630 |
|
12631 2006-02-21 Eric Seidel <eseidel@apple.com> |
|
12632 |
|
12633 Reviewed by ggaren. |
|
12634 |
|
12635 Add grammarWrapper.cpp to work around visual studio bug plaguing buildbot. |
|
12636 |
|
12637 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
12638 * JavaScriptCore.vcproj/JavaScriptCore/grammarWrapper.cpp: Added. |
|
12639 |
|
12640 2006-02-21 Eric Seidel <eseidel@apple.com> |
|
12641 |
|
12642 Reviewed by ggaren. |
|
12643 |
|
12644 * kjs/testkjs.cpp: #if out timeval code on win32 |
|
12645 |
|
12646 2006-02-21 Michael Emmel <mike.emmel@gmail.com> |
|
12647 |
|
12648 Reviewed by Darin. |
|
12649 |
|
12650 - fix http://bugs.webkit.org/show_bug.cgi?id=7397 |
|
12651 TCPageMap.h would not compile for me because string.h was missing |
|
12652 |
|
12653 * kxmlcore/TCPageMap.h: Added <string.h> include. |
|
12654 |
|
12655 2006-02-21 Darin Adler <darin@apple.com> |
|
12656 |
|
12657 Reviewed by John Sullivan. |
|
12658 |
|
12659 - http://bugs.webkit.org/show_bug.cgi?id=7404 |
|
12660 remove a bunch of extra implementsCall overrides |
|
12661 |
|
12662 * JavaScriptCore.xcodeproj/project.pbxproj: Sorted files. |
|
12663 |
|
12664 * kjs/internal.h: Made InternalFunctionImp::callAsFunction pure virtual so that |
|
12665 we'll get a compile error if some derived class neglects to implement it. |
|
12666 |
|
12667 * kjs/function.cpp: (KJS::FunctionImp::FunctionImp): Remove unneeded initialization |
|
12668 of param, which is an OwnPtr so it gets initialized by default. |
|
12669 |
|
12670 * bindings/runtime_method.cpp: |
|
12671 * bindings/runtime_method.h: |
|
12672 * kjs/array_object.cpp: |
|
12673 * kjs/array_object.h: |
|
12674 * kjs/bool_object.cpp: |
|
12675 * kjs/bool_object.h: |
|
12676 * kjs/date_object.cpp: |
|
12677 * kjs/date_object.h: |
|
12678 * kjs/error_object.cpp: |
|
12679 * kjs/error_object.h: |
|
12680 * kjs/function.cpp: |
|
12681 * kjs/function.h: |
|
12682 * kjs/function_object.cpp: |
|
12683 * kjs/function_object.h: |
|
12684 * kjs/math_object.cpp: |
|
12685 * kjs/math_object.h: |
|
12686 * kjs/number_object.cpp: |
|
12687 * kjs/number_object.h: |
|
12688 * kjs/object_object.cpp: |
|
12689 * kjs/object_object.h: |
|
12690 * kjs/regexp_object.cpp: |
|
12691 * kjs/regexp_object.h: |
|
12692 * kjs/string_object.cpp: |
|
12693 * kjs/string_object.h: |
|
12694 Removed many rendundant implementations of implementsCall from subclasses of |
|
12695 InternalFunctionImp. |
|
12696 |
|
12697 2006-02-21 Darin Adler <darin@apple.com> |
|
12698 |
|
12699 - fixed build |
|
12700 |
|
12701 * kjs/internal.cpp: (KJS::InternalFunctionImp::implementsCall): |
|
12702 Oops, fixed name. |
|
12703 |
|
12704 2006-02-21 Darin Adler <darin@apple.com> |
|
12705 |
|
12706 Change suggested by Mitz. |
|
12707 |
|
12708 - http://bugs.webkit.org/show_bug.cgi?id=7402 |
|
12709 REGRESSION: Methods do not execute |
|
12710 |
|
12711 * kjs/internal.h: Add implementsHasCall to InternalFunctionImp. |
|
12712 * kjs/internal.cpp: (KJS::InternalFunctionImp::implementsHasCall): |
|
12713 Return true. All the classes derived from InternalFunctionImp need |
|
12714 to return true from this -- later we can remove all the extra |
|
12715 implementations too. |
|
12716 |
|
12717 2006-02-21 Maciej Stachowiak <mjs@apple.com> |
|
12718 |
|
12719 - fix build breakage caused by last-minute change to my patch |
|
12720 |
|
12721 * kjs/lookup.h: |
|
12722 |
|
12723 2006-02-20 Maciej Stachowiak <mjs@apple.com> |
|
12724 |
|
12725 Reviewed by Geoff and Darin. |
|
12726 |
|
12727 Patch from Maks Orlovich, based on work by David Faure, hand-applied and |
|
12728 significantly reworked by me. |
|
12729 |
|
12730 - Patch: give internal function names (KJS merge) |
|
12731 http://bugs.webkit.org/show_bug.cgi?id=6279 |
|
12732 |
|
12733 * tests/mozilla/expected.html: Updated for newly fixed test. |
|
12734 |
|
12735 * kjs/array_object.cpp: |
|
12736 (ArrayProtoFunc::ArrayProtoFunc): |
|
12737 * kjs/array_object.h: |
|
12738 * kjs/bool_object.cpp: |
|
12739 (BooleanPrototype::BooleanPrototype): |
|
12740 (BooleanProtoFunc::BooleanProtoFunc): |
|
12741 * kjs/bool_object.h: |
|
12742 * kjs/date_object.cpp: |
|
12743 (KJS::DateProtoFunc::DateProtoFunc): |
|
12744 (KJS::DateObjectImp::DateObjectImp): |
|
12745 (KJS::DateObjectFuncImp::DateObjectFuncImp): |
|
12746 * kjs/error_object.cpp: |
|
12747 (ErrorPrototype::ErrorPrototype): |
|
12748 (ErrorProtoFunc::ErrorProtoFunc): |
|
12749 * kjs/error_object.h: |
|
12750 * kjs/function.cpp: |
|
12751 (KJS::FunctionImp::FunctionImp): |
|
12752 (KJS::GlobalFuncImp::GlobalFuncImp): |
|
12753 * kjs/function.h: |
|
12754 * kjs/function_object.cpp: |
|
12755 (FunctionPrototype::FunctionPrototype): |
|
12756 (FunctionProtoFunc::FunctionProtoFunc): |
|
12757 (FunctionProtoFunc::callAsFunction): |
|
12758 * kjs/function_object.h: |
|
12759 * kjs/internal.cpp: |
|
12760 (KJS::InterpreterImp::initGlobalObject): |
|
12761 (KJS::InternalFunctionImp::InternalFunctionImp): |
|
12762 * kjs/internal.h: |
|
12763 (KJS::InternalFunctionImp::functionName): |
|
12764 * kjs/lookup.h: |
|
12765 (KJS::staticFunctionGetter): |
|
12766 (KJS::HashEntryFunction::HashEntryFunction): |
|
12767 (KJS::HashEntryFunction::implementsCall): |
|
12768 (KJS::HashEntryFunction::toBoolean): |
|
12769 (KJS::HashEntryFunction::implementsHasInstance): |
|
12770 (KJS::HashEntryFunction::hasInstance): |
|
12771 * kjs/math_object.cpp: |
|
12772 (MathFuncImp::MathFuncImp): |
|
12773 * kjs/math_object.h: |
|
12774 * kjs/number_object.cpp: |
|
12775 (NumberPrototype::NumberPrototype): |
|
12776 (NumberProtoFunc::NumberProtoFunc): |
|
12777 * kjs/number_object.h: |
|
12778 * kjs/object.cpp: |
|
12779 (KJS::JSObject::putDirectFunction): |
|
12780 (KJS::Error::create): |
|
12781 * kjs/object.h: |
|
12782 * kjs/object_object.cpp: |
|
12783 (ObjectPrototype::ObjectPrototype): |
|
12784 (ObjectProtoFunc::ObjectProtoFunc): |
|
12785 * kjs/object_object.h: |
|
12786 * kjs/regexp_object.cpp: |
|
12787 (RegExpPrototype::RegExpPrototype): |
|
12788 (RegExpProtoFunc::RegExpProtoFunc): |
|
12789 * kjs/regexp_object.h: |
|
12790 * kjs/string_object.cpp: |
|
12791 (StringProtoFunc::StringProtoFunc): |
|
12792 (StringObjectImp::StringObjectImp): |
|
12793 (StringObjectFuncImp::StringObjectFuncImp): |
|
12794 * kjs/string_object.h: |
|
12795 |
|
12796 2006-02-20 Geoffrey Garen <ggaren@apple.com> |
|
12797 |
|
12798 Reviewed by Darin, with help from Eric, Maciej. |
|
12799 |
|
12800 - More changes to support super-accurate JS iBench. Doesn't work on |
|
12801 Windows. (Doesn't break Windows, either.) I've filed |
|
12802 [http://bugs.webkit.org/show_bug.cgi?id=7399] about that. |
|
12803 |
|
12804 * kjs/interpreter.cpp: |
|
12805 (KJS::Interpreter::evaluate): Print line numbers with exception output |
|
12806 * kjs/testkjs.cpp: Changed " *" to "* " because Eric says that's the |
|
12807 way we roll with .cpp files. |
|
12808 (StopWatch::StopWatch): New class. Provides microsecond-accurate |
|
12809 timings. |
|
12810 (StopWatch::~StopWatch): |
|
12811 (StopWatch::start): |
|
12812 (StopWatch::stop): |
|
12813 (StopWatch::getElapsedMS): |
|
12814 (TestFunctionImp::callAsFunction): Added missing return statement. |
|
12815 Fixed up "run" to use refactored helper functions. Removed bogus |
|
12816 return statement from "quit" case. Made "print" output to stdout |
|
12817 instead of stderr because that makes more sense, and PERL handles |
|
12818 stdout better. |
|
12819 (main): Factored out KXMLCore unit tests. Removed custom exception |
|
12820 printing code because the interpreter prints exceptions for you. Added |
|
12821 a "delete" call for the GlobalImp we allocate. |
|
12822 (testIsInteger): New function, result of refacotring. |
|
12823 (createStringWithContentsOfFile): New function, result of refactoring. |
|
12824 Renamed "code" to "buffer" to match factored-out-ness. |
|
12825 |
|
12826 2006-02-20 Eric Seidel <eseidel@apple.com> |
|
12827 |
|
12828 Reviewed by hyatt. |
|
12829 |
|
12830 Fix "Copy ICU DLLs..." phase. |
|
12831 |
|
12832 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
12833 * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: |
|
12834 |
|
12835 2006-02-19 Darin Adler <darin@apple.com> |
|
12836 |
|
12837 - renamed ERROR to LOG_ERROR to fix build |
|
12838 presumably Maciej had this change and forgot to land it |
|
12839 |
|
12840 * kjs/collector.cpp: Removed now-unneeded #undef ERROR. |
|
12841 * kxmlcore/Assertions.h: Renamed ERROR to LOG_ERROR. |
|
12842 * kxmlcore/FastMalloc.cpp: Changed MESSAGE macro to use LOG_ERROR. |
|
12843 |
|
12844 2006-02-18 Mitz Pettel <opendarwin.org@mitzpettel.com> |
|
12845 |
|
12846 Test: fast/js/toString-exception.html |
|
12847 |
|
12848 Reviewed by Maciej. |
|
12849 |
|
12850 - fix http://bugs.webkit.org/show_bug.cgi?id=7343 |
|
12851 REGRESSION: fast/js/toString-overrides.html fails when run multiple times |
|
12852 |
|
12853 * kjs/array_object.cpp: |
|
12854 (ArrayProtoFunc::callAsFunction): Remove the object from the visited elements set before |
|
12855 returning an error. |
|
12856 |
|
12857 2006-02-18 Darin Adler <darin@apple.com> |
|
12858 |
|
12859 Reviewed by Maciej. |
|
12860 |
|
12861 - http://bugs.webkit.org/show_bug.cgi?id=7345 |
|
12862 add insert and remove to KXMLCore::Vector |
|
12863 |
|
12864 * kxmlcore/Vector.h: Added "moveOverlapping", which is used in both |
|
12865 insert and remove to slide elements within the vector. Also added |
|
12866 "insert" and "remove" functions. |
|
12867 |
|
12868 2006-02-16 Geoffrey Garen <ggaren@apple.com> |
|
12869 |
|
12870 Reviewed by John. |
|
12871 |
|
12872 - Fixed <rdar://problem/4448534> TOT REGRESSION: crash in KJS:: |
|
12873 Bindings::Instance::deref when leaving page @ gigaom.com |
|
12874 |
|
12875 * bindings/c/c_instance.cpp: |
|
12876 (KJS::Bindings::CInstance::~CInstance): Since we cache the class object |
|
12877 globally, we shouldn't delete it, so don't. |
|
12878 |
|
12879 2006-02-16 Timothy Hatcher <timothy@apple.com> |
|
12880 |
|
12881 Added -Wno-deprecated-declarations to all the ObjC binding files to prevent deprecation |
|
12882 warnings. Using <rdar://problem/4448350> to track this. |
|
12883 |
|
12884 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
12885 * bindings/objc/objc_jsobject.h: Removed empty file. |
|
12886 * bindings/objc/objc_jsobject.mm: Removed empty file. |
|
12887 |
|
12888 2006-02-16 Tim Omernick <timo@apple.com> |
|
12889 |
|
12890 Reviewed by Geoff. |
|
12891 |
|
12892 <rdar://problem/4428609> Flash Player 8.0.22 can crash Safari (and WebKit apps) with |
|
12893 javascript disabled (7015) |
|
12894 |
|
12895 * bindings/NP_jsobject.cpp: |
|
12896 (_NPN_CreateNoScriptObject): |
|
12897 Returns an NPObject which is not bound to a JavaScript object. This kind of NPObject |
|
12898 can be given to a plugin as the "window script object" when JavaScript is disabled. |
|
12899 The object has a custom NPClass, NPNoScriptObjectClass, which has no defined methods. |
|
12900 Because of this, none of the NPN_* functions called by the plugin on this "no script |
|
12901 object" will cause entry into JavaScript code. |
|
12902 (_NPN_InvokeDefault): |
|
12903 Make sure the NPVariant is filled before returning from this function. This never |
|
12904 mattered before because we never reached this case, having only created NPObjects of |
|
12905 the class NPScriptObjectClass. |
|
12906 (_NPN_Invoke): |
|
12907 ditto |
|
12908 (_NPN_Evaluate): |
|
12909 ditto |
|
12910 (_NPN_GetProperty): |
|
12911 ditto |
|
12912 |
|
12913 * bindings/NP_jsobject.h: |
|
12914 Declared _NPN_CreateNoScriptObject(). |
|
12915 |
|
12916 2006-02-16 Darin Adler <darin@apple.com> |
|
12917 |
|
12918 Reviewed by me, change by Peter Kuemmel. |
|
12919 |
|
12920 * kjs/operations.cpp: (KJS::isNegInf): Fix Windows code, which was |
|
12921 checking for positive infinity (rolling in fix from KDE side). |
|
12922 |
|
12923 2006-02-15 Geoffrey Garen <ggaren@apple.com> |
|
12924 |
|
12925 Reviewed by Maciej, Eric. |
|
12926 |
|
12927 - JavaScriptCore half of fix for <rdar://problem/4176077> CrashTracer: 6569 |
|
12928 crashes in DashboardClient at com.apple.JavaScriptCore: |
|
12929 KJS::Bindings::ObjcFallbackObjectImp::type() |
|
12930 |
|
12931 WebCore and JavaScriptCore weren't sharing Instance objects very |
|
12932 nicely. I made them use RefPtrs, and sent them to bed without dessert. |
|
12933 |
|
12934 * bindings/jni/jni_instance.cpp: Made _instance a RefPtr |
|
12935 (JavaInstance::~JavaInstance): |
|
12936 (JObjectWrapper::JObjectWrapper): |
|
12937 * bindings/jni/jni_instance.h: |
|
12938 (KJS::Bindings::JObjectWrapper::ref): |
|
12939 (KJS::Bindings::JObjectWrapper::deref): |
|
12940 * bindings/jni/jni_runtime.cpp: Made _array a RefPtr |
|
12941 (JavaArray::~JavaArray): |
|
12942 (JavaArray::JavaArray): |
|
12943 * bindings/jni/jni_runtime.h: |
|
12944 (KJS::Bindings::JavaArray::operator=): |
|
12945 * bindings/objc/objc_runtime.h: |
|
12946 - Prohibited copying because that would muss the ref count. |
|
12947 - Prohibited construction without instance because an instance wrapper |
|
12948 without an instance is almost certainly a bug. |
|
12949 * bindings/objc/objc_runtime.mm: |
|
12950 (ObjcFallbackObjectImp::ObjcFallbackObjectImp): |
|
12951 * bindings/runtime.cpp: |
|
12952 (KJS::Bindings::Instance::Instance): |
|
12953 (KJS::Bindings::Instance::createBindingForLanguageInstance): |
|
12954 (KJS::Bindings::Instance::createRuntimeObject): |
|
12955 * bindings/runtime.h: |
|
12956 (KJS::Bindings::Instance::ref): |
|
12957 (KJS::Bindings::Instance::deref): |
|
12958 * bindings/runtime_object.cpp: |
|
12959 (RuntimeObjectImp::RuntimeObjectImp): |
|
12960 (RuntimeObjectImp::fallbackObjectGetter): |
|
12961 (RuntimeObjectImp::fieldGetter): |
|
12962 (RuntimeObjectImp::methodGetter): |
|
12963 (RuntimeObjectImp::getOwnPropertySlot): |
|
12964 (RuntimeObjectImp::put): |
|
12965 (RuntimeObjectImp::canPut): |
|
12966 * bindings/runtime_object.h: |
|
12967 - Removed ownsInstance data member because RefPtr takes care of |
|
12968 instance lifetime now. |
|
12969 - Prohibited copying because that would muss the ref count. |
|
12970 - Prohibited construction without instance because an instance wrapper |
|
12971 without an instance is almost certainly a bug. |
|
12972 (KJS::RuntimeObjectImp::getInternalInstance): |
|
12973 |
|
12974 2006-02-15 Geoffrey Garen <ggaren@apple.com> |
|
12975 |
|
12976 Reviewed by John. |
|
12977 |
|
12978 - Applied the 4330457 change to CClass and ObjcClass as well. |
|
12979 |
|
12980 Once plugins work in DumpRenderTree, running run-webkit-tests --leaks |
|
12981 will catch this. |
|
12982 |
|
12983 This change isn't as critical because CClass and ObjcClass objects get |
|
12984 cached globally and never deleted, but it's good practice, in case we |
|
12985 ever do decide to delete CClass and ObjcClass objects. |
|
12986 |
|
12987 This change requires prohibiting copying, because we don't do any |
|
12988 intelligent ref-counting -- when a Class is destroyed, it destroys its |
|
12989 methods and fields unconditionally. (Java classes already prohibited |
|
12990 copying.) |
|
12991 |
|
12992 * bindings/c/c_class.cpp: |
|
12993 - Merged _commonInit and _commonDelete into constructor and destructor. |
|
12994 (CClass::CClass): |
|
12995 (CClass::~CClass): |
|
12996 (CClass::methodsNamed): Added delete callbacks |
|
12997 (CClass::fieldNamed): Added delete callbacks |
|
12998 * bindings/c/c_class.h: Prohibited copying |
|
12999 * bindings/c/c_instance.cpp: |
|
13000 (KJS::Bindings::CInstance::getClass): Changed to use the preferred |
|
13001 class factory method, to take advantage of the global cache. |
|
13002 |
|
13003 [ Repeated changes applied to CClass for ObjcClass: ] |
|
13004 |
|
13005 * bindings/objc/objc_class.h: |
|
13006 * bindings/objc/objc_class.mm: |
|
13007 (KJS::Bindings::ObjcClass::ObjcClass): |
|
13008 (KJS::Bindings::ObjcClass::~ObjcClass): |
|
13009 (KJS::Bindings::ObjcClass::methodsNamed): |
|
13010 (KJS::Bindings::ObjcClass::fieldNamed): |
|
13011 * bindings/objc/objc_runtime.h: |
|
13012 (KJS::Bindings::ObjcMethod::ObjcMethod): Initialized uninitialized |
|
13013 variable to prevent bad CFRelease. |
|
13014 (KJS::Bindings::ObjcMethod::~ObjcMethod): Removed erroneous ';' from |
|
13015 if statement to prevent bad CFRelease. |
|
13016 * bindings/objc/objc_runtime.cpp: Changed to use the preferred |
|
13017 ObjectStructPtr, for clarity. |
|
13018 |
|
13019 2006-02-14 Geoffrey Garen <ggaren@apple.com> |
|
13020 |
|
13021 Reviewed by John. |
|
13022 |
|
13023 - Fixed <rdar://problem/4330457> CrashTracer: [REGRESSION] 3763 crashes |
|
13024 in Safari at com.apple.JavaScriptCore: KJS::Bindings::JavaInstance:: |
|
13025 getClass const + 56 |
|
13026 |
|
13027 Once plugins work in DumpRenderTree, running run-webkit-tests --leaks |
|
13028 will catch this. |
|
13029 |
|
13030 This was a memory leak in the bindings code. The leak was so extreme |
|
13031 that it would cause Safari or the JVM to abort from lack of memory. |
|
13032 Upon construction, Class objects create field and method objects, |
|
13033 storing them in CFDictionaries. The bug was that upon destruction, the |
|
13034 class objects released the dictionaries but didn't destroy the stored |
|
13035 objects. |
|
13036 |
|
13037 The fix is to supply CFDictionary callbacks for destroying the values |
|
13038 added to the dictionary. |
|
13039 |
|
13040 * bindings/jni/jni_class.cpp: |
|
13041 (JavaClass::JavaClass): Added delete callbacks |
|
13042 * bindings/runtime.cpp: Added definitions for delete callbacks |
|
13043 (KJS::Bindings::deleteMethodList): |
|
13044 (KJS::Bindings::deleteMethod): |
|
13045 (KJS::Bindings::deleteField): |
|
13046 * bindings/runtime.h: Added declarations for delete callbacks |
|
13047 |
|
13048 2006-02-14 Timothy Hatcher <timothy@apple.com> |
|
13049 |
|
13050 Reviewed by Justin. |
|
13051 |
|
13052 Fixed <rdar://problem/4415050> STD: WebCore build steps use echo -n, which will change |
|
13053 behavior due to POSIX version of sh |
|
13054 |
|
13055 * JavaScriptCore.xcodeproj/project.pbxproj: removed the use of echo -n, replaced with printf "" |
|
13056 |
|
13057 2006-02-13 Dave Hyatt <hyatt@apple.com> |
|
13058 |
|
13059 Fix Win32 bustage in JavaScriptCore. |
|
13060 |
|
13061 Reviewed by darin |
|
13062 |
|
13063 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: |
|
13064 Add JSImmediate to the Win32 project. |
|
13065 |
|
13066 * kjs/JSImmediate.h: |
|
13067 (KJS::JSImmediate::fromDouble): |
|
13068 (KJS::JSImmediate::toDouble): |
|
13069 (KJS::JSImmediate::NanAsBits): |
|
13070 (KJS::JSImmediate::oneAsBits): |
|
13071 Win32 needs explicit returns after abort() for non-void functions. |
|
13072 |
|
13073 * kjs/testkjs.cpp: |
|
13074 (run): |
|
13075 Win32 catches a bug in testkjs! The "return 2" should actually |
|
13076 have been a return false. |
|
13077 |
|
13078 * kjs/value.h: |
|
13079 The extern decls of NaN and Inf need to be const. |
|
13080 |
|
13081 === JavaScriptCore-521.7 === |
|
13082 |
|
13083 2006-02-13 Timothy Hatcher <timothy@apple.com> |
|
13084 |
|
13085 Reviewed by Darin. |
|
13086 |
|
13087 Replaced the old NS_DURING exception blocking with @try/@catch. |
|
13088 |
|
13089 * JavaScriptCorePrefix.h: undef try and catch to workaround a C++ conflict |
|
13090 * bindings/objc/objc_instance.mm: |
|
13091 (ObjcInstance::invokeMethod): |
|
13092 (ObjcInstance::invokeDefaultMethod): |
|
13093 (ObjcInstance::setValueOfUndefinedField): |
|
13094 (ObjcInstance::getValueOfUndefinedField): |
|
13095 * bindings/objc/objc_runtime.mm: |
|
13096 (ObjcField::valueFromInstance): |
|
13097 (ObjcField::setValueToInstance): |
|
13098 (ObjcArray::setValueAt): |
|
13099 (ObjcArray::valueAt): |
|
13100 |
|
13101 2006-02-13 Darin Adler <darin@apple.com> |
|
13102 |
|
13103 - fix a couple problems building on Windows, based on requests |
|
13104 from Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
13105 |
|
13106 * kjs/JSImmediate.h: Change code using non-standard u_int32/64_t types |
|
13107 to the standard uint32/64_t. Also removed curious "isIEEE()" function |
|
13108 that checked the sizes of some types (and type sizes alone don't tell you if |
|
13109 the floating point conforms to the IEEE-standard). Added missing include |
|
13110 of <stdint.h>. |
|
13111 |
|
13112 * kjs/property_slot.h: Added missing include of <assert.h>. |
|
13113 |
|
13114 2006-02-12 Geoffrey Garen <ggaren@apple.com> |
|
13115 |
|
13116 Reviewed by darin. |
|
13117 |
|
13118 Cleaned up testkjs, added new "run" functionality to allow scripting |
|
13119 tests from within JS. ("run" is a part of my new super-accurate |
|
13120 JS iBench.) |
|
13121 |
|
13122 No regressions in run-javascriptcore-tests. |
|
13123 |
|
13124 * kjs/testkjs.cpp: |
|
13125 (GlobalImp::className): |
|
13126 (TestFunctionImp::): |
|
13127 (TestFunctionImp::callAsFunction): |
|
13128 (main): |
|
13129 (run): |
|
13130 |
|
13131 2006-02-11 Alexey Proskuryakov <ap@nypop.com> |
|
13132 |
|
13133 Reviewed by Darin. |
|
13134 |
|
13135 - improve fix for http://bugs.webkit.org/show_bug.cgi?id=5163 |
|
13136 RealPlayer.GetTitle() Crashes Safari/Dashboard |
|
13137 |
|
13138 * bindings/c/c_utility.cpp: (KJS::Bindings::convertUTF8ToUTF16): |
|
13139 Use kCFStringEncodingISOLatin1 rather than kCFStringEncodingWindowsLatin1, |
|
13140 because the latter encoding has holes, and conversion can still fail. |
|
13141 |
|
13142 2006-02-10 Geoffrey Garen <ggaren@apple.com> |
|
13143 |
|
13144 Reviewed by Darin. |
|
13145 |
|
13146 - Inlined RefPtr assignment operators. .7% performance win on |
|
13147 super-accurate JS iBench. |
|
13148 |
|
13149 * kxmlcore/RefPtr.h: |
|
13150 (KXMLCore::::operator): |
|
13151 |
|
13152 2006-02-10 Geoffrey Garen <ggaren@apple.com> |
|
13153 |
|
13154 No review needed, just a build fix. This time for sure. |
|
13155 |
|
13156 * kjs/JSType.h: |
|
13157 |
|
13158 2006-02-10 Geoffrey Garen <ggaren@apple.com> |
|
13159 |
|
13160 Reviewed by eric. |
|
13161 |
|
13162 - Fixed build. As it goes without saying, I will not mention that I |
|
13163 blame Kevin. |
|
13164 |
|
13165 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
13166 * kjs/JSImmediate.cpp: |
|
13167 (KJS::JSImmediate::toObject): |
|
13168 |
|
13169 2006-02-09 Geoffrey Garen <ggaren@apple.com> |
|
13170 |
|
13171 Reviewed by mjs. |
|
13172 |
|
13173 - Fixed <rdar://problem/4343730> Should switch ConstantValues (null, |
|
13174 undefined, true, false) from JS objects to immediate values similar to |
|
13175 SimpleNumber |
|
13176 |
|
13177 2.0% performance gain on my new super-accurate version of JS iBench. |
|
13178 (I promise to land a version of it soon.) |
|
13179 |
|
13180 The gist of the change: |
|
13181 (1) The SimpleNumber class (simple_number.h) is now the JSImmediate |
|
13182 class (JSImmediate.h/.cpp), and it handles not only numbers but also |
|
13183 null, undefined, true, and false. |
|
13184 (2) JSImmediate provides convenience methods for the bit masking |
|
13185 necessary to encode and decode immediate values. |
|
13186 (3) ConstantValues, BooleanImp, NullImp, and UndefinedImp are gone. |
|
13187 (4) JSCell no longer implements functions like getBoolean, because |
|
13188 only a JSImmediate can be a boolean. |
|
13189 (5) JSImmediate no longer uses ALWAYS_INLINE because there's no need, |
|
13190 and ALWAYS_INLINE is a non-portable option of last resort. |
|
13191 (6) Type is now JSType, and it resides in its own file, JSType.h. |
|
13192 Since I was there, I did some header include sorting as part of this |
|
13193 change. |
|
13194 |
|
13195 The rest pretty much explains itself. |
|
13196 |
|
13197 * JavaScriptCore.xcodeproj/project.pbxproj: Removed simple_number.h, |
|
13198 added JSImmediate.h/.cpp. |
|
13199 * bindings/c/c_instance.cpp: |
|
13200 (KJS::Bindings::CInstance::defaultValue): |
|
13201 * bindings/c/c_instance.h: |
|
13202 * bindings/c/c_utility.cpp: |
|
13203 (KJS::Bindings::convertValueToNPVariant): |
|
13204 * bindings/jni/jni_instance.cpp: |
|
13205 (JavaInstance::defaultValue): |
|
13206 * bindings/jni/jni_instance.h: |
|
13207 * bindings/jni/jni_jsobject.cpp: |
|
13208 (JavaJSObject::convertValueToJObject): |
|
13209 * bindings/objc/WebScriptObject.mm: |
|
13210 (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]): |
|
13211 Standardized calls to use getXXX instead of hand-rolling JSValue |
|
13212 functionality. |
|
13213 * bindings/objc/objc_instance.h: |
|
13214 * bindings/objc/objc_instance.mm: |
|
13215 (ObjcInstance::getValueOfUndefinedField): |
|
13216 (ObjcInstance::defaultValue): |
|
13217 * bindings/objc/objc_runtime.h: |
|
13218 * bindings/objc/objc_runtime.mm: |
|
13219 (ObjcFallbackObjectImp::type): |
|
13220 (ObjcFallbackObjectImp::defaultValue): |
|
13221 * bindings/runtime.h: |
|
13222 (KJS::Bindings::Instance::getValueOfUndefinedField): |
|
13223 * bindings/runtime_object.cpp: |
|
13224 (RuntimeObjectImp::defaultValue): |
|
13225 * bindings/runtime_object.h: |
|
13226 * kjs/JSImmediate.h: Added. |
|
13227 (KJS::JSImmediate::isImmediate): |
|
13228 (KJS::JSImmediate::isNumber): |
|
13229 (KJS::JSImmediate::isBoolean): |
|
13230 (KJS::JSImmediate::isUndefinedOrNull): |
|
13231 (KJS::JSImmediate::fromDouble): |
|
13232 (KJS::JSImmediate::toDouble): |
|
13233 (KJS::JSImmediate::toBoolean): |
|
13234 (KJS::JSImmediate::trueImmediate): |
|
13235 (KJS::JSImmediate::falseImmediate): |
|
13236 (KJS::JSImmediate::NaNImmediate): |
|
13237 (KJS::JSImmediate::undefinedImmediate): |
|
13238 (KJS::JSImmediate::nullImmediate): |
|
13239 (KJS::JSImmediate::tag): |
|
13240 (KJS::JSImmediate::unTag): |
|
13241 (KJS::JSImmediate::getTag): |
|
13242 (KJS::JSImmediate::): |
|
13243 (KJS::JSImmediate::isIEEE): |
|
13244 (KJS::JSImmediate::is32bit): |
|
13245 (KJS::JSImmediate::is64bit): |
|
13246 (KJS::JSImmediate::NanAsBits): |
|
13247 (KJS::JSImmediate::zeroAsBits): |
|
13248 (KJS::JSImmediate::oneAsBits): |
|
13249 * kjs/JSLock.cpp: |
|
13250 (KJS::JSLock::lock): Removed hack-o-rama to initialize ConstantValues. |
|
13251 * kjs/JSType.h: Added. |
|
13252 * kjs/collector.cpp: |
|
13253 (KJS::Collector::protect): |
|
13254 (KJS::Collector::unprotect): |
|
13255 (KJS::Collector::collect): |
|
13256 * kjs/internal.cpp: |
|
13257 (KJS::StringImp::toPrimitive): |
|
13258 (KJS::NumberImp::toPrimitive): |
|
13259 (KJS::NumberImp::toBoolean): |
|
13260 (KJS::GetterSetterImp::toPrimitive): |
|
13261 * kjs/internal.h: |
|
13262 (KJS::StringImp::type): |
|
13263 (KJS::NumberImp::type): |
|
13264 * kjs/object.cpp: |
|
13265 (KJS::JSObject::type): |
|
13266 (KJS::tryGetAndCallProperty): Replaced "Are you one of the six things |
|
13267 I'm looking for?" test with "Are you not the one thing I'm not looking |
|
13268 for" test. |
|
13269 (KJS::JSObject::defaultValue): |
|
13270 (KJS::JSObject::toPrimitive): |
|
13271 * kjs/object.h: |
|
13272 (KJS::GetterSetterImp::type): |
|
13273 (KJS::JSValue::isObject): |
|
13274 * kjs/operations.cpp: |
|
13275 (KJS::equal): |
|
13276 (KJS::strictEqual): |
|
13277 (KJS::add): |
|
13278 * kjs/reference.cpp: |
|
13279 (KJS::Reference::deleteValue): |
|
13280 * kjs/simple_number.h: Removed. |
|
13281 * kjs/string_object.cpp: |
|
13282 (StringInstance::getOwnPropertySlot): fixed indentation |
|
13283 * kjs/value.cpp: |
|
13284 (KJS::JSValue::toObject): |
|
13285 (KJS::jsNumberCell): New function to quarantine a PIC branch -- allows |
|
13286 us to inline jsNumber without adding PIC branches to callers. |
|
13287 * kjs/value.h: |
|
13288 (KJS::jsUndefined): |
|
13289 (KJS::jsNull): |
|
13290 (KJS::jsNaN): |
|
13291 (KJS::jsBoolean): |
|
13292 (KJS::jsNumber): |
|
13293 (KJS::JSValue::downcast): |
|
13294 (KJS::JSValue::isUndefinedOrNull): |
|
13295 (KJS::JSValue::isBoolean): |
|
13296 (KJS::JSValue::isNumber): |
|
13297 (KJS::JSValue::isString): |
|
13298 (KJS::JSValue::isObject): |
|
13299 (KJS::JSValue::getBoolean): |
|
13300 (KJS::JSValue::getNumber): |
|
13301 (KJS::JSValue::getString): |
|
13302 (KJS::JSValue::getObject): |
|
13303 (KJS::JSValue::getUInt32): |
|
13304 (KJS::JSValue::mark): Replaced !JSImmediate::is() test with assertion, |
|
13305 resulting in a slight performance gain. Callers should always check |
|
13306 !marked() before calling mark(), so it's impossible to call mark on |
|
13307 a JSImmediate. |
|
13308 (KJS::JSValue::marked): |
|
13309 (KJS::JSValue::type): |
|
13310 (KJS::JSValue::toPrimitive): |
|
13311 (KJS::JSValue::toBoolean): |
|
13312 (KJS::JSValue::toNumber): |
|
13313 (KJS::JSValue::toString): |
|
13314 |
|
13315 2006-02-06 Eric Seidel <eseidel@apple.com> |
|
13316 |
|
13317 Add svn:ignore properties for visual studio internals. |
|
13318 |
|
13319 2006-02-06 Alexey Proskuryakov <ap@nypop.com> |
|
13320 |
|
13321 Reviewed by Darin. |
|
13322 |
|
13323 - Refactor DateInstance to provide direct access to data. Several WIN32 modifications. |
|
13324 http://bugs.webkit.org/show_bug.cgi?id=7107 |
|
13325 |
|
13326 - No tests added - only changed functionality on WIN32, which should be covered by |
|
13327 existing tests. |
|
13328 |
|
13329 * kjs/date_object.cpp: |
|
13330 (gmtoffset): On WIN32, use the recommended global (_timezone rather than timezone). |
|
13331 Updated comments. |
|
13332 (KJS::timeZoneOffset): Removed, was basically the same as the above. |
|
13333 (KJS::formatTime): Pass an UTC flag - UTC/local cannot be correctly selected on |
|
13334 Windows based on struct tm itself. |
|
13335 (KJS::DateInstance::getTime): Added. |
|
13336 (KJS::DateInstance::getUTCTime): Added. |
|
13337 (KJS::millisecondsToTM): Factored out from DateProtoFunc::callAsFunction(). |
|
13338 (KJS::DateObjectImp::callAsFunction): Use the new parameter to formatTime(). |
|
13339 (KJS::DateProtoFunc::callAsFunction): Updated for the other changes. The code for |
|
13340 GetTimezoneOffset was incorrect on WIN32 - _daylight global has nothing to do |
|
13341 with daylight savings time being in effect. |
|
13342 |
|
13343 * kjs/date_object.h: Added prototypes for new functions. |
|
13344 |
|
13345 2006-02-05 Maciej Stachowiak <mjs@apple.com> |
|
13346 |
|
13347 Reviewed by Anders. |
|
13348 |
|
13349 - fixed ~1100 KJS::Node leaked on layout tests |
|
13350 http://bugs.webkit.org/show_bug.cgi?id=7097 |
|
13351 |
|
13352 * kjs/internal.cpp: |
|
13353 (KJS::Parser::noteNodeCycle): |
|
13354 (KJS::Parser::removeNodeCycle): |
|
13355 (KJS::clearNewNodes): |
|
13356 * kjs/internal.h: |
|
13357 * kjs/nodes.cpp: |
|
13358 (ElementNode::breakCycle): |
|
13359 (PropertyListNode::breakCycle): |
|
13360 (ArgumentListNode::breakCycle): |
|
13361 (StatListNode::StatListNode): |
|
13362 (StatListNode::breakCycle): |
|
13363 (VarDeclListNode::breakCycle): |
|
13364 (BlockNode::BlockNode): |
|
13365 (ClauseListNode::breakCycle): |
|
13366 (CaseBlockNode::CaseBlockNode): |
|
13367 (ParameterNode::breakCycle): |
|
13368 (SourceElementsNode::SourceElementsNode): |
|
13369 (SourceElementsNode::breakCycle): |
|
13370 * kjs/nodes.h: |
|
13371 (KJS::Node::breakCycle): |
|
13372 (KJS::ElementNode::ElementNode): |
|
13373 (KJS::ArrayNode::ArrayNode): |
|
13374 (KJS::PropertyListNode::PropertyListNode): |
|
13375 (KJS::ObjectLiteralNode::ObjectLiteralNode): |
|
13376 (KJS::ArgumentListNode::ArgumentListNode): |
|
13377 (KJS::ArgumentsNode::ArgumentsNode): |
|
13378 (KJS::VarDeclListNode::VarDeclListNode): |
|
13379 (KJS::VarStatementNode::VarStatementNode): |
|
13380 (KJS::ForNode::ForNode): |
|
13381 (KJS::CaseClauseNode::CaseClauseNode): |
|
13382 (KJS::ClauseListNode::ClauseListNode): |
|
13383 (KJS::ParameterNode::ParameterNode): |
|
13384 (KJS::FuncExprNode::FuncExprNode): |
|
13385 (KJS::FuncDeclNode::FuncDeclNode): |
|
13386 |
|
13387 2006-02-05 Maciej Stachowiak <mjs@apple.com> |
|
13388 |
|
13389 Reviewed by Hyatt. |
|
13390 |
|
13391 - fix default traits for classes to make sure default constructors get called |
|
13392 |
|
13393 * kxmlcore/VectorTraits.h: |
|
13394 (KXMLCore::): |
|
13395 |
|
13396 2006-02-04 Darin Adler <darin@apple.com> |
|
13397 |
|
13398 Reviewed by Maciej. |
|
13399 |
|
13400 - fix http://bugs.webkit.org/show_bug.cgi?id=5210 |
|
13401 REGRESSION: for/in loop with var changes global variable instead of making local |
|
13402 |
|
13403 Test: fast/js/for-in-var-scope.html |
|
13404 |
|
13405 * kjs/nodes.cpp: |
|
13406 (valueForReadModifyAssignment): Use ALWAYS_INLINE macro. |
|
13407 (ForInNode::execute): Break out of the scope chain loop once we find and set the |
|
13408 loop variable. We don't want to set multiple loop variables. |
|
13409 (ForInNode::processVarDecls): Process the declaration of the loop variable. |
|
13410 |
|
13411 - other cleanup |
|
13412 |
|
13413 * kjs/object.cpp: (KJS::tryGetAndCallProperty): Use ALWAYS_INLINE macro. |
|
13414 * kxmlcore/FastMalloc.cpp: Change to use ALWAYS_INLINE macro from AlwaysInline.h |
|
13415 instead of defining it here a second time. |
|
13416 |
|
13417 2006-02-04 Maciej Stachowiak <mjs@apple.com> |
|
13418 |
|
13419 Reviewed by Hyatt. |
|
13420 |
|
13421 - change JavaScript collector statistics calls to use HashCountedSet instead |
|
13422 of CFSet; other misc cleanup |
|
13423 http://bugs.webkit.org/show_bug.cgi?id=7072 |
|
13424 |
|
13425 * kjs/collector.cpp: |
|
13426 (KJS::Collector::numProtectedObjects): renamed from numReferencedObjects |
|
13427 (KJS::typeName): |
|
13428 (KJS::Collector::rootObjectTypeCounts): renamed from rootObjectClasses, |
|
13429 use HashSet |
|
13430 * kjs/collector.h: |
|
13431 (KJS::Collector::isOutOfMemory): Renamed from outOfMemory. |
|
13432 * kjs/nodes.cpp: |
|
13433 |
|
13434 2006-02-03 Timothy Hatcher <timothy@apple.com> |
|
13435 |
|
13436 Reviewed by Justin. |
|
13437 |
|
13438 Renamed configuration names to Debug, Release and Production. |
|
13439 |
|
13440 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
13441 |
|
13442 2006-02-02 George Staikos <staikos@opensource.apple.com> |
|
13443 |
|
13444 Reviewed by Maciej. |
|
13445 |
|
13446 * kjs/lookup.h: Fix compile, merged from KDE. |
|
13447 |
|
13448 2006-02-02 Darin Adler <darin@apple.com> |
|
13449 |
|
13450 Reviewed by Maciej. |
|
13451 |
|
13452 - http://bugs.webkit.org/show_bug.cgi?id=7005 |
|
13453 add Noncopyable, OwnPtr, OwnArrayPtr to KXMLCore |
|
13454 |
|
13455 * kxmlcore/Noncopyable.h: Added. |
|
13456 * kxmlcore/OwnArrayPtr.h: Added. |
|
13457 * kxmlcore/OwnPtr.h: Added. |
|
13458 |
|
13459 * JavaScriptCore.xcodeproj/project.pbxproj: Added new files. |
|
13460 |
|
13461 * kjs/function.h: |
|
13462 * kjs/function.cpp: Use OwnPtr for Parameter pointers. |
|
13463 |
|
13464 * kjs/internal.h: Use Noncopyable for LabelStack. |
|
13465 |
|
13466 * kjs/list.cpp: Use OwnArrayPtr for overflow. |
|
13467 |
|
13468 * kjs/property_map.h: |
|
13469 * kjs/property_map.cpp: Use OwnArrayPtr for SavedProperties. |
|
13470 Use Vector for some stack buffers. |
|
13471 |
|
13472 * kjs/regexp_object.h: |
|
13473 * kjs/regexp_object.cpp: Use OwnArrayPtr for lastOvector. |
|
13474 |
|
13475 2006-01-31 Maciej Stachowiak <mjs@apple.com> |
|
13476 |
|
13477 Reviewed by Darin. |
|
13478 |
|
13479 - fixed leak of hundreds of thousands of JS parser nodes on the layout tests, and added an exit counter |
|
13480 that would catch them |
|
13481 |
|
13482 * kjs/nodes.cpp: |
|
13483 (NodeCounter::~NodeCounter): Added debug-only node counter. |
|
13484 (Node::Node): |
|
13485 (Node::~Node): |
|
13486 * kxmlcore/VectorTraits.h: Simple classes like RefPtr do in fact need destruction. |
|
13487 |
|
13488 2006-01-31 Darin Adler <darin@apple.com> |
|
13489 |
|
13490 Reviewed by Maciej. |
|
13491 |
|
13492 - added deleteAllValues for HashSet as well as HashMap |
|
13493 - fixed conversion from const_iterator to iterator, which I broke a while back |
|
13494 |
|
13495 * kxmlcore/HashMap.h: Updated copyright date. |
|
13496 * kxmlcore/HashSet.h: (KXMLCore::deleteAllValues): Added. |
|
13497 * kxmlcore/HashTable.h: (KXMLCore::HashTableIterator::operator const_iterator): Added. |
|
13498 |
|
13499 2006-01-31 Tim Omernick <timo@apple.com> |
|
13500 |
|
13501 Reviewed by Geoff Garen. |
|
13502 |
|
13503 * bindings/c/c_utility.cpp: |
|
13504 (KJS::Bindings::convertUTF8ToUTF16): |
|
13505 Fixed an invalid assertion that UTF8Chars is not NULL. It is valid for it to be NULL as long as |
|
13506 UTF8Length is 0. |
|
13507 This fixes an assertion failure on TOT at <http://www.musicindiaonline.com/p/x/tJO0OOBME9.As1NMvHdW/>, |
|
13508 where JavaScript is getting a NULL string back from some call on the Real Player plugin. |
|
13509 |
|
13510 2006-01-30 Anders Carlsson <andersca@mac.com> |
|
13511 |
|
13512 Reviewed by Darin. |
|
13513 |
|
13514 Fix http://bugs.webkit.org/show_bug.cgi?id=6907 |
|
13515 REGRESSION: United.com menus messed up due to document.all/MSIE sniff |
|
13516 |
|
13517 * kjs/nodes.cpp: |
|
13518 (typeStringForValue): |
|
13519 Return "undefined" if the given object should masquerade as undefined. |
|
13520 |
|
13521 * kjs/object.h: |
|
13522 (KJS::JSObject::masqueradeAsUndefined): |
|
13523 Rename from isEqualToNull. |
|
13524 |
|
13525 * kjs/operations.cpp: |
|
13526 (KJS::equal): |
|
13527 Update for name change. |
|
13528 |
|
13529 2006-01-29 Maciej Stachowiak <mjs@apple.com> |
|
13530 |
|
13531 Reviewed by Darin. |
|
13532 |
|
13533 - properly define Vector assignment operator; the private version was accidentally left |
|
13534 in, and the template version is not enough to replace the default |
|
13535 |
|
13536 * kxmlcore/Vector.h: |
|
13537 (KXMLCore::Vector::operator=): |
|
13538 |
|
13539 2006-01-29 Eric Seidel <eseidel@apple.com> |
|
13540 |
|
13541 Reviewed by darin. |
|
13542 |
|
13543 Fix the build by applying a GCC-specific namespace hack. |
|
13544 |
|
13545 * kjs/lookup.h: |
|
13546 |
|
13547 2006-01-29 Eric Seidel <eseidel@apple.com> |
|
13548 |
|
13549 Reviewed by hyatt. |
|
13550 |
|
13551 Fix build on Win32. |
|
13552 |
|
13553 * kjs/lookup.h: fixed ::cacheGlobalObject |
|
13554 * kxmlcore/Vector.h: |
|
13555 (KXMLCore::Vector::operator[]): use unsigned long |
|
13556 |
|
13557 2006-01-29 Maciej Stachowiak <mjs@apple.com> |
|
13558 |
|
13559 Reviewed by Dave Hyatt. |
|
13560 |
|
13561 * kxmlcore/Vector.h: |
|
13562 (KXMLCore::Vector::operator[]): Add unsigned overload |
|
13563 |
|
13564 2006-01-28 Darin Adler <darin@apple.com> |
|
13565 |
|
13566 Reviewed by John Sullivan. |
|
13567 |
|
13568 - http://bugs.webkit.org/show_bug.cgi?id=6895 |
|
13569 include exception names in JavaScript form of DOM exception |
|
13570 |
|
13571 * khtml/ecma/kjs_binding.cpp: (KJS::setDOMException): Include the name of the |
|
13572 exception in the error message. |
|
13573 |
|
13574 2006-01-28 Maciej Stachowiak <mjs@apple.com> |
|
13575 |
|
13576 Reviewed by Darin. |
|
13577 |
|
13578 - miscellaneous Vector improvements |
|
13579 |
|
13580 * kxmlcore/Vector.h: |
|
13581 (KXMLCore::Vector::at): Add range-checking asserts. |
|
13582 (KXMLCore::Vector::first): Added as a convenience. |
|
13583 (KXMLCore::Vector::last): Convenience for stack-style use. |
|
13584 (KXMLCore::Vector::removeLast): ditto |
|
13585 |
|
13586 2006-01-28 Darin Adler <darin@apple.com> |
|
13587 |
|
13588 Reviewed by John Sullivan |
|
13589 |
|
13590 - fix http://bugs.webkit.org/show_bug.cgi?id=6870 |
|
13591 REGRESSION: JavaScript Date constructor won't accept another Date object |
|
13592 |
|
13593 Test: fast/js/date-constructor.html |
|
13594 |
|
13595 * kjs/date_object.cpp: (KJS::DateObjectImp::construct): |
|
13596 Added a special case for constructing one date from another (to avoid losing |
|
13597 milliseconds, which are not in the text form, to match Firefox), and changed |
|
13598 the base code to convert to primitive before checking for string to match |
|
13599 the standard. Also corrected a couple silly things in the "construct from |
|
13600 current time" code path (removed a floor that does no good, and changed |
|
13601 the constant used to convert microseconds to milliseconds to be a 1000 |
|
13602 rather than "msPerSecond"). |
|
13603 |
|
13604 2006-01-28 Darin Adler <darin@apple.com> |
|
13605 |
|
13606 * kjs/create_hash_table: Added missing license. |
|
13607 |
|
13608 2006-01-28 Maciej Stachowiak <mjs@apple.com> |
|
13609 |
|
13610 Reviewed by Dave Hyatt. |
|
13611 |
|
13612 - added a Vector class |
|
13613 http://bugs.webkit.org/show_bug.cgi?id=6894 |
|
13614 |
|
13615 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
13616 * kjs/internal.cpp: |
|
13617 (KJS::Parser::saveNewNode): Apply Vector. |
|
13618 (KJS::clearNewNodes): ditto |
|
13619 * kjs/number_object.cpp: |
|
13620 (integer_part_noexp): ditto |
|
13621 (char_sequence): ditto |
|
13622 * kjs/ustring.cpp: |
|
13623 (KJS::UString::UTF8String): ditto |
|
13624 * kxmlcore/HashMap.h: |
|
13625 (KXMLCore::deleteAllValues): Tweaked this to only apply to HashMap, |
|
13626 other versions are useful for other containers. |
|
13627 * kxmlcore/Vector.h: Added. Implemented a Vector class, which should |
|
13628 be usable for all Array/QVector style purposes, and also as a stack buffer |
|
13629 with oversize handling. Also some helper classes to make vector operations |
|
13630 as efficient as possible for POD types and for simple non-PODs like RefPtr. |
|
13631 (KXMLCore::): |
|
13632 (KXMLCore::VectorTypeOperations::destruct): |
|
13633 (KXMLCore::VectorTypeOperations::initialize): |
|
13634 (KXMLCore::VectorTypeOperations::move): |
|
13635 (KXMLCore::VectorTypeOperations::uninitializedCopy): |
|
13636 (KXMLCore::VectorTypeOperations::uninitializedFill): |
|
13637 (KXMLCore::VectorBuffer::VectorBuffer): |
|
13638 (KXMLCore::VectorBuffer::~VectorBuffer): |
|
13639 (KXMLCore::VectorBuffer::deallocateBuffer): |
|
13640 (KXMLCore::VectorBuffer::inlineBuffer): |
|
13641 (KXMLCore::Vector::Vector): |
|
13642 (KXMLCore::Vector::~Vector): |
|
13643 (KXMLCore::Vector::size): |
|
13644 (KXMLCore::Vector::capacity): |
|
13645 (KXMLCore::Vector::isEmpty): |
|
13646 (KXMLCore::Vector::at): |
|
13647 (KXMLCore::Vector::operator[]): |
|
13648 (KXMLCore::Vector::data): |
|
13649 (KXMLCore::Vector::operator T*): |
|
13650 (KXMLCore::Vector::operator const T*): |
|
13651 (KXMLCore::Vector::begin): |
|
13652 (KXMLCore::Vector::end): |
|
13653 (KXMLCore::Vector::clear): |
|
13654 (KXMLCore::Vector::fill): |
|
13655 (KXMLCore::Vector::operator=): |
|
13656 (KXMLCore::::Vector): |
|
13657 (KXMLCore::::operator): |
|
13658 (KXMLCore::::fill): |
|
13659 (KXMLCore::::expandCapacity): |
|
13660 (KXMLCore::::resize): |
|
13661 (KXMLCore::::reserveCapacity): |
|
13662 (KXMLCore::::append): |
|
13663 (KXMLCore::deleteAllValues): |
|
13664 * kxmlcore/VectorTraits.h: Added. |
|
13665 (KXMLCore::VectorTraits): Traits to enable making Vector efficient for |
|
13666 simple types. |
|
13667 |
|
13668 2006-01-28 Alexey Proskuryakov <ap@nypop.com> |
|
13669 |
|
13670 Reviewed by Darin. |
|
13671 |
|
13672 - fix http://bugs.webkit.org/show_bug.cgi?id=5163 |
|
13673 RealPlayer.GetTitle() Crashes Safari/Dashboard |
|
13674 |
|
13675 * bindings/c/c_utility.cpp: (KJS::Bindings::convertUTF8ToUTF16): |
|
13676 Fallback to kCFStringEncodingWindowsLatin1 if the passed buffer is not valid UTF-8, preventing crashes. |
|
13677 |
|
13678 2006-01-25 George Staikos <staikos@opensource.apple.com> |
|
13679 |
|
13680 Reviewed by Darin. |
|
13681 |
|
13682 * kxmlcore/HashFunctions.h: Merge build fix from KDE. |
|
13683 |
|
13684 2006-01-25 Darin Adler <darin@apple.com> |
|
13685 |
|
13686 - removed an unused source file |
|
13687 |
|
13688 * kjs/pointer_hash.h: Removed. |
|
13689 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed reference to pointer_hash.h. |
|
13690 |
|
13691 2006-01-23 Anders Carlsson <andersca@mac.com> |
|
13692 |
|
13693 Reviewed by Maciej. |
|
13694 |
|
13695 - fix http://bugs.webkit.org/show_bug.cgi?id=6737 |
|
13696 KJS_DEFINE_PROTOTYPE should work outside of the KJS namespace |
|
13697 |
|
13698 * kjs/lookup.h: |
|
13699 Prefix all KJS types with KJS:: in KJS_DEFINE_PROTOTYPE. |
|
13700 |
|
13701 (cacheGlobalObject): |
|
13702 Move this out of the KJS namespace. |
|
13703 |
|
13704 2006-01-23 Maciej Stachowiak <mjs@apple.com> |
|
13705 |
|
13706 Reviewed by Eric. |
|
13707 |
|
13708 - renamed PointerHash to PtrHash |
|
13709 - made PtrHash the default hash function for int and pointer types that aren't further specialized |
|
13710 - added an AtomicStringImpl class to make it easier and more typesafe to identity hash atomic strings |
|
13711 - did appropriate consequent cleanup (very few places now need to declare a hash function) |
|
13712 http://bugs.webkit.org/show_bug.cgi?id=6752 |
|
13713 |
|
13714 * kjs/array_object.cpp: |
|
13715 (ArrayProtoFunc::callAsFunction): no need to mention PointerHash |
|
13716 * kjs/collector.cpp: ditto |
|
13717 * kjs/identifier.cpp: |
|
13718 (KXMLCore::): declare DefaultHash the new way |
|
13719 * kjs/internal.cpp: no need to mention PointerHash |
|
13720 * kjs/ustring.h: |
|
13721 * kxmlcore/HashCountedSet.h: change how we get the default hash to make it |
|
13722 easier to specialize on PtrHash |
|
13723 * kxmlcore/HashFunctions.h: |
|
13724 (KXMLCore::): renamed PointerHash to PtrHash; changed DefaultHash so that it has |
|
13725 a Hash typedef rather than being a hash function class itself; declared DefaultHash |
|
13726 for int and partializy specialized for pointer types |
|
13727 * kxmlcore/HashMapPtrSpec.h: |
|
13728 (KXMLCore::PtrHashIteratorAdapter::PtrHashIteratorAdapter): Slight tweaks for new |
|
13729 way of handling pointer hash |
|
13730 (KXMLCore::PtrHashConstIteratorAdapter::PtrHashConstIteratorAdapter): ditto |
|
13731 (KXMLCore::): ditto |
|
13732 * kxmlcore/HashMap.h: ditto |
|
13733 * kxmlcore/HashSet.h: ditto |
|
13734 |
|
13735 2006-01-23 Maciej Stachowiak <mjs@apple.com> |
|
13736 |
|
13737 Reviewed by Tim Omernick. |
|
13738 |
|
13739 - use classes instead of free functions for extractors, this better matches how other |
|
13740 things work and should avoid the need for hacky workarounds on other compilers |
|
13741 http://bugs.webkit.org/show_bug.cgi?id=6748 |
|
13742 |
|
13743 * kjs/array_object.cpp: |
|
13744 * kjs/identifier.cpp: |
|
13745 * kjs/internal.cpp: |
|
13746 * kxmlcore/HashMap.h: |
|
13747 (KXMLCore::PairFirstExtractor::extract): |
|
13748 * kxmlcore/HashMapPtrSpec.h: |
|
13749 (KXMLCore::): |
|
13750 * kxmlcore/HashSet.h: |
|
13751 (KXMLCore::IdentityExtractor::extract): |
|
13752 * kxmlcore/HashTable.h: |
|
13753 (KXMLCore::addIterator): |
|
13754 (KXMLCore::removeIterator): |
|
13755 (KXMLCore::HashTable::add): |
|
13756 (KXMLCore::HashTable::isEmptyBucket): |
|
13757 (KXMLCore::HashTable::isDeletedBucket): |
|
13758 (KXMLCore::HashTable::HashTable): |
|
13759 (KXMLCore::HashTable::lookup): |
|
13760 (KXMLCore::HashTable::add): |
|
13761 (KXMLCore::HashTable::reinsert): |
|
13762 (KXMLCore::HashTable::find): |
|
13763 (KXMLCore::HashTable::contains): |
|
13764 (KXMLCore::HashTable::remove): |
|
13765 (KXMLCore::HashTable::allocateTable): |
|
13766 (KXMLCore::HashTable::deallocateTable): |
|
13767 (KXMLCore::HashTable::expand): |
|
13768 (KXMLCore::HashTable::rehash): |
|
13769 (KXMLCore::HashTable::clear): |
|
13770 (KXMLCore::HashTable::swap): |
|
13771 (KXMLCore::HashTable::operator): |
|
13772 (KXMLCore::HashTable::checkTableConsistency): |
|
13773 (KXMLCore::HashTable::checkTableConsistencyExceptSize): |
|
13774 (KXMLCore::HashTable::invalidateIterators): |
|
13775 |
|
13776 2006-01-23 Maciej Stachowiak <mjs@apple.com> |
|
13777 |
|
13778 Rubber stamped by Tim Hatcher. |
|
13779 |
|
13780 - renamed inert() operation on HashSet, HashCountedSet and HashTable to add() |
|
13781 for consistency with HashMap |
|
13782 |
|
13783 * kjs/array_object.cpp: |
|
13784 (ArrayProtoFunc::callAsFunction): |
|
13785 * kjs/collector.cpp: |
|
13786 (KJS::Collector::protect): |
|
13787 * kjs/identifier.cpp: |
|
13788 (KJS::Identifier::add): |
|
13789 * kxmlcore/HashCountedSet.h: |
|
13790 (KXMLCore::::add): |
|
13791 * kxmlcore/HashMap.h: |
|
13792 (KXMLCore::::inlineAdd): |
|
13793 * kxmlcore/HashSet.h: |
|
13794 (KXMLCore::::add): |
|
13795 * kxmlcore/HashTable.h: |
|
13796 (KXMLCore::HashTable::add): |
|
13797 (KXMLCore::::add): |
|
13798 (KXMLCore::::HashTable): |
|
13799 |
|
13800 2006-01-23 Justin Garcia <justin.garcia@apple.com> |
|
13801 |
|
13802 Reviewed by thatcher |
|
13803 |
|
13804 Turned on -O2 for B&I build. |
|
13805 |
|
13806 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
13807 |
|
13808 2006-01-23 Maciej Stachowiak <mjs@apple.com> |
|
13809 |
|
13810 Reviewed by Tim Hatcher. |
|
13811 |
|
13812 - it's "Franklin Street", not "Franklin Steet" |
|
13813 |
|
13814 * kjs/array_instance.h: |
|
13815 * kjs/array_object.cpp: |
|
13816 * kjs/array_object.h: |
|
13817 * kjs/bool_object.cpp: |
|
13818 * kjs/bool_object.h: |
|
13819 * kjs/collector.cpp: |
|
13820 * kjs/collector.h: |
|
13821 * kjs/completion.h: |
|
13822 * kjs/context.h: |
|
13823 * kjs/date_object.cpp: |
|
13824 * kjs/date_object.h: |
|
13825 * kjs/debugger.cpp: |
|
13826 * kjs/debugger.h: |
|
13827 * kjs/dtoa.h: |
|
13828 * kjs/error_object.cpp: |
|
13829 * kjs/error_object.h: |
|
13830 * kjs/function.cpp: |
|
13831 * kjs/function.h: |
|
13832 * kjs/function_object.cpp: |
|
13833 * kjs/function_object.h: |
|
13834 * kjs/grammar.y: |
|
13835 * kjs/identifier.cpp: |
|
13836 * kjs/identifier.h: |
|
13837 * kjs/internal.cpp: |
|
13838 * kjs/internal.h: |
|
13839 * kjs/interpreter.cpp: |
|
13840 * kjs/interpreter.h: |
|
13841 * kjs/lexer.cpp: |
|
13842 * kjs/lexer.h: |
|
13843 * kjs/list.cpp: |
|
13844 * kjs/list.h: |
|
13845 * kjs/lookup.cpp: |
|
13846 * kjs/lookup.h: |
|
13847 * kjs/math_object.cpp: |
|
13848 * kjs/math_object.h: |
|
13849 * kjs/nodes.cpp: |
|
13850 * kjs/nodes.h: |
|
13851 * kjs/nodes2string.cpp: |
|
13852 * kjs/number_object.cpp: |
|
13853 * kjs/number_object.h: |
|
13854 * kjs/object.cpp: |
|
13855 * kjs/object.h: |
|
13856 * kjs/object_object.cpp: |
|
13857 * kjs/object_object.h: |
|
13858 * kjs/operations.cpp: |
|
13859 * kjs/operations.h: |
|
13860 * kjs/property_map.cpp: |
|
13861 * kjs/property_map.h: |
|
13862 * kjs/property_slot.cpp: |
|
13863 * kjs/property_slot.h: |
|
13864 * kjs/reference.cpp: |
|
13865 * kjs/reference.h: |
|
13866 * kjs/reference_list.cpp: |
|
13867 * kjs/reference_list.h: |
|
13868 * kjs/regexp.cpp: |
|
13869 * kjs/regexp.h: |
|
13870 * kjs/regexp_object.cpp: |
|
13871 * kjs/regexp_object.h: |
|
13872 * kjs/scope_chain.cpp: |
|
13873 * kjs/scope_chain.h: |
|
13874 * kjs/simple_number.h: |
|
13875 * kjs/string_object.cpp: |
|
13876 * kjs/string_object.h: |
|
13877 * kjs/testkjs.cpp: |
|
13878 * kjs/types.h: |
|
13879 * kjs/ustring.cpp: |
|
13880 * kjs/ustring.h: |
|
13881 * kjs/value.cpp: |
|
13882 * kjs/value.h: |
|
13883 * kxmlcore/AlwaysInline.h: |
|
13884 * kxmlcore/ListRefPtr.h: |
|
13885 * kxmlcore/PassRefPtr.h: |
|
13886 * kxmlcore/RefPtr.h: |
|
13887 |
|
13888 2006-01-23 Darin Adler <darin@apple.com> |
|
13889 |
|
13890 Reviewed by John Sullivan. |
|
13891 |
|
13892 - change needed for fix to http://bugs.webkit.org/show_bug.cgi?id=6617 |
|
13893 REGRESSION: Crash in cloneChildNodes when clicking element |
|
13894 |
|
13895 * kxmlcore/PassRefPtr.h: Fix assignment operator from RefPtr of a different |
|
13896 type by calling get() instead of going directly at m_ptr. |
|
13897 * kxmlcore/RefPtr.h: Ditto. |
|
13898 |
|
13899 - other changes |
|
13900 |
|
13901 * JavaScriptCore.xcodeproj/project.pbxproj: Xcode decided to change this file. |
|
13902 It's just a resorted list of keys in a dictionary. |
|
13903 |
|
13904 * kjs/fpconst.cpp: Wrap this file in #if __APPLE__ since the alternate version |
|
13905 in internal.cpp is in #if !__APPLE__. This file is to give us the "no init |
|
13906 routine" property we want to have on OS X. |
|
13907 |
|
13908 2006-01-22 Maciej Stachowiak <mjs@apple.com> |
|
13909 |
|
13910 Reviewed by Darin. |
|
13911 |
|
13912 - Set up Page class and invert Frame / WebCoreFrameBridge ownership |
|
13913 http://bugs.webkit.org/show_bug.cgi?id=6577 |
|
13914 |
|
13915 * kjs/interpreter.h: make globalExec virtual so ScriptInterpreter can |
|
13916 override it |
|
13917 |
|
13918 2006-01-23 George Staikos <staikos@opensource.apple.com> |
|
13919 |
|
13920 Reviewed by Maciej and Darin. |
|
13921 |
|
13922 * kxmlcore/Assertions.h: This file only works with __APPLE__ right now |
|
13923 * kjs/interpreter.cpp: ditto |
|
13924 * kjs/simple_number.h: Add assert.h and remove from config.h |
|
13925 * kjs/array_object.cpp: Use relative paths for kxmlcore includes |
|
13926 * kjs/testkjs.cpp: Use relative paths for kxmlcore includes |
|
13927 |
|
13928 2006-01-23 George Staikos <staikos@opensource.apple.com> |
|
13929 |
|
13930 Reviewed by Maciej. |
|
13931 |
|
13932 * kjs/config.h: unbreak preprocessor change |
|
13933 |
|
13934 2006-01-23 George Staikos <staikos@opensource.apple.com> |
|
13935 |
|
13936 Approved by Maciej and Darin. |
|
13937 |
|
13938 * kjs/: |
|
13939 * kxmlcore/: |
|
13940 Update FSF address in license to make merging easier |
|
13941 |
|
13942 2006-01-22 George Staikos <staikos@opensource.apple.com> |
|
13943 |
|
13944 Reviewed by Maciej. |
|
13945 |
|
13946 * kjs/collector.cpp: merge major speedup from KDE on Linux |
|
13947 patch by Maks Orlovich, bug #6145 |
|
13948 Also unify cpu detection |
|
13949 * kjs/config.h: define simpler CPU macros |
|
13950 |
|
13951 2006-01-22 George Staikos <staikos@opensource.apple.com> |
|
13952 |
|
13953 Reviewed by Maciej. |
|
13954 |
|
13955 * kjs/collector.cpp: merge FreeBSD compile fix from KDE |
|
13956 -> requires build magic for use |
|
13957 |
|
13958 2006-01-21 George Staikos <staikos@opensource.apple.com> |
|
13959 |
|
13960 Reviewed by Maciej. |
|
13961 |
|
13962 * kjs/nodes2string.cpp |
|
13963 * kjs/operations.h |
|
13964 * kjs/debugger.h |
|
13965 Fix pedantic compile with some gcc versions (Merge from KDE) |
|
13966 |
|
13967 * kjs/create_hash_table: |
|
13968 Fix build with Perl 5.8.0 (Merge from KDE) |
|
13969 |
|
13970 2006-01-18 Darin Adler <darin@apple.com> |
|
13971 |
|
13972 Reviewed by Hyatt. |
|
13973 |
|
13974 - hash table fixes needed for my WebCore changes |
|
13975 |
|
13976 * kxmlcore/HashTable.h: (KXMLCore::HashTableConstIterator::operator=): |
|
13977 Added a missing return statement. |
|
13978 |
|
13979 * kxmlcore/HashTraits.h: Fix traits so they work properly for classes where you |
|
13980 can't instantiate with a 0 by using traits rather than ? : to select the default |
|
13981 emtpy value of hash table keys. |
|
13982 |
|
13983 - small cleanup of "runtime" code left over from recent JavaScript crash fix |
|
13984 |
|
13985 * bindings/runtime_root.h: |
|
13986 (KJS::Bindings::RootObject::RootObject): No explicit initialization of _imp needed |
|
13987 since it's now a ProtectedPtr. |
|
13988 (KJS::Bindings::RootObject::setRootObjectImp): Remove old code that relied on the |
|
13989 fact that _imp was 0 and replaced with use of ProtectedPtr. |
|
13990 (KJS::Bindings::RootObject::rootObjectImp): Updated since _imp is a ProtectedPtr. |
|
13991 |
|
13992 2006-01-17 Darin Adler <darin@apple.com> |
|
13993 |
|
13994 Reviewed by Anders. |
|
13995 |
|
13996 - http://bugs.webkit.org/show_bug.cgi?id=6611 |
|
13997 add assertions to check correct use of hash table iterators |
|
13998 |
|
13999 * kxmlcore/HashTable.h: |
|
14000 (KXMLCore::addIterator): Added. Helper function that adds an iterator to the list |
|
14001 maintained by the specified hash table. |
|
14002 (KXMLCore::removeIterator): Added. Helper function that removes an iterator from |
|
14003 the list maintained by the hash table it's in. |
|
14004 (KXMLCore::HashTableConstIterator::HashTableConstIterator): Added a HashTable |
|
14005 parameter, ignored when not debugging. Call addIterator. |
|
14006 (KXMLCore::HashTableConstIterator::~HashTableConstIterator): |
|
14007 (KXMLCore::HashTableConstIterator::operator=): Call removeIterator. |
|
14008 (KXMLCore::HashTableConstIterator::operator*): Call checkValidity. |
|
14009 (KXMLCore::HashTableConstIterator::operator->): Ditto. |
|
14010 (KXMLCore::HashTableConstIterator::operator++): Ditto. |
|
14011 (KXMLCore::HashTableConstIterator::operator==): Ditto. |
|
14012 (KXMLCore::HashTableConstIterator::operator!=): Ditto. |
|
14013 (KXMLCore::HashTableConstIterator::checkValidity): Checks that the hash table |
|
14014 pointer is not 0 and if there are two iterators that both point at the same table. |
|
14015 (KXMLCore::HashTableIterator::HashTableIterator): Changed to use the const iterator |
|
14016 as an implementation detail, to avoid having two separate iterator implementations. |
|
14017 (KXMLCore::HashTableIterator::operator*): Ditto. |
|
14018 (KXMLCore::HashTableIterator::operator->): Ditto. |
|
14019 (KXMLCore::HashTableIterator::operator++): Ditto. |
|
14020 (KXMLCore::HashTableIterator::operator==): Ditto. |
|
14021 (KXMLCore::HashTableIterator::operator!=): Ditto. |
|
14022 (KXMLCore::HashTable::HashTable): Initialize pointer to head of iterators list. |
|
14023 (KXMLCore::HashTable::~HashTable): Added call to invalidateIterators. |
|
14024 (KXMLCore::HashTable::makeIterator): Pass this pointer. |
|
14025 (KXMLCore::HashTable::makeConstIterator): Ditto. |
|
14026 (KXMLCore::HashTable::insert): Call invalidateIterators, since this is a public |
|
14027 entry point that modifies the hash table. |
|
14028 (KXMLCore::HashTable::remove): Ditto. |
|
14029 (KXMLCore::HashTable::clear): Ditto. |
|
14030 (KXMLCore::HashTable::swap): Ditto. |
|
14031 (KXMLCore::HashTable::invalidateIterators): Added. Walks the iterators list and |
|
14032 clears out the table, next, and previous pointers in all of them, and then clears |
|
14033 the head so we have an empty list. |
|
14034 (KXMLCore::addIterator): Added. Adds the iterator the the linked list in the |
|
14035 passed-in table, and points the iterator at the table. |
|
14036 (KXMLCore::removeIterator): Added. Removes the iterator from the linked list in |
|
14037 the passed-in table. |
|
14038 |
|
14039 * kxmlcore/HashTraits.h: A bit of tweaking and formatting. |
|
14040 |
|
14041 2006-01-17 Justin Garcia <justin.garcia@apple.com> |
|
14042 |
|
14043 Reviewed by eric |
|
14044 |
|
14045 Deployment builds now use -O2 |
|
14046 |
|
14047 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
14048 |
|
14049 2006-01-17 Darin Adler <darin@apple.com> |
|
14050 |
|
14051 Reviewed by Anders. |
|
14052 |
|
14053 - fix http://bugs.webkit.org/show_bug.cgi?id=6610 |
|
14054 change RefPtr so that it works when deref ends up deleting the RefPtr |
|
14055 |
|
14056 * kxmlcore/PassRefPtr.h: Always set m_ptr before calling deref. |
|
14057 * kxmlcore/RefPtr.h: Ditto. |
|
14058 |
|
14059 2006-01-16 Geoffrey Garen <ggaren@apple.com> |
|
14060 |
|
14061 Reviewed by darin. |
|
14062 |
|
14063 - Fixed http://bugs.webkit.org/show_bug.cgi?id=6322 |
|
14064 DateProtoFuncImp::callAsFunction can crash due to lack of type checking |
|
14065 |
|
14066 * kjs/date_object.cpp: |
|
14067 (KJS::DateProtoFunc::callAsFunction): Type check calls to all methods. |
|
14068 This matches section 15.9.5 in the spec. |
|
14069 |
|
14070 2006-01-16 Tim Omernick <timo@apple.com> |
|
14071 |
|
14072 Reviewed by John Sullivan. |
|
14073 |
|
14074 JavaScriptCore part of <rdar://problem/4211707> NPAPI ref count behavior differs with Mozilla |
|
14075 |
|
14076 * bindings/npruntime.cpp: |
|
14077 (_NPN_ReleaseObject): |
|
14078 Refactored part of this function out into _NPN_DeallocateObject. |
|
14079 (_NPN_DeallocateObject): |
|
14080 Forcibly deallocates the passed object, even if its refcount is |
|
14081 greater than zero. |
|
14082 |
|
14083 * bindings/npruntime_impl.h: |
|
14084 Declared _NPN_DeallocateObject(). |
|
14085 |
|
14086 2006-01-16 Darin Adler <darin@apple.com> |
|
14087 |
|
14088 Reviewed by Maciej. |
|
14089 |
|
14090 - fix problem with ++, ==, and != on const iterators in |
|
14091 HashMaps that are using the pointer specialization |
|
14092 |
|
14093 * kxmlcore/HashMapPtrSpec.h: |
|
14094 (KXMLCore::PointerHashConstIteratorAdapter::operator++): Change type to const_iterator. |
|
14095 (KXMLCore::PointerHashConstIteratorAdapter::operator==): Ditto. |
|
14096 (KXMLCore::PointerHashConstIteratorAdapter::operator!=): Ditto. |
|
14097 |
|
14098 2006-01-15 Alexey Proskuryakov <ap@nypop.com> |
|
14099 |
|
14100 Reviewed by Anders. |
|
14101 |
|
14102 - fix http://bugs.webkit.org/show_bug.cgi?id=6561 |
|
14103 run-javascriptcore-tests doesn't work |
|
14104 |
|
14105 * JavaScriptCore/tests/mozilla/Getopt/Mixed.pm: |
|
14106 Changed revision number to 1.8 (broken by svn migration). |
|
14107 |
|
14108 2006-01-14 David Kilzer <ddkilzer@kilzer.net> |
|
14109 |
|
14110 Reviewed and landed by Anders. |
|
14111 |
|
14112 * kjs/create_hash_table: Fixed comment typo. |
|
14113 |
|
14114 2006-01-13 Maks Orlovich <maksim@kde.org> |
|
14115 |
|
14116 Mostly merging work by Peter Kelly. Reviewed by Maciej, landed by ap. |
|
14117 |
|
14118 - fix http://bugs.webkit.org/show_bug.cgi?id=6261 |
|
14119 Misc. array object fixes from KJS |
|
14120 |
|
14121 * kjs/array_object.cpp: Don't treat 2^32-1 as a real array index property. |
|
14122 (ArrayInstance::getOwnPropertySlot): Ditto. |
|
14123 (ArrayInstance::deleteProperty): Ditto. |
|
14124 (ArrayInstance::put): Ditto. |
|
14125 (ArrayInstance::propList): Added a FIXME comment. |
|
14126 (ArrayInstance::put): Throw exception on trying to set invalid array length. |
|
14127 (ArrayProtoFunc::callAsFunction): Do not use a separator argument when doing toString/toLocalString. |
|
14128 * kjs/array_object.h: Added MAX_ARRAY_INDEX. |
|
14129 |
|
14130 2006-01-13 Darin Adler <darin@apple.com> |
|
14131 |
|
14132 - Replaced tabs with spaces in source files that had less than 10 lines with tabs. |
|
14133 - Set allow-tabs Subversion property in source files that have more than 10 lines with tabs. |
|
14134 |
|
14135 2006-01-13 Anders Carlsson <andersca@mac.com> |
|
14136 |
|
14137 Reviewed by Eric. |
|
14138 |
|
14139 * kjs/create_hash_table: |
|
14140 Use correct size variables. |
|
14141 |
|
14142 2006-01-13 Anders Carlsson <andersca@mac.com> |
|
14143 |
|
14144 Reviewed by Darin. |
|
14145 |
|
14146 * kjs/create_hash_table: |
|
14147 Don't create an empty entry array, instead add a entry with all fields |
|
14148 set to null and set the hash table size to 1. |
|
14149 |
|
14150 * kjs/lookup.cpp: |
|
14151 (findEntry): |
|
14152 Remove the hash table size check |
|
14153 |
|
14154 2006-01-12 Anders Carlsson <andersca@mac.com> |
|
14155 |
|
14156 Reviewed by Maciej. |
|
14157 |
|
14158 - fix http://bugs.webkit.org/show_bug.cgi?id=6494 |
|
14159 Crash when assigning a new function to a DOMParser object |
|
14160 |
|
14161 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
14162 Move lookup.cpp before lookup.h |
|
14163 |
|
14164 * kjs/lookup.cpp: |
|
14165 (findEntry): |
|
14166 If the hash table is empty, return 0 early. |
|
14167 |
|
14168 2006-01-12 George Staikos <staikos@kde.org> |
|
14169 |
|
14170 Reviewed by Darin. |
|
14171 |
|
14172 * kjs/interpreter.cpp: |
|
14173 * kjs/testkjs.cpp: |
|
14174 * kjs/interpreter.h: |
|
14175 Add helper to interpreter to call the collector in order to facilitate |
|
14176 visibility rules in KDE. |
|
14177 |
|
14178 2006-01-12 George Staikos <staikos@kde.org> |
|
14179 |
|
14180 Reviewed by Maciej. |
|
14181 |
|
14182 * kjs/kjs.pro: Updates to build the whole thing on Linux at least. |
|
14183 |
|
14184 * kxmlcore/HashTable.h: Add missing assert.h |
|
14185 |
|
14186 2006-01-12 Darin Adler <darin@apple.com> |
|
14187 |
|
14188 Reviewed by Geoff. |
|
14189 |
|
14190 - fix http://bugs.webkit.org/show_bug.cgi?id=6505 |
|
14191 retire APPLE_CHANGES from JavaScriptCore |
|
14192 |
|
14193 * JavaScriptCore.xcodeproj/project.pbxproj: Removed both |
|
14194 APPLE_CHANGES and HAVE_CONFIG_H from all targets. |
|
14195 |
|
14196 * README: Removed. This had obsolete information in it |
|
14197 and it wasn't clear what to replace it with. |
|
14198 |
|
14199 * kjs/collector.h: Removed an APPLE_CHANGES if around something |
|
14200 that's not really platform-specific (although it does use a |
|
14201 platform-specific API at the moment). |
|
14202 * kjs/collector.cpp: Removed a mistaken comment. |
|
14203 |
|
14204 * kjs/grammar.y: |
|
14205 * kjs/internal.cpp: |
|
14206 * kjs/object.h: |
|
14207 * kjs/operations.cpp: |
|
14208 * kjs/operations.h: |
|
14209 * kjs/ustring.h: |
|
14210 Use __APPLE__ instead of APPLE_CHANGES for code that should be |
|
14211 used only on Mac OS X. |
|
14212 |
|
14213 * kjs/interpreter.cpp: Removed APPLE_CHANGES ifdef around the include |
|
14214 of the runtime.h header. Even though that header isn't needed at the |
|
14215 moment on platforms other than Mac OS X, the conditional stuff should |
|
14216 be in the header itself, not in this one client. |
|
14217 |
|
14218 * kjs/math_object.cpp: (MathFuncImp::callAsFunction): Removed some |
|
14219 code inside APPLE_CHANGES. I'm pretty sure this code isn't needed on |
|
14220 any platform where pow is implemented corrrectly according to the IEEE |
|
14221 standard. If it is needed on some, we can add it back with an appropriate |
|
14222 #if for the platforms where it is needed. |
|
14223 |
|
14224 2006-01-12 Justin Haygood <justin@xiondigital.net> |
|
14225 |
|
14226 Reviewed, tweaked, and landed by Darin. |
|
14227 |
|
14228 - fix http://bugs.webkit.org/show_bug.cgi?id=6416 |
|
14229 lexer.cpp, grammar.y protect include of config.h with "HAVE_CONFIG_H" |
|
14230 |
|
14231 * kjs/dtoa.cpp: Removed HAVE_CONFIG_H, changed config.h to use |
|
14232 quotes instead of angle brackets. Moved dtoa.h include to the top. |
|
14233 Changed system header includes to use angle brackets instead of quotes. |
|
14234 * kjs/grammar.y: Removed HAVE_CONFIG_H, changed config.h to use |
|
14235 quotes instead of angle brackets. |
|
14236 * kjs/lexer.cpp: Removed HAVE_CONFIG_H, changed config.h to use |
|
14237 quotes instead of angle brackets. Moved lexer.h include to the top. |
|
14238 * kjs/ustring.cpp: Removed HAVE_CONFIG_H, changed config.h to use |
|
14239 quotes instead of angle brackets. Moved ustring.h include to the top. |
|
14240 |
|
14241 2006-01-12 George Staikos <staikos@kde.org> |
|
14242 |
|
14243 Reviewed by Maciej |
|
14244 |
|
14245 - Import initial QMake file. Doesn't fully work yet. |
|
14246 |
|
14247 2006-01-11 Ricci Adams <ricciadams@apple.com> |
|
14248 |
|
14249 Reviewed by Maciej and Darin, landed by Darin. |
|
14250 |
|
14251 - fix http://bugs.webkit.org/show_bug.cgi?id=5939 |
|
14252 final comma in javascript object prevents parsing |
|
14253 |
|
14254 * kjs/grammar.y: Added rule to allow trailing comma in |
|
14255 object construction. |
|
14256 |
|
14257 2006-01-11 Ricci Adams <ricciadams@apple.com> |
|
14258 |
|
14259 Reviewed by Geoff, landed by Darin. |
|
14260 |
|
14261 - fix http://bugs.webkit.org/show_bug.cgi?id=5308 |
|
14262 Number.toFixed doesn't include leading 0 |
|
14263 |
|
14264 * kjs/number_object.cpp: (NumberProtoFunc::callAsFunction): |
|
14265 Fixed a "<" that should have been a "<=". |
|
14266 |
|
14267 2006-01-11 Ricci Adams <ricciadams@apple.com> |
|
14268 |
|
14269 Reviewed by Geoff, landed by Darin. |
|
14270 |
|
14271 - fix http://bugs.webkit.org/show_bug.cgi?id=5307 |
|
14272 Number.toFixed doesn't round 0.5 up |
|
14273 |
|
14274 * kjs/number_object.cpp: (NumberProtoFunc::callAsFunction): |
|
14275 Fixed a ">" that should have been a ">=". |
|
14276 |
|
14277 2006-01-11 Justin Haygood <justin@xiondigital.net> |
|
14278 |
|
14279 Reviewed and landed by Darin. |
|
14280 |
|
14281 - fix http://bugs.webkit.org/show_bug.cgi?id=6486 |
|
14282 JavaScriptCore should use system malloc on Windows |
|
14283 |
|
14284 * kjs/config.h: Add USE_SYSTEM_MALLOC to the Win32 section. |
|
14285 |
|
14286 2006-01-10 Darin Adler <darin@apple.com> |
|
14287 |
|
14288 * Makefile: Took out unneeded "export" line. |
|
14289 * <many-files>: Changed a lot of flags (cleared bogus executable bits, set |
|
14290 MIME types, other small corrections). |
|
14291 |
|
14292 2006-01-09 Darin Adler <darin@apple.com> |
|
14293 |
|
14294 * Makefile.am: Removed. |
|
14295 |
|
14296 2006-01-07 Anders Carlsson <andersca@mac.com> |
|
14297 |
|
14298 Reviewed by Maciej. |
|
14299 |
|
14300 - fix http://bugs.webkit.org/show_bug.cgi?id=6373 |
|
14301 REGRESSION: JavaScript hang when comparing large array to null |
|
14302 |
|
14303 * kjs/object.h: |
|
14304 (KJS::JSObject::isEqualToNull): |
|
14305 Add new function which returns true if an object should be treated as null when |
|
14306 doing comparisons. |
|
14307 |
|
14308 * kjs/operations.cpp: |
|
14309 (KJS::equal): |
|
14310 Use isEqualToNull. |
|
14311 |
|
14312 2006-01-07 Alexey Proskuryakov <ap@nypop.com> |
|
14313 |
|
14314 Reviewed by Maciej. |
|
14315 |
|
14316 - Fix WebCore development build |
|
14317 http://bugs.webkit.org/show_bug.cgi?id=6408 |
|
14318 |
|
14319 * kxmlcore/Assertions.h: Use __VA_ARGS__ in variadic macros. |
|
14320 |
|
14321 2006-01-06 Maciej Stachowiak <mjs@apple.com> |
|
14322 |
|
14323 Reviewed by Darin. |
|
14324 |
|
14325 - miscellaneous changes for 4% speedup on the JavaScript iBench |
|
14326 http://bugs.webkit.org/show_bug.cgi?id=6396 |
|
14327 |
|
14328 Changes mostly thanks to Maks Orlovich, tweaked a little by me. |
|
14329 |
|
14330 * kjs/create_hash_table: Use the same hash as the one used by Identifier. |
|
14331 * kjs/function.cpp: |
|
14332 (KJS::FunctionImp::processParameters): Use the new List::copyFrom |
|
14333 (KJS::ActivationImp::ActivationImp): track variable while iterating |
|
14334 * kjs/internal.cpp: |
|
14335 (KJS::StringImp::toObject): create StringInstance directly |
|
14336 * kjs/list.cpp: |
|
14337 (KJS::List::copy): implement in terms of copyFrom |
|
14338 (KJS::List::copyFrom): more efficient way to copy in another list |
|
14339 * kjs/list.h: |
|
14340 * kjs/lookup.cpp: |
|
14341 (keysMatch): updated to work with identifier hash |
|
14342 (findEntry): ditto |
|
14343 (Lookup::findEntry): ditto |
|
14344 (Lookup::find): ditto |
|
14345 * kjs/lookup.h: |
|
14346 |
|
14347 2006-01-06 Maciej Stachowiak <mjs@apple.com> |
|
14348 |
|
14349 - fix development build failure from the previous checkin |
|
14350 |
|
14351 * kjs/function.cpp: |
|
14352 (KJS::ActivationImp::put): Use prototype() accessor in assert. |
|
14353 |
|
14354 2006-01-05 Maciej Stachowiak <mjs@apple.com> |
|
14355 |
|
14356 Reviewed by Eric. |
|
14357 |
|
14358 - fix remaining performance regression from Getter/Setter change |
|
14359 http://bugs.webkit.org/show_bug.cgi?id=6249 |
|
14360 |
|
14361 - Activation objects should not have __proto__ property |
|
14362 http://bugs.webkit.org/show_bug.cgi?id=6395 |
|
14363 |
|
14364 * kjs/function.cpp: |
|
14365 (KJS::ActivationImp::getOwnPropertySlot): Implement directly, thus |
|
14366 skipping getter/setter handling and __proto__ handling, as well |
|
14367 as inlining needed superclass stuff. |
|
14368 (KJS::ActivationImp::put): Implement directly, skipping getter/setter, |
|
14369 __proto__, and do canPut directly in PropertyMap::put since there's no |
|
14370 static property table either. |
|
14371 * kjs/function.h: |
|
14372 * kjs/property_map.cpp: |
|
14373 (KJS::PropertyMap::put): Allow optionally inlining canPut check. |
|
14374 * kjs/property_map.h: |
|
14375 |
|
14376 2006-01-04 Geoffrey Garen <ggaren@apple.com> |
|
14377 |
|
14378 Patch by kimmo.t.kinnunen@nokia.com, reviewed by darin, tweaked by me. |
|
14379 |
|
14380 - Fixed http://bugs.webkit.org/show_bug.cgi?id=4921 |
|
14381 \u escape sequences in JavaScript identifiers |
|
14382 |
|
14383 * kjs/function_object.cpp: |
|
14384 (FunctionObjectImp::construct): |
|
14385 * kjs/lexer.cpp: |
|
14386 (Lexer::shift): |
|
14387 (Lexer::lex): |
|
14388 (Lexer::isWhiteSpace): |
|
14389 (Lexer::isLineTerminator): |
|
14390 (Lexer::isIdentStart): |
|
14391 (Lexer::isIdentPart): |
|
14392 (isDecimalDigit): |
|
14393 (Lexer::scanRegExp): |
|
14394 * kjs/lexer.h: |
|
14395 (KJS::Lexer::): |
|
14396 |
|
14397 * tests/mozilla/expected.html: Updated test results. |
|
14398 |
|
14399 2005-12-30 Maciej Stachowiak <mjs@apple.com> |
|
14400 |
|
14401 No review, just test result update. |
|
14402 |
|
14403 * tests/mozilla/expected.html: Updated for newly passing test from recent fixes. |
|
14404 |
|
14405 2005-12-30 Anders Carlsson <andersca@mac.com> |
|
14406 |
|
14407 Reviewed by Maciej. |
|
14408 |
|
14409 - Fix http://bugs.webkit.org/show_bug.cgi?id=6298 |
|
14410 Getter setter test is failing |
|
14411 |
|
14412 * kjs/object.cpp: |
|
14413 (KJS::JSObject::put): |
|
14414 Rework the getter setter part. We now walk the prototype chain, checking for |
|
14415 getter/setter properties and only take the slow path if any are found. |
|
14416 |
|
14417 2005-12-30 Maks Orlovich <maksim@kde.org> |
|
14418 |
|
14419 Reviewed and committed by Maciej. |
|
14420 |
|
14421 - Handle negative, FP numbers with non-10 radix in toString |
|
14422 http://bugs.webkit.org/show_bug.cgi?id=6259 |
|
14423 |
|
14424 (Merged from KJS, original work by Harri Porten) |
|
14425 |
|
14426 * kjs/number_object.cpp: |
|
14427 (NumberProtoFunc::callAsFunction): rewrote Number.toString(radix) to work with |
|
14428 negative numbers, floating point and very large numbers. |
|
14429 |
|
14430 2005-12-29 Geoffrey Garen <ggaren@apple.com> |
|
14431 |
|
14432 Patch by Maks Orlovich, reviewed and landed by me. |
|
14433 |
|
14434 - http://bugs.webkit.org/show_bug.cgi?id=6267 |
|
14435 Fix Number.prototype.toFixed/toExponential(undefined) |
|
14436 |
|
14437 * kjs/number_object.cpp: |
|
14438 (NumberProtoFunc::callAsFunction): |
|
14439 |
|
14440 2005-12-29 Geoffrey Garen <ggaren@apple.com> |
|
14441 |
|
14442 Patch by Maks Orlovich, Reviewed and landed by me. |
|
14443 |
|
14444 - http://bugs.webkit.org/show_bug.cgi?id=6266 |
|
14445 Minor object naming updates (to match Mozilla, KJS) |
|
14446 |
|
14447 * kjs/number_object.cpp: |
|
14448 * kjs/regexp_object.cpp: |
|
14449 |
|
14450 2005-12-29 Geoffrey Garen <ggaren@apple.com> |
|
14451 |
|
14452 Patch by Maks Orlovich, reviewed by mjs. |
|
14453 |
|
14454 This has 2 very minor fixes, covered by KJS testsuite: |
|
14455 1. Enumerates string indices in property list (with the same bug as array |
|
14456 object has in corresponding code). This is a mozilla emulation thing. |
|
14457 2. Permits properties with integer names in prototypes to be found |
|
14458 |
|
14459 * kjs/string_object.cpp: |
|
14460 (StringInstance::getOwnPropertySlot): |
|
14461 (StringInstanceImp::propList): |
|
14462 * kjs/string_object.h: |
|
14463 |
|
14464 2005-12-26 Geoffrey Garen <ggaren@apple.com> |
|
14465 |
|
14466 Reviewed by mjs. |
|
14467 |
|
14468 - Fixed <rdar://problem/4364705> run-javascriptcore-tests crashes in |
|
14469 KJS::BlockNode::deref |
|
14470 AKA |
|
14471 http://bugs.webkit.org/show_bug.cgi?id=6233 |
|
14472 Reproducible stack-overflow crash in ~RefPtr<T> due to RefPtr<T> use in |
|
14473 linked lists |
|
14474 |
|
14475 This patch does four things: |
|
14476 (1) Standardizes all our linked list nodes to use "next" as their next |
|
14477 pointers. |
|
14478 (2) Creates the ListRefPtr<T> class, a subclass of RefPtr<T> specialized |
|
14479 to iteratively deref "next" pointers. |
|
14480 (3) Standardizes our linked list nodes to use ListRefPtr<T> and |
|
14481 implement the releaseNext() function used by ~ListRefPtr<T>(). |
|
14482 (4) Adds to RefPtr<T> the release() method used by releaseNext(). |
|
14483 |
|
14484 - Modified existing mozilla test to ensure it would make deployment |
|
14485 builds crash as well. |
|
14486 |
|
14487 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
14488 * kjs/nodes.cpp: |
|
14489 (ElementNode::evaluate): |
|
14490 (PropertyListNode::evaluate): |
|
14491 (ArgumentListNode::evaluateList): |
|
14492 (StatListNode::StatListNode): |
|
14493 (StatListNode::execute): |
|
14494 (StatListNode::processVarDecls): |
|
14495 (VarDeclListNode::evaluate): |
|
14496 (VarDeclListNode::processVarDecls): |
|
14497 (VarStatementNode::execute): |
|
14498 (VarStatementNode::processVarDecls): |
|
14499 (BlockNode::BlockNode): |
|
14500 (CaseClauseNode::evalStatements): |
|
14501 (CaseClauseNode::processVarDecls): |
|
14502 (ClauseListNode::processVarDecls): |
|
14503 (CaseBlockNode::CaseBlockNode): |
|
14504 (CaseBlockNode::evalBlock): |
|
14505 (SourceElementsNode::SourceElementsNode): |
|
14506 (SourceElementsNode::execute): |
|
14507 (SourceElementsNode::processFuncDecl): |
|
14508 (SourceElementsNode::processVarDecls): |
|
14509 * kjs/nodes.h: |
|
14510 (KJS::ElementNode::ElementNode): |
|
14511 (KJS::ElementNode::releaseNext): |
|
14512 (KJS::ArrayNode::ArrayNode): |
|
14513 (KJS::PropertyListNode::PropertyListNode): |
|
14514 (KJS::PropertyListNode::releaseNext): |
|
14515 (KJS::ObjectLiteralNode::ObjectLiteralNode): |
|
14516 (KJS::ArgumentListNode::ArgumentListNode): |
|
14517 (KJS::ArgumentListNode::releaseNext): |
|
14518 (KJS::ArgumentsNode::ArgumentsNode): |
|
14519 (KJS::StatListNode::releaseNext): |
|
14520 (KJS::VarDeclListNode::VarDeclListNode): |
|
14521 (KJS::VarDeclListNode::releaseNext): |
|
14522 (KJS::VarStatementNode::VarStatementNode): |
|
14523 (KJS::ForNode::ForNode): |
|
14524 (KJS::CaseClauseNode::CaseClauseNode): |
|
14525 (KJS::ClauseListNode::ClauseListNode): |
|
14526 (KJS::ClauseListNode::getClause): |
|
14527 (KJS::ClauseListNode::getNext): |
|
14528 (KJS::ClauseListNode::releaseNext): |
|
14529 (KJS::ParameterNode::ParameterNode): |
|
14530 (KJS::ParameterNode::releaseNext): |
|
14531 (KJS::SourceElementsNode::releaseNext): |
|
14532 * kjs/nodes2string.cpp: |
|
14533 (ElementNode::streamTo): |
|
14534 (PropertyListNode::streamTo): |
|
14535 (ArgumentListNode::streamTo): |
|
14536 (StatListNode::streamTo): |
|
14537 (VarDeclListNode::streamTo): |
|
14538 (VarStatementNode::streamTo): |
|
14539 (CaseClauseNode::streamTo): |
|
14540 (ClauseListNode::streamTo): |
|
14541 (CaseBlockNode::streamTo): |
|
14542 (SourceElementsNode::streamTo): |
|
14543 * kxmlcore/ListRefPtr.h: Added. |
|
14544 (KXMLCore::ListRefPtr::ListRefPtr): |
|
14545 (KXMLCore::ListRefPtr::~ListRefPtr): |
|
14546 (KXMLCore::ListRefPtr::operator=): |
|
14547 * kxmlcore/RefPtr.h: |
|
14548 (KXMLCore::RefPtr::release): |
|
14549 |
|
14550 2005-12-29 Geoffrey Garen <ggaren@apple.com> |
|
14551 |
|
14552 Reviewed by mjs. |
|
14553 |
|
14554 - Fixed http://bugs.webkit.org/show_bug.cgi?id=4026 |
|
14555 Math.random() not seeded. |
|
14556 |
|
14557 Added call to sranddev() -- it executes the first time a process |
|
14558 calls Math.random(). |
|
14559 |
|
14560 * kjs/math_object.cpp: |
|
14561 (MathFuncImp::callAsFunction): |
|
14562 |
|
14563 2005-12-29 Geoffrey Garen <ggaren@apple.com> |
|
14564 |
|
14565 Reviewed by darin. |
|
14566 |
|
14567 - Fixed http://bugs.webkit.org/show_bug.cgi?id=6265 |
|
14568 Name change regression: Java doesn't know what JavaJSObject is |
|
14569 |
|
14570 Changed strings passed to Java back to original "JSObject". |
|
14571 |
|
14572 * bindings/jni/jni_jsobject.cpp: |
|
14573 (JavaJSObject::convertValueToJObject): |
|
14574 (JavaJSObject::convertJObjectToValue): |
|
14575 |
|
14576 2005-12-28 Anders Carlsson <andersca@mac.com> |
|
14577 |
|
14578 Reviewed by Maciej. |
|
14579 |
|
14580 - The JSC part of http://bugs.webkit.org/show_bug.cgi?id=6268 |
|
14581 Add undetectable document.all |
|
14582 |
|
14583 * kjs/operations.cpp: |
|
14584 (KJS::equal): |
|
14585 When comparing an object with null or undefined, call toPrimitive with |
|
14586 NullType as the preferred type. |
|
14587 |
|
14588 2005-12-27 Anders Carlsson <andersca@mac.com> |
|
14589 |
|
14590 Reviewed by Darin. |
|
14591 |
|
14592 * kjs/array_object.cpp: |
|
14593 (ArrayProtoFunc::callAsFunction): |
|
14594 Implement filter and map. Also, make the existing |
|
14595 array iteration functions not invoke the callback for |
|
14596 non-existing properties, just as Mozilla does now. |
|
14597 |
|
14598 * kjs/array_object.h: |
|
14599 (KJS::ArrayProtoFunc::): |
|
14600 Add filter and map. |
|
14601 |
|
14602 * tests/mozilla/expected.html: |
|
14603 Update, two 1.6 tests now pass. |
|
14604 |
|
14605 2005-12-27 Maciej Stachowiak <mjs@apple.com> |
|
14606 |
|
14607 - updated test results for new JS 1.6 tests |
|
14608 |
|
14609 * tests/mozilla/expected.html: |
|
14610 |
|
14611 2005-12-27 Anders Carlsson <andersca@mac.com> |
|
14612 |
|
14613 Reviewed by Maciej. |
|
14614 |
|
14615 Add Mozilla JS 1.6 tests. |
|
14616 |
|
14617 * tests/mozilla/js1_6/Array/browser.js: Added. |
|
14618 * tests/mozilla/js1_6/Array/regress-290592.js: Added. |
|
14619 * tests/mozilla/js1_6/Array/regress-304828.js: Added. |
|
14620 * tests/mozilla/js1_6/Array/regress-305002.js: Added. |
|
14621 * tests/mozilla/js1_6/Array/regress-310425-01.js: Added. |
|
14622 * tests/mozilla/js1_6/Array/regress-310425-02.js: Added. |
|
14623 * tests/mozilla/js1_6/Array/regress-320887.js: Added. |
|
14624 * tests/mozilla/js1_6/Array/shell.js: Added. |
|
14625 * tests/mozilla/js1_6/README: Added. |
|
14626 * tests/mozilla/js1_6/Regress/browser.js: Added. |
|
14627 * tests/mozilla/js1_6/Regress/regress-301574.js: Added. |
|
14628 * tests/mozilla/js1_6/Regress/regress-309242.js: Added. |
|
14629 * tests/mozilla/js1_6/Regress/regress-311157-01.js: Added. |
|
14630 * tests/mozilla/js1_6/Regress/regress-311157-02.js: Added. |
|
14631 * tests/mozilla/js1_6/Regress/regress-314887.js: Added. |
|
14632 * tests/mozilla/js1_6/Regress/regress-320172.js: Added. |
|
14633 * tests/mozilla/js1_6/Regress/shell.js: Added. |
|
14634 * tests/mozilla/js1_6/String/browser.js: Added. |
|
14635 * tests/mozilla/js1_6/String/regress-306591.js: Added. |
|
14636 * tests/mozilla/js1_6/String/shell.js: Added. |
|
14637 * tests/mozilla/js1_6/browser.js: Added. |
|
14638 * tests/mozilla/js1_6/shell.js: Added. |
|
14639 * tests/mozilla/js1_6/template.js: Added. |
|
14640 |
|
14641 2005-12-27 Maks Orlovich <maksim@kde.org> |
|
14642 |
|
14643 Reviewed and landed by Maciej. |
|
14644 |
|
14645 - fixed 6234: Can delete array index property incorrectly. |
|
14646 http://bugs.webkit.org/show_bug.cgi?id=6234 |
|
14647 |
|
14648 * kjs/array_object.cpp: |
|
14649 (ArrayInstance::deleteProperty): use toArrayIndex instead of toUInt32 when |
|
14650 looking for array properties. |
|
14651 |
|
14652 2005-12-27 Anders Carlsson <andersca@mac.com> |
|
14653 |
|
14654 Reviewed by Maciej. |
|
14655 |
|
14656 * kjs/object.cpp: |
|
14657 (KJS::JSObject::defineSetter): |
|
14658 Remove duplicate call to putDirect. |
|
14659 |
|
14660 2005-12-26 Maciej Stachowiak <mjs@apple.com> |
|
14661 |
|
14662 Reviewed by Darin and Geoff. |
|
14663 |
|
14664 Changes by me and Anders. |
|
14665 |
|
14666 - mostly fixed REGRESSION: 5-10% performance regression on JS iBench from getter/setter change |
|
14667 http://bugs.webkit.org/show_bug.cgi?id=6083 |
|
14668 |
|
14669 - also fixed some warnings reported by -Winline |
|
14670 |
|
14671 * JavaScriptCorePrefix.h: Move new and delete definitions higher so there |
|
14672 aren't conflicts with use in standard C++ headers |
|
14673 * kjs/object.cpp: |
|
14674 (KJS::throwSetterError): Moved this piece of put into a seprate function |
|
14675 to avoid the PIC branch. |
|
14676 (KJS::JSObject::put): Use hasGetterSetterProperties to avoid expensive stuff |
|
14677 when not needed. Also use GetterSetter properties attribute. |
|
14678 (KJS::JSObject::deleteProperty): Recompute whether any properties are getter/setter |
|
14679 properties any more, if this one was one. |
|
14680 (KJS::JSObject::defineGetter): Let the PropertyMap know that it has getter/setter |
|
14681 properties now (and use the new attribute). |
|
14682 (KJS::JSObject::defineSetter): Ditto. |
|
14683 (KJS::JSObject::fillGetterPropertySlot): Out-of-line helper for getOwnPropertySlot, |
|
14684 to avoid global variable access in the hot code path. |
|
14685 * kjs/object.h: |
|
14686 (KJS::): Added GetterSetter attribute. |
|
14687 (KJS::JSCell::isObject): Moved lower to be after inline methods it uses. |
|
14688 (KJS::JSValue::isObject): ditto |
|
14689 (KJS::JSObject::getOwnPropertySlot): try to avoid impact of getters and setters |
|
14690 as much as possible in the case where they are not being used |
|
14691 * kjs/property_map.cpp: |
|
14692 (KJS::PropertyMap::containsGettersOrSetters): New method to help with this |
|
14693 * kjs/property_map.h: |
|
14694 (KJS::PropertyMap::hasGetterSetterProperties): Ditto |
|
14695 (KJS::PropertyMap::setHasGetterSetterProperties): Ditto |
|
14696 (KJS::PropertyMap::PropertyMap): Added a crazy hack to store the |
|
14697 global "has getter/setter properties" flag in the property map |
|
14698 single entry, to avoid making objects any bigger. |
|
14699 * kjs/value.h: Moved some things to object.h to make -Winline happier |
|
14700 |
|
14701 2005-12-24 Maciej Stachowiak <mjs@apple.com> |
|
14702 |
|
14703 Reviewed by Eric and Dave Hyatt. |
|
14704 |
|
14705 - make even const PassRefPtrs give transfer of ownership semantics |
|
14706 http://bugs.webkit.org/show_bug.cgi?id=6238 |
|
14707 |
|
14708 This is a somewhat cheesy change. Having to use PassRefPtr_Ref creates ambiguities |
|
14709 in assignment and copy construction. And this makes life way easier and removes |
|
14710 the need for pass(). It is not really correct, but we pretty much never need a real |
|
14711 const PassRefPtr, and this takes care of things for PassRefPtr temporaries. |
|
14712 |
|
14713 * kjs/identifier.cpp: |
|
14714 (KJS::Identifier::add): No more need for pass() |
|
14715 * kjs/property_map.cpp: |
|
14716 (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): No more need for pass() |
|
14717 * kjs/ustring.cpp: |
|
14718 (KJS::UString::Rep::create): Use adoptRef |
|
14719 (KJS::UString::UString): No more need for pass |
|
14720 (KJS::UString::append): No more need for pass |
|
14721 (KJS::UString::substr): No more need for pass |
|
14722 * kxmlcore/PassRefPtr.h: made m_ptr mutable (ugh) |
|
14723 (KXMLCore::PassRefPtr::PassRefPtr): Take a const PassRefPtr reference |
|
14724 (KXMLCore::PassRefPtr::release): Made this a const method (ugh) |
|
14725 (KXMLCore::PassRefPtr::operator=): clean up appropriately |
|
14726 (KXMLCore::adoptRef): Added this to use instead of PassRefPtr<T>::adopt, I think |
|
14727 it makes the behavior more clear and it is less verbose. |
|
14728 (KXMLCore::static_pointer_cast): use adoptRef |
|
14729 (KXMLCore::const_pointer_cast): use adoptRef |
|
14730 * kxmlcore/RefPtr.h: |
|
14731 (KXMLCore::RefPtr::RefPtr): take const PassRefPtr& |
|
14732 (KXMLCore::PassRefPtr::operator=): take const PassRefPtr& |
|
14733 |
|
14734 2005-12-25 Eric Seidel <eseidel@apple.com> |
|
14735 |
|
14736 Reviewed by mjs. |
|
14737 |
|
14738 Unbreak HashTableConstIterator++ by returning const_iterator |
|
14739 |
|
14740 * kxmlcore/HashTable.h: |
|
14741 (KXMLCore::HashTableConstIterator::operator++): use const_iterator |
|
14742 |
|
14743 2005-12-25 Eric Seidel <eseidel@apple.com> |
|
14744 |
|
14745 Reviewed by mjs. |
|
14746 |
|
14747 Un-break HashTable copy constructor. |
|
14748 |
|
14749 * kxmlcore/HashTable.h: |
|
14750 (KXMLCore::::HashTable): use const_iterator instead |
|
14751 |
|
14752 2005-12-23 Maciej Stachowiak <mjs@apple.com> |
|
14753 |
|
14754 Reviewed by Eric. |
|
14755 |
|
14756 - fixed "HashMap does not work with const pointer keys or values" |
|
14757 http://bugs.webkit.org/show_bug.cgi?id=6222 |
|
14758 |
|
14759 * kxmlcore/HashMapPtrSpec.h: |
|
14760 (KXMLCore::HashMap): In all methods, explicitly cast all pointers |
|
14761 to void * before passing to internal implementation. Use C-style |
|
14762 casts instead of new-style casts, because the real solution would |
|
14763 require a combo of reinterpret_cast anc const_cast. |
|
14764 |
|
14765 |
|
14766 2005-12-23 Maciej Stachowiak <mjs@apple.com> |
|
14767 |
|
14768 - this time for sure |
|
14769 |
|
14770 * kxmlcore/RefPtr.h: |
|
14771 (KXMLCore::::swap): |
|
14772 |
|
14773 2005-12-22 Maciej Stachowiak <mjs@apple.com> |
|
14774 |
|
14775 - fix build problem from last commit. |
|
14776 |
|
14777 * kxmlcore/RefPtr.h: |
|
14778 (KXMLCore::::swap): |
|
14779 |
|
14780 2005-12-21 Maciej Stachowiak <mjs@apple.com> |
|
14781 |
|
14782 Reviewed by Darin. |
|
14783 |
|
14784 - Make HashMap/HashSet support non-POD types |
|
14785 http://bugs.webkit.org/show_bug.cgi?id=5332 |
|
14786 |
|
14787 The changes for support are relatively simple, but I also made extensive changes to |
|
14788 avoid copying, so that there isn't refcount thrash when you put RefPtrs into a HashMap. |
|
14789 |
|
14790 * kxmlcore/HashTable.h: |
|
14791 (KXMLCore::swap): specialize swap for pairs, to swap elements individually, |
|
14792 so that excess copies can be avoided. |
|
14793 (KXMLCore::Mover::move): Template function to either copy or swap, used |
|
14794 when transferring elements from old table to new. |
|
14795 (KXMLCore::IdentityHashTranslator::hash): The old "converting lookup" templates |
|
14796 that took two or three function parameters now take a class parameter, this is |
|
14797 the class used to do a normal lookup. |
|
14798 (KXMLCore::IdentityHashTranslator::equal): Ditto. |
|
14799 (KXMLCore::IdentityHashTranslator::translate): Ditto. Translate now takes a reference |
|
14800 to write into instead of returning a value to avoid redundant copies. |
|
14801 (KXMLCore::HashTable::~HashTable): Use deallocateTable instead of freeing directly. |
|
14802 (KXMLCore::HashTable::insert): Based on HashTranslator now instead of separate |
|
14803 functions. Added a FIXME about a remaining rare excess copy. |
|
14804 (KXMLCore::HashTable::isEmptyBucket): Use KeyTraits directly instead of unwrapping |
|
14805 the key from Traits, to avoid creating and destroying pair, which copies. |
|
14806 (KXMLCore::HashTable::isDeletedBucket): ditto |
|
14807 (KXMLCore::HashTable::lookup): Use HashTranslator now instead of separate functions. |
|
14808 (KXMLCore::HashTable::initializeBucket): Renamed from emptyBucket. Use placement new to |
|
14809 work right for non-POD types. |
|
14810 (KXMLCore::HashTable::deleteBucket): Use assignDeleted to avoid excess copies. |
|
14811 (KXMLCore::HashTable::reinsert): use Mover template to copy or swap as appropriate |
|
14812 (KXMLCore::HashTable::allocateTable): Initialize every bucket if calloc won't do. |
|
14813 (KXMLCore::HashTable::deallocateTable): Destruct every bucket if needed. |
|
14814 (KXMLCore::HashTable::rehash): Avoid copy before reinserting, so that swap can do its magic. |
|
14815 (KXMLCore::HashTable::clear): use deallocateTable instead of freeing directly. |
|
14816 (KXMLCore::HashTable::HashTable): be more dumb when copying to ensure that non-POD types |
|
14817 work right |
|
14818 * kxmlcore/HashFunctions.h: |
|
14819 (KXMLCore::PointerHash): Specialize PointerHash for RefPtr |
|
14820 * kxmlcore/HashMap.h: |
|
14821 (KXMLCore::extractFirst): Return a reference not a full object to avoid |
|
14822 copies. |
|
14823 (KXMLCore::HashMapTranslator::hash): Use a special translator for insertion |
|
14824 to defer making the pair as long as possible, thus avoiding needless copies. |
|
14825 (KXMLCore::HashMapTranslator::equal): ditto |
|
14826 (KXMLCore::HashMapTranslator::translate): ditto |
|
14827 (KXMLCore::::inlineAdd): Shared by set and add to insert using HashMapTranslator |
|
14828 (KXMLCore::::set): Use inlineAdd |
|
14829 (KXMLCore::::add): Use inlineAdd |
|
14830 * kxmlcore/HashMapPtrSpec.h: |
|
14831 (KXMLCore::): Pass KeyTraits along |
|
14832 * kxmlcore/HashSet.h: |
|
14833 (KXMLCore::identityExtract): Return a reference not a full object to avoid copies. |
|
14834 (KXMLCore::HashSetTranslatorAdapter::hash): Redo adapter stuff to work with |
|
14835 the new HashTranslator approach. |
|
14836 (KXMLCore::HashSetTranslatorAdapter::equal): ditto |
|
14837 (KXMLCore::HashSetTranslatorAdapter::translate): ditto |
|
14838 (KXMLCore::::insert): ditto |
|
14839 * kxmlcore/HashTraits.h: |
|
14840 (KXMLCore::GenericHashTraits): This is intended be used as a base class for |
|
14841 customized traits: sensible defaults. |
|
14842 (KXMLCore::): Use it a bunch |
|
14843 (KXMLCore::assignDeleted): template function to allow pairs to be assigned the |
|
14844 deleted value w/o excess copies. |
|
14845 (KXMLCore::PairHashTraits::emptyValue): Updated |
|
14846 (KXMLCore::PairHashTraits::deletedValue): Updated |
|
14847 (KXMLCore::PairHashTraits::assignDeletedValue): part of assignDeleted hack |
|
14848 (KXMLCore::DeletedValueAssigner::assignDeletedValue): Use template magic |
|
14849 to either use use deletedValue or assignDeletedValue for the cases where we care. |
|
14850 * kxmlcore/RefPtr.h: |
|
14851 (KXMLCore::RefPtr::swap): Added swap method. |
|
14852 (KXMLCore::swap): Added swap free function. |
|
14853 * kjs/identifier.cpp: |
|
14854 (KJS::CStringTranslator::hash): Use new HashTranslator class approach to |
|
14855 alternate type based insertion. |
|
14856 (KJS::CStringTranslator::equal): ditto |
|
14857 (KJS::CStringTranslator::translate): ditto |
|
14858 (KJS::Identifier::add): ditto |
|
14859 (KJS::UCharBufferTranslator::hash): ditto |
|
14860 (KJS::UCharBufferTranslator::equal): ditto |
|
14861 (KJS::UCharBufferTranslator::translate): ditto |
|
14862 |
|
14863 - irrelevant change: |
|
14864 |
|
14865 * kjs/array_object.cpp: |
|
14866 (ArrayProtoFunc::callAsFunction): Removed a stray space. |
|
14867 |
|
14868 2005-12-22 Anders Carlsson <andersca@mac.com> |
|
14869 |
|
14870 Reviewed by Eric and Darin. |
|
14871 |
|
14872 - fix http://bugs.webkit.org/show_bug.cgi?id=6196 |
|
14873 Would like to be able to define prototypes in headers |
|
14874 |
|
14875 * kjs/lookup.h: |
|
14876 Move ClassName from KJS_DECLARE_PROTOTYPE to KJS_IMPLEMENT_PROTOTYPE. |
|
14877 Also, namespace all macros by prefixing them with KJS_. |
|
14878 |
|
14879 2005-12-22 Darin Adler <darin@apple.com> |
|
14880 |
|
14881 Reviewed by Maciej. |
|
14882 |
|
14883 - fix http://bugs.webkit.org/show_bug.cgi?id=6191 |
|
14884 RefPtr/PassRefPtr have a leak issue, operator== issues |
|
14885 |
|
14886 * kxmlcore/PassRefPtr.h: |
|
14887 (KXMLCore::PassRefPtr::PassRefPtr): Remove non-template constructor that takes RefPtr |
|
14888 since the constructor template that takes RefPtr should be sufficient. Add a constructor |
|
14889 template that takes PassRefPtr&. |
|
14890 (KXMLCore::PassRefPtr::adopt): Use PassRefPtr_Ref to avoid setting pointer first to |
|
14891 0 and then to the pointer. |
|
14892 (KXMLCore::PassRefPtr::operator=): Added template versions that take PassRefPtr& and |
|
14893 RefPtr parameters. |
|
14894 (KXMLCore::PassRefPtr::operator PassRefPtr<U>): Changed to fix leak -- old version |
|
14895 would release and then ref. |
|
14896 (KXMLCore::operator==): Make templates have two parameters so you can mix types. |
|
14897 Also remove unneeded const in raw pointer versions. |
|
14898 (KXMLCore::operator!=): Ditto. |
|
14899 |
|
14900 * kxmlcore/RefPtr.h: |
|
14901 (KXMLCore::RefPtr::RefPtr): Add constructor template that takes PassRefPtr. |
|
14902 (KXMLCore::RefPtr::operator=): Add assignment operator templates that take |
|
14903 RefPtr and PassRefPtr. |
|
14904 (KXMLCore::operator==): Make templates have two parameters so you can mix types. |
|
14905 Also remove unneeded const in raw pointer versions. |
|
14906 (KXMLCore::operator!=): Ditto. |
|
14907 |
|
14908 2005-12-21 Timothy Hatcher <timothy@apple.com> |
|
14909 |
|
14910 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
14911 Set tab width to 8, indent width to 4 and uses tabs to false per file. |
|
14912 |
|
14913 2005-12-21 Geoffrey Garen <ggaren@apple.com> |
|
14914 |
|
14915 Reviewed by Darin. |
|
14916 |
|
14917 Removed evil hack for determining if a type is an integer, replaced |
|
14918 with template metaprogramming. |
|
14919 |
|
14920 * JavaScriptCore.xcodeproj/project.pbxproj: Set tab size to 2 for |
|
14921 testkjs.cpp |
|
14922 * kjs/testkjs.cpp: |
|
14923 (main): Inserted asserts to test IsInteger. FIXME: Move these to |
|
14924 KXMLCore unit tests directory when we create one. |
|
14925 * kxmlcore/HashTraits.h: |
|
14926 (KXMLCore::): Added IsInteger class for querying types. |
|
14927 |
|
14928 2005-12-20 Maciej Stachowiak <mjs@apple.com> |
|
14929 |
|
14930 Reviewed by Darin. |
|
14931 |
|
14932 - made ALWAYS_INLINE declare things inline as well as __attribute__((always_inline)) |
|
14933 http://bugs.webkit.org/show_bug.cgi?id=6159 |
|
14934 |
|
14935 * kxmlcore/AlwaysInline.h: |
|
14936 |
|
14937 2005-12-19 Maciej Stachowiak <mjs@apple.com> |
|
14938 |
|
14939 Reviewed by Darin. |
|
14940 |
|
14941 - fixed a leak in the assignment operator from PassRefPtr to RefPtr |
|
14942 http://bugs.webkit.org/show_bug.cgi?id=6158 |
|
14943 |
|
14944 * kxmlcore/RefPtr.h: |
|
14945 (KXMLCore::RefPtr::operator=): |
|
14946 |
|
14947 - fix problem with PassRefPtr that darin spotted - it lacked a copy constructor |
|
14948 and therefore was using the default one, which can lead to excess derefs |
|
14949 |
|
14950 I fixed this by adding a copy constructor from non-const |
|
14951 reference, and by adding a template pass() function that you have |
|
14952 to use when raw pointer or RefPtr are passed where PassRefPtr is |
|
14953 expected. |
|
14954 |
|
14955 * kjs/identifier.cpp: |
|
14956 (KJS::Identifier::add): Changed to have PassRefPtr return type and |
|
14957 pass() the results. |
|
14958 * kjs/identifier.h: |
|
14959 * kjs/property_map.cpp: |
|
14960 (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): Use pass() |
|
14961 where required. |
|
14962 * kjs/ustring.cpp: |
|
14963 (KJS::UString::UString): Use pass() as needed. |
|
14964 (KJS::UString::append): ditto |
|
14965 (KJS::UString::substr): ditto |
|
14966 * kjs/ustring.h: |
|
14967 (KJS::UString::UString): Use initializer instead of assignment |
|
14968 * kxmlcore/PassRefPtr.h: |
|
14969 (KXMLCore::PassRefPtr::PassRefPtr): Added copy constructor |
|
14970 (KXMLCore::pass): new template function to make it convenient to pass |
|
14971 a PassRefPtr |
|
14972 |
|
14973 2005-12-19 Geoffrey Garen <ggaren@apple.com> |
|
14974 |
|
14975 Reviewed by Maciej. |
|
14976 |
|
14977 Fixed <rdar://problem/4370397> Missing return statement in |
|
14978 JSMethodNameToObjcMethodName. |
|
14979 |
|
14980 JSMethodNameToObjcMethodName had a check for a name being too long, but |
|
14981 the check was missing a return statement. |
|
14982 |
|
14983 A lot of this code was confusing and some of it was wrong, so I fixed |
|
14984 it up, added some asserts to catch this type of bug in the future, |
|
14985 changed some comments, and renamed some variables. |
|
14986 |
|
14987 The two advantages of the new algorithm are (1) It makes writing past |
|
14988 the end of the buffer virtually impossible because the test on the main |
|
14989 loop is "while (not past end of buffer)" and (2) It's twice as fast |
|
14990 because it doesn't call strlen. (There's no need to call strlen when |
|
14991 we're walking the string ourselves.) |
|
14992 |
|
14993 methodsNamed also supports arbitrary-length method names now. Just in |
|
14994 case the AppKit folks start getting REALLY verbose... |
|
14995 |
|
14996 * bindings/objc/objc_class.mm: |
|
14997 (KJS::Bindings::ObjcClass::methodsNamed): |
|
14998 * bindings/objc/objc_utility.h: |
|
14999 * bindings/objc/objc_utility.mm: |
|
15000 (KJS::Bindings::JSMethodNameToObjcMethodName): |
|
15001 |
|
15002 2005-12-19 Darin Adler <darin@apple.com> |
|
15003 |
|
15004 Originally done by both George Staikos and Alexey Proskuryakov. |
|
15005 |
|
15006 - fix http://bugs.webkit.org/show_bug.cgi?id=5706 |
|
15007 Sharedptr dependency can be removed |
|
15008 |
|
15009 Our coding guidelines say "use 0 instead of NULL" and both RefPtr and |
|
15010 PassRefPtr were using NULL, which required including a header that |
|
15011 defines NULL. |
|
15012 |
|
15013 * kxmlcore/PassRefPtr.h: |
|
15014 (KXMLCore::PassRefPtr::PassRefPtr): Use 0 instead of NULL. |
|
15015 (KXMLCore::PassRefPtr::operator!): Use ! instead of == NULL. |
|
15016 * kxmlcore/RefPtr.h: |
|
15017 (KXMLCore::RefPtr::RefPtr): Use 0 instead of NULL. |
|
15018 (KXMLCore::RefPtr::operator!): Use ! instead of == NULL. |
|
15019 Also did some reformatting. |
|
15020 |
|
15021 2005-12-19 Darin Adler <darin@apple.com> |
|
15022 |
|
15023 Reviewed by Geoff Garen and Eric Seidel. |
|
15024 |
|
15025 - fix http://bugs.webkit.org/show_bug.cgi?id=4923 |
|
15026 stop using <ostream> in WebCore, eliminating the <cmath> troubles it causes |
|
15027 |
|
15028 * kjs/simple_number.h: Removed many unnecessary includes, including |
|
15029 the <cmath> one to work around GCC library header bugs. We may have to |
|
15030 add some includes elsewhere for platforms other than OS X, since our |
|
15031 prefix header takes care of some things. |
|
15032 |
|
15033 * kxmlcore/AlwaysInline.h: Added. Now clients that don't include |
|
15034 simple_number.h can still get the ALWAYS_INLINE macro. |
|
15035 * JavaScriptCore.xcodeproj/project.pbxproj: Added AlwaysInline.h. |
|
15036 |
|
15037 * bindings/NP_jsobject.h: Removed a lot of unnecessary includes |
|
15038 and removed C-specific stuff from this C++-only header. |
|
15039 * bindings/jni/jni_jsobject.h: Removed a lot of unnecessary includes |
|
15040 and did some reformatting. |
|
15041 * bindings/objc/objc_runtime.h: Removed an unnecessary include. |
|
15042 * bindings/runtime.h: Removed some unneeded includes. Reformatted. |
|
15043 * bindings/runtime.cpp: Updated to compile with header changes, |
|
15044 including a lot of reformatting. |
|
15045 * bindings/runtime_object.h: Removed an unnecessary include. |
|
15046 |
|
15047 2005-12-13 Maciej Stachowiak <mjs@apple.com> |
|
15048 |
|
15049 Reviewed by Geoff and Adele |
|
15050 |
|
15051 - replaced custom Identifier hashtable with HashSet |
|
15052 |
|
15053 * kjs/identifier.cpp: |
|
15054 (KXMLCore::): |
|
15055 (KJS::identifierTable): |
|
15056 (KJS::Identifier::equal): |
|
15057 (KJS::hash): |
|
15058 (KJS::equal): |
|
15059 (KJS::convert): |
|
15060 (KJS::Identifier::add): |
|
15061 (KJS::Identifier::remove): |
|
15062 * kjs/identifier.h: |
|
15063 * kjs/internal.cpp: |
|
15064 (KJS::InterpreterImp::initGlobalObject): |
|
15065 |
|
15066 2005-12-18 Justin Haygood <justin@xiondigital.net> |
|
15067 |
|
15068 Reviewed, tweaked, and landed by Darin. |
|
15069 |
|
15070 - fix http://bugs.webkit.org/show_bug.cgi?id=5227 |
|
15071 Array indexOf() extension for JavaScript 1.5 Core |
|
15072 |
|
15073 * kjs/array_object.h: |
|
15074 * kjs/array_object.cpp: (ArrayProtoFunc::callAsFunction): Added implementation of indexOf. |
|
15075 |
|
15076 2005-12-18 Anders Carlsson <andersca@mac.com> |
|
15077 |
|
15078 Reviewed by Darin and Geoffrey. |
|
15079 |
|
15080 - fix for <http://bugs.webkit.org/show_bug.cgi?id=4000> |
|
15081 Object.prototype is missing isPrototypeOf |
|
15082 |
|
15083 * kjs/object_object.cpp: |
|
15084 (ObjectPrototype::ObjectPrototype): |
|
15085 Add isPrototypeOf to object prototype. |
|
15086 |
|
15087 (ObjectProtoFunc::callAsFunction): |
|
15088 Implement isPrototypeOf |
|
15089 |
|
15090 * kjs/object_object.h: |
|
15091 (KJS::ObjectProtoFunc::): |
|
15092 Add id for isPrototypeOf. |
|
15093 |
|
15094 2005-12-17 Geoffrey Garen <ggaren@apple.com> |
|
15095 |
|
15096 Reviewed by Darin. |
|
15097 |
|
15098 Fixed http://bugs.webkit.org/show_bug.cgi?id=6119 |
|
15099 split() function ignores case insensitive modifier. |
|
15100 |
|
15101 Glossary: |
|
15102 RegExpImp: The C++ object you get when JavaScript executes |
|
15103 "new RegExp()". |
|
15104 RegExp: A C++ wrapper object that performs regular expression |
|
15105 matching on behalf of a RegExpImp. |
|
15106 |
|
15107 Instead of unnecessarily constructing a RegExp which (wrongly) lacks |
|
15108 any modifiers, String.split() now uses the RegExp built in to the |
|
15109 RegExpImp passed to it, which has the right modifiers already. |
|
15110 |
|
15111 I also cleaned up other bits of the string code to standardized how |
|
15112 we handle RegExpImp arguments. |
|
15113 |
|
15114 * ChangeLog: |
|
15115 * kjs/string_object.cpp: |
|
15116 (replace): |
|
15117 (StringProtoFunc::callAsFunction): |
|
15118 |
|
15119 2005-12-16 David Hyatt <hyatt@apple.com> |
|
15120 |
|
15121 Remove unused RefPtr constructors that can create an ambiguity in ustring on some platforms. |
|
15122 |
|
15123 Reviewed by mjs |
|
15124 |
|
15125 * kxmlcore/RefPtr.h: |
|
15126 (KXMLCore::RefPtr::RefPtr): |
|
15127 |
|
15128 2005-12-15 Darin Adler <darin@apple.com> |
|
15129 |
|
15130 Reviewed by Maciej. |
|
15131 |
|
15132 - fix http://bugs.webkit.org/show_bug.cgi?id=5688 |
|
15133 speed up JavaScript parsing by not creating a UString just to parse |
|
15134 |
|
15135 * kjs/internal.h: |
|
15136 * kjs/internal.cpp: (KJS::InterpreterImp::evaluate): Change to take a character pointer |
|
15137 and length rather than a UString. |
|
15138 |
|
15139 * kjs/interpreter.h: |
|
15140 * kjs/interpreter.cpp: (Interpreter::evaluate): Ditto. |
|
15141 |
|
15142 * kjs/protect.h: Remove uneeded "convert to bool" operator since we already have a |
|
15143 "convert to raw pointer" operator in this class. |
|
15144 |
|
15145 === Safari-521~5 === |
|
15146 |
|
15147 2005-12-13 Geoffrey Garen <ggaren@apple.com> |
|
15148 |
|
15149 Updated test results to match Anders's last fix. |
|
15150 |
|
15151 * tests/mozilla/expected.html: |
|
15152 |
|
15153 2005-12-13 Anders Carlsson <andersca@mac.com> |
|
15154 |
|
15155 * ChangeLog: Add titles for my bugzilla bugs. |
|
15156 |
|
15157 2005-12-13 Anders Carlsson <andersca@mac.com> |
|
15158 |
|
15159 Reviewed by Darin. |
|
15160 |
|
15161 - Fixes <http://bugs.webkit.org/show_bug.cgi?id=6041> |
|
15162 Support property getters and setters. |
|
15163 |
|
15164 * bindings/runtime_array.cpp: |
|
15165 (RuntimeArray::lengthGetter): |
|
15166 (RuntimeArray::indexGetter): |
|
15167 * bindings/runtime_array.h: |
|
15168 * bindings/runtime_method.cpp: |
|
15169 (RuntimeMethod::lengthGetter): |
|
15170 * bindings/runtime_method.h: |
|
15171 * bindings/runtime_object.cpp: |
|
15172 (RuntimeObjectImp::fallbackObjectGetter): |
|
15173 (RuntimeObjectImp::fieldGetter): |
|
15174 (RuntimeObjectImp::methodGetter): |
|
15175 * bindings/runtime_object.h: |
|
15176 * kjs/array_instance.h: |
|
15177 * kjs/array_object.cpp: |
|
15178 (ArrayInstance::lengthGetter): |
|
15179 (getProperty): |
|
15180 Update for changes to PropertySlot::getValue and |
|
15181 PropertySlot::GetValueFunc. |
|
15182 |
|
15183 * kjs/collector.cpp: |
|
15184 (KJS::className): |
|
15185 Handle GetterSetterType. |
|
15186 |
|
15187 * kjs/function.cpp: |
|
15188 (KJS::FunctionImp::argumentsGetter): |
|
15189 (KJS::FunctionImp::lengthGetter): |
|
15190 (KJS::Arguments::mappedIndexGetter): |
|
15191 (KJS::ActivationImp::argumentsGetter): |
|
15192 * kjs/function.h: |
|
15193 Update for changes to PropertySlot::getValue and |
|
15194 PropertySlot::GetValueFunc. |
|
15195 |
|
15196 * kjs/grammar.y: |
|
15197 Rework grammar parts for get set declarations directly |
|
15198 in the object literal. |
|
15199 |
|
15200 * kjs/internal.cpp: |
|
15201 (KJS::GetterSetterImp::mark): |
|
15202 (KJS::GetterSetterImp::toPrimitive): |
|
15203 (KJS::GetterSetterImp::toBoolean): |
|
15204 (KJS::GetterSetterImp::toNumber): |
|
15205 (KJS::GetterSetterImp::toString): |
|
15206 (KJS::GetterSetterImp::toObject): |
|
15207 Add type conversion functions. These aren't meant to be called. |
|
15208 |
|
15209 (KJS::printInfo): |
|
15210 Handle GetterSetterType. |
|
15211 |
|
15212 * kjs/lookup.h: |
|
15213 (KJS::staticFunctionGetter): |
|
15214 (KJS::staticValueGetter): |
|
15215 Update for changes to PropertySlot::GetValueFunc. |
|
15216 |
|
15217 * kjs/nodes.cpp: |
|
15218 Refactor they way properties nodes are implemented. |
|
15219 We now have a PropertyListNode which is a list of PropertyNodes. |
|
15220 Each PropertyNode has a name (which is a PropertyNameNode) and an associated |
|
15221 value node. PropertyNodes can be of different types. The Constant type is the |
|
15222 old constant declaration and the Getter and Setter types are for property getters |
|
15223 and setters. |
|
15224 (ResolveNode::evaluate): |
|
15225 Update for changes to PropertySlot::getValue. |
|
15226 |
|
15227 (PropertyListNode::evaluate): |
|
15228 Go through all property nodes and set them on the newly created object. If the |
|
15229 property nodes are of type Getter or Setter, define getters and setters. Otherwise, |
|
15230 just add the properties like before. |
|
15231 |
|
15232 (PropertyNode::evaluate): |
|
15233 This should never be called directly. |
|
15234 |
|
15235 (PropertyNameNode::evaluate): |
|
15236 Rename from PropertyNode::evaluate. |
|
15237 |
|
15238 (FunctionCallResolveNode::evaluate): |
|
15239 (FunctionCallBracketNode::evaluate): |
|
15240 (FunctionCallDotNode::evaluate): |
|
15241 (PostfixResolveNode::evaluate): |
|
15242 (PostfixBracketNode::evaluate): |
|
15243 (PostfixDotNode::evaluate): |
|
15244 (TypeOfResolveNode::evaluate): |
|
15245 (PrefixResolveNode::evaluate): |
|
15246 (PrefixBracketNode::evaluate): |
|
15247 (PrefixDotNode::evaluate): |
|
15248 (AssignResolveNode::evaluate): |
|
15249 (AssignDotNode::evaluate): |
|
15250 (AssignBracketNode::evaluate): |
|
15251 Update for changes to PropertySlot::getValue. |
|
15252 |
|
15253 * kjs/nodes.h: |
|
15254 (KJS::PropertyNameNode::PropertyNameNode): |
|
15255 Rename from PropertyNode. |
|
15256 |
|
15257 (KJS::PropertyNode::): |
|
15258 (KJS::PropertyNode::PropertyNode): |
|
15259 New class, representing a single property. |
|
15260 |
|
15261 (KJS::PropertyListNode::PropertyListNode): |
|
15262 Rename from PropertyValueNode. |
|
15263 |
|
15264 (KJS::FuncExprNode::FuncExprNode): |
|
15265 Put ParameterNode parameter last, and make it optional. |
|
15266 |
|
15267 (KJS::ObjectLiteralNode::ObjectLiteralNode): |
|
15268 Use a PropertyListNode here now. |
|
15269 |
|
15270 * kjs/nodes2string.cpp: |
|
15271 (PropertyListNode::streamTo): |
|
15272 Iterate through all property nodes. |
|
15273 |
|
15274 (PropertyNode::streamTo): |
|
15275 Print out the name and value. Doesn't handle getters and setters currently. |
|
15276 |
|
15277 (PropertyNameNode::streamTo): |
|
15278 Rename from PropertyNode::streamTo. |
|
15279 |
|
15280 * kjs/object.cpp: |
|
15281 (KJS::JSObject::get): |
|
15282 Update for changes to PropertySlot::getValue. |
|
15283 |
|
15284 (KJS::JSObject::put): |
|
15285 If the property already exists and has a Setter, invoke |
|
15286 the setter function instead of setting the property directly. |
|
15287 |
|
15288 (KJS::JSObject::defineGetter): |
|
15289 (KJS::JSObject::defineSetter): |
|
15290 New functions for defining property getters and setters on the object. |
|
15291 |
|
15292 * kjs/object.h: |
|
15293 (KJS::GetterSetterImp::type): |
|
15294 (KJS::GetterSetterImp::GetterSetterImp): |
|
15295 (KJS::GetterSetterImp::getGetter): |
|
15296 (KJS::GetterSetterImp::setGetter): |
|
15297 (KJS::GetterSetterImp::getSetter): |
|
15298 (KJS::GetterSetterImp::setSetter): |
|
15299 New class for properties which have getters and setters defined. |
|
15300 This class is only used internally and should never be seen from the outside. |
|
15301 |
|
15302 (KJS::JSObject::getOwnPropertySlot): |
|
15303 If the property is a getter, call setGetterSlot on the property slot. |
|
15304 |
|
15305 * kjs/object_object.cpp: |
|
15306 (ObjectPrototype::ObjectPrototype): |
|
15307 Add __defineGetter__, __defineSetter, __lookupGetter__, __lookupSetter__ |
|
15308 to prototype. |
|
15309 |
|
15310 (ObjectProtoFunc::callAsFunction): |
|
15311 Implement handlers for new functions. |
|
15312 |
|
15313 * kjs/object_object.h: |
|
15314 (KJS::ObjectProtoFunc::): |
|
15315 Add ids for new functions. |
|
15316 |
|
15317 * kjs/property_slot.cpp: |
|
15318 (KJS::PropertySlot::undefinedGetter): |
|
15319 Update for changes to PropertySlot::GetValueFunc. |
|
15320 |
|
15321 (KJS::PropertySlot::functionGetter): |
|
15322 Call the function getter object and return its value. |
|
15323 |
|
15324 * kjs/property_slot.h: |
|
15325 (KJS::PropertySlot::getValue): |
|
15326 Add a new argument which is the original object that |
|
15327 getPropertySlot was called on. |
|
15328 |
|
15329 (KJS::PropertySlot::setGetterSlot): |
|
15330 (KJS::PropertySlot::): |
|
15331 New function which sets a getter slot. When getValue is called on a |
|
15332 getter slot, the getter function object is invoked. |
|
15333 |
|
15334 * kjs/string_object.cpp: |
|
15335 (StringInstance::lengthGetter): |
|
15336 (StringInstance::indexGetter): |
|
15337 * kjs/string_object.h: |
|
15338 Update for changes to PropertySlot::GetValueFunc. |
|
15339 |
|
15340 * kjs/value.h: |
|
15341 (KJS::): |
|
15342 Add GetterSetterType and make GetterSetterImp a friend class of JSCell. |
|
15343 |
|
15344 2005-12-12 Maciej Stachowiak <mjs@apple.com> |
|
15345 |
|
15346 Reviewed by Eric. |
|
15347 |
|
15348 - added a new HashCountedSet class for the common pattern of mapping items to counts that can change |
|
15349 |
|
15350 * kxmlcore/HashCountedSet.h: Added. |
|
15351 (KXMLCore::HashCountedSet::*): Implemented, on top of HashMap. |
|
15352 * kxmlcore/HashMap.h: |
|
15353 (KXMLCore::HashMap::add): New method - does not replace existing value if key already present |
|
15354 but otherwise like set(). |
|
15355 (KXMLCore::HashMap::set): Improved comments. |
|
15356 * kxmlcore/HashMapPtrSpec.h: |
|
15357 (KXMLCore::HashMap::add): Added to specializations too. |
|
15358 * JavaScriptCore.xcodeproj/project.pbxproj: Add new file. |
|
15359 * kxmlcore/HashFunctions.h: Added include of stdint.h |
|
15360 |
|
15361 - replaced the custom hashtable for values protected from GC with HashCountedSet |
|
15362 |
|
15363 * kjs/collector.cpp: |
|
15364 (KJS::Collector::protect): Moved code here from ProtectedValues::increaseProtectCount |
|
15365 since the code is so simple now. |
|
15366 (KJS::Collector::unprotect): Ditto for ProtectedValues::decreaseProtectCount. |
|
15367 (KJS::Collector::markProtectedObjects): Updated for new way of doing things, now |
|
15368 simpler and safer. |
|
15369 (KJS::Collector::numReferencedObjects): ditto |
|
15370 (KJS::Collector::rootObjectClasses): ditto |
|
15371 * kjs/collector.h: Added protect and unprotect static methods |
|
15372 * kjs/protect.h: |
|
15373 (KJS::gcProtect): Updated for removal of ProtectedValues class |
|
15374 (KJS::gcUnprotect): likewise |
|
15375 * kjs/protected_values.cpp: Removed. |
|
15376 * kjs/protected_values.h: Removed. |
|
15377 |
|
15378 2005-12-10 Darin Adler <darin@apple.com> |
|
15379 |
|
15380 Rubber stamped by Maciej. |
|
15381 |
|
15382 - did long-promised KJS renaming: |
|
15383 |
|
15384 ValueImp -> JSValue |
|
15385 ObjectImp -> JSObject |
|
15386 AllocatedValueImp -> JSCell |
|
15387 |
|
15388 A renaming to get a class out of the way |
|
15389 |
|
15390 KJS::Bindings::JSObject -> JavaJSObject |
|
15391 |
|
15392 and some other "imp-reduction" renaming |
|
15393 |
|
15394 *InstanceImp -> *Instance |
|
15395 *ProtoFuncImp -> *ProtoFunc |
|
15396 *PrototypeImp -> *Prototype |
|
15397 ArgumentsImp -> Arguments |
|
15398 RuntimeArrayImp -> RuntimeArray |
|
15399 RuntimeMethodImp -> RuntimeMethod |
|
15400 |
|
15401 * most files and functions |
|
15402 |
|
15403 2005-12-10 Darin Adler <darin@apple.com> |
|
15404 |
|
15405 Reviewed by Maciej. |
|
15406 |
|
15407 - eliminated the old Undefined(), Null(), Boolean(), Number(), and String() |
|
15408 |
|
15409 Code now uses jsUndefined(), jsNull(), jsBoolean(), jsNumber(), and jsString(). |
|
15410 |
|
15411 * bindings/NP_jsobject.cpp: |
|
15412 (_NPN_Evaluate): |
|
15413 * bindings/c/c_instance.cpp: |
|
15414 (KJS::Bindings::CInstance::invokeMethod): |
|
15415 (KJS::Bindings::CInstance::invokeDefaultMethod): |
|
15416 * bindings/c/c_runtime.cpp: |
|
15417 (CField::valueFromInstance): |
|
15418 * bindings/c/c_utility.cpp: |
|
15419 (KJS::Bindings::convertNPVariantToValue): |
|
15420 * bindings/jni/jni_instance.cpp: |
|
15421 (JavaInstance::invokeMethod): |
|
15422 (JavaInstance::invokeDefaultMethod): |
|
15423 * bindings/jni/jni_jsobject.cpp: |
|
15424 (JSObject::eval): |
|
15425 (JSObject::convertJObjectToValue): |
|
15426 * bindings/jni/jni_runtime.cpp: |
|
15427 (JavaArray::convertJObjectToArray): |
|
15428 (JavaField::valueFromInstance): |
|
15429 (JavaArray::valueAt): |
|
15430 * bindings/objc/WebScriptObject.mm: |
|
15431 (-[WebScriptObject callWebScriptMethod:withArguments:]): |
|
15432 (-[WebScriptObject evaluateWebScript:]): |
|
15433 (-[WebScriptObject valueForKey:]): |
|
15434 (-[WebScriptObject webScriptValueAtIndex:]): |
|
15435 * bindings/objc/objc_instance.mm: |
|
15436 (ObjcInstance::invokeMethod): |
|
15437 (ObjcInstance::invokeDefaultMethod): |
|
15438 (ObjcInstance::getValueOfUndefinedField): |
|
15439 * bindings/objc/objc_runtime.mm: |
|
15440 (ObjcField::valueFromInstance): |
|
15441 (ObjcFallbackObjectImp::callAsFunction): |
|
15442 * bindings/objc/objc_utility.mm: |
|
15443 (KJS::Bindings::convertNSStringToString): |
|
15444 (KJS::Bindings::convertObjcValueToValue): |
|
15445 * bindings/runtime.h: |
|
15446 (KJS::Bindings::Class::fallbackObject): |
|
15447 (KJS::Bindings::Instance::getValueOfUndefinedField): |
|
15448 (KJS::Bindings::Instance::valueOf): |
|
15449 * bindings/runtime_array.cpp: |
|
15450 (RuntimeArrayImp::lengthGetter): |
|
15451 * bindings/runtime_method.cpp: |
|
15452 (RuntimeMethodImp::lengthGetter): |
|
15453 (RuntimeMethodImp::callAsFunction): |
|
15454 (RuntimeMethodImp::execute): |
|
15455 * kjs/array_object.cpp: |
|
15456 (ArrayInstanceImp::lengthGetter): |
|
15457 (CompareWithCompareFunctionArguments::CompareWithCompareFunctionArguments): |
|
15458 (ArrayPrototypeImp::ArrayPrototypeImp): |
|
15459 (ArrayProtoFuncImp::ArrayProtoFuncImp): |
|
15460 (ArrayProtoFuncImp::callAsFunction): |
|
15461 (ArrayObjectImp::ArrayObjectImp): |
|
15462 * kjs/bool_object.cpp: |
|
15463 (BooleanPrototypeImp::BooleanPrototypeImp): |
|
15464 (BooleanProtoFuncImp::callAsFunction): |
|
15465 (BooleanObjectImp::BooleanObjectImp): |
|
15466 (BooleanObjectImp::callAsFunction): |
|
15467 * kjs/error_object.cpp: |
|
15468 (ErrorPrototypeImp::ErrorPrototypeImp): |
|
15469 (ErrorProtoFuncImp::ErrorProtoFuncImp): |
|
15470 (ErrorProtoFuncImp::callAsFunction): |
|
15471 (ErrorObjectImp::ErrorObjectImp): |
|
15472 (NativeErrorImp::NativeErrorImp): |
|
15473 * kjs/function.cpp: |
|
15474 (KJS::FunctionImp::callAsFunction): |
|
15475 (KJS::FunctionImp::processParameters): |
|
15476 (KJS::FunctionImp::argumentsGetter): |
|
15477 (KJS::FunctionImp::lengthGetter): |
|
15478 (KJS::DeclaredFunctionImp::execute): |
|
15479 (KJS::encode): |
|
15480 (KJS::decode): |
|
15481 (KJS::GlobalFuncImp::callAsFunction): |
|
15482 * kjs/function_object.cpp: |
|
15483 (FunctionPrototypeImp::FunctionPrototypeImp): |
|
15484 (FunctionPrototypeImp::callAsFunction): |
|
15485 (FunctionProtoFuncImp::callAsFunction): |
|
15486 (FunctionObjectImp::FunctionObjectImp): |
|
15487 * kjs/internal.cpp: |
|
15488 (KJS::InterpreterImp::initGlobalObject): |
|
15489 * kjs/interpreter.h: |
|
15490 * kjs/lookup.h: |
|
15491 * kjs/math_object.cpp: |
|
15492 (MathObjectImp::getValueProperty): |
|
15493 (MathFuncImp::callAsFunction): |
|
15494 * kjs/nodes.cpp: |
|
15495 (Node::setExceptionDetailsIfNeeded): |
|
15496 (NullNode::evaluate): |
|
15497 (PropertyNode::evaluate): |
|
15498 (FunctionCallBracketNode::evaluate): |
|
15499 (FunctionCallDotNode::evaluate): |
|
15500 (PostfixBracketNode::evaluate): |
|
15501 (PostfixDotNode::evaluate): |
|
15502 (VoidNode::evaluate): |
|
15503 (PrefixBracketNode::evaluate): |
|
15504 (PrefixDotNode::evaluate): |
|
15505 (ShiftNode::evaluate): |
|
15506 (valueForReadModifyAssignment): |
|
15507 (AssignDotNode::evaluate): |
|
15508 (AssignBracketNode::evaluate): |
|
15509 (VarDeclNode::evaluate): |
|
15510 (VarDeclNode::processVarDecls): |
|
15511 (VarDeclListNode::evaluate): |
|
15512 (ReturnNode::execute): |
|
15513 (CaseClauseNode::evalStatements): |
|
15514 (ParameterNode::evaluate): |
|
15515 (FuncDeclNode::processFuncDecl): |
|
15516 * kjs/nodes.h: |
|
15517 (KJS::StatementNode::evaluate): |
|
15518 * kjs/number_object.cpp: |
|
15519 (NumberPrototypeImp::NumberPrototypeImp): |
|
15520 (NumberProtoFuncImp::callAsFunction): |
|
15521 (NumberObjectImp::NumberObjectImp): |
|
15522 (NumberObjectImp::getValueProperty): |
|
15523 (NumberObjectImp::callAsFunction): |
|
15524 * kjs/object.cpp: |
|
15525 (KJS::ObjectImp::get): |
|
15526 (KJS::Error::create): |
|
15527 * kjs/object_object.cpp: |
|
15528 (ObjectPrototypeImp::ObjectPrototypeImp): |
|
15529 (ObjectProtoFuncImp::callAsFunction): |
|
15530 (ObjectObjectImp::ObjectObjectImp): |
|
15531 * kjs/property_slot.cpp: |
|
15532 (KJS::PropertySlot::undefinedGetter): |
|
15533 * kjs/regexp_object.cpp: |
|
15534 (RegExpPrototypeImp::RegExpPrototypeImp): |
|
15535 (RegExpProtoFuncImp::callAsFunction): |
|
15536 (RegExpObjectImp::RegExpObjectImp): |
|
15537 (RegExpObjectImp::arrayOfMatches): |
|
15538 (RegExpObjectImp::getBackref): |
|
15539 (RegExpObjectImp::getLastMatch): |
|
15540 (RegExpObjectImp::getLastParen): |
|
15541 (RegExpObjectImp::getLeftContext): |
|
15542 (RegExpObjectImp::getRightContext): |
|
15543 (RegExpObjectImp::getValueProperty): |
|
15544 (RegExpObjectImp::construct): |
|
15545 * kjs/string_object.cpp: |
|
15546 (StringInstanceImp::StringInstanceImp): |
|
15547 (StringPrototypeImp::StringPrototypeImp): |
|
15548 (replace): |
|
15549 (StringProtoFuncImp::callAsFunction): |
|
15550 (StringObjectImp::StringObjectImp): |
|
15551 (StringObjectImp::callAsFunction): |
|
15552 (StringObjectFuncImp::StringObjectFuncImp): |
|
15553 (StringObjectFuncImp::callAsFunction): |
|
15554 * kjs/testkjs.cpp: |
|
15555 (TestFunctionImp::callAsFunction): |
|
15556 (VersionFunctionImp::callAsFunction): |
|
15557 * kjs/value.h: |
|
15558 |
|
15559 2005-12-10 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
|
15560 |
|
15561 Reviewed by Maciej, landed by Darin. |
|
15562 |
|
15563 - fix http://bugs.webkit.org/show_bug.cgi?id=3539 |
|
15564 Array join and toString methods do not support circular references |
|
15565 |
|
15566 * kjs/array_object.cpp: (ArrayProtoFuncImp::callAsFunction): |
|
15567 Added set of visited objects -- don't recurse if item is already in the set. |
|
15568 |
|
15569 2005-12-08 Maciej Stachowiak <mjs@apple.com> |
|
15570 |
|
15571 Reviewed by John. |
|
15572 |
|
15573 - fix major memory leak and resultant slowdown on JavaScript iBench from |
|
15574 my PassRefPtr changes |
|
15575 |
|
15576 * kjs/ustring.cpp: |
|
15577 (KJS::UString::Rep::create): I forgot to change one of the two overloads to create |
|
15578 with a refcount of 0 instead of 1 (the smart pointer then bumps it. But instead of |
|
15579 changing it, I changed both to start with a refcounter of 1 and use PassRefPtr::adopt |
|
15580 to adopt the initial refcount, this may be a hair more efficient. |
|
15581 |
|
15582 - made the assignment operators for smart pointers inline because Shark said so |
|
15583 |
|
15584 * kxmlcore/PassRefPtr.h: |
|
15585 (KXMLCore::::operator=): |
|
15586 * kxmlcore/RefPtr.h: |
|
15587 (KXMLCore::::operator=): |
|
15588 |
|
15589 2005-12-06 Anders Carlsson <andersca@mac.com> |
|
15590 |
|
15591 Reviewed by Darin. |
|
15592 |
|
15593 - fix build when using gcc 4 |
|
15594 |
|
15595 * kjs/ustring.h: |
|
15596 Make Rep public. |
|
15597 |
|
15598 * kxmlcore/PassRefPtr.h: |
|
15599 (KXMLCore::::operator): |
|
15600 Fix a typo. |
|
15601 |
|
15602 2005-12-05 Maciej Stachowiak <mjs@apple.com> |
|
15603 |
|
15604 Reviewed by Eric. |
|
15605 |
|
15606 - add PassRefPtr, a smart pointer class that works in conjunction |
|
15607 with RefPtr but has transfer-of-ownership semantics |
|
15608 - apply RefPtr and PassRefPtr to UString |
|
15609 - cleaned up UString a little so that it doesn't need to have so many friend classes |
|
15610 |
|
15611 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
15612 * kjs/identifier.cpp: |
|
15613 (KJS::Identifier::add): |
|
15614 * kjs/identifier.h: |
|
15615 (KJS::Identifier::Identifier): |
|
15616 (KJS::Identifier::equal): |
|
15617 * kjs/property_map.cpp: |
|
15618 (KJS::PropertyMap::get): |
|
15619 (KJS::PropertyMap::getLocation): |
|
15620 (KJS::PropertyMap::put): |
|
15621 (KJS::PropertyMap::remove): |
|
15622 * kjs/ustring.cpp: |
|
15623 (KJS::UCharReference::operator=): |
|
15624 (KJS::UCharReference::ref): |
|
15625 (KJS::UString::Rep::createCopying): |
|
15626 (KJS::UString::Rep::create): |
|
15627 (KJS::UString::usedCapacity): |
|
15628 (KJS::UString::usedPreCapacity): |
|
15629 (KJS::UString::expandCapacity): |
|
15630 (KJS::UString::expandPreCapacity): |
|
15631 (KJS::UString::UString): |
|
15632 (KJS::UString::spliceSubstringsWithSeparators): |
|
15633 (KJS::UString::append): |
|
15634 (KJS::UString::operator=): |
|
15635 (KJS::UString::toStrictUInt32): |
|
15636 (KJS::UString::substr): |
|
15637 (KJS::UString::copyForWriting): |
|
15638 (KJS::operator==): |
|
15639 * kjs/ustring.h: |
|
15640 (KJS::UString::UString): |
|
15641 (KJS::UString::~UString): |
|
15642 (KJS::UString::data): |
|
15643 (KJS::UString::isNull): |
|
15644 (KJS::UString::isEmpty): |
|
15645 (KJS::UString::size): |
|
15646 (KJS::UString::rep): |
|
15647 * kxmlcore/RefPtr.h: |
|
15648 (KXMLCore::RefPtr::RefPtr): |
|
15649 (KXMLCore::RefPtr::operator*): |
|
15650 (KXMLCore::::operator): |
|
15651 (KXMLCore::operator==): |
|
15652 (KXMLCore::operator!=): |
|
15653 (KXMLCore::static_pointer_cast): |
|
15654 (KXMLCore::const_pointer_cast): |
|
15655 |
|
15656 2005-12-04 Geoffrey Garen <ggaren@apple.com> |
|
15657 |
|
15658 Update test results to match Anders's last checkin. |
|
15659 |
|
15660 * tests/mozilla/expected.html: |
|
15661 |
|
15662 2005-12-04 Anders Carlsson <andersca@mac.com> |
|
15663 |
|
15664 Reviewed by Geoffrey. |
|
15665 |
|
15666 - Fixes <http://bugs.webkit.org/show_bug.cgi?id=3999> |
|
15667 Object.prototype is missing propertyIsEnumerable |
|
15668 |
|
15669 * kjs/object.cpp: |
|
15670 (KJS::ObjectImp::canPut): |
|
15671 Refactor to use getPropertyAttributes. |
|
15672 |
|
15673 (KJS::ObjectImp::propertyIsEnumerable): |
|
15674 New function which checks if a property is enumerable. |
|
15675 |
|
15676 (KJS::ObjectImp::getPropertyAttributes): |
|
15677 * kjs/object.h: |
|
15678 Add getPropertyAttributes and propertyIsEnumerable. |
|
15679 |
|
15680 * kjs/object_object.cpp: |
|
15681 (ObjectPrototypeImp::ObjectPrototypeImp): |
|
15682 (ObjectProtoFuncImp::callAsFunction): |
|
15683 * kjs/object_object.h: |
|
15684 (KJS::ObjectProtoFuncImp::): |
|
15685 Add propertyIsEnumerable to the Object prototype. |
|
15686 |
|
15687 2005-12-01 Maciej Stachowiak <mjs@apple.com> |
|
15688 |
|
15689 Reviewed by Tim Hatcher. |
|
15690 |
|
15691 - removed deprecated reset, isNull and nonNull methods |
|
15692 |
|
15693 * kxmlcore/RefPtr.h: |
|
15694 |
|
15695 2005-12-01 Anders Carlsson <andersca@mac.com> |
|
15696 |
|
15697 Reviewed by Darin. |
|
15698 |
|
15699 - Fixes <http://bugs.webkit.org/show_bug.cgi?id=3382> |
|
15700 nodes2strings.cpp fails to print left expression of ForInNode when 'var' is not used |
|
15701 |
|
15702 Patch by Mark Rowe. |
|
15703 |
|
15704 * kjs/nodes2string.cpp: |
|
15705 (ForInNode::streamTo): |
|
15706 Add lexpr if there's no varDecl. |
|
15707 |
|
15708 2005-12-01 Maciej Stachowiak <mjs@apple.com> |
|
15709 |
|
15710 Rubber stamped by Eric. |
|
15711 |
|
15712 - renamed SharedPtr to RefPtr via script |
|
15713 |
|
15714 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
15715 * kjs/function.cpp: |
|
15716 (KJS::GlobalFuncImp::callAsFunction): |
|
15717 * kjs/function.h: |
|
15718 * kjs/function_object.cpp: |
|
15719 (FunctionObjectImp::construct): |
|
15720 * kjs/internal.cpp: |
|
15721 (KJS::Parser::parse): |
|
15722 (KJS::InterpreterImp::checkSyntax): |
|
15723 (KJS::InterpreterImp::evaluate): |
|
15724 * kjs/internal.h: |
|
15725 * kjs/nodes.h: |
|
15726 * kjs/nodes2string.cpp: |
|
15727 (KJS::SourceStream::operator<<): |
|
15728 * kjs/protect.h: |
|
15729 * kxmlcore/RefPtr.h: Added. |
|
15730 (KXMLCore::RefPtr::RefPtr): |
|
15731 (KXMLCore::RefPtr::~RefPtr): |
|
15732 (KXMLCore::RefPtr::isNull): |
|
15733 (KXMLCore::RefPtr::notNull): |
|
15734 (KXMLCore::RefPtr::reset): |
|
15735 (KXMLCore::RefPtr::get): |
|
15736 (KXMLCore::RefPtr::operator*): |
|
15737 (KXMLCore::RefPtr::operator->): |
|
15738 (KXMLCore::RefPtr::operator!): |
|
15739 (KXMLCore::RefPtr::operator UnspecifiedBoolType): |
|
15740 (KXMLCore::::operator): |
|
15741 (KXMLCore::operator==): |
|
15742 (KXMLCore::operator!=): |
|
15743 (KXMLCore::static_pointer_cast): |
|
15744 (KXMLCore::const_pointer_cast): |
|
15745 * kxmlcore/SharedPtr.h: Removed. |
|
15746 |
|
15747 2005-11-30 Maciej Stachowiak <mjs@apple.com> |
|
15748 |
|
15749 Reviewed by Dave Hyatt. |
|
15750 |
|
15751 - change idiom used for implicit bool conversion of smart pointers, because the old one gives weird error messages sometimes |
|
15752 |
|
15753 * kjs/protect.h: |
|
15754 (KJS::ProtectedPtr::operator UnspecifiedBoolType): |
|
15755 * kxmlcore/SharedPtr.h: |
|
15756 (KXMLCore::SharedPtr::operator UnspecifiedBoolType): |
|
15757 |
|
15758 2005-11-29 Mitz Pettel <opendarwin.org@mitzpettel.com> |
|
15759 |
|
15760 Reviewed by ggaren. Committed by eseidel. |
|
15761 |
|
15762 Date conversion to local time gets the DST flag wrong sometimes |
|
15763 http://bugs.webkit.org/show_bug.cgi?id=5514 |
|
15764 |
|
15765 * kjs/date_object.cpp: |
|
15766 (KJS::isTime_tSigned): |
|
15767 (KJS::DateProtoFuncImp::callAsFunction): |
|
15768 |
|
15769 2005-11-26 Maciej Stachowiak <mjs@apple.com> |
|
15770 |
|
15771 Rubber stamped by Eric. |
|
15772 |
|
15773 - renamed InterpreterLock to JSLock |
|
15774 |
|
15775 * bindings/NP_jsobject.cpp: |
|
15776 (_NPN_Invoke): |
|
15777 (_NPN_Evaluate): |
|
15778 (_NPN_GetProperty): |
|
15779 (_NPN_SetProperty): |
|
15780 (_NPN_RemoveProperty): |
|
15781 (_NPN_HasProperty): |
|
15782 (_NPN_HasMethod): |
|
15783 (_NPN_SetException): |
|
15784 * bindings/jni/jni_jsobject.cpp: |
|
15785 (JSObject::call): |
|
15786 (JSObject::eval): |
|
15787 (JSObject::getMember): |
|
15788 (JSObject::setMember): |
|
15789 (JSObject::removeMember): |
|
15790 (JSObject::getSlot): |
|
15791 (JSObject::setSlot): |
|
15792 (JSObject::toString): |
|
15793 (JSObject::convertJObjectToValue): |
|
15794 * bindings/objc/WebScriptObject.mm: |
|
15795 (-[WebScriptObject callWebScriptMethod:withArguments:]): |
|
15796 (-[WebScriptObject evaluateWebScript:]): |
|
15797 (-[WebScriptObject setValue:forKey:]): |
|
15798 (-[WebScriptObject valueForKey:]): |
|
15799 (-[WebScriptObject removeWebScriptKey:]): |
|
15800 (-[WebScriptObject stringRepresentation]): |
|
15801 (-[WebScriptObject webScriptValueAtIndex:]): |
|
15802 (-[WebScriptObject setWebScriptValueAtIndex:value:]): |
|
15803 (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]): |
|
15804 * bindings/runtime.cpp: |
|
15805 (Instance::createRuntimeObject): |
|
15806 * bindings/runtime_root.cpp: |
|
15807 (KJS::Bindings::addNativeReference): |
|
15808 (KJS::Bindings::removeNativeReference): |
|
15809 (RootObject::removeAllNativeReferences): |
|
15810 * bindings/runtime_root.h: |
|
15811 (KJS::Bindings::RootObject::~RootObject): |
|
15812 (KJS::Bindings::RootObject::setRootObjectImp): |
|
15813 * bindings/testbindings.cpp: |
|
15814 (main): |
|
15815 * bindings/testbindings.mm: |
|
15816 (main): |
|
15817 * kjs/JSLock.cpp: |
|
15818 (KJS::initializeJSLock): |
|
15819 (KJS::JSLock::lock): |
|
15820 (KJS::JSLock::unlock): |
|
15821 (KJS::JSLock::lockCount): |
|
15822 (KJS::JSLock::DropAllLocks::DropAllLocks): |
|
15823 (KJS::JSLock::DropAllLocks::~DropAllLocks): |
|
15824 * kjs/JSLock.h: |
|
15825 (KJS::JSLock::JSLock): |
|
15826 (KJS::JSLock::~JSLock): |
|
15827 * kjs/collector.cpp: |
|
15828 (KJS::Collector::allocate): |
|
15829 (KJS::Collector::collect): |
|
15830 * kjs/internal.cpp: |
|
15831 (KJS::InterpreterImp::InterpreterImp): |
|
15832 (KJS::InterpreterImp::clear): |
|
15833 (KJS::InterpreterImp::checkSyntax): |
|
15834 (KJS::InterpreterImp::evaluate): |
|
15835 * kjs/interpreter.cpp: |
|
15836 (Interpreter::evaluate): |
|
15837 * kjs/protect.h: |
|
15838 (KJS::::ProtectedPtr): |
|
15839 (KJS::::~ProtectedPtr): |
|
15840 (KJS::::operator): |
|
15841 * kjs/protected_reference.h: |
|
15842 (KJS::ProtectedReference::ProtectedReference): |
|
15843 (KJS::ProtectedReference::~ProtectedReference): |
|
15844 (KJS::ProtectedReference::operator=): |
|
15845 * kjs/protected_values.cpp: |
|
15846 (KJS::ProtectedValues::getProtectCount): |
|
15847 (KJS::ProtectedValues::increaseProtectCount): |
|
15848 (KJS::ProtectedValues::decreaseProtectCount): |
|
15849 * kjs/testkjs.cpp: |
|
15850 (TestFunctionImp::callAsFunction): |
|
15851 (main): |
|
15852 |
|
15853 2005-11-26 Darin Adler <darin@apple.com> |
|
15854 |
|
15855 Reviewed by eseidel. Committed by eseidel. |
|
15856 |
|
15857 Inline ScopeChain functions for speed. |
|
15858 http://bugs.webkit.org/show_bug.cgi?id=5687 |
|
15859 |
|
15860 * kjs/object.h: |
|
15861 (KJS::ScopeChain::mark): |
|
15862 * kjs/scope_chain.cpp: |
|
15863 * kjs/scope_chain.h: |
|
15864 (KJS::ScopeChain::ref): |
|
15865 (KJS::ScopeChain::operator=): |
|
15866 (KJS::ScopeChain::bottom): |
|
15867 (KJS::ScopeChain::push): |
|
15868 (KJS::ScopeChain::pop): |
|
15869 |
|
15870 2005-11-21 Maciej Stachowiak <mjs@apple.com> |
|
15871 |
|
15872 Reviewed by Geoff. |
|
15873 |
|
15874 <rdar://problem/4139620> Seed: WebKit: hang when sending XMLHttpRequest if automatic proxy config is used |
|
15875 |
|
15876 Also factored locking code completely into a separate class, and |
|
15877 added a convenient packaged way to temporarily drop locks. |
|
15878 |
|
15879 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
15880 * kjs/JSLock.cpp: Added. |
|
15881 (KJS::initializeInterpreterLock): |
|
15882 (KJS::InterpreterLock::lock): |
|
15883 (KJS::InterpreterLock::unlock): |
|
15884 (KJS::InterpreterLock::lockCount): |
|
15885 (KJS::InterpreterLock::DropAllLocks::DropAllLocks): |
|
15886 (KJS::InterpreterLock::DropAllLocks::~DropAllLocks): |
|
15887 * kjs/JSLock.h: Added. |
|
15888 (KJS::InterpreterLock::InterpreterLock): |
|
15889 (KJS::InterpreterLock::~InterpreterLock): |
|
15890 * kjs/internal.cpp: |
|
15891 * kjs/internal.h: |
|
15892 * kjs/interpreter.cpp: |
|
15893 * kjs/interpreter.h: |
|
15894 * kjs/protect.h: |
|
15895 * kjs/testkjs.cpp: |
|
15896 (TestFunctionImp::callAsFunction): |
|
15897 |
|
15898 2005-11-21 Eric Seidel <eseidel@apple.com> |
|
15899 |
|
15900 Rubber-stamped by hyatt. |
|
15901 |
|
15902 Removed JavaScriptCore+SVG target. |
|
15903 |
|
15904 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
15905 |
|
15906 2005-11-15 Geoffrey Garen <ggaren@apple.com> |
|
15907 |
|
15908 Reviewed by mjs. |
|
15909 |
|
15910 - Fixed <rdar://problem/4342216> Installer crash in |
|
15911 KJS::ValueImp::marked() when garbage collector runs inside call to |
|
15912 ConstantValues::init() |
|
15913 |
|
15914 I took responsibility for initializing and marking ConstantValues away |
|
15915 from InterpreterImp, since it's possible to reference such a value |
|
15916 before any interpreter has been created and after the last interpreter |
|
15917 has been destroyed. |
|
15918 |
|
15919 InterpreterImp::lock now initializes ConstantValues. It's a good |
|
15920 place for the initialization because you have to call it before |
|
15921 creating any objects. Since ::lock can be called more than once, |
|
15922 I added a check in ConstantValues::init to ensure that it executes |
|
15923 only once. |
|
15924 |
|
15925 Collector:collect is now responsible for marking ConstantValues. |
|
15926 |
|
15927 We no longer clear the ConstantValues since we can't guarantee that no |
|
15928 one has a reference to them. |
|
15929 |
|
15930 FIXME: This is hackery. The long-term plan is to make ConstantValues |
|
15931 use immediate values that require no initialization. |
|
15932 |
|
15933 * ChangeLog: |
|
15934 * kjs/collector.cpp: |
|
15935 (KJS::Collector::collect): |
|
15936 * kjs/internal.cpp: |
|
15937 (KJS::InterpreterImp::InterpreterImp): |
|
15938 (KJS::InterpreterImp::lock): |
|
15939 (KJS::InterpreterImp::clear): |
|
15940 (KJS::InterpreterImp::mark): |
|
15941 * kjs/internal.h: |
|
15942 * kjs/value.cpp: |
|
15943 (KJS::ConstantValues::initIfNeeded): |
|
15944 * kjs/value.h: |
|
15945 |
|
15946 2005-11-08 Geoffrey Garen <ggaren@apple.com> |
|
15947 |
|
15948 Reviewed by Darin. |
|
15949 |
|
15950 This patch fixes some naughty naughty code -- 5 crashes and 2 |
|
15951 may-go-haywire-in-the-futures. |
|
15952 |
|
15953 One such crash is <rdar://problem/4247330> 8C46 Crash with with |
|
15954 incomplete parameter list to webScript object function. |
|
15955 |
|
15956 I replaced early returns from within NS_DURINGs with calls to |
|
15957 NS_VALUERETURN because the doc says, "You cannot use goto or |
|
15958 return to exit an exception handling domain -- errors will result." |
|
15959 |
|
15960 I replaced hard-coded analyses of -[NSMethodSignature |
|
15961 methodReturnType] with more abstracted alternatives, since |
|
15962 the documentation says "This encoding is implementation-specific, |
|
15963 so applications should use it with caution," and then emits an |
|
15964 evil cackle. |
|
15965 |
|
15966 I removed the early return in the case where a JavaScript caller |
|
15967 supplies an insufficient number of arguments, because the right |
|
15968 thing to do in such a case is to use JavaScript's defined behavior |
|
15969 of supplying "undefined" for any missing arguments. |
|
15970 |
|
15971 I also changed ObjcInstance::invokeMethod so that it no longer |
|
15972 deletes the method passed to it. It doesn't create the method, |
|
15973 so it shouldn't delete it. A friend of mine named |
|
15974 KERNEL_PROTECTION_FAILURE agrees with me on this point. |
|
15975 |
|
15976 Finally, I changed an assert(true) to assert(false) because |
|
15977 all the other asserts were making fun of it. |
|
15978 |
|
15979 * bindings/objc/objc_instance.mm: |
|
15980 (ObjcInstance::invokeMethod): |
|
15981 (ObjcInstance::invokeDefaultMethod): |
|
15982 |
|
15983 2005-11-06 Geoffrey Garen <ggaren@apple.com> |
|
15984 |
|
15985 Reviewed by Darin. |
|
15986 |
|
15987 - Fixed http://bugs.webkit.org/show_bug.cgi?id=5571 |
|
15988 REGRESSION (412.5-TOT): duplicated words/sentences at |
|
15989 shakespeer.sourceforge.net |
|
15990 |
|
15991 Our UTF16-modified PCRE didn't work with extended character classes |
|
15992 (classes involving characters > 255) because it used the GETCHARINC |
|
15993 macro to read through them. In UTF16 mode, GETCHARINC expects UTF16 |
|
15994 input, but PCRE encodes character classes in UTF8 regardless of the |
|
15995 input mode of the subject string. |
|
15996 |
|
15997 The fix is to explicitly define GETUTF8CHARINC, and to use it, |
|
15998 rather than GETCHARINC, when reading extended character classes. |
|
15999 |
|
16000 In UTF8 mode, we simply define GETCHARINC to be GETUTF8CHARINC. |
|
16001 |
|
16002 * pcre/pcre_internal.h: |
|
16003 * pcre/pcre_xclass.c: |
|
16004 (_pcre_xclass): |
|
16005 |
|
16006 2005-11-05 Geoffrey Garen <ggaren@apple.com> |
|
16007 |
|
16008 Patch by Mitz Pettel, reviewed by Maciej. |
|
16009 |
|
16010 - Fixed http://bugs.webkit.org/show_bug.cgi?id=5357 |
|
16011 REGRESSION: Scriptable plugin hides properties of OBJECT element |
|
16012 |
|
16013 * bindings/objc/objc_class.mm: |
|
16014 (KJS::Bindings::ObjcClass::fallbackObject): |
|
16015 |
|
16016 2005-11-05 Geoffrey Garen <ggaren@apple.com> |
|
16017 |
|
16018 Reviewed by Darin. |
|
16019 |
|
16020 - Fixed http://bugs.webkit.org/show_bug.cgi?id=5409 |
|
16021 slice() testcase doesn't pass |
|
16022 |
|
16023 Modified String.slice to deal with funky values. |
|
16024 Updated test results. We now pass <js1_2/String/slice.js>. |
|
16025 |
|
16026 * kjs/string_object.cpp: |
|
16027 (StringProtoFuncImp::callAsFunction): |
|
16028 * tests/mozilla/expected.html: |
|
16029 |
|
16030 2005-11-04 Darin Adler <darin@apple.com> |
|
16031 |
|
16032 Reviewed by Tim Hatcher. |
|
16033 |
|
16034 * kxmlcore/HashSet.h: Fixed case of "hashfunctions.h" -- needs to be "HashFunctions.h". |
|
16035 |
|
16036 2005-11-03 Timothy Hatcher <timothy@apple.com> |
|
16037 |
|
16038 Reviewed by Darin and Vicki. |
|
16039 |
|
16040 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
16041 Change to use $(SYSTEM_LIBRARY_DIR) consistently and place |
|
16042 $(NEXT_ROOT) in a few spots to make build-root work. |
|
16043 |
|
16044 2005-11-03 Geoffrey Garen <ggaren@apple.com> |
|
16045 |
|
16046 - Updated JavaScriptCore test results to reflect recent fixes. |
|
16047 |
|
16048 * tests/mozilla/expected.html: |
|
16049 |
|
16050 2005-11-03 Geoffrey Garen <ggaren@apple.com> |
|
16051 |
|
16052 Reviewed by darin. |
|
16053 |
|
16054 - Fixed http://bugs.webkit.org/show_bug.cgi?id=5602 |
|
16055 REGRESSION: RegExp("[^\\s$]+", "g") returns extra matches |
|
16056 |
|
16057 We now update lastIndex relative to the start of the last match, |
|
16058 rather than the start of the last search. We used to assume that |
|
16059 the two were equal, but that is not the case when a pattern |
|
16060 matches at a character after the first in the string. |
|
16061 |
|
16062 * kjs/regexp_object.cpp: |
|
16063 (RegExpProtoFuncImp::callAsFunction): |
|
16064 |
|
16065 2005-10-24 John Sullivan <sullivan@apple.com> |
|
16066 |
|
16067 Reviewed by Darin Adler. Code changes by Alexey Proskuryakov. |
|
16068 |
|
16069 - fixed http://bugs.webkit.org/show_bug.cgi?id=4931 |
|
16070 Unicode format characters (Cf) should be removed from JavaScript source |
|
16071 |
|
16072 * kjs/lexer.cpp: |
|
16073 include <unicode/uchar.h> |
|
16074 (Lexer::Lexer): |
|
16075 use KJS::UChar instead of UChar to avoid ambiguity caused by new include |
|
16076 (Lexer::setCode): |
|
16077 ditto; also, use shift(4) to skip first 4 chars to take advantage of new |
|
16078 logic there. |
|
16079 (Lexer::shift): |
|
16080 skip chars of type U_FORMAT_CHAR |
|
16081 (Lexer::convertUnicode): |
|
16082 use KJS::UChar instead of UChar to avoid ambiguity caused by new include |
|
16083 (Lexer::record16): |
|
16084 ditto |
|
16085 (Lexer::makeIdentifier): |
|
16086 ditto |
|
16087 (Lexer::makeUString): |
|
16088 ditto |
|
16089 |
|
16090 * tests/mozilla/ecma/Array/15.4.5.1-1.js: |
|
16091 updated to skip soft hyphens |
|
16092 |
|
16093 2005-10-24 John Sullivan <sullivan@apple.com> |
|
16094 |
|
16095 Reviewed by Darin Adler. Code changes by George Staikos/Geoff Garen. |
|
16096 |
|
16097 - fixed http://bugs.webkit.org/show_bug.cgi?id=4142 |
|
16098 Date object does not always adjust daylight savings correctly |
|
16099 |
|
16100 * kjs/date_object.cpp: |
|
16101 (KJS::makeTime): |
|
16102 Fix the case where a time change crosses the daylight savings start/end dates. |
|
16103 |
|
16104 2005-10-17 Maciej Stachowiak <mjs@apple.com> |
|
16105 |
|
16106 Reviewed by Geoff. Code changes by Darin. |
|
16107 |
|
16108 - some micro-optimizations to FastMalloc to reduce math and branches. |
|
16109 |
|
16110 * kxmlcore/FastMalloc.cpp: |
|
16111 (KXMLCore::TCMalloc_Central_FreeList::Populate): |
|
16112 (KXMLCore::fastMallocRegisterThread): |
|
16113 (KXMLCore::TCMalloc_ThreadCache::GetCache): |
|
16114 (KXMLCore::TCMalloc_ThreadCache::GetCacheIfPresent): |
|
16115 |
|
16116 2005-10-15 Maciej Stachowiak <mjs@apple.com> |
|
16117 |
|
16118 Reverted fix for this bug, because it was part of a time range that caused a performance |
|
16119 regression: |
|
16120 |
|
16121 <rdar://problem/4260481> Remove Reference type from JavaScriptCore |
|
16122 |
|
16123 2005-10-15 Darin Adler <darin@apple.com> |
|
16124 |
|
16125 * kxmlcore/HashTable.cpp: Fixed build failure (said hashtable.h instead of HashTable.h). |
|
16126 |
|
16127 2005-10-14 Geoffrey Garen <ggaren@apple.com> |
|
16128 |
|
16129 Style changes recommended by Darin. |
|
16130 |
|
16131 Changed to camelCase, changed ValueImp* to ValueImp *. |
|
16132 |
|
16133 * kjs/simple_number.h: |
|
16134 (KJS::SimpleNumber::make): |
|
16135 (KJS::SimpleNumber::value): |
|
16136 |
|
16137 2005-10-11 Geoffrey Garen <ggaren@apple.com> |
|
16138 |
|
16139 Added regexp_object.lut.h build phase from JavaScriptCore |
|
16140 to JavaScriptCore+SVG. |
|
16141 |
|
16142 Reviewed by mitz. |
|
16143 |
|
16144 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
16145 |
|
16146 2005-10-11 Geoffrey Garen <ggaren@apple.com> |
|
16147 |
|
16148 Fixed build bustage from last checkin (stray characters |
|
16149 in the project file). |
|
16150 |
|
16151 Reviewed by mitz. |
|
16152 |
|
16153 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
16154 |
|
16155 2005-10-11 Geoffrey Garen <ggaren@apple.com> |
|
16156 |
|
16157 New JavaScriptCore test results to reflect the last change. |
|
16158 |
|
16159 * tests/mozilla/expected.html: |
|
16160 |
|
16161 2005-10-10 Geoffrey Garen <ggaren@apple.com> |
|
16162 |
|
16163 - Implemented caching of match state inside the global RegExp object |
|
16164 (lastParen, leftContext, rightContext, lastMatch, input). |
|
16165 |
|
16166 exec(), test(), match(), search(), and replace() now dipatch regular |
|
16167 expression matching through the RegExp object's performMatch function, |
|
16168 to facilitate caching. This replaces registerRegexp and |
|
16169 setSubPatterns. |
|
16170 |
|
16171 - Implemented the special '$' aliases (e.g. RegExp.input aliases to |
|
16172 RegExp.$_). |
|
16173 |
|
16174 - Moved support for backreferences into the new static hash table |
|
16175 used for other special RegExp properties. Truncated backreferences |
|
16176 at $9 to match IE, FF, and the "What's New in Netscape 1.2?" doc. |
|
16177 (String.replace still supports double-digit backreferences.) |
|
16178 |
|
16179 - Tweaked RegExp.prototype.exec to handle ginormous values in lastIndex. |
|
16180 |
|
16181 Fixes 11 -- count em, 11 -- JavaScriptCore tests. |
|
16182 |
|
16183 * fast/js/regexp-caching-expected.txt: Added. |
|
16184 * fast/js/regexp-caching.html: Added. |
|
16185 |
|
16186 Reviewed by mjs. |
|
16187 |
|
16188 * JavaScriptCore.xcodeproj/project.pbxproj: Added regexp_object.lut.h |
|
16189 * kjs/create_hash_table: Tweaked to allow for more exotic characters. |
|
16190 We now rely on the compiler to catch illegal |
|
16191 identifiers. |
|
16192 * kjs/regexp.cpp: |
|
16193 (KJS::RegExp::RegExp): |
|
16194 * kjs/regexp_object.cpp: |
|
16195 (RegExpProtoFuncImp::callAsFunction): |
|
16196 (RegExpObjectImp::RegExpObjectImp): |
|
16197 (RegExpObjectImp::performMatch): |
|
16198 (RegExpObjectImp::arrayOfMatches): |
|
16199 (RegExpObjectImp::backrefGetter): |
|
16200 (RegExpObjectImp::getLastMatch): |
|
16201 (RegExpObjectImp::getLastParen): |
|
16202 (RegExpObjectImp::getLeftContext): |
|
16203 (RegExpObjectImp::getRightContext): |
|
16204 (RegExpObjectImp::getOwnPropertySlot): |
|
16205 (RegExpObjectImp::getValueProperty): |
|
16206 (RegExpObjectImp::put): |
|
16207 (RegExpObjectImp::putValueProperty): |
|
16208 * kjs/regexp_object.h: |
|
16209 (KJS::RegExpObjectImp::): |
|
16210 * kjs/string_object.cpp: |
|
16211 (substituteBackreferences): |
|
16212 (replace): |
|
16213 (StringProtoFuncImp::callAsFunction): |
|
16214 |
|
16215 2005-10-09 Darin Adler <darin@apple.com> |
|
16216 |
|
16217 Reviewed by Maciej; some changes done after review. |
|
16218 |
|
16219 - fixed <rdar://problem/4092064> hanging loading page; rte.ie (works in IE and Firefox) |
|
16220 - fixed http://bugs.webkit.org/show_bug.cgi?id=5280 |
|
16221 Date.setMonth fails with negative values |
|
16222 - fixed http://bugs.webkit.org/show_bug.cgi?id=5154 |
|
16223 JSC should switch to _r variants of unix time/date functions |
|
16224 - fixed a few possible overflow cases |
|
16225 |
|
16226 Retested all tests to be sure nothing broke; added layout test for bug 5280. |
|
16227 |
|
16228 * kjs/config.h: Removed TIME_WITH_SYS_TIME define. Also set HAVE_SYS_TIMEB_H |
|
16229 for the __APPLE__ case (the latter is accurate but irrelevant). |
|
16230 |
|
16231 * kjs/date_object.h: Reformatted. Removed unnecessary include of "function_object.h". |
|
16232 Moved declarations of helper classes and functions into the cpp file. |
|
16233 |
|
16234 * kjs/date_object.cpp: Removed code at top to define macros to use CoreFoundation instead of |
|
16235 POSIX date functions. |
|
16236 (KJS::styleFromArgString): Tweaked to return early instead of using a variable. |
|
16237 (KJS::formatLocaleDate): Tweaked to check for undefined rather than checking argument count. |
|
16238 (KJS::formatDate): Made parameter const. |
|
16239 (KJS::formatDateUTCVariant): Ditto. |
|
16240 (KJS::formatTime): Ditto. |
|
16241 (KJS::DateProtoFuncImp::callAsFunction): Use gmtime_r and localtime_r instead of gmtime and |
|
16242 localtime. |
|
16243 (KJS::DateObjectImp::callAsFunction): Use localtime_r instead of localtime. |
|
16244 (KJS::ymdhmsToSeconds): Renamed from ymdhms_to_seconds. Changed computation to avoid possible |
|
16245 overflow if year is an extremely large or small number. |
|
16246 (KJS::makeTime): Removed code to move large month numbers from tm_mon to tm_year; this was |
|
16247 to accomodate CFGregorianDate, which is no longer used (and didn't handle negative values). |
|
16248 (KJS::parseDate): Renamed from KRFCDate_parseDate; changed to return a value in milliseconds |
|
16249 rather than in seconds. Reformatted the code. Changed to use UTF8String() instead of ascii(), |
|
16250 since ascii() is not thread safe. Changed some variables back from int to long to avoid |
|
16251 trouble if the result of strtol does not fit in an int (64-bit issue only). |
|
16252 |
|
16253 2005-10-08 Mitz Pettel <opendarwin.org@mitzpettel.com> |
|
16254 |
|
16255 Reviewed by Geoff. |
|
16256 Tweaked and landed by Darin. |
|
16257 |
|
16258 - fixed http://bugs.webkit.org/show_bug.cgi?id=5266 |
|
16259 Support parenthesized comments in Date.parse() |
|
16260 |
|
16261 * kjs/date_object.cpp: |
|
16262 (KJS::skipSpacesAndComments): Take a pointer, and advance it past spaces, |
|
16263 and also past anything enclosed in parentheses. |
|
16264 (KJS::KRFCDate_parseDate): Use skipSpacesAndComments wherever we formerly had |
|
16265 code to skip spaces. |
|
16266 |
|
16267 2005-10-08 Justin Haygood <justin@xiondigital.net> |
|
16268 |
|
16269 Reviewed, tweaked, and landed by Darin. |
|
16270 |
|
16271 - fixed http://bugs.webkit.org/show_bug.cgi?id=5189 |
|
16272 pcre_exec.c fails to compile using MSVC |
|
16273 - fixed http://bugs.webkit.org/show_bug.cgi?id=5190 |
|
16274 KJS config.h adjustment for Win32 |
|
16275 |
|
16276 * kjs/config.h: Make sure HAVE_MMAP and HAVE_SBRK are off for Win32. |
|
16277 Turn HAVE_ERRNO_H on for Mac OS X. Sort defines so they are easy to compare |
|
16278 with each other. Remove #undef of DEBUG_COLLECTOR. |
|
16279 * pcre/pcre_exec.c: (match): Work around strange MSVC complaint by splitting |
|
16280 the definition of a local variable into a separate declaration and |
|
16281 initialization. |
|
16282 |
|
16283 2005-10-05 Geoffrey Garen <ggaren@apple.com> |
|
16284 |
|
16285 - Darin and I rewrote our implementation of the SimpleNumber class |
|
16286 to store number bit patterns in their floating point formats. |
|
16287 |
|
16288 My tweaks reviewed by Darin. |
|
16289 |
|
16290 ~1% speedup on JS iBench. |
|
16291 |
|
16292 * kjs/internal.h: removed obsolete jsNumber declarations. |
|
16293 * kjs/math_object.cpp: |
|
16294 (MathFuncImp::callAsFunction): changed KJS::isNaN to isNaN |
|
16295 * kjs/nodes.cpp: |
|
16296 (PostfixResolveNode::evaluate): removed obsolete knownToBeInteger |
|
16297 (PostfixBracketNode::evaluate): ditto |
|
16298 (PostfixDotNode::evaluate): ditto |
|
16299 (PrefixResolveNode::evaluate): ditto |
|
16300 (PrefixBracketNode::evaluate): ditto |
|
16301 (PrefixDotNode::evaluate): ditto |
|
16302 (NegateNode::evaluate): ditto |
|
16303 (valueForReadModifyAssignment): ditto |
|
16304 * kjs/number_object.cpp: removed obsolete comment |
|
16305 * kjs/operations.cpp: |
|
16306 (KJS::equal): removed unnecessary isNaN checks |
|
16307 (KJS::strictEqual): ditto |
|
16308 (KJS::add): removed obsolete knownToBeInteger |
|
16309 (KJS::mult): ditto |
|
16310 * kjs/operations.h: removed include of "value.h" to prevent circular reference |
|
16311 * kjs/simple_number.h: removed unnecessary #includes |
|
16312 (KJS::SimpleNumber::make): see above |
|
16313 (KJS::SimpleNumber::is): ditto |
|
16314 (KJS::SimpleNumber::value): ditto |
|
16315 * kjs/string_object.cpp: |
|
16316 (StringProtoFuncImp::callAsFunction): changed KJS::isNaN to isNaN |
|
16317 * kjs/ustring.cpp: removed unnecessary isNaN check |
|
16318 (KJS::UString::toUInt32): ditto |
|
16319 * kjs/value.cpp: |
|
16320 (KJS::jsNumber): removed obsolete jsNumber definitions |
|
16321 (KJS::ConstantValues::init): NaN is no longer a ConstantValue |
|
16322 (KJS::ConstantValues::clear): ditto |
|
16323 (KJS::ConstantValues::mark): ditto |
|
16324 * kjs/value.h: removed obsolete knownToBeInteger |
|
16325 (KJS::jsNaN): now returns a SimpleNumber |
|
16326 (KJS::ValueImp::getUInt32): changed to account for NaN being a SimpleNumber |
|
16327 (KJS::ValueImp::toBoolean): ditto |
|
16328 (KJS::ValueImp::toString): changed to account for +/- 0.0 |
|
16329 (KJS::jsZero): changed to reflect that SimpleNumber::make takes a double |
|
16330 (KJS::jsOne): ditto |
|
16331 (KJS::jsTwo): ditto |
|
16332 (KJS::Number): removed obsolete non-double constructor declarations |
|
16333 |
|
16334 2005-10-05 Maciej Stachowiak <mjs@apple.com> |
|
16335 |
|
16336 Reviewed by Eric. |
|
16337 |
|
16338 - fixed <rdar://problem/4260481> Remove Reference type from JavaScriptCore |
|
16339 |
|
16340 Also fixed some bugs with for..in enumeration while I was at it. object |
|
16341 properties now come before prototype properties and duplicates |
|
16342 between object and prototype are listed only once. |
|
16343 |
|
16344 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
16345 * kjs/IdentifierSequencedSet.cpp: Added. |
|
16346 (KJS::IdentifierSequencedSet::IdentifierSequencedSet): |
|
16347 (KJS::IdentifierSequencedSet::deallocateVector): |
|
16348 (KJS::IdentifierSequencedSet::~IdentifierSequencedSet): |
|
16349 (KJS::IdentifierSequencedSet::insert): |
|
16350 * kjs/IdentifierSequencedSet.h: Added. |
|
16351 (KJS::IdentifierSequencedSetIterator::IdentifierSequencedSetIterator): |
|
16352 (KJS::IdentifierSequencedSetIterator::operator*): |
|
16353 (KJS::IdentifierSequencedSetIterator::operator->): |
|
16354 (KJS::IdentifierSequencedSetIterator::operator++): |
|
16355 (KJS::IdentifierSequencedSetIterator::operator==): |
|
16356 (KJS::IdentifierSequencedSetIterator::operator!=): |
|
16357 (KJS::IdentifierSequencedSet::begin): |
|
16358 (KJS::IdentifierSequencedSet::end): |
|
16359 (KJS::IdentifierSequencedSet::size): |
|
16360 * kjs/array_instance.h: |
|
16361 * kjs/array_object.cpp: |
|
16362 (ArrayInstanceImp::getPropertyNames): |
|
16363 (ArrayInstanceImp::setLength): |
|
16364 (ArrayInstanceImp::pushUndefinedObjectsToEnd): |
|
16365 * kjs/nodes.cpp: |
|
16366 (ForInNode::execute): |
|
16367 * kjs/nodes.h: |
|
16368 * kjs/object.cpp: |
|
16369 (KJS::ObjectImp::getPropertyNames): |
|
16370 * kjs/object.h: |
|
16371 * kjs/property_map.cpp: |
|
16372 (KJS::PropertyMap::getEnumerablePropertyNames): |
|
16373 (KJS::PropertyMap::getSparseArrayPropertyNames): |
|
16374 * kjs/property_map.h: |
|
16375 * kjs/protect.h: |
|
16376 * kjs/protected_reference.h: Removed. |
|
16377 * kjs/reference.cpp: Removed. |
|
16378 * kjs/reference.h: Removed. |
|
16379 * kjs/reference_list.cpp: Removed. |
|
16380 * kjs/reference_list.h: Removed. |
|
16381 * kjs/ustring.h: |
|
16382 (KJS::UString::impl): |
|
16383 * kxmlcore/HashSet.h: |
|
16384 |
|
16385 2005-10-04 Eric Seidel <eseidel@apple.com> |
|
16386 |
|
16387 Reviewed by mjs. |
|
16388 |
|
16389 Code cleanup, which resulted in a small win on iBench. |
|
16390 |
|
16391 * kjs/object.cpp: |
|
16392 (KJS::tryGetAndCallProperty): new static inline |
|
16393 (KJS::ObjectImp::defaultValue): code cleanup |
|
16394 |
|
16395 2005-10-03 Maciej Stachowiak <mjs@apple.com> |
|
16396 |
|
16397 Patch from George Staikos <staikos@kde.org>, reviewed and tweaked a bit by me. |
|
16398 |
|
16399 - more Linux build fixes |
|
16400 |
|
16401 * kjs/operations.cpp: |
|
16402 * kxmlcore/FastMalloc.h: |
|
16403 * kxmlcore/TCSystemAlloc.cpp: |
|
16404 (TCMalloc_SystemAlloc): |
|
16405 |
|
16406 2005-10-03 Maciej Stachowiak <mjs@apple.com> |
|
16407 |
|
16408 Patch from George Staikos <staikos@kde.org>, reviewed and tweaked a bit by me. |
|
16409 |
|
16410 http://bugs.webkit.org/show_bug.cgi?id=5174 |
|
16411 Add support for compiling on Linux (likely to help for other POSIX systems too) |
|
16412 |
|
16413 * kjs/collector.cpp: |
|
16414 (KJS::Collector::markCurrentThreadConservatively): |
|
16415 (KJS::Collector::markOtherThreadConservatively): |
|
16416 * kjs/config.h: |
|
16417 * kjs/date_object.cpp: |
|
16418 (KJS::formatDate): |
|
16419 (KJS::formatDateUTCVariant): |
|
16420 (KJS::formatTime): |
|
16421 (KJS::timeZoneOffset): |
|
16422 (KJS::DateProtoFuncImp::callAsFunction): |
|
16423 (KJS::DateObjectImp::construct): |
|
16424 (KJS::DateObjectImp::callAsFunction): |
|
16425 (KJS::makeTime): |
|
16426 * kjs/identifier.cpp: |
|
16427 * kjs/internal.cpp: |
|
16428 (KJS::initializeInterpreterLock): |
|
16429 (KJS::lockInterpreter): |
|
16430 (KJS::unlockInterpreter): |
|
16431 (KJS::UndefinedImp::toPrimitive): |
|
16432 (KJS::UndefinedImp::toBoolean): |
|
16433 (KJS::UndefinedImp::toNumber): |
|
16434 (KJS::UndefinedImp::toString): |
|
16435 (KJS::NullImp::toPrimitive): |
|
16436 (KJS::NullImp::toBoolean): |
|
16437 (KJS::NullImp::toNumber): |
|
16438 (KJS::NullImp::toString): |
|
16439 (KJS::BooleanImp::toPrimitive): |
|
16440 (KJS::BooleanImp::toBoolean): |
|
16441 (KJS::BooleanImp::toNumber): |
|
16442 (KJS::BooleanImp::toString): |
|
16443 (KJS::StringImp::toPrimitive): |
|
16444 (KJS::StringImp::toBoolean): |
|
16445 (KJS::StringImp::toNumber): |
|
16446 (KJS::StringImp::toString): |
|
16447 * kjs/internal.h: |
|
16448 * kjs/protected_values.cpp: |
|
16449 |
|
16450 2005-10-03 Maciej Stachowiak <mjs@apple.com> |
|
16451 |
|
16452 - fix Development build after last checkin |
|
16453 |
|
16454 * kxmlcore/FastMalloc.cpp: |
|
16455 (KXMLCore::fastMallocRegisterThread): |
|
16456 |
|
16457 2005-10-02 Maciej Stachowiak <mjs@apple.com> |
|
16458 |
|
16459 Reviewed by Darin. |
|
16460 |
|
16461 <rdar://problem/4283967> REGRESSION: 3% regression on PLT from new FastMalloc |
|
16462 http://bugs.webkit.org/show_bug.cgi?id=5243 |
|
16463 |
|
16464 A number of optimizations to the new threadsafe malloc that make it actually as fast |
|
16465 as dlmalloc (I measured wrong before) and as memory-efficient as the system malloc. |
|
16466 |
|
16467 - use fastMalloc for everything - it now gets applied to all new/delete allocations |
|
16468 via a private inline operator new that is now included into every file via config.h. |
|
16469 |
|
16470 - tweaked some of the numeric parameters for size classes and amount of wasted memory |
|
16471 allowed per allocation - this saves on memory use and consequently improves speed. |
|
16472 |
|
16473 - so long as the allocator is not being used on background threads, get the per-thread |
|
16474 cache from a global variable instead of from pthread_getspecific, since the latter is slow. |
|
16475 |
|
16476 - inline more functions, and force the ones GCC refuses to inline with |
|
16477 attribute(always_inline), nearly all of these have one call site so inlining them has |
|
16478 to be a win. |
|
16479 |
|
16480 - use some tricks to calculate allocation size more efficiently and fewer times for small |
|
16481 allocations, to avoid hitting the huge size table array. |
|
16482 |
|
16483 - avoid hitting the per-thread cache on code paths that don't need it. |
|
16484 |
|
16485 - implement inline assembly version of spinlock for PowerPC (was already done for x86) |
|
16486 |
|
16487 * bindings/NP_jsobject.cpp: |
|
16488 * bindings/c/c_class.cpp: |
|
16489 * bindings/c/c_instance.cpp: |
|
16490 * bindings/c/c_runtime.cpp: |
|
16491 * bindings/c/c_utility.cpp: |
|
16492 * bindings/jni/jni_class.cpp: |
|
16493 * bindings/jni/jni_instance.cpp: |
|
16494 * bindings/jni/jni_jsobject.cpp: |
|
16495 * bindings/jni/jni_objc.mm: |
|
16496 * bindings/jni/jni_runtime.cpp: |
|
16497 * bindings/jni/jni_utility.cpp: |
|
16498 * bindings/npruntime.cpp: |
|
16499 * bindings/objc/WebScriptObject.mm: |
|
16500 * bindings/objc/objc_class.mm: |
|
16501 * bindings/objc/objc_instance.mm: |
|
16502 * bindings/objc/objc_runtime.mm: |
|
16503 * bindings/objc/objc_utility.mm: |
|
16504 * bindings/runtime.cpp: |
|
16505 * bindings/runtime_array.cpp: |
|
16506 * bindings/runtime_method.cpp: |
|
16507 * bindings/runtime_object.cpp: |
|
16508 * bindings/runtime_root.cpp: |
|
16509 * bindings/testbindings.cpp: |
|
16510 * bindings/testbindings.mm: |
|
16511 * kjs/array_object.cpp: |
|
16512 (ArrayInstanceImp::ArrayInstanceImp): |
|
16513 (ArrayInstanceImp::~ArrayInstanceImp): |
|
16514 (ArrayInstanceImp::resizeStorage): |
|
16515 * kjs/bool_object.cpp: |
|
16516 * kjs/collector.cpp: |
|
16517 (KJS::Collector::registerThread): |
|
16518 * kjs/config.h: |
|
16519 * kjs/debugger.cpp: |
|
16520 * kjs/error_object.cpp: |
|
16521 * kjs/function.cpp: |
|
16522 * kjs/function_object.cpp: |
|
16523 * kjs/identifier.cpp: |
|
16524 (KJS::Identifier::rehash): |
|
16525 * kjs/internal.cpp: |
|
16526 (KJS::Parser::saveNewNode): |
|
16527 (KJS::clearNewNodes): |
|
16528 * kjs/interpreter.cpp: |
|
16529 * kjs/lexer.cpp: |
|
16530 (Lexer::doneParsing): |
|
16531 (Lexer::makeIdentifier): |
|
16532 (Lexer::makeUString): |
|
16533 * kjs/list.cpp: |
|
16534 * kjs/math_object.cpp: |
|
16535 * kjs/nodes.cpp: |
|
16536 * kjs/nodes.h: |
|
16537 * kjs/nodes2string.cpp: |
|
16538 * kjs/number_object.cpp: |
|
16539 (integer_part_noexp): |
|
16540 (char_sequence): |
|
16541 * kjs/object.cpp: |
|
16542 * kjs/object_object.cpp: |
|
16543 * kjs/property_map.cpp: |
|
16544 * kjs/property_slot.cpp: |
|
16545 * kjs/protected_values.cpp: |
|
16546 (KJS::ProtectedValues::rehash): |
|
16547 * kjs/reference.cpp: |
|
16548 * kjs/reference_list.cpp: |
|
16549 * kjs/regexp.cpp: |
|
16550 * kjs/regexp_object.cpp: |
|
16551 * kjs/scope_chain.cpp: |
|
16552 * kjs/scope_chain.h: |
|
16553 * kjs/string_object.cpp: |
|
16554 * kjs/testkjs.cpp: |
|
16555 * kjs/ustring.h: |
|
16556 * kjs/value.cpp: |
|
16557 * kxmlcore/Assertions.mm: |
|
16558 * kxmlcore/FastMalloc.cpp: |
|
16559 (KXMLCore::InitSizeClasses): |
|
16560 (KXMLCore::DLL_IsEmpty): |
|
16561 (KXMLCore::DLL_Prepend): |
|
16562 (KXMLCore::TCMalloc_Central_FreeList::Insert): |
|
16563 (KXMLCore::TCMalloc_Central_FreeList::Remove): |
|
16564 (KXMLCore::TCMalloc_Central_FreeList::Populate): |
|
16565 (KXMLCore::TCMalloc_ThreadCache::Allocate): |
|
16566 (KXMLCore::TCMalloc_ThreadCache::FetchFromCentralCache): |
|
16567 (KXMLCore::fastMallocRegisterThread): |
|
16568 (KXMLCore::TCMalloc_ThreadCache::GetCache): |
|
16569 (KXMLCore::TCMalloc_ThreadCache::GetCacheIfPresent): |
|
16570 (KXMLCore::TCMalloc_ThreadCache::CreateCacheIfNecessary): |
|
16571 (KXMLCore::do_malloc): |
|
16572 (KXMLCore::do_free): |
|
16573 (KXMLCore::realloc): |
|
16574 * kxmlcore/FastMalloc.h: |
|
16575 (operator new): |
|
16576 (operator delete): |
|
16577 (operator new[]): |
|
16578 (operator delete[]): |
|
16579 * kxmlcore/HashTable.cpp: |
|
16580 * kxmlcore/TCSpinLock.h: |
|
16581 (TCMalloc_SpinLock::Lock): |
|
16582 (TCMalloc_SpinLock::Unlock): |
|
16583 (TCMalloc_SlowLock): |
|
16584 * kxmlcore/TCSystemAlloc.cpp: |
|
16585 |
|
16586 2005-09-30 Geoffrey Garen <ggaren@apple.com> |
|
16587 |
|
16588 - Second cut at fixing <rdar://problem/4275206> Denver Regression: Seed: |
|
16589 Past Editions of Opinions display "NAN/Undefined" for www.washingtonpost.com |
|
16590 |
|
16591 Reviewed by john. |
|
16592 |
|
16593 * kjs/date_object.cpp: |
|
16594 (KJS::KRFCDate_parseDate): Intead of creating a timezone when one isn't specified, |
|
16595 just rely on the fallback logic, which will do it for you. Also, return invalidDate |
|
16596 if the date includes trailing garbage. (Somewhat accidentally, the timezone logic |
|
16597 used to catch trailing garbage.) |
|
16598 |
|
16599 Added test case to fast/js/date-parse-test.html. |
|
16600 |
|
16601 2005-09-29 Eric Seidel <eseidel@apple.com> |
|
16602 Fix from Mitz Pettel <opendarwin.org@mitzpettel.com> |
|
16603 |
|
16604 Reviewed by darin. |
|
16605 |
|
16606 Fix JSC memory smasher in TOT. |
|
16607 http://bugs.webkit.org/show_bug.cgi?id=5176 |
|
16608 |
|
16609 * pcre/pcre_exec.c: |
|
16610 (match): |
|
16611 |
|
16612 2005-09-29 Eric Seidel <eseidel@apple.com> |
|
16613 Fix from Mitz Pettel <opendarwin.org@mitzpettel.com> |
|
16614 |
|
16615 Reviewed by mjs. |
|
16616 |
|
16617 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
16618 Build fix for JSC+SVG after 5161. |
|
16619 http://bugs.webkit.org/show_bug.cgi?id=5179 |
|
16620 |
|
16621 2005-09-28 Geoffrey Garen <ggaren@apple.com> |
|
16622 |
|
16623 - Fixed <rdar://problem/4275206> Denver Regression: Seed: Past Editions of Opinions display |
|
16624 "NAN/Undefined" for www.washingtonpost.com |
|
16625 |
|
16626 Reviewed by darin. |
|
16627 |
|
16628 * kjs/date_object.cpp: |
|
16629 (KJS::KRFCDate_parseDate): If the timezone isn't specified, rather than returning |
|
16630 invalidDate, substitute the local timezone. This matches the behavior of FF/IE. |
|
16631 |
|
16632 2005-09-28 Maciej Stachowiak <mjs@apple.com> |
|
16633 |
|
16634 Patch from George Staikos, reviewed by me. |
|
16635 |
|
16636 - fixed some compile issues on Linux |
|
16637 |
|
16638 * kjs/property_slot.h: |
|
16639 * kjs/simple_number.h: |
|
16640 |
|
16641 2005-09-27 Maciej Stachowiak <mjs@apple.com> |
|
16642 |
|
16643 Reviewed by Eric. |
|
16644 |
|
16645 - move HashMap/HashSet code down to JavaScriptCore |
|
16646 http://bugs.webkit.org/show_bug.cgi?id=5161 |
|
16647 |
|
16648 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
16649 * kjs/internal.cpp: |
|
16650 (KJS::interpreterMap): Function that fetches the interpreter map on demand. |
|
16651 (KJS::InterpreterImp::InterpreterImp): Replace use of InterpreterMap |
|
16652 class with an appropriate HashMap. |
|
16653 (KJS::InterpreterImp::clear): ditto |
|
16654 (KJS::InterpreterImp::interpreterWithGlobalObject): ditto |
|
16655 * kjs/interpreter_map.cpp: Removed. |
|
16656 * kjs/interpreter_map.h: Removed. |
|
16657 |
|
16658 The HashMap/HashSet code (copied and slightly tweaked from WebCore) |
|
16659 |
|
16660 * kxmlcore/HashFunctions.h: Added. |
|
16661 (KXMLCore::4): |
|
16662 (KXMLCore::8): |
|
16663 (KXMLCore::): |
|
16664 (KXMLCore::PointerHash::hash): |
|
16665 (KXMLCore::PointerHash::equal): |
|
16666 * kxmlcore/HashMap.h: Added. |
|
16667 (KXMLCore::extractFirst): |
|
16668 (KXMLCore::HashMap::HashMap): |
|
16669 (KXMLCore::::size): |
|
16670 (KXMLCore::::capacity): |
|
16671 (KXMLCore::::isEmpty): |
|
16672 (KXMLCore::::begin): |
|
16673 (KXMLCore::::end): |
|
16674 (KXMLCore::::find): |
|
16675 (KXMLCore::::contains): |
|
16676 (KXMLCore::::set): |
|
16677 (KXMLCore::::get): |
|
16678 (KXMLCore::::remove): |
|
16679 (KXMLCore::::clear): |
|
16680 (KXMLCore::deleteAllValues): |
|
16681 * kxmlcore/HashMapPtrSpec.h: Added. |
|
16682 (KXMLCore::PointerHashIteratorAdapter::PointerHashIteratorAdapter): |
|
16683 (KXMLCore::PointerHashIteratorAdapter::operator*): |
|
16684 (KXMLCore::PointerHashIteratorAdapter::operator->): |
|
16685 (KXMLCore::PointerHashIteratorAdapter::operator++): |
|
16686 (KXMLCore::PointerHashIteratorAdapter::operator==): |
|
16687 (KXMLCore::PointerHashIteratorAdapter::operator!=): |
|
16688 (KXMLCore::PointerHashConstIteratorAdapter::PointerHashConstIteratorAdapter): |
|
16689 (KXMLCore::PointerHashConstIteratorAdapter::operator*): |
|
16690 (KXMLCore::PointerHashConstIteratorAdapter::operator->): |
|
16691 (KXMLCore::PointerHashConstIteratorAdapter::operator++): |
|
16692 (KXMLCore::PointerHashConstIteratorAdapter::operator==): |
|
16693 (KXMLCore::PointerHashConstIteratorAdapter::operator!=): |
|
16694 (KXMLCore::): |
|
16695 * kxmlcore/HashSet.h: Added. |
|
16696 (KXMLCore::identityExtract): |
|
16697 (KXMLCore::convertAdapter): |
|
16698 (KXMLCore::HashSet::HashSet): |
|
16699 (KXMLCore::::size): |
|
16700 (KXMLCore::::capacity): |
|
16701 (KXMLCore::::isEmpty): |
|
16702 (KXMLCore::::begin): |
|
16703 (KXMLCore::::end): |
|
16704 (KXMLCore::::find): |
|
16705 (KXMLCore::::contains): |
|
16706 (KXMLCore::::insert): |
|
16707 (KXMLCore::::remove): |
|
16708 (KXMLCore::::clear): |
|
16709 * kxmlcore/HashTable.cpp: Added. |
|
16710 (KXMLCore::HashTableStats::~HashTableStats): |
|
16711 (KXMLCore::HashTableStats::recordCollisionAtCount): |
|
16712 * kxmlcore/HashTable.h: Added. |
|
16713 (KXMLCore::HashTableIterator::skipEmptyBuckets): |
|
16714 (KXMLCore::HashTableIterator::HashTableIterator): |
|
16715 (KXMLCore::HashTableIterator::operator*): |
|
16716 (KXMLCore::HashTableIterator::operator->): |
|
16717 (KXMLCore::HashTableIterator::operator++): |
|
16718 (KXMLCore::HashTableIterator::operator==): |
|
16719 (KXMLCore::HashTableIterator::operator!=): |
|
16720 (KXMLCore::HashTableConstIterator::HashTableConstIterator): |
|
16721 (KXMLCore::HashTableConstIterator::operator*): |
|
16722 (KXMLCore::HashTableConstIterator::operator->): |
|
16723 (KXMLCore::HashTableConstIterator::skipEmptyBuckets): |
|
16724 (KXMLCore::HashTableConstIterator::operator++): |
|
16725 (KXMLCore::HashTableConstIterator::operator==): |
|
16726 (KXMLCore::HashTableConstIterator::operator!=): |
|
16727 (KXMLCore::HashTable::HashTable): |
|
16728 (KXMLCore::HashTable::~HashTable): |
|
16729 (KXMLCore::HashTable::begin): |
|
16730 (KXMLCore::HashTable::end): |
|
16731 (KXMLCore::HashTable::size): |
|
16732 (KXMLCore::HashTable::capacity): |
|
16733 (KXMLCore::HashTable::insert): |
|
16734 (KXMLCore::HashTable::isEmptyBucket): |
|
16735 (KXMLCore::HashTable::isDeletedBucket): |
|
16736 (KXMLCore::HashTable::isEmptyOrDeletedBucket): |
|
16737 (KXMLCore::HashTable::hash): |
|
16738 (KXMLCore::HashTable::equal): |
|
16739 (KXMLCore::HashTable::identityConvert): |
|
16740 (KXMLCore::HashTable::extractKey): |
|
16741 (KXMLCore::HashTable::lookup): |
|
16742 (KXMLCore::HashTable::shouldExpand): |
|
16743 (KXMLCore::HashTable::mustRehashInPlace): |
|
16744 (KXMLCore::HashTable::shouldShrink): |
|
16745 (KXMLCore::HashTable::shrink): |
|
16746 (KXMLCore::HashTable::clearBucket): |
|
16747 (KXMLCore::HashTable::deleteBucket): |
|
16748 (KXMLCore::HashTable::makeLookupResult): |
|
16749 (KXMLCore::HashTable::makeIterator): |
|
16750 (KXMLCore::HashTable::makeConstIterator): |
|
16751 (KXMLCore::::lookup): |
|
16752 (KXMLCore::::insert): |
|
16753 (KXMLCore::::reinsert): |
|
16754 (KXMLCore::::find): |
|
16755 (KXMLCore::::contains): |
|
16756 (KXMLCore::::remove): |
|
16757 (KXMLCore::::allocateTable): |
|
16758 (KXMLCore::::expand): |
|
16759 (KXMLCore::::rehash): |
|
16760 (KXMLCore::::clear): |
|
16761 (KXMLCore::::HashTable): |
|
16762 (KXMLCore::::swap): |
|
16763 (KXMLCore::::operator): |
|
16764 (KXMLCore::::checkTableConsistency): |
|
16765 (KXMLCore::::checkTableConsistencyExceptSize): |
|
16766 * kxmlcore/HashTraits.h: Added. |
|
16767 (KXMLCore::HashTraits::emptyValue): |
|
16768 (KXMLCore::): |
|
16769 (KXMLCore::PairHashTraits::emptyValue): |
|
16770 (KXMLCore::PairHashTraits::deletedValue): |
|
16771 |
|
16772 2005-09-27 Darin Adler <darin@apple.com> |
|
16773 |
|
16774 Reviewed by Maciej. |
|
16775 |
|
16776 - update grammar to fix conflicts; fixes one of our test cases |
|
16777 because it resolves the relationship between function expressions |
|
16778 and declarations in the way required by the ECMA specification |
|
16779 |
|
16780 * kjs/grammar.y: Added lots of new grammar rules so we have no conflicts. |
|
16781 A new set of rules for "no bracket or function at start of expression" and |
|
16782 another set of rules for "no in anywhere in expression". Also simplified the |
|
16783 handling of try to use only a single node and used operator precedence to |
|
16784 get rid of the conflict in handling of if and else. Also used a macro to |
|
16785 streamline the handling of automatic semicolons and changed parenthesis |
|
16786 handling to use a virtual function. |
|
16787 |
|
16788 * kjs/nodes.h: Added nodeInsideAllParens, removed unused abortStatement. |
|
16789 (KJS::TryNode::TryNode): Updated to hold catch and finally blocks directly instead |
|
16790 of using a special node for each. |
|
16791 * kjs/nodes.cpp: |
|
16792 (Node::createErrorCompletion): Added. Used instead of throwError when creating errors |
|
16793 that should not be in a completion rather than an ExecState. |
|
16794 (Node::throwUndefinedVariableError): Added. Sets source location unlike the call it |
|
16795 replaces. |
|
16796 (Node::nodeInsideAllParens): Added. |
|
16797 (GroupNode::nodeInsideAllParens): Added. |
|
16798 (StatListNode::execute): Removed code to move exceptions into completion objects; |
|
16799 that's now done solely by the KJS_CHECKEXCEPTION macro. |
|
16800 (TryNode::execute): Include execution of catch and finally here rather than using |
|
16801 separate nodes. |
|
16802 (FuncDeclNode::execute): Moved here, no longer inline. |
|
16803 * kjs/nodes2string.cpp: |
|
16804 (TryNode::streamTo): Updated for change. |
|
16805 (FuncDeclNode::streamTo): Ditto. |
|
16806 (FuncExprNode::streamTo): Ditto. |
|
16807 |
|
16808 * kjs/kjs-test: Removed. Was part of "make check". |
|
16809 * kjs/kjs-test.chk: Ditto. |
|
16810 * kjs/test.js: Ditto. |
|
16811 |
|
16812 * tests/mozilla/expected.html: Updated because one more test succeeds. |
|
16813 |
|
16814 2005-09-27 Adele Peterson <adele@apple.com> |
|
16815 |
|
16816 Reviewed by Maciej. |
|
16817 |
|
16818 Changed ints to size_t where appropriate. |
|
16819 |
|
16820 * kjs/collector.cpp: |
|
16821 (KJS::Collector::allocate): |
|
16822 (KJS::Collector::markStackObjectsConservatively): |
|
16823 (KJS::Collector::collect): |
|
16824 (KJS::Collector::size): |
|
16825 (KJS::Collector::numInterpreters): |
|
16826 (KJS::Collector::numGCNotAllowedObjects): |
|
16827 (KJS::Collector::numReferencedObjects): |
|
16828 * kjs/collector.h: |
|
16829 |
|
16830 2005-09-27 Eric Seidel <eseidel@apple.com> |
|
16831 |
|
16832 Reviewed by kevin. |
|
16833 |
|
16834 * JavaScriptCore.xcodeproj/project.pbxproj: fix after malloc changes. |
|
16835 |
|
16836 2005-09-27 Eric Seidel <eseidel@apple.com> |
|
16837 |
|
16838 Reviewed by mjs. |
|
16839 |
|
16840 * kjs/nodes.cpp: |
|
16841 (FuncExprNode::evaluate): Now sets .constructor properly. |
|
16842 Test cases added to WebCore/layout-tests. |
|
16843 http://bugs.webkit.org/show_bug.cgi?id=3537 |
|
16844 |
|
16845 2005-09-26 Maciej Stachowiak <mjs@apple.com> |
|
16846 |
|
16847 Reviewed by John. |
|
16848 |
|
16849 - replace dlmalloc with tcmalloc |
|
16850 http://bugs.webkit.org/show_bug.cgi?id=5145 |
|
16851 |
|
16852 I also moved SharedPtr and the assertion code from WebCore into a |
|
16853 new kxmlcore directory. |
|
16854 |
|
16855 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
16856 * kjs/collector.cpp: |
|
16857 (KJS::Collector::allocate): |
|
16858 (KJS::Collector::collect): |
|
16859 * kjs/config.h: |
|
16860 * kjs/fast_malloc.cpp: Removed. |
|
16861 * kjs/fast_malloc.h: Removed. |
|
16862 * kjs/function.cpp: |
|
16863 * kjs/function.h: |
|
16864 * kjs/function_object.cpp: |
|
16865 * kjs/identifier.cpp: |
|
16866 (KJS::Identifier::add): |
|
16867 * kjs/internal.cpp: |
|
16868 * kjs/internal.h: |
|
16869 * kjs/nodes.h: |
|
16870 * kjs/nodes2string.cpp: |
|
16871 * kjs/property_map.cpp: |
|
16872 (KJS::PropertyMap::~PropertyMap): |
|
16873 (KJS::PropertyMap::rehash): |
|
16874 * kjs/scope_chain.h: |
|
16875 * kjs/shared_ptr.h: Removed. |
|
16876 * kjs/string_object.cpp: |
|
16877 (StringObjectFuncImp::callAsFunction): |
|
16878 * kjs/ustring.cpp: |
|
16879 (KJS::UString::Rep::createCopying): |
|
16880 (KJS::UString::Rep::destroy): |
|
16881 (KJS::UString::expandCapacity): |
|
16882 (KJS::UString::expandPreCapacity): |
|
16883 (KJS::UString::UString): |
|
16884 (KJS::UString::spliceSubstringsWithSeparators): |
|
16885 (KJS::UString::append): |
|
16886 (KJS::UString::operator=): |
|
16887 (KJS::UString::detach): |
|
16888 * kjs/ustring.h: |
|
16889 * kxmlcore/Assertions.h: Added. |
|
16890 * kxmlcore/Assertions.mm: Added. |
|
16891 * kxmlcore/FastMalloc.cpp: Added. |
|
16892 (KXMLCore::LgFloor): |
|
16893 (KXMLCore::SizeClass): |
|
16894 (KXMLCore::ByteSizeForClass): |
|
16895 (KXMLCore::InitSizeClasses): |
|
16896 (KXMLCore::MetaDataAlloc): |
|
16897 (KXMLCore::PageHeapAllocator::Init): |
|
16898 (KXMLCore::PageHeapAllocator::New): |
|
16899 (KXMLCore::PageHeapAllocator::Delete): |
|
16900 (KXMLCore::PageHeapAllocator::inuse): |
|
16901 (KXMLCore::pages): |
|
16902 (KXMLCore::AllocationSize): |
|
16903 (KXMLCore::Event): |
|
16904 (KXMLCore::NewSpan): |
|
16905 (KXMLCore::DeleteSpan): |
|
16906 (KXMLCore::DLL_Init): |
|
16907 (KXMLCore::DLL_Remove): |
|
16908 (KXMLCore::DLL_IsEmpty): |
|
16909 (KXMLCore::DLL_Length): |
|
16910 (KXMLCore::DLL_Print): |
|
16911 (KXMLCore::DLL_Prepend): |
|
16912 (KXMLCore::DLL_InsertOrdered): |
|
16913 (KXMLCore::): |
|
16914 (KXMLCore::TCMalloc_PageHeap::GetDescriptor): |
|
16915 (KXMLCore::TCMalloc_PageHeap::SystemBytes): |
|
16916 (KXMLCore::TCMalloc_PageHeap::FreeBytes): |
|
16917 (KXMLCore::TCMalloc_PageHeap::RecordSpan): |
|
16918 (KXMLCore::TCMalloc_PageHeap::TCMalloc_PageHeap): |
|
16919 (KXMLCore::TCMalloc_PageHeap::New): |
|
16920 (KXMLCore::TCMalloc_PageHeap::Split): |
|
16921 (KXMLCore::TCMalloc_PageHeap::Carve): |
|
16922 (KXMLCore::TCMalloc_PageHeap::Delete): |
|
16923 (KXMLCore::TCMalloc_PageHeap::RegisterSizeClass): |
|
16924 (KXMLCore::TCMalloc_PageHeap::Dump): |
|
16925 (KXMLCore::TCMalloc_PageHeap::GrowHeap): |
|
16926 (KXMLCore::TCMalloc_PageHeap::Check): |
|
16927 (KXMLCore::TCMalloc_PageHeap::CheckList): |
|
16928 (KXMLCore::TCMalloc_ThreadCache_FreeList::Init): |
|
16929 (KXMLCore::TCMalloc_ThreadCache_FreeList::length): |
|
16930 (KXMLCore::TCMalloc_ThreadCache_FreeList::empty): |
|
16931 (KXMLCore::TCMalloc_ThreadCache_FreeList::lowwatermark): |
|
16932 (KXMLCore::TCMalloc_ThreadCache_FreeList::clear_lowwatermark): |
|
16933 (KXMLCore::TCMalloc_ThreadCache_FreeList::Push): |
|
16934 (KXMLCore::TCMalloc_ThreadCache_FreeList::Pop): |
|
16935 (KXMLCore::TCMalloc_ThreadCache::freelist_length): |
|
16936 (KXMLCore::TCMalloc_ThreadCache::Size): |
|
16937 (KXMLCore::TCMalloc_Central_FreeList::length): |
|
16938 (KXMLCore::TCMalloc_Central_FreeList::Init): |
|
16939 (KXMLCore::TCMalloc_Central_FreeList::Insert): |
|
16940 (KXMLCore::TCMalloc_Central_FreeList::Remove): |
|
16941 (KXMLCore::TCMalloc_Central_FreeList::Populate): |
|
16942 (KXMLCore::TCMalloc_ThreadCache::SampleAllocation): |
|
16943 (KXMLCore::TCMalloc_ThreadCache::Init): |
|
16944 (KXMLCore::TCMalloc_ThreadCache::Cleanup): |
|
16945 (KXMLCore::TCMalloc_ThreadCache::Allocate): |
|
16946 (KXMLCore::TCMalloc_ThreadCache::Deallocate): |
|
16947 (KXMLCore::TCMalloc_ThreadCache::FetchFromCentralCache): |
|
16948 (KXMLCore::TCMalloc_ThreadCache::ReleaseToCentralCache): |
|
16949 (KXMLCore::TCMalloc_ThreadCache::Scavenge): |
|
16950 (KXMLCore::TCMalloc_ThreadCache::GetCache): |
|
16951 (KXMLCore::TCMalloc_ThreadCache::GetCacheIfPresent): |
|
16952 (KXMLCore::TCMalloc_ThreadCache::PickNextSample): |
|
16953 (KXMLCore::TCMalloc_ThreadCache::InitModule): |
|
16954 (KXMLCore::TCMalloc_ThreadCache::InitTSD): |
|
16955 (KXMLCore::TCMalloc_ThreadCache::CreateCacheIfNecessary): |
|
16956 (KXMLCore::TCMalloc_ThreadCache::DeleteCache): |
|
16957 (KXMLCore::TCMalloc_ThreadCache::RecomputeThreadCacheSize): |
|
16958 (KXMLCore::TCMalloc_ThreadCache::Print): |
|
16959 (KXMLCore::ExtractStats): |
|
16960 (KXMLCore::DumpStats): |
|
16961 (KXMLCore::PrintStats): |
|
16962 (KXMLCore::DumpStackTraces): |
|
16963 (KXMLCore::TCMallocImplementation::GetStats): |
|
16964 (KXMLCore::TCMallocImplementation::ReadStackTraces): |
|
16965 (KXMLCore::TCMallocImplementation::GetNumericProperty): |
|
16966 (KXMLCore::TCMallocImplementation::SetNumericProperty): |
|
16967 (KXMLCore::DoSampledAllocation): |
|
16968 (KXMLCore::do_malloc): |
|
16969 (KXMLCore::do_free): |
|
16970 (KXMLCore::do_memalign): |
|
16971 (KXMLCore::TCMallocGuard::TCMallocGuard): |
|
16972 (KXMLCore::TCMallocGuard::~TCMallocGuard): |
|
16973 (KXMLCore::malloc): |
|
16974 (KXMLCore::free): |
|
16975 (KXMLCore::calloc): |
|
16976 (KXMLCore::cfree): |
|
16977 (KXMLCore::realloc): |
|
16978 (KXMLCore::memalign): |
|
16979 (KXMLCore::posix_memalign): |
|
16980 (KXMLCore::valloc): |
|
16981 (KXMLCore::pvalloc): |
|
16982 (KXMLCore::malloc_stats): |
|
16983 (KXMLCore::mallopt): |
|
16984 (KXMLCore::mallinfo): |
|
16985 * kxmlcore/FastMalloc.h: Added. |
|
16986 (KXMLCore::FastAllocated::operator new): |
|
16987 (KXMLCore::FastAllocated::operator delete): |
|
16988 (KXMLCore::FastAllocated::operator new[]): |
|
16989 (KXMLCore::FastAllocated::operator delete[]): |
|
16990 * kxmlcore/SharedPtr.h: Added. |
|
16991 (KXMLCore::SharedPtr::SharedPtr): |
|
16992 (KXMLCore::SharedPtr::~SharedPtr): |
|
16993 (KXMLCore::SharedPtr::isNull): |
|
16994 (KXMLCore::SharedPtr::notNull): |
|
16995 (KXMLCore::SharedPtr::reset): |
|
16996 (KXMLCore::SharedPtr::get): |
|
16997 (KXMLCore::SharedPtr::operator*): |
|
16998 (KXMLCore::SharedPtr::operator->): |
|
16999 (KXMLCore::SharedPtr::operator!): |
|
17000 (KXMLCore::SharedPtr::operator bool): |
|
17001 (KXMLCore::::operator): |
|
17002 (KXMLCore::operator==): |
|
17003 (KXMLCore::operator!=): |
|
17004 (KXMLCore::static_pointer_cast): |
|
17005 (KXMLCore::const_pointer_cast): |
|
17006 * kxmlcore/TCPageMap.h: Added. |
|
17007 (TCMalloc_PageMap1::TCMalloc_PageMap1): |
|
17008 (TCMalloc_PageMap1::Ensure): |
|
17009 (TCMalloc_PageMap1::get): |
|
17010 (TCMalloc_PageMap1::set): |
|
17011 (TCMalloc_PageMap2::TCMalloc_PageMap2): |
|
17012 (TCMalloc_PageMap2::get): |
|
17013 (TCMalloc_PageMap2::set): |
|
17014 (TCMalloc_PageMap2::Ensure): |
|
17015 (TCMalloc_PageMap3::NewNode): |
|
17016 (TCMalloc_PageMap3::TCMalloc_PageMap3): |
|
17017 (TCMalloc_PageMap3::get): |
|
17018 (TCMalloc_PageMap3::set): |
|
17019 (TCMalloc_PageMap3::Ensure): |
|
17020 * kxmlcore/TCSpinLock.h: Added. |
|
17021 (TCMalloc_SpinLock::Init): |
|
17022 (TCMalloc_SpinLock::Finalize): |
|
17023 (TCMalloc_SpinLock::Lock): |
|
17024 (TCMalloc_SpinLock::Unlock): |
|
17025 (TCMalloc_SlowLock): |
|
17026 (TCMalloc_SpinLockHolder::TCMalloc_SpinLockHolder): |
|
17027 (TCMalloc_SpinLockHolder::~TCMalloc_SpinLockHolder): |
|
17028 * kxmlcore/TCSystemAlloc.cpp: Added. |
|
17029 (TrySbrk): |
|
17030 (TryMmap): |
|
17031 (TryDevMem): |
|
17032 (TCMalloc_SystemAlloc): |
|
17033 * kxmlcore/TCSystemAlloc.h: Added. |
|
17034 |
|
17035 2005-09-23 Maciej Stachowiak <mjs@apple.com> |
|
17036 |
|
17037 Reviewed by Darin. |
|
17038 |
|
17039 <rdar://problem/4260479> Finish deploying PropertySlot in the interpreter |
|
17040 http://bugs.webkit.org/show_bug.cgi?id=5112 |
|
17041 |
|
17042 Convert postfix, prefix, delete, prefix, and for..in expressions to use |
|
17043 PropertySlot-based lookup instead of evaluateReference. |
|
17044 |
|
17045 3% speedup on JS iBench. |
|
17046 |
|
17047 Fixed two of the JS tests: |
|
17048 * tests/mozilla/expected.html: |
|
17049 |
|
17050 * kjs/grammar.y: |
|
17051 * kjs/nodes.cpp: |
|
17052 (PostfixResolveNode::evaluate): |
|
17053 (PostfixBracketNode::evaluate): |
|
17054 (PostfixDotNode::evaluate): |
|
17055 (DeleteResolveNode::evaluate): |
|
17056 (DeleteBracketNode::evaluate): |
|
17057 (DeleteDotNode::evaluate): |
|
17058 (DeleteValueNode::evaluate): |
|
17059 (typeStringForValue): |
|
17060 (TypeOfResolveNode::evaluate): |
|
17061 (TypeOfValueNode::evaluate): |
|
17062 (PrefixResolveNode::evaluate): |
|
17063 (PrefixBracketNode::evaluate): |
|
17064 (PrefixDotNode::evaluate): |
|
17065 (ForInNode::execute): |
|
17066 * kjs/nodes.h: |
|
17067 (KJS::PostfixResolveNode::PostfixResolveNode): |
|
17068 (KJS::PostfixBracketNode::PostfixBracketNode): |
|
17069 (KJS::PostfixDotNode::PostfixDotNode): |
|
17070 (KJS::DeleteResolveNode::DeleteResolveNode): |
|
17071 (KJS::DeleteBracketNode::DeleteBracketNode): |
|
17072 (KJS::DeleteDotNode::DeleteDotNode): |
|
17073 (KJS::DeleteValueNode::DeleteValueNode): |
|
17074 (KJS::TypeOfResolveNode::TypeOfResolveNode): |
|
17075 (KJS::TypeOfValueNode::TypeOfValueNode): |
|
17076 (KJS::PrefixResolveNode::PrefixResolveNode): |
|
17077 (KJS::PrefixBracketNode::PrefixBracketNode): |
|
17078 (KJS::PrefixDotNode::PrefixDotNode): |
|
17079 * kjs/nodes2string.cpp: |
|
17080 (PostfixResolveNode::streamTo): |
|
17081 (PostfixBracketNode::streamTo): |
|
17082 (PostfixDotNode::streamTo): |
|
17083 (DeleteResolveNode::streamTo): |
|
17084 (DeleteBracketNode::streamTo): |
|
17085 (DeleteDotNode::streamTo): |
|
17086 (DeleteValueNode::streamTo): |
|
17087 (TypeOfValueNode::streamTo): |
|
17088 (TypeOfResolveNode::streamTo): |
|
17089 (PrefixResolveNode::streamTo): |
|
17090 (PrefixBracketNode::streamTo): |
|
17091 (PrefixDotNode::streamTo): |
|
17092 * kjs/reference.cpp: |
|
17093 (KJS::Reference::Reference): |
|
17094 (KJS::Reference::getPropertyName): |
|
17095 (KJS::Reference::getValue): |
|
17096 (KJS::Reference::deleteValue): |
|
17097 * kjs/reference.h: |
|
17098 |
|
17099 2005-09-23 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
17100 |
|
17101 Reviewed and landed by Darin. |
|
17102 |
|
17103 - a Windows-specific file |
|
17104 |
|
17105 * os-win32/stdint.h: Added. We plan to remove dependency on the <stdint.h> types, |
|
17106 and if we do so, we will remove this file. |
|
17107 |
|
17108 2005-09-22 Geoffrey Garen <ggaren@apple.com> |
|
17109 |
|
17110 - Fixed http://bugs.webkit.org/show_bug.cgi?id=5053 |
|
17111 Need to restore int/long changes to simple_number.h |
|
17112 |
|
17113 Reviewed by darin and mjs. |
|
17114 |
|
17115 * kjs/simple_number.h: changed enums to indenpendent constants to clarify types |
|
17116 (KJS::isNegativeZero): changed to static function - no reason to export |
|
17117 (KJS::SimpleNumber::rightShiftSignExtended): new function for clarity |
|
17118 (KJS::SimpleNumber::make): specified cast as reinterpret_cast |
|
17119 (KJS::SimpleNumber::is): changed to use uintptr_t for portability |
|
17120 (KJS::SimpleNumber::value): changed to use uintptr_t and rightShiftSignExtended |
|
17121 (KJS::SimpleNumber::fits): inverted tests - probably only a performance win for double |
|
17122 (KJS::SimpleNumber::integerFits): ditto |
|
17123 |
|
17124 2005-09-20 Maciej Stachowiak <mjs@apple.com> |
|
17125 |
|
17126 Reviewed by Geoff and partly by Darin. |
|
17127 |
|
17128 - fixed http://bugs.webkit.org/post_bug.cgi |
|
17129 (Reduce conflicts in JavaScriptCore grammar) |
|
17130 |
|
17131 This change gets us down from over 200 shift/reduce and 45 reduce/reduce to |
|
17132 9 shift/reduce and 45 reduce/reduce. |
|
17133 |
|
17134 * kjs/grammar.y: |
|
17135 * kjs/grammar_types.h: Removed. |
|
17136 * kjs/lexer.cpp: |
|
17137 * kjs/nodes.h: |
|
17138 (KJS::Node::isGroupNode): |
|
17139 (KJS::Node::isLocation): |
|
17140 (KJS::Node::isResolveNode): |
|
17141 (KJS::Node::isBracketAccessorNode): |
|
17142 (KJS::Node::isDotAccessorNode): |
|
17143 (KJS::ResolveNode::isLocation): |
|
17144 (KJS::ResolveNode::isResolveNode): |
|
17145 (KJS::ResolveNode::identifier): |
|
17146 (KJS::GroupNode::isGroupNode): |
|
17147 (KJS::GroupNode::leafNode): |
|
17148 (KJS::BracketAccessorNode::isLocation): |
|
17149 (KJS::BracketAccessorNode::isBracketAccessorNode): |
|
17150 (KJS::BracketAccessorNode::base): |
|
17151 (KJS::BracketAccessorNode::subscript): |
|
17152 (KJS::DotAccessorNode::isLocation): |
|
17153 (KJS::DotAccessorNode::isDotAccessorNode): |
|
17154 (KJS::DotAccessorNode::base): |
|
17155 (KJS::DotAccessorNode::identifier): |
|
17156 (KJS::FuncExprNode::FuncExprNode): |
|
17157 (KJS::FuncExprNode::identifier): |
|
17158 (KJS::FuncDeclNode::FuncDeclNode): |
|
17159 (KJS::FuncDeclNode::execute): |
|
17160 |
|
17161 2005-09-20 Geoffrey Garen <ggaren@apple.com> |
|
17162 |
|
17163 - Oops. The 4263434 change was only appropriate on the branch. Rolling out. |
|
17164 |
|
17165 Reviewed by eric. |
|
17166 |
|
17167 * kjs/internal.cpp: |
|
17168 (KJS::InterpreterImp::mark): |
|
17169 |
|
17170 2005-09-20 Geoffrey Garen <ggaren@apple.com> |
|
17171 |
|
17172 - More changes needed to fix <rdar://problem/4214783> 8F29 REGRESSION(Denver/Chardonnay): |
|
17173 kjs_fast_malloc crash due to lack of locking on multiple threads (seen selecting volumes in |
|
17174 the installer) |
|
17175 |
|
17176 Added InterpreterLocks in some places in the bindings we missed before. |
|
17177 |
|
17178 Reviewed by john. |
|
17179 |
|
17180 * bindings/runtime_root.cpp: |
|
17181 (KJS::Bindings::addNativeReference): |
|
17182 (KJS::Bindings::removeNativeReference): |
|
17183 (RootObject::removeAllNativeReferences): |
|
17184 * bindings/runtime_root.h: |
|
17185 (KJS::Bindings::RootObject::~RootObject): |
|
17186 (KJS::Bindings::RootObject::setRootObjectImp): |
|
17187 |
|
17188 2005-09-20 Geoffrey Garen <ggaren@apple.com> |
|
17189 |
|
17190 - Fixed <rdar://problem/4263434> <rdar://problem/4263434> Denver 8F29 Regression: |
|
17191 KJS::InterpreterImp::mark() crash |
|
17192 |
|
17193 Fix by mjs, review by me. |
|
17194 |
|
17195 * kjs/internal.cpp: |
|
17196 (KJS::InterpreterImp::mark): Added a null check on globExec in case a |
|
17197 garbage collection occurs inside InterpreterImp::globalInit (called |
|
17198 from InterpreterImp::InterpreterImp), at which point globExec has not yet been initialized. |
|
17199 |
|
17200 2005-09-20 Geoffrey Garen <ggaren@apple.com> |
|
17201 |
|
17202 - Rolled in fix for http://bugs.webkit.org/show_bug.cgi?id=4892 |
|
17203 Date constructor has problems with months larger than 11 |
|
17204 |
|
17205 Test cases added: |
|
17206 |
|
17207 * layout-tests/fast/js/date-big-constructor-expected.txt: Added. |
|
17208 * layout-tests/fast/js/date-big-constructor.html: Added. |
|
17209 |
|
17210 Reviewed by darin. |
|
17211 |
|
17212 * kjs/date_object.cpp: |
|
17213 (KJS::fillStructuresUsingDateArgs): |
|
17214 (KJS::makeTime): |
|
17215 |
|
17216 2005-09-19 Geoffrey Garen <ggaren@apple.com> |
|
17217 |
|
17218 - Fixed http://bugs.webkit.org/show_bug.cgi?id=5028 |
|
17219 9 layout tests fail following the change from long to int |
|
17220 |
|
17221 - Rolled out changes to simple_number.h, and added fits(long long) |
|
17222 and SimpleNumber::fits(unsigned long long) to the old system. |
|
17223 |
|
17224 Reviewed by mjs. |
|
17225 |
|
17226 * kjs/simple_number.h: |
|
17227 (KJS::SimpleNumber::): |
|
17228 (KJS::SimpleNumber::value): |
|
17229 (KJS::SimpleNumber::fits): |
|
17230 (KJS::SimpleNumber::integerFits): |
|
17231 (KJS::SimpleNumber::make): |
|
17232 |
|
17233 2005-09-14 Maciej Stachowiak <mjs@apple.com> |
|
17234 |
|
17235 Reviewed by Geoff. |
|
17236 |
|
17237 - fixed <rdar://problem/4214783> REGRESSION: kjs_fast_malloc crash due to lack of locking on multiple threads (seen selecting volumes in the installer) |
|
17238 |
|
17239 Make sure to lock using the InterpreterLock class in all places that need it |
|
17240 (including anything that uses the collector, the parser, the protect count hash table, |
|
17241 and anything that allocates via fast_malloc). |
|
17242 |
|
17243 Also added assertions to ensure that the locking rules are followed for the relevant |
|
17244 resources. |
|
17245 |
|
17246 * Makefile.am: |
|
17247 * bindings/NP_jsobject.cpp: |
|
17248 (identifierFromNPIdentifier): |
|
17249 (_NPN_Invoke): |
|
17250 (_NPN_Evaluate): |
|
17251 (_NPN_GetProperty): |
|
17252 (_NPN_SetProperty): |
|
17253 (_NPN_RemoveProperty): |
|
17254 (_NPN_HasProperty): |
|
17255 (_NPN_HasMethod): |
|
17256 (_NPN_SetException): |
|
17257 * bindings/jni/jni_jsobject.cpp: |
|
17258 (JSObject::call): |
|
17259 (JSObject::eval): |
|
17260 (JSObject::getMember): |
|
17261 (JSObject::setMember): |
|
17262 (JSObject::removeMember): |
|
17263 (JSObject::getSlot): |
|
17264 (JSObject::setSlot): |
|
17265 (JSObject::toString): |
|
17266 (JSObject::convertJObjectToValue): |
|
17267 * bindings/objc/WebScriptObject.mm: |
|
17268 (-[WebScriptObject callWebScriptMethod:withArguments:]): |
|
17269 (-[WebScriptObject evaluateWebScript:]): |
|
17270 (-[WebScriptObject setValue:forKey:]): |
|
17271 (-[WebScriptObject valueForKey:]): |
|
17272 (-[WebScriptObject removeWebScriptKey:]): |
|
17273 (-[WebScriptObject stringRepresentation]): |
|
17274 (-[WebScriptObject webScriptValueAtIndex:]): |
|
17275 (-[WebScriptObject setWebScriptValueAtIndex:value:]): |
|
17276 (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): |
|
17277 * bindings/runtime.cpp: |
|
17278 (Instance::createRuntimeObject): |
|
17279 * bindings/runtime_root.h: |
|
17280 * bindings/testbindings.cpp: |
|
17281 (main): |
|
17282 * bindings/testbindings.mm: |
|
17283 (main): |
|
17284 * kjs/fast_malloc.cpp: |
|
17285 (KJS::kjs_fast_malloc): |
|
17286 (KJS::kjs_fast_calloc): |
|
17287 (KJS::kjs_fast_free): |
|
17288 (KJS::kjs_fast_realloc): |
|
17289 * kjs/fast_malloc.h: |
|
17290 * kjs/identifier.h: |
|
17291 * kjs/internal.cpp: |
|
17292 (InterpreterImp::InterpreterImp): |
|
17293 (InterpreterImp::clear): |
|
17294 (InterpreterImp::mark): |
|
17295 (InterpreterImp::checkSyntax): |
|
17296 (InterpreterImp::evaluate): |
|
17297 * kjs/internal.h: |
|
17298 (KJS::InterpreterImp::globalObject): |
|
17299 * kjs/interpreter.cpp: |
|
17300 (Interpreter::evaluate): |
|
17301 * kjs/interpreter.h: |
|
17302 (KJS::InterpreterLock::InterpreterLock): |
|
17303 (KJS::InterpreterLock::~InterpreterLock): |
|
17304 * kjs/nodes.h: |
|
17305 * kjs/protect.h: |
|
17306 (KJS::ProtectedValue::ProtectedValue): |
|
17307 (KJS::ProtectedValue::~ProtectedValue): |
|
17308 (KJS::ProtectedValue::operator=): |
|
17309 (KJS::ProtectedObject::ProtectedObject): |
|
17310 (KJS::ProtectedObject::~ProtectedObject): |
|
17311 (KJS::ProtectedObject::operator=): |
|
17312 (KJS::ProtectedReference::ProtectedReference): |
|
17313 (KJS::ProtectedReference::~ProtectedReference): |
|
17314 (KJS::ProtectedReference::operator=): |
|
17315 * kjs/protected_object.h: |
|
17316 * kjs/protected_values.cpp: |
|
17317 (KJS::ProtectedValues::getProtectCount): |
|
17318 (KJS::ProtectedValues::increaseProtectCount): |
|
17319 (KJS::ProtectedValues::decreaseProtectCount): |
|
17320 * kjs/string_object.cpp: |
|
17321 (StringObjectImp::StringObjectImp): |
|
17322 * kjs/testkjs.cpp: |
|
17323 (main): |
|
17324 |
|
17325 2005-09-16 Adele Peterson <adele@apple.com> |
|
17326 |
|
17327 Change by Darin, reviewed by me and Maciej. |
|
17328 |
|
17329 Fixes http://bugs.webkit.org/show_bug.cgi?id=4547 |
|
17330 use int instead of long for 32-bit (to prepare for LP64 compiling) |
|
17331 |
|
17332 * bindings/c/c_class.h: |
|
17333 (KJS::Bindings::CClass::constructorAt): |
|
17334 (KJS::Bindings::CClass::numConstructors): |
|
17335 * bindings/c/c_runtime.h: |
|
17336 (KJS::Bindings::CMethod::numParameters): |
|
17337 * bindings/jni/jni_class.cpp: |
|
17338 (JavaClass::JavaClass): |
|
17339 * bindings/jni/jni_class.h: |
|
17340 (KJS::Bindings::JavaClass::constructorAt): |
|
17341 (KJS::Bindings::JavaClass::numConstructors): |
|
17342 * bindings/jni/jni_instance.cpp: |
|
17343 (JavaInstance::invokeMethod): |
|
17344 * bindings/jni/jni_jsobject.cpp: |
|
17345 (JSObject::convertJObjectToValue): |
|
17346 (JSObject::listFromJArray): |
|
17347 * bindings/jni/jni_runtime.cpp: |
|
17348 (JavaMethod::JavaMethod): |
|
17349 * bindings/jni/jni_runtime.h: |
|
17350 (KJS::Bindings::JavaConstructor::_commonCopy): |
|
17351 (KJS::Bindings::JavaConstructor::parameterAt): |
|
17352 (KJS::Bindings::JavaConstructor::numParameters): |
|
17353 (KJS::Bindings::JavaMethod::_commonCopy): |
|
17354 (KJS::Bindings::JavaMethod::parameterAt): |
|
17355 (KJS::Bindings::JavaMethod::numParameters): |
|
17356 * bindings/npapi.h: |
|
17357 * bindings/objc/WebScriptObject.mm: |
|
17358 (listFromNSArray): |
|
17359 * bindings/objc/objc_class.h: |
|
17360 (KJS::Bindings::ObjcClass::constructorAt): |
|
17361 (KJS::Bindings::ObjcClass::numConstructors): |
|
17362 * bindings/objc/objc_instance.h: |
|
17363 * bindings/objc/objc_runtime.h: |
|
17364 * bindings/objc/objc_runtime.mm: |
|
17365 (ObjcMethod::numParameters): |
|
17366 * bindings/runtime.h: |
|
17367 * kjs/identifier.h: |
|
17368 * kjs/internal.h: |
|
17369 * kjs/property_slot.h: |
|
17370 (KJS::PropertySlot::setCustomIndex): |
|
17371 (KJS::PropertySlot::index): |
|
17372 (KJS::PropertySlot::): |
|
17373 * kjs/regexp_object.cpp: |
|
17374 (RegExpObjectImp::backrefGetter): |
|
17375 (RegExpObjectImp::getOwnPropertySlot): |
|
17376 * kjs/simple_number.h: |
|
17377 (KJS::SimpleNumber::): |
|
17378 (KJS::SimpleNumber::value): |
|
17379 (KJS::SimpleNumber::fits): |
|
17380 (KJS::SimpleNumber::integerFits): |
|
17381 (KJS::SimpleNumber::make): |
|
17382 * kjs/string_object.cpp: |
|
17383 (substituteBackreferences): |
|
17384 * kjs/ustring.cpp: |
|
17385 (KJS::UString::from): |
|
17386 (KJS::UString::toUInt32): |
|
17387 (KJS::UString::find): |
|
17388 (KJS::UString::rfind): |
|
17389 * kjs/ustring.h: |
|
17390 * kjs/value.cpp: |
|
17391 (KJS::jsNumber): |
|
17392 * kjs/value.h: |
|
17393 |
|
17394 2005-09-11 Eric Seidel <eseidel@apple.com> |
|
17395 |
|
17396 No review requested, build fix affects only SVG. |
|
17397 |
|
17398 * JavaScriptCore.xcodeproj/project.pbxproj: Fixed JSC+SVG |
|
17399 Fixed JavaScriptCore+SVG after PCRE 6.1 merger. |
|
17400 http://bugs.webkit.org/show_bug.cgi?id=4932 |
|
17401 |
|
17402 2005-09-10 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
17403 |
|
17404 Reviewed and landed by Darin. |
|
17405 |
|
17406 * Makefile.vc: Added. |
|
17407 * README-Win32.txt: Added. |
|
17408 |
|
17409 2005-09-10 Darin Adler <darin@apple.com> |
|
17410 |
|
17411 - fixed compilation for WebCore (another try) |
|
17412 |
|
17413 * kjs/simple_number.h: Added more "using" lines. |
|
17414 |
|
17415 2005-09-10 Darin Adler <darin@apple.com> |
|
17416 |
|
17417 - fixed compilation for WebCore |
|
17418 |
|
17419 * kjs/simple_number.h: Have to include <cmath> here to work around a bug in the GCC |
|
17420 standard C++ library headers. |
|
17421 |
|
17422 2005-09-10 Darin Adler <darin@apple.com> |
|
17423 |
|
17424 Windows changes by Krzysztof Kowalczyk <kkowalczyk@gmail.com>. |
|
17425 |
|
17426 - fixed http://bugs.webkit.org/show_bug.cgi?id=4870 |
|
17427 win portability: fix IS_NEGATIVE_ZERO macro in simple_number.h |
|
17428 |
|
17429 * kjs/simple_number.h: |
|
17430 (KJS::isNegativeZero): Added. Inline function. Has a case for Windows that |
|
17431 uses _fpclass and a case for other platforms that uses signbit. |
|
17432 (KJS::SimpleNumber::fits): Use inline isNegativeZero instead of macro IS_NEGATIVE_ZERO. |
|
17433 |
|
17434 * kjs/internal.cpp: Remove definition of now-unneeded negZero global. |
|
17435 |
|
17436 * kjs/value.cpp: Touched the file because Xcode didn't know it needed to |
|
17437 recompile it. |
|
17438 |
|
17439 - improved test engine |
|
17440 |
|
17441 * tests/mozilla/jsDriver.pl: Sort tests in numeric order instead of using |
|
17442 a plain-ASCII sort; now test 33 will be after test 5 in any given set of |
|
17443 numbered tests. |
|
17444 |
|
17445 2005-09-08 Darin Adler <darin@apple.com> |
|
17446 |
|
17447 - fixed overloaded versions of throwError so that they substitute *all* |
|
17448 expected parameters into the message string -- some versions used to |
|
17449 skip parameters, resulting in "%s" being printed in the error message. |
|
17450 |
|
17451 Reviewed by Geoff. |
|
17452 |
|
17453 * kjs/nodes.h: Updated declarations to use "const &" and not to name parameters |
|
17454 * kjs/nodes.cpp: (Node::throwError): Updated to match above and add one missing |
|
17455 call to substitute. |
|
17456 |
|
17457 2005-09-08 Darin Adler <darin@apple.com> |
|
17458 |
|
17459 Reviewed by Geoff. |
|
17460 |
|
17461 - updated to PCRE 6.1 |
|
17462 |
|
17463 The original PCRE 6.1 sources are checked into the tree with the tag |
|
17464 "pcre-6-1" for reference. What we're checking in right now is the original |
|
17465 plus our changes to make it support UTF-16 and at least one other tweak |
|
17466 (vertical tab considered whitespace). Our work to get our changes was |
|
17467 done on "pcre-6-1-branch", with an anchor at "pcre-6-1-anchor" so you can |
|
17468 see the evolution of the UTF-16 changes. |
|
17469 |
|
17470 Note also that there was one small change made here that's not on the branch |
|
17471 in pcre_compile.c. |
|
17472 |
|
17473 * Info.plist: Updated the part of the copyright message that's about PCRE. |
|
17474 |
|
17475 * JavaScriptCore.xcodeproj/project.pbxproj: Added new PCRE source files, |
|
17476 removed obsolete ones. |
|
17477 |
|
17478 * pcre/AUTHORS: Updated to PCRE 6.1. Includes credits for Apple's UTF-16 |
|
17479 changes, but not the credits for Google's C++ wrapper, since we don't include that. |
|
17480 * pcre/COPYING: Updated to PCRE 6.1. |
|
17481 * pcre/LICENCE: Ditto. |
|
17482 * pcre/dftables.c: Ditto. |
|
17483 * pcre/pcre-config.h: Ditto. |
|
17484 * pcre/pcre.h: Ditto. |
|
17485 |
|
17486 * pcre/pcre_compile.c: Added for PCRE 6.1. |
|
17487 * pcre/pcre_config.c: Ditto. |
|
17488 * pcre/pcre_exec.c: Ditto. |
|
17489 * pcre/pcre_fullinfo.c: Ditto. |
|
17490 * pcre/pcre_get.c: Ditto. |
|
17491 * pcre/pcre_globals.c: Ditto. |
|
17492 * pcre/pcre_info.c: Ditto. |
|
17493 * pcre/pcre_internal.h: Ditto. |
|
17494 * pcre/pcre_maketables.c: Ditto. |
|
17495 * pcre/pcre_ord2utf8.c: Ditto. |
|
17496 * pcre/pcre_printint.c: Ditto. |
|
17497 * pcre/pcre_refcount.c: Ditto. |
|
17498 * pcre/pcre_study.c: Ditto. |
|
17499 * pcre/pcre_tables.c: Ditto. |
|
17500 * pcre/pcre_try_flipped.c: Ditto. |
|
17501 * pcre/pcre_ucp_findchar.c: Ditto. |
|
17502 * pcre/pcre_version.c: Ditto. |
|
17503 * pcre/pcre_xclass.c: Ditto. |
|
17504 * pcre/ucp.h: Ditto. |
|
17505 * pcre/ucp_findchar.c: Ditto. |
|
17506 * pcre/ucpinternal.h: Ditto. |
|
17507 * pcre/ucptable.c: Ditto. |
|
17508 |
|
17509 * pcre/get.c: Removed. |
|
17510 * pcre/internal.h: Removed. |
|
17511 * pcre/maketables.c: Removed. |
|
17512 * pcre/pcre.c: Removed. |
|
17513 * pcre/study.c: Removed. |
|
17514 |
|
17515 2005-09-07 Geoffrey Garen <ggaren@apple.com> |
|
17516 |
|
17517 -fixed http://bugs.webkit.org/show_bug.cgi?id=4781 |
|
17518 Date.setMonth fails with big values due to overflow |
|
17519 |
|
17520 Reviewed by darin. |
|
17521 |
|
17522 * kjs/date_object.cpp: |
|
17523 (timetUsingCF): for consistency, changed return statement to invalidDate instead of LONG_MAX |
|
17524 (KJS::fillStructuresUsingTimeArgs): modified for readability |
|
17525 (KJS::fillStructuresUsingDateArgs): new function analogous to fillStructuresUsingTimeArgs |
|
17526 (KJS::DateProtoFuncImp::callAsFunction): modified to use fillStructuresUsingDateArgs |
|
17527 (KJS::DateObjectImp::construct): moved variable declaration to proper scope |
|
17528 (KJS::DateObjectFuncImp::callAsFunction): moved variable declaration to proper scope |
|
17529 |
|
17530 2005-09-07 Geoffrey Garen <ggaren@apple.com> |
|
17531 -updated expected test results to reflect fix for |
|
17532 http://bugs.webkit.org/show_bug.cgi?id=4698 |
|
17533 kjs does not allow named functions in function expressions |
|
17534 |
|
17535 * tests/mozilla/expected.html: |
|
17536 |
|
17537 2005-09-04 Darin Adler <darin@apple.com> |
|
17538 |
|
17539 * kjs/identifier.cpp: Fix comment, add missing include. |
|
17540 (Follow-on to changes from yesterday.) |
|
17541 |
|
17542 2005-09-03 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
17543 |
|
17544 Reviewed, tweaked and landed by Darin. |
|
17545 |
|
17546 - another try at some of the Windows compilation fixes |
|
17547 should fix these bugs: 4546, 4831, 4834, 4643, 4830, 4832, 4833, 4835 |
|
17548 |
|
17549 * kjs/collector.cpp: Add missing <setjmp.h> include. |
|
17550 * kjs/date_object.cpp: Fix broken copysign macro. |
|
17551 * kjs/dtoa.cpp: Move macro definitions down after all header includes. |
|
17552 * kjs/fast_malloc.cpp: Add missing <assert.h> and <stddef.h> includes. |
|
17553 * kjs/function.cpp: Remove broken isxdigit definition. |
|
17554 * kjs/grammar.y: Add a missing semicolon (and remove an excess one). |
|
17555 * kjs/identifier.cpp: Turn off AVOID_STATIC_CONSTRUCTORS because the placement new syntax |
|
17556 doesn't seem to work in Visual C++ (I'm surprised to hear that, by the way). |
|
17557 * kjs/value.h: Made ValueImp's destructor virtual because otherwise pointers to ValueImp |
|
17558 on the stack aren't right for garbage collection on Windows (don't think it works that |
|
17559 way with gcc's virtual table scheme, but it's a harmless change). |
|
17560 |
|
17561 2005-09-03 Krzysztof Kowalczyk <kkowalczyk@gmail.com> |
|
17562 |
|
17563 Reviewed, tweaked and landed by Darin. |
|
17564 |
|
17565 - some Windows compilation fixes, hoping to fix the problems reported in these bugs: |
|
17566 4627, 4629, 4630, 4631, 4632, 4633, 4634, 4635, 4636, 4637, 4639, 4640, 4641, 4644, 4645 |
|
17567 |
|
17568 * kjs/collector.cpp: Include <windows.h> on WIN32. Put thread-related code inside |
|
17569 KJS_MULTIPLE_THREADS #if directives. |
|
17570 (KJS::Collector::markCurrentThreadConservatively): Use NT_TIB to find the stack base on Win32. |
|
17571 |
|
17572 * kjs/config.h: Define HAVE_SYS_TIMEB_H for Win32. |
|
17573 |
|
17574 * kjs/date_object.cpp: Add include of <limits.h>. Add definitions of strncasecmp, isfinite, and |
|
17575 copysign for Win32. |
|
17576 (KJS::KRFCDate_parseDate): Move "errno = 0" line down closer to the first call to strol -- I believe |
|
17577 that on Win32 there's some other call before that setting errno. |
|
17578 |
|
17579 * kjs/date_object.h: Remove unneeded include of <sys/time.h>. |
|
17580 |
|
17581 * kjs/dtoa.cpp: Add an undef of strtod, needed on Win32. |
|
17582 |
|
17583 * kjs/fast_malloc.cpp: Put #if !WIN32 around some customization that's not appropriate on Win32. |
|
17584 (KJS::region_list_append): Add a missing cast so this Win32-specific function compiles in C++. |
|
17585 (KJS::sbrk): Change parameter type to match the declaration. |
|
17586 |
|
17587 * kjs/function.cpp: (isxdigit): Define a locale-independent isxdigit on Win32. |
|
17588 |
|
17589 * kjs/function.h: Remove unneeded friend class Function for FunctionImp. |
|
17590 |
|
17591 * kjs/identifier.cpp: Took out the APPLE_CHANGES from around the AVOID_STATIC_CONSTRUCTORS |
|
17592 define. We ultimately intend to phase out APPLE_CHANGES entirely. Also fix the |
|
17593 non-AVOID_STATIC_CONSTRUCTORS code path. |
|
17594 |
|
17595 * kjs/internal.cpp: Remove uneeded include of <strings.h>, which was confused with <string.h>! |
|
17596 Add a Win32 implementation of copysign. Put the threads code inside KJS_MULTIPLE_THREADS. |
|
17597 |
|
17598 * kjs/internal.h: Define a KJS_MULTIPLE_THREADS macro on non-Win32 only. Later we can make this |
|
17599 specific to Mac OS X if we like. |
|
17600 |
|
17601 * kjs/interpreter_map.cpp: Add missing include of <stdlib.h>. |
|
17602 |
|
17603 * kjs/list.cpp: |
|
17604 (KJS::ListImp::markValues): Use std::min instead of MIN. |
|
17605 (KJS::List::copy): Ditto. |
|
17606 (KJS::List::copyTail): Ditto. |
|
17607 |
|
17608 * kjs/math_object.cpp: (signbit): Add a Win32 implementation of signbit. |
|
17609 |
|
17610 * kjs/nodes.cpp: (Node::finalCheck): Use unsigned instead of uint. |
|
17611 Put the use of always_inline inside __GNUC__. |
|
17612 |
|
17613 * kjs/number_object.cpp: (NumberProtoFuncImp::callAsFunction): Use "10.0" instead of "10" |
|
17614 inside all the calls to pow to avoid ambiguity caused by overloading of pow on Win32, seen |
|
17615 when passing an int rather than a double or float. |
|
17616 |
|
17617 * kjs/operations.cpp: |
|
17618 (KJS::isInf): Add Win32 implementation. |
|
17619 (KJS::isPosInf): Add Win32 implementation. |
|
17620 (KJS::isNegInf): Add Win32 implementation. |
|
17621 |
|
17622 * kjs/regexp.cpp: Use unsigned instead of uint. |
|
17623 * kjs/regexp.h: Ditto. |
|
17624 * kjs/regexp_object.cpp: Ditto. |
|
17625 * kjs/regexp_object.h: Ditto. |
|
17626 |
|
17627 2005-09-02 Beth Dakin <bdakin@apple.com> |
|
17628 |
|
17629 Fix for <rdar://problem/4235531> Denver Regression: Safari crash in KWQStringData::makeUnicode |
|
17630 The other half of the fix is in WebCore. |
|
17631 |
|
17632 Fix written by Maciej and Darin. |
|
17633 Reviewed by me/Maciej |
|
17634 |
|
17635 As Maciej said in Radar: These problems was caused by a conflict between some of our custom |
|
17636 allocators, causing them to return null. Symptom is typically a null pointer dereference in |
|
17637 a place where it might be expected an allocation has just occurred. |
|
17638 |
|
17639 * kjs/fast_malloc.cpp: Added #define for MORECORE_CONTIGUOUS, MORECORE_CANNOT_TRIM, |
|
17640 and MALLOC_FAILURE_ACTION. |
|
17641 |
|
17642 2005-08-31 Geoffrey Garen <ggaren@apple.com> |
|
17643 |
|
17644 -rolled in fix for http://bugs.webkit.org/show_bug.cgi?id=4698 |
|
17645 kjs does not allow named functions in function expressions |
|
17646 |
|
17647 Fix by Arthur Langereis. |
|
17648 |
|
17649 Reviewed by darin. |
|
17650 |
|
17651 * kjs/grammar.y: |
|
17652 * kjs/nodes.cpp: |
|
17653 (FuncExprNode::evaluate): |
|
17654 * kjs/nodes.h: |
|
17655 (KJS::FuncExprNode::FuncExprNode): |
|
17656 |
|
17657 Test cases added: |
|
17658 |
|
17659 * layout-tests/fast/js/named-function-expression-expected.txt: Added. |
|
17660 * layout-tests/fast/js/named-function-expression.html: Added. |
|
17661 |
|
17662 2005-08-31 Justin Haygood <justin@xiondigital.net> |
|
17663 |
|
17664 Reviewed, tweaked, and landed by Darin. |
|
17665 |
|
17666 - fixed http://bugs.webkit.org/show_bug.cgi?id=4085 |
|
17667 - fixed http://bugs.webkit.org/show_bug.cgi?id=4087 |
|
17668 - fixed http://bugs.webkit.org/show_bug.cgi?id=4096 |
|
17669 Some fixes for compiling on windows. |
|
17670 |
|
17671 * kjs/config.h: Added a WIN32 case in here, with suitable defines. |
|
17672 (To be tweaked as necessary.) |
|
17673 * kjs/function.cpp: Took out APPLE_CHANGES around use of ICU. |
|
17674 * kjs/operations.cpp: Removed some bogus code that always set HAVE_FLOAT_H. |
|
17675 |
|
17676 2005-08-30 Darin Adler <darin@apple.com> |
|
17677 |
|
17678 Reviewed by John Sullivan. |
|
17679 |
|
17680 - fixed http://bugs.webkit.org/show_bug.cgi?id=4758 |
|
17681 unify SharedPtr in WebCore and JavaScriptCore |
|
17682 |
|
17683 * kjs/shared_ptr.h: Updated namespace to KXMLCore instead of kxhmlcore. |
|
17684 Made a few small improvements to use local variables a bit more and added |
|
17685 an "operator int" to reduce the chance that we'll convert a SharedPtr to |
|
17686 an int by accident. Also made the == operators normal functions rather than |
|
17687 friend functions, added a couple of comemnts. |
|
17688 |
|
17689 * kjs/function.h: Updated for namespace change. |
|
17690 * kjs/function.cpp: Ditto. |
|
17691 * kjs/function_object.cpp: Ditto. |
|
17692 * kjs/internal.h: Ditto. |
|
17693 * kjs/internal.cpp: Ditto. |
|
17694 * kjs/nodes.h: Ditto. |
|
17695 * kjs/nodes2string.cpp: Ditto. |
|
17696 |
|
17697 2005-08-26 Maciej Stachowiak <mjs@apple.com> |
|
17698 |
|
17699 Reviewed by John. |
|
17700 |
|
17701 <rdar://problem/4224911> many many leaks in kjsyyparse with malformed Javascript |
|
17702 |
|
17703 Record all nodes that are created during parsing, and delete any |
|
17704 that are left floating with a refcount of 0. |
|
17705 |
|
17706 * kjs/internal.cpp: |
|
17707 (KJS::Parser::saveNewNode): |
|
17708 (KJS::clearNewNodes): |
|
17709 (KJS::Parser::parse): |
|
17710 * kjs/internal.h: |
|
17711 * kjs/nodes.cpp: |
|
17712 (Node::Node): |
|
17713 * kjs/nodes.h: |
|
17714 (KJS::Node::refcount): |
|
17715 |
|
17716 2005-08-26 Maciej Stachowiak <mjs@apple.com> |
|
17717 |
|
17718 Reviewed by John. |
|
17719 |
|
17720 - fixed <rdar://problem/4232452> many many leaks in kjsyyparse on some well-formed JavaScript (can repro on sony.com, webkit tests) |
|
17721 |
|
17722 Fixed by changing the refcounting scheme for nodes. Instead of each node implementing a custom ref and |
|
17723 deref for all its children (and being responsible for deleting them), nodes use a smart pointer to |
|
17724 hold their children, and smart pointers are used outside the node tree as well. This change mostly |
|
17725 removes code. |
|
17726 |
|
17727 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
17728 * kjs/function.cpp: |
|
17729 (KJS::DeclaredFunctionImp::DeclaredFunctionImp): |
|
17730 (KJS::GlobalFuncImp::callAsFunction): |
|
17731 * kjs/function.h: |
|
17732 * kjs/function_object.cpp: |
|
17733 (FunctionObjectImp::construct): |
|
17734 * kjs/grammar.y: |
|
17735 * kjs/internal.cpp: |
|
17736 (KJS::Parser::parse): |
|
17737 (KJS::Parser::accept): |
|
17738 (KJS::InterpreterImp::checkSyntax): |
|
17739 (KJS::InterpreterImp::evaluate): |
|
17740 * kjs/internal.h: |
|
17741 * kjs/nodes.cpp: |
|
17742 (Node::Node): |
|
17743 (Node::~Node): |
|
17744 (ElementNode::evaluate): |
|
17745 (PropertyValueNode::evaluate): |
|
17746 (ArgumentListNode::evaluateList): |
|
17747 (NewExprNode::evaluate): |
|
17748 (FunctionCallValueNode::evaluate): |
|
17749 (FunctionCallBracketNode::evaluate): |
|
17750 (FunctionCallDotNode::evaluate): |
|
17751 (RelationalNode::evaluate): |
|
17752 (StatListNode::execute): |
|
17753 (StatListNode::processVarDecls): |
|
17754 (VarDeclListNode::evaluate): |
|
17755 (VarDeclListNode::processVarDecls): |
|
17756 (ForInNode::ForInNode): |
|
17757 (ClauseListNode::processVarDecls): |
|
17758 (CaseBlockNode::evalBlock): |
|
17759 (FuncDeclNode::processFuncDecl): |
|
17760 (FuncExprNode::evaluate): |
|
17761 (SourceElementsNode::execute): |
|
17762 (SourceElementsNode::processFuncDecl): |
|
17763 (SourceElementsNode::processVarDecls): |
|
17764 * kjs/nodes.h: |
|
17765 (KJS::Node::ref): |
|
17766 (KJS::Node::deref): |
|
17767 (KJS::NumberNode::NumberNode): |
|
17768 (KJS::GroupNode::GroupNode): |
|
17769 (KJS::ElementNode::ElementNode): |
|
17770 (KJS::ArrayNode::ArrayNode): |
|
17771 (KJS::PropertyValueNode::PropertyValueNode): |
|
17772 (KJS::ObjectLiteralNode::ObjectLiteralNode): |
|
17773 (KJS::BracketAccessorNode::BracketAccessorNode): |
|
17774 (KJS::DotAccessorNode::DotAccessorNode): |
|
17775 (KJS::ArgumentListNode::ArgumentListNode): |
|
17776 (KJS::ArgumentsNode::ArgumentsNode): |
|
17777 (KJS::NewExprNode::NewExprNode): |
|
17778 (KJS::FunctionCallValueNode::FunctionCallValueNode): |
|
17779 (KJS::FunctionCallResolveNode::FunctionCallResolveNode): |
|
17780 (KJS::FunctionCallBracketNode::FunctionCallBracketNode): |
|
17781 (KJS::FunctionCallDotNode::FunctionCallDotNode): |
|
17782 (KJS::PostfixNode::PostfixNode): |
|
17783 (KJS::DeleteNode::DeleteNode): |
|
17784 (KJS::VoidNode::VoidNode): |
|
17785 (KJS::TypeOfNode::TypeOfNode): |
|
17786 (KJS::PrefixNode::PrefixNode): |
|
17787 (KJS::UnaryPlusNode::UnaryPlusNode): |
|
17788 (KJS::NegateNode::NegateNode): |
|
17789 (KJS::BitwiseNotNode::BitwiseNotNode): |
|
17790 (KJS::LogicalNotNode::LogicalNotNode): |
|
17791 (KJS::MultNode::MultNode): |
|
17792 (KJS::AddNode::AddNode): |
|
17793 (KJS::ShiftNode::ShiftNode): |
|
17794 (KJS::RelationalNode::RelationalNode): |
|
17795 (KJS::EqualNode::EqualNode): |
|
17796 (KJS::BitOperNode::BitOperNode): |
|
17797 (KJS::BinaryLogicalNode::BinaryLogicalNode): |
|
17798 (KJS::ConditionalNode::ConditionalNode): |
|
17799 (KJS::AssignResolveNode::AssignResolveNode): |
|
17800 (KJS::AssignBracketNode::AssignBracketNode): |
|
17801 (KJS::AssignDotNode::AssignDotNode): |
|
17802 (KJS::CommaNode::CommaNode): |
|
17803 (KJS::AssignExprNode::AssignExprNode): |
|
17804 (KJS::VarDeclListNode::VarDeclListNode): |
|
17805 (KJS::VarStatementNode::VarStatementNode): |
|
17806 (KJS::ExprStatementNode::ExprStatementNode): |
|
17807 (KJS::IfNode::IfNode): |
|
17808 (KJS::DoWhileNode::DoWhileNode): |
|
17809 (KJS::WhileNode::WhileNode): |
|
17810 (KJS::ForNode::ForNode): |
|
17811 (KJS::ReturnNode::ReturnNode): |
|
17812 (KJS::WithNode::WithNode): |
|
17813 (KJS::CaseClauseNode::CaseClauseNode): |
|
17814 (KJS::ClauseListNode::ClauseListNode): |
|
17815 (KJS::ClauseListNode::clause): |
|
17816 (KJS::ClauseListNode::next): |
|
17817 (KJS::SwitchNode::SwitchNode): |
|
17818 (KJS::LabelNode::LabelNode): |
|
17819 (KJS::ThrowNode::ThrowNode): |
|
17820 (KJS::CatchNode::CatchNode): |
|
17821 (KJS::FinallyNode::FinallyNode): |
|
17822 (KJS::TryNode::TryNode): |
|
17823 (KJS::ParameterNode::ParameterNode): |
|
17824 (KJS::ParameterNode::nextParam): |
|
17825 (KJS::FuncDeclNode::FuncDeclNode): |
|
17826 (KJS::FuncExprNode::FuncExprNode): |
|
17827 * kjs/nodes2string.cpp: |
|
17828 (KJS::SourceStream::operator<<): |
|
17829 (ElementNode::streamTo): |
|
17830 (PropertyValueNode::streamTo): |
|
17831 (ArgumentListNode::streamTo): |
|
17832 (StatListNode::streamTo): |
|
17833 (VarDeclListNode::streamTo): |
|
17834 (CaseBlockNode::streamTo): |
|
17835 (ParameterNode::streamTo): |
|
17836 (SourceElementsNode::streamTo): |
|
17837 * kjs/shared_ptr.h: Added. |
|
17838 (kxmlcore::SharedPtr::SharedPtr): |
|
17839 (kxmlcore::SharedPtr::~SharedPtr): |
|
17840 (kxmlcore::SharedPtr::isNull): |
|
17841 (kxmlcore::SharedPtr::notNull): |
|
17842 (kxmlcore::SharedPtr::reset): |
|
17843 (kxmlcore::SharedPtr::get): |
|
17844 (kxmlcore::SharedPtr::operator*): |
|
17845 (kxmlcore::SharedPtr::operator->): |
|
17846 (kxmlcore::SharedPtr::operator!): |
|
17847 (kxmlcore::SharedPtr::operator bool): |
|
17848 (kxmlcore::SharedPtr::operator==): |
|
17849 (kxmlcore::::operator): |
|
17850 (kxmlcore::operator!=): |
|
17851 (kxmlcore::static_pointer_cast): |
|
17852 (kxmlcore::const_pointer_cast): |
|
17853 |
|
17854 2005-08-26 Geoff Garen <ggaren@apple.com> |
|
17855 |
|
17856 Reviewed by John. |
|
17857 Landed by Darin. |
|
17858 |
|
17859 - fixed http://bugs.webkit.org/show_bug.cgi?id=4664 |
|
17860 TOT Crash from backwards null check in WebScriptObject.mm |
|
17861 |
|
17862 * bindings/objc/WebScriptObject.mm: |
|
17863 (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]): |
|
17864 Remove bogus !. |
|
17865 |
|
17866 2005-08-25 Darin Adler <darin@apple.com> |
|
17867 |
|
17868 Reviewed by John Sullivan. |
|
17869 |
|
17870 - rename KJS::UString::string() to KJS::UString::domString() |
|
17871 - rename KJS::Identifier::string() to KJS::Identifier::domString() |
|
17872 |
|
17873 * kjs/identifier.h: Renamed. |
|
17874 * kjs/ustring.h: Ditto. |
|
17875 |
|
17876 2005-08-19 Darin Adler <darin@apple.com> |
|
17877 |
|
17878 Reviewed by Maciej. |
|
17879 |
|
17880 - fixed http://bugs.webkit.org/show_bug.cgi?id=4435 |
|
17881 speed up JavaScript by tweaking the Identifier class |
|
17882 |
|
17883 * kjs/identifier.h: Add a new global nullIdentifier and make Identifier::null a function |
|
17884 that returns it. |
|
17885 * kjs/identifier.cpp: (KJS::Identifier::init): Initialize a global for the null identifier |
|
17886 as well as all the other globals for special identifiers. |
|
17887 |
|
17888 * kjs/ustring.h: (KJS::UString::UString): Make this empty constructor inline. |
|
17889 * kjs/ustring.cpp: Remove the old non-inline version. |
|
17890 |
|
17891 2005-08-19 Mitz Pettel <opendarwin.org@mitzpettel.com> |
|
17892 |
|
17893 Reviewed by Maciej. |
|
17894 Revised and landed by Darin. |
|
17895 |
|
17896 - fixed http://bugs.webkit.org/show_bug.cgi?id=4474 |
|
17897 REGRESSION: Crash when using in-place operator on uninitialized array element |
|
17898 |
|
17899 * kjs/nodes.cpp: |
|
17900 (AssignResolveNode::evaluate): Remove unneeded "isSet" assertion. |
|
17901 (AssignBracketNode::evaluate): Replace code that tested "isSet" with code that |
|
17902 tests the return value of getPropertySlot. |
|
17903 |
|
17904 * kjs/property_slot.h: Removed unneeded "isSet" function. Property slots are |
|
17905 either uninitialized or set. There's no "initialized and not set" state. |
|
17906 |
|
17907 2005-08-18 Adele Peterson <adele@apple.com> |
|
17908 |
|
17909 Checked "Inline Functions Hidden" box |
|
17910 |
|
17911 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
17912 |
|
17913 2005-08-16 Darin Adler <darin@apple.com> |
|
17914 |
|
17915 Reviewed by Geoff. |
|
17916 |
|
17917 - fixed crash in one of the JavaScript tests (introduced by my throwError change) |
|
17918 |
|
17919 * kjs/nodes.cpp: (Node::setExceptionDetailsIfNeeded): Check if the exception is an |
|
17920 object before setting the file and line number properties on it. Something to think |
|
17921 about in the future -- do we really want to do this on any object that's thrown? |
|
17922 How about limiting it to error objects that were created by the JavaScript engine? |
|
17923 |
|
17924 - changed kjs_fast_malloc so we don't have two conflicting versions of the same function |
|
17925 |
|
17926 * kjs/fast_malloc.h: Took out all the ifdefs from this header. |
|
17927 * kjs/fast_malloc.cpp: Added non-NDEBUG versions of the functions that just call |
|
17928 the system malloc, and put the NDEBUG versions in an #else. |
|
17929 |
|
17930 2005-08-16 Darin Adler <darin@apple.com> |
|
17931 |
|
17932 Reviewed by Geoff. |
|
17933 |
|
17934 - clean up exported symbols that are not in a "KJS" namespace |
|
17935 |
|
17936 * bindings/NP_jsobject.cpp: (identiferFromNPIdentifier): Marked this function static |
|
17937 so it no longer has external linkage. |
|
17938 * bindings/c/c_utility.h: Put all this stuff inside the KJS namespace. |
|
17939 * bindings/c/c_utility.cpp: Also marked some globals static so they don't have external |
|
17940 linkage; not as important given the namespace. |
|
17941 * bindings/npruntime.cpp: Marked functions static so they no longer have internal linkage. |
|
17942 Also removed unused _NPN_SetExceptionWithUTF8 function (not in header, had C++ linkage!). |
|
17943 |
|
17944 * bindings/jni/jni_utility.cpp: (KJS::Bindings::getJavaVM): Call KJS_GetCreatedJavaVMs |
|
17945 using the soft linking header, instead of calling the JNI call. This allows processes |
|
17946 to link both JavaScriptCore and JavaVM without a symbol conflict. |
|
17947 * bindings/softlinking.c: |
|
17948 (loadFramework): Marked this function static so it no longer has external linkage. |
|
17949 (getFunctionPointer): Ditto. |
|
17950 (KJS_GetCreatedJavaVMs): Renamed this so it has a KJS prefix. |
|
17951 |
|
17952 * JavaScriptCore.xcodeproj/project.pbxproj: Added softlinking.h. |
|
17953 * bindings/softlinking.h: Added. |
|
17954 |
|
17955 * kjs/nodes2string.cpp: (streamAssignmentOperatorTo): Marked this function static so it |
|
17956 no longer has external linkage. |
|
17957 |
|
17958 2005-08-15 Darin Adler <darin@apple.com> |
|
17959 |
|
17960 Reviewed by Geoff. |
|
17961 |
|
17962 - fixed http://bugs.webkit.org/show_bug.cgi?id=4437 |
|
17963 clean up error creation with new throwError function |
|
17964 |
|
17965 * bindings/NP_jsobject.cpp: |
|
17966 (_NPN_SetException): |
|
17967 * bindings/jni/jni_instance.cpp: |
|
17968 (JavaInstance::invokeMethod): |
|
17969 * bindings/jni/jni_runtime.cpp: |
|
17970 (JavaField::dispatchValueFromInstance): |
|
17971 (JavaField::dispatchSetValueToInstance): |
|
17972 * bindings/objc/WebScriptObject.mm: |
|
17973 (-[WebScriptObject _initializeWithObjectImp:originExecutionContext:executionContext:]): |
|
17974 (-[WebScriptObject _initWithObjectImp:originExecutionContext:executionContext:]): |
|
17975 (+[WebScriptObject throwException:]): |
|
17976 (-[WebScriptObject setException:]): |
|
17977 (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]): |
|
17978 * bindings/objc/objc_class.h: |
|
17979 (KJS::Bindings::ObjcClass::~ObjcClass): |
|
17980 (KJS::Bindings::ObjcClass::ObjcClass): |
|
17981 (KJS::Bindings::ObjcClass::operator=): |
|
17982 (KJS::Bindings::ObjcClass::constructorAt): |
|
17983 (KJS::Bindings::ObjcClass::numConstructors): |
|
17984 * bindings/objc/objc_header.h: |
|
17985 * bindings/objc/objc_runtime.h: |
|
17986 (KJS::Bindings::ObjcField::~ObjcField): |
|
17987 (KJS::Bindings::ObjcField::ObjcField): |
|
17988 (KJS::Bindings::ObjcField::operator=): |
|
17989 (KJS::Bindings::ObjcMethod::ObjcMethod): |
|
17990 (KJS::Bindings::ObjcMethod::~ObjcMethod): |
|
17991 (KJS::Bindings::ObjcMethod::operator=): |
|
17992 * bindings/objc/objc_runtime.mm: |
|
17993 (ObjcField::valueFromInstance): |
|
17994 (ObjcField::setValueToInstance): |
|
17995 (ObjcArray::setValueAt): |
|
17996 (ObjcArray::valueAt): |
|
17997 * bindings/objc/objc_utility.h: |
|
17998 * bindings/objc/objc_utility.mm: |
|
17999 (KJS::Bindings::JSMethodNameToObjCMethodName): |
|
18000 (KJS::Bindings::convertValueToObjcValue): |
|
18001 (KJS::Bindings::convertNSStringToString): |
|
18002 (KJS::Bindings::convertObjcValueToValue): |
|
18003 (KJS::Bindings::objcValueTypeForType): |
|
18004 (KJS::Bindings::createObjcInstanceForValue): |
|
18005 (KJS::Bindings::throwError): |
|
18006 * bindings/runtime.h: |
|
18007 (KJS::Bindings::Parameter::~Parameter): |
|
18008 (KJS::Bindings::Method::~Method): |
|
18009 (KJS::Bindings::Instance::Instance): |
|
18010 (KJS::Bindings::Instance::begin): |
|
18011 (KJS::Bindings::Instance::end): |
|
18012 (KJS::Bindings::Instance::getValueOfUndefinedField): |
|
18013 (KJS::Bindings::Instance::supportsSetValueOfUndefinedField): |
|
18014 (KJS::Bindings::Instance::setValueOfUndefinedField): |
|
18015 (KJS::Bindings::Instance::valueOf): |
|
18016 * bindings/runtime_array.cpp: |
|
18017 (RuntimeArrayImp::put): |
|
18018 * bindings/runtime_object.h: |
|
18019 (KJS::RuntimeObjectImp::setInternalInstance): |
|
18020 (KJS::RuntimeObjectImp::getInternalInstance): |
|
18021 * kjs/array_object.cpp: |
|
18022 (getProperty): |
|
18023 (ArrayProtoFuncImp::callAsFunction): |
|
18024 (ArrayObjectImp::construct): |
|
18025 * kjs/bool_object.cpp: |
|
18026 (BooleanProtoFuncImp::callAsFunction): |
|
18027 * kjs/date_object.cpp: |
|
18028 (KJS::DateProtoFuncImp::callAsFunction): |
|
18029 * kjs/function.cpp: |
|
18030 (KJS::decode): |
|
18031 (KJS::GlobalFuncImp::callAsFunction): |
|
18032 * kjs/function_object.cpp: |
|
18033 (FunctionProtoFuncImp::callAsFunction): |
|
18034 (FunctionObjectImp::construct): |
|
18035 * kjs/internal.cpp: |
|
18036 (KJS::UndefinedImp::toObject): |
|
18037 (KJS::NullImp::toObject): |
|
18038 (KJS::InterpreterImp::evaluate): |
|
18039 (KJS::InternalFunctionImp::hasInstance): |
|
18040 * kjs/nodes.cpp: |
|
18041 (Node::throwError): |
|
18042 (substitute): |
|
18043 (Node::setExceptionDetailsIfNeeded): |
|
18044 (undefinedVariableError): |
|
18045 (ProgramNode::ProgramNode): |
|
18046 * kjs/number_object.cpp: |
|
18047 (NumberProtoFuncImp::callAsFunction): |
|
18048 * kjs/object.cpp: |
|
18049 (KJS::ObjectImp::call): |
|
18050 (KJS::ObjectImp::defaultValue): |
|
18051 (KJS::Error::create): |
|
18052 (KJS::throwError): |
|
18053 * kjs/object.h: |
|
18054 (KJS::ObjectImp::clearProperties): |
|
18055 (KJS::ObjectImp::getPropertySlot): |
|
18056 (KJS::ObjectImp::getOwnPropertySlot): |
|
18057 * kjs/object_object.cpp: |
|
18058 (ObjectProtoFuncImp::callAsFunction): |
|
18059 * kjs/reference.cpp: |
|
18060 (KJS::Reference::getBase): |
|
18061 (KJS::Reference::getValue): |
|
18062 (KJS::Reference::putValue): |
|
18063 (KJS::Reference::deleteValue): |
|
18064 * kjs/regexp_object.cpp: |
|
18065 (RegExpProtoFuncImp::callAsFunction): |
|
18066 (RegExpObjectImp::construct): |
|
18067 * kjs/string_object.cpp: |
|
18068 (StringProtoFuncImp::callAsFunction): |
|
18069 |
|
18070 2005-08-15 Anders Carlsson <andersca@mac.com> |
|
18071 |
|
18072 Reviewed by Darin. |
|
18073 |
|
18074 * tests/mozilla/ecma_3/Date/15.9.5.5.js: |
|
18075 Remove the code which tests that Date.toLocaleString should be parsable |
|
18076 by Date.parse. That is not true according to the spec. |
|
18077 |
|
18078 2005-08-15 Darin Adler <darin@apple.com> |
|
18079 |
|
18080 Reviewed by Geoff. |
|
18081 |
|
18082 * kjs/collector.cpp: (KJS::Collector::allocate): Use a local instead of a global in one |
|
18083 more place; slight speedup. |
|
18084 |
|
18085 2005-08-14 Darin Adler <darin@apple.com> |
|
18086 |
|
18087 Reviewed by Maciej. |
|
18088 |
|
18089 - fixed crash observed on one of the Apple-only layout tests |
|
18090 |
|
18091 * kjs/property_map.cpp: (KJS::PropertyMap::mark): Change code to understand that deleted |
|
18092 entries have a value of NULL, so the deleted sentinel count doesn't need to be included |
|
18093 in the count of things to mark since we're ignoring the keys. |
|
18094 |
|
18095 2005-08-14 Darin Adler <darin@apple.com> |
|
18096 |
|
18097 Reviewed by Maciej. |
|
18098 |
|
18099 - fixed http://bugs.webkit.org/show_bug.cgi?id=4421 |
|
18100 speed up JavaScript by inlining some label stack functions |
|
18101 |
|
18102 * kjs/internal.h: Removed the copy constructor and assignment operator for LabelStack. |
|
18103 They were unused, and the implementations had bugs; I removed them rather than fixing them. |
|
18104 Also removed the clear function, since that was only needed to help the assignment operator |
|
18105 share code with the destructor, and was not efficient enough for the destructor. |
|
18106 (KJS::LabelStack::~LabelStack): Made this inline. Also used an efficient implementation |
|
18107 that's nice and fast when the stack is empty, better than the old clear() function which |
|
18108 used to keep updating and refetching "tos" each time through the loop. |
|
18109 (KJS::LabelStack::pop): Made this inline. |
|
18110 |
|
18111 * kjs/internal.cpp: Deleted the now-inline functions and the obsolete functions. Also |
|
18112 deleted a commented-out line of code. |
|
18113 |
|
18114 2005-08-14 Darin Adler <darin@apple.com> |
|
18115 |
|
18116 Reviewed by Maciej. |
|
18117 |
|
18118 - fixed http://bugs.webkit.org/show_bug.cgi?id=4419 |
|
18119 speed up JavaScript by improving KJS::List |
|
18120 |
|
18121 my measurements show an improvement of 1% on iBench JavaScript |
|
18122 |
|
18123 * kjs/list.cpp: Rearrange list to make the values and free list share the same storage, |
|
18124 which saves 4 bytes per list. Also remove the pointers used only on the heap from the |
|
18125 lists that are in the pool, which saves 8 bytes per list. Moving the free list pointer |
|
18126 closer to the start of the list object also speeds up access to the free list. New |
|
18127 "HeapListImp" struct is used only for the lists on the heap. |
|
18128 (KJS::List::markProtectedLists): Shadowed global variable in local and updated for the |
|
18129 new terminology ("heap" instead of "outside pool"). |
|
18130 (KJS::allocateListImp): Updated for new terminology. |
|
18131 (KJS::List::release): Moved the code from deallocateListImp in here -- it wasn't being |
|
18132 inlined and didn't need to be in a separate function. |
|
18133 |
|
18134 2005-08-14 Darin Adler <darin@apple.com> |
|
18135 |
|
18136 Reviewed by Maciej. |
|
18137 |
|
18138 - fixed http://bugs.webkit.org/show_bug.cgi?id=4417 |
|
18139 speed up JavaScript with some small changes to the property map code |
|
18140 |
|
18141 my measurements show an improvement of 2% on iBench JavaScript |
|
18142 |
|
18143 * kjs/property_map.h: (KJS::PropertyMap::PropertyMap): Made the default constructor inline. |
|
18144 * kjs/property_map.cpp: |
|
18145 (KJS::PropertyMap::~PropertyMap): Changed loop to exit early once we know we've processed |
|
18146 all the hash table entries, based on the count. |
|
18147 (KJS::PropertyMap::mark): Ditto. |
|
18148 |
|
18149 * kjs/object.h: Made an arbitrary change here to force recompiling so we pick up changes to |
|
18150 property_map.h. Works around what seems to be an Xcode header dependency bug. |
|
18151 |
|
18152 2005-08-14 Darin Adler <darin@apple.com> |
|
18153 |
|
18154 Reviewed by Maciej. |
|
18155 |
|
18156 - fixed http://bugs.webkit.org/show_bug.cgi?id=4416 |
|
18157 speed up JavaScript with some improvements to the garbage collector |
|
18158 |
|
18159 my measurements show an improvement of 2% on iBench JavaScript |
|
18160 |
|
18161 * kjs/collector.cpp: |
|
18162 (KJS::Collector::allocate): Use local variables to shadow globals instead of repeatedly |
|
18163 going at global variables. Tighten up loop implementations to make the common case fast. |
|
18164 (KJS::Collector::markStackObjectsConservatively): Use local variables to shadow globals. |
|
18165 Used a goto to eliminate a boolean since it was showing up in the profile. |
|
18166 (KJS::Collector::markProtectedObjects): Iterate through the table using pointer rather |
|
18167 than an index since the profile showed that generating better code. |
|
18168 (KJS::Collector::collect): Added a special case for blocks where all cells are used, |
|
18169 Use local variables to shadow globals. Eliminated a boolean by computing it another |
|
18170 way (checking to see if the number of live objects changed). Also used local variables |
|
18171 to shadow fields in the current cell when sweeping. |
|
18172 (KJS::Collector::numReferencedObjects): Use AllocatedValueImp instead of ValueImp |
|
18173 in one place -- means we get faster versions of various functions that don't worry |
|
18174 about SimpleNumber. |
|
18175 (KJS::className): Ditto. |
|
18176 (KJS::Collector::rootObjectClasses): Ditto. |
|
18177 |
|
18178 2005-08-14 Darin Adler <darin@apple.com> |
|
18179 |
|
18180 - fixed http://bugs.webkit.org/show_bug.cgi?id=4344 |
|
18181 REGRESSION: JavaScript crash when going back from viewing a thread (NULL protoype) |
|
18182 |
|
18183 * kjs/error_object.cpp: (NativeErrorImp::NativeErrorImp): Set proto in a more |
|
18184 straightforward way. The old code set the proto to 0 and then to the correct value. |
|
18185 This showed up as a "false positive" when searching for places that set prototype |
|
18186 to NULL/0 so I fixed it. |
|
18187 |
|
18188 * kjs/function_object.cpp: (FunctionPrototypeImp::FunctionPrototypeImp): Change to |
|
18189 not pass an explicit "0" to the base class (InternalFunctionImp) constructor. |
|
18190 |
|
18191 * kjs/internal.h: Added a default constructor for InternalFunctionImp. |
|
18192 * kjs/internal.cpp: (KJS::InternalFunctionImp::InternalFunctionImp): Added the |
|
18193 default constructor (empty body, just calls base class's default constructor). |
|
18194 |
|
18195 * kjs/object.h: |
|
18196 (KJS::ObjectImp::ObjectImp): Add an assertion to catch NULL prototypes earlier |
|
18197 in Development builds. |
|
18198 (KJS::ObjectImp::setPrototype): Ditto. |
|
18199 |
|
18200 2005-08-12 Maciej Stachowiak <mjs@apple.com> |
|
18201 |
|
18202 Reviewed by John. |
|
18203 |
|
18204 - two simple speed improvements for a 3% speed gain |
|
18205 |
|
18206 * JavaScriptCore.xcodeproj/project.pbxproj: turn on -fstrict-aliasing |
|
18207 |
|
18208 * kjs/scope_chain.h: |
|
18209 (KJS::ScopeChainIterator::ScopeChainIterator): Add a scope chain iterator |
|
18210 so you can walk a scope chain without having to make a copy that you then mutate. |
|
18211 (KJS::ScopeChainIterator::operator*): standard iterator operation |
|
18212 (KJS::ScopeChainIterator::operator->): ditto |
|
18213 (KJS::ScopeChainIterator::operator++): ditto |
|
18214 (KJS::ScopeChainIterator::operator==): ditto |
|
18215 (KJS::ScopeChainIterator::operator!=): ditto |
|
18216 (KJS::ScopeChain::begin): Iterator for the top of the scope chain |
|
18217 (KJS::ScopeChain::end): Iterator for one past the bottom (i.e. null) |
|
18218 * kjs/nodes.cpp: |
|
18219 (ResolveNode::evaluate): Use scope chain iterator instead of copying |
|
18220 a scope chain and then modifying the copy |
|
18221 (ResolveNode::evaluateReference): ditto |
|
18222 (FunctionCallResolveNode::evaluate): ditto |
|
18223 (AssignResolveNode::evaluate): ditto |
|
18224 |
|
18225 2005-08-12 Maciej Stachowiak <mjs@apple.com> |
|
18226 |
|
18227 Patch from Anders Carlsson, reviewed by me. |
|
18228 |
|
18229 * kjs/nodes.h: Fix build breakage. |
|
18230 |
|
18231 2005-08-12 Maciej Stachowiak <mjs@apple.com> |
|
18232 |
|
18233 Reviewed by hyatt. |
|
18234 |
|
18235 - refactor function calls, 3% speedup on JS iBench. |
|
18236 |
|
18237 * kjs/grammar.y: |
|
18238 * kjs/nodes.cpp: |
|
18239 (Node::throwError): Added new useful variants. |
|
18240 (FunctionCallValueNode::evaluate): New node to handle calls on expressions |
|
18241 that are strictly values, not references. |
|
18242 (FunctionCallValueNode::ref): ditto |
|
18243 (FunctionCallValueNode::deref): ditto |
|
18244 (FunctionCallResolveNode::evaluate): New node to handle calls on identifier |
|
18245 expressions, so that they are looked up in the scope chain. |
|
18246 (FunctionCallResolveNode::ref): ditto |
|
18247 (FunctionCallResolveNode::deref): ditto |
|
18248 (FunctionCallBracketNode::evaluate): New node to handle calls on bracket |
|
18249 dereferences, so that the expression before brackets is used as the this |
|
18250 object. |
|
18251 (FunctionCallBracketNode::ref): ditto |
|
18252 (FunctionCallBracketNode::deref): ditto |
|
18253 (FunctionCallDotNode::evaluate): New node to handle calls on dot |
|
18254 dereferences, so that the expression before the dot is used as the this |
|
18255 object. |
|
18256 (FunctionCallDotNode::ref): ditto |
|
18257 (FunctionCallDotNode::deref): ditto |
|
18258 (dotExprNotAnObjectString): helper function to avoid global variable access. |
|
18259 (dotExprDoesNotAllowCallsString): ditto |
|
18260 * kjs/nodes.h: Declared new classes. |
|
18261 * kjs/nodes2string.cpp: |
|
18262 (FunctionCallValueNode::streamTo): Added - serializes the appropriate function call |
|
18263 (FunctionCallResolveNode::streamTo): ditto |
|
18264 (FunctionCallBracketNode::streamTo): ditto |
|
18265 (FunctionCallParenBracketNode::streamTo): ditto |
|
18266 (FunctionCallDotNode::streamTo): ditto |
|
18267 (FunctionCallParenDotNode::streamTo): ditto |
|
18268 * kjs/object.h: |
|
18269 (KJS::ObjectImp::isActivation): Change how activation objects are |
|
18270 detected in the scope chain, a virtual function is cheaper than the |
|
18271 old inheritance test. |
|
18272 * kjs/function.h: |
|
18273 (KJS::ActivationImp::isActivation): Ditto. |
|
18274 |
|
18275 2005-08-11 Maciej Stachowiak <mjs@apple.com> |
|
18276 |
|
18277 - added missing file from earlier checkin |
|
18278 |
|
18279 * kjs/grammar_types.h: Added. |
|
18280 (KJS::makeNodePair): |
|
18281 (KJS::makeNodeWithIdent): |
|
18282 |
|
18283 2005-08-11 Maciej Stachowiak <mjs@apple.com> |
|
18284 |
|
18285 Reviewed by Geoff. |
|
18286 |
|
18287 * kjs/date_object.cpp: |
|
18288 (timetUsingCF): Fix one of the date tests my making the CF version of mktime |
|
18289 have the same quirk about the DST field as the real mktime. |
|
18290 * tests/mozilla/expected.html: Updated for newly fixed test. |
|
18291 |
|
18292 2005-08-11 Maciej Stachowiak <mjs@apple.com> |
|
18293 |
|
18294 - updated for one of the tests that Darin incidentally fixed. |
|
18295 |
|
18296 * tests/mozilla/expected.html: |
|
18297 |
|
18298 2005-08-10 Maciej Stachowiak <mjs@apple.com> |
|
18299 |
|
18300 Reviewed by Geoff. |
|
18301 |
|
18302 Refactor assignment grammar to avoid Reference type, and to later |
|
18303 be able to take advantage of writeable PropertySlots, when those |
|
18304 are added. I also fixed a minor bug, turning a function to a |
|
18305 string lost parentheses, I made sure they are printed at least |
|
18306 where semantically significant. |
|
18307 |
|
18308 Test cases: see WebCore |
|
18309 |
|
18310 * kjs/grammar.y: Change grammar so that assignment expressions are parsed |
|
18311 directly to nodes that know how to set the kind of location being assigned, instead |
|
18312 of having a generic assign node that counts on evaluateReference. |
|
18313 * kjs/lexer.cpp: Include grammar_types.h. |
|
18314 * kjs/nodes.cpp: |
|
18315 (BracketAccessorNode): Renamed from AccessorNode1 for clarity. |
|
18316 (DotAccessorNode): Renamed from AccessorNode2 for clarity. |
|
18317 (combineForAssignment): Inline function for doing the proper kind of |
|
18318 operation for various update assignments like += or *=. |
|
18319 (AssignResolveNode): Node that handles assignment to a bare identifier. |
|
18320 (AssignDotNode): Node that handles assignments of the form EXPR . IDENT = EXPR |
|
18321 (AssignBracketNode): EXPR [ IDENT ] = EXPR |
|
18322 * kjs/nodes.h: Updated for declarations/renames of new classes. |
|
18323 * kjs/nodes2string.cpp: |
|
18324 (GroupNode::streamTo): Fixed to print parens around the expression. |
|
18325 (BracketAccessorNode::streamTo): Renamed. |
|
18326 (DotAccessorNode::streamTo): Renamed. |
|
18327 (AssignResolveNode::streamTo): Added. |
|
18328 (AssignBracketNode::streamTo): Added. |
|
18329 (AssignDotNode::streamTo): Added. |
|
18330 (streamAssignmentOperatorTo): helper function for the above |
|
18331 * kjs/property_slot.h: |
|
18332 (KJS::PropertySlot::isSet): Made this const. |
|
18333 |
|
18334 2005-08-10 Adele Peterson <adele@apple.com> |
|
18335 |
|
18336 Bumping version to 420+ |
|
18337 |
|
18338 * Info.plist: |
|
18339 |
|
18340 2005-08-10 Geoffrey Garen <ggaren@apple.com> |
|
18341 |
|
18342 -fixed <rdar://problem/4151132> REGRESSION: Some applet liveconnect calls |
|
18343 throws privilege exception. |
|
18344 |
|
18345 Reviewed by richard and mjs. |
|
18346 |
|
18347 -I removed the global static JavaClass cache, since it violated Java |
|
18348 security to cache classes between websites and applets. |
|
18349 |
|
18350 * bindings/jni/jni_class.cpp: |
|
18351 -removed global static cache dictionary |
|
18352 -instance constructor and destructor now do the work that used to |
|
18353 be done by static factory methods |
|
18354 -removed obsolete functions |
|
18355 (JavaClass::JavaClass): |
|
18356 (JavaClass::~JavaClass): |
|
18357 * bindings/jni/jni_class.h: |
|
18358 -removed obsolete function declarations |
|
18359 -made copying private since it's unused and it's also not clear |
|
18360 excatly how copying would work with Java security |
|
18361 -made default construction private since it's meaningless |
|
18362 * bindings/jni/jni_instance.cpp: |
|
18363 -removed obsolete functions |
|
18364 (JavaInstance::~JavaInstance): |
|
18365 (JavaInstance::getClass): |
|
18366 * bindings/jni/jni_instance.h: |
|
18367 -made copying private since it's unused and it's also not clear |
|
18368 excatly how copying would work with Java security |
|
18369 -made default construction private since it's meaningless |
|
18370 |
|
18371 2005-08-08 Geoffrey Garen <ggaren@apple.com> |
|
18372 |
|
18373 -fixed crash caused by fix for http://bugs.webkit.org/show_bug.cgi?id=4313 |
|
18374 |
|
18375 - exceptionDescription now gets explicitly initialized to NULL in all |
|
18376 the places listed below -- our wrapper classes used to take care of this |
|
18377 automagically |
|
18378 |
|
18379 * bindings/jni/jni_instance.cpp: |
|
18380 (JavaInstance::invokeMethod): |
|
18381 * bindings/jni/jni_runtime.cpp: |
|
18382 (JavaField::dispatchValueFromInstance): |
|
18383 (JavaField::dispatchSetValueToInstance): |
|
18384 |
|
18385 2005-08-08 Darin Adler <darin@apple.com> |
|
18386 |
|
18387 Reviewed by John Sullivan. |
|
18388 |
|
18389 - fixed http://bugs.webkit.org/show_bug.cgi?id=4325 |
|
18390 Mozilla Date tests have an unnecessary loop that runs 1970 times before each test |
|
18391 |
|
18392 * tests/mozilla/ecma/shell.js: Added TIME_YEAR_0 constant. |
|
18393 |
|
18394 * tests/mozilla/ecma/Date/15.9.5.10-1.js: Removed the loop and changed code to use the constant. |
|
18395 * tests/mozilla/ecma/Date/15.9.5.10-10.js: Ditto. |
|
18396 * tests/mozilla/ecma/Date/15.9.5.10-11.js: Ditto. |
|
18397 * tests/mozilla/ecma/Date/15.9.5.10-12.js: Ditto. |
|
18398 * tests/mozilla/ecma/Date/15.9.5.10-13.js: Ditto. |
|
18399 * tests/mozilla/ecma/Date/15.9.5.10-2.js: Ditto. |
|
18400 * tests/mozilla/ecma/Date/15.9.5.10-3.js: Ditto. |
|
18401 * tests/mozilla/ecma/Date/15.9.5.10-4.js: Ditto. |
|
18402 * tests/mozilla/ecma/Date/15.9.5.10-5.js: Ditto. |
|
18403 * tests/mozilla/ecma/Date/15.9.5.10-6.js: Ditto. |
|
18404 * tests/mozilla/ecma/Date/15.9.5.10-7.js: Ditto. |
|
18405 * tests/mozilla/ecma/Date/15.9.5.10-8.js: Ditto. |
|
18406 * tests/mozilla/ecma/Date/15.9.5.10-9.js: Ditto. |
|
18407 * tests/mozilla/ecma/Date/15.9.5.11-2.js: Ditto. |
|
18408 * tests/mozilla/ecma/Date/15.9.5.12-1.js: Ditto. |
|
18409 * tests/mozilla/ecma/Date/15.9.5.12-2.js: Ditto. |
|
18410 * tests/mozilla/ecma/Date/15.9.5.12-3.js: Ditto. |
|
18411 * tests/mozilla/ecma/Date/15.9.5.12-4.js: Ditto. |
|
18412 * tests/mozilla/ecma/Date/15.9.5.12-5.js: Ditto. |
|
18413 * tests/mozilla/ecma/Date/15.9.5.12-6.js: Ditto. |
|
18414 * tests/mozilla/ecma/Date/15.9.5.12-7.js: Ditto. |
|
18415 * tests/mozilla/ecma/Date/15.9.5.12-8.js: Ditto. |
|
18416 * tests/mozilla/ecma/Date/15.9.5.13-2.js: Ditto. |
|
18417 * tests/mozilla/ecma/Date/15.9.5.13-8.js: Ditto. |
|
18418 * tests/mozilla/ecma/Date/15.9.5.14.js: Ditto. |
|
18419 * tests/mozilla/ecma/Date/15.9.5.15.js: Ditto. |
|
18420 * tests/mozilla/ecma/Date/15.9.5.16.js: Ditto. |
|
18421 * tests/mozilla/ecma/Date/15.9.5.17.js: Ditto. |
|
18422 * tests/mozilla/ecma/Date/15.9.5.18.js: Ditto. |
|
18423 * tests/mozilla/ecma/Date/15.9.5.19.js: Ditto. |
|
18424 * tests/mozilla/ecma/Date/15.9.5.20.js: Ditto. |
|
18425 * tests/mozilla/ecma/Date/15.9.5.21-1.js: Ditto. |
|
18426 * tests/mozilla/ecma/Date/15.9.5.21-2.js: Ditto. |
|
18427 * tests/mozilla/ecma/Date/15.9.5.21-3.js: Ditto. |
|
18428 * tests/mozilla/ecma/Date/15.9.5.21-4.js: Ditto. |
|
18429 * tests/mozilla/ecma/Date/15.9.5.21-5.js: Ditto. |
|
18430 * tests/mozilla/ecma/Date/15.9.5.21-6.js: Ditto. |
|
18431 * tests/mozilla/ecma/Date/15.9.5.21-7.js: Ditto. |
|
18432 * tests/mozilla/ecma/Date/15.9.5.21-8.js: Ditto. |
|
18433 * tests/mozilla/ecma/Date/15.9.5.22-1.js: Ditto. |
|
18434 * tests/mozilla/ecma/Date/15.9.5.22-2.js: Ditto. |
|
18435 * tests/mozilla/ecma/Date/15.9.5.22-3.js: Ditto. |
|
18436 * tests/mozilla/ecma/Date/15.9.5.22-4.js: Ditto. |
|
18437 * tests/mozilla/ecma/Date/15.9.5.22-5.js: Ditto. |
|
18438 * tests/mozilla/ecma/Date/15.9.5.22-6.js: Ditto. |
|
18439 * tests/mozilla/ecma/Date/15.9.5.22-7.js: Ditto. |
|
18440 * tests/mozilla/ecma/Date/15.9.5.22-8.js: Ditto. |
|
18441 * tests/mozilla/ecma/Date/15.9.5.23-4.js: Ditto. |
|
18442 * tests/mozilla/ecma/Date/15.9.5.23-5.js: Ditto. |
|
18443 * tests/mozilla/ecma/Date/15.9.5.23-6.js: Ditto. |
|
18444 * tests/mozilla/ecma/Date/15.9.5.23-7.js: Ditto. |
|
18445 * tests/mozilla/ecma/Date/15.9.5.23-8.js: Ditto. |
|
18446 * tests/mozilla/ecma/Date/15.9.5.23-9.js: Ditto. |
|
18447 * tests/mozilla/ecma/Date/15.9.5.5.js: Ditto. |
|
18448 * tests/mozilla/ecma/Date/15.9.5.6.js: Ditto. |
|
18449 * tests/mozilla/ecma/Date/15.9.5.7.js: Ditto. |
|
18450 * tests/mozilla/ecma/Date/15.9.5.8.js: Ditto. |
|
18451 * tests/mozilla/ecma/Date/15.9.5.9.js: Ditto. |
|
18452 |
|
18453 2005-08-08 Darin Adler <darin@apple.com> |
|
18454 |
|
18455 - forgot to delete an obsolete file |
|
18456 |
|
18457 * kjs/object_wrapper.h: Deleted. |
|
18458 |
|
18459 2005-08-07 Darin Adler <darin@apple.com> |
|
18460 |
|
18461 - fixed two problems compiling with gcc 4.0 |
|
18462 |
|
18463 * kjs/array_object.cpp: (ArrayProtoFuncImp::callAsFunction): Initialized a |
|
18464 variable to quiet an erroneous warning. |
|
18465 * kjs/date_object.cpp: (KJS::makeTime): Removed extraneous KJS:: prefix. |
|
18466 |
|
18467 2005-08-07 Darin Adler <darin@apple.com> |
|
18468 |
|
18469 Rubber stamped by Maciej. |
|
18470 |
|
18471 - fixed http://bugs.webkit.org/show_bug.cgi?id=4313 |
|
18472 eliminate KJS::Value and KJS::Object smart pointer wrappers (for simplicity and speed) |
|
18473 |
|
18474 * JavaScriptCore.xcodeproj/project.pbxproj: Removed object_wrapper.h. |
|
18475 |
|
18476 Global replaces and other wonderful stuff. |
|
18477 |
|
18478 * bindings/NP_jsobject.cpp: |
|
18479 (_NPN_Invoke): |
|
18480 (_NPN_Evaluate): |
|
18481 (_NPN_GetProperty): |
|
18482 (_NPN_SetProperty): |
|
18483 (_NPN_HasMethod): |
|
18484 (_NPN_SetException): |
|
18485 * bindings/c/c_instance.cpp: |
|
18486 (KJS::Bindings::CInstance::CInstance): |
|
18487 (KJS::Bindings::CInstance::invokeMethod): |
|
18488 (KJS::Bindings::CInstance::invokeDefaultMethod): |
|
18489 (KJS::Bindings::CInstance::defaultValue): |
|
18490 (KJS::Bindings::CInstance::stringValue): |
|
18491 (KJS::Bindings::CInstance::numberValue): |
|
18492 (KJS::Bindings::CInstance::booleanValue): |
|
18493 (KJS::Bindings::CInstance::valueOf): |
|
18494 * bindings/c/c_instance.h: |
|
18495 * bindings/c/c_runtime.cpp: |
|
18496 (CField::valueFromInstance): |
|
18497 (CField::setValueToInstance): |
|
18498 * bindings/c/c_runtime.h: |
|
18499 * bindings/c/c_utility.cpp: |
|
18500 (convertNPStringToUTF16): |
|
18501 (convertUTF8ToUTF16): |
|
18502 (coerceValueToNPVariantStringType): |
|
18503 (convertValueToNPVariant): |
|
18504 (convertNPVariantToValue): |
|
18505 * bindings/c/c_utility.h: |
|
18506 * bindings/jni/jni_instance.cpp: |
|
18507 (JavaInstance::stringValue): |
|
18508 (JavaInstance::numberValue): |
|
18509 (JavaInstance::booleanValue): |
|
18510 (JavaInstance::invokeMethod): |
|
18511 (JavaInstance::invokeDefaultMethod): |
|
18512 (JavaInstance::defaultValue): |
|
18513 (JavaInstance::valueOf): |
|
18514 * bindings/jni/jni_instance.h: |
|
18515 * bindings/jni/jni_jsobject.cpp: |
|
18516 (JSObject::invoke): |
|
18517 (JSObject::call): |
|
18518 (JSObject::eval): |
|
18519 (JSObject::getMember): |
|
18520 (JSObject::getSlot): |
|
18521 (JSObject::toString): |
|
18522 (JSObject::convertValueToJObject): |
|
18523 (JSObject::convertJObjectToValue): |
|
18524 (JSObject::listFromJArray): |
|
18525 * bindings/jni/jni_jsobject.h: |
|
18526 * bindings/jni/jni_objc.mm: |
|
18527 (KJS::Bindings::dispatchJNICall): |
|
18528 * bindings/jni/jni_runtime.cpp: |
|
18529 (JavaArray::convertJObjectToArray): |
|
18530 (JavaField::dispatchValueFromInstance): |
|
18531 (JavaField::valueFromInstance): |
|
18532 (JavaField::dispatchSetValueToInstance): |
|
18533 (JavaField::setValueToInstance): |
|
18534 (JavaArray::setValueAt): |
|
18535 (JavaArray::valueAt): |
|
18536 * bindings/jni/jni_runtime.h: |
|
18537 (KJS::Bindings::JavaString::ustring): |
|
18538 * bindings/jni/jni_utility.cpp: |
|
18539 (KJS::Bindings::getJavaVM): |
|
18540 (KJS::Bindings::getJNIEnv): |
|
18541 (KJS::Bindings::getMethodID): |
|
18542 (KJS::Bindings::callJNIVoidMethod): |
|
18543 (KJS::Bindings::callJNIObjectMethod): |
|
18544 (KJS::Bindings::callJNIBooleanMethod): |
|
18545 (KJS::Bindings::callJNIStaticBooleanMethod): |
|
18546 (KJS::Bindings::callJNIByteMethod): |
|
18547 (KJS::Bindings::callJNICharMethod): |
|
18548 (KJS::Bindings::callJNIShortMethod): |
|
18549 (KJS::Bindings::callJNIIntMethod): |
|
18550 (KJS::Bindings::callJNILongMethod): |
|
18551 (KJS::Bindings::callJNIFloatMethod): |
|
18552 (KJS::Bindings::callJNIDoubleMethod): |
|
18553 (KJS::Bindings::callJNIVoidMethodA): |
|
18554 (KJS::Bindings::callJNIObjectMethodA): |
|
18555 (KJS::Bindings::callJNIByteMethodA): |
|
18556 (KJS::Bindings::callJNICharMethodA): |
|
18557 (KJS::Bindings::callJNIShortMethodA): |
|
18558 (KJS::Bindings::callJNIIntMethodA): |
|
18559 (KJS::Bindings::callJNILongMethodA): |
|
18560 (KJS::Bindings::callJNIFloatMethodA): |
|
18561 (KJS::Bindings::callJNIDoubleMethodA): |
|
18562 (KJS::Bindings::callJNIBooleanMethodA): |
|
18563 (KJS::Bindings::callJNIVoidMethodIDA): |
|
18564 (KJS::Bindings::callJNIObjectMethodIDA): |
|
18565 (KJS::Bindings::callJNIByteMethodIDA): |
|
18566 (KJS::Bindings::callJNICharMethodIDA): |
|
18567 (KJS::Bindings::callJNIShortMethodIDA): |
|
18568 (KJS::Bindings::callJNIIntMethodIDA): |
|
18569 (KJS::Bindings::callJNILongMethodIDA): |
|
18570 (KJS::Bindings::callJNIFloatMethodIDA): |
|
18571 (KJS::Bindings::callJNIDoubleMethodIDA): |
|
18572 (KJS::Bindings::callJNIBooleanMethodIDA): |
|
18573 (KJS::Bindings::getCharactersFromJString): |
|
18574 (KJS::Bindings::releaseCharactersForJString): |
|
18575 (KJS::Bindings::getCharactersFromJStringInEnv): |
|
18576 (KJS::Bindings::releaseCharactersForJStringInEnv): |
|
18577 (KJS::Bindings::getUCharactersFromJStringInEnv): |
|
18578 (KJS::Bindings::releaseUCharactersForJStringInEnv): |
|
18579 (KJS::Bindings::JNITypeFromClassName): |
|
18580 (KJS::Bindings::signatureFromPrimitiveType): |
|
18581 (KJS::Bindings::JNITypeFromPrimitiveType): |
|
18582 (KJS::Bindings::getJNIField): |
|
18583 (KJS::Bindings::convertValueToJValue): |
|
18584 * bindings/jni/jni_utility.h: |
|
18585 * bindings/objc/WebScriptObject.mm: |
|
18586 (_didExecute): |
|
18587 (-[WebScriptObject _initializeWithObjectImp:originExecutionContext:Bindings::executionContext:Bindings::]): |
|
18588 (-[WebScriptObject _initWithObjectImp:originExecutionContext:Bindings::executionContext:Bindings::]): |
|
18589 (-[WebScriptObject _imp]): |
|
18590 (-[WebScriptObject _executionContext]): |
|
18591 (-[WebScriptObject _setExecutionContext:]): |
|
18592 (-[WebScriptObject _originExecutionContext]): |
|
18593 (-[WebScriptObject _setOriginExecutionContext:]): |
|
18594 (+[WebScriptObject throwException:]): |
|
18595 (listFromNSArray): |
|
18596 (-[WebScriptObject callWebScriptMethod:withArguments:]): |
|
18597 (-[WebScriptObject evaluateWebScript:]): |
|
18598 (-[WebScriptObject setValue:forKey:]): |
|
18599 (-[WebScriptObject valueForKey:]): |
|
18600 (-[WebScriptObject removeWebScriptKey:]): |
|
18601 (-[WebScriptObject stringRepresentation]): |
|
18602 (-[WebScriptObject webScriptValueAtIndex:]): |
|
18603 (-[WebScriptObject setException:]): |
|
18604 (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:Bindings::]): |
|
18605 * bindings/objc/WebScriptObjectPrivate.h: |
|
18606 * bindings/objc/objc_class.h: |
|
18607 * bindings/objc/objc_class.mm: |
|
18608 (KJS::Bindings::ObjcClass::fallbackObject): |
|
18609 * bindings/objc/objc_instance.h: |
|
18610 * bindings/objc/objc_instance.mm: |
|
18611 (ObjcInstance::invokeMethod): |
|
18612 (ObjcInstance::invokeDefaultMethod): |
|
18613 (ObjcInstance::setValueOfField): |
|
18614 (ObjcInstance::setValueOfUndefinedField): |
|
18615 (ObjcInstance::getValueOfField): |
|
18616 (ObjcInstance::getValueOfUndefinedField): |
|
18617 (ObjcInstance::defaultValue): |
|
18618 (ObjcInstance::stringValue): |
|
18619 (ObjcInstance::numberValue): |
|
18620 (ObjcInstance::booleanValue): |
|
18621 (ObjcInstance::valueOf): |
|
18622 * bindings/objc/objc_runtime.h: |
|
18623 * bindings/objc/objc_runtime.mm: |
|
18624 (ObjcField::valueFromInstance): |
|
18625 (convertValueToObjcObject): |
|
18626 (ObjcField::setValueToInstance): |
|
18627 (ObjcArray::setValueAt): |
|
18628 (ObjcArray::valueAt): |
|
18629 (ObjcFallbackObjectImp::put): |
|
18630 (ObjcFallbackObjectImp::callAsFunction): |
|
18631 (ObjcFallbackObjectImp::defaultValue): |
|
18632 * bindings/objc/objc_utility.h: |
|
18633 * bindings/objc/objc_utility.mm: |
|
18634 (Bindings::JSMethodNameToObjCMethodName): |
|
18635 (Bindings::convertValueToObjcValue): |
|
18636 (Bindings::convertNSStringToString): |
|
18637 (Bindings::convertObjcValueToValue): |
|
18638 (Bindings::objcValueTypeForType): |
|
18639 (Bindings::createObjcInstanceForValue): |
|
18640 * bindings/runtime.cpp: |
|
18641 (Instance::getValueOfField): |
|
18642 (Instance::setValueOfField): |
|
18643 (Instance::createRuntimeObject): |
|
18644 (Instance::createLanguageInstanceForValue): |
|
18645 * bindings/runtime.h: |
|
18646 (KJS::Bindings::Constructor::~Constructor): |
|
18647 (KJS::Bindings::Field::~Field): |
|
18648 (KJS::Bindings::MethodList::MethodList): |
|
18649 (KJS::Bindings::Class::fallbackObject): |
|
18650 (KJS::Bindings::Class::~Class): |
|
18651 (KJS::Bindings::Instance::Instance): |
|
18652 (KJS::Bindings::Instance::getValueOfUndefinedField): |
|
18653 (KJS::Bindings::Instance::supportsSetValueOfUndefinedField): |
|
18654 (KJS::Bindings::Instance::setValueOfUndefinedField): |
|
18655 (KJS::Bindings::Instance::valueOf): |
|
18656 (KJS::Bindings::Instance::setExecutionContext): |
|
18657 (KJS::Bindings::Instance::~Instance): |
|
18658 (KJS::Bindings::Array::~Array): |
|
18659 * bindings/runtime_array.cpp: |
|
18660 (RuntimeArrayImp::RuntimeArrayImp): |
|
18661 (RuntimeArrayImp::lengthGetter): |
|
18662 (RuntimeArrayImp::indexGetter): |
|
18663 (RuntimeArrayImp::put): |
|
18664 * bindings/runtime_array.h: |
|
18665 * bindings/runtime_method.cpp: |
|
18666 (RuntimeMethodImp::lengthGetter): |
|
18667 (RuntimeMethodImp::callAsFunction): |
|
18668 * bindings/runtime_method.h: |
|
18669 * bindings/runtime_object.cpp: |
|
18670 (RuntimeObjectImp::fallbackObjectGetter): |
|
18671 (RuntimeObjectImp::fieldGetter): |
|
18672 (RuntimeObjectImp::methodGetter): |
|
18673 (RuntimeObjectImp::getOwnPropertySlot): |
|
18674 (RuntimeObjectImp::put): |
|
18675 (RuntimeObjectImp::defaultValue): |
|
18676 (RuntimeObjectImp::callAsFunction): |
|
18677 * bindings/runtime_object.h: |
|
18678 * kjs/array_instance.h: |
|
18679 * kjs/array_object.cpp: |
|
18680 (ArrayInstanceImp::ArrayInstanceImp): |
|
18681 (ArrayInstanceImp::lengthGetter): |
|
18682 (ArrayInstanceImp::getOwnPropertySlot): |
|
18683 (ArrayInstanceImp::put): |
|
18684 (ArrayInstanceImp::propList): |
|
18685 (ArrayInstanceImp::setLength): |
|
18686 (compareByStringForQSort): |
|
18687 (compareWithCompareFunctionForQSort): |
|
18688 (ArrayInstanceImp::sort): |
|
18689 (ArrayInstanceImp::pushUndefinedObjectsToEnd): |
|
18690 (ArrayPrototypeImp::ArrayPrototypeImp): |
|
18691 (ArrayProtoFuncImp::ArrayProtoFuncImp): |
|
18692 (ArrayProtoFuncImp::callAsFunction): |
|
18693 (ArrayObjectImp::ArrayObjectImp): |
|
18694 (ArrayObjectImp::construct): |
|
18695 (ArrayObjectImp::callAsFunction): |
|
18696 * kjs/array_object.h: |
|
18697 * kjs/bool_object.cpp: |
|
18698 (BooleanPrototypeImp::BooleanPrototypeImp): |
|
18699 (BooleanProtoFuncImp::BooleanProtoFuncImp): |
|
18700 (BooleanProtoFuncImp::callAsFunction): |
|
18701 (BooleanObjectImp::BooleanObjectImp): |
|
18702 (BooleanObjectImp::construct): |
|
18703 (BooleanObjectImp::callAsFunction): |
|
18704 * kjs/bool_object.h: |
|
18705 * kjs/collector.cpp: |
|
18706 (KJS::Collector::markStackObjectsConservatively): |
|
18707 (KJS::Collector::collect): |
|
18708 (KJS::className): |
|
18709 * kjs/completion.h: |
|
18710 (KJS::Completion::Completion): |
|
18711 (KJS::Completion::value): |
|
18712 (KJS::Completion::isValueCompletion): |
|
18713 * kjs/context.h: |
|
18714 (KJS::ContextImp::variableObject): |
|
18715 (KJS::ContextImp::setVariableObject): |
|
18716 (KJS::ContextImp::thisValue): |
|
18717 (KJS::ContextImp::activationObject): |
|
18718 (KJS::ContextImp::pushScope): |
|
18719 * kjs/date_object.cpp: |
|
18720 (formatLocaleDate): |
|
18721 (KJS::timeFromArgs): |
|
18722 (KJS::DatePrototypeImp::DatePrototypeImp): |
|
18723 (KJS::DateProtoFuncImp::DateProtoFuncImp): |
|
18724 (KJS::DateProtoFuncImp::callAsFunction): |
|
18725 (KJS::DateObjectImp::DateObjectImp): |
|
18726 (KJS::DateObjectImp::construct): |
|
18727 (KJS::DateObjectImp::callAsFunction): |
|
18728 (KJS::DateObjectFuncImp::DateObjectFuncImp): |
|
18729 (KJS::DateObjectFuncImp::callAsFunction): |
|
18730 (KJS::parseDate): |
|
18731 (KJS::KRFCDate_parseDate): |
|
18732 (KJS::timeClip): |
|
18733 * kjs/date_object.h: |
|
18734 * kjs/debugger.cpp: |
|
18735 (Debugger::exception): |
|
18736 (Debugger::callEvent): |
|
18737 (Debugger::returnEvent): |
|
18738 * kjs/debugger.h: |
|
18739 * kjs/error_object.cpp: |
|
18740 (ErrorPrototypeImp::ErrorPrototypeImp): |
|
18741 (ErrorProtoFuncImp::ErrorProtoFuncImp): |
|
18742 (ErrorProtoFuncImp::callAsFunction): |
|
18743 (ErrorObjectImp::ErrorObjectImp): |
|
18744 (ErrorObjectImp::construct): |
|
18745 (ErrorObjectImp::callAsFunction): |
|
18746 (NativeErrorPrototypeImp::NativeErrorPrototypeImp): |
|
18747 (NativeErrorImp::NativeErrorImp): |
|
18748 (NativeErrorImp::construct): |
|
18749 (NativeErrorImp::callAsFunction): |
|
18750 * kjs/error_object.h: |
|
18751 * kjs/function.cpp: |
|
18752 (KJS::FunctionImp::FunctionImp): |
|
18753 (KJS::FunctionImp::callAsFunction): |
|
18754 (KJS::FunctionImp::processParameters): |
|
18755 (KJS::FunctionImp::argumentsGetter): |
|
18756 (KJS::FunctionImp::lengthGetter): |
|
18757 (KJS::FunctionImp::put): |
|
18758 (KJS::DeclaredFunctionImp::DeclaredFunctionImp): |
|
18759 (KJS::DeclaredFunctionImp::construct): |
|
18760 (KJS::ArgumentsImp::ArgumentsImp): |
|
18761 (KJS::ArgumentsImp::mappedIndexGetter): |
|
18762 (KJS::ArgumentsImp::put): |
|
18763 (KJS::ActivationImp::argumentsGetter): |
|
18764 (KJS::GlobalFuncImp::GlobalFuncImp): |
|
18765 (KJS::encode): |
|
18766 (KJS::decode): |
|
18767 (KJS::GlobalFuncImp::callAsFunction): |
|
18768 * kjs/function.h: |
|
18769 * kjs/function_object.cpp: |
|
18770 (FunctionPrototypeImp::FunctionPrototypeImp): |
|
18771 (FunctionPrototypeImp::callAsFunction): |
|
18772 (FunctionProtoFuncImp::FunctionProtoFuncImp): |
|
18773 (FunctionProtoFuncImp::callAsFunction): |
|
18774 (FunctionObjectImp::FunctionObjectImp): |
|
18775 (FunctionObjectImp::construct): |
|
18776 (FunctionObjectImp::callAsFunction): |
|
18777 * kjs/function_object.h: |
|
18778 * kjs/internal.cpp: |
|
18779 (KJS::UndefinedImp::toPrimitive): |
|
18780 (KJS::UndefinedImp::toObject): |
|
18781 (KJS::NullImp::toPrimitive): |
|
18782 (KJS::NullImp::toObject): |
|
18783 (KJS::BooleanImp::toPrimitive): |
|
18784 (KJS::BooleanImp::toObject): |
|
18785 (KJS::StringImp::toPrimitive): |
|
18786 (KJS::StringImp::toObject): |
|
18787 (KJS::NumberImp::toPrimitive): |
|
18788 (KJS::NumberImp::toObject): |
|
18789 (KJS::NumberImp::getUInt32): |
|
18790 (KJS::LabelStack::push): |
|
18791 (KJS::ContextImp::ContextImp): |
|
18792 (KJS::InterpreterImp::globalInit): |
|
18793 (KJS::InterpreterImp::globalClear): |
|
18794 (KJS::InterpreterImp::InterpreterImp): |
|
18795 (KJS::InterpreterImp::initGlobalObject): |
|
18796 (KJS::InterpreterImp::clear): |
|
18797 (KJS::InterpreterImp::mark): |
|
18798 (KJS::InterpreterImp::evaluate): |
|
18799 (KJS::InternalFunctionImp::hasInstance): |
|
18800 (KJS::roundValue): |
|
18801 (KJS::printInfo): |
|
18802 * kjs/internal.h: |
|
18803 (KJS::InterpreterImp::builtinObject): |
|
18804 (KJS::InterpreterImp::builtinFunction): |
|
18805 (KJS::InterpreterImp::builtinArray): |
|
18806 (KJS::InterpreterImp::builtinBoolean): |
|
18807 (KJS::InterpreterImp::builtinString): |
|
18808 (KJS::InterpreterImp::builtinNumber): |
|
18809 (KJS::InterpreterImp::builtinDate): |
|
18810 (KJS::InterpreterImp::builtinRegExp): |
|
18811 (KJS::InterpreterImp::builtinError): |
|
18812 (KJS::InterpreterImp::builtinObjectPrototype): |
|
18813 (KJS::InterpreterImp::builtinFunctionPrototype): |
|
18814 (KJS::InterpreterImp::builtinArrayPrototype): |
|
18815 (KJS::InterpreterImp::builtinBooleanPrototype): |
|
18816 (KJS::InterpreterImp::builtinStringPrototype): |
|
18817 (KJS::InterpreterImp::builtinNumberPrototype): |
|
18818 (KJS::InterpreterImp::builtinDatePrototype): |
|
18819 (KJS::InterpreterImp::builtinRegExpPrototype): |
|
18820 (KJS::InterpreterImp::builtinErrorPrototype): |
|
18821 (KJS::InterpreterImp::builtinEvalError): |
|
18822 (KJS::InterpreterImp::builtinRangeError): |
|
18823 (KJS::InterpreterImp::builtinReferenceError): |
|
18824 (KJS::InterpreterImp::builtinSyntaxError): |
|
18825 (KJS::InterpreterImp::builtinTypeError): |
|
18826 (KJS::InterpreterImp::builtinURIError): |
|
18827 (KJS::InterpreterImp::builtinEvalErrorPrototype): |
|
18828 (KJS::InterpreterImp::builtinRangeErrorPrototype): |
|
18829 (KJS::InterpreterImp::builtinReferenceErrorPrototype): |
|
18830 (KJS::InterpreterImp::builtinSyntaxErrorPrototype): |
|
18831 (KJS::InterpreterImp::builtinTypeErrorPrototype): |
|
18832 (KJS::InterpreterImp::builtinURIErrorPrototype): |
|
18833 * kjs/interpreter.cpp: |
|
18834 (Context::variableObject): |
|
18835 (Context::thisValue): |
|
18836 (Interpreter::Interpreter): |
|
18837 (Interpreter::globalObject): |
|
18838 (Interpreter::evaluate): |
|
18839 (Interpreter::builtinObject): |
|
18840 (Interpreter::builtinFunction): |
|
18841 (Interpreter::builtinArray): |
|
18842 (Interpreter::builtinBoolean): |
|
18843 (Interpreter::builtinString): |
|
18844 (Interpreter::builtinNumber): |
|
18845 (Interpreter::builtinDate): |
|
18846 (Interpreter::builtinRegExp): |
|
18847 (Interpreter::builtinError): |
|
18848 (Interpreter::builtinObjectPrototype): |
|
18849 (Interpreter::builtinFunctionPrototype): |
|
18850 (Interpreter::builtinArrayPrototype): |
|
18851 (Interpreter::builtinBooleanPrototype): |
|
18852 (Interpreter::builtinStringPrototype): |
|
18853 (Interpreter::builtinNumberPrototype): |
|
18854 (Interpreter::builtinDatePrototype): |
|
18855 (Interpreter::builtinRegExpPrototype): |
|
18856 (Interpreter::builtinErrorPrototype): |
|
18857 (Interpreter::builtinEvalError): |
|
18858 (Interpreter::builtinRangeError): |
|
18859 (Interpreter::builtinReferenceError): |
|
18860 (Interpreter::builtinSyntaxError): |
|
18861 (Interpreter::builtinTypeError): |
|
18862 (Interpreter::builtinURIError): |
|
18863 (Interpreter::builtinEvalErrorPrototype): |
|
18864 (Interpreter::builtinRangeErrorPrototype): |
|
18865 (Interpreter::builtinReferenceErrorPrototype): |
|
18866 (Interpreter::builtinSyntaxErrorPrototype): |
|
18867 (Interpreter::builtinTypeErrorPrototype): |
|
18868 (Interpreter::builtinURIErrorPrototype): |
|
18869 (Interpreter::createLanguageInstanceForValue): |
|
18870 * kjs/interpreter.h: |
|
18871 (KJS::Interpreter::isGlobalObject): |
|
18872 (KJS::ExecState::setException): |
|
18873 (KJS::ExecState::clearException): |
|
18874 (KJS::ExecState::exception): |
|
18875 (KJS::ExecState::hadException): |
|
18876 (KJS::ExecState::ExecState): |
|
18877 * kjs/list.cpp: |
|
18878 (KJS::List::at): |
|
18879 * kjs/list.h: |
|
18880 (KJS::List::operator[]): |
|
18881 (KJS::ListIterator::operator->): |
|
18882 (KJS::ListIterator::operator*): |
|
18883 (KJS::ListIterator::operator++): |
|
18884 (KJS::ListIterator::operator--): |
|
18885 * kjs/lookup.h: |
|
18886 (KJS::staticFunctionGetter): |
|
18887 (KJS::staticValueGetter): |
|
18888 (KJS::lookupPut): |
|
18889 (KJS::cacheGlobalObject): |
|
18890 * kjs/math_object.cpp: |
|
18891 (MathObjectImp::getValueProperty): |
|
18892 (MathFuncImp::MathFuncImp): |
|
18893 (MathFuncImp::callAsFunction): |
|
18894 * kjs/math_object.h: |
|
18895 * kjs/nodes.cpp: |
|
18896 (Node::evaluateReference): |
|
18897 (Node::throwError): |
|
18898 (Node::setExceptionDetailsIfNeeded): |
|
18899 (NullNode::evaluate): |
|
18900 (BooleanNode::evaluate): |
|
18901 (NumberNode::evaluate): |
|
18902 (StringNode::evaluate): |
|
18903 (RegExpNode::evaluate): |
|
18904 (ThisNode::evaluate): |
|
18905 (ResolveNode::evaluate): |
|
18906 (ResolveNode::evaluateReference): |
|
18907 (GroupNode::evaluate): |
|
18908 (ElementNode::evaluate): |
|
18909 (ArrayNode::evaluate): |
|
18910 (ObjectLiteralNode::evaluate): |
|
18911 (PropertyValueNode::evaluate): |
|
18912 (PropertyNode::evaluate): |
|
18913 (AccessorNode1::evaluate): |
|
18914 (AccessorNode1::evaluateReference): |
|
18915 (AccessorNode2::evaluate): |
|
18916 (AccessorNode2::evaluateReference): |
|
18917 (ArgumentListNode::evaluate): |
|
18918 (ArgumentListNode::evaluateList): |
|
18919 (ArgumentsNode::evaluate): |
|
18920 (NewExprNode::evaluate): |
|
18921 (FunctionCallNode::evaluate): |
|
18922 (PostfixNode::evaluate): |
|
18923 (DeleteNode::evaluate): |
|
18924 (VoidNode::evaluate): |
|
18925 (TypeOfNode::evaluate): |
|
18926 (PrefixNode::evaluate): |
|
18927 (UnaryPlusNode::evaluate): |
|
18928 (NegateNode::evaluate): |
|
18929 (BitwiseNotNode::evaluate): |
|
18930 (LogicalNotNode::evaluate): |
|
18931 (MultNode::evaluate): |
|
18932 (AddNode::evaluate): |
|
18933 (ShiftNode::evaluate): |
|
18934 (RelationalNode::evaluate): |
|
18935 (EqualNode::evaluate): |
|
18936 (BitOperNode::evaluate): |
|
18937 (BinaryLogicalNode::evaluate): |
|
18938 (ConditionalNode::evaluate): |
|
18939 (AssignNode::evaluate): |
|
18940 (CommaNode::evaluate): |
|
18941 (StatListNode::execute): |
|
18942 (AssignExprNode::evaluate): |
|
18943 (VarDeclNode::evaluate): |
|
18944 (VarDeclNode::processVarDecls): |
|
18945 (VarDeclListNode::evaluate): |
|
18946 (ExprStatementNode::execute): |
|
18947 (IfNode::execute): |
|
18948 (DoWhileNode::execute): |
|
18949 (WhileNode::execute): |
|
18950 (ForNode::execute): |
|
18951 (ForInNode::execute): |
|
18952 (ContinueNode::execute): |
|
18953 (BreakNode::execute): |
|
18954 (ReturnNode::execute): |
|
18955 (WithNode::execute): |
|
18956 (CaseClauseNode::evaluate): |
|
18957 (ClauseListNode::evaluate): |
|
18958 (CaseBlockNode::evaluate): |
|
18959 (CaseBlockNode::evalBlock): |
|
18960 (SwitchNode::execute): |
|
18961 (ThrowNode::execute): |
|
18962 (CatchNode::execute): |
|
18963 (TryNode::execute): |
|
18964 (ParameterNode::evaluate): |
|
18965 (FuncDeclNode::processFuncDecl): |
|
18966 (FuncExprNode::evaluate): |
|
18967 (SourceElementsNode::execute): |
|
18968 * kjs/nodes.h: |
|
18969 (KJS::StatementNode::evaluate): |
|
18970 * kjs/number_object.cpp: |
|
18971 (NumberPrototypeImp::NumberPrototypeImp): |
|
18972 (NumberProtoFuncImp::NumberProtoFuncImp): |
|
18973 (NumberProtoFuncImp::callAsFunction): |
|
18974 (NumberObjectImp::NumberObjectImp): |
|
18975 (NumberObjectImp::getValueProperty): |
|
18976 (NumberObjectImp::construct): |
|
18977 (NumberObjectImp::callAsFunction): |
|
18978 * kjs/number_object.h: |
|
18979 * kjs/object.cpp: |
|
18980 (KJS::ObjectImp::call): |
|
18981 (KJS::ObjectImp::mark): |
|
18982 (KJS::ObjectImp::classInfo): |
|
18983 (KJS::ObjectImp::get): |
|
18984 (KJS::ObjectImp::getProperty): |
|
18985 (KJS::ObjectImp::getPropertySlot): |
|
18986 (KJS::ObjectImp::put): |
|
18987 (KJS::ObjectImp::hasOwnProperty): |
|
18988 (KJS::ObjectImp::defaultValue): |
|
18989 (KJS::ObjectImp::findPropertyHashEntry): |
|
18990 (KJS::ObjectImp::construct): |
|
18991 (KJS::ObjectImp::callAsFunction): |
|
18992 (KJS::ObjectImp::hasInstance): |
|
18993 (KJS::ObjectImp::propList): |
|
18994 (KJS::ObjectImp::toPrimitive): |
|
18995 (KJS::ObjectImp::toNumber): |
|
18996 (KJS::ObjectImp::toString): |
|
18997 (KJS::ObjectImp::toObject): |
|
18998 (KJS::ObjectImp::putDirect): |
|
18999 (KJS::Error::create): |
|
19000 (KJS::error): |
|
19001 * kjs/object.h: |
|
19002 (KJS::): |
|
19003 (KJS::ObjectImp::getPropertySlot): |
|
19004 (KJS::AllocatedValueImp::isObject): |
|
19005 (KJS::ObjectImp::ObjectImp): |
|
19006 (KJS::ObjectImp::internalValue): |
|
19007 (KJS::ObjectImp::setInternalValue): |
|
19008 (KJS::ObjectImp::prototype): |
|
19009 (KJS::ObjectImp::setPrototype): |
|
19010 (KJS::ObjectImp::inherits): |
|
19011 * kjs/object_object.cpp: |
|
19012 (ObjectPrototypeImp::ObjectPrototypeImp): |
|
19013 (ObjectProtoFuncImp::ObjectProtoFuncImp): |
|
19014 (ObjectProtoFuncImp::callAsFunction): |
|
19015 (ObjectObjectImp::ObjectObjectImp): |
|
19016 (ObjectObjectImp::construct): |
|
19017 (ObjectObjectImp::callAsFunction): |
|
19018 * kjs/object_object.h: |
|
19019 * kjs/operations.cpp: |
|
19020 (KJS::equal): |
|
19021 (KJS::strictEqual): |
|
19022 (KJS::relation): |
|
19023 (KJS::add): |
|
19024 (KJS::mult): |
|
19025 * kjs/operations.h: |
|
19026 * kjs/property_map.cpp: |
|
19027 (KJS::PropertyMap::mark): |
|
19028 (KJS::PropertyMap::addEnumerablesToReferenceList): |
|
19029 (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): |
|
19030 (KJS::PropertyMap::save): |
|
19031 (KJS::PropertyMap::restore): |
|
19032 * kjs/property_map.h: |
|
19033 * kjs/property_slot.cpp: |
|
19034 (KJS::PropertySlot::undefinedGetter): |
|
19035 * kjs/property_slot.h: |
|
19036 (KJS::PropertySlot::getValue): |
|
19037 * kjs/protect.h: |
|
19038 (KJS::gcUnprotectNullTolerant): |
|
19039 (KJS::ProtectedValue::ProtectedValue): |
|
19040 (KJS::ProtectedValue::~ProtectedValue): |
|
19041 (KJS::ProtectedValue::operator=): |
|
19042 (KJS::ProtectedValue::operator ValueImp *): |
|
19043 (KJS::ProtectedValue::operator->): |
|
19044 * kjs/protected_object.h: |
|
19045 (KJS::ProtectedObject::ProtectedObject): |
|
19046 (KJS::ProtectedObject::operator=): |
|
19047 (KJS::ProtectedObject::operator ValueImp *): |
|
19048 (KJS::ProtectedObject::operator ObjectImp *): |
|
19049 (KJS::ProtectedObject::operator->): |
|
19050 (KJS::ProtectedReference::ProtectedReference): |
|
19051 (KJS::ProtectedReference::~ProtectedReference): |
|
19052 (KJS::ProtectedReference::operator=): |
|
19053 * kjs/protected_values.cpp: |
|
19054 (KJS::ProtectedValues::getProtectCount): |
|
19055 (KJS::ProtectedValues::increaseProtectCount): |
|
19056 (KJS::ProtectedValues::insert): |
|
19057 (KJS::ProtectedValues::decreaseProtectCount): |
|
19058 * kjs/protected_values.h: |
|
19059 * kjs/reference.cpp: |
|
19060 (KJS::Reference::Reference): |
|
19061 (KJS::Reference::makeValueReference): |
|
19062 (KJS::Reference::getBase): |
|
19063 (KJS::Reference::getValue): |
|
19064 (KJS::Reference::putValue): |
|
19065 (KJS::Reference::deleteValue): |
|
19066 * kjs/reference.h: |
|
19067 (KJS::Reference::baseIfMutable): |
|
19068 * kjs/regexp_object.cpp: |
|
19069 (RegExpPrototypeImp::RegExpPrototypeImp): |
|
19070 (RegExpProtoFuncImp::RegExpProtoFuncImp): |
|
19071 (RegExpProtoFuncImp::callAsFunction): |
|
19072 (RegExpObjectImp::RegExpObjectImp): |
|
19073 (RegExpObjectImp::arrayOfMatches): |
|
19074 (RegExpObjectImp::backrefGetter): |
|
19075 (RegExpObjectImp::construct): |
|
19076 (RegExpObjectImp::callAsFunction): |
|
19077 * kjs/regexp_object.h: |
|
19078 * kjs/string_object.cpp: |
|
19079 (StringInstanceImp::lengthGetter): |
|
19080 (StringInstanceImp::indexGetter): |
|
19081 (StringInstanceImp::getOwnPropertySlot): |
|
19082 (StringInstanceImp::put): |
|
19083 (StringPrototypeImp::StringPrototypeImp): |
|
19084 (StringProtoFuncImp::StringProtoFuncImp): |
|
19085 (regExpIsGlobal): |
|
19086 (replace): |
|
19087 (StringProtoFuncImp::callAsFunction): |
|
19088 (StringObjectImp::StringObjectImp): |
|
19089 (StringObjectImp::construct): |
|
19090 (StringObjectImp::callAsFunction): |
|
19091 (StringObjectFuncImp::StringObjectFuncImp): |
|
19092 (StringObjectFuncImp::callAsFunction): |
|
19093 * kjs/string_object.h: |
|
19094 * kjs/testkjs.cpp: |
|
19095 (TestFunctionImp::callAsFunction): |
|
19096 (VersionFunctionImp::callAsFunction): |
|
19097 (main): |
|
19098 * kjs/value.cpp: |
|
19099 (KJS::AllocatedValueImp::operator new): |
|
19100 (KJS::AllocatedValueImp::getUInt32): |
|
19101 (KJS::ValueImp::toInteger): |
|
19102 (KJS::ValueImp::toInt32): |
|
19103 (KJS::ValueImp::toUInt32): |
|
19104 (KJS::ValueImp::toUInt16): |
|
19105 (KJS::ValueImp::toObject): |
|
19106 (KJS::AllocatedValueImp::getBoolean): |
|
19107 (KJS::AllocatedValueImp::getNumber): |
|
19108 (KJS::AllocatedValueImp::getString): |
|
19109 (KJS::AllocatedValueImp::getObject): |
|
19110 (KJS::jsString): |
|
19111 (KJS::jsNumber): |
|
19112 (KJS::ConstantValues::init): |
|
19113 (KJS::ConstantValues::clear): |
|
19114 (KJS::ConstantValues::mark): |
|
19115 * kjs/value.h: |
|
19116 (KJS::): |
|
19117 (KJS::jsUndefined): |
|
19118 (KJS::jsNull): |
|
19119 (KJS::jsBoolean): |
|
19120 (KJS::jsNaN): |
|
19121 (KJS::ValueImp::ValueImp): |
|
19122 (KJS::ValueImp::~ValueImp): |
|
19123 (KJS::AllocatedValueImp::AllocatedValueImp): |
|
19124 (KJS::AllocatedValueImp::~AllocatedValueImp): |
|
19125 (KJS::AllocatedValueImp::isBoolean): |
|
19126 (KJS::AllocatedValueImp::isNumber): |
|
19127 (KJS::AllocatedValueImp::isString): |
|
19128 (KJS::AllocatedValueImp::isObject): |
|
19129 (KJS::AllocatedValueImp::marked): |
|
19130 (KJS::AllocatedValueImp::mark): |
|
19131 (KJS::ValueImp::downcast): |
|
19132 (KJS::ValueImp::isUndefined): |
|
19133 (KJS::ValueImp::isNull): |
|
19134 (KJS::ValueImp::isUndefinedOrNull): |
|
19135 (KJS::ValueImp::isBoolean): |
|
19136 (KJS::ValueImp::isNumber): |
|
19137 (KJS::ValueImp::isString): |
|
19138 (KJS::ValueImp::isObject): |
|
19139 (KJS::ValueImp::getBoolean): |
|
19140 (KJS::ValueImp::getNumber): |
|
19141 (KJS::ValueImp::getString): |
|
19142 (KJS::ValueImp::getObject): |
|
19143 (KJS::ValueImp::getUInt32): |
|
19144 (KJS::ValueImp::mark): |
|
19145 (KJS::ValueImp::marked): |
|
19146 (KJS::ValueImp::type): |
|
19147 (KJS::ValueImp::toPrimitive): |
|
19148 (KJS::ValueImp::toBoolean): |
|
19149 (KJS::ValueImp::toNumber): |
|
19150 (KJS::ValueImp::toString): |
|
19151 (KJS::jsZero): |
|
19152 (KJS::jsOne): |
|
19153 (KJS::jsTwo): |
|
19154 (KJS::Undefined): |
|
19155 (KJS::Null): |
|
19156 (KJS::Boolean): |
|
19157 (KJS::Number): |
|
19158 (KJS::String): |
|
19159 |
|
19160 2005-08-06 Maciej Stachowiak <mjs@apple.com> |
|
19161 |
|
19162 Reviewed by Darin. |
|
19163 |
|
19164 Change over to the new PropertySlot mechanism for property |
|
19165 lookup. This allows the elimination of hasOwnProperty |
|
19166 methods. Also did some of the performance tuning enabled by this |
|
19167 (but not yet all the possible improvements for function calls, |
|
19168 assignment, ++, and so forth). And also much code cleanup. |
|
19169 |
|
19170 Net result is about a 2% speedup on the JS iBench. |
|
19171 |
|
19172 Also redid Geoff's fix for the chrashing applet by avoiding a NULL |
|
19173 prototype in the bindings code and using the default of Null() |
|
19174 instead. |
|
19175 |
|
19176 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
19177 * bindings/objc/objc_runtime.h: |
|
19178 * bindings/objc/objc_runtime.mm: |
|
19179 (ObjcFallbackObjectImp::ObjcFallbackObjectImp): |
|
19180 (ObjcFallbackObjectImp::getOwnPropertySlot): |
|
19181 * bindings/runtime_array.cpp: |
|
19182 (RuntimeArrayImp::lengthGetter): |
|
19183 (RuntimeArrayImp::indexGetter): |
|
19184 (RuntimeArrayImp::getOwnPropertySlot): |
|
19185 * bindings/runtime_array.h: |
|
19186 * bindings/runtime_method.cpp: |
|
19187 (RuntimeMethodImp::lengthGetter): |
|
19188 (RuntimeMethodImp::getOwnPropertySlot): |
|
19189 * bindings/runtime_method.h: |
|
19190 * bindings/runtime_object.cpp: |
|
19191 (RuntimeObjectImp::RuntimeObjectImp): |
|
19192 (RuntimeObjectImp::fallbackObjectGetter): |
|
19193 (RuntimeObjectImp::fieldGetter): |
|
19194 (RuntimeObjectImp::methodGetter): |
|
19195 (RuntimeObjectImp::getOwnPropertySlot): |
|
19196 * bindings/runtime_object.h: |
|
19197 * bindings/runtime_root.h: |
|
19198 * kjs/array_instance.h: |
|
19199 * kjs/array_object.cpp: |
|
19200 (ArrayInstanceImp::lengthGetter): |
|
19201 (ArrayInstanceImp::getOwnPropertySlot): |
|
19202 (ArrayPrototypeImp::getOwnPropertySlot): |
|
19203 * kjs/array_object.h: |
|
19204 * kjs/date_object.cpp: |
|
19205 (DatePrototypeImp::getOwnPropertySlot): |
|
19206 * kjs/date_object.h: |
|
19207 * kjs/function.cpp: |
|
19208 (KJS::FunctionImp::argumentsGetter): |
|
19209 (KJS::FunctionImp::lengthGetter): |
|
19210 (KJS::FunctionImp::getOwnPropertySlot): |
|
19211 (KJS::FunctionImp::put): |
|
19212 (KJS::FunctionImp::deleteProperty): |
|
19213 (KJS::ArgumentsImp::mappedIndexGetter): |
|
19214 (KJS::ArgumentsImp::getOwnPropertySlot): |
|
19215 (KJS::ActivationImp::argumentsGetter): |
|
19216 (KJS::ActivationImp::getArgumentsGetter): |
|
19217 (KJS::ActivationImp::getOwnPropertySlot): |
|
19218 (KJS::ActivationImp::deleteProperty): |
|
19219 * kjs/function.h: |
|
19220 * kjs/internal.cpp: |
|
19221 (InterpreterImp::InterpreterImp): |
|
19222 (InterpreterImp::initGlobalObject): |
|
19223 (InterpreterImp::~InterpreterImp): |
|
19224 (InterpreterImp::evaluate): |
|
19225 * kjs/internal.h: |
|
19226 (KJS::InterpreterImp::globalExec): |
|
19227 * kjs/interpreter.cpp: |
|
19228 (Interpreter::Interpreter): |
|
19229 (Interpreter::createLanguageInstanceForValue): |
|
19230 * kjs/interpreter.h: |
|
19231 (KJS::Interpreter::argumentsIdentifier): |
|
19232 (KJS::Interpreter::specialPrototypeIdentifier): |
|
19233 * kjs/lookup.h: |
|
19234 (KJS::staticFunctionGetter): |
|
19235 (KJS::staticValueGetter): |
|
19236 (KJS::getStaticPropertySlot): |
|
19237 (KJS::getStaticFunctionSlot): |
|
19238 (KJS::getStaticValueSlot): |
|
19239 * kjs/math_object.cpp: |
|
19240 (MathObjectImp::getOwnPropertySlot): |
|
19241 * kjs/math_object.h: |
|
19242 * kjs/nodes.cpp: |
|
19243 (ResolveNode::evaluate): |
|
19244 (ResolveNode::evaluateReference): |
|
19245 (AccessorNode1::evaluate): |
|
19246 (AccessorNode2::evaluate): |
|
19247 * kjs/number_object.cpp: |
|
19248 (NumberObjectImp::getOwnPropertySlot): |
|
19249 * kjs/number_object.h: |
|
19250 * kjs/object.cpp: |
|
19251 (KJS::ObjectImp::get): |
|
19252 (KJS::ObjectImp::getProperty): |
|
19253 (KJS::ObjectImp::getPropertySlot): |
|
19254 (KJS::ObjectImp::getOwnPropertySlot): |
|
19255 (KJS::ObjectImp::put): |
|
19256 (KJS::ObjectImp::hasProperty): |
|
19257 (KJS::ObjectImp::hasOwnProperty): |
|
19258 * kjs/object.h: |
|
19259 (KJS::ObjectImp::getDirectLocation): |
|
19260 (KJS::ObjectImp::getPropertySlot): |
|
19261 (KJS::ObjectImp::getOwnPropertySlot): |
|
19262 * kjs/object_wrapper.h: Added. |
|
19263 (KJS::): |
|
19264 (KJS::Object::Object): |
|
19265 (KJS::Object::operator ObjectImp *): |
|
19266 * kjs/property_map.cpp: |
|
19267 (KJS::PropertyMap::getLocation): |
|
19268 * kjs/property_map.h: |
|
19269 * kjs/property_slot.cpp: Added. |
|
19270 (KJS::PropertySlot::undefinedGetter): |
|
19271 * kjs/property_slot.h: Added. |
|
19272 (KJS::PropertySlot::isSet): |
|
19273 (KJS::PropertySlot::getValue): |
|
19274 (KJS::PropertySlot::setValueSlot): |
|
19275 (KJS::PropertySlot::setStaticEntry): |
|
19276 (KJS::PropertySlot::setCustom): |
|
19277 (KJS::PropertySlot::setCustomIndex): |
|
19278 (KJS::PropertySlot::setUndefined): |
|
19279 (KJS::PropertySlot::slotBase): |
|
19280 (KJS::PropertySlot::staticEntry): |
|
19281 (KJS::PropertySlot::index): |
|
19282 (KJS::PropertySlot::): |
|
19283 * kjs/protect.h: |
|
19284 * kjs/protected_object.h: Added. |
|
19285 (KJS::ProtectedObject::ProtectedObject): |
|
19286 (KJS::ProtectedObject::~ProtectedObject): |
|
19287 (KJS::ProtectedObject::operator=): |
|
19288 (KJS::ProtectedReference::ProtectedReference): |
|
19289 (KJS::ProtectedReference::~ProtectedReference): |
|
19290 (KJS::ProtectedReference::operator=): |
|
19291 * kjs/reference.h: |
|
19292 * kjs/reference_list.cpp: |
|
19293 * kjs/regexp_object.cpp: |
|
19294 (RegExpObjectImp::backrefGetter): |
|
19295 (RegExpObjectImp::getOwnPropertySlot): |
|
19296 * kjs/regexp_object.h: |
|
19297 * kjs/string_object.cpp: |
|
19298 (StringInstanceImp::lengthGetter): |
|
19299 (StringInstanceImp::indexGetter): |
|
19300 (StringInstanceImp::getOwnPropertySlot): |
|
19301 (StringPrototypeImp::getOwnPropertySlot): |
|
19302 * kjs/string_object.h: |
|
19303 |
|
19304 2005-08-05 Adele Peterson <adele@apple.com> |
|
19305 |
|
19306 Reviewed by Darin. |
|
19307 |
|
19308 * JavaScriptCore.xcodeproj/project.pbxproj: Unchecked 'statics are thread safe' option. |
|
19309 |
|
19310 2005-08-05 Geoffrey Garen <ggaren@apple.com> |
|
19311 |
|
19312 -fixed <rdar://problem/4207220> REGRESSION (DENVER): Crash occurs |
|
19313 after clicking on Hangman applet |
|
19314 |
|
19315 Reviewed by darin. |
|
19316 |
|
19317 * kjs/object.cpp: |
|
19318 (KJS::ObjectImp::hasProperty): added check for null prototype. |
|
19319 |
|
19320 FIXME: The long-term plan is to make runtime objects use JS Null() |
|
19321 instead of null pointers, which will allow us to eliminate null |
|
19322 checks, improving performance. |
|
19323 |
|
19324 2005-08-05 Geoffrey Garen <ggaren@apple.com> |
|
19325 |
|
19326 Fix by darin, reviewed by me. |
|
19327 |
|
19328 - rolled in fix for: <rdar://problem/4161606> JavaScript regular |
|
19329 expressions with certain ranges of Unicode characters cause a crash |
|
19330 |
|
19331 Test cases added: |
|
19332 |
|
19333 * layout-tests/fast/js/regexp-big-unicode-ranges-expected.txt: Added. |
|
19334 * layout-tests/fast/js/regexp-big-unicode-ranges.html: Added. |
|
19335 |
|
19336 * pcre/pcre.c: |
|
19337 (compile_branch): added checks for characters > 255 |
|
19338 |
|
19339 2005-08-04 Maciej Stachowiak <mjs@apple.com> |
|
19340 |
|
19341 - updated expected test results now that we no longer exlude the |
|
19342 date tests (apparently this was overlooked) |
|
19343 |
|
19344 * tests/mozilla/expected.html: |
|
19345 |
|
19346 2005-07-31 Darin Adler <darin@apple.com> |
|
19347 |
|
19348 Reviewed by Maciej. |
|
19349 |
|
19350 - remove uses of Mac-OS-X-specific MAX macro |
|
19351 - remove one of the many excess "APPLE_CHANGES" ifdefs |
|
19352 |
|
19353 * kjs/collector.cpp: (KJS::Collector::allocate): Use std::max instead of MAX. |
|
19354 * kjs/property_map.cpp: (KJS::PropertyMap::rehash): Ditto. |
|
19355 * kjs/ustring.cpp: |
|
19356 (KJS::UChar::toLower): Take out non-ICU code path. |
|
19357 (KJS::UChar::toUpper): Ditto. |
|
19358 (KJS::UString::spliceSubstringsWithSeparators): Use std::max instead of MAX. |
|
19359 |
|
19360 2005-07-27 Geoffrey Garen <ggaren@apple.com> |
|
19361 |
|
19362 - fixed http://bugs.webkit.org/show_bug.cgi?id=4147 |
|
19363 Array.toString() and toLocaleString() improvements from KDE KJS |
|
19364 (rolled in KDE changes) |
|
19365 |
|
19366 Test cases added: |
|
19367 |
|
19368 * layout-tests/fast/js/toString-overrides-expected.txt: Added. |
|
19369 * layout-tests/fast/js/toString-overrides.html: Added. |
|
19370 |
|
19371 * kjs/array_object.cpp: |
|
19372 (ArrayProtoFuncImp::call): |
|
19373 |
|
19374 2005-07-27 Maciej Stachowiak <mjs@apple.com> |
|
19375 |
|
19376 Changes by Michael Kahl, reviewed by me. |
|
19377 |
|
19378 - fixed <rdar://problem/4194278> Need better debugging support in JavaScriptCore |
|
19379 |
|
19380 * JavaScriptCore.xcodeproj/project.pbxproj: |
|
19381 * kjs/debugger.cpp: |
|
19382 (KJS::AttachedInterpreter::AttachedInterpreter): |
|
19383 (KJS::AttachedInterpreter::~AttachedInterpreter): |
|
19384 (Debugger::~Debugger): |
|
19385 (Debugger::attach): |
|
19386 (Debugger::detach): |
|
19387 (Debugger::sourceParsed): |
|
19388 * kjs/debugger.h: |
|
19389 * kjs/function.cpp: |
|
19390 (KJS::FunctionImp::call): |
|
19391 (KJS::GlobalFuncImp::call): |
|
19392 * kjs/function_object.cpp: |
|
19393 (FunctionObjectImp::construct): |
|
19394 * kjs/grammar.y: |
|
19395 * kjs/internal.cpp: |
|
19396 (Parser::parse): |
|
19397 (InterpreterImp::evaluate): |
|
19398 * kjs/internal.h: |
|
19399 (KJS::InterpreterImp::setDebugger): |
|
19400 * kjs/interpreter.cpp: |
|
19401 * kjs/interpreter.h: |
|
19402 (KJS::Interpreter::imp): |
|
19403 * kjs/nodes.cpp: |
|
19404 |
|
19405 2005-07-27 Geoffrey Garen <ggaren@apple.com> |
|
19406 |
|
19407 - fixed http://bugs.webkit.org/show_bug.cgi?id=3381 |
|
19408 Date.prototype.setDate() incorrect for values >=128 |
|
19409 |
|
19410 - Test cases added: |
|
19411 |
|
19412 * layout-tests/fast/js/date-big-setdate-expected.txt: Added. |
|
19413 * layout-tests/fast/js/date-big-setdate.html: Added. |
|
19414 |
|
19415 Reviewed by darin. |
|
19416 |
|
19417 * kjs/date_object.cpp: |
|
19418 (DateProtoFuncImp::call): |
|
19419 |
|
19420 2005-07-27 Geoffrey Garen <ggaren@apple.com> |
|
19421 |
|
19422 -rolled in patch by Carsten Guenther <cguenther@gmail.com> |
|
19423 for http://bugs.webkit.org/show_bug.cgi?id=3759 |
|
19424 Date object enhancements |
|
19425 |
|
19426 Test cases added: |
|
19427 |
|
19428 * layout-tests/fast/js/date-preserve-milliseconds-expected.txt: Added. |
|
19429 * layout-tests/fast/js/date-preserve-milliseconds.html: Added. |
|
19430 |
|
19431 Reviewed by darin. |
|
19432 |
|
19433 * kjs/date_object.cpp: |
|
19434 (timeFromArgs): |
|
19435 (DateProtoFuncImp::call): |
|
19436 (DateObjectImp::construct): |
|
19437 (DateObjectFuncImp::call): |
|
19438 (KJS::makeTime): |
|
19439 * kjs/date_object.h: |
|
19440 * tests/mozilla/expected.html: |
|
19441 |
|
19442 2005-07-26 Justin Garcia <justin.garcia@apple.com> |
|
19443 |
|
19444 Added a forward declaration to fix gcc4 build error |
|
19445 |
|
19446 * kjs/function.h: |
|
19447 |
|
19448 2005-07-25 Geoffrey Garen <ggaren@apple.com> |
|
19449 - fixed mistake in my last checkin -- the expected results included |
|
19450 results from a patch that hasn't landed yet. |
|
19451 |
|
19452 * tests/mozilla/expected.html: |
|
19453 |
|
19454 2005-07-25 Maciej Stachowiak <mjs@apple.com> |
|
19455 |
|
19456 - fix mistake in last change that leads to assertion failure in the Development build |
|
19457 |
|
19458 * kjs/lookup.h: |
|
19459 (KJS::lookupGetOwnValue): |
|
19460 |
|
19461 2005-07-24 Maciej Stachowiak <mjs@apple.com> |
|
19462 |
|
19463 Reviewed by Darin. |
|
19464 |
|
19465 - http://bugs.webkit.org/show_bug.cgi?id=4124 |
|
19466 (change JavaScript property access to avoid double lookup) |
|
19467 |
|
19468 - 10% speedup on JavaScript iBench |
|
19469 - 5% speedup on 24fun BenchJS benchmark |
|
19470 |
|
19471 Changed all get methods to getOwnProperty - they are no longer |
|
19472 responsible for prototype lookup, and determine if the property |
|
19473 was found as a side efect. |
|
19474 |
|
19475 get() is now a nonvirtual ObjectImp method which calls the virtual |
|
19476 getOwnProperty and walks the prototype chain. A few selected |
|
19477 methods were inlined. |
|
19478 |
|
19479 Changed ResolveNode::evaluate plus some other places to use |
|
19480 getProperty which does get() and hasProperty() in one lookup. |
|
19481 |
|
19482 Also miscellaneous code cleanup. |
|
19483 |
|
19484 * bindings/objc/objc_runtime.h: |
|
19485 * bindings/objc/objc_runtime.mm: |
|
19486 (ObjcFallbackObjectImp::ObjcFallbackObjectImp): |
|
19487 (ObjcFallbackObjectImp::getOwnProperty): |
|
19488 * bindings/runtime_array.cpp: |
|
19489 (RuntimeArrayImp::RuntimeArrayImp): |
|
19490 (RuntimeArrayImp::getOwnProperty): |
|
19491 * bindings/runtime_array.h: |
|
19492 * bindings/runtime_method.cpp: |
|
19493 (RuntimeMethodImp::getOwnProperty): |
|
19494 * bindings/runtime_method.h: |
|
19495 * bindings/runtime_object.cpp: |
|
19496 (RuntimeObjectImp::getOwnProperty): |
|
19497 * bindings/runtime_object.h: |
|
19498 * kjs/array_instance.h: |
|
19499 * kjs/array_object.cpp: |
|
19500 (ArrayInstanceImp::getOwnProperty): |
|
19501 (ArrayPrototypeImp::getOwnProperty): |
|
19502 (ArrayProtoFuncImp::call): |
|
19503 * kjs/array_object.h: |
|
19504 * kjs/date_object.cpp: |
|
19505 (DatePrototypeImp::getOwnProperty): |
|
19506 * kjs/date_object.h: |
|
19507 * kjs/function.cpp: |
|
19508 (KJS::FunctionImp::getOwnProperty): |
|
19509 (KJS::ArgumentsImp::getOwnProperty): |
|
19510 (KJS::ActivationImp::getOwnProperty): |
|
19511 * kjs/function.h: |
|
19512 * kjs/lookup.h: |
|
19513 (KJS::lookupGetOwnProperty): |
|
19514 (KJS::lookupGetOwnFunction): |
|
19515 (KJS::lookupGetOwnValue): |
|
19516 * kjs/math_object.cpp: |
|
19517 (MathObjectImp::getOwnProperty): |
|
19518 (MathObjectImp::getValueProperty): |
|
19519 * kjs/math_object.h: |
|
19520 * kjs/nodes.cpp: |
|
19521 (ResolveNode::evaluate): |
|
19522 * kjs/number_object.cpp: |
|
19523 (NumberObjectImp::getOwnProperty): |
|
19524 * kjs/number_object.h: |
|
19525 * kjs/object.cpp: |
|
19526 (KJS::ObjectImp::get): |
|
19527 (KJS::ObjectImp::getOwnProperty): |
|
19528 (KJS::ObjectImp::getProperty): |
|
19529 * kjs/object.h: |
|
19530 (KJS::ObjectImp::getProperty): |
|
19531 (KJS::ObjectImp::getOwnProperty): |
|
19532 * kjs/object_object.cpp: |
|
19533 (ObjectProtoFuncImp::call): |
|
19534 * kjs/regexp_object.cpp: |
|
19535 (RegExpObjectImp::getOwnProperty): |
|
19536 * kjs/regexp_object.h: |
|
19537 * kjs/string_object.cpp: |
|
19538 (StringInstanceImp::getOwnProperty): |
|
19539 (StringPrototypeImp::getOwnProperty): |
|
19540 * kjs/string_object.h: |
|
19541 |
|
19542 2005-07-25 Geoffrey Garen <ggaren@apple.com> |
|
19543 |
|
19544 - fixed http://bugs.webkit.org/show_bug.cgi?id=3971 |
|
19545 JS test suite depends on JS 1.2 behavior |
|
19546 |
|
19547 Reviewed by darin. |
|
19548 |
|
19549 * tests/mozilla/js1_2/Array/tostring_1.js: now tests only for JS 1.5 behavior |
|
19550 * tests/mozilla/js1_2/Array/tostring_2.js: ditto |
|
19551 * tests/mozilla/expected.html: |
|
19552 |
|
19553 2005-07-24 Justin Garcia <justin.garcia@apple.com> |
|
19554 |
|
19555 Reviewed by kevin. |
|
19556 |
|
19557 Fixes make clean problem introduced in xcode2.1 transition |
|
19558 |
|
19559 * Makefile.am: |
|
19560 |
|
19561 2005-07-22 Geoffrey Garen <ggaren@apple.com> |
|
19562 |
|
19563 Reviewed by darin. |
|
19564 |
|
19565 * kjs/date_object.cpp: DatePrototypeImp now identifies itself as a |
|
19566 child class of DateInstanceImp -- this enables calls to Date.ValueOf(). |
|
19567 |
|
19568 fixes: ecma/Date/15.9.5.js (once we enable the date tests). |
|
19569 |
|
19570 2005-07-22 Geoffrey Garen <ggaren@apple.com> |
|
19571 |
|
19572 |
|
19573 Reviewed by darin. |
|
19574 |
|
19575 * tests/mozilla/jsDriver.pl: now takes the path to testkjs as a command-line argument |
|
19576 * tests/mozilla/run-mozilla-tests: Removed. |
|
19577 |
|
19578 2005-07-21 Geoffrey Garen <ggaren@apple.com> |
|
19579 |
|
19580 * JavaScriptCore.xcodeproj/.cvsignore: Added. |
|
19581 |
|
19582 2005-07-21 Geoffrey Garen <ggaren@apple.com> |
|
19583 |
|
19584 * JavaScriptCore.pbproj/project.pbxproj: Removed. |
|
19585 * JavaScriptCore.xcodeproj/ggaren.pbxuser: Added. |
|
19586 * JavaScriptCore.xcodeproj/ggaren.perspective: Added. |
|
19587 * JavaScriptCore.xcodeproj/project.pbxproj: Added. |
|
19588 * Makefile.am: |
|
19589 |
|
19590 2005-07-20 Maciej Stachowiak <mjs@apple.com> |
|
19591 |
|
19592 Patch from Trey Matteson <trey@usa.net>, reviewed by me. |
|
19593 |
|
19594 - fixed http://bugs.webkit.org/show_bug.cgi?id=3956 |
|
19595 some of WebKit builds with symbols, some doesn't |
|
19596 |
|
19597 * JavaScriptCore.pbproj/project.pbxproj: Generate symbols even for |
|
19598 Deployment. |
|
19599 |
|
19600 2005-07-19 Geoffrey Garen <ggaren@apple.com> |
|
19601 |
|
19602 -fixed http://bugs.webkit.org/show_bug.cgi?id=3991 |
|
19603 JSC doesn't implement Array.prototype.toLocaleString() |
|
19604 |
|
19605 -test failure: ecma_3/Array/15.4.4.3-1.js |
|
19606 |
|
19607 Reviewed by mjs. |
|
19608 |
|
19609 * kjs/array_object.cpp: |
|
19610 (ArrayProtoFuncImp::call): now searches for toString and |
|
19611 toLocaleString overrides in the array's elements |
|
19612 |
|
19613 * tests/mozilla/expected.html: failures are under 100! woohoo! |
|
19614 |
|
19615 2005-07-19 Darin Adler <darin@apple.com> |
|
19616 |
|
19617 - fixed the build |
|
19618 |
|
19619 * kjs/lookup.h: (KJS::lookupPut): Remove bogus const; was preventing WebCore from |
|
19620 compiling (not sure why this didn't affect my other build machine). |
|
19621 |
|
19622 - one other tiny tweak (so sue me) |
|
19623 |
|
19624 * bindings/runtime_root.cpp: Remove unneeded declaration. |
|
19625 |
|
19626 2005-07-19 Darin Adler <darin@apple.com> |
|
19627 |
|
19628 Reviewed by Geoff Garen. |
|
19629 |
|
19630 - eliminated try wrappers for get/put/call since we don't use C++ exceptions any more |
|
19631 |
|
19632 * kjs/lookup.h: Changed tryCall in IMPLEMENT_PROTOFUNC here to call. It doesn't make |
|
19633 sense for this macro to use the name tryCall anyway, since that's specific to how |
|
19634 WebCore used this, so this is good anyway. On the other hand, it might be a problem |
|
19635 for KDOM or KSVG, in which case we'll need another macro for them, since JavaScriptCore |
|
19636 should presumably not have the C++ exception support. |
|
19637 |
|
19638 2005-07-18 Geoffrey Garen <ggaren@apple.com> |
|
19639 |
|
19640 -fixed http://bugs.webkit.org/show_bug.cgi?id=4008 |
|
19641 Error objects report incorrect length |
|
19642 |
|
19643 Reviewed by darin. |
|
19644 |
|
19645 * kjs/error_object.cpp: Error objects now include a length property |
|
19646 (ErrorObjectImp::ErrorObjectImp): |
|
19647 |
|
19648 * tests/mozilla/expected.html: updated expected results to reflect fix |
|
19649 * tests/mozilla/js1_5/Exceptions/regress-123002.js: test now expects |
|
19650 ecma compliant results |
|
19651 |
|
19652 2005-07-15 Geoffrey Garen <ggaren@apple.com> |
|
19653 |
|
19654 -rolled in KDE fixes for http://bugs.webkit.org/show_bug.cgi?id=3601 |
|
19655 Error instance type info |
|
19656 |
|
19657 Reviewed by mjs. |
|
19658 |
|
19659 * kjs/error_object.cpp: |
|
19660 - Created ErrorInstanceImp class for Error() objects. |
|
19661 - Changed parent object for Native Errors to "Function" (matches |
|
19662 ECMA spec). |
|
19663 (ErrorInstanceImp::ErrorInstanceImp): |
|
19664 (ErrorProtoFuncImp::call): |
|
19665 (ErrorObjectImp::construct): |
|
19666 (NativeErrorImp::construct): |
|
19667 |
|
19668 * kjs/error_object.h: |
|
19669 (KJS::ErrorInstanceImp::classInfo): |
|
19670 * kjs/object.h: made comment more informative about ClassInfo |
|
19671 |
|
19672 * tests/mozilla/expected.html: |
|
19673 |
|
19674 2005-07-14 Geoffrey Garen <ggaren@apple.com> |
|
19675 |
|
19676 - fixed: JS test suite expects an out of memory error |
|
19677 that our memory efficiency avoids |
|
19678 |
|
19679 Reviewed by mjs. |
|
19680 |
|
19681 * tests/mozilla/js1_5/Array/regress-157652.js: |
|
19682 test now expects normal execution |
|
19683 |
|
19684 * tests/mozilla/expected.html: |
|
19685 |
|
19686 2005-07-14 Geoffrey Garen <ggaren@apple.com> |
|
19687 - fixed http://bugs.webkit.org/show_bug.cgi?id=4006 |
|
19688 testkjs doesn't implement gc() |
|
19689 |
|
19690 - test failure: |
|
19691 ecma_3/Function/regress-104584.js |
|
19692 |
|
19693 Reviewed by mjs. |
|
19694 |
|
19695 * kjs/interpreter.cpp: |
|
19696 (Interpreter::finalCheck): removed misleading while && comment |
|
19697 |
|
19698 * kjs/testkjs.cpp: added "gc" function to global object |
|
19699 (TestFunctionImp::): |
|
19700 (TestFunctionImp::call): |
|
19701 (main): |
|
19702 |
|
19703 * tests/mozilla/expected.html: |
|
19704 |
|
19705 2005-07-14 Geoffrey Garen <ggaren@apple.com> |
|
19706 |
|
19707 -rolled in patches for http://bugs.webkit.org/show_bug.cgi?id=3945 |
|
19708 [PATCH] Safe merges of comments and other trivialities from KDE's kjs |
|
19709 |
|
19710 -patch by Martijn Klingens <klingens@kde.org> |
|
19711 |
|
19712 * kjs/array_instance.h: |
|
19713 * kjs/array_object.cpp: |
|
19714 * kjs/array_object.h: |
|
19715 * kjs/bool_object.cpp: |
|
19716 * kjs/bool_object.h: |
|
19717 * kjs/collector.cpp: |
|
19718 * kjs/collector.h: |
|
19719 * kjs/completion.h: |
|
19720 * kjs/context.h: |
|
19721 * kjs/date_object.cpp: |
|
19722 * kjs/date_object.h: |
|
19723 * kjs/debugger.cpp: |
|
19724 * kjs/debugger.h: |
|
19725 * kjs/dtoa.h: |
|
19726 * kjs/error_object.cpp: |
|
19727 * kjs/error_object.h: |
|
19728 * kjs/function.cpp: |
|
19729 * kjs/function.h: |
|
19730 * kjs/function_object.cpp: |
|
19731 * kjs/function_object.h: |
|
19732 * kjs/grammar.y: |
|
19733 * kjs/identifier.cpp: |
|
19734 * kjs/identifier.h: |
|
19735 * kjs/internal.cpp: |
|
19736 * kjs/internal.h: |
|
19737 * kjs/interpreter.cpp: |
|
19738 * kjs/interpreter.h: |
|
19739 * kjs/interpreter_map.cpp: |
|
19740 * kjs/interpreter_map.h: |
|
19741 * kjs/lexer.cpp: |
|
19742 * kjs/lexer.h: |
|
19743 * kjs/list.cpp: |
|
19744 * kjs/list.h: |
|
19745 * kjs/lookup.cpp: |
|
19746 * kjs/lookup.h: |
|
19747 * kjs/math_object.cpp: |
|
19748 * kjs/math_object.h: |
|
19749 * kjs/nodes.cpp: |
|
19750 * kjs/nodes.h: |
|
19751 * kjs/nodes2string.cpp: |
|
19752 * kjs/number_object.cpp: |
|
19753 * kjs/number_object.h: |
|
19754 * kjs/object.cpp: |
|
19755 * kjs/object.h: |
|
19756 * kjs/object_object.cpp: |
|
19757 * kjs/object_object.h: |
|
19758 * kjs/operations.cpp: |
|
19759 * kjs/operations.h: |
|
19760 * kjs/property_map.cpp: |
|
19761 * kjs/property_map.h: |
|
19762 * kjs/reference.cpp: |
|
19763 * kjs/reference.h: |
|
19764 * kjs/reference_list.cpp: |
|
19765 * kjs/reference_list.h: |
|
19766 * kjs/regexp.cpp: |
|
19767 * kjs/regexp.h: |
|
19768 * kjs/regexp_object.cpp: |
|
19769 * kjs/regexp_object.h: |
|
19770 * kjs/scope_chain.cpp: |
|
19771 * kjs/scope_chain.h: |
|
19772 * kjs/simple_number.h: |
|
19773 * kjs/string_object.cpp: |
|
19774 * kjs/string_object.h: |
|
19775 * kjs/testkjs.cpp: |
|
19776 * kjs/types.h: |
|
19777 * kjs/ustring.cpp: |
|
19778 * kjs/ustring.h: |
|
19779 * kjs/value.cpp: |
|
19780 * kjs/value.h: |
|
19781 |
|
19782 2005-07-14 Geoffrey Garen <ggaren@apple.com> |
|
19783 |
|
19784 -fixed http://bugs.webkit.org/show_bug.cgi?id=3970 |
|
19785 throw statements fail inside eval statements |
|
19786 |
|
19787 Reviewed by mjs. |
|
19788 |
|
19789 * kjs/function.cpp: |
|
19790 (KJS::GlobalFuncImp::call): |
|
19791 Big change since I fixed the tabbing. The important part is: |
|
19792 if (c.complType() == Throw) |
|
19793 exec->setException(c.value()); |
|
19794 |
|
19795 * kjs/nodes.cpp: |
|
19796 (ThrowNode::execute): removed duplicate KJS_CHECKEXCEPTION |
|
19797 (TryNode::execute): |
|
19798 try now clears the exception state before the finally block executes, |
|
19799 and checks the state after the block executes, so that exceptions in |
|
19800 finally code get caught. |
|
19801 |
|
19802 * tests/mozilla/expected.html: |
|
19803 |
|
19804 2005-07-14 Geoffrey Garen <ggaren@apple.com> |
|
19805 |
|
19806 -landed fix for http://bugs.webkit.org/show_bug.cgi?id=3412 |
|
19807 Object.prototype is missing toLocaleString |
|
19808 |
|
19809 - patch by Mark Rowe (bdash) <opendarwin.org@bdash.net.nz> |
|
19810 |
|
19811 -layout test info in webcore changelog |
|
19812 |
|
19813 Reviewed by mjs. |
|
19814 |
|
19815 * kjs/object_object.cpp: |
|
19816 (ObjectPrototypeImp::ObjectPrototypeImp): |
|
19817 (ObjectProtoFuncImp::call): |
|
19818 * kjs/object_object.h: |
|
19819 (KJS::ObjectProtoFuncImp::): |
|
19820 |
|
19821 2005-07-12 Geoffrey Garen <ggaren@apple.com> |
|
19822 |
|
19823 Reviewed by mjs. |
|
19824 |
|
19825 * kjs/function.cpp: |
|
19826 (KJS::IndexToNameMap::operator[]): fixed infinite recursion |
|
19827 bug in last checkin |
|
19828 |
|
19829 2005-07-12 Geoffrey Garen <ggaren@apple.com> |
|
19830 |
|
19831 -fixed http://bugs.webkit.org/show_bug.cgi?id=3881 |
|
19832 arguments object should share values with function parameters |
|
19833 |
|
19834 Reviewed by mjs. |
|
19835 |
|
19836 ArgumentsImp now uses a simple hash lookup to share values |
|
19837 with the activation object. |
|
19838 |
|
19839 * kjs/function.cpp: |
|
19840 (KJS::FunctionImp::getParameterName): |
|
19841 (KJS::IndexToNameMap::IndexToNameMap): |
|
19842 (KJS::IndexToNameMap::~IndexToNameMap): |
|
19843 (KJS::IndexToNameMap::isMapped): |
|
19844 (KJS::IndexToNameMap::unMap): |
|
19845 (KJS::IndexToNameMap::operator[]): |
|
19846 (KJS::ArgumentsImp::ArgumentsImp): |
|
19847 (KJS::ArgumentsImp::mark): |
|
19848 (KJS::ArgumentsImp::get): |
|
19849 (KJS::ArgumentsImp::put): |
|
19850 (KJS::ArgumentsImp::deleteProperty): |
|
19851 (KJS::ArgumentsImp::hasOwnProperty): |
|
19852 (KJS::ActivationImp::createArgumentsObject): |
|
19853 * kjs/function.h: |
|
19854 * tests/mozilla/expected.html: updated results |
|
19855 |
|
19856 2005-07-09 Maciej Stachowiak <mjs@apple.com> |
|
19857 |
|
19858 - backing out my earlier collector change, it causes a performance regression in TOT |
|
19859 |
|
19860 * kjs/collector.cpp: |
|
19861 (KJS::Collector::allocate): |
|
19862 |
|
19863 2005-07-08 Eric Seidel <eseidel@apple.com> |
|
19864 |
|
19865 Reviewed by mjs/hyatt (only in concept). |
|
19866 |
|
19867 * JavaScriptCore.pbproj/project.pbxproj: Added JavaScriptCore+SVG |
|
19868 Turns on RTTI support for JavaScriptCore.framework when |
|
19869 building the JavaScriptCore+SVG target. This is needed as |
|
19870 kdom (part of WebCore+SVG) requires RTTI for the time being. |
|
19871 |
|
19872 2005-07-08 Maciej Stachowiak <mjs@apple.com> |
|
19873 |
|
19874 Reviewed by hyatt. |
|
19875 |
|
19876 - When there are many live objects, GC less often, to try to make |
|
19877 GC cost proportional to garbage, not proportional to total memory used. |
|
19878 |
|
19879 * kjs/collector.cpp: |
|
19880 (KJS::Collector::allocate): |
|
19881 |
|
19882 2005-07-08 Vicki Murley <vicki@apple.com> |
|
19883 |
|
19884 Fix from Carsten Guenther, reviewed by Maciej |
|
19885 |
|
19886 - fixed http://bugs.webkit.org/show_bug.cgi?id=3644 (Error string representation) |
|
19887 |
|
19888 Switch from "-" to ":" in error strings. |
|
19889 |
|
19890 * kjs/error_object.cpp: |
|
19891 (ErrorProtoFuncImp::call): |
|
19892 * tests/mozilla/expected.html: |
|
19893 |
|
19894 2005-07-08 Geoffrey Garen <ggaren@apple.com> |
|
19895 |
|
19896 -rolled in patch for http://bugs.webkit.org/show_bug.cgi?id=3878 |
|
19897 arguments object should be an object not an array |
|
19898 |
|
19899 Reviewed by mjs. |
|
19900 |
|
19901 * kjs/function.cpp: |
|
19902 (KJS::ArgumentsImp::ArgumentsImp): now manually handles initialization |
|
19903 we used to get for free by inheriting from ArrayInstanceImp |
|
19904 * kjs/function.h: ArgumentsImp now inherits from ObjectImp |
|
19905 * tests/mozilla/expected.html: updated expected test results |
|
19906 |
|
19907 2005-07-07 Eric Seidel <eseidel@apple.com> |
|
19908 |
|
19909 Reviewed by mjs. |
|
19910 |
|
19911 * kjs/grammar.y: removed #define YYMAXDEPTH 0 for bison 2.0 |
|
19912 http://bugs.webkit.org/show_bug.cgi?id=3882 |
|
19913 |
|
19914 2005-07-03 Maciej Stachowiak <mjs@apple.com> |
|
19915 |
|
19916 Original patch from Mark Rowe <opendarwin.org@bdash.net.nz>, reviewed by me. |
|
19917 Fixes to patch by me, reviewed by John Sullivan. |
|
19918 |
|
19919 - fixed http://bugs.webkit.org/show_bug.cgi?id=3293 |
|
19920 |
|
19921 Test cases added: |
|
19922 * tests/mozilla/expected.html: Two tests newly pass. |
|
19923 |
|
19924 * bindings/objc/objc_runtime.h: |
|
19925 * bindings/objc/objc_runtime.mm: |
|
19926 (ObjcFallbackObjectImp::hasOwnProperty): |
|
19927 * bindings/runtime_array.cpp: |
|
19928 (RuntimeArrayImp::hasOwnProperty): |
|
19929 * bindings/runtime_array.h: |
|
19930 * bindings/runtime_object.cpp: |
|
19931 (RuntimeObjectImp::hasOwnProperty): |
|
19932 * bindings/runtime_object.h: |
|
19933 * kjs/array_instance.h: |
|
19934 * kjs/array_object.cpp: |
|
19935 (ArrayInstanceImp::hasOwnProperty): |
|
19936 * kjs/function.cpp: |
|
19937 (KJS::FunctionImp::hasOwnProperty): |
|
19938 (KJS::ActivationImp::hasOwnProperty): |
|
19939 * kjs/function.h: |
|
19940 * kjs/lookup.h: |
|
19941 * kjs/object.cpp: |
|
19942 (KJS::ObjectImp::hasProperty): |
|
19943 (KJS::ObjectImp::hasOwnProperty): |
|
19944 * kjs/object.h: |
|
19945 (KJS::Object::hasOwnProperty): |
|
19946 * kjs/object_object.cpp: |
|
19947 (ObjectPrototypeImp::ObjectPrototypeImp): |
|
19948 (ObjectProtoFuncImp::call): |
|
19949 * kjs/object_object.h: |
|
19950 (KJS::ObjectProtoFuncImp::): |
|
19951 * kjs/string_object.cpp: |
|
19952 (StringInstanceImp::hasOwnProperty): |
|
19953 * kjs/string_object.h: |
|
19954 |
|
19955 2005-07-01 Geoffrey Garen <ggaren@apple.com> |
|
19956 |
|
19957 -landed patch by Eric Seidel <macdome@opendarwin.org> |
|
19958 |
|
19959 -for http://bugs.webkit.org/show_bug.cgi?id=3657 |
|
19960 GroundWork: Moving some functions from khtml->jsc following kjs TOT |
|
19961 |
|
19962 - no layout test necessary yet - only groundwork |
|
19963 |
|
19964 Reviewed by darin. |
|
19965 |
|
19966 * kjs/lookup.h: |
|
19967 (KJS::cacheGlobalObject): |
|
19968 |
|
19969 2005-07-01 Geoffrey Garen <ggaren@apple.com> |
|
19970 |
|
19971 -landed patch by Carsten Guenther <cguenther@gmail.com> |
|
19972 |
|
19973 -fixes http://bugs.webkit.org/show_bug.cgi?id=3477 |
|
19974 some US-centric date formats not parsed by JavaScript (clock at news8austin.com) |
|
19975 |
|
19976 -relevant tests: |
|
19977 mozilla/ecma_3/Date/15.9.5.5.js |
|
19978 layout-tests/fast/js/date-parse-test.html |
|
19979 |
|
19980 Reviewed by darin. |
|
19981 |
|
19982 * kjs/date_object.cpp: |
|
19983 (formatLocaleDate): |
|
19984 (day): |
|
19985 (dayFromYear): |
|
19986 (daysInYear): |
|
19987 (timeFromYear): |
|
19988 (yearFromTime): |
|
19989 (weekDay): |
|
19990 (timeZoneOffset): |
|
19991 (DateProtoFuncImp::call): |
|
19992 (DateObjectImp::construct): |
|
19993 (KJS::parseDate): |
|
19994 (ymdhms_to_seconds): |
|
19995 (KJS::makeTime): |
|
19996 (findMonth): |
|
19997 (KJS::KRFCDate_parseDate): |
|
19998 * kjs/date_object.h: |
|
19999 * tests/mozilla/expected.html: updated expected results to reflect fix |
|
20000 |
|
20001 2005-07-01 Geoffrey Garen <ggaren@apple.com> |
|
20002 |
|
20003 -fixed <rdar://problem/4168186> JavaScript fails to throw exceptions |
|
20004 for invalid return statements |
|
20005 |
|
20006 relevant tests: |
|
20007 ecma/Statements/12.9-1-n.js |
|
20008 ecma_2/Exceptions/lexical-052.js |
|
20009 ecma_2/Exceptions/statement-009.js |
|
20010 |
|
20011 Reviewed by sullivan. |
|
20012 |
|
20013 * kjs/nodes.cpp: |
|
20014 (ReturnNode::execute): now throws exception if return is not inside |
|
20015 a function. |
|
20016 |
|
20017 * tests/mozilla/expected.html: updated to reflect fix |
|
20018 |
|
20019 2005-07-01 Geoffrey Garen <ggaren@apple.com> |
|
20020 |
|
20021 Reviewed by sullivan. |
|
20022 |
|
20023 * tests/mozilla/expected.html: Updated test results for last fix. |
|
20024 |
|
20025 2005-07-01 Geoffrey Garen <ggaren@apple.com> |
|
20026 |
|
20027 -fixed <rdar://problem/4168161> JavaScript fails to throw an exception |
|
20028 for invalid function calls |
|
20029 |
|
20030 Reviewed by sullivan. |
|
20031 |
|
20032 Relevant mozilla test: ecma_3/Exceptions/regress-95101.js |
|
20033 |
|
20034 * kjs/nodes.cpp: |
|
20035 (FunctionCallNode::evaluate): evaluate now checks for an exception |
|
20036 after resolving a function name (in case the function is undefined) |
|
20037 |
|
20038 2005-07-01 Eric Seidel <eseidel@apple.com> |
|
20039 |
|
20040 Reviewed by darin. |
|
20041 |
|
20042 * kjs/interpreter.h: |
|
20043 (KJS::Context::curStmtFirstLine): stub for compatibility with KDE |
|
20044 * kjs/value.h: |
|
20045 (KJS::Value::isValid): compatibility with KDE |
|
20046 http://bugs.webkit.org/show_bug.cgi?id=3687 |
|
20047 |
|
20048 2005-07-01 Eric Seidel <eseidel@apple.com> |
|
20049 |
|
20050 Reviewed by darin. |
|
20051 |
|
20052 * kjs/create_hash_table: rolled in changes from KDE, including |
|
20053 -n <namespace> support from KDOM and support for newer comments |
|
20054 http://bugs.webkit.org/show_bug.cgi?id=3771 |
|
20055 |
|
20056 2005-06-30 Geoffrey Garen <ggaren@apple.com> |
|
20057 |
|
20058 -rolled in KDE fix to <rdar://problem/4167660> JavaScript fails to |
|
20059 throw exceptions for invalid break/continue statements |
|
20060 |
|
20061 No layout tests because it's already covered by the Mozilla suite |
|
20062 |
|
20063 Reviewed by mjs. |
|
20064 |
|
20065 * kjs/internal.h: LabelStack now tracks where you are relative to |
|
20066 switch and iteration (loop) statements |
|
20067 |
|
20068 (KJS::LabelStack::LabelStack): |
|
20069 (KJS::LabelStack::pushIteration): |
|
20070 (KJS::LabelStack::popIteration): |
|
20071 (KJS::LabelStack::inIteration): |
|
20072 (KJS::LabelStack::pushSwitch): |
|
20073 (KJS::LabelStack::popSwitch): |
|
20074 (KJS::LabelStack::inSwitch): |
|
20075 |
|
20076 * kjs/nodes.cpp: |
|
20077 These files were updated to use the new LabelStack: |
|
20078 (DoWhileNode::execute): |
|
20079 (WhileNode::execute): |
|
20080 (ForNode::execute): |
|
20081 (ForInNode::execute): |
|
20082 (SwitchNode::execute): |
|
20083 |
|
20084 These files were updated to throw exceptions for invalid |
|
20085 break/continue statements: |
|
20086 (BreakNode::execute): |
|
20087 (ContinueNode::execute): |
|
20088 |
|
20089 * tests/mozilla/expected.html: Updated expected results to reflect fix |
|
20090 |
|
20091 2005-06-30 Kevin Decker <kdecker@apple.com> |
|
20092 |
|
20093 Reviewed by rjw. |
|
20094 |
|
20095 fixed: <rdar://problem/4166838> failed assertion in`Interpreter::lockCount() > 0 |
|
20096 |
|
20097 no layout test added; this is in the bindings code. |
|
20098 |
|
20099 * bindings/objc/WebScriptObject.mm: |
|
20100 (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): make sure to lock and unlock the interpreter around allocations. |
|
20101 |
|
20102 2005-06-29 Geoffrey Garen <ggaren@apple.com> |
|
20103 |
|
20104 Patch by Francisco Tolmasky <tolmasky@gmail.com> |
|
20105 |
|
20106 - fixes http://bugs.webkit.org/show_bug.cgi?id=3667 |
|
20107 Core JavaScript 1.5 Reference:Objects:Array:forEach |
|
20108 |
|
20109 See WebCore Changelog for layout tests added. |
|
20110 |
|
20111 Reviewed by darin. |
|
20112 |
|
20113 * kjs/array_object.cpp: |
|
20114 (ArrayProtoFuncImp::call): |
|
20115 * kjs/array_object.h: |
|
20116 (KJS::ArrayProtoFuncImp::): |
|
20117 |
|
20118 2005-06-29 Geoffrey Garen <ggaren@apple.com> |
|
20119 |
|
20120 Patch contributed by Oliver Hunt <ojh16@student.canterbury.ac.nz> |
|
20121 |
|
20122 -fixed http://bugs.webkit.org/show_bug.cgi?id=3743 |
|
20123 Incorrect error message given for certain calls |
|
20124 |
|
20125 See WebCore Changelog for layout test added. |
|
20126 |
|
20127 Reviewed by mjs. |
|
20128 |
|
20129 * kjs/object.cpp: |
|
20130 (KJS::ObjectImp::defaultValue): |
|
20131 |
|
20132 2005-06-29 Geoffrey Garen <ggaren@apple.com> |
|
20133 |
|
20134 Rolling out date patch from 6-28-05 because it breaks |
|
20135 fast/js/date-parse-test |
|
20136 |
|
20137 * kjs/date_object.cpp: |
|
20138 (formatLocaleDate): |
|
20139 (DateProtoFuncImp::call): |
|
20140 (DateObjectImp::construct): |
|
20141 (KJS::parseDate): |
|
20142 (ymdhms_to_seconds): |
|
20143 (isSpaceOrTab): |
|
20144 (KJS::KRFCDate_parseDate): |
|
20145 * kjs/date_object.h: |
|
20146 * tests/mozilla/expected.html: |
|
20147 |
|
20148 2005-06-29 Geoffrey Garen <ggaren@apple.com> |
|
20149 |
|
20150 Reviewed by Darin. |
|
20151 |
|
20152 -fixes http://bugs.webkit.org/show_bug.cgi?id=3750 |
|
20153 build fails with KJS_VERBOSE set |
|
20154 |
|
20155 * kjs/nodes.cpp: changed debug print statement to use UString |
|
20156 (VarDeclNode::evaluate): |
|
20157 * kjs/reference.cpp: ditto |
|
20158 (KJS::Reference::putValue): |
|
20159 |
|
20160 2005-06-28 Geoffrey Garen <ggaren@apple.com> |
|
20161 |
|
20162 Patch contributed by Carsten Guenther <cguenther@gmail.com>. |
|
20163 |
|
20164 -fixes http://bugs.webkit.org/show_bug.cgi?id=3477 |
|
20165 some US-centric date formats not parsed by JavaScript (clock at news8austin.com) |
|
20166 |
|
20167 Reviewed by darin. |
|
20168 |
|
20169 * kjs/date_object.cpp: |
|
20170 (formatLocaleDate): |
|
20171 (day): |
|
20172 (dayFromYear): |
|
20173 (daysInYear): |
|
20174 (timeFromYear): |
|
20175 (yearFromTime): |
|
20176 (weekDay): |
|
20177 (timeZoneOffset): |
|
20178 (DateProtoFuncImp::call): |
|
20179 (DateObjectImp::construct): |
|
20180 (KJS::parseDate): |
|
20181 (ymdhms_to_seconds): |
|
20182 (KJS::makeTime): |
|
20183 (findMonth): |
|
20184 (KJS::KRFCDate_parseDate): |
|
20185 * kjs/date_object.h: |
|
20186 * tests/mozilla/expected.html: updated expected test results to reflect fix |
|
20187 |
|
20188 2005-06-26 Maciej Stachowiak <mjs@apple.com> |
|
20189 |
|
20190 Reviewed by Darin. |
|
20191 |
|
20192 - replace hash functions with better ones |
|
20193 |
|
20194 * JavaScriptCore.pbproj/project.pbxproj: Add new file to build. |
|
20195 * kjs/interpreter_map.cpp: |
|
20196 (KJS::InterpreterMap::computeHash): Use shared pointer hash. |
|
20197 * kjs/pointer_hash.h: Added. |
|
20198 (KJS::pointerHash): Pointer hash based on 32-bit mix and 64-bit mix hashes. |
|
20199 * kjs/protected_values.cpp: |
|
20200 (KJS::ProtectedValues::computeHash): Use shared pointer hash. |
|
20201 * kjs/ustring.cpp: |
|
20202 (KJS::UString::Rep::computeHash): Use SuperFastHash algorithm. |
|
20203 |
|
20204 2005-06-22 Darin Adler <darin@apple.com> |
|
20205 |
|
20206 Change by Anders Carlsson. |
|
20207 Reviewed by me. |
|
20208 |
|
20209 - fixed <http://bugs.webkit.org/show_bug.cgi?id=3294> |
|
20210 String.prototype.replace() fails with function as second param |
|
20211 |
|
20212 * kjs/string_object.cpp: (replace): Added code to handle functions. |
|
20213 |
|
20214 * tests/mozilla/expected.html: Updated since ecma_3/RegExp/regress-209067.js is fixed now. |
|
20215 |
|
20216 * tests/mozilla/run-mozilla-tests: Fix a minor coding style issue that leads to a warning each |
|
20217 time we run the tests. |
|
20218 |
|
20219 2005-06-21 Adele Peterson <adele@apple.com> |
|
20220 |
|
20221 rolling out fix for http://bugs.webkit.org/show_bug.cgi?id=3293, since it caused layout test failures. |
|
20222 fast/forms/element-by-name |
|
20223 fast/loader/loadInProgress |
|
20224 |
|
20225 * ChangeLog: |
|
20226 * bindings/objc/objc_runtime.h: |
|
20227 * bindings/objc/objc_runtime.mm: |
|
20228 (ObjcFallbackObjectImp::hasProperty): |
|
20229 * bindings/runtime_array.cpp: |
|
20230 (RuntimeArrayImp::hasProperty): |
|
20231 * bindings/runtime_array.h: |
|
20232 * bindings/runtime_object.cpp: |
|
20233 (RuntimeObjectImp::hasProperty): |
|
20234 * bindings/runtime_object.h: |
|
20235 * kjs/array_instance.h: |
|
20236 * kjs/array_object.cpp: |
|
20237 (ArrayInstanceImp::hasProperty): |
|
20238 * kjs/function.cpp: |
|
20239 (KJS::FunctionImp::hasProperty): |
|
20240 (KJS::ActivationImp::hasProperty): |
|
20241 * kjs/function.h: |
|
20242 * kjs/object.cpp: |
|
20243 (KJS::ObjectImp::hasProperty): |
|
20244 * kjs/object.h: |
|
20245 * kjs/object_object.cpp: |
|
20246 (ObjectPrototypeImp::ObjectPrototypeImp): |
|
20247 (ObjectProtoFuncImp::call): |
|
20248 * kjs/object_object.h: |
|
20249 (KJS::ObjectProtoFuncImp::): |
|
20250 * kjs/string_object.cpp: |
|
20251 (StringInstanceImp::hasProperty): |
|
20252 * kjs/string_object.h: |
|
20253 * tests/mozilla/expected.html: |
|
20254 |
|
20255 2005-06-21 Darin Adler <darin@apple.com> |
|
20256 |
|
20257 * JavaScriptCore.pbproj/project.pbxproj: Switched to a build rule rather than a build phase for |
|
20258 .y files -- this gets rid of the problem where modifying the .y file would not cause sufficient |
|
20259 compilation. |
|
20260 |
|
20261 * kjs/grammar_wrapper.cpp: Removed. |
|
20262 |
|
20263 2005-06-21 Adele Peterson <adele@apple.com> |
|
20264 |
|
20265 Patch from Anders Carlsson <andersca@mac.com>, reviewed by Darin. |
|
20266 |
|
20267 Fixed: <http://bugs.webkit.org/show_bug.cgi?id=3450> |
|
20268 <rdar://problem/3881901> String.replace() method not working when regex pattern contains {n, m} |
|
20269 |
|
20270 * pcre/pcre.c: (pcre_compile): Remember the last char length so it can be subtracted correctly if needed. |
|
20271 |
|
20272 2005-06-21 Geoffrey Garen <ggaren@apple.com> |
|
20273 |
|
20274 - fixed <rdar://problem/4155532> 'delete' succeeds on functions |
|
20275 - fixed <rdar://problem/4155049> javascript function named as "opener" doesn't get called because of window.opener property |
|
20276 |
|
20277 Reviewed by cblu. |
|
20278 |
|
20279 * kjs/nodes.cpp: |
|
20280 (FuncDeclNode::processFuncDecl): Functions now have DontDelete and Internal attributes set when appropriate. |
|
20281 |
|
20282 Test cases: |
|
20283 * tests/mozilla/expected.html: Updated for one new success. |
|
20284 - see also test case added in WebCore. |
|
20285 |
|
20286 2005-06-20 Maciej Stachowiak <mjs@apple.com> |
|
20287 |
|
20288 Reviewed by Darin(first pass) and Hyatt. |
|
20289 |
|
20290 - fixed http://bugs.webkit.org/show_bug.cgi?id=3576 |
|
20291 (roll in support for "const" keyword from KDE tree) |
|
20292 - make processVarDecls handle deletability of variables declared |
|
20293 in an eval block the same as evaluate would |
|
20294 - make eval() call processVarDecls - needed to match mozilla and |
|
20295 to make the second change testable |
|
20296 |
|
20297 I started with the KDE implementation of const but I ended up changing it a bit |
|
20298 to avoid the use of a global variable. Now instead of the global variable it distinguishes |
|
20299 const and var at the grammar level so the appropriate node can know the right kind of |
|
20300 declaration. |
|
20301 |
|
20302 Test cases: |
|
20303 * tests/mozilla/expected.html: Updated for one new test that is |
|
20304 failing - we used to bail on it entirely because it checks for |
|
20305 const support before starting. |
|
20306 - see also test cases added in WebCore |
|
20307 |
|
20308 * kjs/grammar.y: Add rules for const declarations. |
|
20309 * kjs/keywords.table: Add const keyword. |
|
20310 * kjs/nodes.cpp: |
|
20311 (VarDeclNode::VarDeclNode): Add parameter. |
|
20312 (VarDeclNode::evaluate): Add const support. |
|
20313 (VarDeclNode::processVarDecls): Add const support. |
|
20314 (VarStatementNode::execute): Irrelevant change. |
|
20315 (ForInNode::ForInNode): Tell our variable node that it's a variable. |
|
20316 * kjs/nodes.h: |
|
20317 (KJS::VarDeclNode::): Add declaration of type enum, extra constructor parameter. |
|
20318 (KJS::VarStatementNode::VarStatementNode): Irrelevant change. |
|
20319 * kjs/function.cpp: |
|
20320 (KJS::GlobalFuncImp::call): Process var decls before evaluating. |
|
20321 |
|
20322 2005-06-20 Maciej Stachowiak <mjs@apple.com> |
|
20323 |
|
20324 Patch from Mark Rowe <opendarwin.org@bdash.net.nz>, reviewed by me. |
|
20325 |
|
20326 - fixed http://bugs.webkit.org/show_bug.cgi?id=3293 |
|
20327 |
|
20328 Test cases added: |
|
20329 * tests/mozilla/expected.html: Updated for two fixed tests. |
|
20330 - also added a layout test |
|
20331 |
|
20332 * bindings/objc/objc_runtime.h: |
|
20333 * bindings/objc/objc_runtime.mm: |
|
20334 (ObjcFallbackObjectImp::hasOwnProperty): |
|
20335 * bindings/runtime_array.cpp: |
|
20336 (RuntimeArrayImp::hasOwnProperty): |
|
20337 * bindings/runtime_array.h: |
|
20338 * bindings/runtime_object.cpp: |
|
20339 (RuntimeObjectImp::hasOwnProperty): |
|
20340 * bindings/runtime_object.h: |
|
20341 * kjs/array_instance.h: |
|
20342 * kjs/array_object.cpp: |
|
20343 (ArrayInstanceImp::hasOwnProperty): |
|
20344 * kjs/function.cpp: |
|
20345 (KJS::FunctionImp::hasOwnProperty): |
|
20346 (KJS::ActivationImp::hasOwnProperty): |
|
20347 * kjs/function.h: |
|
20348 * kjs/object.cpp: |
|
20349 (KJS::ObjectImp::hasProperty): |
|
20350 (KJS::ObjectImp::hasOwnProperty): |
|
20351 * kjs/object.h: |
|
20352 (KJS::Object::hasOwnProperty): |
|
20353 * kjs/object_object.cpp: |
|
20354 (ObjectPrototypeImp::ObjectPrototypeImp): |
|
20355 (ObjectProtoFuncImp::call): |
|
20356 * kjs/object_object.h: |
|
20357 (KJS::ObjectProtoFuncImp::): |
|
20358 * kjs/string_object.cpp: |
|
20359 (StringInstanceImp::hasOwnProperty): |
|
20360 * kjs/string_object.h: |
|
20361 |
|
20362 2005-06-18 Darin Adler <darin@apple.com> |
|
20363 |
|
20364 Reviewed by Eric Seidel. |
|
20365 |
|
20366 * pcre/get.c: (pcre_get_substring): Fix some computations so this works for UTF-16. |
|
20367 This is unused in the current JavaScriptCore, but still good to fix. |
|
20368 |
|
20369 2005-06-18 Darin Adler <darin@apple.com> |
|
20370 |
|
20371 Change by Finlay Dobbie. |
|
20372 Reviewed by me. |
|
20373 |
|
20374 - fixed <http://bugs.webkit.org/show_bug.cgi?id=3331> |
|
20375 10.3.9 Build Failure: NSString may not respond to `+stringWithCString:encoding:' |
|
20376 |
|
20377 * bindings/objc/WebScriptObject.mm: (-[WebScriptObject stringRepresentation]): |
|
20378 Undo change we did a while back to work around the gcc 3.3 compiler error. |
|
20379 It no longer seems to happen, and the workaround code was 10.4-specific. |
|
20380 |
|
20381 2005-06-16 Geoffrey Garen <ggaren@apple.com> |
|
20382 |
|
20383 Fixed: <rdar://problem/4151759> 'delete' fails on variables declared inside 'eval' statements. |
|
20384 |
|
20385 Reviewed by cblu. |
|
20386 |
|
20387 * kjs/context.h: |
|
20388 (KJS::ContextImp::codeType): Added code type accessor for execution context objects. |
|
20389 * kjs/internal.cpp: |
|
20390 (ContextImp::ContextImp): Reflects change to ContextImp::codeType. |
|
20391 * kjs/nodes.cpp: |
|
20392 (VarDeclNode::evaluate): Added separate code path for variable declarations inside 'eval' statements. |
|
20393 * tests/mozilla/expected.html: Updated expected test results to reflect fix. |
|
20394 |
|
20395 2005-06-14 Geoffrey Garen <ggaren@apple.com> |
|
20396 |
|
20397 Updated expected.html to reflect fix to <rdar://problem/4147745>. |
|
20398 |
|
20399 Reviewed by cblu. |
|
20400 |
|
20401 * tests/mozilla/expected.html: |
|
20402 |
|
20403 2005-06-14 Geoffrey Garen <ggaren@apple.com> |
|
20404 |
|
20405 Fixed: <rdar://problem/4147745> JavaScript discards locally defined "arguments" property |
|
20406 |
|
20407 No layout tests added because this change fixes existing tests: |
|
20408 ecma/ExecutionContexts/10.1.6.js |
|
20409 ecma_3/Function/regress-94506.js |
|
20410 js1_4/Functions/function-001.js |
|
20411 |
|
20412 Reviewed by cblu. |
|
20413 |
|
20414 * kjs/function.cpp: |
|
20415 (KJS::ActivationImp::get): get now checks for an "arguments" property defined in the local variable object |
|
20416 before trying to return the built-in arguments array. |
|
20417 |
|
20418 * kjs/function.h: ActivationImp::put no longer overrides ObjectImp::put |
|
20419 |
|
20420 2005-06-10 Darin Adler <darin@apple.com> |
|
20421 |
|
20422 Change by Mark Rowe <opendarwin.org@bdash.net.nz>. |
|
20423 Reviewed by me. |
|
20424 |
|
20425 - further improvements to exception file/line number fix |
|
20426 |
|
20427 * kjs/nodes.h: Added setExceptionDetailsIfNeeded function. |
|
20428 * kjs/nodes.cpp: Updated macros to call the new setExceptionDetailsIfNeeded function. |
|
20429 (Node::setExceptionDetailsIfNeeded): Added. |
|
20430 |
|
20431 2005-06-09 Darin Adler <darin@apple.com> |
|
20432 |
|
20433 Change by Mark Rowe <opendarwin.org@bdash.net.nz> |
|
20434 Reviewed by me. |
|
20435 |
|
20436 * kjs/nodes.cpp: Get rid of unneeded this->. |
|
20437 |
|
20438 2005-06-08 Maciej Stachowiak <mjs@apple.com> |
|
20439 |
|
20440 Change by Mark Rowe <opendarwin.org@bdash.net.nz> |
|
20441 Reviewed by me. |
|
20442 |
|
20443 - fixed http://bugs.webkit.org/show_bug.cgi?id=3327 |
|
20444 (Exception When Setting Style to Invalid Value Lacks Line/File Information) |
|
20445 |
|
20446 * kjs/nodes.cpp: Include source file and line number when making exception in |
|
20447 KJS_CHECKEXCEPTIONVALUE. |
|
20448 |
|
20449 2005-06-07 Darin Adler <darin@apple.com> |
|
20450 |
|
20451 Change by Toby Peterson <toby@opendarwin.org>. |
|
20452 Reviewed by me. |
|
20453 |
|
20454 * JavaScriptCore.pbproj/project.pbxproj: Allow bison 2.0, which generates the file |
|
20455 with a different name. |
|
20456 |
|
20457 2005-06-07 Darin Adler <darin@apple.com> |
|
20458 |
|
20459 Change by Toby Peterson <toby@opendarwin.org>. |
|
20460 Reviewed by me. |
|
20461 |
|
20462 * kjs/grammar.y: Remove bogus extra line from grammar.y. Toby got this change from KDE KJS. |
|
20463 |
|
20464 2005-06-06 Darin Adler <darin@apple.com> |
|
20465 |
|
20466 * tests/mozilla/run-mozilla-tests: Wrote a perl version of this so we don't require |
|
20467 the "jst" tool to run the tests. |
|
20468 |
|
20469 2005-06-04 Darin Adler <darin@apple.com> |
|
20470 |
|
20471 Reviewed by Maciej. |
|
20472 |
|
20473 - add libicu headers |
|
20474 |
|
20475 * JavaScriptCore.pbproj/project.pbxproj: Added icu directory to header search path. |
|
20476 |
|
20477 * icu/README: Added. |
|
20478 * icu/unicode/platform.h: Added. |
|
20479 * icu/unicode/uchar.h: Added. |
|
20480 * icu/unicode/uconfig.h: Added. |
|
20481 * icu/unicode/umachine.h: Added. |
|
20482 * icu/unicode/urename.h: Added. |
|
20483 * icu/unicode/utf.h: Added. |
|
20484 * icu/unicode/utf16.h: Added. |
|
20485 * icu/unicode/utf8.h: Added. |
|
20486 * icu/unicode/utf_old.h: Added. |
|
20487 * icu/unicode/utypes.h: Added. |
|
20488 * icu/unicode/uversion.h: Added. |
|
20489 |
|
20490 2005-05-19 Darin Adler <darin@apple.com> |
|
20491 |
|
20492 Reviewed by Maciej. |
|
20493 |
|
20494 - turned off exceptions and RTTI; seems to cut JavaScriptCore code size by about 22% |
|
20495 |
|
20496 * JavaScriptCore.pbproj/project.pbxproj: Turn off exceptions and RTTI for both |
|
20497 the framework and testkjs tool. |
|
20498 |
|
20499 2005-05-18 Darin Adler <darin@apple.com> |
|
20500 |
|
20501 Reviewed by Maciej. |
|
20502 |
|
20503 - got rid of code that depended on RTTI |
|
20504 |
|
20505 * kjs/collector.cpp: |
|
20506 (KJS::className): Added. Gets class name in a KJS way, rather than a C++ RTTI way. |
|
20507 (KJS::Collector::rootObjectClasses): Use className instead of typeid names. |
|
20508 |
|
20509 2005-05-18 Darin Adler <darin@apple.com> |
|
20510 |
|
20511 Reviewed by Maciej. |
|
20512 |
|
20513 - fix a failure seen in the Mozilla JavaScript tests where a live object was garbage-collected |
|
20514 when the only reference to it was in an argList on the stack |
|
20515 |
|
20516 * kjs/list.h: Moved the operator= function into the .cpp file since it's too big to be |
|
20517 a good choice to inline. |
|
20518 * kjs/list.cpp: (KJS::List::operator=): Moved this formerly-inline function into a separate |
|
20519 file and added missing code to update valueRefCount. It's the latter that fixes the bug. |
|
20520 |
|
20521 2005-05-16 Darin Adler <darin@apple.com> |
|
20522 |
|
20523 Reviewed by Adele. |
|
20524 |
|
20525 - fixed issues preventing us from compiling with newer versions of gcc 4.0 |
|
20526 |
|
20527 * kjs/ustring.cpp: |
|
20528 (KJS::operator==): Remove redundant and illegal KJS:: prefix on this function's definition. |
|
20529 (KJS::operator<): Ditto. |
|
20530 (KJS::compare): Ditto. |
|
20531 |
|
20532 2005-05-09 Darin Adler <darin@apple.com> |
|
20533 |
|
20534 Reviewed by John. |
|
20535 |
|
20536 - turn on conservative GC unconditionally and start on SPI changes to |
|
20537 eliminate the now-unneeded smart pointers since we don't ref count any more |
|
20538 |
|
20539 * kjs/value.h: Removed macros to turn conservative GC on and off. |
|
20540 Removed ref and deref functions. |
|
20541 (KJS::ValueImp::ValueImp): Removed non-conservative-GC code path. |
|
20542 (KJS::ValueImp::isUndefined): Added. New SPI to make it easier to deal with ValueImp directly. |
|
20543 (KJS::ValueImp::isNull): Ditto. |
|
20544 (KJS::ValueImp::isBoolean): Ditto. |
|
20545 (KJS::ValueImp::isNumber): Ditto. |
|
20546 (KJS::ValueImp::isString): Ditto. |
|
20547 (KJS::ValueImp::isObject): Ditto. |
|
20548 (KJS::Value::Value): Removed non-conservative-GC code path and made constructor no |
|
20549 longer explicit so we can quietly create Value wrappers from ValueImp *; inexpensive with |
|
20550 conservative GC and eases the transition. |
|
20551 (KJS::Value::operator ValueImp *): Added. Quietly creates ValueImp * from Value. |
|
20552 (KJS::ValueImp::marked): Removed non-conservative-GC code path. |
|
20553 |
|
20554 * kjs/value.cpp: |
|
20555 (KJS::ValueImp::mark): Removed non-conservative-GC code path. |
|
20556 (KJS::ValueImp::isUndefinedOrNull): Added. New SPI to make it easier to deal with ValueImp directly. |
|
20557 (KJS::ValueImp::isBoolean): Ditto. |
|
20558 (KJS::ValueImp::isNumber): Ditto. |
|
20559 (KJS::ValueImp::isString): Ditto. |
|
20560 (KJS::ValueImp::asString): Ditto. |
|
20561 (KJS::ValueImp::isObject): Ditto. |
|
20562 (KJS::undefined): Ditto. |
|
20563 (KJS::null): Ditto. |
|
20564 (KJS::boolean): Ditto. |
|
20565 (KJS::string): Ditto. |
|
20566 (KJS::zero): Ditto. |
|
20567 (KJS::one): Ditto. |
|
20568 (KJS::two): Ditto. |
|
20569 (KJS::number): Ditto. |
|
20570 |
|
20571 * kjs/object.h: Made constructor no longer explicit so we can quietly create Object |
|
20572 wrappers from ObjectImp *; inexpensive with conservative GC and eases the transition. |
|
20573 (KJS::Object::operator ObjectImp *): Added. Quietly creates ObjectImp * from Object. |
|
20574 (KJS::ValueImp::isObject): Added. Implementation of new object-related ValueImp function. |
|
20575 (KJS::ValueImp::asObject): Ditto. |
|
20576 |
|
20577 * kjs/object.cpp: |
|
20578 (KJS::ObjectImp::setInternalValue): Remove non-conservative-GC code path. |
|
20579 (KJS::ObjectImp::putDirect): Ditto. |
|
20580 (KJS::error): Added. Function in the new SPI style to create an error object. |
|
20581 |
|
20582 * kjs/internal.h: Added the new number-constructing functions as friends of NumberImp. |
|
20583 There may be a more elegant way to do this later; what's important now is the new SPI. |
|
20584 |
|
20585 * kjs/collector.h: Remove non-conservative-GC code path and also take out some |
|
20586 unneeded APPLE_CHANGES. |
|
20587 |
|
20588 * bindings/runtime_root.cpp: |
|
20589 (KJS::Bindings::addNativeReference): Remove non-conservative-GC code path. |
|
20590 (KJS::Bindings::removeNativeReference): Ditto. |
|
20591 (RootObject::removeAllNativeReferences): Ditto. |
|
20592 * bindings/runtime_root.h: |
|
20593 (KJS::Bindings::RootObject::~RootObject): Ditto. |
|
20594 (KJS::Bindings::RootObject::setRootObjectImp): Ditto. |
|
20595 * kjs/collector.cpp: |
|
20596 (KJS::Collector::allocate): Ditto. |
|
20597 (KJS::Collector::collect): Ditto. |
|
20598 (KJS::Collector::numGCNotAllowedObjects): Ditto. |
|
20599 (KJS::Collector::numReferencedObjects): Ditto. |
|
20600 (KJS::Collector::rootObjectClasses): Ditto. |
|
20601 * kjs/internal.cpp: |
|
20602 (NumberImp::create): Ditto. |
|
20603 (InterpreterImp::globalInit): Ditto. |
|
20604 (InterpreterImp::globalClear): Ditto. |
|
20605 * kjs/list.cpp: |
|
20606 (KJS::List::markProtectedLists): Ditto. |
|
20607 (KJS::List::clear): Ditto. |
|
20608 (KJS::List::append): Ditto. |
|
20609 * kjs/list.h: |
|
20610 (KJS::List::List): Ditto. |
|
20611 (KJS::List::deref): Ditto. |
|
20612 (KJS::List::operator=): Ditto. |
|
20613 * kjs/protect.h: |
|
20614 (KJS::gcProtect): Ditto. |
|
20615 (KJS::gcUnprotect): Ditto. |
|
20616 |
|
20617 2005-05-09 Chris Blumenberg <cblu@apple.com> |
|
20618 |
|
20619 Workaround gcc 3.3 internal compiler errors. |
|
20620 |
|
20621 Reviewed by darin. |
|
20622 |
|
20623 * bindings/objc/WebScriptObject.mm: |
|
20624 (-[WebScriptObject stringRepresentation]): call [NSString stringWithCString:encoding] rather than using @"" |
|
20625 |
|
20626 2005-05-09 Darin Adler <darin@apple.com> |
|
20627 |
|
20628 * Makefile.am: Don't set up PBXIntermediatesDirectory explicitly; |
|
20629 Not needed to make builds work, spews undesirable error messages too. |
|
20630 |
|
20631 2005-05-06 Darin Adler <darin@apple.com> |
|
20632 |
|
20633 Reviewed by Maciej. |
|
20634 |
|
20635 - make building multiple trees with make work better |
|
20636 |
|
20637 * Makefile.am: Set up Xcode build directory before invoking xcodebuild. |
|
20638 |
|
20639 2005-05-04 Maciej Stachowiak <mjs@apple.com> |
|
20640 |
|
20641 Reviewed by Darin. |
|
20642 |
|
20643 <rdar://problem/4086570> Crash in JavaScriptCore with RSS Visualizer |
|
20644 |
|
20645 * kjs/internal.cpp: |
|
20646 (InterpreterImp::mark): mark staticNaN, it is usually protected by the Number |
|
20647 prototype but there is a small window where it can get collected. |
|
20648 |
|
20649 2005-05-04 Darin Adler <darin@apple.com> |
|
20650 |
|
20651 Reviewed by Dave Hyatt. |
|
20652 |
|
20653 - another gcc-4.0-related fix |
|
20654 |
|
20655 * bindings/runtime_root.h: Take off extra namespace prefixes that apparently cause problems |
|
20656 compiling with gcc 4.0, although I have not observed the problems. |
|
20657 |
|
20658 2005-05-04 Darin Adler <darin@apple.com> |
|
20659 |
|
20660 Reviewed by Dave Hyatt. |
|
20661 |
|
20662 - fixed build rules to match other projects |
|
20663 |
|
20664 * JavaScriptCore.pbproj/project.pbxproj: Set deployment target to 10.3 in the build styles. |
|
20665 When built without a build style (by Apple B&I) we want to get the target from the |
|
20666 environment. But when built with a build style (by Safari engineers and others), we want |
|
20667 to use 10.3. |
|
20668 |
|
20669 * Makefile.am: Took out extra parameters that make command-line building different from |
|
20670 Xcode building. Now that this is fixed, you should not get a full rebuild if you switch |
|
20671 from command line to Xcode or back. |
|
20672 |
|
20673 2005-05-04 Maciej Stachowiak <mjs@apple.com> |
|
20674 |
|
20675 - revert presumably accidental change to mozilla JS test expected results, this |
|
20676 was making the tests fail. |
|
20677 |
|
20678 * tests/mozilla/expected.html: |
|
20679 |
|
20680 2005-05-03 Richard Williamson <rjw@apple.com> |
|
20681 |
|
20682 Fixed <rdar://problem/4102644> Crash in LiveConnect below KJS::Bindings::JavaInstance::stringValue() const |
|
20683 |
|
20684 Correctly handle accessing nil objects from a Java object array. |
|
20685 |
|
20686 Reviewed by John. |
|
20687 |
|
20688 * bindings/jni/jni_runtime.cpp: |
|
20689 (JavaArray::valueAt): |
|
20690 |
|
20691 2005-05-01 Darin Adler <darin@apple.com> |
|
20692 |
|
20693 - move to Xcode native targets and stop checking in generated files |
|
20694 |
|
20695 * JavaScriptCore.pbproj/project.pbxproj: Updated to use native targets and generate all the generated |
|
20696 files, so we don't have to check them in any more. |
|
20697 * Info.plist: Added. Native targets use a separate file for this. |
|
20698 |
|
20699 * Makefile.am: Removed pcre and kjs SUBDIRS. Also removed code that deleted the embedded copy of this |
|
20700 framework, since we haven't been embedding it for some time. |
|
20701 |
|
20702 * kjs/grammar_wrapper.cpp: Added. Shell used to compile grammar.cpp since we can't add a generated file |
|
20703 easily to the list of files to be compiled. |
|
20704 |
|
20705 * kjs/.cvsignore: Removed. |
|
20706 * kjs/Makefile.am: Removed. |
|
20707 * kjs/array_object.lut.h: Removed. |
|
20708 * kjs/date_object.lut.h: Removed. |
|
20709 * kjs/grammar.cpp: Removed. |
|
20710 * kjs/grammar.cpp.h: Removed. |
|
20711 * kjs/grammar.h: Removed. |
|
20712 * kjs/lexer.lut.h: Removed. |
|
20713 * kjs/math_object.lut.h: Removed. |
|
20714 * kjs/number_object.lut.h: Removed. |
|
20715 * kjs/string_object.lut.h: Removed. |
|
20716 * pcre/.cvsignore: Removed. |
|
20717 * pcre/Makefile.am: Removed. |
|
20718 * pcre/chartables.c: Removed. |
|
20719 |
|
20720 2005-04-28 Darin Adler <darin@apple.com> |
|
20721 |
|
20722 Reviewed by Dave Harrison. |
|
20723 |
|
20724 - fixed problems preventing us from compiling with gcc 4.0 |
|
20725 |
|
20726 * JavaScriptCore.pbproj/project.pbxproj: Removed -Wmissing-prototypes from |
|
20727 WARNING_CPLUSPLUSFLAGS since it's now a C-only warning. |
|
20728 |
|
20729 * bindings/jni/jni_jsobject.cpp: |
|
20730 (JSObject::getSlot): Changed some %d to %ld where the parameters where long ints. |
|
20731 (JSObject::setSlot): Ditto. |
|
20732 * bindings/jni/jni_utility.cpp: |
|
20733 (KJS::Bindings::getJavaVM): Ditto. |
|
20734 (KJS::Bindings::getJNIEnv): Ditto. |
|
20735 * bindings/objc/objc_utility.mm: Fixed include of <JavascriptCore/internal.h> that needed the |
|
20736 letter "S" capitalized. |
|
20737 * kjs/bool_object.cpp: (BooleanProtoFuncImp::call): Rearranged how this function returns to |
|
20738 avoid incorrect gcc 4.0 warning. |
|
20739 * kjs/collector.cpp: (KJS::Collector::markStackObjectsConservatively): Changed code to check |
|
20740 the alignment of the passed-in pointers to only require pointer-level alignment, not 8-byte alignment. |
|
20741 Prevents a crash on garbage collect when compiled with gcc 4.0. |
|
20742 * kjs/nodes.cpp: |
|
20743 (WhileNode::execute): Added a redundant return after an infinite loop to work around incorrect gcc 4.0 warning. |
|
20744 (ForNode::execute): Ditto. |
|
20745 (SwitchNode::execute):Rearranged how this function returns to avoid incorrect gcc 4.0 warning. |
|
20746 (LabelNode::execute): Ditto. |
|
20747 * kjs/string_object.cpp: (replace): Ditto. |
|
20748 |
|
20749 2005-04-26 Richard Williamson <rjw@apple.com> |
|
20750 |
|
20751 Fixed <rdar://problem/4098713> Scripting API is incompatible with Mozilla |
|
20752 |
|
20753 We were incompatible with Mozilla's implementation of the scripting APIs in |
|
20754 two ways: |
|
20755 |
|
20756 Their NPN_SetException has the following signature: |
|
20757 |
|
20758 void NPN_SetException(NPObject *npobj, const NPUTF8 *message); |
|
20759 |
|
20760 ours has: |
|
20761 |
|
20762 void NPN_SetException (NPObject * npobj, const NPString *message); |
|
20763 |
|
20764 Also, they expect the string returned from NPN_UTF8FromIdentifier() to be freed by caller. |
|
20765 We do not. |
|
20766 |
|
20767 I changed both behaviors to match Mozilla. |
|
20768 |
|
20769 Reviewed by Chris. |
|
20770 |
|
20771 * bindings/NP_jsobject.cpp: |
|
20772 (_NPN_SetException): |
|
20773 * bindings/npruntime.cpp: |
|
20774 (_NPN_UTF8FromIdentifier): |
|
20775 (_NPN_IntFromIdentifier): |
|
20776 (_NPN_SetExceptionWithUTF8): |
|
20777 * bindings/npruntime.h: |
|
20778 * bindings/npruntime_impl.h: |
|
20779 |
|
20780 2005-04-26 Maciej Stachowiak <mjs@apple.com> |
|
20781 |
|
20782 Reviewed by Chris. |
|
20783 |
|
20784 <rdar://problem/4092136> reproducible crash in KJS::kjs_fast_realloc loading maps.google.com |
|
20785 |
|
20786 * kjs/string_object.cpp: |
|
20787 (StringObjectFuncImp::call): Allocate adopted ustring buffer properly. |
|
20788 |
|
20789 2005-04-22 Darin Adler <darin@apple.com> |
|
20790 |
|
20791 Reviewed by Maciej. |
|
20792 |
|
20793 * kjs/ustring.cpp: (KJS::UString::UTF8String): Fix off-by-one error in surrogate pair logic. |
|
20794 |
|
20795 2005-04-22 Darin Adler <darin@apple.com> |
|
20796 |
|
20797 Reviewed by John. |
|
20798 |
|
20799 - fixed <rdar://problem/4090046> JavaScript throw statement causes parse error when no semicolon is present |
|
20800 |
|
20801 * kjs/grammar.y: Added an additional rule for throw like the ones we have for all the other semicolon rules. |
|
20802 Not sure why we missed this one earlier. |
|
20803 |
|
20804 * kjs/grammar.cpp: Regenerated. |
|
20805 |
|
20806 === JavaScriptCore-412.1 === |
|
20807 |
|
20808 2005-04-20 Darin Adler <darin@apple.com> |
|
20809 |
|
20810 Reviewed by Maciej. |
|
20811 |
|
20812 - speedups, total 12% on JavaScript iBench |
|
20813 |
|
20814 I ran the benchmark under Shark and followed its advice a lot, mainly. |
|
20815 |
|
20816 * kjs/collector.cpp: |
|
20817 (KJS::Collector::allocate): Take out special case for 0; costing speed but unexercised. |
|
20818 Use numLiveObjectsAtLastCollect instead of numAllocationsSinceLastCollect so we don't |
|
20819 have to bump it each time we call allocate. Put numLiveObjects into a local variable to |
|
20820 cut down on global variable accesses. Make "next" cell pointer be a byte offset rather |
|
20821 than a pointer so we don't need a special case for NULL. Allow freeList to point to some |
|
20822 bogus item when the entire block is full rather than going out of our way to make it |
|
20823 point to NULL. |
|
20824 (KJS::Collector::markProtectedObjects): Get table size and pointer into locals outside |
|
20825 the loop to avoid re-loading them over and over again. |
|
20826 (KJS::Collector::collect): Put numLiveObjects into a local variable to cut down on global |
|
20827 variable accesses. Make "next" cell pointer be a byte offset as above. Put numLiveObjects |
|
20828 into a local variable to cut down on global variable accesses. Set numLiveObjectsAtLastCollect |
|
20829 rather than numAllocationsSinceLastCollect. |
|
20830 (KJS::Collector::numReferencedObjects): Get table size and pointer into locals outside |
|
20831 the loop to avoid re-loading them over and over again. |
|
20832 (KJS::Collector::rootObjectClasses): Ditto. |
|
20833 |
|
20834 * kjs/internal.h: Make Value be a friend of NumberImp so it can construct number objects |
|
20835 directly, avoiding the conversion from Number to Value. |
|
20836 |
|
20837 * kjs/internal.cpp: (StringImp::toObject): Don't use Object::dynamicCast, because we know |
|
20838 the thing is an object and we don't want to do all the extra work; just cast directly. |
|
20839 |
|
20840 * kjs/list.cpp: (KJS::List::List): Construct valueRefCount in a way that avoids the need for |
|
20841 a branch -- in the hot case this just meant avoiding checking a variable we just set to false. |
|
20842 |
|
20843 * kjs/lookup.cpp: (keysMatch): Marked this inline. |
|
20844 |
|
20845 * kjs/nodes.cpp: Disabled KJS_BREAKPOINT, to avoid calling hitStatement all the time. |
|
20846 (BooleanNode::evaluate): Make a Value directly, rather than making a Boolean which is converted |
|
20847 into a Value. |
|
20848 (NumberNode::evaluate): Ditto. |
|
20849 (StringNode::evaluate): Ditto. |
|
20850 (ArrayNode::evaluate): Ditto. |
|
20851 (FunctionCallNode::evaluate): Use new inline baseIfMutable to avoid unnecessary getBase function. |
|
20852 Also just use a pointer for func, rather than an Object. |
|
20853 (PostfixNode::evaluate): Change code so that it doesn't make an excess Number, and so that it |
|
20854 passes a "known to be integer" boolean in, often avoiding a conversion from floating point to |
|
20855 integer and back. |
|
20856 (DeleteNode::evaluate): Make a Value directly. |
|
20857 (TypeOfNode::evaluate): Use new inline baseIfMutable and make Value directly. |
|
20858 (PrefixNode::evaluate): Change code so that it doesn't make an excess Number, and so that it |
|
20859 passes a "known to be integer" boolean in, often avoiding a conversion from floating point to |
|
20860 integer and back. |
|
20861 (UnaryPlusNode::evaluate): Make a Value directly. |
|
20862 (NegateNode::evaluate): Change code so that it doesn't make an excess Number, and so that it |
|
20863 passes a "known to be integer" boolean in, often avoiding a conversion from floating point to |
|
20864 integer and back. |
|
20865 (BitwiseNotNode::evaluate): Make a Value directly. |
|
20866 (LogicalNotNode::evaluate): Ditto. |
|
20867 (ShiftNode::evaluate): Don't convert to a double before making a Value. |
|
20868 (RelationalNode::evaluate): Make a Value directly. |
|
20869 (EqualNode::evaluate): Ditto. |
|
20870 (BitOperNode::evaluate): Ditto. |
|
20871 (AssignNode::evaluate): Make a Value directly. Change code so that it passes a "known to be integer" |
|
20872 boolean in, often avoiding a conversion from floating point to integer and back. |
|
20873 (VarDeclNode::evaluate): Make a Value directly. |
|
20874 (ForNode::execute): Remove unused local variable. |
|
20875 |
|
20876 * kjs/operations.h: |
|
20877 (KJS::isNaN): Inlined. |
|
20878 (KJS::isInf): Ditto. |
|
20879 (KJS::isPosInf): Ditto. |
|
20880 (KJS::isNegInf): Ditto. |
|
20881 |
|
20882 * kjs/operations.cpp: Change isNaN, isInf, isPosInf, and isNegInf to be inlines. |
|
20883 (KJS::equal): Rewrite to avoid creating values and recursing back into the function. |
|
20884 (KJS::relation): Rearranged code so that we don't need explicit isNaN checks. |
|
20885 (KJS::add): Changed code to make Value directly, and so that it passes a "known to be integer" |
|
20886 boolean in, often avoiding a conversion from floating point to integer and back. |
|
20887 (KJS::mult): Ditto. |
|
20888 |
|
20889 * kjs/property_map.cpp: |
|
20890 (KJS::PropertyMap::~PropertyMap): Get size and entries pointer outside loop to avoid |
|
20891 re-getting them inside the loop. |
|
20892 (KJS::PropertyMap::clear): Ditto. Clear value pointer in addition to key, so we can just |
|
20893 look at the value pointer in the mark function. |
|
20894 (KJS::PropertyMap::get): Get sizeMask and entries pointer outside loop to avoid |
|
20895 re-getting them inside the loop. |
|
20896 (KJS::PropertyMap::put): Ditto. |
|
20897 (KJS::PropertyMap::insert): Ditto. |
|
20898 (KJS::PropertyMap::remove): Ditto. |
|
20899 (KJS::PropertyMap::mark): Get size and entries pointer outside loop to avoid |
|
20900 re-getting them inside the loop. Don't bother checking key for 0, since we already have |
|
20901 to check value for 0. (Also had to change clear() to set value to 0.) |
|
20902 (KJS::PropertyMap::addEnumerablesToReferenceList): Get size and entries pointer outside |
|
20903 loop to avoid re-getting them inside the loop. |
|
20904 (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): Ditto. |
|
20905 (KJS::PropertyMap::save): Ditto. |
|
20906 |
|
20907 - other changes |
|
20908 |
|
20909 * kjs/protected_values.h: Remove unneeded class name qualifiers. |
|
20910 |
|
20911 * kjs/reference.h: |
|
20912 (KJS::Reference::baseIfMutable): New inline function: replaces isMutable(). |
|
20913 (KJS::Reference::Reference): Inlined. |
|
20914 * kjs/reference.cpp: |
|
20915 (KJS::Reference::getValue): Rewrite to not use getBase. |
|
20916 (KJS::Reference::putValue): Ditto. |
|
20917 (KJS::Reference::deleteValue): Dittol |
|
20918 |
|
20919 * kjs/simple_number.h: |
|
20920 (KJS::SimpleNumber::integerFits): Added. For use when the parameter is known to be integral. |
|
20921 |
|
20922 * kjs/string_object.cpp: (StringProtoFuncImp::call): Create the number without first converting |
|
20923 to double in various cases that involve integers. |
|
20924 |
|
20925 * kjs/ustring.h: |
|
20926 (KJS::UString::attach): Inlined. |
|
20927 (KJS::UString::release): Inlined. |
|
20928 * kjs/ustring.cpp: |
|
20929 (KJS::UString::find): Get first character outside the loop instead of re-fetching it each time. |
|
20930 |
|
20931 * kjs/value.cpp: |
|
20932 (Value::Value): Added overloads for all the various specific types of values, so you don't have |
|
20933 to convert from, say, Number to Value, just to create one. |
|
20934 (Number::Number): Added an overload that takes a boolean to indicate the number is already |
|
20935 known to be an integer. |
|
20936 |
|
20937 * kjs/value.h: Added more Value constructors, added a version of toNumber that returns |
|
20938 a boolean to indicate if the number is known to be an integer (because it was a "simple number"). |
|
20939 (KJS::ValueImp::marked): Inlined. |
|
20940 (KJS::ValueImp::dispatchType): Inlined. |
|
20941 (KJS::ValueImp::dispatchToPrimitive): Inlined. |
|
20942 (KJS::ValueImp::dispatchToBoolean): Inlined. |
|
20943 (KJS::ValueImp::dispatchToNumber): Inlined. |
|
20944 (KJS::ValueImp::dispatchToString): Inlined. |
|
20945 (KJS::ValueImp::dispatchToUInt32): Inlined. |
|
20946 |
|
20947 2005-04-14 Maciej Stachowiak <mjs@apple.com> |
|
20948 |
|
20949 - make fast_malloc.h a private header, not project |
|
20950 |
|
20951 * JavaScriptCore.pbproj/project.pbxproj: |
|
20952 |
|
20953 2005-04-12 Maciej Stachowiak <mjs@apple.com> |
|
20954 |
|
20955 Reviewed by Richard. |
|
20956 |
|
20957 <rdar://problem/4089734> JavaScript iBench can be sped up ~10% with custom allocator |
|
20958 |
|
20959 - use custom single-threaded malloc for all non-GC JavaScriptCore |
|
20960 allocations, for a 9.1% speedup on JavaScript iBench |
|
20961 |
|
20962 * JavaScriptCore.pbproj/project.pbxproj: |
|
20963 * kjs/collector.cpp: |
|
20964 (KJS::Collector::allocate): Use dlmalloc to allocate the collector blocks. |
|
20965 (KJS::Collector::collect): And dlfree to free it. |
|
20966 * kjs/fast_malloc.cpp: Added, just the standard dlmalloc here. |
|
20967 * kjs/fast_malloc.h: Added. Declarations for the functions. Also added a handy |
|
20968 macro to give a class custom operator new/delete |
|
20969 * kjs/identifier.cpp: |
|
20970 (KJS::Identifier::add): Use dlmalloc/dlfree. |
|
20971 * kjs/nodes.h: make nodes KJS_FAST_ALLOCATED. |
|
20972 * kjs/property_map.cpp: |
|
20973 (KJS::PropertyMap::~PropertyMap): Use dlmalloc/dlfree. |
|
20974 (KJS::PropertyMap::rehash): ditto |
|
20975 * kjs/scope_chain.h: |
|
20976 * kjs/ustring.cpp: |
|
20977 (KJS::UString::Rep::createCopying): New named constructor that copies a passed-in |
|
20978 buffer, to hide allocation details from webcore. |
|
20979 (KJS::UString::UString): use createCopying when appropriate. |
|
20980 (KJS::UString::Rep::destroy): Use dlmalloc/dlfree. |
|
20981 (KJS::UString::expandedSize): likewise |
|
20982 (KJS::UString::expandCapacity): likewise |
|
20983 (KJS::UString::expandPreCapacity): likewise |
|
20984 (KJS::UString::spliceSubstringsWithSeparators): likewise |
|
20985 (KJS::UString::append): likewise |
|
20986 (KJS::UString::operator=): likewise |
|
20987 (KJS::UString::detach): likewise |
|
20988 * kjs/ustring.h: make UString and UString::Rep KJS_FAST_ALLOCATED. |
|
20989 |
|
20990 2005-04-11 Maciej Stachowiak <mjs@apple.com> |
|
20991 |
|
20992 Reviewed by John. |
|
20993 |
|
20994 <rdar://problem/4086819> Avoid using protect count hash table so much for 5.6% JS iBench speedup |
|
20995 |
|
20996 - Avoid using protected values hash for the two most common cases |
|
20997 - Bump up ListImp high water mark, new testing shows 508 ListImps are |
|
20998 created during JS iBench. |
|
20999 |
|
21000 Net result is a 5.6% speedup on JavaScript iBench |
|
21001 |
|
21002 * kjs/collector.cpp: |
|
21003 (KJS::Collector::collect): mark protected lists as appropriate. |
|
21004 * kjs/context.h: |
|
21005 * kjs/list.cpp: |
|
21006 (KJS::ListImp::markValues): Moved implementation from List::markValues |
|
21007 (KJS::List::markProtectedLists): Implemented - scan pool and overflow |
|
21008 list. |
|
21009 (KJS::allocateListImp): link lists outside the pool into a separate |
|
21010 doubly linked list to be able to mark protected lists |
|
21011 (KJS::deallocateListImp): do the corresponding delinking |
|
21012 (KJS::List::derefValues): do nothing in conservative GC mode |
|
21013 (KJS::List::refValues): do nothing in conservative GC mode |
|
21014 (KJS::List::markValues): call ListImp version |
|
21015 (KJS::List::append): |
|
21016 * kjs/list.h: |
|
21017 |
|
21018 === Safari-412 === |
|
21019 |
|
21020 === Safari-411 === |
|
21021 |
|
21022 === Safari-410 === |
|
21023 |
|
21024 === Safari-409 === |
|
21025 |
|
21026 === Safari-408 === |
|
21027 |
|
21028 === Safari-407 === |
|
21029 |
|
21030 2005-03-16 Jens Alfke <jens@apple.com> |
|
21031 |
|
21032 Reviewed by Kevin. |
|
21033 |
|
21034 Fix for <rdar://problem/4025212> "REGRESSION (163-164): search not performed correctly; united.com" |
|
21035 JavaScript unescape("") was returning a messed-up String object that appeared identical to an empty string, but would in some cases act as 'null' when passed to native functions, in this case the Option() constructor. |
|
21036 In the implementation of unescape, the UString holding the result was not initialized to "", so it started out as a null string. If nothing was appended to it, it remained null, resulting in a JavaScript String object with some bad behaviors (namely, converting it to a DOMStringImpl results in a NULL pointer.) |
|
21037 Darin says this regression occurred when we replaced our own implementation of unescape() with code from KJS. |
|
21038 |
|
21039 * kjs/function.cpp: |
|
21040 (KJS::GlobalFuncImp::call): |
|
21041 |
|
21042 2005-03-15 Richard Williamson <rjw@apple.com> |
|
21043 |
|
21044 Fixed <rdar://problem/4053276> WebScripting protocol in WebKit cannot convert Boolean in Javascript to BOOL in Objective-C |
|
21045 |
|
21046 Added JavaScript boolean to type that can be converted to |
|
21047 ObjC scalar parameters. |
|
21048 |
|
21049 Reviewed by Ken Kocienda. |
|
21050 |
|
21051 * bindings/objc/objc_utility.mm: |
|
21052 (KJS::Bindings::convertValueToObjcValue): |
|
21053 |
|
21054 === Safari-406 === |
|
21055 |
|
21056 === Safari-405 === |
|
21057 |
|
21058 === Safari-403 === |
|
21059 |
|
21060 === Safari-402 === |
|
21061 |
|
21062 === Safari-401 === |
|
21063 |
|
21064 === Safari-400 === |
|
21065 |
|
21066 === Safari-188 === |
|
21067 |
|
21068 2005-02-21 Darin Adler <darin@apple.com> |
|
21069 |
|
21070 * kjs/date_object.cpp: (timetUsingCF): Fixed indenting. |
|
21071 |
|
21072 2005-02-17 Richard Williamson <rjw@apple.com> |
|
21073 |
|
21074 Fixed <rdar://problem/4003251> Safari crashed at www.icelandair.com in LiveConnect code converting a Java object to a string |
|
21075 |
|
21076 Added nil check. |
|
21077 |
|
21078 Reviewed by John Sullivan. |
|
21079 |
|
21080 * bindings/jni/jni_runtime.cpp: |
|
21081 (JavaField::valueFromInstance): |
|
21082 |
|
21083 === Safari-187 === |
|
21084 |
|
21085 2005-02-11 Richard Williamson <rjw@apple.com> |
|
21086 |
|
21087 Fixed <rdar://problem/3985118> DOM objects not being marshaled on JS->native calls |
|
21088 |
|
21089 Re-factored how 'native' wrappers for JS objects are created. The interpreter now |
|
21090 creates these wrappers. The WebCore subclass of the interpreter now overrides |
|
21091 createLanguageInstanceForValue() and creates a DOM ObjC wrapper for DOM objects. |
|
21092 |
|
21093 Reviewed by Ken. |
|
21094 |
|
21095 * bindings/c/c_utility.cpp: |
|
21096 (convertValueToNPVariant): |
|
21097 * bindings/jni/jni_instance.cpp: |
|
21098 (JavaInstance::invokeMethod): |
|
21099 * bindings/jni/jni_objc.mm: |
|
21100 (KJS::Bindings::dispatchJNICall): |
|
21101 * bindings/jni/jni_runtime.cpp: |
|
21102 (JavaField::valueFromInstance): |
|
21103 (JavaArray::valueAt): |
|
21104 * bindings/objc/WebScriptObject.mm: |
|
21105 (-[WebScriptObject _setExecutionContext:KJS::Bindings::]): |
|
21106 (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): |
|
21107 * bindings/objc/WebScriptObjectPrivate.h: |
|
21108 * bindings/objc/objc_utility.h: |
|
21109 * bindings/objc/objc_utility.mm: |
|
21110 (KJS::Bindings::convertObjcValueToValue): |
|
21111 (KJS::Bindings::createObjcInstanceForValue): |
|
21112 * bindings/runtime.cpp: |
|
21113 (Instance::createBindingForLanguageInstance): |
|
21114 (Instance::createRuntimeObject): |
|
21115 (Instance::createLanguageInstanceForValue): |
|
21116 * bindings/runtime.h: |
|
21117 * kjs/interpreter.cpp: |
|
21118 (Interpreter::createLanguageInstanceForValue): |
|
21119 * kjs/interpreter.h: |
|
21120 |
|
21121 === Safari-186 === |
|
21122 |
|
21123 2005-02-10 Darin Adler <darin@apple.com> |
|
21124 |
|
21125 "Reviewed" by Richard (he told me the file was obsolete). |
|
21126 |
|
21127 - got rid of an obsolete file |
|
21128 |
|
21129 * bindings/npsap.h: Removed. |
|
21130 |
|
21131 === Safari-185 === |
|
21132 |
|
21133 === Safari-183 === |
|
21134 |
|
21135 2005-02-03 Richard Williamson <rjw@apple.com> |
|
21136 |
|
21137 Fixed <rdar://problem/3972905> CrashTracer: ...36 crashes at com.apple.WebCore: khtml::CSSStyleSelector::applyDeclarations + 120 |
|
21138 |
|
21139 Revert to old (and correct) behavior of returning runtime object |
|
21140 when passed as a parameter, rather than it's corresponding DOM |
|
21141 object. |
|
21142 |
|
21143 Reviewed by Chris. |
|
21144 |
|
21145 * bindings/objc/WebScriptObject.mm: |
|
21146 (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): |
|
21147 |
|
21148 === Safari-182 === |
|
21149 |
|
21150 2005-01-28 Richard Williamson <rjw@apple.com> |
|
21151 |
|
21152 Fixed <rdar://problem/3980389> JavaScript bindings access incorrect runtime object |
|
21153 |
|
21154 Only use special 'back door' property to get the runtime object if thisObj isn't |
|
21155 already a runtime object. |
|
21156 |
|
21157 <gratuitous> Cleaned up a couple of strcmp on ClassInfo name. Used == on |
|
21158 ClassInfo pointer instead. |
|
21159 |
|
21160 Reviewed by Chris. |
|
21161 |
|
21162 * bindings/c/c_utility.cpp: |
|
21163 (convertValueToNPVariant): |
|
21164 * bindings/objc/WebScriptObject.mm: |
|
21165 (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): |
|
21166 * bindings/runtime_method.cpp: |
|
21167 (RuntimeMethodImp::call): |
|
21168 |
|
21169 === Safari-181 === |
|
21170 |
|
21171 2005-01-26 Richard Williamson <rjw@apple.com> |
|
21172 |
|
21173 Fixed <rdar://problem/3972522> (179-180) 40% slowdown on iBench JavaScript test |
|
21174 |
|
21175 I added a member variable to ObjectImp. This changed it's size and consequently |
|
21176 hampered the optimizations built into the garbage collector. Objects no longer |
|
21177 fit within the allocators cell size, and thus allocation fell back to a slower |
|
21178 allocator. |
|
21179 |
|
21180 As a result of this fix I also dramatically cleaned up how runtime objects are |
|
21181 accessed. The path mostly *removes* code. |
|
21182 |
|
21183 Reviewed by Chris. |
|
21184 |
|
21185 * bindings/runtime_method.cpp: |
|
21186 (RuntimeMethodImp::call): |
|
21187 * bindings/runtime_object.cpp: |
|
21188 (RuntimeObjectImp::get): |
|
21189 (RuntimeObjectImp::put): |
|
21190 (RuntimeObjectImp::canPut): |
|
21191 (RuntimeObjectImp::hasProperty): |
|
21192 (RuntimeObjectImp::defaultValue): |
|
21193 * bindings/runtime_object.h: |
|
21194 * kjs/object.cpp: |
|
21195 (KJS::ObjectImp::ObjectImp): |
|
21196 * kjs/object.h: |
|
21197 |
|
21198 2005-01-20 Darin Adler <darin@apple.com> |
|
21199 |
|
21200 Reviewed by me, changes by Han Ming Ong. |
|
21201 |
|
21202 - <rdar://problem/3964302> SWB: A few files need to be updated to be compilable under GCC 4.0 |
|
21203 |
|
21204 * bindings/objc/WebScriptObjectPrivate.h: Make members public. |
|
21205 * kjs/lookup.h: Change "value.h" to "object.h" because we need KJS::Object to compile a template. |
|
21206 |
|
21207 2005-01-20 Richard Williamson <rjw@apple.com> |
|
21208 |
|
21209 Fixed <rdar://problem/3964634> undefined property value from binding seems to evaluate to true in an if statement |
|
21210 |
|
21211 The comprehensive fix for this problem requires new API, as described in 3965326. However, |
|
21212 given that we can't add new API at this point, the 'ObjcFallbackObjectImp' will behave |
|
21213 like and Undefined object if invokeUndefinedMethodFromWebScript:withArguments: isn't |
|
21214 implemented on the bound object. |
|
21215 |
|
21216 Reviewed by Chris. |
|
21217 |
|
21218 * bindings/objc/objc_runtime.h: |
|
21219 * bindings/objc/objc_runtime.mm: |
|
21220 (ObjcFallbackObjectImp::type): |
|
21221 (ObjcFallbackObjectImp::implementsCall): |
|
21222 (ObjcFallbackObjectImp::toBoolean): |
|
21223 * bindings/testbindings.mm: |
|
21224 (+[MyFirstInterface isSelectorExcludedFromWebScript:]): |
|
21225 (+[MyFirstInterface isKeyExcludedFromWebScript:]): |
|
21226 |
|
21227 === Safari-180 === |
|
21228 |
|
21229 2005-01-19 Richard Williamson <rjw@apple.com> |
|
21230 |
|
21231 Fixed <rdar://problem/3853676> Browser Crash when accessing CCWeb Progress Page - KJS::Bindings::convertValueToJValue |
|
21232 |
|
21233 Fixed the following problems with LiveConnect that are demonstrated by the application |
|
21234 described in 3853676. |
|
21235 |
|
21236 1. If a nil object is passed in an array from Java to JavaScript we will crash. |
|
21237 2. We sometimes will incorrectly attempt to access a generic JavaScript as a Java runtime object wrapper. |
|
21238 3. We will sometimes fail to find the correct static method ID. |
|
21239 |
|
21240 Reviewed by Maciej. |
|
21241 |
|
21242 * bindings/jni/jni_jsobject.cpp: |
|
21243 (JSObject::convertJObjectToValue): |
|
21244 (JSObject::listFromJArray): |
|
21245 * bindings/jni/jni_runtime.cpp: |
|
21246 (JavaField::valueFromInstance): |
|
21247 (JavaField::setValueToInstance): |
|
21248 * bindings/jni/jni_utility.cpp: |
|
21249 (KJS::Bindings::getMethodID): |
|
21250 (KJS::Bindings::convertValueToJValue): |
|
21251 * bindings/runtime_array.h: |
|
21252 |
|
21253 2005-01-18 Richard Williamson <rjw@apple.com> |
|
21254 |
|
21255 Fixed several issues all arising from analysis of plugin detection code at ifilm.com: |
|
21256 |
|
21257 Fixed <rdar://problem/3958592> can't script plug-ins if plug-in is invoked with <object> element instead of <embed> |
|
21258 Fixed <rdar://problem/3958597> <object> elements with IDs do not show up as named properties of the document |
|
21259 Fixed <rdar://problem/3960973> DOM objects for plugin elements are not accessible |
|
21260 Fixed <rdar://problem/3958601> need an additional class ID in WebCore for the Real plug-in |
|
21261 |
|
21262 We now support accessing scriptable plugin objects that are specified with <applet>, <embed>, or <object> |
|
21263 tags. Also, if any of these elements are named they can be accessed from the document or window objects. |
|
21264 Finally, DOM methods are properties will be forwarded appropriately for the plugin's root scriptable object. |
|
21265 |
|
21266 Reviewed by Chris. |
|
21267 |
|
21268 * bindings/objc/objc_instance.h: |
|
21269 * bindings/objc/objc_instance.mm: |
|
21270 (ObjcInstance::supportsSetValueOfUndefinedField): |
|
21271 * bindings/runtime.h: |
|
21272 (KJS::Bindings::Instance::supportsSetValueOfUndefinedField): |
|
21273 * bindings/runtime_object.cpp: |
|
21274 (RuntimeObjectImp::RuntimeObjectImp): |
|
21275 (RuntimeObjectImp::get): |
|
21276 (RuntimeObjectImp::put): |
|
21277 (RuntimeObjectImp::canPut): |
|
21278 (RuntimeObjectImp::hasProperty): |
|
21279 (RuntimeObjectImp::defaultValue): |
|
21280 * bindings/runtime_object.h: |
|
21281 (KJS::RuntimeObjectImp::fallbackObject): |
|
21282 * kjs/object.cpp: |
|
21283 (KJS::ObjectImp::ObjectImp): |
|
21284 * kjs/object.h: |
|
21285 (KJS::ObjectImp::forwardingScriptMessage): |
|
21286 (KJS::ObjectImp::setForwardingScriptMessage): |
|
21287 |
|
21288 2005-01-18 Richard Williamson <rjw@apple.com> |
|
21289 |
|
21290 Back out a change that was incorrectly committed yesterday. |
|
21291 |
|
21292 Reviewed by Chris. |
|
21293 |
|
21294 * bindings/objc/objc_utility.mm: |
|
21295 (KJS::Bindings::convertValueToObjcValue): |
|
21296 |
|
21297 2005-01-17 Richard Williamson <rjw@apple.com> |
|
21298 |
|
21299 Fixed <rdar://problem/3753030> Need to ensure same origin for plugin binding invocations (origin security rules) |
|
21300 |
|
21301 Keep track of originating execution context and target execution |
|
21302 context for native JS object wrappers, and perform appropriate |
|
21303 security checks. |
|
21304 |
|
21305 Reviewed by David Harrison. |
|
21306 |
|
21307 * bindings/NP_jsobject.cpp: |
|
21308 (_isSafeScript): |
|
21309 (_NPN_CreateScriptObject): |
|
21310 (_NPN_Invoke): |
|
21311 (_NPN_Evaluate): |
|
21312 (_NPN_GetProperty): |
|
21313 (_NPN_SetProperty): |
|
21314 (_NPN_RemoveProperty): |
|
21315 (_NPN_HasProperty): |
|
21316 (_NPN_HasMethod): |
|
21317 (_NPN_SetException): |
|
21318 * bindings/NP_jsobject.h: |
|
21319 * bindings/c/c_instance.cpp: |
|
21320 (CInstance::CInstance): |
|
21321 (CInstance::stringValue): |
|
21322 * bindings/c/c_instance.h: |
|
21323 * bindings/c/c_utility.cpp: |
|
21324 (convertValueToNPVariant): |
|
21325 * bindings/jni/jni_instance.cpp: |
|
21326 (JavaInstance::JavaInstance): |
|
21327 (JavaInstance::valueOf): |
|
21328 * bindings/jni/jni_instance.h: |
|
21329 * bindings/objc/WebScriptObject.mm: |
|
21330 (-[WebScriptObject _initializeWithObjectImp:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): |
|
21331 (-[WebScriptObject _initWithObjectImp:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): |
|
21332 (-[WebScriptObject KJS::Bindings::]): |
|
21333 (-[WebScriptObject _setOriginExecutionContext:KJS::Bindings::]): |
|
21334 (-[WebScriptObject _isSafeScript]): |
|
21335 (-[WebScriptObject callWebScriptMethod:withArguments:]): |
|
21336 (-[WebScriptObject evaluateWebScript:]): |
|
21337 (-[WebScriptObject setValue:forKey:]): |
|
21338 (-[WebScriptObject valueForKey:]): |
|
21339 (-[WebScriptObject removeWebScriptKey:]): |
|
21340 (-[WebScriptObject stringRepresentation]): |
|
21341 (-[WebScriptObject webScriptValueAtIndex:]): |
|
21342 (-[WebScriptObject setWebScriptValueAtIndex:value:]): |
|
21343 (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): |
|
21344 * bindings/objc/WebScriptObjectPrivate.h: |
|
21345 * bindings/objc/objc_instance.h: |
|
21346 * bindings/objc/objc_runtime.mm: |
|
21347 (convertValueToObjcObject): |
|
21348 * bindings/objc/objc_utility.mm: |
|
21349 (KJS::Bindings::convertValueToObjcValue): |
|
21350 * bindings/runtime.cpp: |
|
21351 (Instance::Instance): |
|
21352 (Instance::operator=): |
|
21353 * bindings/runtime.h: |
|
21354 (KJS::Bindings::Instance::Instance): |
|
21355 (KJS::Bindings::Instance::setExecutionContext): |
|
21356 (KJS::Bindings::Instance::executionContext): |
|
21357 * bindings/runtime_root.cpp: |
|
21358 (RootObject::setInterpreter): |
|
21359 * bindings/runtime_root.h: |
|
21360 * kjs/interpreter.h: |
|
21361 (KJS::Interpreter::isGlobalObject): |
|
21362 (KJS::Interpreter::interpreterForGlobalObject): |
|
21363 (KJS::Interpreter::isSafeScript): |
|
21364 |
|
21365 === Safari-179 === |
|
21366 |
|
21367 2005-01-13 Vicki Murley <vicki@apple.com> |
|
21368 |
|
21369 Reviewed by Adele. |
|
21370 |
|
21371 - fix <rdar://problem/3946836> Safari about box lists 2004 instead of 2005 |
|
21372 |
|
21373 * JavaScriptCore.pbproj/project.pbxproj: bump "2004" to "2005" |
|
21374 |
|
21375 2005-01-12 Richard Williamson <rjw@apple.com> |
|
21376 |
|
21377 Avoid additional work on dealloc by adding early out to |
|
21378 removeNativeReference(). (This will save time on dealloc |
|
21379 for all ObjC DOM objects.) |
|
21380 |
|
21381 Reviewed by Darin. |
|
21382 |
|
21383 * bindings/runtime_root.cpp: |
|
21384 (KJS::Bindings::removeNativeReference): |
|
21385 |
|
21386 2005-01-12 Richard Williamson <rjw@apple.com> |
|
21387 |
|
21388 Fixed <rdar://problem/3923356> REGRESSION: Java/JavaScript security checks working incorrectly |
|
21389 |
|
21390 We were always returning the first "root" object for all runtime |
|
21391 objects. Changed 0 in loop to i, the index. |
|
21392 |
|
21393 Reviewed by David Harrison. |
|
21394 |
|
21395 * bindings/runtime_root.cpp: |
|
21396 (KJS::Bindings::rootForImp): |
|
21397 |
|
21398 2005-01-11 Richard Williamson <rjw@apple.com> |
|
21399 |
|
21400 Fixed <rdar://problem/3887930> Must use new Java plug-in API to get/set fields so exception handling works (fixes many LiveConnect crashes) |
|
21401 |
|
21402 Use the new dispatching API to invoke JNI, rather than calling JNI |
|
21403 directly. |
|
21404 |
|
21405 Reviewed by David Harrison. |
|
21406 |
|
21407 * bindings/jni/jni_instance.cpp: |
|
21408 (JavaInstance::invokeMethod): |
|
21409 * bindings/jni/jni_runtime.cpp: |
|
21410 (JavaField::dispatchValueFromInstance): |
|
21411 (JavaField::valueFromInstance): |
|
21412 (JavaField::dispatchSetValueToInstance): |
|
21413 (JavaField::setValueToInstance): |
|
21414 * bindings/jni/jni_runtime.h: |
|
21415 * bindings/jni/jni_utility.cpp: |
|
21416 (KJS::Bindings::convertValueToJValue): |
|
21417 |
|
21418 === Safari-178 === |
|
21419 |
|
21420 === Safari-177 === |
|
21421 |
|
21422 === Safari-176 === |
|
21423 |
|
21424 2004-12-17 Maciej Stachowiak <mjs@apple.com> |
|
21425 |
|
21426 Reviewed by Kevin. |
|
21427 |
|
21428 <rdar://problem/3926869> Opening caches window after running PLT causes crash |
|
21429 |
|
21430 * kjs/protected_values.cpp: |
|
21431 (KJS::ProtectedValues::getProtectCount): Don't include simple numbers in |
|
21432 the protected value table. |
|
21433 (KJS::ProtectedValues::increaseProtectCount): Ditto. |
|
21434 (KJS::ProtectedValues::decreaseProtectCount): Ditto. |
|
21435 |
|
21436 2004-12-16 Darin Adler <darin@apple.com> |
|
21437 |
|
21438 Reviewed by Maciej. |
|
21439 |
|
21440 - fixed <rdar://problem/3920764> Unimplemented String methods toLocaleLowerCase and toLocaleUpperCase |
|
21441 |
|
21442 * kjs/string_object.h: Added toLocaleLowerCase and toLocaleUpperCase. |
|
21443 * kjs/string_object.cpp: (StringProtoFuncImp::call): Made locale versions be synonmyms for the |
|
21444 non-locale-specific versions. |
|
21445 * kjs/string_object.lut.h: Regenerated. |
|
21446 |
|
21447 2004-12-14 Richard Williamson <rjw@apple.com> |
|
21448 |
|
21449 Pass URL of plugin view when call into JNI. |
|
21450 |
|
21451 Reviewed by Chris. |
|
21452 |
|
21453 * bindings/jni/jni_objc.mm: |
|
21454 (KJS::Bindings::dispatchJNICall): |
|
21455 |
|
21456 2004-12-13 Richard Williamson <rjw@apple.com> |
|
21457 |
|
21458 Fixed <rdar://problem/3827799> repro. crash with IBM Rational ClearCase Web under Safari (Java/LiveConnect-related) |
|
21459 |
|
21460 Add support for calling static Java methods from JavaScript. |
|
21461 |
|
21462 Reviewed by Maciej. |
|
21463 |
|
21464 * bindings/jni/jni_instance.cpp: |
|
21465 (JavaInstance::invokeMethod): |
|
21466 * bindings/jni/jni_runtime.cpp: |
|
21467 (JavaMethod::JavaMethod): |
|
21468 * bindings/jni/jni_runtime.h: |
|
21469 (KJS::Bindings::JavaMethod::isStatic): |
|
21470 * bindings/jni/jni_utility.cpp: |
|
21471 (callJNIStaticMethod): |
|
21472 (KJS::Bindings::callJNIBooleanMethod): |
|
21473 (KJS::Bindings::callJNIStaticBooleanMethod): |
|
21474 * bindings/jni/jni_utility.h: |
|
21475 |
|
21476 2004-12-13 Richard Williamson <rjw@apple.com> |
|
21477 |
|
21478 Fixed <rdar://problem/3887767> LiveConnect doesn't propagate Java exceptions back to JavaScript (prevents security suite from running) |
|
21479 |
|
21480 Reviewed by John. |
|
21481 |
|
21482 * bindings/jni/jni_instance.cpp: |
|
21483 (JavaInstance::invokeMethod): |
|
21484 * bindings/jni/jni_objc.mm: |
|
21485 (KJS::Bindings::dispatchJNICall): |
|
21486 * bindings/jni/jni_runtime.h: |
|
21487 * bindings/jni/jni_utility.h: |
|
21488 |
|
21489 === Safari-175 === |
|
21490 |
|
21491 2004-12-07 Maciej Stachowiak <mjs@apple.com> |
|
21492 |
|
21493 Reviewed by Darin. |
|
21494 |
|
21495 <rdar://problem/3908017> REGRESSION (172-173): assertion in ObjectImp::construct trying to create JS error (24hourfitness.com) |
|
21496 |
|
21497 The fix was to implement copy constructor and assignment operator, |
|
21498 the ones that worked on the base class did not replace the |
|
21499 defaults apparently! |
|
21500 |
|
21501 * kjs/protect.h: |
|
21502 (KJS::ProtectedValue::ProtectedValue): |
|
21503 (KJS::ProtectedValue::operator=): |
|
21504 (KJS::ProtectedObject::ProtectedObject): |
|
21505 (KJS::ProtectedObject::operator=): |
|
21506 |
|
21507 Also fixed a bug in the GC test mode that compares the results of |
|
21508 the old collector and the new collector. |
|
21509 |
|
21510 * kjs/value.cpp: |
|
21511 (ValueImp::mark): |
|
21512 |
|
21513 === Safari-173 === |
|
21514 |
|
21515 2004-11-23 Richard Williamson <rjw@apple.com> |
|
21516 |
|
21517 Fixed <rdar://problem/3890385> field and method cache incorrectly capped (c bindings) |
|
21518 |
|
21519 Reviewed by Ken. |
|
21520 |
|
21521 * bindings/c/c_class.cpp: |
|
21522 (CClass::_commonInit): |
|
21523 |
|
21524 2004-11-21 Maciej Stachowiak <mjs@apple.com> |
|
21525 |
|
21526 Reviewed by Ken. |
|
21527 |
|
21528 <rdar://problem/3889696> Enable conservative garbage collection for JavaScript |
|
21529 |
|
21530 * kjs/collector.cpp: |
|
21531 (KJS::Collector::Thread::Thread): |
|
21532 (KJS::destroyRegisteredThread): |
|
21533 (KJS::initializeRegisteredThreadKey): |
|
21534 (KJS::Collector::registerThread): |
|
21535 (KJS::Collector::markStackObjectsConservatively): |
|
21536 (KJS::Collector::markCurrentThreadConservatively): |
|
21537 (KJS::Collector::markOtherThreadConservatively): |
|
21538 * kjs/collector.h: |
|
21539 * kjs/internal.cpp: |
|
21540 (lockInterpreter): |
|
21541 * kjs/value.h: |
|
21542 |
|
21543 === Safari-172 === |
|
21544 |
|
21545 2004-11-15 Richard Williamson <rjw@apple.com> |
|
21546 |
|
21547 Fixed <rdar://problem/3880561> Default string value of ObjC object in JS should be [obj description]. |
|
21548 |
|
21549 Reviewed by Hyatt. |
|
21550 |
|
21551 * bindings/objc/objc_instance.mm: |
|
21552 (ObjcInstance::stringValue): |
|
21553 * bindings/objc/objc_utility.h: |
|
21554 * bindings/objc/objc_utility.mm: |
|
21555 (KJS::Bindings::convertNSStringToString): |
|
21556 (KJS::Bindings::convertObjcValueToValue): |
|
21557 |
|
21558 === Safari-171 === |
|
21559 |
|
21560 2004-11-09 Chris Blumenberg <cblu@apple.com> |
|
21561 |
|
21562 Fixed: <rdar://problem/3872724> soft link against JavaVM to save ~2MB RSHRD |
|
21563 |
|
21564 Reviewed by rjw. |
|
21565 |
|
21566 * ChangeLog: |
|
21567 * JavaScriptCore.pbproj/project.pbxproj: don't link against JavaVM |
|
21568 * bindings/softlinking.c: Added. |
|
21569 (loadFramework): new |
|
21570 (getFunctionPointer): new |
|
21571 (JNI_GetCreatedJavaVMs): load JavaVM if not already loaded, get _JNI_GetCreatedJavaVMs symbol if we don't already have it, call JNI_GetCreatedJavaVMs |
|
21572 |
|
21573 === Safari-170 === |
|
21574 |
|
21575 2004-11-04 Darin Adler <darin@apple.com> |
|
21576 |
|
21577 Reviewed by Ken. |
|
21578 |
|
21579 - fixed <rdar://problem/3865365> since -[WebScriptObject dealloc] does not call [super dealloc], the build will fail due to a warning |
|
21580 - fixed behavior so that [[WebScriptObject alloc] initWithCoder:] doesn't leak WebUndefined instances |
|
21581 and incidentally so that [[WebScriptObject alloc] init] returns the single shared instance rather |
|
21582 than allocating a new one |
|
21583 |
|
21584 * bindings/objc/WebScriptObject.mm: Removed some stray semicolons. |
|
21585 (+[WebUndefined allocWithZone:]): Made this the common bottleneck that returns the single instance |
|
21586 of WebUndefined, since it's the single method that normally allocates new instances. Calls super to |
|
21587 actually allocate only the very first time it's called. |
|
21588 (-[WebUndefined initWithCoder:]): Simplified to just return self (no reason to re-lookup the single |
|
21589 shared instance since there can be only one). |
|
21590 (-[WebUndefined copyWithZone:]): Ditto. |
|
21591 (-[WebUndefined retain]): Ditto. |
|
21592 (-[WebUndefined retainCount]): Use UINT_MAX constant here (matches usage in NSObject.m for retain count |
|
21593 of class). |
|
21594 (-[WebUndefined autorelease]): Simplified to just return self (see above). |
|
21595 (-[WebUndefined copy]): No need to override this since it just turns around and calls copyWithZone:. |
|
21596 (-[WebUndefined dealloc]): Added an assertion since this method should never be called. Also added |
|
21597 a call to [super dealloc] after return; to make the new -Wdealloc-check compiler happy (fixing the |
|
21598 bug mentioned above). |
|
21599 (+[WebUndefined undefined]): Reimplemented; calls allocWithZone:NULL to get to the shared instance. |
|
21600 No need to call init, since that's a no-op for this class. |
|
21601 |
|
21602 2004-11-03 David Harrison <harrison@apple.com> |
|
21603 |
|
21604 Reviewed by Darin. |
|
21605 |
|
21606 Eliminate the use of a marker file to determine how to build. |
|
21607 |
|
21608 * .cvsignore: |
|
21609 * Makefile.am: |
|
21610 |
|
21611 2004-11-01 Richard Williamson <rjw@apple.com> |
|
21612 |
|
21613 Fixed <rdar://problem/3861469> Latest Real player crashes Safari on some sites. |
|
21614 |
|
21615 Reviewed by Ken. |
|
21616 |
|
21617 * bindings/c/c_instance.cpp: |
|
21618 (CInstance::invokeMethod): |
|
21619 (CInstance::invokeDefaultMethod): |
|
21620 Initialize out parameters to void type. |
|
21621 |
|
21622 * bindings/c/c_runtime.cpp: |
|
21623 (CField::valueFromInstance): |
|
21624 (CField::setValueToInstance): |
|
21625 Initialize out parameters to void type. |
|
21626 Also added additional checks to protect against classes that |
|
21627 don't implement all functions. |
|
21628 |
|
21629 2004-11-01 Richard Williamson <rjw@apple.com> |
|
21630 |
|
21631 Fixed <rdar://problem/3861257> WebUndefined should be returned for undefined values |
|
21632 |
|
21633 Reviewed by John. |
|
21634 |
|
21635 * ChangeLog: |
|
21636 * bindings/objc/WebScriptObject.mm: |
|
21637 (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]): |
|
21638 Added additional conversion Undefined -> WebUndefined. |
|
21639 * bindings/objc/objc_utility.mm: |
|
21640 (KJS::Bindings::convertObjcValueToValue): |
|
21641 Added additional conversion WebUndefined -> Undefined. |
|
21642 |
|
21643 2004-11-01 Darin Adler <darin@apple.com> |
|
21644 |
|
21645 - fixed <rdar://problem/3855573> Remove reference to "WebScriptMethods" from WebScriptObject.h comments |
|
21646 |
|
21647 * bindings/objc/WebScriptObject.h: Removed unneeded #ifdef protection for multiple includes (since |
|
21648 this is an Objective-C header and we use #import for those). Fixed comments as requested in the bug |
|
21649 report to match the contents of the file. |
|
21650 |
|
21651 === Safari-169 === |
|
21652 |
|
21653 === Safari-168 === |
|
21654 |
|
21655 2004-10-22 Ken Kocienda <kocienda@apple.com> |
|
21656 |
|
21657 Reviewed by me |
|
21658 |
|
21659 * JavaScriptCore.pbproj/project.pbxproj: |
|
21660 Add GCC_ENABLE_OBJC_GC and GCC_FAST_OBJC_DISPATCH flags. |
|
21661 |
|
21662 === Safari-167 === |
|
21663 |
|
21664 2004-10-13 Richard Williamson <rjw@apple.com> |
|
21665 |
|
21666 Moved boolean checks prior to NSNumber checks. booleans are |
|
21667 NSNumbers. |
|
21668 |
|
21669 Follow on to <rdar://problem/3821515> binding layer needs to convert NSNumber-bools to js type boolean not number. |
|
21670 |
|
21671 Reviewed by John. |
|
21672 |
|
21673 * bindings/objc/objc_utility.mm: |
|
21674 (KJS::Bindings::convertObjcValueToValue): |
|
21675 |
|
21676 2004-10-12 Richard Williamson <rjw@apple.com> |
|
21677 |
|
21678 Fixed access to DOM object via WebScriptObject API. |
|
21679 The execution context for DOM objects wasn't being found. |
|
21680 <rdar://problem/3831372> The valueForKey method for @"offsetLeft" on a paragraph element causes a crash. |
|
21681 |
|
21682 Reviewed by Chris. |
|
21683 |
|
21684 * bindings/objc/WebScriptObject.mm: |
|
21685 (_didExecute): |
|
21686 (-[WebScriptObject KJS::Bindings::]): |
|
21687 (-[WebScriptObject callWebScriptMethod:withArguments:]): |
|
21688 (-[WebScriptObject evaluateWebScript:]): |
|
21689 (-[WebScriptObject setValue:forKey:]): |
|
21690 (-[WebScriptObject valueForKey:]): |
|
21691 (-[WebScriptObject stringRepresentation]): |
|
21692 * bindings/objc/WebScriptObjectPrivate.h: |
|
21693 |
|
21694 2004-10-09 Darin Adler <darin@apple.com> |
|
21695 |
|
21696 Reviewed by Kevin. |
|
21697 |
|
21698 - fixed <rdar://problem/3804661> REGRESSION: JavaScriptCore framework now has two init routines |
|
21699 |
|
21700 * bindings/NP_jsobject.cpp: Fixed unnecessarily-complex globals set up that was |
|
21701 creating an init routine. |
|
21702 |
|
21703 * kjs/ustring.cpp: Changed around the UString::Rep::empty construction to not |
|
21704 require a global constructor that creates an init routine. |
|
21705 |
|
21706 2004-10-09 Darin Adler <darin@apple.com> |
|
21707 |
|
21708 Reviewed by Kevin. |
|
21709 |
|
21710 - fixed <rdar://problem/3822618> REGRESSION (164-165): expedia.com's popup help doesn't work |
|
21711 |
|
21712 * kjs/reference.cpp: (Reference::putValue): Change so that references not found in any object |
|
21713 work with the window object of the page the function is in, not the page of the caller. This |
|
21714 is what all other browsers do. This code was hidden before by the "everything is defined on |
|
21715 window object" hack in WebCore. |
|
21716 |
|
21717 2004-10-07 Richard Williamson <rjw@apple.com> |
|
21718 |
|
21719 Added simple JavaScript call tracing. Very useful for |
|
21720 debugging complex pages. |
|
21721 |
|
21722 Tracing is only available in development builds and is |
|
21723 enabled by: |
|
21724 |
|
21725 (gdb) set traceJavaScript = 1 |
|
21726 |
|
21727 or programatically |
|
21728 |
|
21729 setTraceJavaScript(true) |
|
21730 |
|
21731 Function, args, and return values are printed to console. Very |
|
21732 verbose. |
|
21733 |
|
21734 Reviewed by Ken. |
|
21735 |
|
21736 * kjs/function_object.cpp: |
|
21737 (FunctionProtoFuncImp::call): |
|
21738 * kjs/object.cpp: |
|
21739 (KJS::Object::call): |
|
21740 |
|
21741 === Safari-166 === |
|
21742 |
|
21743 2004-10-05 Richard Williamson <rjw@apple.com> |
|
21744 |
|
21745 Fixed <rdar://problem/3819234> NPN_SetException (and throwException:) isn't implemented |
|
21746 |
|
21747 Reviewed by Chris. |
|
21748 |
|
21749 * bindings/NP_jsobject.cpp: |
|
21750 (_NPN_SetException): |
|
21751 * bindings/npruntime.cpp: |
|
21752 (_NPN_SetExceptionWithUTF8): |
|
21753 * bindings/objc/WebScriptObject.mm: |
|
21754 (+[WebScriptObject throwException:]): |
|
21755 * kjs/internal.h: |
|
21756 (KJS::InterpreterImp::context): |
|
21757 |
|
21758 2004-10-05 Richard Williamson <rjw@apple.com> |
|
21759 |
|
21760 Fixed <rdar://problem/3821515> binding layer needs to convert NSNumber-bools to js type boolean not number |
|
21761 |
|
21762 Reviewed by Ken. |
|
21763 |
|
21764 * bindings/objc/objc_utility.mm: |
|
21765 (KJS::Bindings::convertObjcValueToValue): |
|
21766 |
|
21767 2004-10-04 Darin Adler <darin@apple.com> |
|
21768 |
|
21769 Reviewed by Ken. |
|
21770 |
|
21771 - rolled in a fix the KDE folks did for the operations that generate HTML fragments |
|
21772 |
|
21773 * kjs/string_object.cpp: (StringProtoFuncImp::call): Added quote marks to generated HTML. |
|
21774 |
|
21775 - rolled out an old workaround we don't need any more |
|
21776 |
|
21777 * JavaScriptCore.pbproj/project.pbxproj: Remove -Wno-long-double because the <math.h> issue that |
|
21778 required it is no longer there. |
|
21779 |
|
21780 2004-09-30 Richard Williamson <rjw@apple.com> |
|
21781 |
|
21782 Fixed <rdar://problem/3821215> NPN hasMethod and hasProperty functions should take NPObjects, not NPClass |
|
21783 |
|
21784 Reviewed by Chris. |
|
21785 |
|
21786 * bindings/NP_jsobject.cpp: |
|
21787 (_NPN_GetProperty): |
|
21788 (_NPN_HasProperty): |
|
21789 (_NPN_HasMethod): |
|
21790 * bindings/c/c_class.cpp: |
|
21791 (CClass::methodsNamed): |
|
21792 (CClass::fieldNamed): |
|
21793 * bindings/c/c_class.h: |
|
21794 * bindings/c/c_instance.cpp: |
|
21795 (CInstance::invokeMethod): |
|
21796 * bindings/jni/jni_class.cpp: |
|
21797 (JavaClass::methodsNamed): |
|
21798 * bindings/jni/jni_class.h: |
|
21799 * bindings/npruntime.h: |
|
21800 * bindings/objc/objc_class.h: |
|
21801 * bindings/objc/objc_class.mm: |
|
21802 (ObjcClass::methodsNamed): |
|
21803 * bindings/runtime.h: |
|
21804 * bindings/runtime_object.cpp: |
|
21805 (RuntimeObjectImp::get): |
|
21806 (RuntimeObjectImp::hasProperty): |
|
21807 |
|
21808 2004-09-29 Chris Blumenberg <cblu@apple.com> |
|
21809 |
|
21810 Prepended underscores to NPN methods so that when the QT plug-in loads these symbols, it uses the non-underscore versions in WebKit. Without this, the QT plug-in was failing to load when launching Safari from the command-line. |
|
21811 |
|
21812 Reviewed by rjw. |
|
21813 |
|
21814 * JavaScriptCore.pbproj/project.pbxproj: |
|
21815 * bindings/NP_jsobject.cpp: |
|
21816 (_NPN_CreateScriptObject): |
|
21817 (_NPN_InvokeDefault): |
|
21818 (_NPN_Invoke): |
|
21819 (_NPN_Evaluate): |
|
21820 (_NPN_GetProperty): |
|
21821 (_NPN_SetProperty): |
|
21822 (_NPN_RemoveProperty): |
|
21823 (_NPN_HasProperty): |
|
21824 (_NPN_HasMethod): |
|
21825 * bindings/c/c_class.cpp: |
|
21826 (CClass::methodsNamed): |
|
21827 (CClass::fieldNamed): |
|
21828 * bindings/c/c_instance.cpp: |
|
21829 (CInstance::CInstance): |
|
21830 (CInstance::~CInstance): |
|
21831 (CInstance::operator=): |
|
21832 (CInstance::invokeMethod): |
|
21833 (CInstance::invokeDefaultMethod): |
|
21834 * bindings/c/c_runtime.cpp: |
|
21835 * bindings/c/c_runtime.h: |
|
21836 (KJS::Bindings::CField::name): |
|
21837 (KJS::Bindings::CMethod::name): |
|
21838 * bindings/npruntime.cpp: |
|
21839 (_NPN_GetStringIdentifier): |
|
21840 (_NPN_GetStringIdentifiers): |
|
21841 (_NPN_GetIntIdentifier): |
|
21842 (_NPN_IdentifierIsString): |
|
21843 (_NPN_UTF8FromIdentifier): |
|
21844 (_NPN_IntFromIdentifier): |
|
21845 (NPN_InitializeVariantWithObject): |
|
21846 (_NPN_ReleaseVariantValue): |
|
21847 (_NPN_CreateObject): |
|
21848 (_NPN_RetainObject): |
|
21849 (_NPN_ReleaseObject): |
|
21850 (_NPN_SetExceptionWithUTF8): |
|
21851 (_NPN_SetException): |
|
21852 |
|
21853 2004-09-26 Darin Adler <darin@apple.com> |
|
21854 |
|
21855 * kjs/string_object.cpp: (StringProtoFuncImp::call): Remove strange use of high() and |
|
21856 low() to get Unicode value of character, and just use unicode(). |
|
21857 |
|
21858 2004-09-26 Darin Adler <darin@apple.com> |
|
21859 |
|
21860 - refine charAt/charCodeAt fix slightly |
|
21861 |
|
21862 * kjs/string_object.cpp: (StringProtoFuncImp::call): Treat undefined the same was as an |
|
21863 omitted parameter, as we do everywhere else, and as other browsers do here. |
|
21864 |
|
21865 2004-09-26 Darin Adler <darin@apple.com> |
|
21866 |
|
21867 Reviewed by Kevin. |
|
21868 |
|
21869 - fixed <rdar://problem/3816097> REGRESSION: mailblocks, and presumably many other pages, failing because variable not found |
|
21870 |
|
21871 * kjs/internal.cpp: (InterpreterImp::evaluate): Process variable declarations before executing |
|
21872 the program. We were doing this properly for functions, but not entire programs. |
|
21873 |
|
21874 - fixed <rdar://problem/3814706> REGRESSION: text fields in mailblocks wizards do not accept keystrokes due to use of charCodeAt() |
|
21875 |
|
21876 * kjs/string_object.cpp: (StringProtoFuncImp::call): Changed the implementation of charAt |
|
21877 and charCodeAt to treat a missing parameter as an index of 0, rather than an invalid index. |
|
21878 |
|
21879 * tests/mozilla/expected.html: Update for two tests that now pass with these changes. |
|
21880 |
|
21881 === Safari-165 === |
|
21882 |
|
21883 === Safari-164 === |
|
21884 |
|
21885 2004-09-14 Richard Williamson <rjw@apple.com> |
|
21886 |
|
21887 1. Add class parameter to object allocation function. This is somewhat redundant, given that |
|
21888 the allocation function is in the class function vector, but people wanted to use the same |
|
21889 allocation function for different classes. |
|
21890 |
|
21891 2. Renamed NPN_Class to NPN_Invoke to match the name in the function vector. |
|
21892 |
|
21893 3. Add support for a default function on an object. This is a feature that ActiveX supports, |
|
21894 and will allow JavaScript code to be written that will look exactly the same for both ActiveX |
|
21895 plugins and Netscape or WebKit plugins. There are implementations included for the 'C' and |
|
21896 'Objective-C' bindings. |
|
21897 |
|
21898 There bugs are covered by |
|
21899 |
|
21900 <rdar://problem/3776343> Support for default functions in the JavaScript bindings |
|
21901 <rdar://problem/3779186> NPN_Call needs to be renamed to NPN_Invoke |
|
21902 <rdar://problem/3674754> Need to implement latest npruntime.h |
|
21903 |
|
21904 Reviewed by John. |
|
21905 |
|
21906 * bindings/NP_jsobject.cpp: |
|
21907 (jsAllocate): |
|
21908 (NPN_InvokeDefault): |
|
21909 (NPN_Invoke): |
|
21910 * bindings/c/c_class.cpp: |
|
21911 * bindings/c/c_instance.cpp: |
|
21912 (CInstance::CInstance): |
|
21913 (CInstance::operator=): |
|
21914 (CInstance::invokeMethod): |
|
21915 (CInstance::invokeDefaultMethod): |
|
21916 * bindings/c/c_instance.h: |
|
21917 * bindings/c/c_runtime.cpp: |
|
21918 * bindings/c/c_runtime.h: |
|
21919 * bindings/jni/jni_instance.cpp: |
|
21920 (JavaInstance::invokeDefaultMethod): |
|
21921 * bindings/jni/jni_instance.h: |
|
21922 * bindings/npruntime.cpp: |
|
21923 (NPN_CreateObject): |
|
21924 * bindings/npruntime.h: |
|
21925 * bindings/objc/WebScriptObject.h: |
|
21926 * bindings/objc/objc_class.mm: |
|
21927 (ObjcClass::fallbackObject): |
|
21928 * bindings/objc/objc_instance.h: |
|
21929 * bindings/objc/objc_instance.mm: |
|
21930 (ObjcInstance::invokeDefaultMethod): |
|
21931 * bindings/objc/objc_runtime.h: |
|
21932 * bindings/objc/objc_runtime.mm: |
|
21933 (ObjcFallbackObjectImp::ObjcFallbackObjectImp): |
|
21934 (ObjcFallbackObjectImp::get): |
|
21935 (ObjcFallbackObjectImp::put): |
|
21936 (ObjcFallbackObjectImp::canPut): |
|
21937 (ObjcFallbackObjectImp::implementsCall): |
|
21938 (ObjcFallbackObjectImp::call): |
|
21939 (ObjcFallbackObjectImp::hasProperty): |
|
21940 (ObjcFallbackObjectImp::deleteProperty): |
|
21941 (ObjcFallbackObjectImp::defaultValue): |
|
21942 * bindings/runtime.h: |
|
21943 (KJS::Bindings::Class::fallbackObject): |
|
21944 (KJS::Bindings::Instance::getValueOfUndefinedField): |
|
21945 (KJS::Bindings::Instance::setValueOfUndefinedField): |
|
21946 (KJS::Bindings::Instance::valueOf): |
|
21947 * bindings/runtime_object.cpp: |
|
21948 (RuntimeObjectImp::implementsCall): |
|
21949 (RuntimeObjectImp::call): |
|
21950 * bindings/runtime_object.h: |
|
21951 |
|
21952 2004-09-13 Maciej Stachowiak <mjs@apple.com> |
|
21953 |
|
21954 Reviewed by Darin. |
|
21955 |
|
21956 <rdar://problem/3794735> Gmail- sending a very long message with Safari is so slow it seems like a hang |
|
21957 |
|
21958 * kjs/string_object.cpp: |
|
21959 (StringProtoFuncImp::call): Replaced implementation of replace() |
|
21960 method with function below... |
|
21961 (replace): In order to avoid excessive allocation and copying, |
|
21962 figure out the ranges of the original string and replacement |
|
21963 strings to be assembled, instead of constantly creating new |
|
21964 strings at each substitution. The old behavior is basically O(N^2) |
|
21965 for a global replace on a pattern that matches many places in the |
|
21966 string. |
|
21967 (regExpIsGlobal): Helper function for the above. |
|
21968 (expandSourceRanges): ditto |
|
21969 (pushSourceRange): ditto |
|
21970 (expandReplacements): ditto |
|
21971 (pushReplacement): ditto |
|
21972 * kjs/ustring.cpp: |
|
21973 (KJS::UString::spliceSubstringsWithSeparators): New method that |
|
21974 pieces together substring ranges of this string together with |
|
21975 specified separators, all at one go. |
|
21976 * kjs/ustring.h: |
|
21977 (KJS::UString::Range::Range): Added new helper class to represent |
|
21978 substring choices. |
|
21979 |
|
21980 2004-09-14 Maciej Stachowiak <mjs@apple.com> |
|
21981 |
|
21982 Reviewed by Darin. |
|
21983 |
|
21984 - fixed <rdar://problem/3800315> encode-URI-test layout test is failing |
|
21985 |
|
21986 * kjs/function.cpp: |
|
21987 (KJS::GlobalFuncImp::call): Make sure to escape null |
|
21988 characters. This is a bug in the new code that made part of the |
|
21989 test fail. |
|
21990 |
|
21991 2004-09-13 Darin Adler <darin@apple.com> |
|
21992 |
|
21993 Reviewed by Kevin and Maciej. |
|
21994 |
|
21995 - new function to support fix for DIG bug in WebCore |
|
21996 |
|
21997 * kjs/scope_chain.h: Added new push function that pushes another entire scope chain. |
|
21998 * kjs/scope_chain.cpp: (KJS::ScopeChain::push): Ditto. |
|
21999 |
|
22000 2004-09-12 Darin Adler <darin@apple.com> |
|
22001 |
|
22002 * tests/mozilla/expected.html: Updated test results for 3 more tests that pass with the new version |
|
22003 of escape and unescape. |
|
22004 |
|
22005 2004-09-12 Darin Adler <darin@apple.com> |
|
22006 |
|
22007 Reviewed by Maciej. |
|
22008 |
|
22009 - fixed <rdar://problem/3798209> any non-ASCII characters are garbled in the result of toLocaleString |
|
22010 |
|
22011 * kjs/date_object.cpp: |
|
22012 (formatLocaleDate): Replaced two old functions that used LongDateTime with this one new function that |
|
22013 uses CFDateFormatter. |
|
22014 (DateProtoFuncImp::call): Call the new formatLocaleDate instead of both formatLocaleDate and formatLocaleTime. |
|
22015 |
|
22016 2004-09-09 Maciej Stachowiak <mjs@apple.com> |
|
22017 |
|
22018 Reviewed by Richard. |
|
22019 |
|
22020 <rdar://problem/3493140> REGRESSION (85-100): cedille displays %-escaped in JavaScript message at hotmail.com |
|
22021 |
|
22022 * kjs/function.cpp: |
|
22023 (KJS::GlobalFuncImp::call): Replace our escape() and unescape() implementations with |
|
22024 ones from KDE KJS, which have the proper latin-1 behavior to match Win IE. |
|
22025 * kjs/lexer.cpp: |
|
22026 (Lexer::isHexDigit): Made static and non-const. |
|
22027 * kjs/lexer.h: |
|
22028 |
|
22029 === Safari-163 === |
|
22030 |
|
22031 2004-09-06 Darin Adler <darin@apple.com> |
|
22032 |
|
22033 * JavaScriptCore.pbproj/project.pbxproj: Bump MACOSX_DEPLOYMENT_TARGET to 10.3. |
|
22034 |
|
22035 === Safari-162 === |
|
22036 |
|
22037 2004-09-01 Richard Williamson <rjw@apple.com> |
|
22038 |
|
22039 Add pid to exception messages (to help debug dashboard clients). |
|
22040 |
|
22041 Reviewed by Chris. |
|
22042 |
|
22043 * kjs/interpreter.cpp: |
|
22044 (Interpreter::evaluate): |
|
22045 |
|
22046 === Safari-161 === |
|
22047 |
|
22048 2004-08-20 Richard Williamson <rjw@apple.com> |
|
22049 |
|
22050 Implemented new JNI abstraction. We no longer invoke Java methods |
|
22051 directly with JNI, rather we call into the plugin. This allows the |
|
22052 plugin to dispatch the call to the appropriate VM thread. This |
|
22053 change should (will?) fix a whole class of threading related problems with |
|
22054 the Java VM. |
|
22055 |
|
22056 Reviewed by Hyatt. |
|
22057 |
|
22058 * JavaScriptCore.pbproj/project.pbxproj: |
|
22059 * bindings/c/c_instance.h: |
|
22060 (KJS::Bindings::CInstance::setExecutionContext): |
|
22061 (KJS::Bindings::CInstance::executionContext): |
|
22062 * bindings/jni/jni_instance.cpp: |
|
22063 (JavaInstance::JavaInstance): |
|
22064 (JavaInstance::invokeMethod): |
|
22065 (JavaInstance::setExecutionContext): |
|
22066 (JavaInstance::executionContext): |
|
22067 * bindings/jni/jni_instance.h: |
|
22068 * bindings/jni/jni_jsobject.cpp: |
|
22069 (JSObject::convertJObjectToValue): |
|
22070 * bindings/jni/jni_runtime.cpp: |
|
22071 (JavaField::JavaField): |
|
22072 (JavaArray::convertJObjectToArray): |
|
22073 (JavaField::valueFromInstance): |
|
22074 (JavaArray::JavaArray): |
|
22075 (JavaArray::valueAt): |
|
22076 * bindings/jni/jni_runtime.h: |
|
22077 (KJS::Bindings::JavaArray::operator=): |
|
22078 (KJS::Bindings::JavaArray::executionContext): |
|
22079 * bindings/jni/jni_utility.h: |
|
22080 * bindings/objc/objc_instance.h: |
|
22081 (KJS::Bindings::ObjcInstance::setExecutionContext): |
|
22082 (KJS::Bindings::ObjcInstance::executionContext): |
|
22083 * bindings/runtime.cpp: |
|
22084 (Instance::createBindingForLanguageInstance): |
|
22085 * bindings/runtime.h: |
|
22086 * bindings/runtime_root.h: |
|
22087 (KJS::Bindings::RootObject::nativeHandle): |
|
22088 |
|
22089 === Safari-158 === |
|
22090 |
|
22091 2004-08-19 Vicki Murley <vicki@apple.com> |
|
22092 |
|
22093 Reviewed by John. |
|
22094 |
|
22095 * kjs/property_map.cpp: |
|
22096 (KJS::PropertyMap::put): initialize deletedElementIndex to zero, to make the compiler happy |
|
22097 |
|
22098 2004-08-17 Darin Adler <darin@apple.com> |
|
22099 |
|
22100 Reviewed by Adele. |
|
22101 |
|
22102 - fixed <rdar://problem/3746676> SAP WebDynpro app hangs inside JavaScript property map hash table code (deleted sentinel problem) |
|
22103 |
|
22104 * kjs/property_map.h: Added some private functions. |
|
22105 * kjs/property_map.cpp: |
|
22106 (KJS::PropertyMap::clear): Set sentinelCount to 0. |
|
22107 (KJS::PropertyMap::put): Complete search for the element before choosing to use the deleted-element sentinel. |
|
22108 Also keep sentinel count up to date when we destroy a sentinel by overwriting with a new added element. |
|
22109 (KJS::PropertyMap::expand): Added. Calls rehash with a size 2x the old size, or 16. |
|
22110 (KJS::PropertyMap::rehash): Added. Refactored the rehash code into a separate function. |
|
22111 (KJS::PropertyMap::remove): Add one to sentinelCount, and rehash if 1/4 or more of the elements are |
|
22112 deleted-element sentinels. |
|
22113 (KJS::PropertyMap::checkConsistency): Check the sentinelCount. |
|
22114 |
|
22115 2004-08-16 Maciej Stachowiak <mjs@apple.com> |
|
22116 |
|
22117 Code change by Eric Albert, reviewd by me. |
|
22118 |
|
22119 <rdar://problem/3571960> washingtonpost.com claims I don't have cookies enabled and won't let me read articles |
|
22120 |
|
22121 * kjs/date_object.cpp: |
|
22122 (timetUsingCF): Clamp time to LONG_MAX (getting rid of time_t |
|
22123 entirely would be even better, but is not required to fix this bug. |
|
22124 |
|
22125 === Safari-157 === |
|
22126 |
|
22127 2004-08-16 Richard Williamson <rjw@apple.com> |
|
22128 |
|
22129 Fixed <rdar://problem/3581092> cash in KJS::Bindings::JSObject::eval at tcvetantcvetkov.com |
|
22130 |
|
22131 Adds bullet proofing to protect against evaluation of bogus JS in all the flavors of bindings (Java, C, and ObjC). |
|
22132 |
|
22133 Reviewed by Chris. |
|
22134 |
|
22135 * bindings/NP_jsobject.cpp: |
|
22136 (NPN_Evaluate): |
|
22137 * bindings/jni/jni_jsobject.cpp: |
|
22138 (JSObject::eval): |
|
22139 * bindings/objc/WebScriptObject.mm: |
|
22140 (-[WebScriptObject evaluateWebScript:]): |
|
22141 |
|
22142 2004-08-15 Richard Williamson <rjw@apple.com> |
|
22143 |
|
22144 More updates to np headers. Implemented new NPN functions. |
|
22145 |
|
22146 Reviewed by Darin. |
|
22147 |
|
22148 * bindings/NP_jsobject.cpp: |
|
22149 (NPN_HasProperty): |
|
22150 (NPN_HasMethod): |
|
22151 * bindings/npapi.h: |
|
22152 * bindings/npruntime.h: |
|
22153 |
|
22154 2004-08-13 Darin Adler <darin@apple.com> |
|
22155 |
|
22156 - fix build so we can compile again |
|
22157 |
|
22158 * bindings/npapi.h: Added. Richard forgot to check this in. The one I'm checking in here |
|
22159 is good enough so that we can compile, but it's only a stopgap measure, because I think |
|
22160 Richard has a newer one he wants to check in. |
|
22161 |
|
22162 2004-08-12 Richard Williamson <rjw@apple.com> |
|
22163 |
|
22164 Bring npruntime.h and friends closer to compliance with |
|
22165 latest spec. |
|
22166 |
|
22167 Reviewed by Maciej. |
|
22168 |
|
22169 * JavaScriptCore.pbproj/project.pbxproj: |
|
22170 * bindings/NP_jsobject.cpp: |
|
22171 (jsAllocate): |
|
22172 (_NPN_CreateScriptObject): |
|
22173 (NPN_Call): |
|
22174 (NPN_Evaluate): |
|
22175 (NPN_GetProperty): |
|
22176 (NPN_SetProperty): |
|
22177 (NPN_RemoveProperty): |
|
22178 * bindings/NP_jsobject.h: |
|
22179 * bindings/c/c_instance.cpp: |
|
22180 (CInstance::invokeMethod): |
|
22181 * bindings/c/c_utility.cpp: |
|
22182 (convertNPVariantToValue): |
|
22183 * bindings/npruntime.cpp: |
|
22184 (NPN_IdentifierIsString): |
|
22185 (NPN_VariantIsVoid): |
|
22186 (NPN_VariantIsNull): |
|
22187 (NPN_VariantIsUndefined): |
|
22188 (NPN_VariantIsBool): |
|
22189 (NPN_VariantIsInt32): |
|
22190 (NPN_VariantIsDouble): |
|
22191 (NPN_VariantIsString): |
|
22192 (NPN_VariantIsObject): |
|
22193 (NPN_VariantToBool): |
|
22194 (NPN_VariantToString): |
|
22195 (NPN_VariantToInt32): |
|
22196 (NPN_VariantToDouble): |
|
22197 (NPN_VariantToObject): |
|
22198 (NPN_InitializeVariantAsVoid): |
|
22199 (NPN_InitializeVariantAsNull): |
|
22200 (NPN_InitializeVariantAsUndefined): |
|
22201 (NPN_InitializeVariantWithBool): |
|
22202 (NPN_InitializeVariantWithInt32): |
|
22203 (NPN_InitializeVariantWithDouble): |
|
22204 (NPN_InitializeVariantWithString): |
|
22205 (NPN_InitializeVariantWithStringCopy): |
|
22206 (NPN_InitializeVariantWithObject): |
|
22207 (NPN_InitializeVariantWithVariant): |
|
22208 (NPN_ReleaseVariantValue): |
|
22209 (NPN_CreateObject): |
|
22210 * bindings/npruntime.h: |
|
22211 (_NPString::): |
|
22212 (_NPString::_NPVariant::): |
|
22213 * bindings/npruntime_priv.h: Added. |
|
22214 |
|
22215 2004-08-12 Darin Adler <darin@apple.com> |
|
22216 |
|
22217 Reviewed by Adele. |
|
22218 |
|
22219 - fixed 3 problems with parse functions that I just wrote, fixing 3 more Mozilla JavaScript tests |
|
22220 |
|
22221 * kjs/function.cpp: |
|
22222 (KJS::parseDigit): Fix typo, 'Z' instead of 'z', that prevented lowercase hex digits from working. |
|
22223 (KJS::parseInt): Add octal support. Specification says it's optional, but I guess not. |
|
22224 (KJS::parseFloat): Fix check for "0x" in parseFloat to return 0 rather than NaN. Also add code |
|
22225 to skip leading "+" or "-". |
|
22226 |
|
22227 === Safari-156 === |
|
22228 |
|
22229 2004-08-12 Darin Adler <darin@apple.com> |
|
22230 |
|
22231 Reviewed by Ken. |
|
22232 |
|
22233 - fixed 43 Mozilla JavaScript tests |
|
22234 |
|
22235 * kjs/date_object.h: Change parseDate and timeClip to take and return doubles. |
|
22236 * kjs/date_object.cpp: |
|
22237 (DateObjectImp::construct): Change to use a timeClip function that takes and returns a double rather |
|
22238 than constructing a number object to pass to it. |
|
22239 (DateObjectFuncImp::call): Change to use a parseDate function that returns a double. |
|
22240 (KJS::parseDate): Change to return a double instead of creating the Number object here. |
|
22241 (KJS::timeClip): Implement this as specified in the language standard. |
|
22242 |
|
22243 * kjs/error_object.cpp: (NativeErrorImp::NativeErrorImp): Set the DontDelete, ReadOnly, and DontEnum |
|
22244 flags on the prototype property. |
|
22245 |
|
22246 * kjs/function.cpp: |
|
22247 (KJS::FunctionImp::get): Return null rather than undefined for arguments when the function is not |
|
22248 currently in scope. |
|
22249 (KJS::isStrWhiteSpace): Added. Matches specification for StrWhiteSpace. Could move it to some utility |
|
22250 file later. |
|
22251 (KJS::parseDigit): Added. Helper function for parseInt. |
|
22252 (KJS::parseInt): Added. Integer parser that puts result in a double so we're not limited to what |
|
22253 strtoll can handle. Also matches standard more closely. |
|
22254 (KJS::parseFloat): Added. Handles "0x" properly and passes flag to make empty string turn into NaN |
|
22255 instead of 0. |
|
22256 (KJS::GlobalFuncImp::call): Use the new parseInt and parseFloat. |
|
22257 |
|
22258 * kjs/function_object.cpp: (FunctionPrototypeImp::FunctionPrototypeImp): Add a length property. |
|
22259 |
|
22260 * kjs/lexer.h: Added error flag and sawError() function for detecting errors. |
|
22261 * kjs/lexer.cpp: |
|
22262 (Lexer::setCode): Clear error state. |
|
22263 (Lexer::lex): Set error state if the lexer encounters an error |
|
22264 |
|
22265 * kjs/internal.cpp: |
|
22266 (NumberImp::toString): Roll in change from KDE version to special case 0 so we handle -0 correctly. |
|
22267 (Parser::parse): Use new lexer error method so those errors are treated like parser errors. |
|
22268 |
|
22269 * kjs/math_object.cpp: (MathFuncImp::call): Change min and max to treat -0 as less than +0. |
|
22270 Change round to round values between -0.5 and -0 to -0 instead of +0. |
|
22271 |
|
22272 * kjs/nodes.h: Add evaluateReference function to GroupNode. |
|
22273 * kjs/nodes.cpp: (GroupNode::evaluateReference): Pass references through groups (parenthesized |
|
22274 expressions) properly so that expressions like "delete (x.y)" work. Before, the parentheses |
|
22275 would change x.y into a value that can't be deleted as a side effect. |
|
22276 |
|
22277 * kjs/string_object.cpp: Change parameter count for indexOf and lastIndexOf from 2 to 1 to match |
|
22278 the specification. |
|
22279 |
|
22280 * kjs/testkjs.cpp: Rolled in changes from KDE to add a "quit" function to the test tool and |
|
22281 get rid of the fixed size limit for code. |
|
22282 |
|
22283 * kjs/ustring.cpp: (KJS::UString::substr): Added optimized case for substr(0, length) so it just |
|
22284 returns the string without creating a new Rep, since I'm using substr in a place where it will |
|
22285 often be passed a 0. |
|
22286 |
|
22287 * tests/mozilla/ecma/String/15.5.4.11-1.js: Fixed one wrong entry in the Unicode table I added to |
|
22288 the other day that was making a couple tests fail. |
|
22289 * tests/mozilla/ecma/String/15.5.4.12-1.js: Ditto. |
|
22290 * tests/mozilla/ecma/String/15.5.4.12-2.js: Ditto. |
|
22291 * tests/mozilla/ecma/String/15.5.4.12-3.js: Ditto. |
|
22292 * tests/mozilla/ecma/String/15.5.4.12-4.js: Ditto. |
|
22293 * tests/mozilla/ecma/String/15.5.4.12-5.js: Ditto. |
|
22294 |
|
22295 * kjs/string_object.lut.h: Regenerated. |
|
22296 |
|
22297 2004-08-11 Darin Adler <darin@apple.com> |
|
22298 |
|
22299 - fixed a tiny problem with the UTF-16 PCRE check-in |
|
22300 |
|
22301 * pcre/maketables.c: (pcre_maketables): Fix mistake in table-generating code that sometimes caused |
|
22302 the ctype_meta flag to get set in items that should not have it. |
|
22303 |
|
22304 * pcre/chartables.c: Regenerated. |
|
22305 |
|
22306 2004-08-10 Richard Williamson <rjw@apple.com> |
|
22307 |
|
22308 Fixed <rdar://problem/3674747> Need to implement invokeUndefinedMethodFromWebScript:withArguments: |
|
22309 |
|
22310 The following WebScripting methods are now supported on bound |
|
22311 objects: |
|
22312 |
|
22313 - (id)invokeUndefinedMethodFromWebScript:(NSString *)name withArguments:(NSArray *)args; |
|
22314 - (void)setValue:(id)value forUndefinedKey:(NSString *)key |
|
22315 - (id)valueForUndefinedKey:(NSString *)key |
|
22316 |
|
22317 Reviewed by Chris. |
|
22318 |
|
22319 * bindings/c/c_class.cpp: |
|
22320 (CClass::fieldNamed): |
|
22321 * bindings/c/c_class.h: |
|
22322 * bindings/jni/jni_class.cpp: |
|
22323 (JavaClass::fieldNamed): |
|
22324 * bindings/jni/jni_class.h: |
|
22325 * bindings/objc/objc_class.h: |
|
22326 (KJS::Bindings::ObjcClass::isa): |
|
22327 * bindings/objc/objc_class.mm: |
|
22328 (ObjcClass::methodsNamed): |
|
22329 (ObjcClass::fieldNamed): |
|
22330 (ObjcClass::fallbackObject): |
|
22331 * bindings/objc/objc_instance.h: |
|
22332 * bindings/objc/objc_instance.mm: |
|
22333 (ObjcInstance::invokeMethod): |
|
22334 (ObjcInstance::setValueOfField): |
|
22335 (ObjcInstance::setValueOfUndefinedField): |
|
22336 (ObjcInstance::getValueOfField): |
|
22337 (ObjcInstance::getValueOfUndefinedField): |
|
22338 * bindings/objc/objc_runtime.h: |
|
22339 (KJS::Bindings::ObjcField::~ObjcField): |
|
22340 (KJS::Bindings::ObjcField::ObjcField): |
|
22341 (KJS::Bindings::ObjcField::operator=): |
|
22342 (KJS::Bindings::FallbackObjectImp::classInfo): |
|
22343 * bindings/objc/objc_runtime.mm: |
|
22344 (ObjcField::ObjcField): |
|
22345 (ObjcField::name): |
|
22346 (ObjcField::type): |
|
22347 (ObjcField::valueFromInstance): |
|
22348 (ObjcField::setValueToInstance): |
|
22349 (FallbackObjectImp::FallbackObjectImp): |
|
22350 (FallbackObjectImp::get): |
|
22351 (FallbackObjectImp::put): |
|
22352 (FallbackObjectImp::canPut): |
|
22353 (FallbackObjectImp::implementsCall): |
|
22354 (FallbackObjectImp::call): |
|
22355 (FallbackObjectImp::hasProperty): |
|
22356 (FallbackObjectImp::deleteProperty): |
|
22357 (FallbackObjectImp::defaultValue): |
|
22358 * bindings/runtime.h: |
|
22359 (KJS::Bindings::Class::fallbackObject): |
|
22360 (KJS::Bindings::Instance::getValueOfUndefinedField): |
|
22361 (KJS::Bindings::Instance::setValueOfUndefinedField): |
|
22362 * bindings/runtime_object.cpp: |
|
22363 (RuntimeObjectImp::get): |
|
22364 (RuntimeObjectImp::put): |
|
22365 (RuntimeObjectImp::canPut): |
|
22366 (RuntimeObjectImp::hasProperty): |
|
22367 * bindings/testbindings.mm: |
|
22368 (-[MyFirstInterface valueForUndefinedKey:]): |
|
22369 (-[MyFirstInterface setValue:forUndefinedKey:]): |
|
22370 |
|
22371 2004-08-10 Darin Adler <darin@apple.com> |
|
22372 |
|
22373 Reviewed by Dave. |
|
22374 |
|
22375 - switch PCRE to do UTF-16 directly instead of converting to/from UTF-8 for speed |
|
22376 |
|
22377 * pcre/pcre.h: Added PCRE_UTF16 switch, set to 1. Added pcre_char typedef, which is char |
|
22378 or uint16_t depending on the mode, and used appropriate in the 7 public functions |
|
22379 that need to use it. |
|
22380 * pcre/pcre.c: Add UTF-16 support to all functions. |
|
22381 * pcre/study.c: Ditto. |
|
22382 |
|
22383 * pcre/internal.h: Added ichar typedef, which is unsigned char or uint16_t depending on |
|
22384 the mode. Changed declarations to use symbolic constants and typedefs so we size |
|
22385 things to ichar when needed. |
|
22386 |
|
22387 * pcre/maketables.c: (pcre_maketables): Change code to make tables that are |
|
22388 sized to 16-bit characters instead of 8-bit. |
|
22389 |
|
22390 * pcre/get.c: |
|
22391 (pcre_copy_substring): Use pcre_char instead of char. |
|
22392 (pcre_get_substring_list): Ditto. |
|
22393 (pcre_free_substring_list): Ditto. |
|
22394 (pcre_get_substring): Ditto. |
|
22395 (pcre_free_substring): Ditto. |
|
22396 |
|
22397 * pcre/dftables.c: (main): Used a bit more const, and use ICHAR sizes instead |
|
22398 of hard-coding 8-bit table sizes. |
|
22399 |
|
22400 * pcre/chartables.c: Regenerated. |
|
22401 |
|
22402 * kjs/ustring.h: Remove functions that convert UTF-16 to/from UTF-8 offsets. |
|
22403 * kjs/ustring.cpp: Change the shared empty string to have a unicode pointer that |
|
22404 is not null. The null string still has a null pointer. This prevents us from |
|
22405 passing a null through to the regular expression engine (which results in a null |
|
22406 error even when the string length is 0). |
|
22407 |
|
22408 * kjs/regexp.cpp: |
|
22409 (KJS::RegExp::RegExp): Null-terminate the pattern and pass it. |
|
22410 (KJS::RegExp::match): Use the 16-bit string directly, no need to convert to UTF-8. |
|
22411 |
|
22412 2004-08-09 Darin Adler <darin@apple.com> |
|
22413 |
|
22414 Reviewed by Maciej. |
|
22415 |
|
22416 - fixed 28 Mozilla JavaScript tests |
|
22417 |
|
22418 * kjs/array_object.cpp: (ArrayProtoFuncImp::call): Check for undefined rather than |
|
22419 checking the number of arguments for the join method. |
|
22420 |
|
22421 * kjs/lexer.cpp: (Lexer::lex): Parse hexadecimal and octal constants in doubles rather |
|
22422 than integers, so we aren't limited to 32 bits. |
|
22423 |
|
22424 * kjs/math_object.cpp: (MathFuncImp::call): Get rid of many unneeded special cases in |
|
22425 the implementation of the pow operation. Also simplied a case that was handling positive |
|
22426 and negative infinity separately. |
|
22427 |
|
22428 * kjs/nodes.cpp: (ShiftNode::evaluate): Keep the result of shifts in a double instead of |
|
22429 putting them in a long, so that unsigned shift will work properly. |
|
22430 |
|
22431 * kjs/number_object.cpp: Add the DontDelete and ReadOnly flags to the numeric constants. |
|
22432 |
|
22433 * kjs/operations.cpp: |
|
22434 (KJS::isPosInf): Added an implementation inside APPLE_CHANGES that does not depend on the |
|
22435 sign of isinf; our isinf function returns +1 even for negative infinity. |
|
22436 (KJS::isNegInf): And again. |
|
22437 (KJS::relation): Put in a nice simple implementation of comparison inside APPLE_CHANGES. |
|
22438 Our floating point already handles the various infinity cases correctly. |
|
22439 |
|
22440 * kjs/regexp_object.cpp: |
|
22441 (RegExpProtoFuncImp::call): Add missing return before Null() in Exec method. |
|
22442 (RegExpObjectImp::arrayOfMatches): Put undefined rather than an empty string into the |
|
22443 array in cases where we did not match. |
|
22444 (RegExpObjectImp::construct): Set the DontDelete, ReadOnly, and DontEnum flags for |
|
22445 "global", "ignoreCase", "multiline", and "source". |
|
22446 |
|
22447 * kjs/string_object.cpp: (StringProtoFuncImp::call): For the match method, turn a null |
|
22448 string into undefined rather than an empty string. For the slice method, handle an |
|
22449 undefined parameter for the limit properly as decribed in the specification, and add |
|
22450 the limit to one case that didn't have the limit at all. For the methods that generate |
|
22451 HTML strings, use lowercase tags instead of uppercase. |
|
22452 |
|
22453 * kjs/ustring.cpp: |
|
22454 (KJS::UChar::toLower): Use u_tolower from the ICU library. |
|
22455 (KJS::UChar::toUpper): Use u_toupper from the ICU library. |
|
22456 (KJS::UString::append): Fix some math that caused a buffer overflow. |
|
22457 (KJS::convertUTF16OffsetsToUTF8Offsets): Ignore negative numbers (-1 is used as a special |
|
22458 flag) rather than converting them all to 0. |
|
22459 (KJS::convertUTF8OffsetsToUTF16Offsets): Ditto. |
|
22460 |
|
22461 * tests/mozilla/jsDriver.pl: Fixed the relative links to point to our actual test files. |
|
22462 |
|
22463 * tests/mozilla/ecma/String/15.5.4.11-1.js: Fixed the Unicode table in this test to match |
|
22464 the Unicode specification in a few cases where it was wrong before. |
|
22465 * tests/mozilla/ecma/String/15.5.4.11-2.js: Ditto. |
|
22466 * tests/mozilla/ecma/String/15.5.4.11-3.js: Ditto. |
|
22467 * tests/mozilla/ecma/String/15.5.4.11-5.js: Ditto. |
|
22468 * tests/mozilla/ecma/String/15.5.4.11-6.js: Ditto. |
|
22469 * tests/mozilla/ecma/String/15.5.4.12-1.js: Ditto. |
|
22470 * tests/mozilla/ecma/String/15.5.4.12-2.js: Ditto. |
|
22471 * tests/mozilla/ecma/String/15.5.4.12-3.js: Ditto. |
|
22472 * tests/mozilla/ecma/String/15.5.4.12-4.js: Ditto. |
|
22473 * tests/mozilla/ecma/String/15.5.4.12-5.js: Ditto. |
|
22474 |
|
22475 * JavaScriptCore.pbproj/project.pbxproj: Link to libicu. |
|
22476 |
|
22477 * kjs/number_object.lut.h: Regenerated. |
|
22478 |
|
22479 2004-08-09 Darin Adler <darin@apple.com> |
|
22480 |
|
22481 Reviewed by Maciej. |
|
22482 |
|
22483 - fixed <rdar://problem/3753467> REGRESSION (137-138): reproducible buffer overrun in UString manipulation code |
|
22484 |
|
22485 * kjs/ustring.cpp: (KJS::UString::append): Fix incorrect size computation. Without it |
|
22486 we get a buffer overflow. |
|
22487 |
|
22488 === Safari-155 === |
|
22489 |
|
22490 2004-08-05 Richard Williamson <rjw@apple.com> |
|
22491 |
|
22492 Fixed part of 3674747. The QT guys need this for feature freeze. |
|
22493 |
|
22494 This patch implements support for the |
|
22495 |
|
22496 - (id)invokeUndefinedMethodFromWebScript:(NSString *)name withArguments:(NSArray *)args |
|
22497 |
|
22498 method of objects bound to JavaScript. |
|
22499 |
|
22500 Reviewed by John. |
|
22501 |
|
22502 * ChangeLog: |
|
22503 * bindings/objc/objc_class.mm: |
|
22504 (ObjcClass::methodsNamed): |
|
22505 (ObjcClass::fieldNamed): |
|
22506 * bindings/objc/objc_instance.mm: |
|
22507 (ObjcInstance::invokeMethod): |
|
22508 * bindings/objc/objc_runtime.h: |
|
22509 (KJS::Bindings::ObjcMethod::~ObjcMethod): |
|
22510 (KJS::Bindings::ObjcMethod::isFallbackMethod): |
|
22511 (KJS::Bindings::ObjcMethod::javaScriptName): |
|
22512 * bindings/objc/objc_runtime.mm: |
|
22513 (ObjcMethod::ObjcMethod): |
|
22514 (ObjcMethod::getMethodSignature): |
|
22515 (ObjcMethod::setJavaScriptName): |
|
22516 * bindings/testbindings.mm: |
|
22517 |
|
22518 2004-08-04 Vicki Murley <vicki@apple.com> |
|
22519 |
|
22520 Reviewed by mjs. |
|
22521 |
|
22522 - fix <rdar://problem/3649789> SAP WebGUI has problems loading first page because of parse error |
|
22523 |
|
22524 * kjs/lexer.cpp: |
|
22525 (Lexer::lex): if the current character is a '\' and the next character is a line terminator, |
|
22526 go to the next line and continue parsing the string (instead of failing). This matches |
|
22527 behavior in Mac IE and Mozilla. |
|
22528 |
|
22529 2004-08-03 Kevin Decker <kdecker@apple.com> |
|
22530 |
|
22531 Reviewed by Darin. |
|
22532 |
|
22533 Rolled in changes from the latest KJS sources that support additional |
|
22534 Number.prototype functions. |
|
22535 |
|
22536 Specifically this patch covers the follow parts of the ECMA 3 spec: |
|
22537 15.7.4.5, 15.7.4.6, and 15.7.4.7 |
|
22538 |
|
22539 Fixes: |
|
22540 <rdar://problem/3663716> missing Number.toFixed (and toPrecision, toExponential) |
|
22541 <rdar://problem/3749492> missing Number.toPrecision prototype implementation |
|
22542 <rdar://problem/3749591> missing Number.toExponential prototype implementation |
|
22543 |
|
22544 * kjs/identifier.h: Added toFixed, toPrecision, and toExponential to the |
|
22545 list of supported identifiers (a macro). |
|
22546 * kjs/number_object.cpp: Implemented support for toFixed(), toPrecision(), |
|
22547 and toExponential(). |
|
22548 (NumberPrototypeImp::NumberPrototypeImp): |
|
22549 (NumberProtoFuncImp::call): |
|
22550 * kjs/number_object.h: Added property names for toFixed, toPrecision, |
|
22551 and toExponential. |
|
22552 (KJS::NumberProtoFuncImp::): |
|
22553 * tests/mozilla/expected.html: Update results. |
|
22554 |
|
22555 2004-08-03 Darin Adler <darin@apple.com> |
|
22556 |
|
22557 Reviewed by Ken. |
|
22558 |
|
22559 - added support for copying RegExp objects so 7 more Mozilla regexp tests pass |
|
22560 |
|
22561 * kjs/regexp_object.cpp: (RegExpObjectImp::construct): Check for case where |
|
22562 we are supposed to just copy the regular expression object, and do so. |
|
22563 Also tighten up arguments check to handle case where an actual "undefined" |
|
22564 is passed rather than just omitting an argument. |
|
22565 |
|
22566 * tests/mozilla/expected.html: Update results. |
|
22567 |
|
22568 2004-08-02 Darin Adler <darin@apple.com> |
|
22569 |
|
22570 * tests/mozilla/.cvsignore: Added. |
|
22571 * tests/mozilla/expected.html: Update results. |
|
22572 |
|
22573 2004-08-02 Darin Adler <darin@apple.com> |
|
22574 |
|
22575 Reviewed by Ken. |
|
22576 |
|
22577 - fixed RegExp.toString so 3 more Mozilla regexp tests pass |
|
22578 |
|
22579 * kjs/regexp_object.cpp: (RegExpProtoFuncImp::call): |
|
22580 Append the flags here so more tests paseed. |
|
22581 |
|
22582 2004-08-02 Darin Adler <darin@apple.com> |
|
22583 |
|
22584 Reviewed by Ken. |
|
22585 |
|
22586 - fixed a couple things making 5 Mozilla regexp tests pass |
|
22587 |
|
22588 * kjs/regexp_object.cpp: (RegExpProtoFuncImp::call): Implement toString |
|
22589 for the prototype. |
|
22590 (RegExpObjectImp::construct): Fix bug where the string "undefined" would |
|
22591 be used as the flags string when no parameter was passed. |
|
22592 |
|
22593 * kjs/regexp_object.h: (KJS::RegExpPrototypeImp::classInfo): |
|
22594 Added a class info object for RegExp prototype so it can return |
|
22595 a string instead of raising an exception when converting to a string. |
|
22596 |
|
22597 * tests/mozilla/expected.html: Update results. |
|
22598 |
|
22599 2004-08-02 Darin Adler <darin@apple.com> |
|
22600 |
|
22601 Reviewed by Kevin. |
|
22602 |
|
22603 - fix crashes in mozilla tests due to mishandling NaN |
|
22604 |
|
22605 * kjs/array_object.cpp: (ArrayProtoFuncImp::call): Rerranged range checks after |
|
22606 calls to toInteger so that NaN will get turned into something that fits in an integer. |
|
22607 These were the ones John already fixed, but his fix used isnan and the new fix is |
|
22608 more efficient. |
|
22609 |
|
22610 * kjs/number_object.cpp: (NumberProtoFuncImp::call): Rearranged radix range checks |
|
22611 after a call to toInteger to handle NaN properly. Also removed separate check |
|
22612 for undefined that's not needed. |
|
22613 |
|
22614 * kjs/string_object.cpp: (StringProtoFuncImp::call): More of the same kinds of changes |
|
22615 as in the above two files, but for a lot more functions. Also changed one place with |
|
22616 an explicit check for undefined to instead just check isNaN. |
|
22617 |
|
22618 * tests/mozilla/run-mozilla-tests: Changed to invoke jst using $SYMROOTS for people |
|
22619 like me who don't keep $SYMROOTS in their $PATH. |
|
22620 |
|
22621 === Safari-154 === |
|
22622 |
|
22623 === Safari-153 === |
|
22624 |
|
22625 2004-07-26 Kevin Decker <kdecker@apple.com> |
|
22626 |
|
22627 Changes done by Darin, reviewed by Kevin. |
|
22628 |
|
22629 - changed testkjs to build in Xcode rather than from Makefile |
|
22630 |
|
22631 * .cvsignore: Removed obsolete files from this list. |
|
22632 * Makefile.am: Removed code to build testkjs; we do this in Xcode now. |
|
22633 Changed to build target "All" rather than default target. This makes us |
|
22634 build the testkjs test tool. |
|
22635 * dummy.cpp: Removed. |
|
22636 * kjs/.cvsignore: Removed obsolete files from this list, including |
|
22637 the testkjs tool, which is now built in the symroots directory. |
|
22638 * kjs/testkjs.cpp: Added copyright notice that was missing, since we have |
|
22639 changed this file. Also this has the nice side effect of causing the tool |
|
22640 to be rebuilt in the new location even if there are no other changes in |
|
22641 your tree when you check this out. |
|
22642 * tests/mozilla/run-mozilla-tests: Invoke perl explicitly so this works |
|
22643 without setting the execute bit on jsDriver.pl. |
|
22644 |
|
22645 2004-07-22 Kevin Decker <kdecker@apple.com> |
|
22646 |
|
22647 Reviewed by Darin |
|
22648 |
|
22649 Fixed <rdar://problem/3682340> (error console does not include source urls or line numbers of event exceptions). |
|
22650 |
|
22651 * kjs/function_object.cpp: |
|
22652 (FunctionObjectImp::construct): |
|
22653 * kjs/function_object.h: |
|
22654 * kjs/object.cpp: |
|
22655 (KJS::ObjectImp::construct): |
|
22656 * kjs/object.h: |
|
22657 (KJS::Object::construct): |
|
22658 |
|
22659 2004-07-21 Darin Adler <darin@apple.com> |
|
22660 |
|
22661 * bindings/npruntime.h: Fixed typo. |
|
22662 |
|
22663 2004-07-19 John Sullivan <sullivan@apple.com> |
|
22664 |
|
22665 Reviewed by Maciej. |
|
22666 |
|
22667 - bulletproofed array.slice() against NAN arguments. Harri noticed this |
|
22668 vulnerability in my patch for 3714644 |
|
22669 |
|
22670 * kjs/array_object.cpp: |
|
22671 (ArrayProtoFuncImp::call): |
|
22672 handle NAN parameters passed to slice() by clamping to 0 and length. |
|
22673 |
|
22674 2004-07-19 Richard Williamson <rjw@apple.com> |
|
22675 |
|
22676 Fixed 3733349. Prevent Java applet callbacks into JavaScript after applet |
|
22677 has been destroyed. |
|
22678 |
|
22679 Reviewed by John. |
|
22680 |
|
22681 * bindings/jni/jni_jsobject.cpp: |
|
22682 (JSObject::invoke): |
|
22683 (JSObject::JSObject): |
|
22684 |
|
22685 2004-07-16 John Sullivan <sullivan@apple.com> |
|
22686 |
|
22687 Reviewed by Maciej. |
|
22688 |
|
22689 - fixed <rdar://problem/3714644> REGRESSION (125.8-146): bugzilla submit link |
|
22690 hangs browser with javascript |
|
22691 |
|
22692 * kjs/array_object.cpp: |
|
22693 (ArrayProtoFuncImp::call): |
|
22694 Check for undefined type for args[0] the same way we were already checking |
|
22695 for args[1]. In this case, args was zero-length, but we were treating |
|
22696 args[0] like an integer anyway. Resulted in some code looping from a NAN |
|
22697 value to 4, taking approximately forever. |
|
22698 |
|
22699 * JavaScriptCore.pbproj/project.pbxproj: |
|
22700 version wars |
|
22701 |
|
22702 === Safari-152 === |
|
22703 |
|
22704 2004-07-14 Maciej Stachowiak <mjs@apple.com> |
|
22705 |
|
22706 Reviewed by John. |
|
22707 |
|
22708 <rdar://problem/3711474>: (REGRESSION (125-146): JavaScript 'toString(16)' is broken) |
|
22709 <rdar://problem/3644873>: (REGRESSION (125-140u): secondary list doesn't fill in at Southwest.com) |
|
22710 |
|
22711 * kjs/number_object.cpp: |
|
22712 (NumberProtoFuncImp::call): Initialize radix from dradix, not from itself! |
|
22713 |
|
22714 2004-07-13 Kevin Decker <kdecker@apple.com> |
|
22715 |
|
22716 Reviewed by kocienda. |
|
22717 |
|
22718 - made testkjs and JavaScriptCore a subtarget of 'All' |
|
22719 - testkjs now builds in $SYMROOTS |
|
22720 |
|
22721 * JavaScriptCore.pbproj/project.pbxproj: |
|
22722 |
|
22723 === Safari-151 === |
|
22724 |
|
22725 2004-06-24 Chris Blumenberg <cblu@apple.com> |
|
22726 |
|
22727 Ignore .mode1 files in JavaScriptCore.pbproj |
|
22728 |
|
22729 Reviewed by kocienda. |
|
22730 |
|
22731 * JavaScriptCore.pbproj/.cvsignore: |
|
22732 |
|
22733 2004-06-23 Richard Williamson <rjw@apple.com> |
|
22734 |
|
22735 Implemented changes for latest npruntime.h. |
|
22736 |
|
22737 Reviewed by Chris. |
|
22738 |
|
22739 * JavaScriptCore.pbproj/project.pbxproj: |
|
22740 * bindings/NP_jsobject.cpp: |
|
22741 (listFromVariantArgs): |
|
22742 (identiferFromNPIdentifier): |
|
22743 (_NPN_CreateScriptObject): |
|
22744 (NPN_Call): |
|
22745 (NPN_Evaluate): |
|
22746 (NPN_GetProperty): |
|
22747 (NPN_SetProperty): |
|
22748 (NPN_RemoveProperty): |
|
22749 * bindings/NP_jsobject.h: |
|
22750 * bindings/c/c_class.cpp: |
|
22751 (CClass::methodsNamed): |
|
22752 (CClass::fieldNamed): |
|
22753 * bindings/c/c_instance.cpp: |
|
22754 (CInstance::invokeMethod): |
|
22755 * bindings/c/c_utility.cpp: |
|
22756 (convertNPVariantToValue): |
|
22757 * bindings/c/c_utility.h: |
|
22758 * bindings/npruntime.cpp: |
|
22759 (stringIdentifierEqual): |
|
22760 (stringIdentifierHash): |
|
22761 (getStringIdentifierDictionary): |
|
22762 (intIdentifierEqual): |
|
22763 (intIdentifierHash): |
|
22764 (getIntIdentifierDictionary): |
|
22765 (NPN_GetStringIdentifier): |
|
22766 (NPN_GetStringIdentifiers): |
|
22767 (NPN_GetIntIdentifier): |
|
22768 (NPN_IdentifierIsString): |
|
22769 (NPN_UTF8FromIdentifier): |
|
22770 (NPN_VariantToInt32): |
|
22771 (NPN_VariantToDouble): |
|
22772 (NPN_SetException): |
|
22773 * bindings/npruntime.h: |
|
22774 * bindings/objc/WebScriptObject.mm: |
|
22775 (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]): |
|
22776 * bindings/runtime_object.cpp: |
|
22777 (RuntimeObjectImp::~RuntimeObjectImp): |
|
22778 * bindings/runtime_root.cpp: |
|
22779 (KJS::Bindings::rootForInterpreter): |
|
22780 * bindings/testbindings.cpp: |
|
22781 (initializeIdentifiers): |
|
22782 (logMessage): |
|
22783 (setDoubleValue): |
|
22784 (setIntValue): |
|
22785 (setBooleanValue): |
|
22786 |
|
22787 === JavaScriptCore-146.1 === |
|
22788 |
|
22789 2004-06-16 Richard Williamson <rjw@apple.com> |
|
22790 |
|
22791 Fixed <rdar://problem/3702287> Crash returning nil from bound ObjC |
|
22792 |
|
22793 This turned out to be a show stopper for Dashboard. Accessing a nil |
|
22794 ObjC property from JS caused a crash. Similar to the problem |
|
22795 3696112 fixed below. |
|
22796 |
|
22797 Reviewed by Trey. |
|
22798 |
|
22799 * bindings/objc/objc_runtime.mm: |
|
22800 (KJS::Bindings::ObjcField::valueFromInstance): |
|
22801 |
|
22802 === Safari-146 === |
|
22803 |
|
22804 2004-06-16 Richard Williamson <rjw@apple.com> |
|
22805 |
|
22806 Fixed <rdar://problem/3696112>: nil from an Objective-C class seems to get wrapped as a JavaScript proxy that will not print. |
|
22807 |
|
22808 This turned out to be a show stopper for Dashboard. We now |
|
22809 return Undefined() when nil is returned from a ObjC method |
|
22810 that returns an object type. |
|
22811 |
|
22812 Reviewed by Maciej. |
|
22813 |
|
22814 * bindings/objc/objc_utility.mm: |
|
22815 (KJS::Bindings::convertObjcValueToValue): |
|
22816 |
|
22817 === Safari-145 === |
|
22818 |
|
22819 2004-06-15 Richard Williamson <rjw@apple.com> |
|
22820 |
|
22821 Fixed <rdar://problem/3695875>: Objective-C instances that are exported to JavaScript are too promiscuous |
|
22822 |
|
22823 No longer need to check respondsToSelector: for |
|
22824 isSelectorExcludedFromWebScript: and isKeyExcludedFromWebScript: |
|
22825 because these now have a default implementation on NSObject. |
|
22826 |
|
22827 Reviewed by Trey. |
|
22828 |
|
22829 * bindings/objc/objc_class.mm: |
|
22830 (ObjcClass::methodsNamed): |
|
22831 (ObjcClass::fieldNamed): |
|
22832 |
|
22833 2004-06-14 Darin Adler <darin@apple.com> |
|
22834 |
|
22835 Reviewed by Maciej. |
|
22836 |
|
22837 - fixed some things for GC that Patrick missed, or that happened after the branch |
|
22838 |
|
22839 * bindings/objc/WebScriptObject.mm: |
|
22840 (-[WebScriptObject dealloc]): Moved removeNativeReference call here from private object. |
|
22841 (-[WebScriptObject finalize]): Added. |
|
22842 |
|
22843 - added some missing nil checks |
|
22844 |
|
22845 * bindings/objc/objc_instance.mm: |
|
22846 (ObjcInstance::ObjcInstance): Check for nil. |
|
22847 (ObjcInstance::~ObjcInstance): Check for nil. |
|
22848 (ObjcInstance::operator=): Check for nil. |
|
22849 |
|
22850 2004-06-14 Darin Adler <darin@apple.com> |
|
22851 |
|
22852 Reviewed by me, code changes by Patrick Beard. |
|
22853 |
|
22854 - fixed <rdar://problem/3671507>: (WebKit should adopt GC changes and compile with GC enabled) |
|
22855 |
|
22856 * bindings/objc/objc_instance.mm: |
|
22857 (ObjcInstance::ObjcInstance): Use CFRetain instead of retain. |
|
22858 (ObjcInstance::~ObjcInstance): Use CFRelease instead of release. |
|
22859 (ObjcInstance::operator=): More of the same. |
|
22860 (ObjcInstance::end): Use [pool drain] if compiling on Tiger. |
|
22861 |
|
22862 * bindings/objc/objc_runtime.mm: |
|
22863 (ObjcArray::ObjcArray): Use CFRetain instead of retain. |
|
22864 (ObjcArray::~ObjcArray): Use CFRelease instead of release. |
|
22865 (ObjcArray::operator=): More of the same. |
|
22866 |
|
22867 * bindings/testbindings.mm: Fixed incorrect license. |
|
22868 (main): Use [pool drain] if compiling on Tiger. |
|
22869 |
|
22870 === Safari-144 === |
|
22871 |
|
22872 2004-06-10 Kevin Decker <kdecker@apple.com> |
|
22873 |
|
22874 Reviewed by John. |
|
22875 |
|
22876 * kjs/lexer.cpp: |
|
22877 (Lexer::setCode): |
|
22878 - fixed <rdar://problem/3682398>: (error console line numbers are offset by 1) |
|
22879 * kjs/lexer.h: |
|
22880 (KJS::Lexer::lineNo): |
|
22881 - fixed <rdar://problem/3682398>: (error console line numbers are offset by 1) |
|
22882 |
|
22883 === JavaScriptCore-143.2 === |
|
22884 |
|
22885 2004-06-07 Darin Adler <darin@apple.com> |
|
22886 |
|
22887 - fixed <rdar://problem/3682489>: (JavaScriptGlue no longer compiles because Interpreter::evaluate parameters changed) |
|
22888 |
|
22889 * kjs/interpreter.h: Added an overload to make JavaScriptGlue compile. |
|
22890 * kjs/interpreter.cpp: (KJS::Interpreter::evaluate): Implemented the overload. |
|
22891 |
|
22892 === JavaScriptCore-143.1 === |
|
22893 |
|
22894 2004-06-04 Kevin Decker <kdecker@apple.com> |
|
22895 |
|
22896 Reviewed by Darin |
|
22897 |
|
22898 - fixed <rdar://problem/3680594> |
|
22899 |
|
22900 * kjs/object.cpp: |
|
22901 (KJS::Error::create): |
|
22902 |
|
22903 === Safari-143 === |
|
22904 |
|
22905 2004-06-04 Darin Adler <darin@apple.com> |
|
22906 |
|
22907 * kjs/testkjs.cpp: (main): Fix build breakage by adding URL and line number parameters. |
|
22908 |
|
22909 2004-06-04 Kevin Decker <kdecker@apple.com> |
|
22910 |
|
22911 Reviewed by Dave. |
|
22912 |
|
22913 - ObjC bindings do not (yet) pass along sourceurl or line numbers |
|
22914 - we don't have a way as of yet to accomidate line numbers and urls for dynamic javascript |
|
22915 - changed the wording of an error message |
|
22916 - the lexer, parser, and interpreter have been made "sourceURL aware" |
|
22917 - stored the url into Error |
|
22918 |
|
22919 * bindings/NP_jsobject.cpp: |
|
22920 (NPN_Evaluate): |
|
22921 * bindings/jni/jni_jsobject.cpp: |
|
22922 (JSObject::eval): |
|
22923 * bindings/objc/WebScriptObject.mm: |
|
22924 (-[WebScriptObject evaluateWebScript:]): |
|
22925 * kjs/function.cpp: |
|
22926 (GlobalFuncImp::call): |
|
22927 * kjs/function_object.cpp: |
|
22928 (FunctionObjectImp::construct): |
|
22929 * kjs/internal.cpp: |
|
22930 (Parser::parse): |
|
22931 (InterpreterImp::checkSyntax): |
|
22932 (InterpreterImp::evaluate): |
|
22933 * kjs/internal.h: |
|
22934 * kjs/interpreter.cpp: |
|
22935 (Interpreter::evaluate): |
|
22936 * kjs/interpreter.h: |
|
22937 * kjs/lexer.cpp: |
|
22938 (Lexer::setCode): |
|
22939 * kjs/lexer.h: |
|
22940 (KJS::Lexer::sourceURL): |
|
22941 * kjs/nodes.cpp: |
|
22942 (Node::Node): |
|
22943 (Node::throwError): |
|
22944 (FunctionCallNode::evaluate): |
|
22945 * kjs/nodes.h: |
|
22946 * kjs/object.cpp: |
|
22947 (KJS::Error::create): |
|
22948 * kjs/object.h: |
|
22949 |
|
22950 2004-06-04 Richard Williamson <rjw@apple.com> |
|
22951 |
|
22952 Fixed crash when attempting to access properties on nil |
|
22953 object. |
|
22954 |
|
22955 Reviewed by John. |
|
22956 |
|
22957 * bindings/objc/objc_instance.mm: |
|
22958 (ObjcInstance::getClass): |
|
22959 * bindings/runtime_object.cpp: |
|
22960 (RuntimeObjectImp::get): |
|
22961 * bindings/testM.js: |
|
22962 * bindings/testbindings.mm: |
|
22963 (-[MyFirstInterface getString]): |
|
22964 |
|
22965 2004-05-27 Kevin Decker <kdecker@apple.com> |
|
22966 |
|
22967 Reviewed by Ken. |
|
22968 |
|
22969 -revised generated error message content |
|
22970 |
|
22971 * kjs/error_object.cpp: |
|
22972 (ErrorProtoFuncImp::call): |
|
22973 * kjs/internal.cpp: |
|
22974 (Parser::parse): |
|
22975 * kjs/object.cpp: |
|
22976 (KJS::Error::create): |
|
22977 |
|
22978 === Safari-142 === |
|
22979 |
|
22980 2004-05-27 Richard Williamson <rjw@apple.com> |
|
22981 |
|
22982 Renamed WebScriptMethods to WebScripting based on feedback from Nancy. |
|
22983 |
|
22984 Reviewed by Chris. |
|
22985 |
|
22986 * bindings/objc/WebScriptObject.h: |
|
22987 |
|
22988 2004-05-27 Darin Adler <darin@apple.com> |
|
22989 |
|
22990 Reviewed by Maciej. |
|
22991 |
|
22992 - moved to new symlink technique for embedding frameworks |
|
22993 |
|
22994 * JavaScriptCore.pbproj/project.pbxproj: Get rid of embed-frameworks build step |
|
22995 because we don't need it any more. |
|
22996 |
|
22997 2004-05-24 Richard Williamson <rjw@apple.com> |
|
22998 |
|
22999 Changed RuntimeArrayImp to inherit from ArrayInstanceImp and |
|
23000 fixed ClassInfo to correctly reflect inheritance. This is required |
|
23001 because of the runtime checks in JSC for arrays, i.e. in |
|
23002 the Function objects apply method. |
|
23003 |
|
23004 Reviewed by Ken. |
|
23005 |
|
23006 * bindings/jni/jni_runtime.cpp: |
|
23007 (JavaArray::convertJObjectToArray): |
|
23008 * bindings/objc/objc_utility.mm: |
|
23009 (KJS::Bindings::convertObjcValueToValue): |
|
23010 * bindings/runtime_array.cpp: |
|
23011 (RuntimeArrayImp::RuntimeArrayImp): |
|
23012 * bindings/runtime_array.h: |
|
23013 * bindings/testM.js: Added. |
|
23014 * bindings/testbindings.mm: |
|
23015 (+[MyFirstInterface webScriptNameForSelector:]): |
|
23016 (-[MyFirstInterface logMessages:]): |
|
23017 (-[MyFirstInterface logMessage:prefix:]): |
|
23018 (-[MyFirstInterface callJSObject::]): |
|
23019 |
|
23020 2004-05-22 Darin Adler <darin@apple.com> |
|
23021 |
|
23022 Reviewed by Maciej. |
|
23023 |
|
23024 - fixed <rdar://problem/3664260>: (JS needs to listen to timezone change notifications) |
|
23025 |
|
23026 * kjs/date_object.cpp: (CopyLocalTimeZone): As per Chris Kane and Jordan Hubbard, use <notify.h> |
|
23027 with a hardcoded string of "com.apple.system.timezone", and do CFTimeZoneResetSystem since |
|
23028 CoreFoundation doesn't do this itself. Turns out this affects the default time zone as long as |
|
23029 it hasn't been set explicitly. |
|
23030 |
|
23031 === Safari-141 === |
|
23032 |
|
23033 2004-05-20 Richard Williamson <rjw@apple.com> |
|
23034 |
|
23035 Implemented WebScriptObject/DOM wrapper voodoo. DOM wrappers |
|
23036 can now be referenced like any other WebScriptObject, meaning |
|
23037 you can do JS operations on them. |
|
23038 |
|
23039 All added implementation of finalizeForWebScript. |
|
23040 |
|
23041 Reviewed by Ken. |
|
23042 |
|
23043 * bindings/objc/WebScriptObject.h: |
|
23044 * bindings/objc/WebScriptObject.mm: |
|
23045 (-[WebScriptObject _initializeWithObjectImp:KJS::root:Bindings::]): |
|
23046 (-[WebScriptObject _initWithObjectImp:KJS::root:Bindings::]): |
|
23047 (-[WebScriptObject KJS::]): |
|
23048 (-[WebScriptObject dealloc]): |
|
23049 (-[WebScriptObject callWebScriptMethod:withArguments:]): |
|
23050 (-[WebScriptObject evaluateWebScript:]): |
|
23051 (-[WebScriptObject setValue:forKey:]): |
|
23052 (-[WebScriptObject valueForKey:]): |
|
23053 (-[WebScriptObject stringRepresentation]): |
|
23054 * bindings/objc/WebScriptObjectPrivate.h: |
|
23055 * bindings/objc/objc_instance.mm: |
|
23056 (ObjcInstance::~ObjcInstance): |
|
23057 |
|
23058 2004-05-19 Richard Williamson <rjw@apple.com> |
|
23059 |
|
23060 Removed extraneous tabs that were added (by XCode?). |
|
23061 |
|
23062 * bindings/objc/WebScriptObject.h: |
|
23063 |
|
23064 2004-05-19 Darin Adler <darin@apple.com> |
|
23065 |
|
23066 - fixed headers with licenses mangled by Xcode auto-indenting |
|
23067 |
|
23068 * bindings/jni/jni_jsobject.cpp: |
|
23069 * bindings/jni/jni_jsobject.h: |
|
23070 * bindings/runtime_array.h: |
|
23071 * bindings/runtime_root.cpp: |
|
23072 * bindings/runtime_root.h: |
|
23073 |
|
23074 2004-05-18 Richard Williamson <rjw@apple.com> |
|
23075 |
|
23076 Added exception logging. Also check for exception and |
|
23077 set results as appropriate. |
|
23078 |
|
23079 Reviewed by Maciej (partially reviewed). |
|
23080 |
|
23081 * bindings/objc/WebScriptObject.mm: |
|
23082 (-[WebScriptObject callWebScriptMethod:withArguments:]): |
|
23083 (-[WebScriptObject evaluateWebScript:]): |
|
23084 (-[WebScriptObject setValue:forKey:]): |
|
23085 (-[WebScriptObject valueForKey:]): |
|
23086 |
|
23087 2004-05-18 Richard Williamson <rjw@apple.com> |
|
23088 |
|
23089 Finsished implementing support for windowScriptObject. |
|
23090 Had to make WebScriptObjectPrivate.h accessible from |
|
23091 WebCore. |
|
23092 |
|
23093 Reviewed by Maciej. |
|
23094 |
|
23095 * JavaScriptCore.pbproj/project.pbxproj: |
|
23096 * bindings/objc/WebScriptObjectPrivate.h: |
|
23097 |
|
23098 2004-05-18 Richard Williamson <rjw@apple.com> |
|
23099 |
|
23100 Use KVC to set/get values instead of directly accessing |
|
23101 ivars. |
|
23102 |
|
23103 Reviewed by Maciej. |
|
23104 |
|
23105 * bindings/objc/WebScriptObject.mm: |
|
23106 (-[WebScriptObject callWebScriptMethod:withArguments:]): |
|
23107 (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]): |
|
23108 * bindings/objc/objc_runtime.mm: |
|
23109 (ObjcField::valueFromInstance): |
|
23110 (convertValueToObjcObject): |
|
23111 (ObjcField::setValueToInstance): |
|
23112 |
|
23113 2004-05-17 Richard Williamson <rjw@apple.com> |
|
23114 |
|
23115 Implemented new API for WebScriptObject. |
|
23116 |
|
23117 Fixed <rdar://problem/3657145>: (objc to javascript method calls do not cause updates.) |
|
23118 Fixed <rdar://problem/3654887>: (Update to JSC to refer to new JSObject LiveConnect object) (w/ help from Vicki) |
|
23119 |
|
23120 Reviewed by Hyatt. |
|
23121 |
|
23122 * JavaScriptCore.pbproj/project.pbxproj: |
|
23123 * bindings/c/c_instance.cpp: |
|
23124 (CInstance::invokeMethod): |
|
23125 * bindings/jni/jni_instance.cpp: |
|
23126 (JavaInstance::invokeMethod): |
|
23127 * bindings/jni/jni_jsobject.cpp: |
|
23128 (JSObject::convertValueToJObject): |
|
23129 * bindings/jni/jni_utility.cpp: |
|
23130 (KJS::Bindings::getJNIField): |
|
23131 * bindings/objc/WebScriptObject.mm: |
|
23132 (_didExecute): |
|
23133 (-[WebScriptObject _initWithObjectImp:KJS::root:Bindings::]): |
|
23134 (-[WebScriptObject KJS::]): |
|
23135 (-[WebScriptObject dealloc]): |
|
23136 (+[WebScriptObject throwException:]): |
|
23137 (listFromNSArray): |
|
23138 (-[WebScriptObject callWebScriptMethod:withArguments:]): |
|
23139 (-[WebScriptObject evaluateWebScript:]): |
|
23140 (-[WebScriptObject setValue:forKey:]): |
|
23141 (-[WebScriptObject valueForKey:]): |
|
23142 (-[WebScriptObject stringRepresentation]): |
|
23143 (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]): |
|
23144 (+[WebUndefined undefined]): |
|
23145 (-[WebUndefined initWithCoder:]): |
|
23146 (-[WebUndefined encodeWithCoder:]): |
|
23147 (-[WebUndefined copyWithZone:]): |
|
23148 (-[WebUndefined retain]): |
|
23149 (-[WebUndefined release]): |
|
23150 (-[WebUndefined retainCount]): |
|
23151 (-[WebUndefined autorelease]): |
|
23152 (-[WebUndefined dealloc]): |
|
23153 (-[WebUndefined copy]): |
|
23154 (-[WebUndefined replacementObjectForPortCoder:]): |
|
23155 * bindings/objc/WebScriptObjectPrivate.h: Added. |
|
23156 * bindings/objc/objc_class.mm: |
|
23157 (ObjcClass::methodsNamed): |
|
23158 (ObjcClass::fieldNamed): |
|
23159 * bindings/objc/objc_instance.mm: |
|
23160 (ObjcInstance::invokeMethod): |
|
23161 * bindings/objc/objc_jsobject.h: |
|
23162 * bindings/objc/objc_jsobject.mm: |
|
23163 * bindings/objc/objc_runtime.mm: |
|
23164 (ObjcField::valueFromInstance): |
|
23165 * bindings/objc/objc_utility.mm: |
|
23166 (KJS::Bindings::JSMethodNameToObjCMethodName): |
|
23167 (KJS::Bindings::convertValueToObjcValue): |
|
23168 (KJS::Bindings::convertObjcValueToValue): |
|
23169 * bindings/runtime.cpp: |
|
23170 (Instance::setDidExecuteFunction): |
|
23171 (Instance::didExecuteFunction): |
|
23172 (Instance::setValueOfField): |
|
23173 * bindings/runtime.h: |
|
23174 * bindings/testbindings.mm: |
|
23175 (+[MyFirstInterface webScriptNameForSelector:]): |
|
23176 (-[MyFirstInterface callJSObject::]): |
|
23177 |
|
23178 2004-05-14 Vicki Murley <vicki@apple.com> |
|
23179 |
|
23180 Reviewed by mjs. |
|
23181 |
|
23182 <rdar://problem/3642427>: framework marketing number should be 2.0 for DoubleBarrel release |
|
23183 |
|
23184 * JavaScriptCore.pbproj/project.pbxproj: change CFBundleShortVersionString to 2.0 |
|
23185 |
|
23186 === Safari-140 === |
|
23187 |
|
23188 2004-05-13 Richard Williamson <rjw@apple.com> |
|
23189 |
|
23190 Fixed indentation. |
|
23191 |
|
23192 Reviewed by Chris. |
|
23193 |
|
23194 * ChangeLog: |
|
23195 * bindings/objc/WebScriptObject.h: |
|
23196 |
|
23197 2004-05-13 Richard Williamson <rjw@apple.com> |
|
23198 |
|
23199 Approved API changes. Currently unimplemented. |
|
23200 |
|
23201 Reviewed by Chris. |
|
23202 |
|
23203 * ChangeLog: |
|
23204 * JavaScriptCore.pbproj/project.pbxproj: |
|
23205 * bindings/objc/WebScriptObject.h: Added. |
|
23206 * bindings/objc/WebScriptObject.mm: Added. |
|
23207 (+[WebScriptObject throwException:]): |
|
23208 (-[WebScriptObject callWebScriptMethod:withArguments:]): |
|
23209 (-[WebScriptObject evaluateWebScript:]): |
|
23210 (-[WebScriptObject stringRepresentation]): |
|
23211 (+[WebUndefined undefined]): |
|
23212 (-[WebUndefined initWithCoder:]): |
|
23213 (-[WebUndefined encodeWithCoder:]): |
|
23214 (-[WebUndefined copyWithZone:]): |
|
23215 |
|
23216 2004-05-07 Vicki Murley <vicki@apple.com> |
|
23217 |
|
23218 Reviewed by darin. |
|
23219 |
|
23220 Turn off GC since it uses ppc only instructions (which breaks |
|
23221 the B&I build). |
|
23222 |
|
23223 * kjs/value.h: set USE_CONSERVATIVE_GC to 0 |
|
23224 |
|
23225 === Safari-139 === |
|
23226 |
|
23227 2004-05-07 Maciej Stachowiak <mjs@apple.com> |
|
23228 |
|
23229 Reviewed by Darin. |
|
23230 |
|
23231 - add -funroll-loops=16 compiler option for approx .5% speedup on |
|
23232 HTML iBench and .5-1% speedup on JS iBench. |
|
23233 |
|
23234 * JavaScriptCore.pbproj/project.pbxproj: |
|
23235 |
|
23236 2004-04-25 Maciej Stachowiak <mjs@apple.com> |
|
23237 |
|
23238 Reviewed by Darin. |
|
23239 |
|
23240 Enable full conservative GC mode in addition to test mode. When |
|
23241 conservative GC is enabled, we now get an 11% speed improvement on |
|
23242 the iBench. Also fix some spots I missed before. |
|
23243 |
|
23244 Specific noteworth changes: |
|
23245 |
|
23246 * kjs/collector.cpp: |
|
23247 (KJS::Collector::markStackObjectsConservatively): Check possible |
|
23248 cell pointers for 8-byte aligment and verify they are not 0. |
|
23249 |
|
23250 * kjs/protected_values.cpp: |
|
23251 (KJS::ProtectedValues::increaseProtectCount): Move null-tolerance from here... |
|
23252 (KJS::ProtectedValues::decreaseProtectCount): ...and here... |
|
23253 * kjs/protect.h: |
|
23254 (KJS::gcProtectNullTolerant): ...to here... |
|
23255 (KJS::gcUnprotectNullTolerant): ...and here, because not all callers need the null |
|
23256 tolerance, and doing the check is expensive. |
|
23257 |
|
23258 * kjs/protected_values.cpp: |
|
23259 (KJS::ProtectedValues::computeHash): Replace hash function with a much faster one |
|
23260 that is still very good. |
|
23261 |
|
23262 * kjs/protect.h: |
|
23263 (KJS::gcProtect): |
|
23264 (KJS::gcUnprotect): |
|
23265 (KJS::ProtectedValue::ProtectedValue): |
|
23266 (KJS::ProtectedValue::~ProtectedValue): |
|
23267 (KJS::ProtectedValue::operator=): |
|
23268 (KJS::ProtectedObject::ProtectedObject): |
|
23269 (KJS::ProtectedObject::~ProtectedObject): |
|
23270 (KJS::ProtectedObject::operator=): |
|
23271 (KJS::ProtectedReference::ProtectedReference): |
|
23272 (KJS::ProtectedReference::~ProtectedReference): |
|
23273 (KJS::ProtectedReference::operator=): |
|
23274 * kjs/protected_values.cpp: |
|
23275 (KJS::ProtectedValues::getProtectCount): |
|
23276 (KJS::ProtectedValues::increaseProtectCount): |
|
23277 (KJS::ProtectedValues::decreaseProtectCount): |
|
23278 (KJS::ProtectedValues::computeHash): |
|
23279 * bindings/runtime_root.cpp: |
|
23280 (KJS::Bindings::addNativeReference): |
|
23281 (KJS::Bindings::removeNativeReference): |
|
23282 (RootObject::removeAllNativeReferences): |
|
23283 * bindings/runtime_root.h: |
|
23284 (KJS::Bindings::RootObject::~RootObject): |
|
23285 (KJS::Bindings::RootObject::setRootObjectImp): |
|
23286 * kjs/collector.cpp: |
|
23287 (KJS::Collector::allocate): |
|
23288 (KJS::Collector::collect): |
|
23289 * kjs/collector.h: |
|
23290 * kjs/internal.cpp: |
|
23291 (NumberImp::create): |
|
23292 (InterpreterImp::globalInit): |
|
23293 (InterpreterImp::globalClear): |
|
23294 (InterpreterImp::mark): |
|
23295 * kjs/list.cpp: |
|
23296 (KJS::List::derefValues): |
|
23297 (KJS::List::refValues): |
|
23298 (KJS::List::append): |
|
23299 * kjs/object.cpp: |
|
23300 (KJS::ObjectImp::setInternalValue): |
|
23301 (KJS::ObjectImp::putDirect): |
|
23302 * kjs/value.cpp: |
|
23303 (ValueImp::mark): |
|
23304 (ValueImp::marked): |
|
23305 * kjs/value.h: |
|
23306 (KJS::ValueImp::ValueImp): |
|
23307 (KJS::ValueImp::~ValueImp): |
|
23308 (KJS::ValueImp::): |
|
23309 (KJS::Value::Value): |
|
23310 (KJS::Value::~Value): |
|
23311 (KJS::Value::operator=): |
|
23312 |
|
23313 2004-04-30 Richard Williamson <rjw@apple.com> |
|
23314 |
|
23315 Asking an NSInvocation for it's return value when return type |
|
23316 is void throws an exception. Added check for void return types |
|
23317 to avoid this exception. |
|
23318 |
|
23319 Reviewed by Ken. |
|
23320 |
|
23321 * bindings/objc/objc_instance.mm: |
|
23322 (ObjcInstance::invokeMethod): |
|
23323 |
|
23324 2004-04-29 Richard Williamson <rjw@apple.com> |
|
23325 |
|
23326 Fixed several bad problems with the ObjC bindings. In particular, conversion |
|
23327 to/from JavaScriptObject (soon to be WebScriptObject) was completely broken. |
|
23328 |
|
23329 Reviewed by Chris. |
|
23330 |
|
23331 * bindings/objc/objc_jsobject.h: |
|
23332 * bindings/objc/objc_jsobject.mm: |
|
23333 (-[JavaScriptObject initWithObjectImp:KJS::root:Bindings::]): |
|
23334 (-[JavaScriptObject KJS::]): |
|
23335 (+[JavaScriptObject _convertValueToObjcValue:KJS::root:Bindings::]): |
|
23336 (-[JavaScriptObject call:arguments:]): |
|
23337 (-[JavaScriptObject evaluate:]): |
|
23338 (-[JavaScriptObject getMember:]): |
|
23339 (-[JavaScriptObject getSlot:]): |
|
23340 * bindings/objc/objc_runtime.mm: |
|
23341 (ObjcField::valueFromInstance): |
|
23342 (ObjcField::setValueToInstance): |
|
23343 * bindings/objc/objc_utility.mm: |
|
23344 (KJS::Bindings::convertValueToObjcValue): |
|
23345 (KJS::Bindings::convertObjcValueToValue): |
|
23346 * bindings/runtime.h: |
|
23347 * bindings/runtime_root.cpp: |
|
23348 (KJS::Bindings::rootForInterpreter): |
|
23349 (KJS::Bindings::addNativeReference): |
|
23350 (KJS::Bindings::removeNativeReference): |
|
23351 * bindings/runtime_root.h: |
|
23352 * bindings/testbindings.mm: |
|
23353 (-[MyFirstInterface logMessage:]): |
|
23354 (-[MyFirstInterface setJSObject:]): |
|
23355 (-[MyFirstInterface callJSObject::]): |
|
23356 |
|
23357 2004-04-24 Darin Adler <darin@apple.com> |
|
23358 |
|
23359 Reviewed by Dave. |
|
23360 |
|
23361 * kjs/ustring.cpp: (KJS::UString::append): Fix one case that was allocating a buffer |
|
23362 that is 2x too big. |
|
23363 |
|
23364 2004-04-23 Maciej Stachowiak <mjs@apple.com> |
|
23365 |
|
23366 Reviewed by Darin. |
|
23367 |
|
23368 Implementation of conservative GC, based partly on code from |
|
23369 Darin. It's turned off for now, so it shouldn't have any effect on |
|
23370 the normal build. |
|
23371 |
|
23372 * JavaScriptCore.pbproj/project.pbxproj: |
|
23373 * kjs/collector.cpp: |
|
23374 (KJS::Collector::markStackObjectsConservatively): |
|
23375 (KJS::Collector::markProtectedObjects): |
|
23376 (KJS::Collector::collect): |
|
23377 * kjs/collector.h: |
|
23378 * kjs/protect.h: |
|
23379 (KJS::gcProtect): |
|
23380 (KJS::gcUnprotect): |
|
23381 * kjs/protected_values.cpp: Added. |
|
23382 (KJS::ProtectedValues::getProtectCount): |
|
23383 (KJS::ProtectedValues::increaseProtectCount): |
|
23384 (KJS::ProtectedValues::insert): |
|
23385 (KJS::ProtectedValues::decreaseProtectCount): |
|
23386 (KJS::ProtectedValues::expand): |
|
23387 (KJS::ProtectedValues::shrink): |
|
23388 (KJS::ProtectedValues::rehash): |
|
23389 (KJS::ProtectedValues::computeHash): |
|
23390 * kjs/protected_values.h: Added. |
|
23391 * kjs/value.cpp: |
|
23392 (ValueImp::useConservativeMark): |
|
23393 (ValueImp::mark): |
|
23394 (ValueImp::marked): |
|
23395 * kjs/value.h: |
|
23396 (KJS::ValueImp::): |
|
23397 |
|
23398 === Safari-138 === |
|
23399 |
|
23400 2004-04-22 Richard Williamson <rjw@apple.com> |
|
23401 |
|
23402 Fixed build snafu (re-declaration of NPBool in npruntime.h and |
|
23403 npapi.h). |
|
23404 |
|
23405 * bindings/npruntime.h: |
|
23406 |
|
23407 2004-04-22 Richard Williamson <rjw@apple.com> |
|
23408 |
|
23409 Updated plugin binding API to reflect latest revision from |
|
23410 working group. |
|
23411 |
|
23412 Biggest change is the introduction of NPVariant used to represent |
|
23413 value types. NPVariant replaces the use of NPObject for the |
|
23414 exchange of values between scripting environment and native code. |
|
23415 |
|
23416 Reviewed by John. |
|
23417 |
|
23418 * JavaScriptCore.pbproj/project.pbxproj: |
|
23419 * bindings/NP_jsobject.cpp: |
|
23420 (identiferFromNPIdentifier): |
|
23421 (NPN_Call): |
|
23422 (NPN_Evaluate): |
|
23423 (NPN_GetProperty): |
|
23424 (NPN_SetProperty): |
|
23425 (NPN_ToString): |
|
23426 (NPN_GetPropertyAtIndex): |
|
23427 (NPN_SetPropertyAtIndex): |
|
23428 * bindings/c/c_class.cpp: |
|
23429 (CClass::methodsNamed): |
|
23430 (CClass::fieldNamed): |
|
23431 * bindings/c/c_instance.cpp: |
|
23432 (CInstance::invokeMethod): |
|
23433 (CInstance::defaultValue): |
|
23434 * bindings/c/c_runtime.cpp: |
|
23435 (CField::valueFromInstance): |
|
23436 (CField::setValueToInstance): |
|
23437 * bindings/c/c_utility.cpp: |
|
23438 (convertNPStringToUTF16): |
|
23439 (convertUTF8ToUTF16): |
|
23440 (coerceValueToNPVariantStringType): |
|
23441 (convertValueToNPVariant): |
|
23442 (convertNPVariantToValue): |
|
23443 * bindings/c/c_utility.h: |
|
23444 * bindings/npruntime.cpp: |
|
23445 (NPN_GetIdentifier): |
|
23446 (NPN_GetIdentifiers): |
|
23447 (NPN_UTF8FromIdentifier): |
|
23448 (NPN_VariantIsVoid): |
|
23449 (NPN_VariantIsNull): |
|
23450 (NPN_VariantIsUndefined): |
|
23451 (NPN_VariantIsBool): |
|
23452 (NPN_VariantIsInt32): |
|
23453 (NPN_VariantIsDouble): |
|
23454 (NPN_VariantIsString): |
|
23455 (NPN_VariantIsObject): |
|
23456 (NPN_VariantToBool): |
|
23457 (NPN_VariantToString): |
|
23458 (NPN_VariantToInt32): |
|
23459 (NPN_VariantToDouble): |
|
23460 (NPN_VariantToObject): |
|
23461 (NPN_InitializeVariantAsVoid): |
|
23462 (NPN_InitializeVariantAsNull): |
|
23463 (NPN_InitializeVariantAsUndefined): |
|
23464 (NPN_InitializeVariantWithBool): |
|
23465 (NPN_InitializeVariantWithInt32): |
|
23466 (NPN_InitializeVariantWithDouble): |
|
23467 (NPN_InitializeVariantWithString): |
|
23468 (NPN_InitializeVariantWithStringCopy): |
|
23469 (NPN_InitializeVariantWithObject): |
|
23470 (NPN_InitializeVariantWithVariant): |
|
23471 (NPN_ReleaseVariantValue): |
|
23472 (NPN_CreateObject): |
|
23473 (NPN_RetainObject): |
|
23474 (NPN_ReleaseObject): |
|
23475 (NPN_IsKindOfClass): |
|
23476 (NPN_SetExceptionWithUTF8): |
|
23477 (NPN_SetException): |
|
23478 * bindings/npruntime.h: |
|
23479 (_NPString::): |
|
23480 (_NPString::_NPVariant::): |
|
23481 * bindings/testbindings.cpp: |
|
23482 (logMessage): |
|
23483 (setDoubleValue): |
|
23484 (setIntValue): |
|
23485 (setStringValue): |
|
23486 (setBooleanValue): |
|
23487 (getDoubleValue): |
|
23488 (getIntValue): |
|
23489 (getStringValue): |
|
23490 (getBooleanValue): |
|
23491 (myGetProperty): |
|
23492 (mySetProperty): |
|
23493 (myInvoke): |
|
23494 (myAllocate): |
|
23495 |
|
23496 2004-04-22 Darin Adler <darin@apple.com> |
|
23497 |
|
23498 Reviewed by Maciej. |
|
23499 |
|
23500 - fixed <rdar://problem/3627473>: "REGRESSION (125-137): memory trasher in UString::append, causing many different crashes" |
|
23501 |
|
23502 * kjs/ustring.cpp: |
|
23503 (KJS::UString::expandCapacity): Fix sizeof(UChar *) that should be sizeof(UChar). |
|
23504 Was resulting in a buffer 2x the needed size. |
|
23505 (KJS::UString::expandPreCapacity): Ditto. |
|
23506 (KJS::UString::append): Fix malloc that is missing a sizeof(UChar). |
|
23507 |
|
23508 2004-04-21 Maciej Stachowiak <mjs@apple.com> |
|
23509 |
|
23510 Reviewed by Darin. |
|
23511 |
|
23512 Preliminary change for conservative GC. Create "protected" |
|
23513 subclasses to GC-protect objects when on heap, since we will soon |
|
23514 remove the built-in refcounting of the normal wrapper classes. Use |
|
23515 them where needed. |
|
23516 |
|
23517 * JavaScriptCore.pbproj/project.pbxproj: |
|
23518 * kjs/context.h: |
|
23519 * kjs/internal.h: |
|
23520 (KJS::InterpreterImp::globalObject): |
|
23521 * kjs/interpreter.h: |
|
23522 * kjs/property_map.cpp: |
|
23523 * kjs/reference.h: |
|
23524 * kjs/reference_list.cpp: |
|
23525 |
|
23526 2004-04-19 Maciej Stachowiak <mjs@apple.com> |
|
23527 |
|
23528 Reviewed by Dave. |
|
23529 |
|
23530 Optimize prepend using the shared substring optimization. Also, |
|
23531 limit the applicability of shared append and shared prepend. If |
|
23532 you overdo it, it does more harm than good, because you create a |
|
23533 bunch of strings that are disqualified from future shared |
|
23534 append/prepend, for not much immediate savings in allocate/copy |
|
23535 expense. |
|
23536 |
|
23537 * kjs/ustring.cpp: |
|
23538 (KJS::): |
|
23539 (KJS::UString::Rep::create): |
|
23540 (KJS::UString::expandedSize): |
|
23541 (KJS::UString::usedPreCapacity): |
|
23542 (KJS::UString::expandCapacity): |
|
23543 (KJS::UString::expandPreCapacity): |
|
23544 (KJS::UString::UString): |
|
23545 (KJS::UString::append): |
|
23546 (KJS::UString::operator=): |
|
23547 * kjs/ustring.h: |
|
23548 (KJS::UString::Rep::data): |
|
23549 |
|
23550 2004-04-16 Maciej Stachowiak <mjs@apple.com> |
|
23551 Reviewed by Richard. |
|
23552 |
|
23553 No more need for Completion or Reference to privately inherit from |
|
23554 Value, none of the superclass functionality is used. |
|
23555 |
|
23556 * kjs/completion.h: |
|
23557 * kjs/reference.h: |
|
23558 |
|
23559 === Safari-137 === |
|
23560 |
|
23561 2004-04-16 Richard Williamson <rjw@apple.com> |
|
23562 |
|
23563 Added interpreter lock protection around object creation. |
|
23564 |
|
23565 Reviewed by Chris. |
|
23566 |
|
23567 * bindings/runtime.cpp: |
|
23568 (Instance::createRuntimeObject): |
|
23569 |
|
23570 2004-04-16 Maciej Stachowiak <mjs@apple.com> |
|
23571 |
|
23572 Reviewed by Ken. |
|
23573 |
|
23574 Another JavaScript speed improvement: use the mechanism from |
|
23575 string append optimization to make taking a substring fast, again |
|
23576 sharing the buffer. |
|
23577 |
|
23578 A further 22% improvement on the 24fun string speed test. |
|
23579 |
|
23580 * kjs/ustring.cpp: |
|
23581 (KJS::): |
|
23582 (KJS::UString::Rep::create): |
|
23583 (KJS::UString::UString): |
|
23584 (KJS::UString::append): |
|
23585 (KJS::UString::operator=): |
|
23586 (KJS::UString::substr): |
|
23587 * kjs/ustring.h: |
|
23588 (KJS::UString::Rep::data): |
|
23589 |
|
23590 2004-04-13 Maciej Stachowiak <mjs@apple.com> |
|
23591 |
|
23592 Reviewed by Darin. |
|
23593 |
|
23594 - fixed <rdar://problem/3600695>: String manipulation in JavaScript 24fun test is very slow (slow) |
|
23595 - fixed <rdar://problem/3600691>: Table generation test is really slow |
|
23596 - fixed <rdar://problem/3600661>: 24fun date test is really slow |
|
23597 |
|
23598 80% speedup on the string test, lesser speedups on the other two. |
|
23599 |
|
23600 Two different optimizations here: |
|
23601 |
|
23602 1) Avoid large overhead of scanning strings to see if they are all |
|
23603 ASCII before numeric conversion. |
|
23604 |
|
23605 * kjs/nodes.cpp: |
|
23606 (AssignNode::evaluate): Don't convert to integer until we know for |
|
23607 sure the operation will need it. Attempting to convert strings to |
|
23608 numbers is a waste when they are being appended with +=. |
|
23609 |
|
23610 2) Avoid huge cost of appending strings. |
|
23611 |
|
23612 This is done by allowing multiple strings to share a buffer but |
|
23613 actually use different ranges of it. The first time a string is |
|
23614 appended to, we start leaving at least 10% extra space in the |
|
23615 buffer, so doing N appends to the same string takes O(log N) |
|
23616 mallocs instead of O(N). |
|
23617 |
|
23618 * kjs/identifier.cpp: |
|
23619 (KJS::Identifier::equal): |
|
23620 (KJS::Identifier::add): |
|
23621 * kjs/ustring.cpp: |
|
23622 (KJS::): |
|
23623 (KJS::UCharReference::operator=): |
|
23624 (KJS::UCharReference::ref): |
|
23625 (KJS::UString::Rep::create): |
|
23626 (KJS::UString::Rep::destroy): |
|
23627 (KJS::UString::expandedSize): |
|
23628 (KJS::UString::usedCapacity): |
|
23629 (KJS::UString::expandCapacity): |
|
23630 (KJS::UString::UString): |
|
23631 (KJS::UString::null): |
|
23632 (KJS::UString::append): |
|
23633 (KJS::UString::operator=): |
|
23634 (KJS::UString::toStrictUInt32): |
|
23635 (KJS::UString::detach): |
|
23636 (KJS::KJS::operator==): |
|
23637 * kjs/ustring.h: |
|
23638 (KJS::UString::Rep::data): |
|
23639 (KJS::UString::Rep::hash): |
|
23640 |
|
23641 2004-04-09 Maciej Stachowiak <mjs@apple.com> |
|
23642 |
|
23643 Reviewed by John. |
|
23644 |
|
23645 - fix deployment build by avoiding deployment-only warning. |
|
23646 |
|
23647 * kjs/scope_chain.cpp: |
|
23648 (KJS::ScopeChain::bottom): |
|
23649 |
|
23650 2004-04-09 Maciej Stachowiak <mjs@apple.com> |
|
23651 |
|
23652 Reviewed by John. |
|
23653 |
|
23654 Changed things so that newly created objects get a prototype based |
|
23655 on the scope chain of the current function, rather than the |
|
23656 interpreter that started execution. This fixes the following bugs: |
|
23657 |
|
23658 <rdar://problem/3368523>: ARCH: wrong prototype used to create new objects (hang on lookup.atomica.com) |
|
23659 <rdar://problem/3559173>: ARCH: Cannot scan using a HP Jetdirect product (JS object prototypes bind incorrectly) |
|
23660 |
|
23661 * JavaScriptCore.pbproj/project.pbxproj: |
|
23662 * kjs/array_object.cpp: |
|
23663 (CompareWithCompareFunctionArguments::CompareWithCompareFunctionArguments): |
|
23664 (ArrayProtoFuncImp::ArrayProtoFuncImp): |
|
23665 (ArrayProtoFuncImp::call): |
|
23666 (ArrayObjectImp::construct): |
|
23667 * kjs/bool_object.cpp: |
|
23668 (BooleanObjectImp::construct): |
|
23669 * kjs/date_object.cpp: |
|
23670 (DateProtoFuncImp::DateProtoFuncImp): |
|
23671 (DateProtoFuncImp::call): |
|
23672 (DateObjectImp::construct): |
|
23673 * kjs/error_object.cpp: |
|
23674 (ErrorObjectImp::construct): |
|
23675 * kjs/function.cpp: |
|
23676 (FunctionImp::FunctionImp): |
|
23677 (FunctionImp::call): |
|
23678 (DeclaredFunctionImp::construct): |
|
23679 (ArgumentsImp::ArgumentsImp): |
|
23680 (GlobalFuncImp::call): |
|
23681 * kjs/function_object.cpp: |
|
23682 (FunctionProtoFuncImp::call): |
|
23683 (FunctionObjectImp::construct): |
|
23684 * kjs/internal.cpp: |
|
23685 (BooleanImp::toObject): |
|
23686 (StringImp::toObject): |
|
23687 (NumberImp::toObject): |
|
23688 (InterpreterImp::InterpreterImp): |
|
23689 (InterpreterImp::clear): |
|
23690 (InterpreterImp::interpreterWithGlobalObject): |
|
23691 * kjs/internal.h: |
|
23692 * kjs/interpreter.cpp: |
|
23693 (ExecState::lexicalInterpreter): |
|
23694 * kjs/interpreter.h: |
|
23695 (KJS::ExecState::dynamicInterpreter): |
|
23696 (KJS::ExecState::interpreter): |
|
23697 * kjs/math_object.cpp: |
|
23698 (MathFuncImp::MathFuncImp): |
|
23699 * kjs/nodes.cpp: |
|
23700 (StatementNode::hitStatement): |
|
23701 (StatementNode::abortStatement): |
|
23702 (RegExpNode::evaluate): |
|
23703 (ElementNode::evaluate): |
|
23704 (ArrayNode::evaluate): |
|
23705 (ObjectLiteralNode::evaluate): |
|
23706 (PropertyValueNode::evaluate): |
|
23707 (FunctionCallNode::evaluate): |
|
23708 (FuncDeclNode::processFuncDecl): |
|
23709 (FuncExprNode::evaluate): |
|
23710 * kjs/number_object.cpp: |
|
23711 (NumberObjectImp::construct): |
|
23712 * kjs/object.cpp: |
|
23713 (KJS::ObjectImp::defaultValue): |
|
23714 (KJS::Error::create): |
|
23715 * kjs/object_object.cpp: |
|
23716 (ObjectObjectImp::construct): |
|
23717 * kjs/reference.cpp: |
|
23718 (Reference::putValue): |
|
23719 * kjs/regexp_object.cpp: |
|
23720 (RegExpProtoFuncImp::call): |
|
23721 (RegExpObjectImp::arrayOfMatches): |
|
23722 (RegExpObjectImp::construct): |
|
23723 * kjs/scope_chain.cpp: |
|
23724 (KJS::ScopeChain::bottom): |
|
23725 * kjs/scope_chain.h: |
|
23726 * kjs/string_object.cpp: |
|
23727 (StringProtoFuncImp::StringProtoFuncImp): |
|
23728 (StringProtoFuncImp::call): |
|
23729 (StringObjectImp::construct): |
|
23730 |
|
23731 === Safari-136 === |
|
23732 |
|
23733 === Safari-135 === |
|
23734 |
|
23735 2004-03-31 Richard Williamson <rjw@apple.com> |
|
23736 |
|
23737 Tedious renames based on feedback from plugin-futures list. |
|
23738 NP_ functions are renamed with NPN_ prefix. |
|
23739 Types prefix renamed from NP_ to NP. |
|
23740 NPN_CreateStringWithUTF8 and NPN_SetExceptionWithUTF8 now take a length, optionally -1 if string is null terminated. |
|
23741 |
|
23742 No review because this was just a renaming patch. |
|
23743 |
|
23744 * bindings/NP_jsobject.cpp: |
|
23745 (listFromNPArray): |
|
23746 (jsAllocate): |
|
23747 (identiferFromNPIdentifier): |
|
23748 (NPN_Call): |
|
23749 (NPN_Evaluate): |
|
23750 (NPN_GetProperty): |
|
23751 (NPN_SetProperty): |
|
23752 (NPN_RemoveProperty): |
|
23753 (NPN_ToString): |
|
23754 (NPN_GetPropertyAtIndex): |
|
23755 (NPN_SetPropertyAtIndex): |
|
23756 * bindings/NP_jsobject.h: |
|
23757 * bindings/c/c_class.cpp: |
|
23758 (CClass::_commonInit): |
|
23759 (CClass::classForIsA): |
|
23760 (CClass::CClass): |
|
23761 (CClass::methodsNamed): |
|
23762 (CClass::fieldNamed): |
|
23763 * bindings/c/c_class.h: |
|
23764 * bindings/c/c_instance.cpp: |
|
23765 (CInstance::CInstance): |
|
23766 (CInstance::~CInstance): |
|
23767 (CInstance::operator=): |
|
23768 (CInstance::invokeMethod): |
|
23769 (CInstance::defaultValue): |
|
23770 * bindings/c/c_instance.h: |
|
23771 (KJS::Bindings::CInstance::getObject): |
|
23772 * bindings/c/c_runtime.cpp: |
|
23773 (CField::valueFromInstance): |
|
23774 (CField::setValueToInstance): |
|
23775 * bindings/c/c_runtime.h: |
|
23776 (KJS::Bindings::CField::CField): |
|
23777 (KJS::Bindings::CField::name): |
|
23778 (KJS::Bindings::CMethod::CMethod): |
|
23779 (KJS::Bindings::CMethod::name): |
|
23780 * bindings/c/c_utility.cpp: |
|
23781 (coerceValueToNPString): |
|
23782 (convertValueToNPValueType): |
|
23783 (convertNPValueTypeToValue): |
|
23784 * bindings/c/c_utility.h: |
|
23785 * bindings/npruntime.cpp: |
|
23786 (NPN_IdentifierFromUTF8): |
|
23787 (NPN_IsValidIdentifier): |
|
23788 (NPN_GetIdentifiers): |
|
23789 (NPN_UTF8FromIdentifier): |
|
23790 (NPN_CreateObject): |
|
23791 (NPN_RetainObject): |
|
23792 (NPN_ReleaseObject): |
|
23793 (NPN_IsKindOfClass): |
|
23794 (NPN_SetExceptionWithUTF8): |
|
23795 (NPN_SetException): |
|
23796 (numberAllocate): |
|
23797 (NPN_CreateNumberWithInt): |
|
23798 (NPN_CreateNumberWithFloat): |
|
23799 (NPN_CreateNumberWithDouble): |
|
23800 (NPN_IntFromNumber): |
|
23801 (NPN_FloatFromNumber): |
|
23802 (NPN_DoubleFromNumber): |
|
23803 (stringAllocate): |
|
23804 (NPN_CreateStringWithUTF8): |
|
23805 (NPN_CreateStringWithUTF16): |
|
23806 (NPN_DeallocateUTF8): |
|
23807 (NPN_UTF8FromString): |
|
23808 (NPN_UTF16FromString): |
|
23809 (NPN_StringLength): |
|
23810 (booleanAllocate): |
|
23811 (NPN_CreateBoolean): |
|
23812 (NPN_BoolFromBoolean): |
|
23813 (nullAllocate): |
|
23814 (NPN_GetNull): |
|
23815 (undefinedAllocate): |
|
23816 (NPN_GetUndefined): |
|
23817 (arrayAllocate): |
|
23818 (arrayDeallocate): |
|
23819 (NPN_CreateArray): |
|
23820 (NPN_CreateArrayV): |
|
23821 (NPN_ObjectAtIndex): |
|
23822 * bindings/npruntime.h: |
|
23823 * bindings/runtime.cpp: |
|
23824 (Instance::createBindingForLanguageInstance): |
|
23825 * bindings/testbindings.cpp: |
|
23826 (initializeIdentifiers): |
|
23827 (myHasProperty): |
|
23828 (myHasMethod): |
|
23829 (myGetProperty): |
|
23830 (mySetProperty): |
|
23831 (logMessage): |
|
23832 (setDoubleValue): |
|
23833 (setIntValue): |
|
23834 (setStringValue): |
|
23835 (setBooleanValue): |
|
23836 (getDoubleValue): |
|
23837 (getIntValue): |
|
23838 (getStringValue): |
|
23839 (getBooleanValue): |
|
23840 (myInvoke): |
|
23841 (myAllocate): |
|
23842 (myInvalidate): |
|
23843 (myDeallocate): |
|
23844 (main): |
|
23845 |
|
23846 2004-03-31 Richard Williamson <rjw@apple.com> |
|
23847 |
|
23848 Changed references to NP_runtime.h to npruntime.h |
|
23849 |
|
23850 * JavaScriptCore.pbproj/project.pbxproj: |
|
23851 * bindings/NP_jsobject.h: |
|
23852 * bindings/c/c_class.h: |
|
23853 * bindings/c/c_instance.h: |
|
23854 * bindings/c/c_runtime.h: |
|
23855 * bindings/c/c_utility.h: |
|
23856 * bindings/npruntime.cpp: |
|
23857 |
|
23858 2004-03-31 Richard Williamson <rjw@apple.com> |
|
23859 |
|
23860 Renamed NP_runtime.h to npruntime.h to match Netscape SDK. |
|
23861 |
|
23862 * JavaScriptCore.pbproj/project.pbxproj: |
|
23863 * bindings/NP_jsobject.h: |
|
23864 * bindings/npruntime.cpp: |
|
23865 |
|
23866 === Safari-134 === |
|
23867 |
|
23868 2004-03-23 Richard Williamson <rjw@apple.com> |
|
23869 |
|
23870 Added implementation of KJS::Value <-> NP_Object conversion functions. |
|
23871 Augmented test program for 'C' bindings. |
|
23872 Added asserts and parameter checking to all public API. |
|
23873 |
|
23874 Reviewed by Ken. |
|
23875 |
|
23876 * JavaScriptCore.pbproj/project.pbxproj: |
|
23877 * bindings/NP_jsobject.cpp: |
|
23878 (NP_ToString): |
|
23879 * bindings/NP_jsobject.h: Added. |
|
23880 * bindings/NP_runtime.cpp: |
|
23881 (NP_IdentifierFromUTF8): |
|
23882 (NP_IsValidIdentifier): |
|
23883 (NP_GetIdentifiers): |
|
23884 (NP_CreateObject): |
|
23885 (NP_RetainObject): |
|
23886 (NP_ReleaseObject): |
|
23887 (NP_IsKindOfClass): |
|
23888 (NP_SetExceptionWithUTF8): |
|
23889 (NP_SetException): |
|
23890 (NP_IntFromNumber): |
|
23891 (NP_FloatFromNumber): |
|
23892 (NP_DoubleFromNumber): |
|
23893 (NP_CreateStringWithUTF8): |
|
23894 (NP_CreateStringWithUTF16): |
|
23895 (NP_DeallocateUTF8): |
|
23896 (NP_UTF8FromString): |
|
23897 (NP_UTF16FromString): |
|
23898 (NP_StringLength): |
|
23899 (NP_BoolFromBoolean): |
|
23900 * bindings/NP_runtime.h: |
|
23901 * bindings/c/c_instance.cpp: |
|
23902 (CInstance::invokeMethod): |
|
23903 * bindings/c/c_utility.cpp: |
|
23904 (coerceValueToNPString): |
|
23905 (convertValueToNPValueType): |
|
23906 (convertNPValueTypeToValue): |
|
23907 * bindings/c/c_utility.h: |
|
23908 * bindings/test.js: |
|
23909 * bindings/testC.js: Added. |
|
23910 * bindings/testbindings.cpp: |
|
23911 (logMessage): |
|
23912 (setDoubleValue): |
|
23913 (setIntValue): |
|
23914 (setStringValue): |
|
23915 (setBooleanValue): |
|
23916 (getDoubleValue): |
|
23917 (getIntValue): |
|
23918 (getStringValue): |
|
23919 (getBooleanValue): |
|
23920 (myInterfaceInvoke): |
|
23921 (myInterfaceAllocate): |
|
23922 |
|
23923 === Safari-133 === |
|
23924 |
|
23925 2004-03-19 Darin Adler <darin@apple.com> |
|
23926 |
|
23927 Reviewed by Ken. |
|
23928 |
|
23929 - fixed problem with methods like setUTCHour |
|
23930 |
|
23931 * kjs/date_object.cpp: (DateProtoFuncImp::call): Fix conversion back to time_t to use the appropriate |
|
23932 GMT vs. local time function based on the utc flag. |
|
23933 |
|
23934 2004-03-17 Richard Williamson <rjw@apple.com> |
|
23935 |
|
23936 Added a context parameter to result callbacks use by JavaScriptObject functions. This was a change requested by Eric Carlson on the QT plugin team. |
|
23937 |
|
23938 Reviewed by Ken. |
|
23939 |
|
23940 * bindings/NP_jsobject.cpp: |
|
23941 (NP_Call): |
|
23942 (NP_Evaluate): |
|
23943 (NP_GetProperty): |
|
23944 (NP_ToString): |
|
23945 (NP_GetPropertyAtIndex): |
|
23946 * bindings/NP_runtime.h: |
|
23947 |
|
23948 2004-03-16 Richard Williamson <rjw@apple.com> |
|
23949 |
|
23950 Fixed 3590169. Regression (crash) caused by the switch to MethodLists. Crash when attempting to invoke a method from JavaScript to Java that is not implemented. |
|
23951 |
|
23952 Reviewed by John. |
|
23953 |
|
23954 * bindings/jni/jni_class.cpp: |
|
23955 (JavaClass::methodsNamed): |
|
23956 |
|
23957 2004-03-15 Richard Williamson <rjw@apple.com> |
|
23958 |
|
23959 Fixed 3570854. Don't attempt to convert Null to strings. We |
|
23960 were incorrectly converting to "Null". |
|
23961 |
|
23962 Actually fixed by Scott Kovatch. |
|
23963 |
|
23964 Reviewed by Richard. |
|
23965 |
|
23966 * bindings/jni/jni_utility.cpp: |
|
23967 (KJS::Bindings::convertValueToJValue): |
|
23968 |
|
23969 === Safari-132 === |
|
23970 |
|
23971 2004-03-11 Richard Williamson <rjw@apple.com> |
|
23972 |
|
23973 Stitched together the NP stuff to our language independent |
|
23974 JavaScript binding stuff. Very close to being done. |
|
23975 |
|
23976 Added program to test C bindings (and NP stuff). Just tests |
|
23977 properties. Will add methods and JavaScript access, etc. |
|
23978 |
|
23979 Updated Makefile.am to account for new bindings/c directory. |
|
23980 |
|
23981 Change NP_UTF8 from "const char *" to "char" to allow for |
|
23982 declarations like "const NP_UTF8 *" and "NP_UTF8 *". Ditto |
|
23983 for NP_UTF16. |
|
23984 |
|
23985 Added NP_IsValidIdentifier(). |
|
23986 |
|
23987 Reviewed by Chris. |
|
23988 |
|
23989 * JavaScriptCore.pbproj/project.pbxproj: |
|
23990 * Makefile.am: |
|
23991 * bindings/NP_jsobject.cpp: |
|
23992 (identiferFromNPIdentifier): |
|
23993 (NP_Evaluate): |
|
23994 * bindings/NP_runtime.cpp: |
|
23995 (NP_IdentifierFromUTF8): |
|
23996 (NP_IsValidIdentifier): |
|
23997 (NP_GetIdentifiers): |
|
23998 (NP_UTF8FromIdentifier): |
|
23999 (NP_SetExceptionWithUTF8): |
|
24000 (NP_SetException): |
|
24001 (NP_CreateStringWithUTF8): |
|
24002 (NP_CreateStringWithUTF16): |
|
24003 (NP_UTF8FromString): |
|
24004 (NP_UTF16FromString): |
|
24005 * bindings/NP_runtime.h: |
|
24006 * bindings/c/c_class.cpp: Added. |
|
24007 (CClass::_commonDelete): |
|
24008 (CClass::_commonCopy): |
|
24009 (CClass::_commonInit): |
|
24010 (_createClassesByIsAIfNecessary): |
|
24011 (CClass::classForIsA): |
|
24012 (CClass::CClass): |
|
24013 (CClass::name): |
|
24014 (CClass::methodsNamed): |
|
24015 (CClass::fieldNamed): |
|
24016 * bindings/c/c_class.h: Added. |
|
24017 (KJS::Bindings::CClass::~CClass): |
|
24018 (KJS::Bindings::CClass::CClass): |
|
24019 (KJS::Bindings::CClass::operator=): |
|
24020 (KJS::Bindings::CClass::constructorAt): |
|
24021 (KJS::Bindings::CClass::numConstructors): |
|
24022 * bindings/c/c_instance.cpp: Added. |
|
24023 (CInstance::CInstance): |
|
24024 (CInstance::~CInstance): |
|
24025 (CInstance::operator=): |
|
24026 (CInstance::getClass): |
|
24027 (CInstance::begin): |
|
24028 (CInstance::end): |
|
24029 (CInstance::invokeMethod): |
|
24030 (CInstance::defaultValue): |
|
24031 (CInstance::stringValue): |
|
24032 (CInstance::numberValue): |
|
24033 (CInstance::booleanValue): |
|
24034 (CInstance::valueOf): |
|
24035 * bindings/c/c_instance.h: Added. |
|
24036 (KJS::Bindings::CInstance::getObject): |
|
24037 * bindings/c/c_runtime.cpp: Added. |
|
24038 (CField::valueFromInstance): |
|
24039 (CField::setValueToInstance): |
|
24040 * bindings/c/c_runtime.h: Added. |
|
24041 (KJS::Bindings::CField::CField): |
|
24042 (KJS::Bindings::CField::name): |
|
24043 (KJS::Bindings::CField::type): |
|
24044 (KJS::Bindings::CMethod::CMethod): |
|
24045 (KJS::Bindings::CMethod::name): |
|
24046 (KJS::Bindings::CMethod::numParameters): |
|
24047 * bindings/c/c_utility.cpp: Added. |
|
24048 (coerceValueToNPValueType): |
|
24049 (convertValueToNPValueType): |
|
24050 (convertNPValueTypeToValue): |
|
24051 * bindings/c/c_utility.h: Added. |
|
24052 * bindings/make_testbindings: |
|
24053 * bindings/runtime.cpp: |
|
24054 (Instance::createBindingForLanguageInstance): |
|
24055 * bindings/runtime.h: |
|
24056 (KJS::Bindings::Instance::): |
|
24057 * bindings/testbindings.cpp: Added. |
|
24058 (initializeIdentifiers): |
|
24059 (myInterfaceHasProperty): |
|
24060 (myInterfaceHasMethod): |
|
24061 (myInterfaceGetProperty): |
|
24062 (myInterfaceSetProperty): |
|
24063 (myInterfaceInvoke): |
|
24064 (myInterfaceAllocate): |
|
24065 (myInterfaceInvalidate): |
|
24066 (myInterfaceDeallocate): |
|
24067 (GlobalImp::className): |
|
24068 (readJavaScriptFromFile): |
|
24069 (main): |
|
24070 |
|
24071 2004-03-10 Richard Williamson <rjw@apple.com> |
|
24072 |
|
24073 Made changes to support new asychronous approach to calls from |
|
24074 plugin to JavaScript |
|
24075 |
|
24076 Reviewed by Chris. |
|
24077 |
|
24078 * bindings/NP_jsobject.cpp: |
|
24079 (NP_Call): |
|
24080 (NP_Evaluate): |
|
24081 (NP_GetProperty): |
|
24082 (NP_ToString): |
|
24083 (NP_GetPropertyAtIndex): |
|
24084 * bindings/NP_runtime.h: |
|
24085 * bindings/make_testbindings: |
|
24086 * bindings/runtime.cpp: |
|
24087 (Instance::createBindingForLanguageInstance): |
|
24088 |
|
24089 2004-03-10 Richard Williamson <rjw@apple.com> |
|
24090 |
|
24091 Updated header to include proposed changes from |
|
24092 plugin-futures list. Calls from plugin to JavaScript |
|
24093 are now asynchronous. |
|
24094 |
|
24095 Reviewed by Chris. |
|
24096 |
|
24097 * bindings/NP_runtime.h: |
|
24098 |
|
24099 === Safari-131 === |
|
24100 |
|
24101 2004-03-04 Richard Williamson <rjw@apple.com> |
|
24102 |
|
24103 Implementation of NP_JavaScriptObject. This is the 'C' class |
|
24104 that wraps a JavaScript object. |
|
24105 |
|
24106 Reviewed by Chris. |
|
24107 |
|
24108 * JavaScriptCore.pbproj/project.pbxproj: |
|
24109 * bindings/NP_jsobject.cpp: Added. |
|
24110 (coerceValueToNPValueType): |
|
24111 (convertValueToNPValueType): |
|
24112 (convertNPValueTypeToValue): |
|
24113 (listFromNPArray): |
|
24114 (jsAllocate): |
|
24115 (jsDeallocate): |
|
24116 (identiferFromNPIdentifier): |
|
24117 (NP_Call): |
|
24118 (NP_Evaluate): |
|
24119 (NP_GetProperty): |
|
24120 (NP_SetProperty): |
|
24121 (NP_RemoveProperty): |
|
24122 (NP_ToString): |
|
24123 (NP_GetPropertyAtIndex): |
|
24124 (NP_SetPropertyAtIndex): |
|
24125 * bindings/NP_runtime.cpp: |
|
24126 (NP_ObjectAtIndex): |
|
24127 * bindings/NP_runtime.h: |
|
24128 * bindings/runtime_object.h: |
|
24129 |
|
24130 2004-03-04 Richard Williamson <rjw@apple.com> |
|
24131 |
|
24132 Added NP_Array implementation. |
|
24133 |
|
24134 Changed NP_Boolean to just depend on two static instances, no |
|
24135 space is required for values. |
|
24136 |
|
24137 Reviewed by Chris. |
|
24138 |
|
24139 * bindings/NP_runtime.cpp: |
|
24140 (NP_CreateBoolean): |
|
24141 (NP_BoolFromBoolean): |
|
24142 (arrayAllocate): |
|
24143 (arrayDeallocate): |
|
24144 (NP_CreateArray): |
|
24145 (NP_CreateArrayV): |
|
24146 (NP_ObjectAtIndex): |
|
24147 * bindings/NP_runtime.h: |
|
24148 |
|
24149 2004-03-03 Darin Adler <darin@apple.com> |
|
24150 |
|
24151 Reviewed by Vicki. |
|
24152 |
|
24153 * English.lproj/InfoPlist.strings: Removed. No need to localize the version and |
|
24154 copyright string, and that's all that was in here. |
|
24155 * JavaScriptCore.pbproj/project.pbxproj: Removed InfoPlist.strings from build. |
|
24156 |
|
24157 2004-03-03 Richard Williamson <rjw@apple.com> |
|
24158 |
|
24159 More 'C' binding implementation. Fleshed out all the |
|
24160 'primitive' data types. |
|
24161 |
|
24162 Reviewed by Chris. |
|
24163 |
|
24164 * bindings/NP_runtime.cpp: |
|
24165 (NP_ReleaseObject): |
|
24166 (numberAllocate): |
|
24167 (stringAllocate): |
|
24168 (stringDeallocate): |
|
24169 (NP_CreateStringWithUTF8): |
|
24170 (NP_CreateStringWithUTF16): |
|
24171 (NP_UTF8FromString): |
|
24172 (NP_UTF16FromString): |
|
24173 (NP_StringLength): |
|
24174 (booleanAllocate): |
|
24175 (booleanDeallocate): |
|
24176 (NP_CreateBoolean): |
|
24177 (NP_BoolFromBoolean): |
|
24178 (nullAllocate): |
|
24179 (nullDeallocate): |
|
24180 (NP_GetNull): |
|
24181 (undefinedAllocate): |
|
24182 (undefinedDeallocate): |
|
24183 (NP_GetUndefined): |
|
24184 * bindings/NP_runtime.h: |
|
24185 |
|
24186 2004-03-03 Richard Williamson <rjw@apple.com> |
|
24187 |
|
24188 More 'C' binding implementation. |
|
24189 |
|
24190 Reviewed by Chris. |
|
24191 |
|
24192 * bindings/NP_runtime.cpp: |
|
24193 (identifierEqual): |
|
24194 (identifierHash): |
|
24195 (getIdentifierDictionary): |
|
24196 (NP_IdentifierFromUTF8): |
|
24197 (NP_UTF8FromIdentifier): |
|
24198 (NP_CreateObject): |
|
24199 (NP_ReleaseObject): |
|
24200 (NP_IsKindOfClass): |
|
24201 (numberCreate): |
|
24202 (NP_CreateNumberWithInt): |
|
24203 (NP_CreateNumberWithFloat): |
|
24204 (NP_CreateNumberWithDouble): |
|
24205 (NP_IntFromNumber): |
|
24206 (NP_FloatFromNumber): |
|
24207 (NP_DoubleFromNumber): |
|
24208 * bindings/NP_runtime.h: |
|
24209 |
|
24210 2004-03-02 Richard Williamson <rjw@apple.com> |
|
24211 |
|
24212 Removed retain/release from NP_Class. Classes will not be allowed to implement their |
|
24213 own customer retain/release scheme. |
|
24214 |
|
24215 Reviewed by Chris. |
|
24216 |
|
24217 * bindings/NP_runtime.cpp: |
|
24218 (NP_RetainObject): |
|
24219 (NP_ReleaseObject): |
|
24220 * bindings/NP_runtime.h: |
|
24221 |
|
24222 2004-03-02 Richard Williamson <rjw@apple.com> |
|
24223 |
|
24224 C binding API. Partial implementation. |
|
24225 |
|
24226 Completed ObjectiveC bindings (not based on the C API). These will re-implemented over the C binding API, but I wanted to get this code in the tree. |
|
24227 |
|
24228 Factored root object reference counting scheme. It is now useful independent |
|
24229 of LiveConnect. |
|
24230 |
|
24231 Reviewed by Chris. |
|
24232 |
|
24233 * JavaScriptCore.pbproj/project.pbxproj: |
|
24234 * bindings/NP_runtime.cpp: Added. |
|
24235 (NP_IdentifierFromUTF8): |
|
24236 (NP_GetIdentifiers): |
|
24237 (NP_UTF8FromIdentifier): |
|
24238 (NP_CreateObject): |
|
24239 (NP_RetainObject): |
|
24240 (NP_ReleaseObject): |
|
24241 (NP_IsKindOfClass): |
|
24242 (NP_SetException): |
|
24243 (NP_Call): |
|
24244 (NP_Evaluate): |
|
24245 (NP_GetProperty): |
|
24246 (NP_SetProperty): |
|
24247 (NP_RemoveProperty): |
|
24248 (NP_ToString): |
|
24249 (NP_GetPropertyAtIndex): |
|
24250 (NP_SetPropertyAtIndex): |
|
24251 (NP_CreateNumberWithInt): |
|
24252 (NP_CreateNumberWithFloat): |
|
24253 (NP_CreateNumberWithDouble): |
|
24254 (NP_IntFromNumber): |
|
24255 (NP_FloatFromNumber): |
|
24256 (NP_DoubleFromNumber): |
|
24257 (NP_CreateStringWithUTF8): |
|
24258 (NP_CreateStringWithUTF16): |
|
24259 (NP_UTF8FromString): |
|
24260 (NP_UTF16FromString): |
|
24261 (NP_CreateBoolean): |
|
24262 (NP_BoolFromBoolean): |
|
24263 (NP_GetNull): |
|
24264 (NP_GetUndefined): |
|
24265 (NP_CreateArray): |
|
24266 (NP_CreateArrayV): |
|
24267 (NP_ObjectAtIndex): |
|
24268 * bindings/NP_runtime.h: Added. |
|
24269 * bindings/jni/jni_jsobject.cpp: |
|
24270 (JSObject::invoke): |
|
24271 (JSObject::finalize): |
|
24272 (JSObject::createNative): |
|
24273 (JSObject::convertValueToJObject): |
|
24274 * bindings/jni/jni_jsobject.h: |
|
24275 * bindings/objc/objc_jsobject.h: |
|
24276 * bindings/objc/objc_jsobject.mm: |
|
24277 (rootForView): |
|
24278 (windowJavaScriptObject): |
|
24279 (-[JavaScriptObject initWithObjectImp:KJS::root:Bindings::]): |
|
24280 (-[JavaScriptObject dealloc]): |
|
24281 (-[JavaScriptObject _convertValueToObjcValue:KJS::]): |
|
24282 (-[JavaScriptObject call:arguments:]): |
|
24283 (-[JavaScriptObject evaluate:]): |
|
24284 (-[JavaScriptObject getMember:]): |
|
24285 (-[JavaScriptObject setMember:value:]): |
|
24286 (-[JavaScriptObject removeMember:]): |
|
24287 (-[JavaScriptObject toString]): |
|
24288 (-[JavaScriptObject getSlot:]): |
|
24289 (-[JavaScriptObject setSlot:value:]): |
|
24290 * bindings/objc/objc_utility.h: |
|
24291 * bindings/objc/objc_utility.mm: |
|
24292 (KJS::Bindings::convertValueToObjcValue): |
|
24293 * bindings/runtime_root.cpp: Added. |
|
24294 (getReferencesByRootDictionary): |
|
24295 (getReferencesDictionary): |
|
24296 (KJS::Bindings::findReferenceDictionary): |
|
24297 (KJS::Bindings::rootForImp): |
|
24298 (KJS::Bindings::addNativeReference): |
|
24299 (KJS::Bindings::removeNativeReference): |
|
24300 (completedJavaScriptAccess): |
|
24301 (initializeJavaScriptAccessLock): |
|
24302 (lockJavaScriptAccess): |
|
24303 (unlockJavaScriptAccess): |
|
24304 (RootObject::dispatchToJavaScriptThread): |
|
24305 (performJavaScriptAccess): |
|
24306 (RootObject::setFindRootObjectForNativeHandleFunction): |
|
24307 (RootObject::removeAllNativeReferences): |
|
24308 * bindings/runtime_root.h: Added. |
|
24309 (KJS::Bindings::RootObject::RootObject): |
|
24310 (KJS::Bindings::RootObject::~RootObject): |
|
24311 (KJS::Bindings::RootObject::setRootObjectImp): |
|
24312 (KJS::Bindings::RootObject::rootObjectImp): |
|
24313 (KJS::Bindings::RootObject::setInterpreter): |
|
24314 (KJS::Bindings::RootObject::interpreter): |
|
24315 (KJS::Bindings::RootObject::findRootObjectForNativeHandleFunction): |
|
24316 (KJS::Bindings::RootObject::runLoop): |
|
24317 (KJS::Bindings::RootObject::performJavaScriptSource): |
|
24318 |
|
24319 === Safari-130 === |
|
24320 |
|
24321 === Safari-129 === |
|
24322 |
|
24323 2004-02-18 Richard Williamson <rjw@apple.com> |
|
24324 |
|
24325 Added NSNumber/Number conversion. |
|
24326 |
|
24327 Removed some unnecessary KJS:: namespace specifiers. |
|
24328 |
|
24329 Reviewed by Ken. |
|
24330 |
|
24331 * bindings/objc/objc_utility.mm: |
|
24332 (KJS::Bindings::convertValueToObjcValue): |
|
24333 (KJS::Bindings::convertObjcValueToValue): |
|
24334 * bindings/runtime_array.h: |
|
24335 |
|
24336 2004-02-18 Richard Williamson <rjw@apple.com> |
|
24337 |
|
24338 Added support for export NSArrays. |
|
24339 |
|
24340 Updated valueAt() to take an ExecState so we can throw |
|
24341 JS exceptions. |
|
24342 |
|
24343 Implemented excludeSelectorFromJavaScript: in ObjcClass. This allows |
|
24344 ObjectiveC classes to control the visibility of their methods in |
|
24345 JavaScript. |
|
24346 |
|
24347 Reviewed by Ken. |
|
24348 |
|
24349 * bindings/jni/jni_runtime.cpp: |
|
24350 (JavaField::valueFromInstance): |
|
24351 (JavaArray::valueAt): |
|
24352 * bindings/jni/jni_runtime.h: |
|
24353 * bindings/objc/objc_class.mm: |
|
24354 (ObjcClass::methodsNamed): |
|
24355 * bindings/objc/objc_runtime.h: |
|
24356 (KJS::Bindings::ObjcArray::getObjcArray): |
|
24357 * bindings/objc/objc_runtime.mm: |
|
24358 (ObjcField::valueFromInstance): |
|
24359 (ObjcField::setValueToInstance): |
|
24360 (ObjcArray::ObjcArray): |
|
24361 (ObjcArray::~ObjcArray): |
|
24362 (ObjcArray::operator=): |
|
24363 (ObjcArray::setValueAt): |
|
24364 (ObjcArray::valueAt): |
|
24365 (ObjcArray::getLength): |
|
24366 * bindings/objc/objc_utility.mm: |
|
24367 (KJS::Bindings::convertValueToObjcValue): |
|
24368 (KJS::Bindings::convertObjcValueToValue): |
|
24369 * bindings/runtime.cpp: |
|
24370 (Instance::getValueOfField): |
|
24371 * bindings/runtime.h: |
|
24372 * bindings/runtime_array.cpp: |
|
24373 (RuntimeArrayImp::get): |
|
24374 * bindings/runtime_object.cpp: |
|
24375 (RuntimeObjectImp::get): |
|
24376 |
|
24377 2004-02-17 Richard Williamson <rjw@apple.com> |
|
24378 |
|
24379 Added String <-> NSString conversion. |
|
24380 Added tests of String <-> NSString conversion to test program. |
|
24381 |
|
24382 Reviewed by Chris. |
|
24383 |
|
24384 * bindings/objc/objc_utility.mm: |
|
24385 (KJS::Bindings::convertValueToObjcValue): |
|
24386 (KJS::Bindings::convertObjcValueToValue): |
|
24387 * bindings/test.js: |
|
24388 * bindings/testbindings.mm: |
|
24389 (-[MyFirstInterface getString]): |
|
24390 |
|
24391 2004-02-15 Darin Adler <darin@apple.com> |
|
24392 |
|
24393 Reviewed by Dave. |
|
24394 |
|
24395 * JavaScriptCore.pbproj/project.pbxproj: Tweak build styles a bit, fixing OptimizedWithSymbols, |
|
24396 and removing redundant settings of things that match defaults in other build styles. |
|
24397 |
|
24398 2004-02-13 Richard Williamson <rjw@apple.com> |
|
24399 |
|
24400 Work towards the JavaScript ObjC bindings. The bindings now work for |
|
24401 simple scalar types. testbindings.mm is an illustration of how the |
|
24402 bindings work. |
|
24403 |
|
24404 Reviewed by Ken. |
|
24405 |
|
24406 * JavaScriptCore.pbproj/project.pbxproj: |
|
24407 * Makefile.am: |
|
24408 * bindings/jni/jni_class.cpp: |
|
24409 (JavaClass::methodsNamed): |
|
24410 * bindings/jni/jni_class.h: |
|
24411 * bindings/jni/jni_instance.cpp: |
|
24412 (JavaInstance::invokeMethod): |
|
24413 * bindings/jni/jni_instance.h: |
|
24414 * bindings/jni/jni_runtime.h: |
|
24415 (KJS::Bindings::JavaMethod::returnType): |
|
24416 * bindings/make_testbindings: Added. |
|
24417 * bindings/objc/objc_class.h: Added. |
|
24418 (KJS::Bindings::ObjcClass::~ObjcClass): |
|
24419 (KJS::Bindings::ObjcClass::ObjcClass): |
|
24420 (KJS::Bindings::ObjcClass::operator=): |
|
24421 (KJS::Bindings::ObjcClass::constructorAt): |
|
24422 (KJS::Bindings::ObjcClass::numConstructors): |
|
24423 * bindings/objc/objc_class.mm: Added. |
|
24424 (ObjcClass::_commonDelete): |
|
24425 (ObjcClass::_commonCopy): |
|
24426 (ObjcClass::_commonInit): |
|
24427 (_createClassesByIsAIfNecessary): |
|
24428 (ObjcClass::classForIsA): |
|
24429 (ObjcClass::ObjcClass): |
|
24430 (ObjcClass::name): |
|
24431 (ObjcClass::methodsNamed): |
|
24432 (ObjcClass::fieldNamed): |
|
24433 * bindings/objc/objc_header.h: Added. |
|
24434 * bindings/objc/objc_instance.h: Added. |
|
24435 (KJS::Bindings::ObjcInstance::getObject): |
|
24436 * bindings/objc/objc_instance.mm: Added. |
|
24437 (ObjcInstance::ObjcInstance): |
|
24438 (ObjcInstance::~ObjcInstance): |
|
24439 (ObjcInstance::operator=): |
|
24440 (ObjcInstance::begin): |
|
24441 (ObjcInstance::end): |
|
24442 (ObjcInstance::getClass): |
|
24443 (ObjcInstance::invokeMethod): |
|
24444 (ObjcInstance::defaultValue): |
|
24445 (ObjcInstance::stringValue): |
|
24446 (ObjcInstance::numberValue): |
|
24447 (ObjcInstance::booleanValue): |
|
24448 (ObjcInstance::valueOf): |
|
24449 * bindings/objc/objc_jsobject.h: Added. |
|
24450 * bindings/objc/objc_jsobject.mm: Added. |
|
24451 * bindings/objc/objc_runtime.h: |
|
24452 (KJS::Bindings::ObjcField::~ObjcField): |
|
24453 (KJS::Bindings::ObjcField::ObjcField): |
|
24454 (KJS::Bindings::ObjcField::operator=): |
|
24455 (KJS::Bindings::ObjcMethod::ObjcMethod): |
|
24456 (KJS::Bindings::ObjcMethod::~ObjcMethod): |
|
24457 (KJS::Bindings::ObjcMethod::operator=): |
|
24458 * bindings/objc/objc_runtime.mm: Added. |
|
24459 (ObjcMethod::ObjcMethod): |
|
24460 (ObjcMethod::name): |
|
24461 (ObjcMethod::numParameters): |
|
24462 (ObjcMethod::getMethodSignature): |
|
24463 (ObjcField::ObjcField): |
|
24464 (ObjcField::name): |
|
24465 (ObjcField::type): |
|
24466 (ObjcField::valueFromInstance): |
|
24467 (ObjcField::setValueToInstance): |
|
24468 * bindings/objc/objc_utility.h: Added. |
|
24469 (KJS::Bindings::): |
|
24470 * bindings/objc/objc_utility.mm: Added. |
|
24471 (KJS::Bindings::JSMethodNameToObjCMethodName): |
|
24472 (KJS::Bindings::convertValueToObjcValue): |
|
24473 (KJS::Bindings::convertObjcValueToValue): |
|
24474 (KJS::Bindings::objcValueTypeForType): |
|
24475 * bindings/runtime.cpp: |
|
24476 (MethodList::MethodList): |
|
24477 (MethodList::operator=): |
|
24478 (Instance::setValueOfField): |
|
24479 (Instance::createBindingForLanguageInstance): |
|
24480 (Instance::createRuntimeObject): |
|
24481 * bindings/runtime.h: |
|
24482 * bindings/runtime_method.cpp: |
|
24483 (RuntimeMethodImp::RuntimeMethodImp): |
|
24484 (RuntimeMethodImp::get): |
|
24485 (RuntimeMethodImp::call): |
|
24486 * bindings/runtime_method.h: |
|
24487 * bindings/runtime_object.cpp: |
|
24488 (RuntimeObjectImp::get): |
|
24489 (RuntimeObjectImp::hasProperty): |
|
24490 * bindings/test.js: Added. |
|
24491 * bindings/testbindings.mm: Added. |
|
24492 (-[MySecondInterface init]): |
|
24493 (-[MyFirstInterface init]): |
|
24494 (-[MyFirstInterface dealloc]): |
|
24495 (+[MyFirstInterface JavaScriptNameForSelector:]): |
|
24496 (-[MyFirstInterface getInt]): |
|
24497 (-[MyFirstInterface setInt:]): |
|
24498 (-[MyFirstInterface getMySecondInterface]): |
|
24499 (-[MyFirstInterface logMessage:]): |
|
24500 (GlobalImp::className): |
|
24501 (readJavaScriptFromFile): |
|
24502 (main): |
|
24503 |
|
24504 === Safari-128 === |
|
24505 |
|
24506 2004-02-08 Darin Adler <darin@apple.com> |
|
24507 |
|
24508 Reviewed by Dave. |
|
24509 |
|
24510 - fixed things seen in the profile, for a total speedup of 4% on cvs-base (including changes across all projects) |
|
24511 |
|
24512 * JavaScriptCorePrefix.h: Add a workaround for a bug in our system headers that prevents the <ctype.h> |
|
24513 macros from working right in C++ code that uses the <cctype> header. |
|
24514 |
|
24515 * kjs/ustring.cpp: |
|
24516 (KJS::inlineUTF8SequenceLengthNonASCII): Added. |
|
24517 (KJS::UTF8SequenceLengthNonASCII): Added. |
|
24518 (KJS::inlineUTF8SequenceLength): Added. |
|
24519 (KJS::UTF8SequenceLength): Calls inlineUTF8SequenceLengthNonASCII now. |
|
24520 (KJS::decodeUTF8Sequence): Use new inlineUTF8SequenceLengthNonASCII; faster for ASCII. |
|
24521 (KJS::createSortedOffsetsArray): Add special case for 1, 2, and 3 offsets, so we don't do qsort for those. |
|
24522 (KJS::convertUTF16OffsetsToUTF8Offsets): Use new inlineUTF8SequenceLengthNonASCII; faster for ASCII. |
|
24523 (KJS::convertUTF8OffsetsToUTF16Offsets): Use new inlineUTF8SequenceLengthNonASCII; faster for ASCII. |
|
24524 |
|
24525 - fixed the test program so it won't hit the interpreter lock assertion |
|
24526 |
|
24527 * kjs/testkjs.cpp: (main): Just lock around the whole thing, since the test is singly threaded. |
|
24528 |
|
24529 === Safari-127 === |
|
24530 |
|
24531 2004-02-06 Richard Williamson <rjw@apple.com> |
|
24532 |
|
24533 Fixed 3550242 and 3546977. The first diff prevents an assert from firing. The second diff prevents a JavaScript exception, caused be an invalid conversion, which has a downstream consequence of preventing a valid conversion. |
|
24534 |
|
24535 Reviewed by John. |
|
24536 |
|
24537 * bindings/jni/jni_jsobject.cpp: |
|
24538 (JSObject::toString): |
|
24539 * bindings/jni/jni_utility.cpp: |
|
24540 (KJS::Bindings::convertValueToJValue): |
|
24541 |
|
24542 2004-02-02 Darin Adler <darin@apple.com> |
|
24543 |
|
24544 Reviewed by Maciej. |
|
24545 |
|
24546 - fixed <rdar://problem/3546613>: array of negative size leads to crash (test page at oscar.the-rileys.net) |
|
24547 |
|
24548 * kjs/array_object.cpp: |
|
24549 (ArrayInstanceImp::ArrayInstanceImp): If the length is greater than 10,000, don't allocate an array until |
|
24550 we start putting values in. This prevents new Array(2147483647) from causing trouble. |
|
24551 (ArrayObjectImp::construct): Check number as described in specification, and raise a range error if the |
|
24552 number is out of range. This prevents new Array(-1) from causing trouble. |
|
24553 |
|
24554 - fixed <rdar://problem/3545756>: Math.round screws up on numbers bigger than 2^31 (incorrect results on HP-35 calculator page) |
|
24555 |
|
24556 * kjs/math_object.cpp: (MathFuncImp::call): Change implementation to be much simpler and not involve |
|
24557 casting to int. Results now match those in other browsers. |
|
24558 |
|
24559 2004-02-02 Darin Adler <darin@apple.com> |
|
24560 |
|
24561 Reviewed by Maciej. |
|
24562 |
|
24563 - fixed <rdar://problem/3519285>: integer operations on large negative numbers yield bad results (discovered with "HTMLCrypt") |
|
24564 - fixed other related overflow issues |
|
24565 |
|
24566 * kjs/value.h: Changed return types of toInteger, toInt32, toUInt32, and toUInt16. |
|
24567 * kjs/value.cpp: |
|
24568 (ValueImp::toInteger): Change to return a double, since this operation, from the ECMA specification, |
|
24569 must not restrict values to the range of a particular integer type. |
|
24570 (ValueImp::toInt32): Used a sized integer type for the result of this function, and also added |
|
24571 proper handling for negative results from fmod. |
|
24572 (ValueImp::toUInt32): Ditto. |
|
24573 (ValueImp::toUInt16): Ditto. |
|
24574 (ValueImp::dispatchToUInt32): Changed result type from unsigned to uint32_t. |
|
24575 |
|
24576 * kjs/array_object.cpp: (ArrayProtoFuncImp::call): Use a double instead of an int to handle |
|
24577 out-of-integer-range values better in the slice function. |
|
24578 * kjs/internal.cpp: (KJS::roundValue): Streamline the function, handling NAN and infinity properly. |
|
24579 * kjs/number_object.cpp: (NumberProtoFuncImp::call): Use a double instead of an int to handle |
|
24580 out-of-integer-range values better in the toString function. |
|
24581 * kjs/string_object.cpp: (StringProtoFuncImp::call): Use a double instead of an int to handle |
|
24582 out-of-integer-range values better in the charAt, charCodeAt, indexOf, lastIndexOf, slice, |
|
24583 and substr functions. |
|
24584 |
|
24585 === Safari-126 === |
|
24586 |
|
24587 2004-01-30 Richard Williamson <rjw@apple.com> |
|
24588 |
|
24589 Fixed 3542044. Create KJS::String using UString constructor instead of passing UTF8 string to char* constructor. |
|
24590 |
|
24591 Reviewed by Darin. |
|
24592 |
|
24593 * bindings/jni/jni_instance.cpp: |
|
24594 (JavaInstance::stringValue): |
|
24595 |
|
24596 2004-01-26 Darin Adler <darin@apple.com> |
|
24597 |
|
24598 * Makefile.am: Switch from pbxbuild to xcodebuild. |
|
24599 |
|
24600 2004-01-22 Richard Williamson <rjw@apple.com> |
|
24601 |
|
24602 Added stubs for ObjC language binding to JavaScript. |
|
24603 |
|
24604 * JavaScriptCore.pbproj/project.pbxproj: |
|
24605 * bindings/jni/jni_runtime.h: |
|
24606 * bindings/objc/objc_runtime.h: Added. |
|
24607 (KJS::Bindings::ObjcParameter::ObjcParameter): |
|
24608 (KJS::Bindings::ObjcParameter::~ObjcParameter): |
|
24609 (KJS::Bindings::ObjcParameter::operator=): |
|
24610 (KJS::Bindings::ObjcParameter::type): |
|
24611 (KJS::Bindings::ObjcConstructor::ObjcConstructor): |
|
24612 (KJS::Bindings::ObjcConstructor::~ObjcConstructor): |
|
24613 (KJS::Bindings::ObjcConstructor::_commonCopy): |
|
24614 (KJS::Bindings::ObjcConstructor::operator=): |
|
24615 (KJS::Bindings::ObjcConstructor::value): |
|
24616 (KJS::Bindings::ObjcConstructor::parameterAt): |
|
24617 (KJS::Bindings::ObjcConstructor::numParameters): |
|
24618 (KJS::Bindings::ObjcField::ObjcField): |
|
24619 (KJS::Bindings::ObjcField::~ObjcField): |
|
24620 * bindings/runtime.h: |
|
24621 |
|
24622 2004-01-22 Richard Williamson <rjw@apple.com> |
|
24623 |
|
24624 Simplified JavaString by using UString as backing store. This |
|
24625 revealed a bug in CString's assignment operator which I fixed. |
|
24626 |
|
24627 Removed some dead code. |
|
24628 |
|
24629 Reviewed by John. |
|
24630 |
|
24631 * bindings/jni/jni_runtime.h: |
|
24632 (KJS::Bindings::JavaString::JavaString): |
|
24633 (KJS::Bindings::JavaString::_commonInit): |
|
24634 (KJS::Bindings::JavaString::UTF8String): |
|
24635 (KJS::Bindings::JavaString::uchars): |
|
24636 (KJS::Bindings::JavaString::length): |
|
24637 (KJS::Bindings::JavaString::ustring): |
|
24638 * bindings/runtime_object.cpp: |
|
24639 (RuntimeObjectImp::RuntimeObjectImp): |
|
24640 * bindings/runtime_object.h: |
|
24641 * kjs/ustring.cpp: |
|
24642 (KJS::CString::CString): |
|
24643 (KJS::CString::operator=): |
|
24644 |
|
24645 === Safari-125 === |
|
24646 |
|
24647 === Safari-124 === |
|
24648 |
|
24649 2004-01-16 Richard Williamson <rjw@apple.com> |
|
24650 |
|
24651 Fixed 3525853. We weren't handling mapping to overloaded Java |
|
24652 methods very well. Even though this is undefined the other |
|
24653 browsers support it. Also fixed a bug with returning arrays |
|
24654 from Java functions. |
|
24655 |
|
24656 Reviewed by John. |
|
24657 |
|
24658 * bindings/jni/jni_class.cpp: |
|
24659 (JavaClass::_commonInit): |
|
24660 (JavaClass::methodsNamed): |
|
24661 * bindings/jni/jni_class.h: |
|
24662 * bindings/jni/jni_instance.cpp: |
|
24663 (JavaInstance::invokeMethod): |
|
24664 * bindings/jni/jni_instance.h: |
|
24665 * bindings/jni/jni_runtime.cpp: |
|
24666 (JavaArray::convertJObjectToArray): |
|
24667 (JavaField::valueFromInstance): |
|
24668 (JavaMethod::signature): |
|
24669 (JavaArray::valueAt): |
|
24670 * bindings/jni/jni_runtime.h: |
|
24671 * bindings/jni_jsobject.cpp: |
|
24672 (JSObject::call): |
|
24673 (JSObject::convertJObjectToValue): |
|
24674 * bindings/runtime.cpp: |
|
24675 (MethodList::addMethod): |
|
24676 (MethodList::length): |
|
24677 (MethodList::methodAt): |
|
24678 (MethodList::~MethodList): |
|
24679 * bindings/runtime.h: |
|
24680 (KJS::Bindings::MethodList::MethodList): |
|
24681 * bindings/runtime_method.cpp: |
|
24682 (RuntimeMethodImp::RuntimeMethodImp): |
|
24683 (RuntimeMethodImp::get): |
|
24684 (RuntimeMethodImp::call): |
|
24685 * bindings/runtime_method.h: |
|
24686 * bindings/runtime_object.cpp: |
|
24687 (RuntimeObjectImp::get): |
|
24688 (RuntimeObjectImp::hasProperty): |
|
24689 |
|
24690 2004-01-16 Richard Williamson <rjw@apple.com> |
|
24691 |
|
24692 Fixed 3531229. Another place that needs the Push/PopLocalFrame |
|
24693 protection implemented for 3530401. |
|
24694 |
|
24695 Reviewed by John. |
|
24696 |
|
24697 * bindings/runtime_method.cpp: |
|
24698 (RuntimeMethodImp::call): |
|
24699 |
|
24700 2004-01-15 Richard Williamson <rjw@apple.com> |
|
24701 |
|
24702 Fixed 3530401. JNI doesn't cleanup local refs created on the |
|
24703 main thread. IMO this is a bad bug in our JMI implementation. |
|
24704 |
|
24705 To work-around the problem I explicitly delete all local refs. |
|
24706 Further, I've added Push/PopLocalFrame calls to catch any refs |
|
24707 that I may have missed. This will guarantee that we don't leak |
|
24708 any Java references. |
|
24709 |
|
24710 Reviewed by John. |
|
24711 |
|
24712 * bindings/jni/jni_class.cpp: |
|
24713 (JavaClass::_commonInit): |
|
24714 (JavaClass::JavaClass): |
|
24715 * bindings/jni/jni_instance.cpp: |
|
24716 (JavaInstance::begin): |
|
24717 (JavaInstance::end): |
|
24718 * bindings/jni/jni_instance.h: |
|
24719 * bindings/jni/jni_runtime.cpp: |
|
24720 (JavaConstructor::JavaConstructor): |
|
24721 (JavaMethod::JavaMethod): |
|
24722 * bindings/jni_jsobject.cpp: |
|
24723 (JSObject::listFromJArray): |
|
24724 * bindings/runtime.h: |
|
24725 (KJS::Bindings::Instance::begin): |
|
24726 (KJS::Bindings::Instance::end): |
|
24727 * bindings/runtime_object.cpp: |
|
24728 (RuntimeObjectImp::get): |
|
24729 (RuntimeObjectImp::put): |
|
24730 (RuntimeObjectImp::canPut): |
|
24731 (RuntimeObjectImp::hasProperty): |
|
24732 (RuntimeObjectImp::defaultValue): |
|
24733 |
|
24734 2004-01-15 Vicki Murley <vicki@apple.com> |
|
24735 |
|
24736 Reviewed by Darin. |
|
24737 |
|
24738 * JavaScriptCore.pbproj/project.pbxproj: Update copyright date to 2004. |
|
24739 |
|
24740 2004-01-14 Richard Williamson <rjw@apple.com> |
|
24741 |
|
24742 Fixed 3529466. With recent changes to Java plugin we must no |
|
24743 longer call DeleteLocalRef(). Not a problem, it was an optimization anyway. |
|
24744 |
|
24745 Reviewed by John. |
|
24746 |
|
24747 * bindings/jni/jni_instance.cpp: |
|
24748 (JObjectWrapper::JObjectWrapper): |
|
24749 |
|
24750 === Safari-122 === |
|
24751 |
|
24752 2004-01-14 Richard Williamson <rjw@apple.com> |
|
24753 |
|
24754 Fixed 3529010. |
|
24755 |
|
24756 Finalize may be called on an JSObject after we've already remove all our references. The assert in this case is firing because we've received a finalize call from Java for an instance that we no longer know about. The fix is to check in finalize that we're getting a call on an instance that we still care about. |
|
24757 |
|
24758 Reviewed by John. |
|
24759 |
|
24760 * bindings/jni_jsobject.cpp: |
|
24761 (addJavaReference): |
|
24762 (removeJavaReference): |
|
24763 (RootObject::removeAllJavaReferencesForRoot): |
|
24764 (JSObject::invoke): |
|
24765 |
|
24766 2004-01-13 Richard Williamson <rjw@apple.com> |
|
24767 |
|
24768 Fixed 3528324. |
|
24769 |
|
24770 The run loop that is used to execute JavaScript (in practice, always the main run loop) is held in a class variable. It is set and retained once and should not be released. Unfortunately is it being released when the 'root' object on a LiveConnect applet is released. This has the symptom of eventually causing an deallocation of the main run loop! Usually after about 5 instantiations/destructions of a LiveConnect applet. The CFRelease of the run loop was removed. |
|
24771 |
|
24772 Reviewed by Hyatt. |
|
24773 |
|
24774 * bindings/jni_jsobject.h: |
|
24775 (KJS::Bindings::RootObject::~RootObject): |
|
24776 |
|
24777 === Safari-121 === |
|
24778 |
|
24779 === Safari-120 === |
|
24780 |
|
24781 2004-01-06 Richard Williamson <rjw@apple.com> |
|
24782 |
|
24783 Fixed 3521814. Finalize messages weren't being dispatched! |
|
24784 |
|
24785 Reviewed by John. |
|
24786 |
|
24787 * bindings/jni_jsobject.cpp: |
|
24788 (JSObject::invoke): |
|
24789 |
|
24790 2004-01-05 Richard Williamson <rjw@apple.com> |
|
24791 |
|
24792 Added cache of JNI method IDs to minimize allocations. This mitigates the problem |
|
24793 described by 3515579. |
|
24794 |
|
24795 Also cleanup up logging of Java exceptions. |
|
24796 |
|
24797 Reviewed by John. |
|
24798 |
|
24799 * bindings/jni/jni_class.cpp: |
|
24800 (JavaClass::classForInstance): |
|
24801 * bindings/jni/jni_instance.cpp: |
|
24802 (JavaInstance::JavaInstance): |
|
24803 (JavaInstance::getClass): |
|
24804 (JavaInstance::invokeMethod): |
|
24805 (JObjectWrapper::JObjectWrapper): |
|
24806 (JObjectWrapper::~JObjectWrapper): |
|
24807 * bindings/jni/jni_instance.h: |
|
24808 (KJS::Bindings::JavaInstance::operator=): |
|
24809 * bindings/jni/jni_runtime.cpp: |
|
24810 (JavaMethod::JavaMethod): |
|
24811 (JavaMethod::methodID): |
|
24812 * bindings/jni/jni_runtime.h: |
|
24813 (KJS::Bindings::JavaMethod::JavaMethod): |
|
24814 * bindings/jni/jni_utility.cpp: |
|
24815 (callJNIMethod): |
|
24816 (callJNIMethodIDA): |
|
24817 (callJNIMethodA): |
|
24818 (KJS::Bindings::getMethodID): |
|
24819 (KJS::Bindings::callJNIVoidMethodIDA): |
|
24820 (KJS::Bindings::callJNIObjectMethodIDA): |
|
24821 (KJS::Bindings::callJNIByteMethodIDA): |
|
24822 (KJS::Bindings::callJNICharMethodIDA): |
|
24823 (KJS::Bindings::callJNIShortMethodIDA): |
|
24824 (KJS::Bindings::callJNIIntMethodIDA): |
|
24825 (KJS::Bindings::callJNILongMethodIDA): |
|
24826 (KJS::Bindings::callJNIFloatMethodIDA): |
|
24827 (KJS::Bindings::callJNIDoubleMethodIDA): |
|
24828 (KJS::Bindings::callJNIBooleanMethodIDA): |
|
24829 (KJS::Bindings::getCharactersFromJStringInEnv): |
|
24830 (KJS::Bindings::getUCharactersFromJStringInEnv): |
|
24831 (KJS::Bindings::getJNIField): |
|
24832 * bindings/jni/jni_utility.h: |
|
24833 |
|
24834 l2003-12-23 John Sullivan <sullivan@apple.com> |
|
24835 |
|
24836 * JavaScriptCore.pbproj/project.pbxproj: |
|
24837 Xcode version wars, harmless |
|
24838 |
|
24839 2003-12-23 Darin Adler <darin@apple.com> |
|
24840 |
|
24841 Reviewed by John (concept, not code, which is just the old code coming back). |
|
24842 |
|
24843 - fixed 3518092: REGRESSION (100-119): getting NaN instead of HH:MM times |
|
24844 |
|
24845 * kjs/date_object.cpp: Added back our CF-based implementations of gmtime, localtime, |
|
24846 mktime, timegm, and time, because mktime, at least, won't handle a year of 0. |
|
24847 |
|
24848 2003-12-19 Richard Williamson <rjw@apple.com> |
|
24849 |
|
24850 Fixed 3515597. When an error occurs we need |
|
24851 to make sure result values are zeroed. |
|
24852 |
|
24853 Cleaned up logs by adding a newline. |
|
24854 |
|
24855 Reviewed by John. |
|
24856 |
|
24857 * bindings/jni/jni_utility.cpp: |
|
24858 (KJS::Bindings::getJavaVM): |
|
24859 (KJS::Bindings::getJNIEnv): |
|
24860 (callJNIMethod): |
|
24861 (callJNIMethodA): |
|
24862 (KJS::Bindings::getJNIField): |
|
24863 * bindings/jni_jsobject.cpp: |
|
24864 (JSObject::convertValueToJObject): |
|
24865 |
|
24866 === Safari-119 === |
|
24867 |
|
24868 2003-12-17 Richard Williamson <rjw@apple.com> |
|
24869 |
|
24870 Ensure that all the symbols we export are in the KJS |
|
24871 namespace (3512245). |
|
24872 |
|
24873 Also renamed JavaString.characters() to JavaString.UTF8String() |
|
24874 for enhanced clarity. |
|
24875 |
|
24876 Added some sanity checking to constructor of JObjectWrapper. |
|
24877 |
|
24878 Reviewed by Dave. |
|
24879 |
|
24880 * ChangeLog: |
|
24881 * bindings/jni/jni_class.cpp: |
|
24882 * bindings/jni/jni_class.h: |
|
24883 * bindings/jni/jni_instance.cpp: |
|
24884 (JavaInstance::invokeMethod): |
|
24885 (JObjectWrapper::JObjectWrapper): |
|
24886 * bindings/jni/jni_instance.h: |
|
24887 * bindings/jni/jni_runtime.cpp: |
|
24888 (JavaParameter::JavaParameter): |
|
24889 (JavaField::JavaField): |
|
24890 (JavaMethod::JavaMethod): |
|
24891 (JavaMethod::signature): |
|
24892 * bindings/jni/jni_runtime.h: |
|
24893 (KJS::Bindings::JavaString::ascii): |
|
24894 (KJS::Bindings::JavaString::UTF8String): |
|
24895 (KJS::Bindings::JavaString::JavaString): |
|
24896 (KJS::Bindings::JavaString::_commonInit): |
|
24897 (KJS::Bindings::JavaString::uchars): |
|
24898 (KJS::Bindings::JavaString::length): |
|
24899 (KJS::Bindings::JavaString::ustring): |
|
24900 (KJS::Bindings::JavaParameter::type): |
|
24901 (KJS::Bindings::JavaField::name): |
|
24902 (KJS::Bindings::JavaField::type): |
|
24903 (KJS::Bindings::JavaMethod::name): |
|
24904 (KJS::Bindings::JavaMethod::returnType): |
|
24905 * bindings/jni/jni_utility.cpp: |
|
24906 (KJS::Bindings::getJavaVM): |
|
24907 (KJS::Bindings::getJNIEnv): |
|
24908 (KJS::Bindings::callJNIVoidMethod): |
|
24909 (KJS::Bindings::callJNIObjectMethod): |
|
24910 (KJS::Bindings::callJNIBooleanMethod): |
|
24911 (KJS::Bindings::callJNIByteMethod): |
|
24912 (KJS::Bindings::callJNICharMethod): |
|
24913 (KJS::Bindings::callJNIShortMethod): |
|
24914 (KJS::Bindings::callJNIIntMethod): |
|
24915 (KJS::Bindings::callJNILongMethod): |
|
24916 (KJS::Bindings::callJNIFloatMethod): |
|
24917 (KJS::Bindings::callJNIDoubleMethod): |
|
24918 (KJS::Bindings::callJNIVoidMethodA): |
|
24919 (KJS::Bindings::callJNIObjectMethodA): |
|
24920 (KJS::Bindings::callJNIByteMethodA): |
|
24921 (KJS::Bindings::callJNICharMethodA): |
|
24922 (KJS::Bindings::callJNIShortMethodA): |
|
24923 (KJS::Bindings::callJNIIntMethodA): |
|
24924 (KJS::Bindings::callJNILongMethodA): |
|
24925 (KJS::Bindings::callJNIFloatMethodA): |
|
24926 (KJS::Bindings::callJNIDoubleMethodA): |
|
24927 (KJS::Bindings::callJNIBooleanMethodA): |
|
24928 (KJS::Bindings::getCharactersFromJString): |
|
24929 (KJS::Bindings::releaseCharactersForJString): |
|
24930 (KJS::Bindings::getCharactersFromJStringInEnv): |
|
24931 (KJS::Bindings::releaseCharactersForJStringInEnv): |
|
24932 (KJS::Bindings::getUCharactersFromJStringInEnv): |
|
24933 (KJS::Bindings::releaseUCharactersForJStringInEnv): |
|
24934 (KJS::Bindings::JNITypeFromClassName): |
|
24935 (KJS::Bindings::signatureFromPrimitiveType): |
|
24936 (KJS::Bindings::JNITypeFromPrimitiveType): |
|
24937 (KJS::Bindings::getJNIField): |
|
24938 (KJS::Bindings::convertValueToJValue): |
|
24939 * bindings/jni/jni_utility.h: |
|
24940 * bindings/jni_jsobject.cpp: |
|
24941 (KJS::Bindings::JSObject::invoke): |
|
24942 (KJS::Bindings::JSObject::JSObject): |
|
24943 (KJS::Bindings::JSObject::call): |
|
24944 (KJS::Bindings::JSObject::eval): |
|
24945 (KJS::Bindings::JSObject::getMember): |
|
24946 (KJS::Bindings::JSObject::setMember): |
|
24947 (KJS::Bindings::JSObject::removeMember): |
|
24948 (KJS::Bindings::JSObject::getSlot): |
|
24949 (KJS::Bindings::JSObject::setSlot): |
|
24950 (KJS::Bindings::JSObject::toString): |
|
24951 (KJS::Bindings::JSObject::finalize): |
|
24952 (KJS::Bindings::JSObject::createNative): |
|
24953 (KJS::Bindings::JSObject::convertValueToJObject): |
|
24954 (KJS::Bindings::JSObject::convertJObjectToValue): |
|
24955 (KJS::Bindings::JSObject::listFromJArray): |
|
24956 * bindings/jni_jsobject.h: |
|
24957 * bindings/runtime.cpp: |
|
24958 * bindings/runtime.h: |
|
24959 * bindings/runtime_method.cpp: |
|
24960 * bindings/runtime_method.h: |
|
24961 |
|
24962 === Safari-118 === |
|
24963 |
|
24964 2003-12-16 Richard Williamson <rjw@apple.com> |
|
24965 |
|
24966 Ack! More assertions. Lock ALL entry points into the interpreter! |
|
24967 (3511733). |
|
24968 |
|
24969 Reviewed by Ken. |
|
24970 |
|
24971 * bindings/jni_jsobject.cpp: |
|
24972 (Bindings::JSObject::call): |
|
24973 (Bindings::JSObject::eval): |
|
24974 (Bindings::JSObject::getMember): |
|
24975 (Bindings::JSObject::setMember): |
|
24976 (Bindings::JSObject::removeMember): |
|
24977 (Bindings::JSObject::getSlot): |
|
24978 (Bindings::JSObject::setSlot): |
|
24979 (Bindings::JSObject::convertJObjectToValue): |
|
24980 |
|
24981 2003-12-15 Richard Williamson <rjw@apple.com> |
|
24982 |
|
24983 Fixed a couple of snafus and removed some logging. |
|
24984 |
|
24985 Reviewed by Maciej. |
|
24986 |
|
24987 * bindings/jni_jsobject.cpp: |
|
24988 (Bindings::performJavaScriptAccess): |
|
24989 (Bindings::completedJavaScriptAccess): |
|
24990 (Bindings::dispatchToJavaScriptThread): |
|
24991 Removed some annoying JS_LOG clutter. |
|
24992 |
|
24993 (Bindings::RootObject::removeAllJavaReferencesForRoot): |
|
24994 Fixed allocation of key buffer that was called after it was needed. |
|
24995 |
|
24996 (Bindings::JSObject::invoke): |
|
24997 (Bindings::JSObject::JSObject): |
|
24998 (Bindings::JSObject::getMember): |
|
24999 (Bindings::JSObject::getSlot): |
|
25000 Added additional interpreter locks around getMember and getSlot. |
|
25001 These functions may cause allocation of JS impls. |
|
25002 |
|
25003 2003-12-15 Richard Williamson <rjw@apple.com> |
|
25004 |
|
25005 args weren't passed to 'call' invocation. d'oh. |
|
25006 lock interpreter when we create instances of JS impls. |
|
25007 |
|
25008 Reviewed by Maciej. |
|
25009 |
|
25010 * bindings/jni_jsobject.cpp: |
|
25011 (Bindings::JSObject::call): |
|
25012 (Bindings::JSObject::eval): |
|
25013 (Bindings::JSObject::getMember): |
|
25014 (Bindings::JSObject::setMember): |
|
25015 (Bindings::JSObject::getSlot): |
|
25016 (Bindings::JSObject::convertValueToJObject): |
|
25017 (Bindings::JSObject::convertJObjectToValue): |
|
25018 (Bindings::JSObject::listFromJArray): |
|
25019 * bindings/jni_jsobject.h: |
|
25020 |
|
25021 2003-12-15 Richard Williamson <rjw@apple.com> |
|
25022 |
|
25023 Last piece of LiveConnect! This checkin adds implementation |
|
25024 of the Java to JavaScript object conversion functions. |
|
25025 |
|
25026 Reviewed by John. |
|
25027 |
|
25028 * bindings/jni/jni_instance.cpp: |
|
25029 (JavaInstance::invokeMethod): |
|
25030 * bindings/jni/jni_utility.cpp: |
|
25031 * bindings/jni/jni_utility.h: |
|
25032 * bindings/jni_jsobject.cpp: |
|
25033 (Bindings::JSObject::invoke): |
|
25034 (Bindings::JSObject::call): |
|
25035 (Bindings::JSObject::eval): |
|
25036 (Bindings::JSObject::getMember): |
|
25037 (Bindings::JSObject::setMember): |
|
25038 (Bindings::JSObject::getSlot): |
|
25039 (Bindings::JSObject::setSlot): |
|
25040 (Bindings::JSObject::createNative): |
|
25041 (Bindings::JSObject::convertValueToJObject): |
|
25042 (Bindings::JSObject::convertJObjectToValue): |
|
25043 (Bindings::JSObject::listFromJArray): |
|
25044 * bindings/jni_jsobject.h: |
|
25045 (Bindings::): |
|
25046 * bindings/runtime_method.cpp: |
|
25047 (RuntimeMethodImp::get): |
|
25048 (RuntimeMethodImp::codeType): |
|
25049 (RuntimeMethodImp::execute): |
|
25050 |
|
25051 2003-12-12 Richard Williamson <rjw@apple.com> |
|
25052 |
|
25053 Added implementation of stubs in JSObject. All that |
|
25054 remains is a couple of simple conversion functions stubs and |
|
25055 we're done with LiveConnect. Also, changed string passing to |
|
25056 JS to use uchars instead of chars. |
|
25057 |
|
25058 Reviewed by Maciej. |
|
25059 |
|
25060 * bindings/jni/jni_runtime.h: |
|
25061 (Bindings::JavaString::JavaString): |
|
25062 (Bindings::JavaString::_commonInit): |
|
25063 (Bindings::JavaString::_commonCopy): |
|
25064 (Bindings::JavaString::_commonDelete): |
|
25065 (Bindings::JavaString::~JavaString): |
|
25066 (Bindings::JavaString::operator=): |
|
25067 (Bindings::JavaString::uchars): |
|
25068 (Bindings::JavaString::length): |
|
25069 (Bindings::JavaString::ustring): |
|
25070 * bindings/jni/jni_utility.cpp: |
|
25071 (getUCharactersFromJStringInEnv): |
|
25072 (releaseUCharactersForJStringInEnv): |
|
25073 (convertValueToJObject): |
|
25074 (convertJObjectToValue): |
|
25075 * bindings/jni/jni_utility.h: |
|
25076 * bindings/jni_jsobject.cpp: |
|
25077 (Bindings::JSObject::invoke): |
|
25078 (Bindings::JSObject::call): |
|
25079 (Bindings::JSObject::eval): |
|
25080 (Bindings::JSObject::getMember): |
|
25081 (Bindings::JSObject::setMember): |
|
25082 (Bindings::JSObject::removeMember): |
|
25083 (Bindings::JSObject::getSlot): |
|
25084 (Bindings::JSObject::setSlot): |
|
25085 * bindings/jni_jsobject.h: |
|
25086 |
|
25087 2003-12-12 Richard Williamson <rjw@apple.com> |
|
25088 |
|
25089 Ensure that all calls from Java into JavaScript are |
|
25090 performed on a designated thread (the main thread). |
|
25091 |
|
25092 Reviewed by Ken. |
|
25093 |
|
25094 * bindings/jni_jsobject.cpp: |
|
25095 (isJavaScriptThread): |
|
25096 (rootForImp): |
|
25097 (Bindings::performJavaScriptAccess): |
|
25098 (Bindings::completedJavaScriptAccess): |
|
25099 (Bindings::initializeJavaScriptAccessLock): |
|
25100 (Bindings::lockJavaScriptAccess): |
|
25101 (Bindings::unlockJavaScriptAccess): |
|
25102 (Bindings::dispatchToJavaScriptThread): |
|
25103 (Bindings::RootObject::setFindRootObjectForNativeHandleFunction): |
|
25104 (Bindings::RootObject::removeAllJavaReferencesForRoot): |
|
25105 (Bindings::JSObject::invoke): |
|
25106 (Bindings::JSObject::JSObject): |
|
25107 (Bindings::JSObject::call): |
|
25108 (Bindings::JSObject::eval): |
|
25109 (Bindings::JSObject::getMember): |
|
25110 (Bindings::JSObject::setMember): |
|
25111 (Bindings::JSObject::removeMember): |
|
25112 (Bindings::JSObject::getSlot): |
|
25113 (Bindings::JSObject::setSlot): |
|
25114 (Bindings::JSObject::toString): |
|
25115 (Bindings::JSObject::finalize): |
|
25116 (Bindings::JSObject::getWindow): |
|
25117 * bindings/jni_jsobject.h: |
|
25118 (Bindings::RootObject::~RootObject): |
|
25119 (Bindings::RootObject::findRootObjectForNativeHandleFunction): |
|
25120 (Bindings::RootObject::runLoop): |
|
25121 (Bindings::RootObject::performJavaScriptSource): |
|
25122 (Bindings::): |
|
25123 |
|
25124 2003-12-11 Richard Williamson <rjw@apple.com> |
|
25125 |
|
25126 Added support for calling a JavaScript function from |
|
25127 Java. Right now this only works for void func(void) |
|
25128 functions, but the conversion of args and return values |
|
25129 will come shortly. |
|
25130 |
|
25131 Cleaned up and verified reference counting scheme, and |
|
25132 dereferencing of vended JavaScript objects when applet is |
|
25133 destroyed (actually when part is destroyed). |
|
25134 |
|
25135 Removed link hack for testkjs now that the Java folks think |
|
25136 they have a solution for the 1.4.2 JavaVM link problem. Although |
|
25137 Greg B. thinks his solution may cause problems for the 1.3.1 |
|
25138 version of the VM!?! |
|
25139 |
|
25140 Reviewed by Ken. |
|
25141 |
|
25142 * Makefile.am: |
|
25143 * bindings/jni/jni_runtime.h: |
|
25144 (Bindings::JavaString::JavaString): |
|
25145 * bindings/jni/jni_utility.cpp: |
|
25146 (convertValueToJValue): |
|
25147 (convertValueToJObject): |
|
25148 (listFromJArray): |
|
25149 * bindings/jni/jni_utility.h: |
|
25150 * bindings/jni_jsobject.cpp: |
|
25151 (KJS_setFindRootObjectForNativeHandleFunction): |
|
25152 (KJS_findRootObjectForNativeHandleFunction): |
|
25153 (getReferencesByRootDictionary): |
|
25154 (getReferencesDictionary): |
|
25155 (findReferenceDictionary): |
|
25156 (rootForImp): |
|
25157 (addJavaReference): |
|
25158 (removeJavaReference): |
|
25159 * bindings/jni_jsobject.h: |
|
25160 (Bindings::RootObject::RootObject): |
|
25161 (Bindings::RootObject::~RootObject): |
|
25162 (Bindings::RootObject::setRootObjectImp): |
|
25163 (Bindings::RootObject::rootObjectImp): |
|
25164 (Bindings::RootObject::setInterpreter): |
|
25165 (Bindings::RootObject::interpreter): |
|
25166 |
|
25167 === Safari-117 === |
|
25168 |
|
25169 2003-12-10 Darin Adler <darin@apple.com> |
|
25170 |
|
25171 Reviewed by Maciej. |
|
25172 |
|
25173 - fixed regression in JavaScript tests reported by the KDE guys |
|
25174 - fixed 3506345: REGRESSION (115-116): VIP: chordfind.com no longer displays chords |
|
25175 |
|
25176 * kjs/ustring.h: Add tolerateEmptyString parameter to toDouble and toULong. |
|
25177 * kjs/ustring.cpp: |
|
25178 (KJS::UString::toDouble): Separate the "tolerant" parameter into two separate ones: |
|
25179 tolerateTrailingJunk and tolerateEmptyString. Add new overloads; better for code size |
|
25180 and binary compatibility than default parameter values. |
|
25181 (KJS::UString::toULong): Pass tolerateEmptyString down to toDouble. Add new overload. |
|
25182 |
|
25183 * kjs/string_object.cpp: (StringProtoFuncImp::call): Pass false for the new |
|
25184 "tolerate empty string" parameter. |
|
25185 |
|
25186 2003-12-10 Richard Williamson <rjw@apple.com> |
|
25187 |
|
25188 Added code to manage reference counting of JavaScript |
|
25189 objects passed to Java. Also added implementation of |
|
25190 KJS_JSCreateNativeJSObject. This is the function that |
|
25191 provides the root object to Java (KJS::Window). |
|
25192 |
|
25193 Reviewed by Hyatt. |
|
25194 |
|
25195 * JavaScriptCore.pbproj/project.pbxproj: |
|
25196 * bindings/jni_jsobject.cpp: |
|
25197 (KJS_setFindObjectForNativeHandleFunction): |
|
25198 (KJS_findObjectForNativeHandleFunction): |
|
25199 (getReferencesByOwnerDictionary): |
|
25200 (getReferencesDictionary): |
|
25201 (findReferenceDictionary): |
|
25202 (addJavaReference): |
|
25203 (removeJavaReference): |
|
25204 (removeAllJavaReferencesForOwner): |
|
25205 * bindings/jni_jsobject.h: |
|
25206 |
|
25207 2003-12-09 Richard Williamson <rjw@apple.com> |
|
25208 |
|
25209 LiveConnect stubs that correspond to the native methods |
|
25210 on JSObject. These will be called from the new Java plugin |
|
25211 when an instance of JSObject is instantiated and messaged. |
|
25212 When these are implemented the Java will be able to originate |
|
25213 calls into JavaScript. |
|
25214 |
|
25215 Also a temporary work-around added to Makefile.am to solve |
|
25216 a link problem. The 1.4.2 JavaVM accidentally links against |
|
25217 libobjc. This call a failure linking testkjs. Mike Hay is |
|
25218 working with someone to fix the problem (3505587). |
|
25219 |
|
25220 Reviewed by Chris. |
|
25221 |
|
25222 * JavaScriptCore.pbproj/project.pbxproj: |
|
25223 * Makefile.am: |
|
25224 * bindings/jni_jsobject.cpp: Added. |
|
25225 (KJS_JSCreateNativeJSObject): |
|
25226 (KJS_JSObject_JSFinalize): |
|
25227 (KJS_JSObject_JSObjectCall): |
|
25228 (KJS_JSObject_JSObjectEval): |
|
25229 (KJS_JSObject_JSObjectGetMember): |
|
25230 (KJS_JSObject_JSObjectSetMember): |
|
25231 (KJS_JSObject_JSObjectRemoveMember): |
|
25232 (KJS_JSObject_JSObjectGetSlot): |
|
25233 (KJS_JSObject_JSObjectSetSlot): |
|
25234 (KJS_JSObject_JSObjectToString): |
|
25235 * bindings/jni_jsobject.h: Added. |
|
25236 |
|
25237 2003-12-09 Maciej Stachowiak <mjs@apple.com> |
|
25238 |
|
25239 Reviewed by John. |
|
25240 |
|
25241 <rdar://problem/3505183>: JavaScriptCore should assert that interpreter is locked in collector |
|
25242 |
|
25243 * kjs/collector.cpp: |
|
25244 (KJS::Collector::allocate): Assert that interpreter lock count is not 0. |
|
25245 (KJS::Collector::collect): likewise |
|
25246 |
|
25247 2003-12-08 Richard Williamson <rjw@apple.com> |
|
25248 |
|
25249 LiveConnect: The last piece of the JavaScript side of the |
|
25250 LiveConnect implementation. This change adds support for |
|
25251 setting/getting values from Java arrays in JavaScript. |
|
25252 |
|
25253 Reviewed by John. |
|
25254 |
|
25255 * bindings/jni/jni_instance.h: |
|
25256 * bindings/jni/jni_runtime.cpp: |
|
25257 (JavaField::JavaField): |
|
25258 (convertJObjectToArray): |
|
25259 (JavaArray::JavaArray): |
|
25260 (JavaArray::~JavaArray): |
|
25261 (JavaArray::setValueAt): |
|
25262 (JavaArray::valueAt): |
|
25263 (JavaArray::getLength): |
|
25264 * bindings/jni/jni_runtime.h: |
|
25265 (Bindings::JavaArray::operator=): |
|
25266 (Bindings::JavaArray::javaArray): |
|
25267 * bindings/jni/jni_utility.cpp: |
|
25268 (JNITypeFromPrimitiveType): |
|
25269 (convertValueToJValue): |
|
25270 * bindings/jni/jni_utility.h: |
|
25271 * bindings/runtime.h: |
|
25272 * bindings/runtime_array.cpp: |
|
25273 (RuntimeArrayImp::RuntimeArrayImp): |
|
25274 (RuntimeArrayImp::~RuntimeArrayImp): |
|
25275 (RuntimeArrayImp::get): |
|
25276 (RuntimeArrayImp::put): |
|
25277 (RuntimeArrayImp::hasProperty): |
|
25278 * bindings/runtime_array.h: |
|
25279 (KJS::RuntimeArrayImp::getLength): |
|
25280 (KJS::RuntimeArrayImp::getConcreteArray): |
|
25281 * bindings/runtime_object.cpp: |
|
25282 (RuntimeObjectImp::get): |
|
25283 (RuntimeObjectImp::canPut): |
|
25284 (RuntimeObjectImp::hasProperty): |
|
25285 |
|
25286 2003-12-05 Richard Williamson <rjw@apple.com> |
|
25287 |
|
25288 LiveConnect: Part 1 of supporting JS bindings to |
|
25289 native language arrays. |
|
25290 |
|
25291 Reviewed by Chris. |
|
25292 |
|
25293 * JavaScriptCore.pbproj/project.pbxproj: |
|
25294 * bindings/jni/jni_runtime.cpp: |
|
25295 (JavaField::JavaField): |
|
25296 (convertJObjectToArray): |
|
25297 (JavaField::valueFromInstance): |
|
25298 (JavaField::setValueToInstance): |
|
25299 * bindings/jni/jni_runtime.h: |
|
25300 * bindings/runtime.cpp: |
|
25301 (Instance::setValueOfField): |
|
25302 * bindings/runtime.h: |
|
25303 (Bindings::Array::~Array): |
|
25304 |
|
25305 2003-12-04 Richard Williamson <rjw@apple.com> |
|
25306 |
|
25307 LiveConnect: Moved defaultValue into concrete implementation because |
|
25308 more intelligent conversion can be perform with knowledge |
|
25309 of the class of the original instance. |
|
25310 |
|
25311 Reviewed by Chris. |
|
25312 |
|
25313 * bindings/jni/jni_class.cpp: |
|
25314 (JavaClass::isNumberClass): |
|
25315 (JavaClass::isBooleanClass): |
|
25316 (JavaClass::isStringClass): |
|
25317 * bindings/jni/jni_class.h: |
|
25318 * bindings/jni/jni_instance.cpp: |
|
25319 (JavaInstance::defaultValue): |
|
25320 (JavaInstance::valueOf): |
|
25321 * bindings/jni/jni_instance.h: |
|
25322 (Bindings::JavaInstance::javaInstance): |
|
25323 * bindings/runtime.h: |
|
25324 * bindings/runtime_object.cpp: |
|
25325 (RuntimeObjectImp::defaultValue): |
|
25326 |
|
25327 2003-12-04 Richard Williamson <rjw@apple.com> |
|
25328 |
|
25329 LiveConnect: Added support for setting the value of Java |
|
25330 fields. |
|
25331 |
|
25332 Reviewed by Chris. |
|
25333 |
|
25334 * bindings/jni/jni_instance.cpp: |
|
25335 (JavaInstance::invokeMethod): |
|
25336 * bindings/jni/jni_runtime.cpp: |
|
25337 (JavaParameter::JavaParameter): |
|
25338 (JavaField::JavaField): |
|
25339 (JavaField::valueFromInstance): |
|
25340 (JavaField::setValueToInstance): |
|
25341 (JavaMethod::JavaMethod): |
|
25342 * bindings/jni/jni_runtime.h: |
|
25343 (Bindings::JavaField::getJNIType): |
|
25344 * bindings/jni/jni_utility.cpp: |
|
25345 (JNITypeFromClassName): |
|
25346 (convertValueToJValue): |
|
25347 * bindings/jni/jni_utility.h: |
|
25348 * bindings/runtime.cpp: |
|
25349 (Instance::setValueOfField): |
|
25350 * bindings/runtime.h: |
|
25351 * bindings/runtime_object.cpp: |
|
25352 (RuntimeObjectImp::get): |
|
25353 (RuntimeObjectImp::put): |
|
25354 (RuntimeObjectImp::defaultValue): |
|
25355 |
|
25356 2003-12-04 Richard Williamson <rjw@apple.com> |
|
25357 |
|
25358 Added support for string conversions. |
|
25359 Changed various JavaString member variables to be inline. |
|
25360 Implemented defaultValue for context relevant type coercion. |
|
25361 |
|
25362 Reviewed by Chris. |
|
25363 |
|
25364 * bindings/jni/jni_class.cpp: |
|
25365 (JavaClass::JavaClass): |
|
25366 (JavaClass::setClassName): |
|
25367 (JavaClass::classForInstance): |
|
25368 * bindings/jni/jni_class.h: |
|
25369 * bindings/jni/jni_instance.cpp: |
|
25370 (JavaInstance::stringValue): |
|
25371 (JavaInstance::numberValue): |
|
25372 (JavaInstance::booleanValue): |
|
25373 (JavaInstance::invokeMethod): |
|
25374 * bindings/jni/jni_instance.h: |
|
25375 * bindings/jni/jni_runtime.cpp: |
|
25376 (JavaParameter::JavaParameter): |
|
25377 (JavaField::JavaField): |
|
25378 (JavaMethod::JavaMethod): |
|
25379 (appendClassName): |
|
25380 (JavaMethod::signature): |
|
25381 * bindings/jni/jni_runtime.h: |
|
25382 (Bindings::JavaString::JavaString): |
|
25383 (Bindings::JavaString::~JavaString): |
|
25384 (Bindings::JavaString::operator=): |
|
25385 (Bindings::JavaString::characters): |
|
25386 (Bindings::JavaParameter::JavaParameter): |
|
25387 (Bindings::JavaParameter::~JavaParameter): |
|
25388 (Bindings::JavaParameter::operator=): |
|
25389 (Bindings::JavaParameter::type): |
|
25390 (Bindings::JavaField::JavaField): |
|
25391 (Bindings::JavaField::~JavaField): |
|
25392 (Bindings::JavaField::operator=): |
|
25393 (Bindings::JavaField::name): |
|
25394 (Bindings::JavaField::type): |
|
25395 (Bindings::JavaMethod::JavaMethod): |
|
25396 (Bindings::JavaMethod::_commonDelete): |
|
25397 (Bindings::JavaMethod::name): |
|
25398 (Bindings::JavaMethod::returnType): |
|
25399 * bindings/jni/jni_utility.cpp: |
|
25400 (convertValueToJValue): |
|
25401 * bindings/runtime.h: |
|
25402 (Bindings::Instance::valueOf): |
|
25403 * bindings/runtime_method.cpp: |
|
25404 (RuntimeMethodImp::call): |
|
25405 * bindings/runtime_object.cpp: |
|
25406 (RuntimeObjectImp::RuntimeObjectImp): |
|
25407 (RuntimeObjectImp::get): |
|
25408 (RuntimeObjectImp::defaultValue): |
|
25409 * bindings/runtime_object.h: |
|
25410 (KJS::RuntimeObjectImp::classInfo): |
|
25411 |
|
25412 === Safari-116 === |
|
25413 |
|
25414 2003-12-03 Richard Williamson <rjw@apple.com> |
|
25415 |
|
25416 LiveConnect: Added support for parameter passing to Java and conversion |
|
25417 of return values. |
|
25418 |
|
25419 Reviewed by Chris. |
|
25420 |
|
25421 * bindings/jni/jni_instance.cpp: |
|
25422 (JavaInstance::invokeMethod): |
|
25423 * bindings/jni/jni_instance.h: |
|
25424 * bindings/jni/jni_runtime.cpp: |
|
25425 (JavaParameter::JavaParameter): |
|
25426 (JavaMethod::JavaMethod): |
|
25427 (JavaMethod::signature): |
|
25428 * bindings/jni/jni_runtime.h: |
|
25429 (Bindings::JavaParameter::JavaParameter): |
|
25430 (Bindings::JavaParameter::operator=): |
|
25431 (Bindings::JavaParameter::getJNIType): |
|
25432 * bindings/jni/jni_utility.cpp: |
|
25433 (callJNIBooleanMethodA): |
|
25434 (convertValueToJValue): |
|
25435 * bindings/jni/jni_utility.h: |
|
25436 * bindings/runtime.h: |
|
25437 * bindings/runtime_method.cpp: |
|
25438 (RuntimeMethodImp::call): |
|
25439 * bindings/runtime_object.cpp: |
|
25440 (RuntimeObjectImp::get): |
|
25441 |
|
25442 2003-12-02 Richard Williamson <rjw@apple.com> |
|
25443 |
|
25444 Added support for calling simple methods in Java from JavaScript. |
|
25445 (void return and no parameters). Yay, LiveConnect lives. |
|
25446 |
|
25447 Still need write argument and return value conversion code. |
|
25448 |
|
25449 Reviewed by Chris. |
|
25450 |
|
25451 * JavaScriptCore.pbproj/project.pbxproj: |
|
25452 * bindings/jni/jni_instance.cpp: |
|
25453 (JavaInstance::getClass): |
|
25454 (JavaInstance::invokeMethod): |
|
25455 * bindings/jni/jni_instance.h: |
|
25456 * bindings/jni/jni_runtime.cpp: |
|
25457 (JavaMethod::JavaMethod): |
|
25458 (JavaMethod::signature): |
|
25459 (JavaMethod::JNIReturnType): |
|
25460 * bindings/jni/jni_runtime.h: |
|
25461 (Bindings::JavaMethod::_commonDelete): |
|
25462 (Bindings::JavaMethod::_commonCopy): |
|
25463 (Bindings::JavaMethod::name): |
|
25464 * bindings/jni/jni_utility.cpp: |
|
25465 (signatureFromPrimitiveType): |
|
25466 * bindings/jni/jni_utility.h: |
|
25467 * bindings/runtime.h: |
|
25468 * bindings/runtime_method.cpp: Added. |
|
25469 (RuntimeMethodImp::RuntimeMethodImp): |
|
25470 (RuntimeMethodImp::~RuntimeMethodImp): |
|
25471 (RuntimeMethodImp::get): |
|
25472 (RuntimeMethodImp::implementsCall): |
|
25473 (RuntimeMethodImp::call): |
|
25474 (RuntimeMethodImp::codeType): |
|
25475 (RuntimeMethodImp::execute): |
|
25476 * bindings/runtime_method.h: Added. |
|
25477 * bindings/runtime_object.cpp: |
|
25478 (RuntimeObjectImp::RuntimeObjectImp): |
|
25479 (RuntimeObjectImp::get): |
|
25480 * bindings/runtime_object.h: |
|
25481 * kjs/function.cpp: |
|
25482 (FunctionImp::FunctionImp): |
|
25483 * kjs/interpreter.h: |
|
25484 |
|
25485 2003-12-01 Darin Adler <darin@apple.com> |
|
25486 |
|
25487 Reviewed by Maciej. |
|
25488 |
|
25489 - fixed 3493799: JavaScript string.replace expands $ if it's the last character in replacement string |
|
25490 |
|
25491 * kjs/ustring.cpp: (KJS::UString::toDouble): Fix backwards handling of the "tolerant" boolean. |
|
25492 This indirectly caused the string.replace bug. |
|
25493 |
|
25494 2003-12-02 Maciej Stachowiak <mjs@apple.com> |
|
25495 |
|
25496 Merged patches from Harri Porten and David Faure to fix: |
|
25497 |
|
25498 <rdar://problem/3497643>: reproducible crash printing self-referential array |
|
25499 |
|
25500 * kjs/array_object.cpp: |
|
25501 (ArrayProtoFuncImp::call): Break out of the loop if an exception was thrown. |
|
25502 * kjs/nodes.cpp: |
|
25503 (FunctionCallNode::evaluate): Move function call depth check from here... |
|
25504 * kjs/object.cpp: |
|
25505 (KJS::Object::call): ...to here. |
|
25506 * kjs/object.h: Un-inline Object::call now that it does more. |
|
25507 |
|
25508 2003-12-01 Richard Williamson <rjw@apple.com> |
|
25509 |
|
25510 Fixed mistake in method signatures used to get boolean and integer fields. |
|
25511 |
|
25512 Reviewed by Chris. |
|
25513 |
|
25514 * bindings/jni/jni_runtime.cpp: |
|
25515 (JavaField::valueFromInstance): |
|
25516 |
|
25517 2003-12-01 Richard Williamson <rjw@apple.com> |
|
25518 |
|
25519 Fixed parameter passing to applet. Child elements are NOT valid in setStyle(). So we now create the widget before needed with createWidgetIfNecessary. This either happens when doing the first layout, or when JavaScript first references the applet element. |
|
25520 |
|
25521 Fixed early delete of the the main applet instance. When the JS collector cleaned up the last JS object referring to the applet instance we were deleting the java instance. This caused the applet instance cached on the applet element to be invalid. The applet instance is the only Java object not to be cleaned up by the JS collector. |
|
25522 |
|
25523 Added support for getting at Java object fields. |
|
25524 |
|
25525 Reviewed by Chris. |
|
25526 |
|
25527 * JavaScriptCore.pbproj/project.pbxproj: |
|
25528 * Makefile.am: |
|
25529 * bindings/jni/jni_instance.cpp: |
|
25530 (JObjectWrapper::JObjectWrapper): |
|
25531 * bindings/jni/jni_instance.h: |
|
25532 (Bindings::JObjectWrapper::~JObjectWrapper): |
|
25533 * bindings/jni/jni_runtime.cpp: |
|
25534 (JavaField::valueFromInstance): |
|
25535 * bindings/runtime_object.cpp: |
|
25536 (RuntimeObjectImp::~RuntimeObjectImp): |
|
25537 (RuntimeObjectImp::RuntimeObjectImp): |
|
25538 (RuntimeObjectImp::get): |
|
25539 (RuntimeObjectImp::deleteProperty): |
|
25540 * bindings/runtime_object.h: |
|
25541 |
|
25542 === Safari-115 === |
|
25543 |
|
25544 2003-11-21 Maciej Stachowiak <mjs@apple.com> |
|
25545 |
|
25546 Patch from Harri Porten, reviewed by me. |
|
25547 |
|
25548 - fixed 3491712 - String slice with negative arguments does not offset from end of string |
|
25549 |
|
25550 * kjs/string_object.cpp: |
|
25551 (StringProtoFuncImp::call): Handle negative arguments as offsets from end by |
|
25552 adding length and clamping to [0,length-1]. |
|
25553 |
|
25554 2003-11-21 Maciej Stachowiak <mjs@apple.com> |
|
25555 |
|
25556 Patch from Harri Porten, reviewed by me. |
|
25557 |
|
25558 - fixed 3491709 - using Function.apply with a primitive type as the arg list causes crash |
|
25559 |
|
25560 * kjs/function_object.cpp: |
|
25561 (FunctionProtoFuncImp::call): Nest parentheses properly. |
|
25562 |
|
25563 2003-11-20 Richard Williamson <rjw@apple.com> |
|
25564 |
|
25565 More LiveConnect stuff. Primitive Java fields are now |
|
25566 accessible from JavaScript! Yay! |
|
25567 |
|
25568 Reviewed by Maciej. |
|
25569 |
|
25570 * bindings/jni/jni_class.cpp: |
|
25571 (JavaClass::methodNamed): |
|
25572 (JavaClass::fieldNamed): |
|
25573 * bindings/jni/jni_class.h: |
|
25574 (Bindings::JavaClass::_commonDelete): |
|
25575 * bindings/jni/jni_instance.cpp: |
|
25576 (JavaInstance::JavaInstance): |
|
25577 (JavaInstance::~JavaInstance): |
|
25578 (JavaInstance::getClass): |
|
25579 * bindings/jni/jni_instance.h: |
|
25580 (Bindings::JavaInstance::javaInstance): |
|
25581 * bindings/jni/jni_runtime.cpp: |
|
25582 (JavaField::JavaField): |
|
25583 (JavaField::valueFromInstance): |
|
25584 * bindings/jni/jni_runtime.h: |
|
25585 (Bindings::JavaField::JavaField): |
|
25586 (Bindings::JavaField::~JavaField): |
|
25587 (Bindings::JavaField::operator=): |
|
25588 * bindings/jni/jni_utility.cpp: |
|
25589 (callJNIMethod): |
|
25590 (callJNIMethodA): |
|
25591 (callJNIVoidMethod): |
|
25592 (callJNIObjectMethod): |
|
25593 (callJNIBooleanMethod): |
|
25594 (callJNIByteMethod): |
|
25595 (callJNICharMethod): |
|
25596 (callJNIShortMethod): |
|
25597 (callJNIIntMethod): |
|
25598 (callJNILongMethod): |
|
25599 (callJNIFloatMethod): |
|
25600 (callJNIDoubleMethod): |
|
25601 (callJNIVoidMethodA): |
|
25602 (callJNIObjectMethodA): |
|
25603 (callJNIByteMethodA): |
|
25604 (callJNICharMethodA): |
|
25605 (callJNIShortMethodA): |
|
25606 (callJNIIntMethodA): |
|
25607 (callJNILongMethodA): |
|
25608 (callJNIFloatMethodA): |
|
25609 (callJNIDoubleMethodA): |
|
25610 (releaseCharactersForJStringInEnv): |
|
25611 (primitiveTypeFromClassName): |
|
25612 (getJNIField): |
|
25613 * bindings/jni/jni_utility.h: |
|
25614 * bindings/runtime.cpp: |
|
25615 (Instance::createBindingForLanguageInstance): |
|
25616 (Instance::getValueOfField): |
|
25617 * bindings/runtime.h: |
|
25618 * bindings/runtime_object.cpp: |
|
25619 (RuntimeObjectImp::get): |
|
25620 |
|
25621 2003-11-20 Richard Williamson <rjw@apple.com> |
|
25622 |
|
25623 More LiveConnect stuff. |
|
25624 |
|
25625 Reviewed by Chris. |
|
25626 |
|
25627 * bindings/jni/jni_class.cpp: |
|
25628 (JavaClass::classForName): |
|
25629 (JavaClass::classForInstance): |
|
25630 * bindings/jni/jni_instance.cpp: |
|
25631 (JavaInstance::getValueOfField): |
|
25632 * bindings/jni/jni_instance.h: |
|
25633 (Bindings::JObjectWrapper::JObjectWrapper): |
|
25634 * bindings/jni/jni_runtime.h: |
|
25635 (Bindings::JavaConstructor::~JavaConstructor): |
|
25636 (Bindings::JavaConstructor::operator=): |
|
25637 (Bindings::JavaMethod::JavaMethod): |
|
25638 (Bindings::JavaMethod::_commonDelete): |
|
25639 (Bindings::JavaMethod::signature): |
|
25640 * bindings/jni/jni_utility.cpp: |
|
25641 (getJNIEnv): |
|
25642 (attachToJavaVM): |
|
25643 * bindings/jni/jni_utility.h: |
|
25644 * bindings/runtime.h: |
|
25645 * bindings/runtime_object.cpp: |
|
25646 (RuntimeObjectImp::~RuntimeObjectImp): |
|
25647 (RuntimeObjectImp::get): |
|
25648 * bindings/runtime_object.h: |
|
25649 |
|
25650 2003-11-19 Richard Williamson <rjw@apple.com> |
|
25651 |
|
25652 More LiveConnect stuff. |
|
25653 |
|
25654 Reviewed by Ken. |
|
25655 |
|
25656 * JavaScriptCore.pbproj/project.pbxproj: |
|
25657 * bindings/jni/jni_class.cpp: Added. |
|
25658 (JavaClass::_commonInit): |
|
25659 (JavaClass::JavaClass): |
|
25660 (_createClassesByNameIfNecessary): |
|
25661 (JavaClass::classForName): |
|
25662 (JavaClass::classForInstance): |
|
25663 (JavaClass::methodNamed): |
|
25664 (JavaClass::fieldNamed): |
|
25665 * bindings/jni/jni_class.h: Added. |
|
25666 (Bindings::JavaClass::_commonDelete): |
|
25667 (Bindings::JavaClass::~JavaClass): |
|
25668 (Bindings::JavaClass::_commonCopy): |
|
25669 (Bindings::JavaClass::JavaClass): |
|
25670 (Bindings::JavaClass::operator=): |
|
25671 (Bindings::JavaClass::name): |
|
25672 (Bindings::JavaClass::constructorAt): |
|
25673 (Bindings::JavaClass::numConstructors): |
|
25674 * bindings/jni/jni_instance.cpp: Added. |
|
25675 (JavaInstance::JavaInstance): |
|
25676 (JavaInstance::~JavaInstance): |
|
25677 * bindings/jni/jni_instance.h: Added. |
|
25678 (Bindings::JObjectWrapper::JObjectWrapper): |
|
25679 (Bindings::JObjectWrapper::~JObjectWrapper): |
|
25680 (Bindings::JObjectWrapper::ref): |
|
25681 (Bindings::JObjectWrapper::deref): |
|
25682 (Bindings::JavaInstance::getClass): |
|
25683 (Bindings::JavaInstance::operator=): |
|
25684 * bindings/jni/jni_runtime.cpp: |
|
25685 (JavaMethod::JavaMethod): |
|
25686 * bindings/jni/jni_runtime.h: |
|
25687 (Bindings::JavaString::JavaString): |
|
25688 (Bindings::JavaString::~JavaString): |
|
25689 (Bindings::JavaString::operator=): |
|
25690 * bindings/jni/jni_utility.cpp: |
|
25691 (getJavaVM): |
|
25692 (getJNIEnv): |
|
25693 (getCharactersFromJString): |
|
25694 (releaseCharactersForJString): |
|
25695 (getCharactersFromJStringInEnv): |
|
25696 (releaseCharactersForJStringInEnv): |
|
25697 * bindings/jni/jni_utility.h: |
|
25698 * bindings/runtime.cpp: |
|
25699 (Instance::createBindingForLanguageInstance): |
|
25700 * bindings/runtime.h: |
|
25701 (Bindings::Instance::): |
|
25702 |
|
25703 2003-11-18 Richard Williamson <rjw@apple.com> |
|
25704 |
|
25705 More live connect stubs. We're getting close. |
|
25706 |
|
25707 Reviewed by Chris. |
|
25708 |
|
25709 * JavaScriptCore.pbproj/project.pbxproj: |
|
25710 * bindings/jni/jni_runtime.cpp: |
|
25711 (JavaClass::JavaClass): |
|
25712 (JavaInstance::JavaInstance): |
|
25713 (JavaInstance::~JavaInstance): |
|
25714 * bindings/jni/jni_runtime.h: |
|
25715 (Bindings::JavaConstructor::value): |
|
25716 (Bindings::JavaField::value): |
|
25717 (Bindings::JavaMethod::value): |
|
25718 (Bindings::JavaClass::_commonDelete): |
|
25719 (Bindings::JavaClass::_commonCopy): |
|
25720 (Bindings::JavaClass::methodNamed): |
|
25721 (Bindings::JavaClass::fieldNamed): |
|
25722 (Bindings::JavaInstance::getClass): |
|
25723 * bindings/runtime.cpp: Added. |
|
25724 * bindings/runtime.h: |
|
25725 (Bindings::Instance::~Instance): |
|
25726 * bindings/runtime_object.cpp: Added. |
|
25727 (RuntimeObjectImp::classInfo): |
|
25728 (RuntimeObjectImp::RuntimeObjectImp): |
|
25729 (RuntimeObjectImp::get): |
|
25730 (RuntimeObjectImp::put): |
|
25731 (RuntimeObjectImp::canPut): |
|
25732 (RuntimeObjectImp::hasProperty): |
|
25733 (RuntimeObjectImp::deleteProperty): |
|
25734 (RuntimeObjectImp::defaultValue): |
|
25735 (RuntimeObjectImp::_initializeClassInfoFromInstance): |
|
25736 * bindings/runtime_object.h: Added. |
|
25737 (KJS::RuntimeObjectImp::setInternalInstance): |
|
25738 (KJS::RuntimeObjectImp::getInternalInstance): |
|
25739 * kjs/object.cpp: |
|
25740 (KJS::ObjectImp::get): |
|
25741 (KJS::ObjectImp::hasProperty): |
|
25742 * kjs/value.h: |
|
25743 (KJS::): |
|
25744 |
|
25745 2003-11-17 Maciej Stachowiak <mjs@apple.com> |
|
25746 |
|
25747 Patch from Harri, reviewed by me. |
|
25748 |
|
25749 - fixed 3487375 - backwards array slice causes infinite loop |
|
25750 |
|
25751 * kjs/array_object.cpp: |
|
25752 (ArrayProtoFuncImp::call): |
|
25753 |
|
25754 2003-11-17 Maciej Stachowiak <mjs@apple.com> |
|
25755 |
|
25756 Patch from Harri Porten reviewed by me. |
|
25757 |
|
25758 - fixed 3487371 - operator precedence for bitwise or, xor and and is wrong |
|
25759 |
|
25760 * kjs/grammar.y: Correct the precedence. |
|
25761 |
|
25762 2003-11-16 Maciej Stachowiak <mjs@apple.com> |
|
25763 |
|
25764 Reviewed by John. |
|
25765 |
|
25766 - fixed 3483829 - JavaScriptCore needs workaround to compile on Merlot |
|
25767 |
|
25768 * JavaScriptCore.pbproj/project.pbxproj: Add -Wno-long-double to |
|
25769 warning flags. |
|
25770 |
|
25771 === Safari-114 === |
|
25772 |
|
25773 2003-11-13 Richard Williamson <rjw@apple.com> |
|
25774 |
|
25775 Factored common code between copy constructor and assignment operator. |
|
25776 |
|
25777 Reviewed by Chris. |
|
25778 |
|
25779 * ChangeLog: |
|
25780 * bindings/jni/jni_runtime.h: |
|
25781 (Bindings::JavaConstructor::_commonCopy): |
|
25782 (Bindings::JavaConstructor::JavaConstructor): |
|
25783 (Bindings::JavaConstructor::operator=): |
|
25784 (Bindings::JavaField::type): |
|
25785 * bindings/runtime.h: |
|
25786 |
|
25787 2003-11-13 Richard Williamson <rjw@apple.com> |
|
25788 |
|
25789 More LiveConnect stuff. This checkin adds abstract classes to model |
|
25790 language runtimes and a JNI based set of concrete implementations for |
|
25791 Java. |
|
25792 |
|
25793 Reviewed by Chris. |
|
25794 |
|
25795 * JavaScriptCore.pbproj/project.pbxproj: |
|
25796 * Makefile.am: |
|
25797 * bindings/Makefile.am: Removed. |
|
25798 * bindings/jni/Makefile.am: Removed. |
|
25799 * bindings/jni/jni_runtime.cpp: Added. |
|
25800 (JavaField::JavaField): |
|
25801 (JavaConstructor::JavaConstructor): |
|
25802 (JavaMethod::JavaMethod): |
|
25803 (JavaClass::JavaClass): |
|
25804 * bindings/jni/jni_runtime.h: Added. |
|
25805 (Bindings::JavaString::JavaString): |
|
25806 (Bindings::JavaString::~JavaString): |
|
25807 (Bindings::JavaString::operator=): |
|
25808 (Bindings::JavaString::characters): |
|
25809 (Bindings::JavaParameter::JavaParameter): |
|
25810 (Bindings::JavaParameter::~JavaParameter): |
|
25811 (Bindings::JavaParameter::operator=): |
|
25812 (Bindings::JavaParameter::type): |
|
25813 (Bindings::JavaConstructor::JavaConstructor): |
|
25814 (Bindings::JavaConstructor::~JavaConstructor): |
|
25815 (Bindings::JavaConstructor::operator=): |
|
25816 (Bindings::JavaConstructor::parameterAt): |
|
25817 (Bindings::JavaConstructor::numParameters): |
|
25818 (Bindings::JavaField::JavaField): |
|
25819 (Bindings::JavaField::~JavaField): |
|
25820 (Bindings::JavaField::operator=): |
|
25821 (Bindings::JavaField::name): |
|
25822 (Bindings::JavaField::type): |
|
25823 (Bindings::JavaMethod::JavaMethod): |
|
25824 (Bindings::JavaMethod::_commonDelete): |
|
25825 (Bindings::JavaMethod::~JavaMethod): |
|
25826 (Bindings::JavaMethod::_commonCopy): |
|
25827 (Bindings::JavaMethod::operator=): |
|
25828 (Bindings::JavaMethod::name): |
|
25829 (Bindings::JavaMethod::returnType): |
|
25830 (Bindings::JavaMethod::parameterAt): |
|
25831 (Bindings::JavaMethod::numParameters): |
|
25832 (Bindings::JavaClass::_commonDelete): |
|
25833 (Bindings::JavaClass::~JavaClass): |
|
25834 (Bindings::JavaClass::_commonCopy): |
|
25835 (Bindings::JavaClass::JavaClass): |
|
25836 (Bindings::JavaClass::operator=): |
|
25837 (Bindings::JavaClass::name): |
|
25838 (Bindings::JavaClass::methodAt): |
|
25839 (Bindings::JavaClass::numMethods): |
|
25840 (Bindings::JavaClass::constructorAt): |
|
25841 (Bindings::JavaClass::numConstructors): |
|
25842 (Bindings::JavaClass::fieldAt): |
|
25843 (Bindings::JavaClass::numFields): |
|
25844 * bindings/jni/jni_utility.cpp: |
|
25845 (callJNIMethod): |
|
25846 (callJNIMethodA): |
|
25847 (callJNIObjectMethod): |
|
25848 (callJNIByteMethod): |
|
25849 (callJNICharMethod): |
|
25850 (callJNIShortMethod): |
|
25851 (callJNIIntMethod): |
|
25852 (callJNILongMethod): |
|
25853 (callJNIFloatMethod): |
|
25854 (callJNIDoubleMethod): |
|
25855 (callJNIVoidMethodA): |
|
25856 (callJNIObjectMethodA): |
|
25857 (callJNIByteMethodA): |
|
25858 (callJNICharMethodA): |
|
25859 (callJNIShortMethodA): |
|
25860 (callJNIIntMethodA): |
|
25861 (callJNILongMethodA): |
|
25862 (callJNIFloatMethodA): |
|
25863 (callJNIDoubleMethodA): |
|
25864 (getCharactersFromJString): |
|
25865 (releaseCharactersForJString): |
|
25866 * bindings/jni/jni_utility.h: |
|
25867 * bindings/objc/Makefile.am: Removed. |
|
25868 * bindings/runtime.h: Added. |
|
25869 (Bindings::Parameter::~Parameter): |
|
25870 (Bindings::Constructor::~Constructor): |
|
25871 (Bindings::Field::~Field): |
|
25872 (Bindings::Method::~Method): |
|
25873 (Bindings::Class::~Class): |
|
25874 |
|
25875 2003-11-13 Maciej Stachowiak <mjs@apple.com> |
|
25876 |
|
25877 Reviewed by John. |
|
25878 |
|
25879 - fixed 3472562 - Null or Undefined variables passed to IN operator cause javascript exceptions |
|
25880 |
|
25881 * kjs/nodes.cpp: |
|
25882 (ForInNode::execute): If the in value is null or undefined, bail |
|
25883 out early, since attempting to iterate its properties will throw |
|
25884 an exception. |
|
25885 |
|
25886 2003-11-12 Darin Adler <darin@apple.com> |
|
25887 |
|
25888 - fixed the build |
|
25889 |
|
25890 * Makefile.am: Fix the build by removing the bindings directory from SUBDIRS. |
|
25891 Later, we can either add this back and add the Makefile.am files to the top |
|
25892 level configure.in or leave it out and remove the Makefile.am files. |
|
25893 |
|
25894 2003-11-12 Richard Williamson <rjw@apple.com> |
|
25895 |
|
25896 Added utility functions for calling JNI methods. |
|
25897 |
|
25898 Reviewed by Chris. |
|
25899 |
|
25900 * JavaScriptCore.pbproj/project.pbxproj: |
|
25901 * Makefile.am: |
|
25902 * bindings/Makefile.am: Added. |
|
25903 * bindings/jni/Makefile.am: Added. |
|
25904 * bindings/jni/jni_utility.cpp: Added. |
|
25905 (attachToJavaVM): |
|
25906 (callJNIMethod): |
|
25907 (callJNIVoidMethod): |
|
25908 (callJNIObjectMethod): |
|
25909 (callJNIByteMethod): |
|
25910 (callJNICharMethod): |
|
25911 (callJNIShortMethod): |
|
25912 (callJNIIntMethod): |
|
25913 (callJNILongMethod): |
|
25914 (callJNIFloatMethod): |
|
25915 (callJNIDoubleMethod): |
|
25916 * bindings/jni/jni_utility.h: Added. |
|
25917 * bindings/objc/Makefile.am: Added. |
|
25918 |
|
25919 2003-11-08 Darin Adler <darin@apple.com> |
|
25920 |
|
25921 Reviewed by John. |
|
25922 |
|
25923 - fixed 3477528 -- array.sort(function) fails if the function returns a non-zero value that rounds to zero |
|
25924 |
|
25925 * kjs/array_object.cpp: |
|
25926 (compareByStringForQSort): Added checks for undefined values to match what the specification calls for. |
|
25927 (compareWithCompareFunctionForQSort): Added checks for undefined values as above, and also changed the |
|
25928 code that looks at the compare function result to look at the number returned without rounding to an integer. |
|
25929 (ArrayProtoFuncImp::call): Changed the code that looks at the compare function result to look at the number |
|
25930 returned without rounding to an integer. |
|
25931 |
|
25932 === Safari-113 === |
|
25933 |
|
25934 2003-11-03 Vicki Murley <vicki@apple.com> |
|
25935 |
|
25936 Reviewed by kocienda. |
|
25937 |
|
25938 - fixed <rdar://problem/3471096>: non-B&I builds should not use order files, because they cause false "regressions" in perf. |
|
25939 |
|
25940 * JavaScriptCore.pbproj/project.pbxproj: added empty SECTORDER_FLAGS variables to the Development and Deployment build styles |
|
25941 |
|
25942 2003-11-02 Darin Adler <darin@apple.com> |
|
25943 |
|
25944 Reviewed by Maciej. |
|
25945 |
|
25946 - changed list manipulation to use Harri Porten's idea of a circular |
|
25947 linked list that is built from head to tail rather than building the |
|
25948 list backwards and reversing the list when done |
|
25949 |
|
25950 * kjs/grammar.y: Handle CatchNode and FinallyNode in a type-safe way. |
|
25951 Change many places that passed 0L to pass nothing at all, or to pass 0. |
|
25952 |
|
25953 * kjs/nodes.h: |
|
25954 (KJS::ElementNode::ElementNode): Build a circular list instead of a 0-terminated |
|
25955 backwards list. |
|
25956 (KJS::ArrayNode::ArrayNode): Break the circular list instead of reversing the list. |
|
25957 (KJS::PropertyValueNode::PropertyValueNode): Moved before ObjectLiteralNode so the |
|
25958 inline code in ObjectLiteralNode works. Build a circular list instead of a 0-terminated |
|
25959 backwards list. Made the case for the first node separate so we don't need a nil check. |
|
25960 (KJS::ObjectLiteralNode::ObjectLiteralNode): Break the circular list instead of |
|
25961 reversing the list. |
|
25962 (KJS::ArgumentListNode::ArgumentListNode): Build a circular list instead of a 0-terminated |
|
25963 backwards list. Also, made the constructors inline (moved here from .cpp file). |
|
25964 (KJS::ArgumentsNode::ArgumentsNode): Break the circular list instead of |
|
25965 reversing the list. |
|
25966 (KJS::NewExprNode::NewExprNode): Changed a 0L to 0. |
|
25967 (KJS::StatListNode::StatListNode): Make this constructor no longer inline (moved into |
|
25968 .cpp file). The one in the .cpp file builds a circular list instead of a 0-terminated |
|
25969 backwards list. |
|
25970 (KJS::VarDeclListNode::VarDeclListNode): Build a circular list instead of a 0-terminated |
|
25971 backwards list. |
|
25972 (KJS::VarStatementNode::VarStatementNode): Break the circular list instead of reversing |
|
25973 the list. |
|
25974 (KJS::BlockNode::BlockNode): Make this constructor no longer inline (moved into .cpp file). |
|
25975 The one in the .cpp file breaks the list instead of reversing it. |
|
25976 (KJS::ForNode::ForNode): Break the circular list instead of reversing the list. |
|
25977 (KJS::CaseClauseNode::CaseClauseNode): Break the circular list instead of reversing the |
|
25978 list. |
|
25979 (KJS::ClauseListNode::ClauseListNode): Build a circular list instead of a 0-terminated |
|
25980 backwards list. |
|
25981 (KJS::CaseBlockNode::CaseBlockNode): Make this constructor no longer inline (moved into |
|
25982 .cpp file). The one in the .cpp file breaks the list instead of reversing it. |
|
25983 (KJS::TryNode::TryNode): Changed constructor to take typed parameters for the catch and |
|
25984 finally nodes rather than just Node. |
|
25985 (KJS::ParameterNode::ParameterNode): Build a circular list instead of a 0-terminated |
|
25986 backwards list. |
|
25987 (KJS::FuncDeclNode::FuncDeclNode): Break the circular list instead of reversing the |
|
25988 list. |
|
25989 (KJS::FuncExprNode::FuncExprNode): Break the circular list instead of reversing the |
|
25990 list. |
|
25991 |
|
25992 * kjs/nodes.cpp: |
|
25993 (StatListNode::StatListNode): Moved this constructor here, no longer inline. |
|
25994 Did the "break circular list" thing instead of the "reverse list" thing. |
|
25995 Added setLoc calls to match KJS in the KDE tree; since we don't currently |
|
25996 use the JavaScript debugging support, it's unclear whether there's any benefit, but |
|
25997 later we might be using it and it's good to be as close as possible. |
|
25998 (BlockNode::BlockNode): Moved this constructor here, no longer inline. |
|
25999 Did the "break circular list" thing instead of the "reverse list" thing. |
|
26000 Added setLoc calls. |
|
26001 (CaseBlockNode::CaseBlockNode): Moved this constructor here, no longer inline. |
|
26002 Did the "break circular list" thing instead of the "reverse list" thing. |
|
26003 (SourceElementsNode::SourceElementsNode): Moved this constructor here, no longer inline. |
|
26004 Did the "break circular list" thing instead of the "reverse list" thing. |
|
26005 Added setLoc calls. |
|
26006 |
|
26007 * kjs/grammar.cpp: Regenerated. |
|
26008 * kjs/grammar.cpp.h: Regenerated. |
|
26009 * kjs/grammar.h: Regenerated. |
|
26010 |
|
26011 === Safari-112 === |
|
26012 |
|
26013 2003-10-30 Maciej Stachowiak <mjs@apple.com> |
|
26014 |
|
26015 Reviewed by Ken. |
|
26016 |
|
26017 - fixed 3427069 - browsing mp3.com causes leaks (KJS) |
|
26018 |
|
26019 * kjs/string_object.cpp: |
|
26020 (StringProtoFuncImp::call): Don't do an early return, since that |
|
26021 could leak a temporary regexp. |
|
26022 |
|
26023 2003-10-29 Maciej Stachowiak <mjs@apple.com> |
|
26024 |
|
26025 Reviewed by Darin. |
|
26026 |
|
26027 - fixed 3426076 - Leak of JS lexer data visiting http://www.ebay.com |
|
26028 |
|
26029 * kjs/grammar.cpp: |
|
26030 (yyerror): Updated the commented code. |
|
26031 * kjs/grammar.y: Don't delete string and identifier tokens when done |
|
26032 with them any more, they'll get cleaned up by the lexer now. |
|
26033 * kjs/internal.cpp: |
|
26034 (Parser::parse): Tell lexer when done parsing. |
|
26035 * kjs/lexer.cpp: |
|
26036 (Lexer::Lexer): Initialize new data members. |
|
26037 (Lexer::lex): Use new methods to make strings and identifiers, and |
|
26038 save them. |
|
26039 (Lexer::makeIdentifier): Make a new Identifier and save it in an |
|
26040 auto-growing array. |
|
26041 (Lexer::makeUString): Likewise for UStrings. |
|
26042 (Lexer::doneParsing): Clean up arrays of Ifentifiers and UStrings. |
|
26043 * kjs/lexer.h: |
|
26044 |
|
26045 2003-10-28 Maciej Stachowiak <mjs@apple.com> |
|
26046 |
|
26047 Reviewed by Ken. |
|
26048 |
|
26049 - fixed 3413962 - malicious web pages can kill all future JavaScript execution by breaking recursion limit check |
|
26050 |
|
26051 * kjs/nodes.cpp: |
|
26052 (FunctionCallNode::evaluate): If we're going to return early due |
|
26053 to breaking the recursion limit, make sure to lower it again, or |
|
26054 it will creep up by one each time it's exceeded. |
|
26055 |
|
26056 2003-10-26 Darin Adler <darin@apple.com> |
|
26057 |
|
26058 * JavaScriptCorePrefix.h: Added a C case to the NULL definition since we use C as well |
|
26059 as C++ in this project. |
|
26060 |
|
26061 2003-10-26 Darin Adler <darin@apple.com> |
|
26062 |
|
26063 - rolled in some CString changes Harri Porten did on the KDE side |
|
26064 |
|
26065 * kjs/ustring.cpp: |
|
26066 (KJS::CString::CString): Use memcpy instead of strcpy for speed. Fix an off by one error |
|
26067 in the copy constructor. |
|
26068 (KJS::CString::operator=): Use memcpy instead of strcpy for speed. |
|
26069 |
|
26070 * JavaScriptCorePrefix.h: Add a definition of NULL here that takes advantage of the GNU |
|
26071 __null feature even if the system C library doesn't. |
|
26072 |
|
26073 == Rolled over to ChangeLog-2003-10-25 == |