1 2010-04-26 Stephanie Lewis <slewis@apple.com>
3 Reviewed by Geoff Garen.
5 https://bugs.webkit.org/show_bug.cgi?id=38154 FastMalloc calls madvise too often.
6 <rdar://problem/7834433> REGRESSSION: 1.5% PLT regression due to 56028 (return memory quicker).
7 To save on madvise calls when recommitting memory recommit the entire span and then carve it
8 instead of carving the span up and only committing the part that will be used immediately.
11 (WTF::TCMalloc_PageHeap::New):
12 (WTF::TCMalloc_PageHeap::AllocLarge):
13 (WTF::TCMalloc_PageHeap::Carve):
15 2010-04-26 Oliver Hunt <oliver@apple.com>
17 Reviewed by Maciej Stachowiak.
19 Add specialized thunks for a char code related string functions
20 https://bugs.webkit.org/show_bug.cgi?id=38177
22 This is a simple extension to my prior patch. Basically hoist the
23 existing character loading logic from the charCodeAt thunk and into
24 a helper function, then add a helper to load strings from the small
25 string cache. This allows trivial implementations of fromCharCode
29 * jit/SpecializedThunkJIT.h:
30 (JSC::SpecializedThunkJIT::returnJSCell):
31 (JSC::SpecializedThunkJIT::tagReturnAsJSCell):
32 * jit/ThunkGenerators.cpp:
33 (JSC::stringCharLoad):
35 (JSC::charCodeAtThunkGenerator):
36 (JSC::charAtThunkGenerator):
37 (JSC::fromCharCodeThunkGenerator):
38 * jit/ThunkGenerators.h:
39 * runtime/SmallStrings.h:
40 (JSC::SmallStrings::singleCharacterStrings):
41 * runtime/StringConstructor.cpp:
42 (JSC::StringConstructor::StringConstructor):
44 2010-04-27 Thomas Zander <t.zander@nokia.com>
46 Reviewed by Simon Hausmann.
48 [Qt] Fix the build on Symbian on Linux using the Makefile based mkspec
50 * JavaScriptCore.pri: It is necessary to specify the library search path
51 when linking against JavaScriptCore.
53 2010-04-21 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
55 Reviewed by Simon Hausmann.
57 Compile fix for Visual Studio 2010
58 https://bugs.webkit.org/show_bug.cgi?id=37867
60 Patch by Prasanth Ullattil <prasanth.ullattil@nokia.com>
62 * runtime/Structure.cpp:
63 (JSC::Structure::transitionTableAdd):
67 2010-04-27 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
69 Reviewed by Simon Hausmann.
71 Rename COMPILER(MSVC7) to COMPILER(MSVC7_OR_LOWER)
74 (JSC::Structure::transitionTableAdd):
80 * wtf/StaticConstructors.h:
85 2010-04-15 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
87 Reviewed by Tor Arne Vestbø.
89 [Qt] Fix Mac build break.
91 https://bugs.webkit.org/show_bug.cgi?id=37867
92 - Make sure JavaScriptCore's debug_and_release config follows that
94 - Use different name for JavaScriptCore target in debug and release
95 since they might be written in the same path at the same time on
97 - Consolidate the DESTDIR determination logic in JavaScriptCore.pri
100 * JavaScriptCore.pro:
102 2010-04-21 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
104 Reviewed by Kenneth Rohde Christiansen.
106 [Qt] Make sure WebKit is not compiled using C++0x.
107 https://bugs.webkit.org/show_bug.cgi?id=37867
109 As the rest of Qt compiles in the C++0x mode, people might start
110 compiling it in this mode. WebKit don't support this yet.
112 Patch by Thiago Macieira <thiago.macieira@nokia.com>
114 * JavaScriptCore.pro:
116 2010-04-26 Oliver Hunt <oliver@apple.com>
120 * jit/SpecializedThunkJIT.h:
121 (JSC::SpecializedThunkJIT::argumentToVirtualRegister):
123 2010-04-26 Oliver Hunt <oliver@apple.com>
125 Reviewed by Gavin Barraclough.
127 Need to support more efficient dispatch of lightweight builtins
128 https://bugs.webkit.org/show_bug.cgi?id=38155
130 The problem with calling lightweight builtins is that marshalling
131 the call from the nitro calling convention to the system calling
132 convention is very expensive relative to the cost of the actually
133 evaluating the function. To work around this problem this patch
134 adds the ability to define a custom thunk for a builtin.
136 This allows us to use high performance custom implementations of
137 the common and sensible versions of simple builtins. This patch
138 includes a simple (use of which is currently hardcoded) thunk for
141 This adds a JSInterfaceJIT subclass called SpecializedThunkJIT
142 that has helper functions to remove (or at least reduce) the need
143 to have separate thunk implementations for each JSValue encoding.
146 * JavaScriptCore.pro:
147 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
148 * JavaScriptCore.xcodeproj/project.pbxproj:
149 Many project file updates
152 Add thunk generation callbacks to the hash tables, currently
153 we hardcode the script to only support charCodeAt
157 (JSC::JITThunks::~JITThunks):
158 (JSC::JITThunks::specializedThunk):
160 * jit/SpecializedThunkJIT.h: Added.
161 (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
162 (JSC::SpecializedThunkJIT::loadCellArgument):
163 (JSC::SpecializedThunkJIT::loadJSStringArgument):
164 (JSC::SpecializedThunkJIT::loadInt32Argument):
165 (JSC::SpecializedThunkJIT::appendFailure):
166 (JSC::SpecializedThunkJIT::returnInt32):
167 (JSC::SpecializedThunkJIT::finalize):
168 (JSC::SpecializedThunkJIT::argumentToVirtualRegister):
169 (JSC::SpecializedThunkJIT::tagReturnAsInt32):
170 * jit/ThunkGenerators.cpp: Added.
171 (JSC::ThunkHelpers::stringImplDataOffset):
172 (JSC::ThunkHelpers::jsStringLengthOffset):
173 (JSC::ThunkHelpers::jsStringValueOffset):
174 (JSC::charCodeAtThunkGenerator):
175 * jit/ThunkGenerators.h: Added.
176 * runtime/Executable.h:
177 (JSC::NativeExecutable::NativeExecutable):
178 * runtime/JSFunction.cpp:
179 (JSC::JSFunction::JSFunction):
180 * runtime/JSFunction.h:
181 * runtime/JSGlobalData.h:
182 (JSC::JSGlobalData::getThunk):
183 * runtime/JSString.h:
186 Protect some of the JSVALUE32 and JSVALUE32_64 only constants
187 and function behind appropriate USE() guards to make it harder
188 to use the wrong flags for the target build.
189 * runtime/Lookup.cpp:
190 (JSC::HashTable::createTable):
191 (JSC::setUpStaticFunctionSlot):
193 (JSC::HashEntry::initialize):
194 (JSC::HashEntry::generator):
196 Make the lookup tables use a specialized thunkGenerator
198 * wtf/text/StringImpl.h:
200 2010-04-26 Oliver Hunt <oliver@apple.com>
204 * runtime/JSImmediate.h:
207 2010-04-26 Oliver Hunt <oliver@apple.com>
209 Reviewed by Gavin Barraclough.
211 Factor some basic JS interface logic out of JIT and into a superclass
212 https://bugs.webkit.org/show_bug.cgi?id=38163
214 Create JSInterfaceJIT to hold some common low level functions for
215 interacting with the JS RegisterFile. Doing this separately from
216 https://bugs.webkit.org/show_bug.cgi?id=38155 to ease reviewing.
218 * JavaScriptCore.xcodeproj/project.pbxproj:
220 * jit/JITInlineMethods.h:
221 (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
222 * jit/JSInterfaceJIT.h: Added.
223 (JSC::JSInterfaceJIT::emitLoadJSCell):
224 (JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
225 (JSC::JSInterfaceJIT::emitLoadInt32):
226 (JSC::JSInterfaceJIT::tagFor):
227 (JSC::JSInterfaceJIT::payloadFor):
228 (JSC::JSInterfaceJIT::addressFor):
230 2010-04-26 Sam Weinig <sam@webkit.org>
234 * wtf/mac/MainThreadMac.mm:
237 2010-04-26 Geoffrey Garen <ggaren@apple.com>
239 Reviewed by Sam Weinig.
241 <rdar://problem/7766413>
243 Fixed a crash seen when using the JavaScriptCore API with WebKit.
245 No layout test because DumpRenderTree doesn't use the JavaScriptCore API
248 * interpreter/RegisterFile.cpp:
249 (JSC::RegisterFile::setGlobalObject):
250 (JSC::RegisterFile::clearGlobalObject):
251 (JSC::RegisterFile::globalObject):
252 * interpreter/RegisterFile.h:
253 (JSC::RegisterFile::RegisterFile): Use WeakGCPtr for managing m_globalObject,
254 since it's a weak pointer. (We never noticed this error before because,
255 in WebKit, global objects always have a self-reference in a global variable,
256 so marking the register file's global variables would keep m_globalObject
257 alive. In the JavaScriptCore API, you can allocate a global object with
260 * runtime/JSActivation.h: Removed unneeded #include.
262 * runtime/JSGlobalObject.cpp:
263 (JSC::JSGlobalObject::~JSGlobalObject): Don't use ==, since a weak
264 pointer is 0 when the object it points to runs its destructor.
266 * runtime/WeakGCPtr.h:
267 (JSC::WeakGCPtr::clear): Changed to return a bool indicating whether the
268 clear actually happened.
269 (JSC::WeakGCPtr::assign): Changed to forbid assignment of 0 as a shorthand
270 for calling clear(). A client should never clear by assigning 0, since
271 clear() should be conditional on whether the object doing the clearing
272 is still pointed to by the weak pointer. (Otherwise, a zombie object might
273 clear a pointer to a new, valid object.)
275 2010-04-25 Sam Weinig <sam@webkit.org>
277 Reviewed by Maciej Stachowiak.
279 Fix for https://bugs.webkit.org/show_bug.cgi?id=38097
280 Disentangle initializing the main thread from initializing threading
282 This is the first step in getting rid of the WEB_THREAD #define and
283 paving the way to allowing mac both WebKit and WebKit2 to use the same
286 * JavaScriptCore.exp: Export initializeMainThread and initializeMainThreadToProcessMainThread.
287 * JavaScriptCore.xcodeproj/project.pbxproj: Sort files.
289 * wtf/MainThread.cpp:
290 (WTF::mainThreadInitializationMutex):
291 (WTF::mainThreadFunctionQueueMutex):
292 (WTF::initializeMainThread):
293 (WTF::deprecatedInitializeMainThread):
295 Added Mac only initializeMainThreadToProcessMainThread which sets up callOnMainThread
296 and isMainThead calls to assume that WebCore's main thread is also the
297 process's main thread. Since it is possible that both initializeMainThread
298 and initializeMainThreadToProcessMainThread could be called, the first one called
299 wins (either will work).
301 * wtf/Threading.h: Moved to top of file.
303 * wtf/ThreadingPthreads.cpp:
304 (WTF::initializeThreading): Remove call to initializeMainThread.
305 * wtf/ThreadingWin.cpp:
306 (WTF::initializeThreading): Ditto.
307 * wtf/gtk/ThreadingGtk.cpp:
308 (WTF::initializeThreading): Ditto.
310 * wtf/mac/MainThreadMac.mm:
311 (WTF::initializeMainThreadPlatform):
312 (WTF::initializeMainThreadToProcessMainThread):
313 (WTF::scheduleDispatchFunctionsOnMainThread):
315 Add runtime switch between the old behavior of using the system's main
316 thread and a stored pointer to the main thread. Tiger always uses the
317 system's main thread.
319 * wtf/qt/ThreadingQt.cpp:
320 (WTF::initializeThreading): Remove call to initializeMainThread.
321 * wtf/win/MainThreadWin.cpp:
322 (WTF::initializeMainThreadPlatform): Add call to initializeCurrentThreadInternal
323 removed from initializeThreading.
325 2010-04-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
327 Reviewed by Kenneth Rohde Christiansen.
329 Fix a memory leak in the QScriptString.
331 QScriptStringPrivate's constructor shouldn't call JSStringRetain as
332 QScriptConverter implicitly pass a JSStringRef ownership.
334 [Qt] QScriptStringPrivate c'tor problem
335 https://bugs.webkit.org/show_bug.cgi?id=38110
337 * qt/api/qscriptstring_p.h:
338 (QScriptStringPrivate::QScriptStringPrivate):
340 2010-04-24 Darin Adler <darin@apple.com>
342 Reviewed by Dan Bernstein.
344 REGRESSION (r56560): Crash in parseFloat if passed invalid UTF-16 data
345 https://bugs.webkit.org/show_bug.cgi?id=38083
346 rdar://problem/7901044
348 Tests: fast/js/ToNumber.html
349 fast/js/parseFloat.html
351 * runtime/JSGlobalObjectFunctions.cpp:
352 (JSC::parseInt): Added a FIXME comment about a problem I noticed.
353 (JSC::parseFloat): Added a FIXME comment about a problem I noticed;
354 covered by test cases in the test I added.
355 * runtime/UString.cpp:
356 (JSC::UString::toDouble): Added FIXME comments about two problems I
357 noticed; covered by test cases in the tests I added. Added a return
358 statement so we don't crash when illegal UTF-16 sequences are present.
360 2010-04-24 Anton Muhin <antonm@chromium.org>
362 Reviewed by Darin Adler.
364 Allow to construct HashTraits<WebCore::QualifiedName>::constructDeletedValue
366 Former implementation attempted to use AtomicString(HashTableDeletedValue)
367 however those values cannot be used that way: one cannot construct
368 QualifiedNameImpl out of such AtomicString as we'll try to lookup this string
369 in the table, for example.
370 https://bugs.webkit.org/show_bug.cgi?id=37722
372 * wtf/RefPtr.h: expose hash table deleted value
374 2010-04-23 Sam Weinig <sam@webkit.org>
376 Reviewed by David Levin.
378 Fix for https://bugs.webkit.org/show_bug.cgi?id=38060
381 Move bits for of Threading.h into 3 new files.
382 - Atomics.h for atomic operations.
383 - ThreadSafeShared.h for the ThreadSafeShared class.
384 - ThreadingPrimitives.h for the primitives and platform types.
386 Basic threading operations (creation, etc.) remain in Threading.h.
389 * JavaScriptCore.gypi:
390 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
391 * JavaScriptCore.xcodeproj/project.pbxproj:
392 * wtf/Atomics.h: Copied from wtf/Threading.h.
393 * wtf/ThreadSafeShared.h: Copied from wtf/Threading.h.
395 * wtf/ThreadingPrimitives.h: Copied from wtf/Threading.h.
397 2010-04-23 Sam Weinig <sam@webkit.org>
401 * wtf/qt/MainThreadQt.cpp: #include <QThread>
403 2010-04-22 Sam Weinig <sam@webkit.org>
405 Reviewed by Anders Carlsson.
407 Fix for https://bugs.webkit.org/show_bug.cgi?id=38022
408 Move isMainThread predicate function to MainThread.h
410 * wtf/MainThread.cpp:
411 (WTF::initializeMainThread):
415 * wtf/ThreadingPthreads.cpp:
416 (WTF::initializeThreading):
417 * wtf/ThreadingWin.cpp:
418 (WTF::initializeThreading):
419 * wtf/gtk/ThreadingGtk.cpp:
420 (WTF::initializeThreading):
421 * wtf/mac/MainThreadMac.mm:
422 (WTF::initializeMainThreadPlatform):
424 * wtf/qt/MainThreadQt.cpp:
426 * wtf/qt/ThreadingQt.cpp:
427 (WTF::initializeThreading):
428 * wtf/text/AtomicString.cpp:
430 2010-04-23 Gabor Rapcsanyi <rgabor@inf.u-szeged.hu>
432 Reviewed by Laszlo Gombos.
434 Add RVCT support for Linux
436 Developed in cooperation with Gabor Loki.
439 * jit/ExecutableAllocator.h:
440 * jit/ExecutableAllocatorPosix.cpp:
441 (JSC::ExecutableAllocator::cacheFlush):
444 * wtf/unicode/qt4/UnicodeQt4.h:
446 2010-04-23 Patrick Gansterer <paroga@paroga.com>
448 Reviewed by Laszlo Gombos.
450 [WIN] Move OwnPtrWin.cpp into platform specific folder.
451 https://bugs.webkit.org/show_bug.cgi?id=38042
453 * JavaScriptCore.gypi:
454 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
455 * wtf/OwnPtrWin.cpp: Removed.
456 * wtf/win/OwnPtrWin.cpp: Copied from JavaScriptCore/wtf/OwnPtrWin.cpp.
458 2010-04-23 Patrick Gansterer <paroga@paroga.com>
460 Reviewed by Laszlo Gombos.
462 [BREWMP] Move OwnPtrBrew.cpp into platform specific folder.
463 https://bugs.webkit.org/show_bug.cgi?id=38042
465 * wtf/OwnPtrBrew.cpp: Removed.
466 * wtf/brew/OwnPtrBrew.cpp: Copied from JavaScriptCore/wtf/OwnPtrBrew.cpp.
468 2010-04-22 Steve Block <steveblock@google.com>
470 Reviewed by Adam Barth.
472 Update Android to use isfinite, isinf, isnan and signbit from namespace std.
473 https://bugs.webkit.org/show_bug.cgi?id=37948
477 2010-04-22 Fumitoshi Ukai <ukai@chromium.org>
479 Unreviewed build fix.
481 * wtf/MD5.cpp: fix include path of CString.h
483 2010-04-22 Fumitoshi Ukai <ukai@chromium.org>
485 Reviewed by Adam Barth.
487 MD5 is required for WebSocket new protocol implementation
488 https://bugs.webkit.org/show_bug.cgi?id=37913
491 * JavaScriptCore.exp:
492 * JavaScriptCore.gypi:
493 * JavaScriptCore.pro:
494 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
495 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
496 * JavaScriptCore.xcodeproj/project.pbxproj:
497 * wtf/MD5.cpp: Added.
500 2010-04-22 Gavin Barraclough <barraclough@apple.com>
502 Reviewed by NOBODY (build fix).
503 Errk, accidentally committed commenting out two ASSERTs! reverting.
505 * runtime/Collector.cpp:
506 (JSC::Heap::protect):
507 (JSC::Heap::unprotect):
509 2010-04-22 Gavin Barraclough <barraclough@apple.com>
511 Reviewed by Geoff Garen.
513 https://bugs.webkit.org/show_bug.cgi?id=38006
514 Change lifetime of JSC::IdentifierTables used by WebCores to match AtomicStringTable
516 Presently JSC's IdentifierTables are owned by the JSGlobalData. For
517 JSGlobalData objects created via the API this should continue to be the case,
518 but for the JSGlobalData objects used by WebCore (the main thread's common
519 global data, and those for workers) use a IdentifierTable provided (and owned)
520 by wtfThreadData. This allow the lifetime of these IdentifierTable to match
521 those of the corresponding AtomicStringTables.
524 (JSC::APIEntryShim::APIEntryShim):
525 * API/JSContextRef.cpp:
526 (JSContextGroupCreate):
527 * runtime/Collector.cpp:
528 (JSC::Heap::protect):
529 (JSC::Heap::unprotect):
530 (JSC::Heap::markRoots):
531 * runtime/JSGlobalData.cpp:
532 (JSC::JSGlobalData::JSGlobalData):
533 (JSC::JSGlobalData::~JSGlobalData):
534 (JSC::JSGlobalData::createContextGroup):
535 (JSC::JSGlobalData::create):
536 (JSC::JSGlobalData::sharedInstance):
537 * runtime/JSGlobalData.h:
538 (JSC::JSGlobalData::):
539 (JSC::JSGlobalData::isSharedInstance):
540 * runtime/JSLock.cpp:
541 (JSC::JSLock::JSLock):
543 (JSC::JSLock::unlock):
544 (JSC::JSLock::DropAllLocks::DropAllLocks):
545 * wtf/WTFThreadData.cpp:
546 (WTF::WTFThreadData::WTFThreadData):
547 (WTF::WTFThreadData::~WTFThreadData):
549 2010-04-22 Sheriff Bot <webkit.review.bot@gmail.com>
551 Unreviewed, rolling out r58110.
552 http://trac.webkit.org/changeset/58110
553 https://bugs.webkit.org/show_bug.cgi?id=38007
555 Caused an internal compiler error on Qt (Requested by abarth
560 2010-04-22 Gavin Barraclough <barraclough@apple.com>
562 Reviewed by NOBODY (windows build fix).
564 * API/JSWeakObjectMapRefPrivate.cpp:
566 2010-04-22 Gavin Barraclough <barraclough@apple.com>
568 Reviewed by NOBODY (windows build fix).
571 * API/JSCallbackObject.cpp:
573 2010-04-22 Gavin Barraclough <barraclough@apple.com>
575 Reviewed by Geoff Garen.
577 https://bugs.webkit.org/show_bug.cgi?id=37978
578 Unify JSC::IdentifierTable and WebCore::AtomicStringTable implementations.
580 These two classes both implement a HashSet of uniqued StringImpls, with
581 translator classes to avoid unnecessary object creation. The only difference
582 between the classes is which flag (isIdentifier or inTable) is set.
583 Combine the two classes using a template predicated on which flag to use.
585 New class AtomicStringTable created, containing all the goodness from
586 IdentifierTable & AtomicStringTable, expect for Identifier's literalTable,
587 which has been moved onto JSGlobalData. Removed duplicate string translator
588 classes. Renamed StringImpl's inTable flag to more explicit 'isAtomic',
589 and set this on the empty string (which matches Identifier behaviour, and
590 removes a redundant check for zero-length).
593 * JavaScriptCore.gypi:
594 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
595 * JavaScriptCore.xcodeproj/project.pbxproj:
596 * runtime/Identifier.cpp:
597 (JSC::createLiteralTable):
598 (JSC::deleteLiteralTable):
599 (JSC::Identifier::add):
600 (JSC::Identifier::addSlowCase):
601 * runtime/Identifier.h:
602 * runtime/JSGlobalData.cpp:
603 (JSC::JSGlobalData::JSGlobalData):
604 (JSC::JSGlobalData::~JSGlobalData):
605 * runtime/JSGlobalData.h:
606 * wtf/WTFThreadData.cpp:
607 (WTF::WTFThreadData::WTFThreadData):
608 (WTF::WTFThreadData::~WTFThreadData):
609 * wtf/WTFThreadData.h:
610 (WTF::WTFThreadData::atomicStringTable):
611 * wtf/text/AtomicString.cpp:
613 (WebCore::operator==):
614 (WebCore::AtomicString::add):
615 (WebCore::AtomicString::find):
616 (WebCore::AtomicString::remove):
617 * wtf/text/AtomicStringTable.h: Added.
618 (WTF::CStringTranslator::hash):
619 (WTF::CStringTranslator::equal):
620 (WTF::CStringTranslator::translate):
621 (WTF::UCharBufferTranslator::hash):
622 (WTF::UCharBufferTranslator::equal):
623 (WTF::UCharBufferTranslator::translate):
624 (WTF::HashAndCharactersTranslator::hash):
625 (WTF::HashAndCharactersTranslator::equal):
626 (WTF::HashAndCharactersTranslator::translate):
627 (WTF::IdentifierOrAtomicStringTable::remove):
628 (WTF::::~IdentifierOrAtomicStringTable):
631 * wtf/text/StringImpl.cpp:
632 (WebCore::StringImpl::~StringImpl):
633 * wtf/text/StringImpl.h:
634 (WebCore::StringImpl::isAtomic):
635 (WebCore::StringImpl::setIsAtomic):
637 * wtf/text/StringImplBase.h:
638 (WTF::StringImplBase::StringImplBase):
640 2010-04-22 Steve Block <steveblock@google.com>
642 Reviewed by Adam Barth.
644 Update Android to use isfinite, isinf, isnan and signbit from namespace std.
645 https://bugs.webkit.org/show_bug.cgi?id=37948
649 2010-04-22 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
651 Reviewed by Kenneth Rohde Christiansen.
653 [Qt] Remove dependency of JSC to QtGui
654 https://bugs.webkit.org/show_bug.cgi?id=37867
656 The patch also make sure that hal.h is in the include path on Symbian.
657 The dependency to QtGui took care of that before.
659 Patch by Thiago Macieira <thiago.macieira@nokia.com>
660 and Rohan McGovern <rohan.mcgovern@nokia.com>
662 * JavaScriptCore.pri:
663 * JavaScriptCore.pro:
665 2010-04-22 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
667 Reviewed by Tor Arne Vestbø.
669 [Qt] Corrects symbols visibility for JavaScriptCore.
671 https://bugs.webkit.org/show_bug.cgi?id=37867
673 * JavaScriptCore.pro:
675 2010-04-22 Gabor Loki <loki@webkit.org>
677 Reviewed by Gavin Barraclough.
679 Use BLX and BX to keep happy the return stack predictor above ARMv4
680 https://bugs.webkit.org/show_bug.cgi?id=37862
682 Inspired by Jacob Bramley's patch from JaegerMonkey
684 * assembler/ARMAssembler.cpp:
685 (JSC::ARMAssembler::executableCopy):
686 * assembler/ARMAssembler.h:
687 (JSC::ARMAssembler::):
688 (JSC::ARMAssembler::bx):
689 (JSC::ARMAssembler::blx):
690 (JSC::ARMAssembler::loadBranchTarget):
691 (JSC::ARMAssembler::jmp):
692 (JSC::ARMAssembler::getLdrImmAddress):
693 * assembler/MacroAssemblerARM.h:
694 (JSC::MacroAssemblerARM::jump):
695 (JSC::MacroAssemblerARM::nearCall):
696 (JSC::MacroAssemblerARM::call):
697 (JSC::MacroAssemblerARM::ret):
698 (JSC::MacroAssemblerARM::prepareCall):
699 (JSC::MacroAssemblerARM::call32):
701 2010-04-21 Andy Estes <aestes@apple.com>
703 Rubber stamped by Mark Rowe.
705 Export WTF::deleteOwnedPtr(HFONT).
707 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
709 2010-04-21 Gavin Barraclough <barraclough@apple.com>
711 Rubber Stamped by Oliver Hunt.
713 Make SmallStrings store an array of RefPtr<StringImpl>,
714 instead of a direct array of StringImpls. This allows
715 us to remove a friend (and a layering violation) from
716 WTF::StringImpl, and makes it so that all StringImpls
717 are individually heap allocated.
719 * runtime/SmallStrings.cpp:
720 (JSC::SmallStringsStorage::rep):
721 (JSC::SmallStringsStorage::SmallStringsStorage):
722 * wtf/text/StringImpl.h:
724 2010-04-21 Sam Weinig <sam@webkit.org>
726 Reviewed by Geoffrey Garen.
728 Fix for https://bugs.webkit.org/show_bug.cgi?id=37937
729 Wean JavaScriptCore off calls to isMainThread()
731 - Replace use of isMainThread() for interpreter reentry checks
732 with a stored value on the JSGlobalData.
733 - Replace use of isMainThread() for useMainThread only check in the
734 collector with a stored exclusive thread.
736 * API/JSContextRef.cpp:
737 (JSContextGroupCreate):
738 Always default to a small stack type for uses of the JSC API. It is
739 unlikely that the interpreter reentry required on the web will be as
740 important for other uses of JavaScriptCore.
742 * JavaScriptCore.exp:
743 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
746 * interpreter/Interpreter.cpp:
747 (JSC::Interpreter::execute):
748 (JSC::Interpreter::prepareForRepeatCall):
749 Use new stored JSGlobalData::maxReentryDepth instead of isMainThread().
751 * interpreter/Interpreter.h:
752 Rename MaxMainThreadReentryDepth to MaxLargeThreadReentryDepth and
753 MaxSecondaryThreadReentryDepth to MaxSmallThreadReentryDepth.
756 (main): Use the a large stack for jsc since it is always using the
759 * runtime/ArrayPrototype.cpp:
760 (JSC::arrayProtoFuncToString):
761 (JSC::arrayProtoFuncToLocaleString):
762 (JSC::arrayProtoFuncJoin):
763 Use new stored JSGlobalData::maxReentryDepth instead of isMainThread().
765 * runtime/Collector.cpp:
766 (JSC::Heap::registerThread):
767 Use the concept of making JSC run on an exclusiveThread instead of
768 forcing a mainThreadOnly assertion.
770 * runtime/JSGlobalData.cpp:
771 (JSC::JSGlobalData::JSGlobalData):
772 (JSC::JSGlobalData::createNonDefault):
773 (JSC::JSGlobalData::create):
774 (JSC::JSGlobalData::createLeaked):
775 (JSC::JSGlobalData::sharedInstance):
776 * runtime/JSGlobalData.h:
777 Add ThreadStackType argument to JSGlobalData constructors and set
778 maxReentryDepth based on it.
780 2010-04-21 Gavin Barraclough <barraclough@apple.com>
782 Reviewed by NOBODY (windows build fix pt. 3).
784 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
786 2010-04-21 Gavin Barraclough <barraclough@apple.com>
788 Reviewed by NOBODY (windows build fix pt. 2).
790 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
792 2010-04-21 Gavin Barraclough <barraclough@apple.com>
794 Reviewed by NOBODY (Qt build fix).
796 * JavaScriptCore.gypi:
797 * JavaScriptCore.pro:
798 * wtf/qt/StringQt.cpp: Copied from WebCore/platform/text/qt/StringQt.cpp.
800 2010-04-21 Gavin Barraclough <barraclough@apple.com>
802 Reviewed by NOBODY (windows build fix).
804 * API/JSValueRef.cpp:
805 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
806 * runtime/Identifier.cpp:
807 (JSC::IdentifierTable::~IdentifierTable):
808 (JSC::IdentifierTable::add):
809 * runtime/Identifier.h:
810 * wtf/WTFThreadData.h:
811 (JSC::IdentifierTable::remove):
812 (JSC::IdentifierTable::literalTable):
813 * wtf/text/StringImpl.cpp:
814 (WebCore::StringImpl::~StringImpl):
816 2010-04-20 Gavin Barraclough <barraclough@apple.com>
818 Reviewed by Oliver Hunt, Darin Adler.
820 Bug 37906 - Remove JSC::UStringImpl; unify with StringImpl.
822 JSC::UStringImpl and WebCore::StringImpl (soon to be renamed to
823 WTF::StringImpl) are almost identical. Remove duplication of code by unifying
824 the two, move missing features from UStringImpl into StringImpl & delete the
827 * API/JSClassRef.cpp:
828 * API/JSContextRef.cpp:
830 * JavaScriptCore.exp:
831 * JavaScriptCore.pro:
832 * JavaScriptCore.xcodeproj/project.pbxproj:
833 * bytecode/EvalCodeCache.h:
834 * bytecode/JumpTable.cpp:
835 * profiler/ProfileNode.cpp:
836 * runtime/Identifier.cpp:
837 (JSC::Identifier::add):
838 * runtime/Identifier.h:
839 (JSC::Identifier::equal):
840 * runtime/UString.cpp:
843 * runtime/UStringImpl.cpp: Removed.
844 * runtime/UStringImpl.h:
845 * wtf/text/StringHash.h:
846 (WebCore::StringHash::equal):
847 (WebCore::CaseFoldingHash::equal):
848 * wtf/text/StringImpl.cpp:
849 (WebCore::StringImpl::~StringImpl):
850 (WebCore::StringImpl::empty):
851 (WebCore::StringImpl::sharedBuffer):
853 * wtf/text/StringImpl.h:
854 (WebCore::StringImpl::StringImpl):
855 (WebCore::StringImpl::create):
856 (WebCore::StringImpl::tryCreateUninitialized):
857 (WebCore::StringImpl::cost):
858 (WebCore::StringImpl::isIdentifier):
859 (WebCore::StringImpl::setIsIdentifier):
860 (WebCore::StringImpl::computeHash):
861 (WebCore::StringImpl::copyChars):
862 (WebCore::StringImpl::):
864 2010-04-21 Patrick Gansterer <paroga@paroga.com>
866 Reviewed by Darin Adler.
868 Added missing #include "Lookup.h" in LUT source files.
869 https://bugs.webkit.org/show_bug.cgi?id=37903
871 * runtime/ArrayPrototype.cpp:
872 * runtime/DatePrototype.cpp:
873 * runtime/JSONObject.cpp:
874 * runtime/MathObject.cpp:
875 * runtime/NumberConstructor.cpp:
876 * runtime/RegExpConstructor.cpp:
877 * runtime/RegExpObject.cpp:
878 * runtime/StringPrototype.cpp:
880 2010-04-21 Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
882 Reviewed by Nikolas Zimmermann.
884 Add missing EFL JavaScriptCore file.
885 http://webkit.org/b/37854
888 * wtf/efl/MainThreadEfl.cpp: Added.
889 (WTF::initializeMainThreadPlatform):
891 (WTF::scheduleDispatchFunctionsOnMainThread):
893 2010-04-20 Xan Lopez <xlopez@igalia.com>
895 Another attempt to fix the build.
899 2010-04-20 Oliver Hunt <oliver@apple.com>
901 Reviewed by Maciej Stachowiak.
903 [ES5] RegExp literals are constants that should be persistent across multiple function calls.
904 https://bugs.webkit.org/show_bug.cgi?id=37908
906 Dump the separate RegExp constant pool, and just use the standard JS constant pool
907 in codeblock. This allows us to drop op_new_regexp and all associated code as well.
909 * bytecode/CodeBlock.cpp:
910 (JSC::CodeBlock::dump):
911 (JSC::CodeBlock::shrinkToFit):
912 * bytecode/CodeBlock.h:
914 * bytecompiler/BytecodeGenerator.cpp:
915 (JSC::BytecodeGenerator::emitLoad):
916 * bytecompiler/BytecodeGenerator.h:
917 * bytecompiler/NodesCodegen.cpp:
918 (JSC::RegExpNode::emitBytecode):
919 * interpreter/Interpreter.cpp:
920 (JSC::Interpreter::privateExecute):
922 (JSC::JIT::privateCompileMainPass):
924 * jit/JITOpcodes.cpp:
929 2010-04-20 Oliver Hunt <oliver@apple.com>
931 Fix license on create_regex_tables
933 * create_regex_tables:
935 2010-04-20 Oliver Hunt <oliver@apple.com>
937 Reviewed by NOBODY (Build fix).
942 * make-generated-sources.sh:
944 2010-04-20 Gavin Barraclough <barraclough@apple.com>
946 Reviewed by Oliver Hunt.
948 Bug 37895 - Share common code from UStringImplBase with StringImpl
950 The implementation of StringImpl & UStringImpl is very similar. Restructure
951 StringImpl to match UStringImpl, moving the flags and length into a base class,
952 so that this can be shared between both string types to increase code reuse.
954 * JavaScriptCore.xcodeproj/project.pbxproj:
955 * runtime/RopeImpl.h:
956 (JSC::RopeImpl::RopeImpl):
957 * runtime/UStringImpl.h:
958 (JSC::UStringImpl::UStringImpl):
959 * wtf/text/StringImpl.h:
960 (WebCore::StringImpl::StringImpl):
961 (WebCore::StringImpl::characters):
962 * wtf/text/StringImplBase.h: Copied from JavaScriptCore/runtime/UStringImpl.h.
963 (WTF::StringImplBase::length):
964 (WTF::StringImplBase::operator new):
965 (WTF::StringImplBase::StringImplBase):
967 2010-04-20 Oliver Hunt <oliver@apple.com>
969 Reviewed by Gavin Barraclough.
971 Autogenerate yarr character tables
972 https://bugs.webkit.org/show_bug.cgi?id=37877
974 Use a python script to automatically generate character tables
975 for the builtin YARR character classes. This allows us to generate
976 actual tables as well, by using these tables we can both increase
977 performance of the check (for complex builtins) and reduce the actual
980 4-8% win on string-unpack-code, but lots of noise on other tests so
981 i'm only confident saying its a 1% win overall.
983 * DerivedSources.make:
984 * JavaScriptCore.xcodeproj/project.pbxproj:
985 * assembler/AbstractMacroAssembler.h:
986 (JSC::AbstractMacroAssembler::ExtendedAddress::ExtendedAddress):
987 * assembler/MacroAssembler.h:
988 (JSC::MacroAssembler::branchTest8):
989 * assembler/MacroAssemblerX86Common.h:
990 (JSC::MacroAssemblerX86Common::branchTest8):
991 * assembler/MacroAssemblerX86_64.h:
992 (JSC::MacroAssemblerX86_64::branchTest8):
993 * assembler/X86Assembler.h:
994 (JSC::X86Assembler::cmpb_im):
995 (JSC::X86Assembler::testb_im):
996 * bytecode/SamplingTool.cpp:
997 (JSC::SamplingTool::dump):
998 * create_regex_tables: Added.
999 * yarr/RegexCompiler.cpp:
1000 (JSC::Yarr::CharacterClassConstructor::charClass):
1001 * yarr/RegexJIT.cpp:
1002 (JSC::Yarr::RegexGenerator::matchCharacterClass):
1003 (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
1004 (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
1005 (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
1006 * yarr/RegexPattern.h:
1007 (JSC::Yarr::CharacterClassTable::create):
1008 (JSC::Yarr::CharacterClassTable::CharacterClassTable):
1009 (JSC::Yarr::CharacterClass::CharacterClass):
1011 2010-04-20 Gavin Barraclough <barraclough@apple.com>
1013 Reviewed by NOBODY (speculative windows fix - missed a bit!).
1015 * wtf/text/AtomicString.h:
1017 2010-04-20 Gavin Barraclough <barraclough@apple.com>
1019 Reviewed by NOBODY (speculative windows fix).
1021 * wtf/text/AtomicString.h:
1023 2010-04-20 Gavin Barraclough <barraclough@apple.com>
1025 Reviewed by NOBODY (windows build fix).
1027 Add missing .def file entries.
1029 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1031 2010-04-20 Gavin Barraclough <barraclough@apple.com>
1033 Reviewed by Geoff Garen.
1035 Bug 37869 - Move URopeImpl to its own .h/.cpp
1037 Currently Ropes are implemented by the class URopeImpl, which is defined in
1038 UStringImpl.h, and then typedefed to the name JSString::Rope. Remove the
1039 typedef, and rename all uses of URopeImpl and JSString::Rope to just RopeImpl.
1041 Move RopeImpl to its own header, and remove all remaining references to ropes
1042 from UStringImpl (rename UStringOrRopeImpl to UStringImplBase, rename or move
1043 the isRope & deref methods from UStringOrRopeImpl).
1045 * JavaScriptCore.xcodeproj/project.pbxproj:
1046 * runtime/JSString.cpp:
1047 (JSC::JSString::resolveRope):
1048 * runtime/JSString.h:
1050 (JSC::RopeBuilder::JSString):
1051 (JSC::RopeBuilder::~JSString):
1052 (JSC::RopeBuilder::appendStringInConstruct):
1053 (JSC::RopeBuilder::JSStringFinalizerStruct::):
1054 * runtime/RopeImpl.cpp: Copied from JavaScriptCore/runtime/UStringImpl.cpp.
1055 (JSC::RopeImpl::derefFibersNonRecursive):
1056 (JSC::RopeImpl::destructNonRecursive):
1057 * runtime/RopeImpl.h: Copied from JavaScriptCore/runtime/UStringImpl.h.
1058 (JSC::RopeImpl::tryCreateUninitialized):
1059 (JSC::RopeImpl::isRope):
1060 (JSC::RopeImpl::deref):
1061 (JSC::RopeImpl::RopeImpl):
1062 * runtime/UStringImpl.cpp:
1063 * runtime/UStringImpl.h:
1064 (JSC::UStringImplBase::isInvalid):
1065 (JSC::UStringImplBase::ref):
1066 (JSC::UStringImplBase::UStringImplBase):
1067 (JSC::UStringImplBase::):
1068 (JSC::UStringImpl::UStringImpl):
1070 2010-04-20 Gavin Barraclough <barraclough@apple.com>
1072 Reviewed by Geoff Garen.
1074 Bug 37828 - Move WebCore's String classes to WTF
1076 Move these classes up to WTF so they are available to all clients of WTF (in
1079 As a first patch, making the most minimal change possible, since this patch
1080 could easily grow rather large since we'll have to change every class forward
1081 declaration ( e.g. every "namespace WebCore { class String; }" much change to
1082 "namespace WTF { class String; }").
1084 Moving the files, but leaving the classes logically in the WebCore namespace -
1085 which is technically a layering violation - I'll come back and fix this up in a
1089 * Android.v8.wtf.mk:
1091 * JavaScriptCore.exp:
1092 * JavaScriptCore.gypi:
1093 * JavaScriptCore.pro:
1094 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1095 * JavaScriptCore.xcodeproj/project.pbxproj:
1097 * wtf/StaticConstructors.h: Copied from WebCore/platform/StaticConstructors.h.
1098 * wtf/text/AtomicString.cpp: Copied from WebCore/platform/text/AtomicString.cpp.
1099 * wtf/text/AtomicString.h: Copied from WebCore/platform/text/AtomicString.h.
1100 * wtf/text/AtomicStringImpl.h: Copied from WebCore/platform/text/AtomicStringImpl.h.
1101 * wtf/text/StringBuffer.h: Copied from WebCore/platform/text/StringBuffer.h.
1102 * wtf/text/StringHash.h: Copied from WebCore/platform/text/StringHash.h.
1103 * wtf/text/StringImpl.cpp: Copied from WebCore/platform/text/StringImpl.cpp.
1104 * wtf/text/StringImpl.h: Copied from WebCore/platform/text/StringImpl.h.
1105 * wtf/text/WTFString.cpp: Copied from WebCore/platform/text/String.cpp.
1106 (WebCore::charactersToFloat):
1107 * wtf/text/WTFString.h: Copied from WebCore/platform/text/PlatformString.h.
1109 2010-04-20 Csaba Osztrogonác <ossy@webkit.org>
1111 [Qt] Unreviewed speculative buildfix for WinCE after r57882
1112 https://bugs.webkit.org/show_bug.cgi?id=37701
1114 * JavaScriptCore.pri: missing wince* case added.
1116 2010-04-20 Gavin Barraclough <barraclough@apple.com>
1118 Reviewed by NOBODY (build fix).
1119 Speculative Chromium/Win build fix, attempt #2.
1123 2010-04-20 Gavin Barraclough <barraclough@apple.com>
1125 Reviewed by NOBODY (build fix).
1126 Speculative Chromium/Win build fix.
1128 * config.h: JS_EXPORTDATA should do nothing on !JSC builds.
1130 2010-04-20 Csaba Osztrogonác <ossy@webkit.org>
1132 Reviewed by Simon Hausmann.
1134 [Qt] Target(WebCore,jsc,...) must depends on static library of JavaScriptCore
1135 https://bugs.webkit.org/show_bug.cgi?id=37701
1137 * JavaScriptCore.pri: dependency added.
1139 2010-04-20 Gavin Barraclough <barraclough@apple.com>
1141 Rubber stamped by Maciej Stachowiak (relanding r57829).
1142 Added missing JS_EXPORTDATA
1145 (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
1146 (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
1147 (JSC::APICallbackShim::APICallbackShim):
1148 (JSC::APICallbackShim::~APICallbackShim):
1149 * API/JSContextRef.cpp:
1151 * Android.v8.wtf.mk:
1153 * JavaScriptCore.exp:
1154 * JavaScriptCore.gypi:
1155 * JavaScriptCore.pro:
1156 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1157 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1158 * JavaScriptCore.xcodeproj/project.pbxproj:
1159 * runtime/Completion.cpp:
1162 * runtime/Identifier.cpp:
1163 (JSC::Identifier::remove):
1164 (JSC::Identifier::checkCurrentIdentifierTable):
1165 * runtime/Identifier.h:
1166 * runtime/InitializeThreading.cpp:
1167 (JSC::initializeThreadingOnce):
1168 * runtime/JSGlobalData.cpp:
1169 (JSC::JSGlobalData::create):
1170 * wtf/WTFThreadData.cpp: Copied from JavaScriptCore/wtf/WTFThreadData.cpp.
1171 * wtf/WTFThreadData.h: Copied from JavaScriptCore/wtf/WTFThreadData.h.
1173 2010-04-19 Gavin Barraclough <barraclough@apple.com>
1175 Reviewed by NOBODY (rolling out r57829).
1179 (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
1180 (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
1181 (JSC::APICallbackShim::APICallbackShim):
1182 (JSC::APICallbackShim::~APICallbackShim):
1183 * API/JSContextRef.cpp:
1185 * Android.v8.wtf.mk:
1187 * JavaScriptCore.exp:
1188 * JavaScriptCore.gypi:
1189 * JavaScriptCore.pro:
1190 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1191 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1192 * JavaScriptCore.xcodeproj/project.pbxproj:
1193 * runtime/Completion.cpp:
1196 * runtime/Identifier.cpp:
1197 (JSC::Identifier::remove):
1198 (JSC::Identifier::checkCurrentIdentifierTable):
1199 (JSC::createIdentifierTableSpecificCallback):
1200 (JSC::createIdentifierTableSpecific):
1201 * runtime/Identifier.h:
1202 (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData):
1203 (JSC::defaultIdentifierTable):
1204 (JSC::setDefaultIdentifierTable):
1205 (JSC::currentIdentifierTable):
1206 (JSC::setCurrentIdentifierTable):
1207 (JSC::resetCurrentIdentifierTable):
1208 * runtime/InitializeThreading.cpp:
1209 (JSC::initializeThreadingOnce):
1210 * runtime/JSGlobalData.cpp:
1211 (JSC::JSGlobalData::create):
1212 * wtf/WTFThreadData.cpp: Removed.
1213 * wtf/WTFThreadData.h: Removed.
1215 2010-04-19 Douglas Gregor <dgregor@apple.com>
1217 Reviewed and landed by Anders Carlsson.
1219 * runtime/UStringImpl.h:
1220 Fix class/struct declaration mismatches.
1222 2010-04-19 Geoffrey Garen <ggaren@apple.com>
1224 Reviewed by Beth Dakin.
1226 Checked in these tests I wrote becuase Balazs Kelemen wanted to use them.
1228 * tests/perf: Added.
1229 * tests/perf/bench-allocate-nonretained.js: Added.
1230 * tests/perf/bench-allocate-retained.js: Added.
1232 2010-04-19 Gavin Barraclough <barraclough@apple.com>
1234 Reviewed by NOBODY (windows build fix).
1236 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1238 2010-04-16 Gavin Barraclough <barraclough@apple.com>
1240 Reviewed by Sam Weinig.
1242 https://bugs.webkit.org/show_bug.cgi?id=37745
1243 Move string uniquing tables to (new) WTFThreadData class.
1245 Remove AtomicString's dependency on ThreadGlobalData so that we can move
1246 WebCore's string classes up to WTF.
1248 WTFThreadData.cpp/.h are based on ThreadGlobalData from WebCore.
1249 Moved JSC & WebCore's string uniquing tables to this class.
1251 This patch introduces a temporary layering violation in providing forward
1252 declarations of classes from JSC and WTF; this will be resolved as we move
1253 more string code up to WTF.
1256 (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
1257 (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
1258 (JSC::APICallbackShim::APICallbackShim):
1259 (JSC::APICallbackShim::~APICallbackShim):
1260 * API/JSContextRef.cpp:
1261 * JavaScriptCore.exp:
1262 * JavaScriptCore.xcodeproj/project.pbxproj:
1263 * runtime/Completion.cpp:
1266 * runtime/Identifier.cpp:
1267 (JSC::Identifier::remove):
1268 (JSC::Identifier::checkCurrentIdentifierTable):
1269 * runtime/Identifier.h:
1270 * runtime/InitializeThreading.cpp:
1271 (JSC::initializeThreadingOnce):
1272 * runtime/JSGlobalData.cpp:
1273 (JSC::JSGlobalData::create):
1274 * wtf/WTFThreadData.cpp: Copied from WebCore/platform/ThreadGlobalData.cpp.
1275 (WTF::WTFThreadData::WTFThreadData):
1276 (WTF::WTFThreadData::~WTFThreadData):
1277 * wtf/WTFThreadData.h: Copied from WebCore/platform/ThreadGlobalData.h.
1278 (WTF::WTFThreadData::atomicStringTable):
1279 (WTF::WTFThreadData::initializeIdentifierTable):
1280 (WTF::WTFThreadData::currentIdentifierTable):
1281 (WTF::WTFThreadData::setCurrentIdentifierTable):
1282 (WTF::WTFThreadData::resetCurrentIdentifierTable):
1283 (WTF::wtfThreadData):
1285 2010-04-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
1287 Reviewed by Simon Hausmann.
1289 [Qt] Build fix for WinCE.
1291 Moved the include of the non-existing errno.h header file inside
1292 platform guard macros.
1294 * jit/ExecutableAllocatorFixedVMPool.cpp:
1296 2010-04-18 Kwang Yul Seo <skyul@company100.net>
1298 Reviewed by Laszlo Gombos.
1300 [WINCE] Don't define WTF_CPU_MIDDLE_ENDIAN=1
1301 https://bugs.webkit.org/show_bug.cgi?id=37434
1303 Windows CE supports little-endian format only, so don't define
1304 WTF_CPU_MIDDLE_ENDIAN=1.
1308 2010-04-18 Simon Hausmann <simon.hausmann@nokia.com>
1310 Reviewed by Laszlo Gombos.
1312 [Qt] Fix JavaScriptCore's include path for WinCE builds
1314 https://bugs.webkit.org/show_bug.cgi?id=36751
1316 * JavaScriptCore.pri:
1318 2010-04-16 Gavin Barraclough <barraclough@apple.com>
1320 Reviewed by nobody, build fix.
1322 2010-04-16 Gavin Barraclough <barraclough@apple.com>
1324 Reviewed by nobody, build fix.
1326 2010-04-16 Gavin Barraclough <barraclough@apple.com>
1328 Reviewed by Oliver Hunt.
1330 Bug 37730 - Remove JSC::UString dependencies from WebCore::StringImpl
1331 (Following on from bug #37675).
1333 Make the argument ordering for UStringImpl's constructor & create
1334 methods match, when passed a shared buffer.
1336 * JavaScriptCore.exp:
1337 * runtime/UStringImpl.cpp:
1338 (JSC::UStringImpl::create):
1339 * runtime/UStringImpl.h:
1341 2010-04-15 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
1343 Reviewed by Kenneth Rohde Christiansen.
1345 Fix memory leak in QScriptEngine::evaluate().
1347 QScriptEnginePrivate::evaluate should release temporary variables.
1349 [Qt] QScriptEngine::evaluate has memory leak.
1350 https://bugs.webkit.org/show_bug.cgi?id=37596
1352 * qt/api/qscriptengine_p.cpp:
1353 (QScriptEnginePrivate::evaluate):
1354 * qt/api/qscriptengine_p.h:
1356 2010-04-14 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
1358 Reviewed by Kenneth Rohde Christiansen.
1360 Fix a memory leak in QScriptValue::inherits.
1362 [Qt] QScriptValue::inherits has a memory leak.
1363 https://bugs.webkit.org/show_bug.cgi?id=37617
1365 * qt/api/qscriptvalue_p.h:
1366 (QScriptValuePrivate::inherits):
1368 2010-04-14 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
1370 Reviewed by Kenneth Rohde Christiansen.
1372 Fix a few memory leaks in QScriptEngine.
1374 Syntax checking caused memory leak, not all temporary variables were released.
1376 [Qt] Syntax checking in the QtScript cause a memory leak.
1377 https://bugs.webkit.org/show_bug.cgi?id=37610
1379 * qt/api/qscriptengine_p.cpp:
1380 (QScriptEnginePrivate::checkSyntax):
1381 * qt/api/qscriptsyntaxcheckresult.cpp:
1382 (QScriptSyntaxCheckResultPrivate::errorMessage):
1383 (QScriptSyntaxCheckResultPrivate::errorLineNumber):
1385 2010-04-14 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
1387 Reviewed by Kenneth Rohde Christiansen.
1389 Fix memory leak inside QScriptEnginePrivate::makeJSValue.
1391 QScriptEnginePrivate::makeJSValue should release temporary JSStringRef variable.
1393 [Qt] tst_QScriptValue::toString has a memory leak.
1394 https://bugs.webkit.org/show_bug.cgi?id=37598
1396 * qt/api/qscriptengine_p.h:
1397 (QScriptEnginePrivate::makeJSValue):
1399 2010-04-14 Peter Varga <pvarga@inf.u-szeged.hu>
1401 Reviewed by Geoffrey Garen.
1403 Move the YARR JIT fallback detection from RegexJIT.cpp to
1406 https://bugs.webkit.org/show_bug.cgi?id=37571
1408 * yarr/RegexCompiler.cpp:
1409 (JSC::Yarr::RegexPatternConstructor::atomBackReference):
1410 (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
1411 * yarr/RegexJIT.cpp:
1412 (JSC::Yarr::RegexGenerator::generateTerm):
1413 (JSC::Yarr::RegexGenerator::RegexGenerator):
1414 (JSC::Yarr::jitCompileRegex):
1416 (JSC::Yarr::RegexCodeBlock::operator!):
1417 * yarr/RegexPattern.h:
1418 (JSC::Yarr::RegexPattern::RegexPattern):
1419 (JSC::Yarr::RegexPattern::reset):
1421 2010-04-14 Kent Hansen <kent.hansen@nokia.com>
1423 Reviewed by Maciej Stachowiak.
1425 Mac OS X: Use deployment target to determine whether memory tagging should be enabled
1426 https://bugs.webkit.org/show_bug.cgi?id=34888
1428 When building on (Snow) Leopard but targeting Tiger
1429 (TARGETING_TIGER defined, BUILDING_ON_TIGER not defined),
1430 WebKit would crash on Tiger because the tags passed to mmap
1431 caused those function calls to fail.
1433 Conversely, when building on Tiger but targeting Leopard
1434 (BUILDING_ON_TIGER defined, TARGETING_LEOPARD defined), WebKit
1435 would crash on Leopard because the tags passed to vm_map and
1436 vm_allocate caused those function calls to fail.
1438 Solution: Use TARGETING_TIGER rather than BUILDING_ON_TIGER to
1439 govern the tag definitions. Use the same tags for vm_map and
1440 vm_allocate regardless of target, since they work on
1441 both. Fall back to the mmap tags that work on Tiger (that is,
1442 "no tags") if targeting Tiger, since those tags also work on
1447 2010-04-12 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
1449 Reviewed by nobody, build fix.
1451 [Qt] Build fix for Mac when building with build-webkit --qt
1453 Specifying no configuration on Mac builds WebCore both in debug
1454 and release. JavaScriptCore has to follow this rule as well.
1456 * JavaScriptCore.pro:
1458 2010-04-11 Mark Rowe <mrowe@apple.com>
1460 Reviewed by Sam Weinig.
1462 <rdar://problem/7851332> Fix the build.
1464 * wtf/FastMalloc.cpp:
1465 (WTF::TCMallocStats::): Initialize extra members of malloc_introspection_t to zero.
1467 2010-04-09 Mikhail Naganov <mnaganov@chromium.org>
1469 Reviewed by Pavel Feldman.
1471 Make CallIdentifier constructor to handle null urls.
1473 https://bugs.webkit.org/show_bug.cgi?id=37341
1475 * profiler/CallIdentifier.h:
1476 (JSC::CallIdentifier::CallIdentifier):
1478 2010-04-09 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
1480 Reviewed by Simon Hausmann.
1482 [Qt] Fix crashes with package builds in release
1484 Add NDEBUG to the defines for package build in JavaScriptCore.pri,
1485 so that it's consistently used for JavaScriptCore, WebCore, jsc and all
1486 other tools using wtf, etc. data structures directly. Mixing NDEBUG with
1487 non-NDEBUG builds causes crashes due to differences in data structures when
1488 assertions/checks are enabled.
1490 * JavaScriptCore.pri:
1492 2010-04-09 Patrick Gansterer <paroga@paroga.com>
1494 Reviewed by Darin Adler.
1496 Implement NO_RETURN for COMPILER(MSVC).
1497 https://bugs.webkit.org/show_bug.cgi?id=33056
1499 Added NO_RETURN_WITH_VALUE for functions with non-void return type.
1502 * wtf/AlwaysInline.h:
1503 * wtf/FastMalloc.cpp:
1505 2010-04-08 Kwang Yul Seo <skyul@company100.net>
1507 Reviewed by Simon Hausmann.
1509 [WINCE] Check if ARM or _ARM_ is defined
1510 https://bugs.webkit.org/show_bug.cgi?id=37200
1512 MSVC defines ARM and _ARM_ for Windows CE ARM. Define WTF_CPU_ARM=1
1513 when either ARM or _ARM_ is defined.
1517 2010-04-08 Csaba Osztrogonác <ossy@webkit.org>
1519 Reviewed Oliver Hunt.
1521 [Qt]r57240 broke Qt build (might be a gcc bug)
1522 https://bugs.webkit.org/show_bug.cgi?id=37253
1524 Workaround until fix. On PLATFORM(QT) use inline instead of ALWAYS_INLINE.
1526 * wtf/PassRefPtr.h: Qt guards added.
1528 2010-04-07 Oliver Hunt <oliver@apple.com>
1530 Reviewed by Anders Carlsson.
1532 Vector<UString> makes many needless calls to UString::UString and UString::~UString
1534 Add a VectorTrait<UString> specialisation to allow vector to simply memset/memcpy
1535 data around. Only difference from the VectorTrait<RefPtr<T> > traits is the inability
1536 to use memset to initialize data.
1538 * runtime/UString.h:
1541 2010-04-07 Oliver Hunt <oliver@apple.com>
1543 Reviewed by Geoff Garen.
1545 Beat gcc with a clue bat -- force inlining of refIfNotNull and derefIfNotNull
1549 2010-04-07 Kwang Yul Seo <skyul@company100.net>
1551 Reviewed by Darin Adler.
1553 Replace isprint with isASCIIPrintable
1554 https://bugs.webkit.org/show_bug.cgi?id=37223
1556 WebKit does not use functions in <ctype.h> as they are dependent on the current
1557 locale. Use the equivalent functions in <wtf/ASCIICType.h>. isASCIIPrintable
1560 * pcre/pcre_exec.cpp:
1563 2010-04-07 Enrica Casucci <enrica@apple.com>
1565 Reviewed by Darin Adler.
1567 https://bugs.webkit.org/show_bug.cgi?id=37219
1569 This change disables text caret for the iPhone platflorm.
1571 * wtf/Platform.h: Disabled text caret for iPhone.
1573 2010-04-06 Adam Barth <abarth@webkit.org>
1575 Reviewed by Eric Seidel.
1577 REGRESSION: Worker termination via JS timeout may cause worker tests like fast/workers/worker-terminate.html fail.
1578 https://bugs.webkit.org/show_bug.cgi?id=36646
1580 Add a new exception type for forcibly terminating a JavaScript stack.
1581 The new exception functions similarly to the
1582 InterruptedExecutionException but is conceptually different because
1583 execution is terminated instead of just interrupted.
1586 - Added new Terminator.h file.
1587 * JavaScriptCore.gypi:
1588 - Added new Terminator.h file.
1589 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1590 - Added new Terminator.h file.
1591 * JavaScriptCore.xcodeproj/project.pbxproj:
1592 - Added new Terminator.h file.
1593 * interpreter/Interpreter.cpp:
1594 (JSC::Interpreter::throwException):
1595 - Fully unwind the stack for TerminatedExecutionException.
1596 (JSC::Interpreter::privateExecute):
1597 - Check if we've been terminated at the same time we check if we've
1600 (JSC::DEFINE_STUB_FUNCTION):
1601 - Check if we've been terminated at the same time we check if we've
1603 * runtime/Completion.cpp:
1604 - Some exceptions define special completion types so that calls can
1605 see why we terminated evaluation.
1607 * runtime/Completion.h:
1608 - Define a new completion type for termination.
1610 * runtime/ExceptionHelpers.cpp:
1611 - Define TerminatedExecutionException and refactor pseudo-RTTI
1612 virtual function to be more semantic.
1613 (JSC::InterruptedExecutionError::exceptionType):
1614 (JSC::TerminatedExecutionError::TerminatedExecutionError):
1615 (JSC::TerminatedExecutionError::exceptionType):
1616 (JSC::TerminatedExecutionError::toString):
1617 (JSC::createTerminatedExecutionException):
1618 * runtime/ExceptionHelpers.h:
1619 - Entry point for generating a TerminatedExecutionException.
1620 * runtime/JSGlobalData.cpp:
1621 (JSC::JSGlobalData::JSGlobalData):
1622 - Add a Terminator object that can be used to asynchronously
1623 terminate a JavaScript execution stack.
1624 * runtime/JSGlobalData.h:
1625 * runtime/JSObject.h:
1626 (JSC::JSObject::exceptionType):
1627 - Define that, by default, thrown objects have a normal exception
1629 * runtime/Terminator.h: Added.
1630 - Added a new controller object that can be used to terminate
1631 execution asynchronously. This object is more or less a
1633 (JSC::Terminator::Terminator):
1634 (JSC::Terminator::termianteSoon):
1635 (JSC::Terminator::shouldTerminate):
1637 2010-04-05 Oliver Hunt <oliver@apple.com>
1641 * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
1643 2010-04-05 Oliver Hunt <oliver@apple.com>
1645 And another build fix.
1647 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
1649 2010-04-05 Oliver Hunt <oliver@apple.com>
1653 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1655 2010-04-05 Oliver Hunt <oliver@apple.com>
1657 Reviewed by Gavin Barraclough.
1659 Support weak maps in JSC
1660 https://bugs.webkit.org/show_bug.cgi?id=37132
1662 Expose an API to allow creation of a map for storing
1665 * API/JSWeakObjectMapRefInternal.h: Added.
1666 (OpaqueJSWeakObjectMap::create):
1667 (OpaqueJSWeakObjectMap::map):
1668 (OpaqueJSWeakObjectMap::~OpaqueJSWeakObjectMap):
1669 (OpaqueJSWeakObjectMap::OpaqueJSWeakObjectMap):
1670 * API/JSWeakObjectMapRefPrivate.cpp: Added.
1671 * API/JSWeakObjectMapRefPrivate.h: Added.
1672 * JavaScriptCore.exp:
1673 * JavaScriptCore.xcodeproj/project.pbxproj:
1674 * runtime/JSGlobalObject.h:
1675 (JSC::JSGlobalObject::registerWeakMap):
1676 (JSC::JSGlobalObject::deregisterWeakMap):
1678 2010-04-05 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1680 Reviewed by Kenneth Rohde Christiansen.
1682 [Symbian] Consolidate Symbian WINSCW environment configuration
1683 https://bugs.webkit.org/show_bug.cgi?id=37100
1685 Move the "undefinition" of WIN32 and _WIN32 from WebCore/config.h
1686 to JavaScriptCore/wtf/Platform.h as it is not specific to WebCore.
1688 PLATFORM(WIN) and OS(WIN) no longer needs to be undefined as
1689 undefining WIN32 takes care of it.
1693 2010-04-03 Gavin Barraclough <barraclough@apple.com>
1695 Reviewed by Oliver Hunt.
1697 https://bugs.webkit.org/show_bug.cgi?id=37068
1698 Change UString to use a 0 rep for null strings instead of a null object.
1700 No performance impact.
1702 * JavaScriptCore.exp:
1703 * runtime/InternalFunction.cpp:
1704 (JSC::InternalFunction::InternalFunction):
1705 * runtime/JSString.h:
1706 (JSC::RopeBuilder::JSString):
1707 * runtime/UString.cpp:
1708 (JSC::initializeUString):
1709 * runtime/UString.h:
1710 (JSC::UString::UString):
1711 (JSC::UString::data):
1712 (JSC::UString::size):
1713 (JSC::UString::isNull):
1714 (JSC::UString::isEmpty):
1715 (JSC::UString::cost):
1717 2010-04-03 Balazs Kelemen <kb@inf.u-szeged.hu>
1719 Reviewed by Oliver Hunt.
1721 Fix uninitalised members in CallLinkInfo and BytecodeGenerator.
1723 https://bugs.webkit.org/show_bug.cgi?id=36816
1725 * bytecode/CodeBlock.cpp:
1726 (JSC::CodeBlock::CodeBlock):
1727 * bytecode/CodeBlock.h:
1728 (JSC::CallLinkInfo::CallLinkInfo):
1730 2010-04-03 yael aharon <yael.aharon@nokia.com>
1732 Reviewed by Darin Adler.
1734 Enable HTMLProgressElement for Safari on OSX
1735 https://bugs.webkit.org/show_bug.cgi?id=36961
1737 * Configurations/FeatureDefines.xcconfig:
1739 2010-04-02 Ruben Van Boxem <vanboxem.ruben@gmail.com>
1741 Reviewed by Eric Seidel.
1743 Mingw-w64 fixes for JavaScriptCore
1744 https://bugs.webkit.org/show_bug.cgi?id=35607
1746 * runtime/Collector.cpp: use the msvc code for mingw-w64 (but not mingw-w32)
1747 (JSC::Heap::allocateBlock):
1748 (JSC::Heap::freeBlockPtr):
1749 (JSC::currentThreadStackBase):
1750 (JSC::currentThreadStackBase):
1751 * wtf/Platform.h: added COMPILER(MINGW64) check to differentiate between mingw.org and mingw-w64 functions
1753 2010-04-02 Geoffrey Garen <ggaren@apple.com>
1755 Build fix: updated the .def file.
1757 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1759 2010-04-02 Geoffrey Garen <ggaren@apple.com>
1761 Reviewed by Oliver Hunt.
1763 Inlined toThisString and toThisJSString to avoid virtual function call overhead
1764 https://bugs.webkit.org/show_bug.cgi?id=37039
1766 Maybe a 1% speedup on iBench JS.
1768 * JavaScriptCore.exp: New exports.
1770 * runtime/JSCell.cpp:
1772 * runtime/JSNumberCell.cpp:
1773 * runtime/JSNumberCell.h:
1774 * runtime/JSString.cpp:
1775 * runtime/JSString.h:
1776 * runtime/JSValue.h:
1777 * runtime/JSZombie.h:
1778 (JSC::JSZombie::toThisObject): Nixed the old virtual-type implementation.
1780 * runtime/JSObject.h:
1781 (JSC::JSValue::toThisString):
1782 (JSC::JSValue::toThisJSString): Added the inlined implementation.
1784 2010-04-02 Jeremy Moskovich <jeremy@chromium.org>
1786 Reviewed by Geoffrey Garen.
1788 Beef up documentation for ASSERT* and CRASH macros a bit.
1790 https://bugs.webkit.org/show_bug.cgi?id=36527
1794 2010-04-02 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1796 Unreviewed, minor build fix.
1798 Change the order of the member initialisation list
1799 in constructor to match declaration order
1801 * runtime/Collector.cpp:
1804 2010-04-01 Kinuko Yasuda <kinuko@chromium.org>
1806 Reviewed by Dmitry Titov.
1808 Add FileThread for async file operation support in FileReader and FileWriter
1809 https://bugs.webkit.org/show_bug.cgi?id=36896
1811 Add ENABLE_FILE_READER and ENABLE_FILE_WRITER flags.
1813 * Configurations/FeatureDefines.xcconfig:
1815 2010-03-31 Gavin Barraclough <barraclough@apple.com>
1817 Reviewed by NOBODY (windows build fix pt II).
1819 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1821 2010-03-31 Gavin Barraclough <barraclough@apple.com>
1823 Reviewed by NOBODY (windows build fix).
1825 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1827 2010-03-31 Gavin Barraclough <barraclough@apple.com>
1829 Reviewed by Geoff Garen.
1831 Bug 36871 - Remove JSC::CString
1832 Use WTF::CString instead (which until recently was WebCore::CString).
1834 * JavaScriptCore.exp:
1835 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1836 * runtime/UString.cpp:
1837 * runtime/UString.h:
1839 2010-03-31 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1841 Unreviewed, fix after r56842.
1843 Add UNUSED_PARAM a to silence warning.
1846 (JSC::DEFINE_STUB_FUNCTION):
1848 2010-03-31 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1850 Unreviewed, Symbian build fix.
1852 Refactor JITStubs.cpp so that the list of STUB_FUNCTIONs
1853 are not dependent on the JSVALUE32_64 guard.
1855 * jit/JITStubs.cpp: Place the JSVALUE32_64 guard inside
1856 the body of cti_op_eq_strings.
1857 * jit/JITStubs.h: Remove JSVALUE32_64 guard from
1858 cti_op_eq_strings stub.
1860 2010-03-30 Gavin Barraclough <barraclough@apple.com>
1862 Reviewed by NOBODY (windows build fix).
1864 Fixing b0rked version of JavaScriptCore.vcproj - added lines were truncated.
1866 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1868 2010-03-30 Gavin Barraclough <barraclough@apple.com>
1870 Rubber stamped by Sam Weinig.
1872 https://bugs.webkit.org/show_bug.cgi?id=36866
1877 * JavaScriptCore.exp:
1878 * JavaScriptCore.gypi:
1879 * JavaScriptCore.pro:
1880 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1881 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1882 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1883 * JavaScriptCore.xcodeproj/project.pbxproj:
1885 * wtf/text/CString.cpp: Copied from WebCore/platform/text/CString.cpp.
1886 * wtf/text/CString.h: Copied from WebCore/platform/text/CString.h.
1887 (WTF::CStringBuffer::data):
1888 (WTF::CStringBuffer::length):
1889 (WTF::CStringBuffer::create):
1890 (WTF::CStringBuffer::CStringBuffer):
1891 (WTF::CStringBuffer::mutableData):
1892 (WTF::CString::CString):
1893 (WTF::CString::isNull):
1894 (WTF::CString::buffer):
1897 2010-03-30 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
1899 Reviewed by nobody, build break.
1901 [Qt] Fix build break on Qt Mac.
1903 DESTDIR path on Mac do not include the configuration path by default
1904 like on Windows. Have to force it.
1906 * JavaScriptCore.pro:
1908 2010-03-29 Alice Liu <alice.liu@apple.com>
1910 Reviewed by NOBODY (build fix).
1912 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
1913 add JSObjectRefPrivate.h
1915 2010-03-29 Chao-ying Fu <fu@mips.com>
1917 Reviewed by Oliver Hunt.
1920 https://bugs.webkit.org/show_bug.cgi?id=30144
1922 The following changes enable MIPS JIT.
1924 * assembler/MIPSAssembler.h:
1925 (JSC::MIPSAssembler::lbu):
1926 (JSC::MIPSAssembler::linkWithOffset):
1927 * assembler/MacroAssemblerMIPS.h:
1928 (JSC::MacroAssemblerMIPS::load8):
1929 (JSC::MacroAssemblerMIPS::branch8):
1930 (JSC::MacroAssemblerMIPS::branchTest8):
1931 (JSC::MacroAssemblerMIPS::setTest8):
1932 (JSC::MacroAssemblerMIPS::setTest32):
1934 * jit/JITInlineMethods.h:
1935 (JSC::JIT::preserveReturnAddressAfterCall):
1936 (JSC::JIT::restoreReturnAddressBeforeReturn):
1937 * jit/JITOpcodes.cpp:
1939 (JSC::JITThunks::JITThunks):
1941 (JSC::JITStackFrame::returnAddressSlot):
1944 2010-02-26 Kenneth Rohde Christiansen <kenneth@webkit.org>
1946 Reviewed by Simon Fraser.
1948 Add support for Widgets 1.0: View Mode Media Feature
1949 https://bugs.webkit.org/show_bug.cgi?id=35446
1951 Add an enable flag for the Widgets (http://www.w3.org/TR/widgets-reqs/)
1952 and turn it on for Qt only.
1956 2010-03-29 Patrick Gansterer <paroga@paroga.com>
1958 Reviewed by Darin Adler.
1960 Corrected name of (u)int64_t compile time assert.
1961 https://bugs.webkit.org/show_bug.cgi?id=36739
1963 int64_t_is_four_bytes -> int64_t_is_eight_bytes
1965 * os-win32/stdint.h:
1967 2010-03-29 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
1969 Reviewed by Simon Hausmann.
1971 [Qt] Use the -l syntax for linking against JavaScriptCore on Windows.
1972 This allow qmake to extract dependencies correctly when generating VS
1975 * JavaScriptCore.pri:
1977 2010-03-29 Thomas Zander <t.zander@nokia.com>
1979 Reviewed by Simon Hausmann.
1981 https://bugs.webkit.org/show_bug.cgi?id=36742
1983 gcc for Symbian doesn't support gcc extensions like atomicity.h - disable
1985 * wtf/Threading.h: also detect os symbian
1987 2010-03-28 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1989 Reviewed by Simon Hausmann.
1991 [Qt] Remove the definition of WTF_CHANGES guards from the build system
1992 https://bugs.webkit.org/show_bug.cgi?id=31670
1994 * JavaScriptCore.pro: Remove the definition of WTF_CHANGES
1995 as it is already defined in config.h
1997 2010-03-28 Kent Hansen <kent.hansen@nokia.com>
1999 Reviewed by Simon Hausmann.
2001 [Qt] Add API for reporting additional memory cost of JavaScript objects
2002 https://bugs.webkit.org/show_bug.cgi?id=36650
2004 * qt/api/qscriptengine.cpp:
2005 (QScriptEngine::reportAdditionalMemoryCost):
2006 * qt/api/qscriptengine.h:
2007 * qt/api/qscriptengine_p.h:
2008 (QScriptEnginePrivate::reportAdditionalMemoryCost):
2009 * qt/tests/qscriptengine/tst_qscriptengine.cpp:
2010 (tst_QScriptEngine::reportAdditionalMemoryCost):
2012 2010-03-28 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
2014 Reviewed by Simon Hausmann.
2016 QScriptEngine API was enriched by globalObject() method
2017 which give an access to the global object.
2019 [Qt] QScriptEngine doesn't give an access to global object
2020 https://bugs.webkit.org/show_bug.cgi?id=36603
2022 * qt/api/qscriptengine.cpp:
2023 (QScriptEngine::globalObject):
2024 * qt/api/qscriptengine.h:
2025 * qt/api/qscriptengine_p.cpp:
2026 (QScriptEnginePrivate::globalObject):
2027 * qt/api/qscriptengine_p.h:
2028 * qt/tests/qscriptengine/tst_qscriptengine.cpp:
2029 (tst_QScriptEngine::globalObject):
2031 2010-03-26 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
2033 Reviewed by Simon Hausmann.
2035 [Qt] Build JavaScriptCore as a static library.
2036 https://bugs.webkit.org/show_bug.cgi?id=36590
2038 This patch takes what was left of the unused JavaScriptCore.pro
2039 and moved the compilation logic from JavaScriptCore.pri to
2042 * JavaScriptCore.pri:
2043 * JavaScriptCore.pro:
2045 * qt/api/QtScript.pro:
2047 2010-03-25 Gavin Barraclough <barraclough@apple.com>
2049 Reviewed by NOBODY (build fix).
2051 * profiler/ProfileGenerator.cpp:
2052 (JSC::ProfileGenerator::willExecute):
2053 (JSC::ProfileGenerator::didExecute):
2055 2010-03-25 Gavin Barraclough <barraclough@apple.com>
2057 Reviewed by Geoff Garen.
2059 Bug 36611 - Cleanup JSC::CString
2060 Rename CString::c_str() -> CString::data(), CString::size() -> CString::length(),
2061 remove UString::getCString() (all uses are wrong, should use UString::UTF8String()).
2063 * bytecode/CodeBlock.cpp:
2064 (JSC::CodeBlock::printUnaryOp):
2065 (JSC::CodeBlock::printBinaryOp):
2066 (JSC::CodeBlock::printConditionalJump):
2067 (JSC::CodeBlock::printGetByIdOp):
2068 (JSC::CodeBlock::printPutByIdOp):
2069 (JSC::printGlobalResolveInfo):
2070 (JSC::printStructureStubInfo):
2071 (JSC::CodeBlock::printStructure):
2072 (JSC::CodeBlock::printStructures):
2073 (JSC::CodeBlock::dump):
2078 (fillBufferWithContentsOfFile):
2079 * profiler/CallIdentifier.h:
2080 (JSC::CallIdentifier::c_str):
2081 * profiler/Profile.cpp:
2082 (JSC::Profile::debugPrintDataSampleStyle):
2083 * profiler/ProfileNode.cpp:
2084 (JSC::ProfileNode::debugPrintData):
2085 (JSC::ProfileNode::debugPrintDataSampleStyle):
2086 * runtime/DateConversion.cpp:
2088 * runtime/JSGlobalObjectFunctions.cpp:
2090 (JSC::globalFuncJSCPrint):
2091 * runtime/UString.cpp:
2093 (JSC::UString::toDouble):
2094 * runtime/UString.h:
2095 (JSC::CString::length):
2096 (JSC::CString::data):
2098 2010-03-25 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
2100 Reviewed by nobody, build fix.
2102 [Qt] Build fix on MSVC. Reverts r55633 for stdint.h
2104 This file gets included in generated moc files which don't
2105 include the prefix header.
2107 * os-win32/stdint.h:
2109 2010-03-24 Gavin Barraclough <barraclough@apple.com>
2111 Reviewed by NOBODY (windows build fix).
2113 2010-03-24 Gavin Barraclough <barraclough@apple.com>
2115 Reviewed by Sam Weinig.
2117 Switch String::latin1, String::utf8, String::fromUTF8 to
2118 use WTF's Unicode conversion methods rather than TextEncoder.
2119 These methods only perform simple conversion, and don't need
2120 really require TextEncoder's full capability (to look up arbitrary
2121 encodings by name), switching to only be dependent on WTF will
2122 make it easier if we chose to move WebCore::String to WTF.
2124 * JavaScriptCore.exp:
2126 2010-03-24 Alexey Proskuryakov <ap@apple.com>
2128 Reviewed by Geoff Garen.
2130 * wtf/FastMalloc.h: Added a using directive for fastMallocSize, like we do for all public
2131 WTF symbols. Also sorted the list alphabetically.
2133 2010-03-23 Gavin Barraclough <barraclough@apple.com>
2135 Reviewed by NOBODY (speculative windows build fix part II).
2137 2010-03-23 Gavin Barraclough <barraclough@apple.com>
2139 Reviewed by NOBODY (speculative windows build fix).
2141 2010-03-23 Gavin Barraclough <barraclough@apple.com>
2143 Reviewed by Oliver Hunt.
2145 Bug 36519 - JSGlobalContextRelease is unnecessarily slow
2147 Since [ http://trac.webkit.org/changeset/35917 ], calling
2148 JSGlobalContextRelease always triggers a GC heap collection
2149 (if not a full destroy). As per 35917's changelog "This is
2150 only really necessary when the (JSGlobalObject's) last
2151 reference is released, but there is no way to determine that,
2152 and no harm in collecting slightly more often."
2154 Well, we now know of cases of API clients who are harmed by
2155 the performance penalty of collecting too often, so it's time
2156 to add a way to determine whether a call to JSGlobalContextRelease
2157 is removing the last protect from it's global object. If further
2158 protects are retaining the global object (likely from other
2159 JSGlobalContextRefs), then don't trigger a GC collection.
2161 * API/JSContextRef.cpp:
2162 * runtime/Collector.cpp:
2163 (JSC::Heap::unprotect): return a boolean indicating that the value is now unprotected.
2164 * runtime/Collector.h:
2165 * wtf/HashCountedSet.h:
2166 (WTF::::remove): return a boolean indicating whether the value was removed from the set.
2168 2010-03-23 Mark Rowe <mrowe@apple.com>
2172 * runtime/ArrayPrototype.cpp:
2173 (JSC::arrayProtoFuncSplice): Some versions of GCC emit a warning about the implicit 64- to 32-bit truncation
2174 that takes place here. An explicit cast is sufficient to silence it.
2176 2010-03-23 Alexey Proskuryakov <ap@apple.com>
2180 * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): Fixed a typo - length doesn't
2181 need to be converted with toInteger().
2183 2010-03-23 Alexey Proskuryakov <ap@apple.com>
2185 Reviewed by Geoff Garen.
2187 https://bugs.webkit.org/show_bug.cgi?id=36511
2188 <rdar://problem/7753498> Safari freezes when using SPUTNIK JavaScript conformance check
2190 Test: fast/js/sputnik-S15.4.4.12_A3_T3.html
2192 * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): We were incorrectly computing
2193 the start offset, and iterated over (almost) all integers. Note that this can be fixed
2194 without using doubles, but the code would be much more complicated, and there is no important
2195 reason to stick to integers here.
2197 2010-03-23 Kent Hansen <kent.hansen@nokia.com>
2199 Reviewed by Darin Adler.
2201 Fix compilation on Itanium in 32-bit mode
2202 https://bugs.webkit.org/show_bug.cgi?id=36494
2204 * wtf/Platform.h: Introduce CPU(IA64_32). Don't define
2205 WTF_USE_JSVALUE64 if the CPU is in 32-bit mode.
2207 2010-03-23 Geoffrey Garen <ggaren@apple.com>
2209 Reviewed by Mark Rowe.
2211 Interpreter fix for <rdar://problem/7728196> REGRESSION (r46701): -(-2147483648)
2212 evaluates to -2147483648 on 32 bit (35842)
2214 * interpreter/Interpreter.cpp:
2215 (JSC::Interpreter::privateExecute): Only take the fast negate path if
2216 a bit other than bit 31 is set. If none of bits 0-30 are set, then the
2217 value we're negating can only be 0 or -2147483648, and neither can be
2218 negated in int space.
2220 * jit/JITArithmetic.cpp:
2221 (JSC::JIT::emit_op_negate):
2222 (JSC::JIT::emitSlow_op_negate): Updated the JIT implementation to match
2223 the interpreter, since it's slightly simpler.
2225 2010-03-22 Siddharth Mathur <siddharth.mathur@nokia.com>
2227 Reviewed by Laszlo Gombos.
2229 [Symbian] More efficient aligned memory allocation for JSC Collector
2230 https://bugs.webkit.org/show_bug.cgi?id=34350
2232 * JavaScriptCore.pri: Added 2 new Symbian source files and HAL linkage
2234 * runtime/Collector.cpp: Reduced port-specific code and added private data member
2237 (JSC::Heap::destroy):
2238 (JSC::Heap::allocateBlock):
2239 (JSC::Heap::freeBlockPtr):
2241 * runtime/Collector.h: Added private data member
2243 * wtf/symbian: Added.
2244 * wtf/symbian/BlockAllocatorSymbian.cpp: Added.
2245 (WTF::AlignedBlockAllocator::AlignedBlockAllocator): Helper class to allocate
2246 aligned blocks more efficiently as required by Collector
2247 (WTF::AlignedBlockAllocator::alloc):
2248 (WTF::AlignedBlockAllocator::free):
2249 (WTF::AlignedBlockAllocator::destroy):
2250 (WTF::AlignedBlockAllocator::~AlignedBlockAllocator):
2251 * wtf/symbian/BlockAllocatorSymbian.h: Added.
2253 2010-03-22 Geoffrey Garen <ggaren@apple.com>
2255 Reviewed by Sam Weinig.
2257 Fixed <rdar://problem/7728196> REGRESSION (r46701): -(-2147483648)
2258 evaluates to -2147483648 on 32 bit (35842)
2260 Two ways to fix the same bug:
2262 1. Check for overflow when negating, since negating the largest negative
2263 int causes overflow.
2265 2. Constant-fold even when negating a negative, since, like they say in
2266 high school, "math works."
2268 * assembler/MacroAssemblerARM.h:
2269 (JSC::MacroAssemblerARM::branchNeg32):
2270 * assembler/MacroAssemblerX86Common.h:
2271 (JSC::MacroAssemblerX86Common::branchNeg32): Added a branching version
2272 of the negate operator.
2274 * jit/JITArithmetic.cpp:
2275 (JSC::JIT::emit_op_negate): Use the branching version of the negate
2276 operator to check for overflow.
2278 (JSC::JIT::emitSlow_op_negate): Link the check for overflow to a slow case.
2279 (We could emit inline code for this, since we know what the result would
2280 be, but that's probably just a waste of generated code.)
2282 * parser/Grammar.y: Constant fold even when negating a negative.
2284 2010-03-22 David Kilzer <ddkilzer@apple.com>
2286 <http://webkit.org/b/36431> Clean up 'int' use in UString.cpp after r54789
2288 Reviewed by Darin Adler.
2290 * runtime/UString.cpp:
2291 (JSC::UString::from): Changed argument type from 'unsigned int'
2292 to 'unsigned' to match WebKit coding style.
2293 (JSC::UString::find): Changed static_cast<int>() to
2294 static_cast<unsigned>() now that this method returns unsigned.
2295 (JSC::UString::rfind): Ditto.
2296 * runtime/UString.h:
2297 (JSC::UString::from): Changed argument type from 'unsigned int'
2298 to 'unsigned' to match WebKit coding style.
2300 2010-03-22 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
2302 Reviewed by Kenneth Rohde Christiansen.
2304 Add support for syntax checking in the QtScript API.
2306 New class was created; the QScriptSyntaxCheckResult which main
2307 responsibility is to provide results of the ECMA Script code
2308 syntax check. The class is not fully functional as the JSC C API
2309 doesn't expose an error column number, but it is a good start point
2310 for a future development.
2312 [Qt] QtScript functionality should be extended by syntax checking.
2313 https://bugs.webkit.org/show_bug.cgi?id=36123
2315 * qt/api/QtScript.pro:
2316 * qt/api/qscriptengine.cpp:
2317 (QScriptEngine::checkSyntax):
2318 * qt/api/qscriptengine.h:
2319 * qt/api/qscriptengine_p.cpp:
2320 (QScriptEnginePrivate::checkSyntax):
2321 * qt/api/qscriptengine_p.h:
2322 * qt/api/qscriptsyntaxcheckresult.cpp: Added.
2323 (QScriptSyntaxCheckResult::QScriptSyntaxCheckResult):
2324 (QScriptSyntaxCheckResult::~QScriptSyntaxCheckResult):
2325 (QScriptSyntaxCheckResult::operator=):
2326 (QScriptSyntaxCheckResult::state):
2327 (QScriptSyntaxCheckResult::errorLineNumber):
2328 (QScriptSyntaxCheckResult::errorColumnNumber):
2329 (QScriptSyntaxCheckResult::errorMessage):
2330 * qt/api/qscriptsyntaxcheckresult.h: Added.
2331 * qt/api/qscriptsyntaxcheckresult_p.cpp: Added.
2332 (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate):
2333 (QScriptSyntaxCheckResultPrivate::errorMessage):
2334 (QScriptSyntaxCheckResultPrivate::errorLineNumber):
2335 * qt/api/qscriptsyntaxcheckresult_p.h: Added.
2336 (QScriptSyntaxCheckResultPrivate::get):
2337 (QScriptSyntaxCheckResultPrivate::QScriptSyntaxCheckResultPrivate):
2338 (QScriptSyntaxCheckResultPrivate::state):
2339 (QScriptSyntaxCheckResultPrivate::errorColumnNumber):
2340 * qt/tests/qscriptengine/tst_qscriptengine.cpp:
2341 (tst_QScriptEngine::checkSyntax_data):
2342 (tst_QScriptEngine::checkSyntax):
2344 2010-03-21 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
2346 Reviewed by Simon Hausmann.
2348 New class; QScriptProgram.
2350 The class should be used to evaluate the same script multiple times
2353 [Qt] QtScript should have QScriptProgram class
2354 https://bugs.webkit.org/show_bug.cgi?id=36008
2356 * qt/api/QtScript.pro:
2357 * qt/api/qscriptengine.cpp:
2358 (QScriptEngine::evaluate):
2359 * qt/api/qscriptengine.h:
2360 * qt/api/qscriptengine_p.cpp:
2361 (QScriptEnginePrivate::evaluate):
2362 * qt/api/qscriptengine_p.h:
2363 (QScriptEnginePrivate::evaluate):
2364 * qt/api/qscriptprogram.cpp: Added.
2365 (QScriptProgram::QScriptProgram):
2366 (QScriptProgram::~QScriptProgram):
2367 (QScriptProgram::operator=):
2368 (QScriptProgram::isNull):
2369 (QScriptProgram::sourceCode):
2370 (QScriptProgram::fileName):
2371 (QScriptProgram::firstLineNumber):
2372 (QScriptProgram::operator==):
2373 (QScriptProgram::operator!=):
2374 * qt/api/qscriptprogram.h: Added.
2375 * qt/api/qscriptprogram_p.h: Added.
2376 (QScriptProgramPrivate::get):
2377 (QScriptProgramPrivate::QScriptProgramPrivate):
2378 (QScriptProgramPrivate::~QScriptProgramPrivate):
2379 (QScriptProgramPrivate::isNull):
2380 (QScriptProgramPrivate::sourceCode):
2381 (QScriptProgramPrivate::fileName):
2382 (QScriptProgramPrivate::firstLineNumber):
2383 (QScriptProgramPrivate::operator==):
2384 (QScriptProgramPrivate::operator!=):
2385 (QScriptProgramPrivate::program):
2386 (QScriptProgramPrivate::file):
2387 (QScriptProgramPrivate::line):
2388 * qt/tests/qscriptengine/tst_qscriptengine.cpp:
2389 (tst_QScriptEngine::evaluateProgram):
2391 2010-03-21 David Kilzer <ddkilzer@apple.com>
2393 Blind attempt #2 to fix the Windows build after r56314
2395 * API/tests/testapi.c: Include JSObjectRefPrivate.h for the new
2396 methods instead of declaring them locally (and non-extern).
2397 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2398 Backed out previous change.
2400 2010-03-21 David Kilzer <ddkilzer@apple.com>
2402 Blind attempt to fix the Windows build after r56314
2404 Try to fix the following errors on the Windows buildbot:
2407 testapi.obj : error LNK2001: unresolved external symbol "bool __cdecl JSObjectSetPrivateProperty(struct OpaqueJSContext const *,struct OpaqueJSValue *,struct OpaqueJSString *,struct OpaqueJSValue const *)" (?JSObjectSetPrivateProperty@@YA_NPBUOpaqueJSContext@@PAUOpaqueJSValue@@PAUOpaqueJSString@@PBU2@@Z)
2408 testapi.obj : error LNK2001: unresolved external symbol "struct OpaqueJSValue const * __cdecl JSObjectGetPrivateProperty(struct OpaqueJSContext const *,struct OpaqueJSValue *,struct OpaqueJSString *)" (?JSObjectGetPrivateProperty@@YAPBUOpaqueJSValue@@PBUOpaqueJSContext@@PAU1@PAUOpaqueJSString@@@Z)
2409 C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\bin\testapi.exe : fatal error LNK1120: 2 unresolved externals
2411 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added
2412 missing symbols to be exported.
2414 2010-03-21 Oliver Hunt <oliver@apple.com>
2416 Reviewed by Maciej Stachowiak.
2418 Documentation fix for previous patch.
2420 * API/JSObjectRefPrivate.h:
2422 2010-03-20 Oliver Hunt <oliver@apple.com>
2424 Reviewed by Maciej Stachowiak.
2426 JSC needs an API to allow custom objects to have aprivate GC-accessible properties
2427 https://bugs.webkit.org/show_bug.cgi?id=36420
2429 Add new API methods to support "private" properties on custom
2432 * API/JSCallbackObject.h:
2433 (JSC::JSCallbackObjectData::JSCallbackObjectData):
2434 (JSC::JSCallbackObjectData::~JSCallbackObjectData):
2435 (JSC::JSCallbackObjectData::getPrivateProperty):
2436 (JSC::JSCallbackObjectData::setPrivateProperty):
2437 (JSC::JSCallbackObjectData::deletePrivateProperty):
2438 (JSC::JSCallbackObjectData::markChildren):
2439 (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
2440 (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
2441 (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty):
2442 (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
2443 (JSC::JSCallbackObject::getPrivateProperty):
2444 (JSC::JSCallbackObject::setPrivateProperty):
2445 (JSC::JSCallbackObject::deletePrivateProperty):
2446 (JSC::JSCallbackObject::markChildren):
2447 * API/JSObjectRef.cpp:
2448 (JSObjectGetPrivateProperty):
2449 (JSObjectSetPrivateProperty):
2450 (JSObjectDeletePrivateProperty):
2451 * API/JSObjectRefPrivate.h: Added.
2452 * API/tests/testapi.c:
2454 * JavaScriptCore.exp:
2455 * JavaScriptCore.xcodeproj/project.pbxproj:
2457 2010-03-20 Kevin Ollivier <kevino@theolliviers.com>
2459 [wx] Build fixes after introduction of Brew files.
2463 2010-03-18 Tom Callaway <tcallawa@redhat.com>
2465 Reviewed by Darin Adler.
2467 Bug 35429: Fix compile on SPARC64
2468 https://bugs.webkit.org/show_bug.cgi?id=35429
2470 * wtf/Platform.h: Set WTF_USE_JSVALUE64 for SPARC64
2472 2010-03-18 Oliver Hunt <oliver@apple.com>
2474 Reviewed by Sam Weinig.
2476 Add API to directly expose JSON parsing
2477 https://bugs.webkit.org/show_bug.cgi?id=34887
2479 Add API to expose JSON parsing directly, and add tests to testapi
2481 * API/JSValueRef.cpp:
2482 (JSValueMakeFromJSONString):
2483 (JSValueCreateJSONString):
2484 * API/tests/testapi.c:
2486 * JavaScriptCore.exp:
2487 * runtime/JSONObject.cpp:
2488 (JSC::JSONStringify):
2489 * runtime/JSONObject.h:
2491 2010-03-16 Sam Weinig <sam@webkit.org>
2493 Reviewed by Darin Adler and Mark Rowe.
2495 Update WebKit availability macros for release after 4.0.
2497 * API/WebKitAvailability.h:
2499 2010-03-17 Oliver Hunt <oliver@apple.com>
2501 Reviewed by Gavin Barraclough.
2503 undefined, NaN, and Infinity should be ReadOnly
2504 https://bugs.webkit.org/show_bug.cgi?id=36263
2506 Simply add the ReadOnly flag to these properties.
2508 * runtime/JSGlobalObject.cpp:
2509 (JSC::JSGlobalObject::reset):
2511 2010-03-17 Darin Adler <darin@apple.com>
2513 Reviewed by Oliver Hunt.
2515 Speed up Math.round a little by removing unneeded special case
2516 https://bugs.webkit.org/show_bug.cgi?id=36107
2518 Test: fast/js/math.html
2520 * runtime/MathObject.cpp:
2521 (JSC::mathProtoFuncRound): This function had a special case for numbers
2522 between -0.5 and -0.0 to return -0.0. But the algorithm in the function
2523 already yields -0.0 for those cases, so the extra checking and branching
2526 2010-03-17 Mike Homey <glandium@debian.org>
2528 Reviewed by Gustavo Noronha.
2530 Build fix for SPARC. Fix missing macro value.
2534 2010-03-16 Gavin Barraclough <barraclough@apple.com>
2536 Reviewed by Oliver Hunt, Darin Adler.
2538 Bug 36083 - REGRESSION (r55772-r55834): Crash in JavaScriptCore RegExp code on PowerPC
2540 The problem is a bug in our port of PCRE - that a read may take place from the first character in an
2541 empty string. For the time being, revert to using a valid pointer in the data segment rather than
2542 an invalid non-null pointer into the zero-page for the empty string's data pointer. A better fix for
2543 this will be to remove PCRE.
2545 * runtime/UStringImpl.cpp:
2546 (JSC::UStringImpl::empty):
2548 2010-03-16 Darin Adler <darin@apple.com>
2550 Rolled out r56081 since it broke the Windows build.
2552 2010-03-16 Zoltan Horvath <zoltan@webkit.org>
2554 Reviewed by Darin Adler.
2556 Remove extra <new> include and add guards to operator new/delete definitions
2557 https://bugs.webkit.org/show_bug.cgi?id=35967
2559 Remove extra <new> header include from FastAlloc.cpp since it is included in
2560 FastAlloc.h. Add ENABLE(GLOBAL_FASTMALLOC_NEW) macro guard to operator
2561 new/delete/new []/delete [] definitions.
2563 * wtf/FastMalloc.cpp:
2565 2010-03-15 Kwang Yul Seo <skyul@company100.net>
2567 Reviewed by Eric Seidel.
2569 [BREWMP] Add a function to create a BREW instance without local variable declarations.
2570 https://bugs.webkit.org/show_bug.cgi?id=34705
2572 Add a template function to create a BREW instance in one line.
2574 * wtf/brew/ShellBrew.h: Added.
2575 (WTF::createInstance):
2577 2010-03-15 Geoffrey Garen <ggaren@apple.com>
2581 Removed a now-incorrect comment I forgot to remove in my last check-in.
2583 * wtf/FastMalloc.cpp:
2584 (WTF::TCMalloc_PageHeap::scavenge):
2586 2010-03-15 Geoffrey Garen <ggaren@apple.com>
2588 Reviewed by Sam Weinig.
2591 <rdar://problem/7165917> | https://bugs.webkit.org/show_bug.cgi?id=28676
2592 Safari 4 does not release memory back to the operating system fast enough (28676)
2594 Every few seconds, release a percentage of the minimum unused page count
2595 during that time period.
2597 SunSpider reports no change, command-line or in-browser, Mac or Windows.
2599 * wtf/FastMalloc.cpp:
2600 (WTF::TCMalloc_PageHeap::init):
2601 (WTF::TCMalloc_PageHeap::signalScavenger):
2602 (WTF::TCMalloc_PageHeap::initializeScavenger): Renamed shouldContinueScavenging
2603 to shouldScavenge, since scavenging is no longer something that we interrupt.
2605 (WTF::TCMalloc_PageHeap::scavenge): The new scavenging algorithm. Fixes
2606 a bug where the old code would release only one item from each size class
2607 per scavenge, potentially leaving large numbers of large-sized objects
2608 unreleased for a long time.
2610 (WTF::TCMalloc_PageHeap::shouldScavenge):
2611 (WTF::TCMalloc_PageHeap::New):
2612 (WTF::TCMalloc_PageHeap::AllocLarge):
2613 (WTF::TCMalloc_PageHeap::Delete):
2614 (WTF::TCMalloc_PageHeap::GrowHeap):
2615 (WTF::TCMalloc_PageHeap::scavengerThread):
2616 (WTF::TCMalloc_PageHeap::periodicScavenge): Updated to track the minimum
2617 value of free_committed_pages_ during a given scavenge period.
2619 2010-03-15 Gavin Barraclough <barraclough@apple.com>
2621 Reviewed by Sam Weinig.
2623 https://bugs.webkit.org/show_bug.cgi?id=35843
2624 Re-land reverted fix to JSString::getIndex()
2626 Calling getIndex() on a JSString in rope form may result in a JSException being thrown
2627 if there is insuficient memory so value(exec) returns UString() with length zero,
2628 which will be passed to jsSingleCharacterSubstring.
2629 Add a slow case function to trap the error & return a safe null value, until the
2630 exception is handled.
2632 * runtime/JSString.cpp:
2633 (JSC::JSString::getIndexSlowCase):
2634 (JSC::JSString::getStringPropertyDescriptor):
2635 * runtime/JSString.h:
2636 (JSC::jsSingleCharacterSubstring):
2637 (JSC::JSString::getIndex):
2638 (JSC::jsSingleCharacterString):
2639 (JSC::JSString::getStringPropertySlot):
2641 2010-03-04 Kenneth Rohde Christiansen <kenneth@webkit.org>
2643 Reviewed by Adam Roben.
2645 Add a long long version of abs() for MSVC.
2650 2010-03-15 Gabor Loki <loki@webkit.org>
2652 Reviewed by Gavin Barraclough.
2654 Combine ctiTrampolines on ARM and Thumb-2
2655 https://bugs.webkit.org/show_bug.cgi?id=36014
2658 (JSC::JITThunks::JITThunks):
2660 2010-03-12 Gavin Barraclough <barraclough@apple.com>
2662 Reviewed by NOBODY (build fix).
2664 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2666 2010-03-12 Gavin Barraclough <barraclough@apple.com>
2668 Reviewed by NOBODY (build fix).
2670 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2672 2010-03-11 Gavin Barraclough <barraclough@apple.com>
2674 Reviewed by Oliver Hunt.
2676 Bug 36075 - Clean up screwyness re static string impls & Identifiers.
2678 * API/JSClassRef.cpp:
2679 (OpaqueJSClass::~OpaqueJSClass): Classname may be null/empty, and these are an identifer. This is okay, since the null/empty strings are shared across all threads.
2680 * JavaScriptCore.exp:
2681 * runtime/Identifier.cpp:
2682 (JSC::Identifier::add): No need to explicitly hash null reps, this is done in the ststic UStringImpl constructor.
2683 (JSC::Identifier::addSlowCase): UStringImpl::empty() handled & checkCurrentIdentifierTable now called in the header.
2684 (JSC::Identifier::checkCurrentIdentifierTable): Replaces checkSameIdentifierTable (this no longer checked the rep since the identifierTable pointer was removed from UString::Rep long ago).
2685 * runtime/Identifier.h:
2686 (JSC::Identifier::add): Replace call to checkSameIdentifierTable with call to checkCurrentIdentifierTable at head of function.
2687 * runtime/UStringImpl.cpp:
2688 (JSC::UStringImpl::~UStringImpl): Remove call to checkConsistency - this function no longer checks anything interesting.
2689 * runtime/UStringImpl.h:
2690 (JSC::UStringOrRopeImpl::UStringOrRopeImpl): Set s_refCountFlagIsIdentifier in static constructor.
2691 (JSC::UStringImpl::UStringImpl): remove calls to checkConsistency (see above), add new ASSERT to substring constructor.
2692 (JSC::UStringImpl::setHash): ASSERT not static (static strings set the hash in their constructor, should not reach this code path).
2693 (JSC::UStringImpl::create): Add missing ASSERT.
2694 (JSC::UStringImpl::setIsIdentifier): ASSERT !isStatic() (static strings hash set in constructor).
2696 2010-03-12 Peter Varga <pvarga@inf.u-szeged.hu>
2698 Reviewed by David Levin.
2700 Two functions tryConsumeCharacter() and tryConsumeCharacterClass() are
2701 removed from yarr/RegexInterpreter.cpp because they are never called.
2703 * yarr/RegexInterpreter.cpp:
2705 2010-03-11 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
2707 Reviewed by Simon Hausmann.
2709 The JSNative state was renamed to JSPrimitive. The new name better
2710 coresponds to the ECMAScript standard.
2712 Enum QScriptValuePrivate::States was renamed to State to obey Qt
2713 coding style rules ("States" name suggests that a state could
2714 mixed together with an other state using bitwise logic operators.
2716 [Qt] QScriptValuePrivate::States has naming issues
2717 https://bugs.webkit.org/show_bug.cgi?id=35968
2719 * qt/api/qscriptvalue_p.h:
2720 (QScriptValuePrivate::):
2721 (QScriptValuePrivate::QScriptValuePrivate):
2722 (QScriptValuePrivate::isBool):
2723 (QScriptValuePrivate::isNumber):
2724 (QScriptValuePrivate::isNull):
2725 (QScriptValuePrivate::isString):
2726 (QScriptValuePrivate::isUndefined):
2727 (QScriptValuePrivate::toString):
2728 (QScriptValuePrivate::toNumber):
2729 (QScriptValuePrivate::toBool):
2730 (QScriptValuePrivate::assignEngine):
2731 (QScriptValuePrivate::refinedJSValue):
2733 2010-03-11 Gavin Barraclough <barraclough@apple.com>
2735 Reviewed by NOBODY (Windows build fix).
2739 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2741 2010-03-11 Gavin Barraclough <barraclough@apple.com>
2743 Reviewed by NOBODY (Windows build fix).
2747 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2749 2010-03-11 Gavin Barraclough <barraclough@apple.com>
2751 Rubber stamped by Oliver Hunt.
2753 Remove nonsense comments used in development & commited in error.
2755 * runtime/UStringImpl.h:
2757 2010-03-11 Gavin Barraclough <barraclough@apple.com>
2759 Reviewed by NOBODY (Windows build fix).
2763 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2765 2010-03-11 Gavin Barraclough <barraclough@apple.com>
2767 Reviewed by Oliver Hunt.
2769 https://bugs.webkit.org/show_bug.cgi?id=36041
2770 Remove unnecessary differences in common code between WebCore::StringImpl & JSC::UStringImpl
2772 Much of the code in WebCore::StringImpl and JSC::UStringImpl is now very similar,
2773 but has trivial and unnecessary formatting differences, such as the exact wording
2774 of comments, missing ASSERTs, functions implemented in the .h vs .cpp etc.
2776 * runtime/Identifier.cpp:
2777 (JSC::Identifier::add): UStringImpl::empty() now automatically hashes, uas per WebCore strings.
2778 (JSC::Identifier::addSlowCase): UStringImpl::empty() now automatically hashes, uas per WebCore strings.
2779 * runtime/UStringImpl.cpp:
2780 (JSC::UStringImpl::~UStringImpl): Only call bufferOwnership() once, add missing ASSERTs.
2781 (JSC::UStringImpl::createUninitialized): Move from .h, not commonly called, no need to inline.
2782 (JSC::UStringImpl::create): Move from .h, not commonly called, no need to inline.
2783 (JSC::UStringImpl::sharedBuffer): Rewritten to more closely match WebCore implementation, remove need for separate baseSharedBuffer() method.
2784 * runtime/UStringImpl.h:
2785 (JSC::UStringImpl::UStringImpl): Automatically hash static strings, ASSERT m_data & m_length are non-null/non-zero in non-static strings.
2786 (JSC::UStringImpl::setHash): Add missing ASSERT.
2787 (JSC::UStringImpl::create): Moved to .cpp / added missing check for empty string creation.
2788 (JSC::UStringImpl::adopt): Vector.size() returns size_t, not unsigned.
2789 (JSC::UStringImpl::cost): Renamed m_bufferSubstring -> m_substringBuffer
2790 (JSC::UStringImpl::hash): Reordered in file.
2791 (JSC::UStringImpl::existingHash): Reordered in file.
2792 (JSC::UStringImpl::computeHash): Reordered in file, renamed parameter.
2793 (JSC::UStringImpl::checkConsistency): rewrote ASSERT.
2794 (JSC::UStringImpl::bufferOwnership): Return type should be BufferOwnership.
2795 (JSC::UStringImpl::): Moved friends to head of class.
2797 2010-03-11 Mark Rowe <mrowe@apple.com>
2799 Reviewed by David Kilzer.
2801 <rdar://problem/7745082> Make it possible to build WebKit for older Mac OS X versions from the current Mac OS X version
2803 Default to using the appropriate SDK if the target Mac OS X version is not the current Mac OS X version.
2805 * Configurations/Base.xcconfig:
2807 2010-03-11 Mark Rowe <mrowe@apple.com>
2809 Reviewed by Tim Hatcher.
2811 <rdar://problem/7745082> Make it possible to build WebKit for older Mac OS X versions from the current Mac OS X version
2813 Introduce TARGET_MAC_OS_X_VERSION_MAJOR to represent the Mac OS X version that is being targeted. It defaults to the
2814 current Mac OS X version unless otherwise specified.
2816 Key off TARGET_MAC_OS_X_VERSION_MAJOR where we'd previously been keying off MAC_OS_X_VERSION_MAJOR.
2818 Explicitly map from the target Mac OS X version to the preferred compiler since Xcode's default compiler choice
2819 may not be usable when targetting a different Mac OS X version.
2821 Key off TARGET_GCC_VERSION rather than MAC_OS_X_VERSION_MAJOR in locations where we'd previously been keying off
2822 MAC_OS_X_VERSION_MAJOR but the decision is really related to the compiler version being used.
2824 * Configurations/Base.xcconfig:
2825 * Configurations/DebugRelease.xcconfig:
2826 * Configurations/FeatureDefines.xcconfig:
2827 * Configurations/JavaScriptCore.xcconfig:
2828 * Configurations/Version.xcconfig:
2830 2010-03-11 Simon Fraser <simon.fraser@apple.com>
2832 Reviewed by Mark Rowe.
2834 Sort the project file.
2836 * JavaScriptCore.xcodeproj/project.pbxproj:
2838 2010-03-11 Simon Fraser <simon.fraser@apple.com>
2840 Reviewed by Mark Rowe.
2842 Sort the project file .
2844 * JavaScriptCore.xcodeproj/project.pbxproj:
2846 2010-03-11 Gabor Loki <loki@webkit.org>
2848 Reviewed by Gavin Barraclough.
2850 Buildfix for Thumb-2 after r55684. Add branch8 and branchTest8 functions.
2851 https://bugs.webkit.org/show_bug.cgi?id=35892
2853 * assembler/ARMv7Assembler.h:
2854 (JSC::ARMv7Assembler::):
2855 (JSC::ARMv7Assembler::ldrb):
2856 * assembler/MacroAssemblerARMv7.h:
2857 (JSC::MacroAssemblerARMv7::load8):
2858 (JSC::MacroAssemblerARMv7::branch8):
2859 (JSC::MacroAssemblerARMv7::branchTest8):
2860 (JSC::MacroAssemblerARMv7::setTest8):
2862 2010-03-10 Gavin Barraclough <barraclough@apple.com>
2864 Rubber stamped by Oliver Hunt.
2866 Rename JSC::UStringImpl::data() to characters(), to match WebCore::StringImpl.
2868 * API/JSClassRef.cpp:
2869 (OpaqueJSClassContextData::OpaqueJSClassContextData):
2870 * bytecompiler/BytecodeGenerator.cpp:
2871 (JSC::keyForCharacterSwitch):
2872 * bytecompiler/NodesCodegen.cpp:
2873 (JSC::processClauseList):
2874 * interpreter/Interpreter.cpp:
2875 (JSC::Interpreter::privateExecute):
2877 (JSC::DEFINE_STUB_FUNCTION):
2878 * runtime/ArrayPrototype.cpp:
2879 (JSC::arrayProtoFuncToString):
2880 * runtime/Identifier.cpp:
2881 (JSC::Identifier::equal):
2882 (JSC::Identifier::addSlowCase):
2883 * runtime/JSString.cpp:
2884 (JSC::JSString::resolveRope):
2885 * runtime/UString.cpp:
2886 (JSC::UString::toStrictUInt32):
2888 * runtime/UString.h:
2889 (JSC::UString::data):
2890 * runtime/UStringImpl.h:
2891 (JSC::UStringImpl::characters):
2892 (JSC::UStringImpl::hash):
2893 (JSC::UStringImpl::setHash):
2895 2010-03-10 Gavin Barraclough <barraclough@apple.com>
2897 Reviewed by Darin Adler, Geoffrey Garen, Maciej Stachowiak.
2899 https://bugs.webkit.org/show_bug.cgi?id=35991
2900 Would be faster to not use a thread specific to implement StringImpl::empty()
2902 Change JSC::UStringImpl's implementation of empty() match to match StringImpl's new implementation
2903 (use a static defined within the empty() method), and change the interface to match too (return
2904 a pointer not a reference).
2906 ~0% performance impact (possible minor progression from moving empty() from .h to .cpp).
2908 * JavaScriptCore.exp:
2909 * runtime/Identifier.cpp:
2910 (JSC::Identifier::add):
2911 (JSC::Identifier::addSlowCase):
2912 * runtime/PropertyNameArray.cpp:
2913 (JSC::PropertyNameArray::add):
2914 * runtime/UString.cpp:
2915 (JSC::initializeUString):
2916 (JSC::UString::UString):
2917 * runtime/UStringImpl.cpp:
2918 (JSC::UStringImpl::empty):
2919 (JSC::UStringImpl::create):
2920 * runtime/UStringImpl.h:
2921 (JSC::UStringImpl::adopt):
2922 (JSC::UStringImpl::createUninitialized):
2923 (JSC::UStringImpl::tryCreateUninitialized):
2925 2010-03-10 Dmitry Titov <dimich@chromium.org>
2927 Not reviewed, fixing Snow Leopard build.
2929 * wtf/mac/MainThreadMac.mm: Forgot 'static' for a new local function.
2932 2010-03-10 Dmitry Titov <dimich@chromium.org>
2934 Reviewed by Darin Adler.
2936 Make Document::postTask to use a single queue of tasks, to fire them in order
2937 https://bugs.webkit.org/show_bug.cgi?id=35943
2939 The patch uses CFRunLoopTimer to schedule execution of tasks instead of performSelectorOnMainThread which apparently can starve other event sources.
2940 The timer is used when the schedule request is coming on the main thread itself. This happens when the task is posted on the main thread or
2941 when too many tasks are posted and the queue does 'stop and re-schedule' to make sure run loop has a chance to execute other events.
2943 * wtf/mac/MainThreadMac.mm:
2946 (WTF::scheduleDispatchFunctionsOnMainThread): Use timer posted to the current RunLoop if scheduling the task execution while on the main thread.
2948 2010-03-10 Geoffrey Garen <ggaren@apple.com>
2950 Windows build fix: added new symbol.
2952 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2954 2010-03-10 Geoffrey Garen <ggaren@apple.com>
2956 Windows build fix: removed old symbol.
2958 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2960 2010-03-09 Geoffrey Garen <ggaren@apple.com>
2962 Reviewed by Alexey Proskuryakov, Darin Adler, and Sam Weinig.
2964 Refactored fastCheckConsistency to match some review comments:
2965 - renamed fastCheckConsistency to fastMallocSize, and changed ValueCheck
2966 to ASSERT that a pointer's fastMallocSize is not 0.
2967 - implemented a version of fastMallocSize for tcmalloc.
2969 Also moved some pre-existing code around to avoid a problem related to
2970 mismatched #define/#undef of malloc/free in this source file.
2972 * JavaScriptCore.exp:
2973 * wtf/FastMalloc.cpp:
2974 (WTF::fastMallocSize): Renamed. Fixed indentation.
2976 (WTF::TCMalloc_PageHeap::scavenge): Removed an incorrect ASSERT that
2977 got in the way of testing the tcmalloc implementation. (More information
2978 on why this ASSERT is incorrect is in <rdar://problem/7165917>.)
2980 (WTF::TCMallocStats::fastMallocSize): Implemented for tcmalloc.
2982 * wtf/FastMalloc.h: Updated for rename.
2985 (WTF::): Moved the ASSERT that used to be in fastCheckConsistency here.
2987 2010-03-10 Kevin Ollivier <kevino@theolliviers.com>
2989 Reviewed by Eric Seidel.
2991 Make global new/delete operators configurable for all ports and disable it
2992 for the wx port for now.
2997 2010-03-09 Gavin Barraclough <barraclough@apple.com>
2999 Reviewed by NOBODY (reverting r54510).
3001 This caused a performance regression, by breaking the code
3002 generator's logic to calculate the skip level for resolving
3003 variables (traced by rdar:7683350) Reverting for now.
3006 * parser/NodeConstructors.h:
3007 (JSC::ContinueNode::ContinueNode):
3008 (JSC::BreakNode::BreakNode):
3009 (JSC::ForInNode::ForInNode):
3010 * runtime/CommonIdentifiers.cpp:
3011 (JSC::CommonIdentifiers::CommonIdentifiers):
3012 * runtime/CommonIdentifiers.h:
3013 * runtime/FunctionPrototype.cpp:
3014 (JSC::FunctionPrototype::FunctionPrototype):
3015 * runtime/Identifier.cpp:
3016 (JSC::Identifier::add):
3017 * runtime/PropertyNameArray.cpp:
3018 (JSC::PropertyNameArray::add):
3020 2010-03-09 Geoffrey Garen <ggaren@apple.com>
3022 Reviewed by Darin Adler.
3024 Changed FastMalloc statistics reporting to be a bit clearer. We now
3026 - Reserved VM Bytes: the VM that has been mapped into the process.
3027 - Committed VM Bytes: the subset of Reserved VM Bytes actually in use.
3028 - Free List Bytes: the subset of Committed VM Bytes in a free list.
3030 * wtf/FastMalloc.cpp:
3031 (WTF::fastMallocStatistics):
3032 (WTF::TCMallocStats::fastMallocStatistics): Updated to report the statistics
3033 above. Standardized use of "ifdef WTF_CHANGES". Added a SpinLockHolder
3034 around all statistics gathering, since it reads from the page heap.
3036 * wtf/FastMalloc.h: Updated to report the statistics above.
3038 2010-03-09 Gabor Loki <loki@webkit.org>
3040 Rubber-stamped by Maciej Stachowiak.
3042 Buildfix for ARM after r55684. Add branch8 and branchTest8 functions.
3043 https://bugs.webkit.org/show_bug.cgi?id=35892
3045 * assembler/ARMAssembler.cpp:
3046 (JSC::ARMAssembler::dataTransfer32):
3047 * assembler/ARMAssembler.h:
3048 (JSC::ARMAssembler::):
3049 * assembler/MacroAssemblerARM.h:
3050 (JSC::MacroAssemblerARM::load8):
3051 (JSC::MacroAssemblerARM::branch8):
3052 (JSC::MacroAssemblerARM::branchTest8):
3054 2010-03-08 Geoffrey Garen <ggaren@apple.com>
3056 Windows build fix: 'P' is not a type. Luckily, 'void' is.
3058 * wtf/FastMalloc.cpp:
3059 (WTF::fastCheckConsistency):
3061 2010-03-08 Geoffrey Garen <ggaren@apple.com>
3063 Windows build fix: export a new symbol.
3065 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3067 2010-03-08 Geoffrey Garen <ggaren@apple.com>
3069 Reviewed by Maciej Stachowiak.
3071 Switching malloc implementations requires a world rebuild
3072 https://bugs.webkit.org/show_bug.cgi?id=35899
3074 * wtf/FastMalloc.cpp:
3075 (WTF::fastCheckConsistency):
3076 (WTF::TCMallocStats::fastCheckConsistency):
3079 (WTF::): Moved pointer checking into a helper function in FastMalloc.cpp,
3080 so you can switch malloc implementations without rebuilding the world.
3082 2010-03-07 Oliver Hunt <oliver@apple.com>
3084 Reviewed by Darin Adler.
3086 TypeInfo is unnecessarily large
3087 https://bugs.webkit.org/show_bug.cgi?id=35850
3089 Reduce the size of the type and flags members to a single
3090 byte each, reducing the size of Structure by 8 bytes.
3092 * assembler/MacroAssemblerX86Common.h:
3093 (JSC::MacroAssemblerX86Common::branch8):
3094 (JSC::MacroAssemblerX86Common::branchTest8):
3095 (JSC::MacroAssemblerX86Common::setTest8):
3096 Add single byte branches, and correct setTest8 to do a
3097 single byte read from memory, and actually store the result
3098 * assembler/X86Assembler.h:
3099 (JSC::X86Assembler::):
3100 (JSC::X86Assembler::cmpb_im):
3101 (JSC::X86Assembler::testb_im):
3103 (JSC::JIT::emit_op_construct_verify):
3104 * jit/JITOpcodes.cpp:
3105 (JSC::JIT::emit_op_instanceof):
3106 (JSC::JIT::emit_op_jeq_null):
3107 (JSC::JIT::emit_op_jneq_null):
3108 (JSC::JIT::emit_op_get_pnames):
3109 (JSC::JIT::emit_op_convert_this):
3110 (JSC::JIT::emit_op_construct_verify):
3111 (JSC::JIT::emit_op_to_jsnumber):
3112 (JSC::JIT::emit_op_eq_null):
3113 (JSC::JIT::emit_op_neq_null):
3114 * runtime/JSTypeInfo.h:
3115 (JSC::TypeInfo::TypeInfo):
3116 (JSC::TypeInfo::type):
3118 2010-03-08 Gavin Barraclough <barraclough@apple.com>
3120 Reviewed by NOBODY (reverting regression).
3122 Reverting 55035, this caused a regression.
3123 (https://bugs.webkit.org/show_bug.cgi?id=35843)
3125 * runtime/JSString.cpp:
3126 (JSC::JSString::resolveRope):
3127 (JSC::JSString::getStringPropertyDescriptor):
3128 * runtime/JSString.h:
3129 (JSC::jsSingleCharacterSubstring):
3130 (JSC::JSString::getIndex):
3131 (JSC::JSString::getStringPropertySlot):
3132 * runtime/UStringImpl.cpp:
3133 * runtime/UStringImpl.h:
3135 2010-03-08 Stuart Morgan <stuartmorgan@chromium.org>
3137 Reviewed by Darin Adler.
3139 Added a new USE definition for secure text mode on the Mac.
3140 https://bugs.webkit.org/show_bug.cgi?id=31265
3144 2010-03-08 Jian Li <jianli@chromium.org>
3146 Reviewed by Dmitry Titov.
3149 https://bugs.webkit.org/show_bug.cgi?id=32993
3151 Add ENABLE_BLOB_SLICE feature define.
3152 Also fix a problem that JSValue.toInteger is not exposed on Windows.
3154 * Configurations/FeatureDefines.xcconfig:
3155 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3157 2010-03-07 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
3159 Reviewed by Simon Hausmann.
3161 Small performance fix in the QScriptConverter::toString().
3163 The QByteArray was replaced by the QVarLengthArray which doesn't
3164 have to allocate any memory on heap.
3166 [Qt] QScriptConverter::toString() should use QVarLengthArray instead of QByteArray
3167 https://bugs.webkit.org/show_bug.cgi?id=35577
3169 * qt/api/qscriptconverter_p.h:
3170 (QScriptConverter::toString):
3172 2010-03-06 Mark Rowe <mrowe@apple.com>
3174 Rubber-stamped by Sam Weinig.
3176 Remove unnecessary includes of wtf/Platform.h. This is already pulled in by config.h.
3179 * API/JSCallbackFunction.cpp:
3180 * API/JSContextRef.cpp:
3181 * API/JSObjectRef.cpp:
3182 * API/JSValueRef.cpp:
3183 * assembler/ARMAssembler.h:
3184 * assembler/ARMv7Assembler.h:
3185 * assembler/AbstractMacroAssembler.h:
3186 * assembler/AssemblerBuffer.h:
3187 * assembler/AssemblerBufferWithConstantPool.h:
3188 * assembler/CodeLocation.h:
3189 * assembler/LinkBuffer.h:
3190 * assembler/MIPSAssembler.h:
3191 * assembler/MacroAssembler.h:
3192 * assembler/MacroAssemblerARM.h:
3193 * assembler/MacroAssemblerARMv7.h:
3194 * assembler/MacroAssemblerCodeRef.h:
3195 * assembler/MacroAssemblerMIPS.h:
3196 * assembler/MacroAssemblerX86.h:
3197 * assembler/MacroAssemblerX86Common.h:
3198 * assembler/MacroAssemblerX86_64.h:
3199 * assembler/RepatchBuffer.h:
3200 * assembler/X86Assembler.h:
3203 * jit/JITInlineMethods.h:
3205 * os-win32/stdint.h:
3206 * runtime/JSAPIValueWrapper.h:
3207 * runtime/JSImmediate.h:
3209 * wtf/StdLibExtras.h:
3211 * yarr/RegexCompiler.h:
3212 * yarr/RegexInterpreter.h:
3214 * yarr/RegexParser.h:
3215 * yarr/RegexPattern.h:
3217 2010-03-06 Kwang Yul Seo <skyul@company100.net>
3219 Reviewed by Eric Seidel.
3221 [BREWMP] Share OwnPtr.
3222 https://bugs.webkit.org/show_bug.cgi?id=35776
3224 Share OwnPtr implementation with BREW MP and remove OwnPtrBrew.
3226 * wtf/OwnPtrBrew.cpp: Added.
3227 (WTF::deleteOwnedPtr):
3228 * wtf/OwnPtrCommon.h:
3229 * wtf/brew/OwnPtrBrew.cpp: Removed.
3230 * wtf/brew/OwnPtrBrew.h: Removed.
3232 2010-03-06 Patrick Gansterer <paroga@paroga.com>
3234 Reviewed by Eric Seidel.
3236 Implemented JIT_OPTIMIZE_NATIVE_CALL for WinCE
3237 https://bugs.webkit.org/show_bug.cgi?id=33426
3239 * jit/JITOpcodes.cpp:
3240 (JSC::JIT::privateCompileCTIMachineTrampolines):
3242 2010-03-05 Oliver Hunt <oliver@apple.com>
3244 Reviewed by NOBODY (build fix).
3246 Add enw exports to windows
3248 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3250 2010-03-05 Oliver Hunt <oliver@apple.com>
3252 Reviewed by Gavin Barraclough.
3254 JSC should cache int to Identifier conversion as it does for ordinary strings
3255 https://bugs.webkit.org/show_bug.cgi?id=35814
3257 Make the NumericStrings cache cache unsigned ints in addition to signed.
3258 We keep them separate from the int cache as it both simplifies code, and
3259 also because the unsigned path is exclusive to property access and therefore
3260 seems to have different usage patterns.
3262 The primary trigger for the unsigned to Identifier propertyName conversion
3263 is the construction of array-like objects out of normal objects. Given these
3264 tend to be relative small numbers, and the array-like behaviour lends itself
3265 to sequential values this patch also adds a non-colliding cache for all small
3268 * JavaScriptCore.exp:
3269 * runtime/Identifier.cpp:
3270 (JSC::Identifier::from):
3271 * runtime/Identifier.h:
3272 * runtime/NumericStrings.h:
3273 (JSC::NumericStrings::add):
3274 (JSC::NumericStrings::lookup):
3275 (JSC::NumericStrings::lookupSmallString):
3277 2010-03-03 Oliver Hunt <oliver@apple.com>
3279 Reviewed by Gavin Barraclough.
3281 Allow static property getters to interact with JSCs caching
3282 https://bugs.webkit.org/show_bug.cgi?id=35716
3284 Add new opcodes for handling cached lookup of static value getters.
3285 More or less the same as with JS getters, all that changes is that
3286 instead of calling through a JSFunction we always know that we have
3287 a C function to call.
3289 For the patching routines in the JIT we now need to pass a few
3290 new parameters to allow us to pass enough information to the stub
3291 function to allow us to call the C function correctly. Logically
3292 this shouldn't actually be necessary as all of these functions ignore
3293 the identifier, but removing the ident parameter would require
3294 somewhat involved changes to the way we implement getOwnPropertySlot,
3297 * bytecode/CodeBlock.cpp:
3298 (JSC::CodeBlock::dump):
3299 (JSC::CodeBlock::derefStructures):
3300 (JSC::CodeBlock::refStructures):
3301 * bytecode/Instruction.h:
3302 (JSC::Instruction::Instruction):
3303 (JSC::Instruction::):
3304 * bytecode/Opcode.h:
3305 * interpreter/Interpreter.cpp:
3306 (JSC::Interpreter::tryCacheGetByID):
3307 (JSC::Interpreter::privateExecute):
3309 (JSC::JIT::privateCompileMainPass):
3311 (JSC::JIT::compileGetByIdProto):
3312 (JSC::JIT::compileGetByIdSelfList):
3313 (JSC::JIT::compileGetByIdProtoList):
3314 (JSC::JIT::compileGetByIdChainList):
3315 (JSC::JIT::compileGetByIdChain):
3316 * jit/JITPropertyAccess.cpp:
3317 (JSC::JIT::privateCompileGetByIdProto):
3318 (JSC::JIT::privateCompileGetByIdSelfList):
3319 (JSC::JIT::privateCompileGetByIdProtoList):
3320 (JSC::JIT::privateCompileGetByIdChainList):
3321 (JSC::JIT::privateCompileGetByIdChain):
3322 * jit/JITPropertyAccess32_64.cpp:
3323 (JSC::JIT::privateCompileGetByIdProto):
3324 (JSC::JIT::privateCompileGetByIdSelfList):
3325 (JSC::JIT::privateCompileGetByIdProtoList):
3326 (JSC::JIT::privateCompileGetByIdChainList):
3327 (JSC::JIT::privateCompileGetByIdChain):
3329 (JSC::JITThunks::tryCacheGetByID):
3330 (JSC::DEFINE_STUB_FUNCTION):
3333 * runtime/JSFunction.cpp:
3334 (JSC::JSFunction::getOwnPropertySlot):
3336 (JSC::getStaticPropertySlot):
3337 (JSC::getStaticValueSlot):
3338 * runtime/PropertySlot.h:
3339 (JSC::PropertySlot::):
3340 (JSC::PropertySlot::PropertySlot):
3341 (JSC::PropertySlot::cachedPropertyType):
3342 (JSC::PropertySlot::isCacheable):
3343 (JSC::PropertySlot::isCacheableValue):
3344 (JSC::PropertySlot::setValueSlot):
3345 (JSC::PropertySlot::setCacheableCustom):
3346 (JSC::PropertySlot::setGetterSlot):
3347 (JSC::PropertySlot::setCacheableGetterSlot):
3348 (JSC::PropertySlot::clearOffset):
3349 (JSC::PropertySlot::customGetter):
3351 2010-03-04 Shinichiro Hamaji <hamaji@chromium.org>
3353 Unreviewed. Remove a non-ASCII character introduced in the following bug.
3355 put_by_id does will incorrectly cache writes where a specific value exists, where at the point of caching the same value is being written.
3356 https://bugs.webkit.org/show_bug.cgi?id=35537
3358 * runtime/JSObject.h:
3359 (JSC::JSObject::putDirectInternal):
3361 2010-03-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
3363 Reviewed by Tor Arne Vestbø.
3365 [Qt] Make the OUTPUT_DIR variable in qmake projects independent of build-webkit's logic.
3367 This also allows shadow builds relying only on qmake to work properly.
3369 * qt/api/QtScript.pro:
3370 * qt/tests/qscriptengine/qscriptengine.pro:
3371 * qt/tests/qscriptvalue/qscriptvalue.pro:
3372 * qt/tests/tests.pri:
3374 2010-03-03 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
3376 Reviewed by Simon Hausmann.
3378 QScriptValue::isObject fix.
3380 Fix broken internal state evaluation from JSValue to JSNative / JSObject.
3381 New function was introduced which should take care about promoting
3382 JSValue state inside QScriptValuePrivate. It should be used instead of a
3383 direct JSC C API call.
3385 The bug exposed a weakness in autotest suite, as the QScriptValuePrivate
3386 is based on state machine with lazy state evaluation, there is a possibility
3387 that serial sequencial calls to the same public const function could return
3388 different results. The patch fix the issue.
3390 [Qt] Sometimes QScriptValue::isObject returns an incorrect value
3391 https://bugs.webkit.org/show_bug.cgi?id=35387
3393 * qt/api/qscriptvalue_p.h:
3394 (QScriptValuePrivate::isBool):
3395 (QScriptValuePrivate::isNumber):
3396 (QScriptValuePrivate::isNull):
3397 (QScriptValuePrivate::isString):
3398 (QScriptValuePrivate::isUndefined):
3399 (QScriptValuePrivate::isError):
3400 (QScriptValuePrivate::isObject):
3401 (QScriptValuePrivate::isFunction):
3402 (QScriptValuePrivate::call):
3403 (QScriptValuePrivate::refineJSValue):
3404 * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp:
3405 (tst_QScriptValue::initScriptValues):
3406 (tst_QScriptValue::isValid_makeData):
3407 (tst_QScriptValue::isValid_test):
3408 (tst_QScriptValue::isBool_makeData):
3409 (tst_QScriptValue::isBool_test):
3410 (tst_QScriptValue::isBoolean_makeData):
3411 (tst_QScriptValue::isBoolean_test):
3412 (tst_QScriptValue::isNumber_makeData):
3413 (tst_QScriptValue::isNumber_test):
3414 (tst_QScriptValue::isFunction_test):
3415 (tst_QScriptValue::isNull_makeData):
3416 (tst_QScriptValue::isNull_test):
3417 (tst_QScriptValue::isString_makeData):
3418 (tst_QScriptValue::isString_test):
3419 (tst_QScriptValue::isUndefined_makeData):
3420 (tst_QScriptValue::isUndefined_test):
3421 (tst_QScriptValue::isObject_makeData):
3422 (tst_QScriptValue::isObject_test):
3423 (tst_QScriptValue::toString_makeData):
3424 (tst_QScriptValue::toString_test):
3425 (tst_QScriptValue::toNumber_makeData):
3426 (tst_QScriptValue::toNumber_test):
3427 (tst_QScriptValue::toBool_makeData):
3428 (tst_QScriptValue::toBool_test):
3429 (tst_QScriptValue::toBoolean_makeData):
3430 (tst_QScriptValue::toBoolean_test):
3431 (tst_QScriptValue::toInteger_makeData):
3432 (tst_QScriptValue::toInteger_test):
3433 (tst_QScriptValue::toInt32_makeData):
3434 (tst_QScriptValue::toInt32_test):
3435 (tst_QScriptValue::toUInt32_makeData):
3436 (tst_QScriptValue::toUInt32_test):
3437 (tst_QScriptValue::toUInt16_makeData):
3438 (tst_QScriptValue::toUInt16_test):
3440 2010-03-03 Chao-ying Fu <fu@mips.com>
3442 Reviewed by Gavin Barraclough.
3445 https://bugs.webkit.org/show_bug.cgi?id=30144
3447 The following changes enable MIPS YARR and YARR_JIT.
3449 * assembler/AbstractMacroAssembler.h:
3450 (JSC::AbstractMacroAssembler::Imm32::Imm32):
3451 * assembler/MIPSAssembler.h: Added.
3452 (JSC::MIPSRegisters::):
3453 (JSC::MIPSAssembler::MIPSAssembler):
3454 (JSC::MIPSAssembler::):
3455 (JSC::MIPSAssembler::JmpSrc::JmpSrc):
3456 (JSC::MIPSAssembler::JmpDst::JmpDst):
3457 (JSC::MIPSAssembler::JmpDst::isUsed):
3458 (JSC::MIPSAssembler::JmpDst::used):
3459 (JSC::MIPSAssembler::emitInst):
3460 (JSC::MIPSAssembler::nop):
3461 (JSC::MIPSAssembler::loadDelayNop):
3462 (JSC::MIPSAssembler::copDelayNop):
3463 (JSC::MIPSAssembler::move):
3464 (JSC::MIPSAssembler::li):
3465 (JSC::MIPSAssembler::lui):
3466 (JSC::MIPSAssembler::addiu):
3467 (JSC::MIPSAssembler::addu):
3468 (JSC::MIPSAssembler::subu):
3469 (JSC::MIPSAssembler::mult):
3470 (JSC::MIPSAssembler::mfhi):
3471 (JSC::MIPSAssembler::mflo):
3472 (JSC::MIPSAssembler::mul):
3473 (JSC::MIPSAssembler::andInsn):
3474 (JSC::MIPSAssembler::andi):
3475 (JSC::MIPSAssembler::nor):
3476 (JSC::MIPSAssembler::orInsn):
3477 (JSC::MIPSAssembler::ori):
3478 (JSC::MIPSAssembler::xorInsn):
3479 (JSC::MIPSAssembler::xori):
3480 (JSC::MIPSAssembler::slt):
3481 (JSC::MIPSAssembler::sltu):
3482 (JSC::MIPSAssembler::sltiu):
3483 (JSC::MIPSAssembler::sll):
3484 (JSC::MIPSAssembler::sllv):
3485 (JSC::MIPSAssembler::sra):
3486 (JSC::MIPSAssembler::srav):
3487 (JSC::MIPSAssembler::lw):
3488 (JSC::MIPSAssembler::lwl):
3489 (JSC::MIPSAssembler::lwr):
3490 (JSC::MIPSAssembler::lhu):
3491 (JSC::MIPSAssembler::sw):
3492 (JSC::MIPSAssembler::jr):
3493 (JSC::MIPSAssembler::jalr):
3494 (JSC::MIPSAssembler::jal):
3495 (JSC::MIPSAssembler::bkpt):
3496 (JSC::MIPSAssembler::bgez):
3497 (JSC::MIPSAssembler::bltz):
3498 (JSC::MIPSAssembler::beq):
3499 (JSC::MIPSAssembler::bne):
3500 (JSC::MIPSAssembler::bc1t):
3501 (JSC::MIPSAssembler::bc1f):
3502 (JSC::MIPSAssembler::newJmpSrc):
3503 (JSC::MIPSAssembler::appendJump):
3504 (JSC::MIPSAssembler::addd):
3505 (JSC::MIPSAssembler::subd):
3506 (JSC::MIPSAssembler::muld):
3507 (JSC::MIPSAssembler::lwc1):
3508 (JSC::MIPSAssembler::ldc1):
3509 (JSC::MIPSAssembler::swc1):
3510 (JSC::MIPSAssembler::sdc1):
3511 (JSC::MIPSAssembler::mtc1):
3512 (JSC::MIPSAssembler::mfc1):
3513 (JSC::MIPSAssembler::truncwd):
3514 (JSC::MIPSAssembler::cvtdw):
3515 (JSC::MIPSAssembler::ceqd):
3516 (JSC::MIPSAssembler::cngtd):
3517 (JSC::MIPSAssembler::cnged):
3518 (JSC::MIPSAssembler::cltd):
3519 (JSC::MIPSAssembler::cled):
3520 (JSC::MIPSAssembler::cueqd):
3521 (JSC::MIPSAssembler::coled):
3522 (JSC::MIPSAssembler::coltd):
3523 (JSC::MIPSAssembler::culed):
3524 (JSC::MIPSAssembler::cultd):
3525 (JSC::MIPSAssembler::label):
3526 (JSC::MIPSAssembler::align):
3527 (JSC::MIPSAssembler::getRelocatedAddress):
3528 (JSC::MIPSAssembler::getDifferenceBetweenLabels):
3529 (JSC::MIPSAssembler::size):
3530 (JSC::MIPSAssembler::executableCopy):
3531 (JSC::MIPSAssembler::getCallReturnOffset):
3532 (JSC::MIPSAssembler::linkJump):
3533 (JSC::MIPSAssembler::linkCall):
3534 (JSC::MIPSAssembler::linkPointer):
3535 (JSC::MIPSAssembler::relinkJump):
3536 (JSC::MIPSAssembler::relinkCall):
3537 (JSC::MIPSAssembler::repatchInt32):
3538 (JSC::MIPSAssembler::repatchPointer):
3539 (JSC::MIPSAssembler::repatchLoadPtrToLEA):
3540 (JSC::MIPSAssembler::relocateJumps):
3541 (JSC::MIPSAssembler::linkWithOffset):
3542 (JSC::MIPSAssembler::linkCallInternal):
3543 * assembler/MacroAssembler.h:
3544 * assembler/MacroAssemblerMIPS.h: Added.
3545 (JSC::MacroAssemblerMIPS::MacroAssemblerMIPS):
3546 (JSC::MacroAssemblerMIPS::):
3547 (JSC::MacroAssemblerMIPS::add32):
3548 (JSC::MacroAssemblerMIPS::and32):
3549 (JSC::MacroAssemblerMIPS::lshift32):
3550 (JSC::MacroAssemblerMIPS::mul32):
3551 (JSC::MacroAssemblerMIPS::not32):
3552 (JSC::MacroAssemblerMIPS::or32):
3553 (JSC::MacroAssemblerMIPS::rshift32):
3554 (JSC::MacroAssemblerMIPS::sub32):
3555 (JSC::MacroAssemblerMIPS::xor32):
3556 (JSC::MacroAssemblerMIPS::load32):
3557 (JSC::MacroAssemblerMIPS::load32WithUnalignedHalfWords):
3558 (JSC::MacroAssemblerMIPS::load32WithAddressOffsetPatch):
3559 (JSC::MacroAssemblerMIPS::loadPtrWithPatchToLEA):
3560 (JSC::MacroAssemblerMIPS::loadPtrWithAddressOffsetPatch):
3561 (JSC::MacroAssemblerMIPS::load16):
3562 (JSC::MacroAssemblerMIPS::store32WithAddressOffsetPatch):
3563 (JSC::MacroAssemblerMIPS::store32):
3564 (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
3565 (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
3566 (JSC::MacroAssemblerMIPS::pop):
3567 (JSC::MacroAssemblerMIPS::push):
3568 (JSC::MacroAssemblerMIPS::move):
3569 (JSC::MacroAssemblerMIPS::swap):
3570 (JSC::MacroAssemblerMIPS::signExtend32ToPtr):
3571 (JSC::MacroAssemblerMIPS::zeroExtend32ToPtr):
3572 (JSC::MacroAssemblerMIPS::branch32):
3573 (JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords):
3574 (JSC::MacroAssemblerMIPS::branch16):
3575 (JSC::MacroAssemblerMIPS::branchTest32):
3576 (JSC::MacroAssemblerMIPS::jump):
3577 (JSC::MacroAssemblerMIPS::branchAdd32):
3578 (JSC::MacroAssemblerMIPS::branchMul32):
3579 (JSC::MacroAssemblerMIPS::branchSub32):
3580 (JSC::MacroAssemblerMIPS::breakpoint):
3581 (JSC::MacroAssemblerMIPS::nearCall):
3582 (JSC::MacroAssemblerMIPS::call):