1 2009-12-14 Geoffrey Garen <ggaren@apple.com>
3 Reviewed by Simon Fraser.
5 https://bugs.webkit.org/show_bug.cgi?id=32524
6 REGRESSION(52084): fast/dom/prototypes.html failing two CSS tests
9 (WTF::bitCount): The original patch put the parentheses in the wrong
10 place, completely changing the calculation and making it almost always
11 wrong. Moved the parentheses around the '+' operation, like the original
12 compiler warning suggested.
14 2009-12-14 Gabor Loki <loki@inf.u-szeged.hu>
16 Unreviewed trivial buildfix.
18 Fix crosses initialization of usedPrimaryBlocks for JSValue32
20 * runtime/Collector.cpp:
21 (JSC::Heap::markConservatively):
23 2009-12-14 Csaba Osztrogonác <ossy@webkit.org>
25 Reviewed by Simon Hausmann.
27 GCC 4.3.x warning fixed. Suggested parantheses added.
28 warning: ../../../JavaScriptCore/wtf/StdLibExtras.h:77: warning: suggest parentheses around + or - in operand of &
33 2009-12-13 Geoffrey Garen <ggaren@apple.com>
35 Reviewed by Sam Weinig.
37 Changed GC from mark-sweep to mark-allocate.
39 Added WeakGCMap to keep WebCore blissfully ignorant about objects that
40 have become garbage but haven't run their destructors yet.
43 7.6% v8 speedup (37% splay speedup).
44 17% speedup on bench-alloc-nonretained.js.
45 18% speedup on bench-alloc-retained.js.
49 * API/JSContextRef.cpp:
51 * JavaScriptCore.xcodeproj/project.pbxproj: Updated for renames and new
54 * debugger/Debugger.cpp:
55 (JSC::Debugger::recompileAllJSFunctions): Updated to use the Collector
59 (functionGC): Updated for rename.
61 * runtime/Collector.cpp: Slightly reduced the number of allocations per
62 collection, so that small workloads only allocate on collector block,
65 (JSC::Heap::Heap): Updated to use the new allocateBlock function.
67 (JSC::Heap::destroy): Updated to use the new freeBlocks function.
69 (JSC::Heap::allocateBlock): New function to initialize a block when
72 (JSC::Heap::freeBlock): Consolidated the responsibility for running
73 destructors into this function.
75 (JSC::Heap::freeBlocks): Updated to use freeBlock.
77 (JSC::Heap::recordExtraCost): Sweep the heap in this reporting function,
78 so that allocation, which is more common, doesn't have to check extraCost.
80 (JSC::Heap::heapAllocate): Run destructors right before recycling a
81 garbage cell. This has better cache utilization than a separate sweep phase.
83 (JSC::Heap::resizeBlocks):
84 (JSC::Heap::growBlocks):
85 (JSC::Heap::shrinkBlocks): New set of functions for managing the size of
86 the heap, now that the heap doesn't maintain any information about its
89 (JSC::isPointerAligned):
90 (JSC::isHalfCellAligned):
91 (JSC::isPossibleCell):
93 (JSC::Heap::markConservatively): Cleaned up this code a bit.
95 (JSC::Heap::clearMarkBits):
96 (JSC::Heap::markedCells): Some helper functions for examining the the mark
99 (JSC::Heap::sweep): Simplified this function by using a DeadObjectIterator.
101 (JSC::Heap::markRoots): Reordered some operations for clarity.
103 (JSC::Heap::objectCount):
104 (JSC::Heap::addToStatistics):
105 (JSC::Heap::statistics): Rewrote these functions to calculate an object
106 count on demand, since the heap doesn't maintain this information by
109 (JSC::Heap::reset): New function for resetting the heap once we've
110 exhausted heap space.
112 (JSC::Heap::collectAllGarbage): This function matches the old collect()
113 behavior, but it's now an uncommon function used only by API.
115 * runtime/Collector.h:
116 (JSC::CollectorBitmap::count):
117 (JSC::CollectorBitmap::isEmpty): Added some helper functions for managing
118 the collector mark bitmap.
120 (JSC::Heap::reportExtraMemoryCost): Changed reporting from cell equivalents
121 to bytes, so it's easier to understand.
123 * runtime/CollectorHeapIterator.h:
124 (JSC::CollectorHeapIterator::CollectorHeapIterator):
125 (JSC::CollectorHeapIterator::operator!=):
126 (JSC::CollectorHeapIterator::operator*):
127 (JSC::CollectorHeapIterator::advance):
128 (JSC::::LiveObjectIterator):
130 (JSC::::DeadObjectIterator):
131 (JSC::::ObjectIterator): New iterators for encapsulating details about
132 heap layout, and what's live and dead on the heap.
134 * runtime/JSArray.cpp:
135 (JSC::JSArray::putSlowCase):
136 (JSC::JSArray::increaseVectorLength): Delay reporting extra cost until
137 we're fully constructed, so the heap mark phase won't visit us in an
142 (JSC::JSCell::createDummyStructure):
143 (JSC::JSCell::JSCell):
144 * runtime/JSGlobalData.cpp:
145 (JSC::JSGlobalData::JSGlobalData):
146 * runtime/JSGlobalData.h: Added a dummy cell to simplify allocation logic.
148 * runtime/JSString.h:
149 (JSC::jsSubstring): Don't report extra cost for substrings, since they
150 share a buffer that's already reported extra cost.
153 * runtime/Tracing.h: Changed these dtrace hooks not to report object
154 counts, since they're no longer cheap to compute.
156 * runtime/UString.h: Updated for renames.
158 * runtime/WeakGCMap.h: Added.
159 (JSC::WeakGCMap::isEmpty):
160 (JSC::WeakGCMap::uncheckedGet):
161 (JSC::WeakGCMap::uncheckedBegin):
162 (JSC::WeakGCMap::uncheckedEnd):
166 (JSC::::uncheckedRemove): Mentioned above.
168 * wtf/StdLibExtras.h:
169 (WTF::bitCount): Added a bit population count function, so the heap can
170 count live objects to fulfill statistics questions.
172 The very last cell in the block is not allocated -- should not be marked.
174 2009-12-13 Geoffrey Garen <ggaren@apple.com>
176 Windows build fix: Export some new symbols.
178 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
180 2009-12-13 Geoffrey Garen <ggaren@apple.com>
182 Windows build fix: Removed some old exports.
184 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
186 2009-12-13 Geoffrey Garen <ggaren@apple.com>
188 Windows build fix: Use unsigned instead of uint32_t to avoid dependencies.
190 * wtf/StdLibExtras.h:
193 2009-12-13 Gavin Barraclough <barraclough@apple.com>
195 Reviewed by NOBODY (speculative Windows build fix).
197 * runtime/JSGlobalObjectFunctions.cpp:
199 2009-12-13 Gavin Barraclough <barraclough@apple.com>
201 Reviewed by Sam Weinig.
203 https://bugs.webkit.org/show_bug.cgi?id=32496
204 Switch remaining cases of string construction to use StringBuilder.
205 Builds strings using a vector rather than using string append / addition.
207 * JavaScriptCore.exp:
208 * JavaScriptCore.xcodeproj/project.pbxproj:
209 * runtime/Executable.cpp:
210 (JSC::FunctionExecutable::paramString):
211 * runtime/FunctionConstructor.cpp:
212 (JSC::constructFunction):
213 * runtime/JSGlobalObjectFunctions.cpp:
216 (JSC::globalFuncEscape):
217 (JSC::globalFuncUnescape):
218 * runtime/JSONObject.cpp:
219 (JSC::Stringifier::stringify):
220 (JSC::Stringifier::indent):
221 * runtime/JSString.h:
222 * runtime/LiteralParser.cpp:
223 (JSC::LiteralParser::Lexer::lexString):
224 * runtime/NumberPrototype.cpp:
225 (JSC::integerPartNoExp):
226 (JSC::numberProtoFuncToFixed):
227 (JSC::numberProtoFuncToPrecision):
228 * runtime/Operations.h:
230 * runtime/StringPrototype.cpp:
231 (JSC::substituteBackreferencesSlow):
232 (JSC::substituteBackreferences):
233 (JSC::stringProtoFuncConcat):
235 2009-12-08 Jeremy Moskovich <jeremy@chromium.org>
237 Reviewed by Eric Seidel.
239 Add code to allow toggling ATSUI/Core Text rendering at runtime in ComplexTextController.
240 https://bugs.webkit.org/show_bug.cgi?id=31802
242 The goal here is to allow for a zero runtime hit for ports that decide to select
243 the API at compile time.
244 When both USE(ATSUI) and USE(CORE_TEXT) are true, the API is toggled
245 at runtime. Core Text is used for OS Versions >= 10.6.
247 * wtf/Platform.h: #define USE_CORE_TEXT and USE_ATSUI on Chrome/Mac.
249 2009-12-11 Maciej Stachowiak <mjs@apple.com>
251 Reviewed by Oliver Hunt.
253 Unify codegen for forward and backward variants of branches
254 https://bugs.webkit.org/show_bug.cgi?id=32463
257 (JSC::JIT::emit_op_loop): Implemented in terms of forward variant.
258 (JSC::JIT::emit_op_loop_if_true): ditto
259 (JSC::JIT::emitSlow_op_loop_if_true): ditto
260 (JSC::JIT::emit_op_loop_if_false): ditto
261 (JSC::JIT::emitSlow_op_loop_if_false): ditto
262 (JSC::JIT::emit_op_loop_if_less): ditto
263 (JSC::JIT::emitSlow_op_loop_if_less): ditto
264 * jit/JITOpcodes.cpp:
266 2009-12-11 Sam Weinig <sam@webkit.org>
268 Reviewed by Anders Carlsson.
270 Allow WTFs concept of the main thread to differ from pthreads when necessary.
272 * wtf/ThreadingPthreads.cpp:
273 (WTF::initializeThreading):
275 * wtf/mac/MainThreadMac.mm:
276 (WTF::initializeMainThreadPlatform):
277 (WTF::scheduleDispatchFunctionsOnMainThread):
279 2009-12-11 Gavin Barraclough <barraclough@apple.com>
281 Reviewed by Oliver Hunt.
283 https://bugs.webkit.org/show_bug.cgi?id=32454
284 Refactor construction of simple strings to avoid string concatenation.
286 Building strings through concatenation has a memory and performance cost -
287 a memory cost since we must over-allocate the buffer to leave space to append
288 into, and performance in that the string may still require reallocation (and
289 thus copying during construction). Instead move the full construction to
290 within a single function call (makeString), so that the arguments' lengths
291 can be calculated and an appropriate sized buffer allocated before copying
294 ~No performance change (~2% progression on date tests).
296 * bytecode/CodeBlock.cpp:
298 (JSC::valueToSourceString):
301 (JSC::CodeBlock::registerName):
302 (JSC::regexpToSourceString):
304 * bytecompiler/NodesCodegen.cpp:
306 * profiler/Profiler.cpp:
307 (JSC::Profiler::createCallIdentifier):
308 * runtime/DateConstructor.cpp:
310 * runtime/DateConversion.cpp:
312 (JSC::formatDateUTCVariant):
314 (JSC::formatTimeUTC):
315 * runtime/DateConversion.h:
317 * runtime/DatePrototype.cpp:
318 (JSC::dateProtoFuncToString):
319 (JSC::dateProtoFuncToUTCString):
320 (JSC::dateProtoFuncToDateString):
321 (JSC::dateProtoFuncToTimeString):
322 (JSC::dateProtoFuncToGMTString):
323 * runtime/ErrorPrototype.cpp:
324 (JSC::errorProtoFuncToString):
325 * runtime/ExceptionHelpers.cpp:
326 (JSC::createUndefinedVariableError):
327 (JSC::createErrorMessage):
328 (JSC::createInvalidParamError):
329 * runtime/FunctionPrototype.cpp:
330 (JSC::insertSemicolonIfNeeded):
331 (JSC::functionProtoFuncToString):
332 * runtime/ObjectPrototype.cpp:
333 (JSC::objectProtoFuncToString):
334 * runtime/RegExpConstructor.cpp:
335 (JSC::constructRegExp):
336 * runtime/RegExpObject.cpp:
337 (JSC::RegExpObject::match):
338 * runtime/RegExpPrototype.cpp:
339 (JSC::regExpProtoFuncCompile):
340 (JSC::regExpProtoFuncToString):
341 * runtime/StringPrototype.cpp:
342 (JSC::stringProtoFuncBig):
343 (JSC::stringProtoFuncSmall):
344 (JSC::stringProtoFuncBlink):
345 (JSC::stringProtoFuncBold):
346 (JSC::stringProtoFuncFixed):
347 (JSC::stringProtoFuncItalics):
348 (JSC::stringProtoFuncStrike):
349 (JSC::stringProtoFuncSub):
350 (JSC::stringProtoFuncSup):
351 (JSC::stringProtoFuncFontcolor):
352 (JSC::stringProtoFuncFontsize):
353 (JSC::stringProtoFuncAnchor):
358 2009-12-10 Gavin Barraclough <barraclough@apple.com>
360 Reviewed by Oliver Hunt.
362 https://bugs.webkit.org/show_bug.cgi?id=32400
363 Switch remaining cases of string addition to use ropes.
365 Re-landing r51975 - added toPrimitiveString method,
366 performs toPrimitive then subsequent toString operations.
368 ~1% progression on Sunspidey.
371 (JSC::DEFINE_STUB_FUNCTION):
372 * runtime/JSString.h:
373 (JSC::JSString::JSString):
374 (JSC::JSString::appendStringInConstruct):
375 * runtime/Operations.cpp:
376 (JSC::jsAddSlowCase):
377 * runtime/Operations.h:
381 2009-12-11 Adam Roben <aroben@apple.com>
385 * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added
386 $(WebKitOutputDir)/include/private to the include path.
388 2009-12-11 Adam Roben <aroben@apple.com>
390 Move QuartzCorePresent.h to include/private
392 This fixes other projects that use wtf/Platform.h
394 Rubber-stamped by Steve Falkenburg.
396 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Let VS do its thang.
397 * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Write
398 QuartzCorePresent.h to $(WebKitOutputDir)/include/private.
400 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
401 * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
402 Added $(WebKitOutputDir)/include/private to the include path.
404 2009-12-11 Adam Roben <aroben@apple.com>
406 Fix clean builds and everything rebuilding on every build
408 Reviewed by Sam Weinig.
410 * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Don't
411 write out QuartzCorePresent.h if it exists but is older than
412 QuartzCore.h. Also, create the directory we write QuartzCorePresent.h
415 2009-12-11 Adam Roben <aroben@apple.com>
417 Windows build fix for systems with spaces in their paths
419 * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Quote some paths.
421 2009-12-11 Chris Marrin <cmarrin@apple.com>
423 Reviewed by Adam Roben.
425 Add check for presence of QuartzCore headers
426 https://bugs.webkit.org/show_bug.cgi?id=31856
428 The script now checks for the presence of QuartzCore.h. If present
429 it will turn on ACCELERATED_COMPOSITING and 3D_RENDERING to enable
430 HW compositing on Windows. The script writes QuartzCorePresent.h to
431 the build directory which has a define telling whether QuartzCore is
434 * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
437 2009-12-11 Kent Tamura <tkent@chromium.org>
439 Reviewed by Darin Adler.
441 Fix a problem that JSC::gregorianDateTimeToMS() returns a negative
442 value for a huge year value.
443 https://bugs.webkit.org/show_bug.cgi?id=32304
446 (WTF::dateToDaysFrom1970): Renamed from dateToDayInYear, and changed the return type to double.
447 (WTF::calculateDSTOffset): Follow the dateToDaysFrom1970() change.
448 (WTF::timeClip): Use maxECMAScriptTime.
449 (JSC::gregorianDateTimeToMS): Follow the dateToDaysFrom1970() change.
451 2009-12-10 Adam Barth <abarth@webkit.org>
453 No review, rolling out r51975.
454 http://trac.webkit.org/changeset/51975
457 (JSC::DEFINE_STUB_FUNCTION):
458 * runtime/JSString.h:
459 (JSC::JSString::JSString):
460 (JSC::JSString::appendStringInConstruct):
461 * runtime/Operations.cpp:
462 (JSC::jsAddSlowCase):
463 * runtime/Operations.h:
467 2009-12-10 Oliver Hunt <oliver@apple.com>
469 Reviewed by Gavin Barraclough.
471 Incorrect caching of prototype lookup with dictionary base
472 https://bugs.webkit.org/show_bug.cgi?id=32402
474 Make sure we don't add cached prototype lookup to the proto_list
475 lookup chain if the top level object is a dictionary.
478 (JSC::JITThunks::tryCacheGetByID):
480 2009-12-10 Gavin Barraclough <barraclough@apple.com>
482 Reviewed by Oliver Hunt.
484 https://bugs.webkit.org/show_bug.cgi?id=32400
485 Switch remaining cases of string addition to use ropes.
487 ~1% progression on Sunspidey.
490 (JSC::DEFINE_STUB_FUNCTION):
491 * runtime/JSString.h:
492 (JSC::JSString::JSString):
493 (JSC::JSString::appendStringInConstruct):
494 * runtime/Operations.cpp:
495 (JSC::jsAddSlowCase):
496 * runtime/Operations.h:
500 2009-12-10 Kent Hansen <kent.hansen@nokia.com>
502 Reviewed by Geoffrey Garen.
504 Remove JSObject::getPropertyAttributes() and all usage of it.
505 https://bugs.webkit.org/show_bug.cgi?id=31933
507 getOwnPropertyDescriptor() should be used instead.
509 * JavaScriptCore.exp:
510 * JavaScriptCore.order:
511 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
512 * debugger/DebuggerActivation.cpp:
513 (JSC::DebuggerActivation::getOwnPropertyDescriptor):
514 * debugger/DebuggerActivation.h:
515 * runtime/JSObject.cpp:
516 (JSC::JSObject::propertyIsEnumerable):
517 * runtime/JSObject.h:
518 * runtime/JSVariableObject.cpp:
519 * runtime/JSVariableObject.h:
521 2009-12-10 Gavin Barraclough <barraclough@apple.com>
523 Reviewed by Oliver Hunt & Mark Rowe.
525 https://bugs.webkit.org/show_bug.cgi?id=32367
526 Add support for short Ropes (up to 3 entries) inline within JSString.
527 (rather than externally allocating an object to hold the rope).
528 Switch jsAdd of (JSString* + JSString*) to now make use of Ropes.
530 ~1% progression on Sunspidey.
532 * interpreter/Interpreter.cpp:
533 (JSC::Interpreter::privateExecute):
534 * jit/JITOpcodes.cpp:
535 (JSC::JIT::privateCompileCTIMachineTrampolines):
537 (JSC::DEFINE_STUB_FUNCTION):
538 * runtime/JSString.cpp:
539 (JSC::JSString::resolveRope):
540 (JSC::JSString::toBoolean):
541 (JSC::JSString::getStringPropertyDescriptor):
542 * runtime/JSString.h:
543 (JSC::JSString::Rope::Fiber::deref):
544 (JSC::JSString::Rope::Fiber::ref):
545 (JSC::JSString::Rope::Fiber::refAndGetLength):
546 (JSC::JSString::Rope::append):
547 (JSC::JSString::JSString):
548 (JSC::JSString::~JSString):
549 (JSC::JSString::value):
550 (JSC::JSString::tryGetValue):
551 (JSC::JSString::length):
552 (JSC::JSString::canGetIndex):
553 (JSC::JSString::appendStringInConstruct):
554 (JSC::JSString::appendValueInConstructAndIncrementLength):
555 (JSC::JSString::isRope):
556 (JSC::JSString::string):
557 (JSC::JSString::ropeLength):
558 (JSC::JSString::getStringPropertySlot):
559 * runtime/Operations.h:
564 2009-12-09 Anders Carlsson <andersca@apple.com>
566 Reviewed by Geoffrey Garen.
568 Fix three more things found by compiling with clang++.
570 * runtime/Structure.h:
571 (JSC::StructureTransitionTable::reifySingleTransition):
572 Add the 'std' qualifier to the call to make_pair.
575 (WTF::initializeDates):
576 Incrementing a bool is deprecated according to the C++ specification.
579 (WTF::PtrAndFlags::PtrAndFlags):
580 Name lookup should not be done in dependent bases, so explicitly qualify the call to set.
582 2009-12-09 Maciej Stachowiak <mjs@apple.com>
584 Reviewed by Oliver Hunt.
586 Google reader gets stuck in the "Loading..." state and does not complete
587 https://bugs.webkit.org/show_bug.cgi?id=32256
588 <rdar://problem/7456388>
590 * jit/JITArithmetic.cpp:
591 (JSC::JIT::emitSlow_op_jless): Fix some backward branches.
593 2009-12-09 Gavin Barraclough <barraclough@apple.com>
595 Reviewed by Oliver Hunt.
597 https://bugs.webkit.org/show_bug.cgi?id=32228
598 Make destruction of ropes non-recursive to prevent stack exhaustion.
599 Also, pass a UString& into initializeFiber rather than a Ustring::Rep*,
600 since the Rep is not being ref counted this could result in usage of a
601 Rep with refcount zero (where the Rep comes from a temporary UString
602 returned from a function).
604 * runtime/JSString.cpp:
605 (JSC::JSString::Rope::destructNonRecursive):
606 (JSC::JSString::Rope::~Rope):
607 * runtime/JSString.h:
608 (JSC::JSString::Rope::initializeFiber):
609 * runtime/Operations.h:
610 (JSC::concatenateStrings):
612 2009-12-09 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
614 Reviewed by Eric Seidel.
616 https://bugs.webkit.org/show_bug.cgi?id=31930
618 Update to r51457. ASSERTs changed to COMPILE_ASSERTs.
621 * runtime/JSGlobalData.cpp:
622 (JSC::VPtrSet::VPtrSet):
624 2009-12-09 Steve Block <steveblock@google.com>
626 Reviewed by Adam Barth.
628 Updates Android Makefiles with latest additions.
629 https://bugs.webkit.org/show_bug.cgi?id=32278
631 * Android.mk: Modified.
632 * Android.v8.wtf.mk: Modified.
634 2009-12-09 Sam Weinig <sam@webkit.org>
636 Reviewed by Gavin Barraclough.
638 Fix a bug found while trying to compile JavaScriptCore with clang++.
640 * yarr/RegexPattern.h:
641 (JSC::Yarr::PatternTerm::PatternTerm): Don't self assign here. Use false instead.
643 2009-12-09 Anders Carlsson <andersca@apple.com>
645 Reviewed by Sam Weinig.
647 Attempt to fix the Windows build.
651 2009-12-09 Anders Carlsson <andersca@apple.com>
653 Reviewed by Sam Weinig.
655 Fix some things found while trying to compile JavaScriptCore with clang++.
658 Add correct exception specifications for the allocation/deallocation operators.
661 * wtf/VectorTraits.h:
662 Fix a bunch of struct/class mismatches.
664 2009-12-08 Maciej Stachowiak <mjs@apple.com>
666 Reviewed by Darin Adler.
668 move code generation portions of Nodes.cpp to bytecompiler directory
669 https://bugs.webkit.org/show_bug.cgi?id=32284
671 * bytecompiler/NodesCodegen.cpp: Copied from parser/Nodes.cpp. Removed parts that
672 are not about codegen.
673 * parser/Nodes.cpp: Removed everything that is about codegen.
675 Update build systems:
679 * JavaScriptCore.gypi:
680 * JavaScriptCore.pri:
681 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
682 * JavaScriptCore.xcodeproj/project.pbxproj:
683 * JavaScriptCoreSources.bkl:
685 2009-12-08 Kevin Watters <kevinwatters@gmail.com>
687 Reviewed by Kevin Ollivier.
689 [wx] Mac plugins support.
691 https://bugs.webkit.org/show_bug.cgi?id=32236
695 2009-12-08 Dmitry Titov <dimich@chromium.org>
697 Rubber-stamped by David Levin.
699 Revert and reopen "Add asserts to RefCounted to make sure ref/deref happens on the right thread."
700 It may have caused massive increase of reported leaks on the bots.
701 https://bugs.webkit.org/show_bug.cgi?id=31639
704 * JavaScriptCore.gypi:
705 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
706 * JavaScriptCore.xcodeproj/project.pbxproj:
707 * runtime/Structure.cpp:
708 (JSC::Structure::Structure):
710 (WTF::RefCountedBase::ref):
711 (WTF::RefCountedBase::hasOneRef):
712 (WTF::RefCountedBase::refCount):
713 (WTF::RefCountedBase::derefBase):
714 * wtf/ThreadVerifier.h: Removed.
716 2009-12-08 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
718 Reviewed by Darin Adler.
720 Make WebKit build correctly on FreeBSD, IA64, and Alpha.
721 Based on work by Petr Salinger <Petr.Salinger@seznam.cz>,
722 and Colin Watson <cjwatson@ubuntu.com>.
726 2009-12-08 Dmitry Titov <dimich@chromium.org>
728 Reviewed by Darin Adler.
730 Add asserts to RefCounted to make sure ref/deref happens on the right thread.
731 https://bugs.webkit.org/show_bug.cgi?id=31639
733 * runtime/Structure.cpp:
734 (JSC::Structure::Structure): Disable thread verification on this class since it uses addressOfCount().
736 (WTF::RefCountedBase::ref): Add ASSERT.
737 (WTF::RefCountedBase::hasOneRef): Ditto.
738 (WTF::RefCountedBase::refCount): Ditto.
739 (WTF::RefCountedBase::derefBase): Ditto.
740 (WTF::RefCountedBase::disableThreadVerification): delegate to ThreadVerifier method.
741 * wtf/ThreadVerifier.h: Added.
742 (WTF::ThreadVerifier::ThreadVerifier): New Debug-only class to verify that ref/deref of RefCounted is done on the same thread.
743 (WTF::ThreadVerifier::activate): Activates checks. Called when ref count becomes above 2.
744 (WTF::ThreadVerifier::deactivate): Deactivates checks. Called when ref count drops below 2.
745 (WTF::ThreadVerifier::disableThreadVerification): used on objects that should not be checked (StringImpl etc)
746 (WTF::ThreadVerifier::verifyThread):
747 * GNUmakefile.am: Add ThreadVerifier.h to the build file.
748 * JavaScriptCore.gypi: Ditto.
749 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
750 * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
752 2009-12-08 Steve Block <steveblock@google.com>
754 Reviewed by Adam Barth.
756 [Android] Adds Makefiles for Android port.
757 https://bugs.webkit.org/show_bug.cgi?id=31325
760 * Android.v8.wtf.mk: Added.
762 2009-12-07 Dmitry Titov <dimich@chromium.org>
764 Rubber-stamped by Darin Adler.
766 Remove ENABLE_SHARED_SCRIPT flags
767 https://bugs.webkit.org/show_bug.cgi?id=32245
768 This patch was obtained by "git revert" command and then un-reverting of ChangeLog files.
770 * Configurations/FeatureDefines.xcconfig:
773 2009-12-07 Gavin Barraclough <barraclough@apple.com>
775 Reviewed by NOBODY (Windows build fixage part I).
777 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
779 2009-12-05 Gavin Barraclough <barraclough@apple.com>
781 Reviewed by Oliver Hunt.
783 https://bugs.webkit.org/show_bug.cgi?id=32184
784 Handle out-of-memory conditions with JSC Ropes with a JS exception, rather than crashing.
785 Switch from using fastMalloc to tryFastMalloc, pass an ExecState to record the exception on.
787 * API/JSCallbackObjectFunctions.h:
789 * API/JSValueRef.cpp:
790 (JSValueIsStrictEqual):
791 * JavaScriptCore.exp:
792 * bytecompiler/BytecodeGenerator.cpp:
793 (JSC::BytecodeGenerator::emitEqualityOp):
794 * debugger/DebuggerCallFrame.cpp:
795 (JSC::DebuggerCallFrame::functionName):
796 (JSC::DebuggerCallFrame::calculatedFunctionName):
797 * interpreter/Interpreter.cpp:
798 (JSC::Interpreter::callEval):
799 (JSC::Interpreter::privateExecute):
801 (JSC::DEFINE_STUB_FUNCTION):
802 * profiler/ProfileGenerator.cpp:
803 (JSC::ProfileGenerator::addParentForConsoleStart):
804 * profiler/Profiler.cpp:
805 (JSC::Profiler::willExecute):
806 (JSC::Profiler::didExecute):
807 (JSC::Profiler::createCallIdentifier):
808 (JSC::createCallIdentifierFromFunctionImp):
809 * profiler/Profiler.h:
810 * runtime/ArrayPrototype.cpp:
811 (JSC::arrayProtoFuncIndexOf):
812 (JSC::arrayProtoFuncLastIndexOf):
813 * runtime/DateConstructor.cpp:
814 (JSC::constructDate):
815 * runtime/FunctionPrototype.cpp:
816 (JSC::functionProtoFuncToString):
817 * runtime/InternalFunction.cpp:
818 (JSC::InternalFunction::name):
819 (JSC::InternalFunction::displayName):
820 (JSC::InternalFunction::calculatedDisplayName):
821 * runtime/InternalFunction.h:
822 * runtime/JSCell.cpp:
823 (JSC::JSCell::getString):
825 (JSC::JSValue::getString):
826 * runtime/JSONObject.cpp:
828 (JSC::Stringifier::Stringifier):
829 (JSC::Stringifier::appendStringifiedValue):
830 * runtime/JSObject.cpp:
831 (JSC::JSObject::putDirectFunction):
832 (JSC::JSObject::putDirectFunctionWithoutTransition):
833 (JSC::JSObject::defineOwnProperty):
834 * runtime/JSObject.h:
835 * runtime/JSPropertyNameIterator.cpp:
836 (JSC::JSPropertyNameIterator::get):
837 * runtime/JSString.cpp:
838 (JSC::JSString::Rope::~Rope):
839 (JSC::JSString::resolveRope):
840 (JSC::JSString::getPrimitiveNumber):
841 (JSC::JSString::toNumber):
842 (JSC::JSString::toString):
843 (JSC::JSString::toThisString):
844 (JSC::JSString::getStringPropertyDescriptor):
845 * runtime/JSString.h:
846 (JSC::JSString::Rope::createOrNull):
847 (JSC::JSString::Rope::operator new):
848 (JSC::JSString::value):
849 (JSC::JSString::tryGetValue):
850 (JSC::JSString::getIndex):
851 (JSC::JSString::getStringPropertySlot):
852 (JSC::JSValue::toString):
854 * runtime/NativeErrorConstructor.cpp:
855 (JSC::NativeErrorConstructor::NativeErrorConstructor):
856 * runtime/Operations.cpp:
857 (JSC::JSValue::strictEqualSlowCase):
858 * runtime/Operations.h:
859 (JSC::JSValue::equalSlowCaseInline):
860 (JSC::JSValue::strictEqualSlowCaseInline):
861 (JSC::JSValue::strictEqual):
865 (JSC::concatenateStrings):
866 * runtime/PropertyDescriptor.cpp:
867 (JSC::PropertyDescriptor::equalTo):
868 * runtime/PropertyDescriptor.h:
869 * runtime/StringPrototype.cpp:
870 (JSC::stringProtoFuncReplace):
871 (JSC::stringProtoFuncToLowerCase):
872 (JSC::stringProtoFuncToUpperCase):
874 2009-12-07 Nikolas Zimmermann <nzimmermann@rim.com>
876 Reviewed by Holger Freyther.
878 Turn on (SVG) Filters support, by default.
879 https://bugs.webkit.org/show_bug.cgi?id=32224
881 * Configurations/FeatureDefines.xcconfig: Enable FILTERS build flag.
883 2009-12-07 Steve Falkenburg <sfalken@apple.com>
885 Build fix. Be flexible about which version of ICU is used on Windows.
887 * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Add optional xcopy commands to copy ICU 4.2.
889 2009-12-07 Maciej Stachowiak <mjs@apple.com>
891 Reviewed by Oliver Hunt.
893 op_loop_if_less JIT codegen is broken for 64-bit
894 https://bugs.webkit.org/show_bug.cgi?id=32221
896 * jit/JITOpcodes.cpp:
897 (JSC::JIT::emit_op_loop_if_false): Fix codegen in this version - test was backwards.
899 2009-12-07 Oliver Hunt <oliver@apple.com>
901 Reviewed by Maciej Stachowiak.
903 Object.create fails if properties on the descriptor are getters
904 https://bugs.webkit.org/show_bug.cgi?id=32219
906 Correctly initialise the PropertySlots with the descriptor object.
908 * runtime/ObjectConstructor.cpp:
909 (JSC::toPropertyDescriptor):
911 2009-12-06 Maciej Stachowiak <mjs@apple.com>
913 Not reviewed, build fix.
915 Actually tested 64-bit *and* 32-bit build this time.
917 * jit/JITOpcodes.cpp:
918 (JSC::JIT::emit_op_loop_if_false):
920 2009-12-06 Maciej Stachowiak <mjs@apple.com>
922 Not reviewed, build fix.
924 Really really fix 64-bit build for prior patch (actually tested this time).
926 * jit/JITOpcodes.cpp:
927 (JSC::JIT::emit_op_loop_if_false):
928 (JSC::JIT::emitSlow_op_loop_if_false):
930 2009-12-06 Maciej Stachowiak <mjs@apple.com>
932 Not reviewed, build fix.
934 Really fix 64-bit build for prior patch.
936 * jit/JITArithmetic.cpp:
937 (JSC::JIT::emitSlow_op_jless):
939 2009-12-06 Maciej Stachowiak <mjs@apple.com>
941 Not reviewed, build fix.
943 Fix 64-bit build for prior patch.
945 * jit/JITOpcodes.cpp:
946 (JSC::JIT::emitSlow_op_loop_if_less):
948 2009-12-05 Maciej Stachowiak <mjs@apple.com>
950 Reviewed by Oliver Hunt.
952 conway benchmark spends half it's time in op_less (jump fusion fails)
953 https://bugs.webkit.org/show_bug.cgi?id=32190
955 <1% speedup on SunSpider and V8
956 2x speedup on "conway" benchmark
959 1) Improve codegen for logical operators &&, || and ! in a condition context
961 When generating code for combinations of &&, || and !, in a
962 condition context (i.e. in an if statement or loop condition), we
963 used to produce a value, and then separately jump based on its
964 truthiness. Now we pass the false and true targets in, and let the
965 logical operators generate jumps directly. This helps in four
968 a) Individual clauses of a short-circuit logical operator can now
969 jump directly to the then or else clause of an if statement (or to
970 the top or exit of a loop) instead of jumping to a jump.
972 b) It used to be that jump fusion with the condition of the first
973 clause of a logical operator was inhibited, because the register
974 was ref'd to be used later, in the actual condition jump; this no
975 longer happens since a jump straight to the final target is
978 c) It used to be that jump fusion with the condition of the second
979 clause of a logical operator was inhibited, because there was a
980 jump target right after the second clause and before the actual
981 condition jump. But now it's no longer necessary for the first
982 clause to jump there so jump fusion is not blocked.
984 d) We avoid generating excess mov statements in some cases.
986 As a concrete example this source:
988 if (!((x < q && y < q) || (t < q && z < q))) {
992 Used to generate this bytecode:
994 [ 34] less r1, r-15, r-19
995 [ 38] jfalse r1, 7(->45)
996 [ 41] less r1, r-16, r-19
997 [ 45] jtrue r1, 14(->59)
998 [ 48] less r1, r-17, r-19
999 [ 52] jfalse r1, 7(->59)
1000 [ 55] less r1, r-18, r-19
1001 [ 59] jtrue r1, 17(->76)
1003 And now generates this bytecode (also taking advantage of the second optimization below):
1005 [ 34] jnless r-15, r-19, 8(->42)
1006 [ 38] jless r-16, r-19, 26(->64)
1007 [ 42] jnless r-17, r-19, 8(->50)
1008 [ 46] jless r-18, r-19, 18(->64)
1010 Note the jump fusion and the fact that there's less jump
1011 indirection - three of the four jumps go straight to the target
1012 clause instead of indirecting through another jump.
1014 2) Implement jless opcode to take advantage of the above, since we'll now often generate
1015 a less followed by a jtrue where fusion is not forbidden.
1018 (JSC::ExpressionNode::hasConditionContextCodegen): Helper function to determine
1019 whether a node supports special conditional codegen. Return false as this is the default.
1020 (JSC::ExpressionNode::emitBytecodeInConditionContext): Assert not reached - only really
1021 defined for nodes that do have conditional codegen.
1022 (JSC::UnaryOpNode::expr): Add const version.
1023 (JSC::LogicalNotNode::hasConditionContextCodegen): Returne true only if subexpression
1025 (JSC::LogicalOpNode::hasConditionContextCodegen): Return true.
1027 (JSC::LogicalNotNode::emitBytecodeInConditionContext): Implemented - just swap
1028 the true and false targets for the child node.
1029 (JSC::LogicalOpNode::emitBytecodeInConditionContext): Implemented - handle jumps
1030 directly, improving codegen quality. Also handles further nested conditional codegen.
1031 (JSC::ConditionalNode::emitBytecode): Use condition context codegen when available.
1032 (JSC::IfNode::emitBytecode): ditto
1033 (JSC::IfElseNode::emitBytecode): ditto
1034 (JSC::DoWhileNode::emitBytecode): ditto
1035 (JSC::WhileNode::emitBytecode): ditto
1036 (JSC::ForNode::emitBytecode): ditto
1038 * bytecode/Opcode.h:
1039 - Added loop_if_false opcode - needed now that falsey jumps can be backwards.
1040 - Added jless opcode to take advantage of new fusion opportunities.
1041 * bytecode/CodeBlock.cpp:
1042 (JSC::CodeBlock::dump): Handle above.
1043 * bytecompiler/BytecodeGenerator.cpp:
1044 (JSC::BytecodeGenerator::emitJumpIfTrue): Add peephole for less + jtrue ==> jless.
1045 (JSC::BytecodeGenerator::emitJumpIfFalse): Add handling of backwrds falsey jumps.
1046 * bytecompiler/BytecodeGenerator.h:
1047 (JSC::BytecodeGenerator::emitNodeInConditionContext): Wrapper to handle tracking of
1048 overly deep expressions etc.
1049 * interpreter/Interpreter.cpp:
1050 (JSC::Interpreter::privateExecute): Implement the two new opcodes (loop_if_false, jless).
1052 (JSC::JIT::privateCompileMainPass): Implement JIT support for the two new opcodes.
1053 (JSC::JIT::privateCompileSlowCases): ditto
1055 * jit/JITArithmetic.cpp:
1056 (JSC::JIT::emit_op_jless):
1057 (JSC::JIT::emitSlow_op_jless): ditto
1058 (JSC::JIT::emitBinaryDoubleOp): ditto
1059 * jit/JITOpcodes.cpp:
1060 (JSC::JIT::emitSlow_op_loop_if_less): ditto
1061 (JSC::JIT::emit_op_loop_if_false): ditto
1062 (JSC::JIT::emitSlow_op_loop_if_false): ditto
1067 2009-12-04 Kent Hansen <kent.hansen@nokia.com>
1069 Reviewed by Darin Adler.
1071 JavaScript delete operator should return false for string properties
1072 https://bugs.webkit.org/show_bug.cgi?id=32012
1074 * runtime/StringObject.cpp:
1075 (JSC::StringObject::deleteProperty):
1077 2009-12-03 Drew Wilson <atwilson@chromium.org>
1079 Rolled back r51633 because it causes a perf regression in Chromium.
1083 2009-12-03 Gavin Barraclough <barraclough@apple.com>
1085 Try and fix the Windows build.
1087 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a symbol that should be exported.
1089 2009-12-03 Mark Rowe <mrowe@apple.com>
1091 Try and fix the Mac build.
1093 * JavaScriptCore.exp: Export a symbol that should be exported.
1095 2009-12-03 Oliver Hunt <oliver@apple.com>
1097 Reviewed by Gavin Barraclough.
1099 REGRESSION(4.0.3-48777): Crash in JSC::ExecState::propertyNames() (Debug-only?)
1100 https://bugs.webkit.org/show_bug.cgi?id=32133
1102 Work around odd GCC-ism and correct the scopechain for use by
1103 calls made while a cachedcall is active on the callstack.
1105 * interpreter/CachedCall.h:
1106 (JSC::CachedCall::newCallFrame):
1107 * runtime/JSArray.cpp:
1108 (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key):
1109 * runtime/StringPrototype.cpp:
1110 (JSC::stringProtoFuncReplace):
1112 2009-12-03 Gavin Barraclough <barraclough@apple.com>
1114 Reviewed by Oliver "Brraaaaiiiinnnnnzzzzzzzz" Hunt.
1116 https://bugs.webkit.org/show_bug.cgi?id=32136
1117 Add a rope representation to JSString. Presently JSString always holds its data in UString form.
1118 Instead, allow the result of a string concatenation to be represented in a tree form - with a
1119 variable sized, reference-counted rope node retaining a set of UString::Reps (or other rope nopes).
1121 Strings must still currently be resolved down to a flat UString representation before being used,
1122 but by holding the string in a rope representation during construction we can avoid copying data
1123 until we know the final size of the string.
1125 ~2% progression on SunSpider (~25% on date-format-xparb, ~20% on string-validate-input).
1127 * JavaScriptCore.exp:
1131 * interpreter/Interpreter.cpp:
1132 (JSC::Interpreter::privateExecute):
1134 - Make use of new JSString::length() method to avoid prematurely resolving ropes.
1136 * jit/JITOpcodes.cpp:
1137 (JSC::JIT::privateCompileCTIMachineTrampolines):
1139 - Switch the string length trampoline to read the length directly from JSString::m_length,
1140 rather than from the JSString's UString::Rep's 'len' property.
1143 (JSC::DEFINE_STUB_FUNCTION):
1145 - Modify op_add such that addition of two strings, where either or both strings are already
1146 in rope representation, produces a rope as a result.
1148 * runtime/JSString.cpp:
1149 (JSC::JSString::Rope::~Rope):
1151 (JSC::JSString::resolveRope):
1152 (JSC::JSString::getPrimitiveNumber):
1153 (JSC::JSString::toBoolean):
1154 (JSC::JSString::toNumber):
1155 (JSC::JSString::toString):
1156 (JSC::JSString::toThisString):
1157 (JSC::JSString::getStringPropertyDescriptor):
1158 * runtime/JSString.h:
1159 (JSC::JSString::Rope::Fiber::Fiber):
1160 (JSC::JSString::Rope::Fiber::destroy):
1161 (JSC::JSString::Rope::Fiber::isRope):
1162 (JSC::JSString::Rope::Fiber::rope):
1163 (JSC::JSString::Rope::Fiber::string):
1164 (JSC::JSString::Rope::create):
1165 (JSC::JSString::Rope::initializeFiber):
1166 (JSC::JSString::Rope::ropeLength):
1167 (JSC::JSString::Rope::stringLength):
1168 (JSC::JSString::Rope::fibers):
1169 (JSC::JSString::Rope::Rope):
1170 (JSC::JSString::Rope::operator new):
1171 (JSC::JSString::JSString):
1172 (JSC::JSString::value):
1173 (JSC::JSString::length):
1174 (JSC::JSString::isRope):
1175 (JSC::JSString::rope):
1176 (JSC::JSString::string):
1177 (JSC::JSString::canGetIndex):
1178 (JSC::jsSingleCharacterSubstring):
1179 (JSC::JSString::getIndex):
1181 (JSC::JSString::getStringPropertySlot):
1185 * runtime/Operations.h:
1187 (JSC::concatenateStrings):
1189 - Update string concatenation, and addition of ropes, to produce ropes.
1191 * runtime/StringObject.cpp:
1192 (JSC::StringObject::getOwnPropertyNames):
1194 - Make use of new JSString::length() method to avoid prematurely resolving ropes.
1196 2009-11-23 Jeremy Moskovich <jeremy@chromium.org>
1198 Reviewed by Eric Seidel.
1200 Switch Chrome/Mac to use Core Text APIs rather than ATSUI APIs.
1201 https://bugs.webkit.org/show_bug.cgi?id=31802
1203 No test since this is already covered by existing pixel tests.
1205 * wtf/Platform.h: #define USE_CORE_TEXT for Chrome/Mac.
1207 2009-12-02 Oliver Hunt <oliver@apple.com>
1209 Reviewed by Gavin Barraclough.
1211 Add files missed in prior patch.
1213 * runtime/JSZombie.cpp:
1215 (JSC::JSZombie::leakedZombieStructure):
1216 * runtime/JSZombie.h: Added.
1217 (JSC::JSZombie::JSZombie):
1218 (JSC::JSZombie::isZombie):
1219 (JSC::JSZombie::classInfo):
1220 (JSC::JSZombie::isGetterSetter):
1221 (JSC::JSZombie::isAPIValueWrapper):
1222 (JSC::JSZombie::isPropertyNameIterator):
1223 (JSC::JSZombie::getCallData):
1224 (JSC::JSZombie::getConstructData):
1225 (JSC::JSZombie::getUInt32):
1226 (JSC::JSZombie::toPrimitive):
1227 (JSC::JSZombie::getPrimitiveNumber):
1228 (JSC::JSZombie::toBoolean):
1229 (JSC::JSZombie::toNumber):
1230 (JSC::JSZombie::toString):
1231 (JSC::JSZombie::toObject):
1232 (JSC::JSZombie::markChildren):
1233 (JSC::JSZombie::put):
1234 (JSC::JSZombie::deleteProperty):
1235 (JSC::JSZombie::toThisObject):
1236 (JSC::JSZombie::toThisString):
1237 (JSC::JSZombie::toThisJSString):
1238 (JSC::JSZombie::getJSNumber):
1239 (JSC::JSZombie::getOwnPropertySlot):
1241 2009-12-02 Oliver Hunt <oliver@apple.com>
1243 Reviewed by Gavin Barraclough.
1246 https://bugs.webkit.org/show_bug.cgi?id=32103
1248 Add a compile time flag to make the JSC collector replace "unreachable"
1249 objects with zombie objects. The zombie object is a JSCell subclass that
1250 ASSERTs on any attempt to use the JSCell methods. In addition there are
1251 a number of additional assertions in bottleneck code to catch zombie usage
1252 as quickly as possible.
1256 * JavaScriptCore.xcodeproj/project.pbxproj:
1257 * interpreter/Register.h:
1258 (JSC::Register::Register):
1259 * runtime/ArgList.h:
1260 (JSC::MarkedArgumentBuffer::append):
1261 (JSC::ArgList::ArgList):
1262 * runtime/Collector.cpp:
1263 (JSC::Heap::destroy):
1265 * runtime/Collector.h:
1267 (JSC::JSCell::isZombie):
1268 (JSC::JSValue::isZombie):
1269 * runtime/JSValue.h:
1270 (JSC::JSValue::decode):
1271 (JSC::JSValue::JSValue):
1274 2009-12-01 Jens Alfke <snej@chromium.org>
1276 Reviewed by Darin Adler.
1278 Added variants of find/contains/add that allow a foreign key type to be used.
1279 This will allow AtomicString-keyed maps to be queried by C string without
1280 having to create a temporary AtomicString (see HTTPHeaderMap.)
1281 The code for this is adapted from the equivalent in HashSet.h.
1284 (WTF::HashMap::find):
1285 (WTF::HashMap::contains):
1286 (WTF::HashMap::add):
1287 * wtf/HashSet.h: Changed "method" to "function member" in a comment.
1289 2009-12-01 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
1291 Revert 51551 because it broke GTK+.
1295 2009-11-30 Gavin Barraclough <barraclough@apple.com>
1297 Windows Build fix. Reviewed by NOBODY.
1299 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1301 2009-11-24 Gavin Barraclough <barraclough@apple.com>
1303 Reviewed by Geoff Garen.
1305 Bug 31859 - Make world selection for JSC IsolatedWorlds automagical.
1307 WebCore presently has to explicitly specify the world before entering into JSC,
1308 which is a little fragile (particularly since property access via a
1309 getter/setter might invoke execution). Instead derive the current world from
1310 the lexical global object.
1312 Remove the temporary duct tape of willExecute/didExecute virtual hooks on the JSGlobalData::ClientData - these are no longer necessary.
1316 * API/JSObjectRef.cpp:
1317 (JSObjectCallAsFunction):
1318 * JavaScriptCore.exp:
1319 * runtime/JSGlobalData.cpp:
1320 * runtime/JSGlobalData.h:
1322 2009-11-30 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1324 Reviewed by Kenneth Rohde Christiansen.
1326 [Qt] Remove obsolete PLATFORM(KDE) code
1327 https://bugs.webkit.org/show_bug.cgi?id=31958
1329 KDE is now using unpatched QtWebKit.
1331 * parser/Lexer.cpp: Remove obsolete KDE_USE_FINAL guard
1332 * wtf/Platform.h: Remove PLATFORM(KDE) definition and code
1333 section that is guarded with it.
1335 2009-11-30 Jan-Arve Sæther <jan-arve.saether@nokia.com>
1337 Reviewed by Simon Hausmann.
1339 [Qt] Fix compilation with win32-icc
1341 The Intel compiler does not support the __has_trivial_constructor type
1342 trait. The Intel Compiler can report itself as _MSC_VER >= 1400. The
1343 reason for that is that the Intel Compiler depends on the Microsoft
1344 Platform SDK, and in order to try to be "fully" MS compatible it will
1345 "pretend" to be the same MS compiler as was shipped with the MS PSDK.
1346 (Thus, compiling with win32-icc with VC8 SDK will make the source code
1347 "think" the compiler at hand supports this type trait).
1351 2009-11-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1353 Reviewed by Eric Seidel.
1355 [Qt] Mac build has JIT disabled
1356 https://bugs.webkit.org/show_bug.cgi?id=31828
1358 * wtf/Platform.h: Enable JIT for Qt Mac builds
1360 2009-11-28 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1362 Reviewed by Eric Seidel.
1364 Apply workaround for the limitation of VirtualFree with MEM_RELEASE to all ports running on Windows
1365 https://bugs.webkit.org/show_bug.cgi?id=31943
1367 * runtime/MarkStack.h:
1368 (JSC::MarkStack::MarkStackArray::shrinkAllocation):
1370 2009-11-28 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
1372 Reviewed by Gavin Barraclough.
1374 https://bugs.webkit.org/show_bug.cgi?id=31930
1376 Seems a typo. We don't need ~270k memory to determine the vptrs.
1378 * runtime/JSGlobalData.cpp:
1379 (JSC::VPtrSet::VPtrSet):
1381 2009-11-27 Shinichiro Hamaji <hamaji@chromium.org>
1385 Move GOwnPtr* from wtf to wtf/gtk
1386 https://bugs.webkit.org/show_bug.cgi?id=31793
1388 Build fix for chromium after r51423.
1389 Exclude gtk directory from chromium build.
1391 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1393 2009-11-25 Oliver Hunt <oliver@apple.com>
1395 Reviewed by Gavin Barraclough.
1397 Incorrect behaviour of jneq_null in the interpreter
1398 https://bugs.webkit.org/show_bug.cgi?id=31901
1400 Correct the logic of jneq_null. This is already covered by existing tests.
1402 * interpreter/Interpreter.cpp:
1403 (JSC::Interpreter::privateExecute):
1405 2009-11-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1407 Reviewed by Oliver Hunt.
1409 Move GOwnPtr* from wtf to wtf/gtk
1410 https://bugs.webkit.org/show_bug.cgi?id=31793
1412 * GNUmakefile.am: Change the path for GOwnPtr.*.
1413 * JavaScriptCore.gyp/JavaScriptCore.gyp: Remove
1414 GOwnPtr.cpp from the exclude list.
1415 * JavaScriptCore.gypi: Change the path for GOwnPtr.*.
1416 * wscript: Remove GOwnPtr.cpp from the exclude list.
1417 * wtf/GOwnPtr.cpp: Removed.
1418 * wtf/GOwnPtr.h: Removed.
1419 * wtf/Threading.h: Change the path for GOwnPtr.h.
1420 * wtf/gtk/GOwnPtr.cpp: Copied from JavaScriptCore/wtf/GOwnPtr.cpp.
1421 * wtf/gtk/GOwnPtr.h: Copied from JavaScriptCore/wtf/GOwnPtr.h.
1422 * wtf/unicode/glib/UnicodeGLib.h: Change the path for GOwnPtr.h.
1424 2009-11-24 Dmitry Titov <dimich@chromium.org>
1426 Reviewed by Eric Seidel.
1428 Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit
1429 https://bugs.webkit.org/show_bug.cgi?id=31444
1431 * Configurations/FeatureDefines.xcconfig:
1434 2009-11-24 Chris Marrin <cmarrin@apple.com>
1436 Reviewed by Simon Fraser.
1438 Add ability to enable ACCELERATED_COMPOSITING on Windows (currently disabled)
1439 https://bugs.webkit.org/show_bug.cgi?id=27314
1443 2009-11-24 Jason Smith <dark.panda@gmail.com>
1445 Reviewed by Alexey Proskuryakov.
1447 RegExp#exec's returned Array-like object behaves differently from
1449 https://bugs.webkit.org/show_bug.cgi?id=31689
1451 * JavaScriptCore/runtime/RegExpConstructor.cpp: ensure that undefined
1452 values are added to the returned RegExpMatchesArray
1454 2009-11-24 Oliver Hunt <oliver@apple.com>
1456 Reviewed by Alexey Proskuryakov.
1458 JSON.stringify performance on undefined is very poor
1459 https://bugs.webkit.org/show_bug.cgi?id=31839
1461 Switch from a UString to a Vector<UChar> when building
1462 the JSON string, allowing us to safely remove the substr-copy
1463 we otherwise did when unwinding an undefined property.
1465 Also turns out to be a ~5% speedup on stringification.
1467 * runtime/JSONObject.cpp:
1468 (JSC::Stringifier::StringBuilder::append):
1469 (JSC::Stringifier::stringify):
1470 (JSC::Stringifier::Holder::appendNextProperty):
1472 2009-11-24 Mark Rowe <mrowe@apple.com>
1474 Fix production builds where the source tree may be read-only.
1476 * JavaScriptCore.xcodeproj/project.pbxproj:
1478 2009-11-23 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1480 Reviewed by Kenneth Rohde Christiansen.
1482 Include "config.h" to meet Coding Style Guidelines
1483 https://bugs.webkit.org/show_bug.cgi?id=31792
1485 * wtf/unicode/UTF8.cpp:
1486 * wtf/unicode/glib/UnicodeGLib.cpp:
1487 * wtf/unicode/wince/UnicodeWince.cpp:
1489 2009-11-23 Geoffrey Garen <ggaren@apple.com>
1491 Reviewed by Oliver Hunt.
1493 Streamlined some Math functions where we expect or know the result not
1494 to be representable as an int.
1496 SunSpider says 0.6% faster.
1498 * runtime/JSNumberCell.h:
1499 (JSC::JSValue::JSValue):
1500 * runtime/JSValue.h:
1502 (JSC::jsDoubleNumber):
1503 (JSC::JSValue::JSValue): Added a function for making a numeric JSValue
1504 and skipping the "can I encode this as an int?" check, avoiding the
1505 overhead of int <-> double roundtripping and double <-> double comparison
1508 * runtime/MathObject.cpp:
1509 (JSC::mathProtoFuncACos):
1510 (JSC::mathProtoFuncASin):
1511 (JSC::mathProtoFuncATan):
1512 (JSC::mathProtoFuncATan2):
1513 (JSC::mathProtoFuncCos):
1514 (JSC::mathProtoFuncExp):
1515 (JSC::mathProtoFuncLog):
1516 (JSC::mathProtoFuncRandom):
1517 (JSC::mathProtoFuncSin):
1518 (JSC::mathProtoFuncSqrt):
1519 (JSC::mathProtoFuncTan): For these functions, which we expect or know
1520 to produce results not representable as ints, call jsDoubleNumber instead
1523 2009-11-23 Mark Rowe <mrowe@apple.com>
1525 Unreviewed. Unbreak the regression tests after r51329.
1528 (JSEvaluateScript): Null-check clientData before dereferencing it.
1529 * API/JSObjectRef.cpp:
1530 (JSObjectCallAsFunction): Ditto.
1532 2009-11-23 Gavin Barraclough <barraclough@apple.com>
1534 Reviewed by Geoff Garen.
1536 Part 1/3 of <rdar://problem/7377477> REGRESSION: Many web pages fail to render after interesting script runs in isolated world
1538 Some clients of the JavaScriptCore API expect to be able to make callbacks over the JSC API,
1539 and for this to automagically cause execution to take place in the world associated with the
1540 global object associated with the ExecState (JSContextRef) passed. However this is not how
1541 things work - the world must be explicitly set within WebCore.
1543 Making this work just for API calls to evaluate & call will be a far from perfect solution,
1544 since direct (non-API) use of JSC still relies on WebCore setting the current world correctly.
1545 A better solution would be to make this all work automagically all throughout WebCore, but this
1546 will require more refactoring.
1548 Since the API is in JSC but worlds only exist in WebCore, add callbacks on the JSGlobalData::ClientData
1549 to allow it to update the current world on entry/exit via the JSC API. This is temporary duck
1550 tape, and should be removed once the current world no longer needs to be explicitly tracked.
1554 * API/JSObjectRef.cpp:
1555 (JSObjectCallAsFunction):
1556 * JavaScriptCore.exp:
1557 * runtime/JSGlobalData.cpp:
1558 (JSC::JSGlobalData::ClientData::beginningExecution):
1559 (JSC::JSGlobalData::ClientData::completedExecution):
1560 * runtime/JSGlobalData.h:
1562 2009-11-23 Steve Block <steveblock@google.com>
1564 Reviewed by Dmitry Titov.
1566 Adds MainThreadAndroid.cpp with Android-specific WTF threading functions.
1567 https://bugs.webkit.org/show_bug.cgi?id=31807
1569 * wtf/android: Added.
1570 * wtf/android/MainThreadAndroid.cpp: Added.
1571 (WTF::timeoutFired):
1572 (WTF::initializeMainThreadPlatform):
1573 (WTF::scheduleDispatchFunctionsOnMainThread):
1575 2009-11-23 Alexey Proskuryakov <ap@apple.com>
1577 Reviewed by Brady Eidson.
1579 https://bugs.webkit.org/show_bug.cgi?id=31748
1580 Make WebSocketHandleCFNet respect proxy auto-configuration files via CFProxySupport
1582 * JavaScriptCore.exp: Export callOnMainThreadAndWait.
1584 2009-11-23 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1586 Reviewed by Kenneth Rohde Christiansen.
1588 [Symbian] Fix lastIndexOf() for Symbian
1589 https://bugs.webkit.org/show_bug.cgi?id=31773
1591 Symbian soft floating point library has problems with operators
1592 comparing NaN to numbers. Without a workaround lastIndexOf()
1593 function does not work.
1595 Patch developed by David Leong.
1597 * runtime/StringPrototype.cpp:
1598 (JSC::stringProtoFuncLastIndexOf):Add an extra test
1599 to check for NaN for Symbian.
1601 2009-11-23 Steve Block <steveblock@google.com>
1603 Reviewed by Eric Seidel.
1605 Android port lacks implementation of atomicIncrement and atomicDecrement.
1606 https://bugs.webkit.org/show_bug.cgi?id=31715
1608 * wtf/Threading.h: Modified.
1609 (WTF::atomicIncrement): Added Android implementation.
1610 (WTF::atomicDecrement): Added Android implementation.
1612 2009-11-22 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1616 [Qt] Sort source lists and remove obsolete comments
1617 from the build system.
1619 * JavaScriptCore.pri:
1621 2009-11-21 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1623 Reviewed by Eric Seidel.
1625 [Qt][Mac] Turn on multiple JavaScript threads for QtWebkit on Mac
1626 https://bugs.webkit.org/show_bug.cgi?id=31753
1630 2009-11-19 Steve Block <steveblock@google.com>
1632 Android port lacks configuration in Platform.h and config.h.
1633 https://bugs.webkit.org/show_bug.cgi?id=31671
1635 * wtf/Platform.h: Modified. Added Android-specific configuration.
1637 2009-11-19 Alexey Proskuryakov <ap@apple.com>
1639 Reviewed by Darin Adler.
1641 https://bugs.webkit.org/show_bug.cgi?id=31690
1642 Make SocketStreamHandleCFNet work on Windows
1644 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1645 * wtf/MainThread.cpp:
1646 (WTF::FunctionWithContext::FunctionWithContext):
1647 (WTF::dispatchFunctionsFromMainThread):
1648 (WTF::callOnMainThreadAndWait):
1650 Re-add callOnMainThreadAndWait(), which was removed in bug 23926.
1652 2009-11-19 Dmitry Titov <dimich@chromium.org>
1654 Reviewed by David Levin.
1656 isMainThread() on Chromium (Mac and Linux) is so slow it timeouts LayoutTests..
1657 https://bugs.webkit.org/show_bug.cgi?id=31693
1659 * wtf/ThreadingPthreads.cpp:
1660 (WTF::initializeThreading): grab and use the pthread_t of the main thread instead of ThreadIdentifier.
1661 (WTF::isMainThread): Ditto.
1663 2009-11-19 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1665 Reviewed by Darin Adler.
1667 Remove HAVE(STRING_H) guard from JavaScriptCore
1668 https://bugs.webkit.org/show_bug.cgi?id=31668
1671 * runtime/UString.cpp:
1673 2009-11-19 Dumitru Daniliuc <dumi@chromium.org>
1675 Reviewed by Dmitry Titov.
1677 Fixing a bug in MessageQueue::removeIf() that leads to an
1680 https://bugs.webkit.org/show_bug.cgi?id=31657
1682 * wtf/MessageQueue.h:
1683 (WTF::MessageQueue::removeIf):
1685 2009-11-19 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1687 Reviewed by Darin Adler.
1689 Remove HAVE(FLOAT_H) guard
1690 https://bugs.webkit.org/show_bug.cgi?id=31661
1692 JavaScriptCore has a dependency on float.h, there is
1693 no need to guard float.h.
1695 * runtime/DatePrototype.cpp: Remove include directive
1696 for float.h as it is included in MathExtras.h already.
1697 * runtime/Operations.cpp: Ditto.
1698 * runtime/UString.cpp: Ditto.
1699 * wtf/dtoa.cpp: Ditto.
1700 * wtf/MathExtras.h: Remove HAVE(FLOAT_H) guard.
1701 * wtf/Platform.h: Ditto.
1703 2009-11-19 Thiago Macieira <thiago.macieira@nokia.com>
1705 Reviewed by Simon Hausmann.
1707 Build fix for 32-bit Sparc machines: these machines are big-endian.
1711 2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1713 Reviewed by Kenneth Rohde Christiansen.
1715 [Qt] Remove support for Qt v4.3 or older versions
1716 https://bugs.webkit.org/show_bug.cgi?id=29469
1718 * JavaScriptCore.pro:
1720 * wtf/unicode/qt4/UnicodeQt4.h:
1722 2009-11-18 Kent Tamura <tkent@chromium.org>
1724 Reviewed by Darin Adler.
1726 Move UString::from(double) implementation to new
1727 WTF::doubleToStringInJavaScriptFormat(), and expose it because WebCore
1729 https://bugs.webkit.org/show_bug.cgi?id=31330
1731 - Introduce new function createRep(const char*, unsigned) and
1732 UString::UString(const char*, unsigned) to reduce 2 calls to strlen().
1733 - Fix a bug that dtoa() doesn't update *rve if the input value is NaN
1736 No new tests because this doesn't change the behavior.
1738 * JavaScriptCore.exp:
1739 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1740 * runtime/UString.cpp:
1742 (JSC::UString::UString):
1743 (JSC::UString::from): Move the code to doubleToStringInJavaScriptFormat().
1744 * runtime/UString.h:
1746 (WTF::dtoa): Fix a bug about rve.
1747 (WTF::append): A helper for doubleToStringInJavaScriptFormat().
1748 (WTF::doubleToStringInJavaScriptFormat): Move the code from UString::from(double).
1751 2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1753 Reviewed by Kenneth Rohde Christiansen.
1755 [Qt] Remove WTF_USE_JAVASCRIPTCORE_BINDINGS as it is no longer used
1756 https://bugs.webkit.org/show_bug.cgi?id=31643
1758 * JavaScriptCore.pro:
1760 2009-11-18 Nate Chapin <japhet@chromium.org>
1762 Reviewed by Darin Fisher.
1764 Remove Chromium's unnecessary dependency on wtf's tcmalloc files.
1766 https://bugs.webkit.org/show_bug.cgi?id=31648
1768 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1770 2009-11-18 Thiago Macieira <thiago.macieira@nokia.com>
1772 Reviewed by Gavin Barraclough.
1774 [Qt] Implement symbol hiding for JSC's JIT functions.
1776 These functions are implemented directly in assembly, so they need the
1777 proper directives to enable/disable visibility. On ELF systems, it's
1778 .hidden, whereas on Mach-O systems (Mac) it's .private_extern. On
1779 Windows, it's not necessary since you have to explicitly export. I
1780 also implemented the AIX idiom, though it's unlikely anyone will
1781 implement AIX/POWER JIT.
1782 https://bugs.webkit.org/show_bug.cgi?id=30864
1786 2009-11-18 Oliver Hunt <oliver@apple.com>
1788 Reviewed by Alexey Proskuryakov.
1790 Interpreter may do an out of range access when throwing an exception in the profiler.
1791 https://bugs.webkit.org/show_bug.cgi?id=31635
1795 * interpreter/Interpreter.cpp:
1796 (JSC::Interpreter::throwException):
1798 2009-11-18 Gabor Loki <loki@inf.u-szeged.hu>
1800 Reviewed by Darin Adler.
1802 Fix the clobber list of cacheFlush for ARM and Thumb2 on Linux
1803 https://bugs.webkit.org/show_bug.cgi?id=31631
1805 * jit/ExecutableAllocator.h:
1806 (JSC::ExecutableAllocator::cacheFlush):
1808 2009-11-18 Harald Fernengel <harald.fernengel@nokia.com>
1810 Reviewed by Simon Hausmann.
1812 [Qt] Fix detection of linux-g++
1814 Never use "linux-g++*" to check for linux-g++, since this will break embedded
1815 builds which use linux-arm-g++ and friends. Use 'linux*-g++*' to check for any
1816 g++ on linux mkspec.
1818 * JavaScriptCore.pri:
1820 2009-11-17 Jon Honeycutt <jhoneycutt@apple.com>
1822 Add JSContextRefPrivate.h to list of copied files.
1824 Reviewed by Mark Rowe.
1826 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
1828 2009-11-17 Martin Robinson <martin.james.robinson@gmail.com>
1830 Reviewed by Adam Barth.
1832 [GTK] Style cleanup for GOwnPtr
1833 https://bugs.webkit.org/show_bug.cgi?id=31506
1835 Remove forward declaration in GOwnPtr and do some style cleanup.
1839 (WTF::GOwnPtr::GOwnPtr):
1840 (WTF::GOwnPtr::~GOwnPtr):
1841 (WTF::GOwnPtr::get):
1842 (WTF::GOwnPtr::release):
1843 (WTF::GOwnPtr::outPtr):
1844 (WTF::GOwnPtr::set):
1845 (WTF::GOwnPtr::clear):
1846 (WTF::GOwnPtr::operator*):
1847 (WTF::GOwnPtr::operator->):
1848 (WTF::GOwnPtr::operator!):
1849 (WTF::GOwnPtr::operator UnspecifiedBoolType):
1850 (WTF::GOwnPtr::swap):
1855 (WTF::freeOwnedGPtr):
1857 2009-11-17 Oliver Hunt <oliver@apple.com>
1859 Reviewed by Maciej Stachowiak.
1861 Incorrect use of JavaScriptCore API in DumpRenderTree
1862 https://bugs.webkit.org/show_bug.cgi?id=31577
1864 Add assertions to the 'toJS' functions to catch mistakes like
1865 this early. Restructure existing code which blindly passed potentially
1866 null values to toJS when forwarding exceptions so that a null check is
1872 * API/JSCallbackObjectFunctions.h:
1873 (JSC::::getOwnPropertySlot):
1875 (JSC::::deleteProperty):
1877 (JSC::::hasInstance):
1881 (JSC::::staticValueGetter):
1882 (JSC::::callbackGetter):
1883 * API/tests/testapi.c: Fix errors in the API tester.
1884 (MyObject_getProperty):
1885 (MyObject_convertToType):
1886 (EvilExceptionObject_convertToType):
1888 2009-11-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
1890 Reviewed by Gavin Barraclough.
1892 https://bugs.webkit.org/show_bug.cgi?id=31050
1894 Minor fixes for JSVALUE32_64: branchConvertDoubleToInt32
1895 failed on a CortexA8 CPU, but not on a simulator; and
1896 JITCall.cpp modifications was somehow not committed to mainline.
1898 * assembler/ARMAssembler.h:
1899 (JSC::ARMAssembler::fmrs_r):
1900 * assembler/MacroAssemblerARM.h:
1901 (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
1903 (JSC::JIT::compileOpCall):
1905 2009-11-16 Joerg Bornemann <joerg.bornemann@trolltech.com>
1907 Reviewed by Simon Hausmann.
1909 Fix Qt build on Windows CE 6.
1911 * JavaScriptCore.pri: Add missing include path.
1912 * wtf/Platform.h: Include ce_time.h for Windows CE 6.
1914 2009-11-13 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
1916 Reviewed by Gavin Barraclough.
1918 https://bugs.webkit.org/show_bug.cgi?id=31050
1920 Adding optimization support for mode JSVALUE32_64
1925 (JSC::JIT::compileOpCall):
1926 * jit/JITPropertyAccess.cpp:
1927 (JSC::JIT::emit_op_method_check):
1928 (JSC::JIT::compileGetByIdHotPath):
1929 (JSC::JIT::compileGetByIdSlowCase):
1930 (JSC::JIT::emit_op_put_by_id):
1932 2009-11-14 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
1934 Reviewed by Gavin Barraclough.
1936 https://bugs.webkit.org/show_bug.cgi?id=31050
1938 Adding JSVALUE32_64 support for ARM (but not turning it
1939 on by default). All optimizations must be disabled, since
1940 this patch is only the first of a series of patches.
1942 During the work, a lot of x86 specific code revealed and
1943 made platform independent.
1944 See revisions: 50531 50541 50593 50594 50595
1946 * assembler/ARMAssembler.h:
1947 (JSC::ARMAssembler::):
1948 (JSC::ARMAssembler::fdivd_r):
1949 * assembler/MacroAssemblerARM.h:
1950 (JSC::MacroAssemblerARM::lshift32):
1951 (JSC::MacroAssemblerARM::neg32):
1952 (JSC::MacroAssemblerARM::rshift32):
1953 (JSC::MacroAssemblerARM::branchOr32):
1954 (JSC::MacroAssemblerARM::set8):
1955 (JSC::MacroAssemblerARM::setTest8):
1956 (JSC::MacroAssemblerARM::loadDouble):
1957 (JSC::MacroAssemblerARM::divDouble):
1958 (JSC::MacroAssemblerARM::convertInt32ToDouble):
1959 (JSC::MacroAssemblerARM::zeroDouble):
1962 * jit/JITOpcodes.cpp:
1963 (JSC::JIT::privateCompileCTIMachineTrampolines):
1965 * wtf/StdLibExtras.h:
1967 2009-11-13 Dominik Röttsches <dominik.roettsches@access-company.com>
1969 Reviewed by Eric Seidel.
1971 Unify TextBoundaries implementations by only relying on WTF Unicode abstractions
1972 https://bugs.webkit.org/show_bug.cgi?id=31468
1974 Adding isAlphanumeric abstraction, required
1975 by TextBoundaries.cpp.
1977 * wtf/unicode/glib/UnicodeGLib.h:
1978 (WTF::Unicode::isAlphanumeric):
1979 * wtf/unicode/icu/UnicodeIcu.h:
1980 (WTF::Unicode::isAlphanumeric):
1982 2009-11-13 Norbert Leser <norbert.leser&nokia.com>
1984 Reviewed by Eric Seidel.
1986 Added macros for USERINCLUDE paths within symbian blocks
1987 to guarantee inclusion of respective header files from local path
1988 first (to avoid clashes with same names of header files in system include path).
1990 * JavaScriptCore.pri:
1992 2009-11-13 Oliver Hunt <oliver@apple.com>
1994 Reviewed by Geoff Garen.
1996 JSValueProtect and JSValueUnprotect don't protect API wrapper values
1997 https://bugs.webkit.org/show_bug.cgi?id=31485
1999 Make JSValueProtect/Unprotect use a new 'toJS' function, 'toJSForGC' that
2000 does not attempt to to strip out API wrapper objects.
2004 * API/JSValueRef.cpp:
2007 * API/tests/testapi.c:
2008 (makeGlobalNumberValue):
2011 2009-11-13 İsmail Dönmez <ismail@namtrac.org>
2013 Reviewed by Antti Koivisto.
2015 Fix typo, ce_time.cpp should be ce_time.c
2017 * JavaScriptCore.pri:
2019 2009-11-12 Steve VanDeBogart <vandebo@chromium.org>
2021 Reviewed by Adam Barth.
2023 Calculate the time offset only if we were able to parse
2024 the date string. This saves an IPC in Chromium for
2025 invalid date strings.
2026 https://bugs.webkit.org/show_bug.cgi?id=31416
2029 (WTF::parseDateFromNullTerminatedCharacters):
2030 (JSC::parseDateFromNullTerminatedCharacters):
2032 2009-11-12 Oliver Hunt <oliver@apple.com>
2034 Rollout r50896 until i can work out why it causes failures.
2036 * bytecompiler/BytecodeGenerator.cpp:
2037 (JSC::BytecodeGenerator::emitReturn):
2038 * interpreter/Interpreter.cpp:
2039 (JSC::Interpreter::execute):
2041 (JSC::EvalNode::emitBytecode):
2043 2009-11-12 Steve Falkenburg <sfalken@apple.com>
2045 Reviewed by Stephanie Lewis.
2047 Remove LIBRARY directive from def file to fix Debug_All target.
2049 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2051 2009-11-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
2053 Rubber-stamped by Holger Freyther.
2055 Revert r50204, since it makes DRT crash on 32 bits release builds
2060 2009-11-12 Oliver Hunt <oliver@apple.com>
2062 Reviewed by Gavin Barraclough.
2064 Start unifying entry logic for function and eval code.
2066 Eval now uses a ret instruction to end execution, and sets up
2067 a callframe more in line with what we do for function entry.
2069 * bytecompiler/BytecodeGenerator.cpp:
2070 (JSC::BytecodeGenerator::emitReturn):
2071 * interpreter/Interpreter.cpp:
2072 (JSC::Interpreter::execute):
2074 (JSC::EvalNode::emitBytecode):
2076 2009-11-12 Richard Moe Gustavsen <richard.gustavsen@nokia.com>
2078 Reviewed by Kenneth Rohde Christiansen.
2080 [Qt] Disable pthread_setname_np.
2082 This allows Qt builds on Mac from 10.6 to run on earlier version
2083 where this symbol is not present.
2084 https://bugs.webkit.org/show_bug.cgi?id=31403
2088 2009-11-12 Thiago Macieira <thiago.macieira@nokia.com>
2090 Reviewed by Kenneth Rohde Christiansen.
2092 [Qt] Fix linking on Linux 32-bit.
2094 It was missing the ".text" directive at the top of the file,
2095 indicating that code would follow. Without it, the assembler created
2096 "NOTYPE" symbols, which would result in linker errors.
2097 https://bugs.webkit.org/show_bug.cgi?id=30863
2101 2009-11-11 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2103 Reviewed by Alexey Proskuryakov.
2105 Refactor multiple JavaScriptCore threads
2106 https://bugs.webkit.org/show_bug.cgi?id=31328
2108 Remove the id field from the PlatformThread structure
2111 * runtime/Collector.cpp:
2112 (JSC::getCurrentPlatformThread):
2113 (JSC::suspendThread):
2114 (JSC::resumeThread):
2115 (JSC::getPlatformThreadRegisters):
2117 2009-11-10 Geoffrey Garen <ggaren@apple.com>
2119 Linux build fix: Added an #include for UINT_MAX.
2121 * runtime/WeakRandom.h:
2123 2009-11-10 Geoffrey Garen <ggaren@apple.com>
2125 JavaScriptGlue build fix: Marked a file 'private' instead of 'project'.
2127 * JavaScriptCore.xcodeproj/project.pbxproj:
2129 2009-11-10 Geoffrey Garen <ggaren@apple.com>
2131 Reviewed by Gavin "avGni arBalroguch" Barraclough.
2133 Faster Math.random, based on GameRand.
2135 SunSpider says 1.4% faster.
2138 * JavaScriptCore.gypi:
2139 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2140 * JavaScriptCore.xcodeproj/project.pbxproj: Added the header to the project.
2142 * runtime/JSGlobalData.cpp:
2143 (JSC::JSGlobalData::JSGlobalData):
2144 * runtime/JSGlobalData.h: Use an object to track random number generation
2145 state, initialized to the current time.
2147 * runtime/MathObject.cpp:
2148 (JSC::MathObject::MathObject):
2149 (JSC::mathProtoFuncRandom): Use the new hotness.
2151 * runtime/WeakRandom.h: Added.
2152 (JSC::WeakRandom::WeakRandom):
2153 (JSC::WeakRandom::get):
2154 (JSC::WeakRandom::advance): The new hotness.
2156 2009-11-09 Geoffrey Garen <ggaren@apple.com>
2158 Reviewed by Oliver Hunt.
2160 Imported the v8 DST cache.
2162 SunSpider says 1.5% faster.
2164 * runtime/JSGlobalData.cpp:
2165 (JSC::JSGlobalData::resetDateCache): Reset the DST cache when resetting
2168 * runtime/JSGlobalData.h:
2169 (JSC::DSTOffsetCache::DSTOffsetCache):
2170 (JSC::DSTOffsetCache::reset): Added a struct for the DST cache.
2173 (WTF::calculateDSTOffsetSimple):
2174 (WTF::calculateDSTOffset):
2175 (WTF::parseDateFromNullTerminatedCharacters):
2176 (JSC::getDSTOffset):
2177 (JSC::gregorianDateTimeToMS):
2178 (JSC::msToGregorianDateTime):
2179 (JSC::parseDateFromNullTerminatedCharacters):
2180 * wtf/DateMath.h: The imported code for probing and updating the cache.
2182 2009-11-09 Geoffrey Garen <ggaren@apple.com>
2184 Reviewed by Oliver Hunt.
2186 Fixed an edge case that could cause the engine not to notice a timezone
2189 No test because this case would require manual intervention to change
2190 the timezone during the test.
2192 SunSpider reports no change.
2194 * runtime/DateInstanceCache.h:
2195 (JSC::DateInstanceCache::DateInstanceCache):
2196 (JSC::DateInstanceCache::reset): Added a helper function for resetting
2197 this cache. Also, shrank the cache, since we'll be resetting it often.
2199 * runtime/JSGlobalData.cpp:
2200 (JSC::JSGlobalData::resetDateCache): Include resetting the DateInstanceCache
2201 in resetting Date data. (Otherwise, a cache hit could bypass a necessary
2202 timezone update check.)
2204 2009-11-09 Geoffrey Garen <ggaren@apple.com>
2206 Reviewed by Sam Weinig.
2208 Some manual inlining and constant propogation in Date code.
2210 SunSpider reports a 0.4% speedup on date-*, no overall speedup. Shark
2211 says some previously evident stalls are now gone.
2213 * runtime/DateConstructor.cpp:
2215 * runtime/DateConversion.cpp:
2217 (JSC::formatTimeUTC): Split formatTime into UTC and non-UTC variants.
2219 * runtime/DateConversion.h:
2220 * runtime/DateInstance.cpp:
2221 (JSC::DateInstance::calculateGregorianDateTime):
2222 (JSC::DateInstance::calculateGregorianDateTimeUTC):
2223 * runtime/DateInstance.h:
2224 (JSC::DateInstance::gregorianDateTime):
2225 (JSC::DateInstance::gregorianDateTimeUTC): Split gregorianDateTime into
2226 a UTC and non-UTC variant, and split each variant into a fast inline
2227 case and a slow out-of-line case.
2229 * runtime/DatePrototype.cpp:
2230 (JSC::formatLocaleDate):
2231 (JSC::dateProtoFuncToString):
2232 (JSC::dateProtoFuncToUTCString):
2233 (JSC::dateProtoFuncToISOString):
2234 (JSC::dateProtoFuncToDateString):
2235 (JSC::dateProtoFuncToTimeString):
2236 (JSC::dateProtoFuncGetFullYear):
2237 (JSC::dateProtoFuncGetUTCFullYear):
2238 (JSC::dateProtoFuncToGMTString):
2239 (JSC::dateProtoFuncGetMonth):
2240 (JSC::dateProtoFuncGetUTCMonth):
2241 (JSC::dateProtoFuncGetDate):
2242 (JSC::dateProtoFuncGetUTCDate):
2243 (JSC::dateProtoFuncGetDay):
2244 (JSC::dateProtoFuncGetUTCDay):
2245 (JSC::dateProtoFuncGetHours):
2246 (JSC::dateProtoFuncGetUTCHours):
2247 (JSC::dateProtoFuncGetMinutes):
2248 (JSC::dateProtoFuncGetUTCMinutes):
2249 (JSC::dateProtoFuncGetSeconds):
2250 (JSC::dateProtoFuncGetUTCSeconds):
2251 (JSC::dateProtoFuncGetTimezoneOffset):
2252 (JSC::setNewValueFromTimeArgs):
2253 (JSC::setNewValueFromDateArgs):
2254 (JSC::dateProtoFuncSetYear):
2255 (JSC::dateProtoFuncGetYear): Updated for the gregorianDateTime change above.
2257 2009-11-09 Geoffrey Garen <ggaren@apple.com>
2259 Build fix: export a new symbol.
2261 * JavaScriptCore.exp:
2262 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2264 2009-11-09 Geoffrey Garen <ggaren@apple.com>
2266 Reviewed by Sam "Home Wrecker" Weinig.
2268 Added a tiny cache for Date parsing.
2270 SunSpider says 1.2% faster.
2272 * runtime/DateConversion.cpp:
2273 (JSC::parseDate): Try to reuse the last parsed Date, if present.
2275 * runtime/JSGlobalData.cpp:
2276 (JSC::JSGlobalData::resetDateCache):
2277 * runtime/JSGlobalData.h: Added storage for last parsed Date. Refactored
2278 this code to make resetting the date cache easier.
2280 * runtime/JSGlobalObject.h:
2281 (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Updated for
2285 (JSC::parseDateFromNullTerminatedCharacters):
2286 * wtf/DateMath.h: Changed ExecState to be first parameter, as is the JSC custom.
2288 2009-11-09 Oliver Hunt <oliver@apple.com>
2290 Reviewed by Gavin Barraclough.
2292 Can cache prototype lookups on uncacheable dictionaries.
2293 https://bugs.webkit.org/show_bug.cgi?id=31198
2295 Replace fromDictionaryTransition with flattenDictionaryObject and
2296 flattenDictionaryStructure. This change is necessary as we need to
2297 guarantee that our attempt to convert away from a dictionary structure
2298 will definitely succeed, and in some cases this requires mutating the
2299 object storage itself.
2301 * interpreter/Interpreter.cpp:
2302 (JSC::Interpreter::tryCacheGetByID):
2304 (JSC::JITThunks::tryCacheGetByID):
2305 (JSC::DEFINE_STUB_FUNCTION):
2306 * runtime/BatchedTransitionOptimizer.h:
2307 (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
2308 * runtime/JSObject.h:
2309 (JSC::JSObject::flattenDictionaryObject):
2310 * runtime/Operations.h:
2311 (JSC::normalizePrototypeChain):
2312 * runtime/Structure.cpp:
2313 (JSC::Structure::flattenDictionaryStructure):
2314 (JSC::comparePropertyMapEntryIndices):
2315 * runtime/Structure.h:
2317 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2319 Not reviewed, build fix.
2321 Remove extra character from r50701.
2323 * JavaScriptCore.pri:
2325 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2327 Not reviewed, build fix.
2329 Revert r50695 because it broke QtWebKit (clean builds).
2331 * JavaScriptCore.pri:
2333 2009-11-09 Norbert Leser <norbert.leser@nokia.com>
2335 Reviewed by Kenneth Rohde Christiansen.
2337 Prepended $$PWD to GENERATED_SOURCES_DIR to avoid potential ambiguities when included from WebCore.pro.
2338 Some preprocessors consider this GENERATED_SOURCES_DIR relative to current invoking dir (e.g., ./WebCore),
2339 and not the working dir of JavaCriptCore.pri (i.e., ../JavaScriptCore/).
2341 * JavaScriptCore.pri:
2343 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2345 Reviewed by Kenneth Rohde Christiansen.
2347 Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
2348 https://bugs.webkit.org/show_bug.cgi?id=31040
2350 * interpreter/Interpreter.cpp:
2351 (JSC::Interpreter::privateExecute):
2353 2009-11-08 David Levin <levin@chromium.org>
2355 Reviewed by NOBODY (speculative snow leopard and windows build fixes).
2358 (WTF::parseDateFromNullTerminatedCharacters):
2359 (JSC::gregorianDateTimeToMS):
2360 (JSC::msToGregorianDateTime):
2361 (JSC::parseDateFromNullTerminatedCharacters):
2363 (JSC::GregorianDateTime::GregorianDateTime):
2365 2009-11-08 David Levin <levin@chromium.org>
2367 Reviewed by NOBODY (chromium build fix).
2369 Hopefully, the last build fix.
2371 Create better separation in DateMath about the JSC
2372 and non-JSC portions. Also, only expose the non-JSC
2373 version in the exports.
2375 * JavaScriptCore.exp:
2376 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2378 (WTF::parseDateFromNullTerminatedCharacters):
2379 (JSC::getUTCOffset):
2380 (JSC::gregorianDateTimeToMS):
2381 (JSC::msToGregorianDateTime):
2382 (JSC::parseDateFromNullTerminatedCharacters):
2386 2009-11-08 David Levin <levin@chromium.org>
2388 Reviewed by NOBODY (chromium build fix).
2390 For the change in DateMath.
2395 2009-11-06 Geoffrey Garen <ggaren@apple.com>
2397 Windows build fix: export some symbols.
2399 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2401 2009-11-06 Geoffrey Garen <ggaren@apple.com>
2403 Build fix: updated export file.
2405 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2407 2009-11-06 Geoffrey Garen <ggaren@apple.com>
2409 Build fix: added some #includes.
2411 * wtf/CurrentTime.h:
2414 2009-11-06 Geoffrey Garen <ggaren@apple.com>
2416 Reviewed by Oliver Hunt.
2418 https://bugs.webkit.org/show_bug.cgi?id=31197
2419 Implemented a timezone cache not based on Mac OS X's notify_check API.
2421 If the VM calculates the local timezone offset from UTC, it caches the
2422 result until the end of the current VM invocation. (We don't want to cache
2423 forever, because the user's timezone may change over time.)
2425 This removes notify_* overhead on Mac, and, more significantly, removes
2426 OS time and date call overhead on non-Mac platforms.
2428 ~8% speedup on Date microbenchmark on Mac. SunSpider reports maybe a tiny
2429 speedup on Mac. (Speedup on non-Mac platforms should be even more noticeable.)
2431 * JavaScriptCore.exp:
2433 * interpreter/CachedCall.h:
2434 (JSC::CachedCall::CachedCall):
2435 * interpreter/Interpreter.cpp:
2436 (JSC::Interpreter::execute):
2437 * runtime/JSGlobalObject.h:
2438 (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Made the
2439 DynamicGlobalObjectScope constructor responsible for checking whether a
2440 dynamicGlobalObject has already been set. This eliminated some duplicate
2441 client code, and allowed me to avoid adding even more duplicate client
2442 code. Made DynamicGlobalObjectScope responsible for resetting the
2443 local timezone cache upon first entry to the VM.
2445 * runtime/DateConstructor.cpp:
2446 (JSC::constructDate):
2450 * runtime/DateConversion.cpp:
2452 * runtime/DateConversion.h:
2453 * runtime/DateInstance.cpp:
2454 (JSC::DateInstance::gregorianDateTime):
2455 * runtime/DateInstance.h:
2456 * runtime/DateInstanceCache.h:
2457 * runtime/DatePrototype.cpp:
2458 (JSC::setNewValueFromTimeArgs):
2459 (JSC::setNewValueFromDateArgs):
2460 (JSC::dateProtoFuncSetYear):
2461 * runtime/InitializeThreading.cpp:
2462 (JSC::initializeThreadingOnce):
2463 * runtime/JSGlobalData.cpp:
2464 (JSC::JSGlobalData::JSGlobalData):
2465 * runtime/JSGlobalData.h:
2467 (WTF::getCurrentUTCTime):
2468 (WTF::getCurrentUTCTimeWithMicroseconds):
2469 (WTF::getLocalTime):
2470 (JSC::getUTCOffset): Use the new cache. Also, see below.
2471 (JSC::gregorianDateTimeToMS):
2472 (JSC::msToGregorianDateTime):
2473 (JSC::initializeDates):
2474 (JSC::parseDateFromNullTerminatedCharacters): Simplified the way this function
2475 accounts for the local timezone offset, to accomodate our new caching API,
2476 and a (possibly misguided) caller in WebCore. Also, see below.
2478 (JSC::GregorianDateTime::GregorianDateTime): Moved most of the code in
2479 DateMath.* into the JSC namespace. The code needed to move so it could
2480 naturally interact with ExecState and JSGlobalData to support caching.
2481 Logically, it seemed right to move it, too, since this code is not really
2482 as low-level as the WTF namespace might imply -- it implements a set of
2483 date parsing and conversion quirks that are finely tuned to the JavaScript
2484 language. Also removed the Mac OS X notify_* infrastructure.
2486 * wtf/CurrentTime.h:
2487 (WTF::currentTimeMS):
2488 (WTF::getLocalTime): Moved the rest of the DateMath code here, and renamed
2489 it to make it consistent with WTF's currentTime function.
2491 2009-11-06 Gabor Loki <loki@inf.u-szeged.hu>
2493 Unreviewed trivial buildfix after r50595.
2495 Rename the remaining rshiftPtr calls to rshift32
2497 * jit/JITArithmetic.cpp:
2498 (JSC::JIT::emit_op_rshift):
2499 * jit/JITInlineMethods.h:
2500 (JSC::JIT::emitFastArithImmToInt):
2502 2009-11-06 Gavin Barraclough <barraclough@apple.com>
2504 Reviewed by Oliver Hunt.
2506 Tidy up the shift methods on the macro-assembler interface.
2508 Currently behaviour of shifts of a magnitude > 0x1f is undefined.
2509 Instead defined that all shifts are masked to this range. This makes a lot of
2510 practical sense, both since having undefined behaviour is not particularly
2511 desirable, and because this behaviour is commonly required (particularly since
2512 it is required bt ECMA-262 for shifts).
2514 Update the ARM assemblers to provide this behaviour. Remove (now) redundant
2515 masks from JITArithmetic, and remove rshiftPtr (this was used in case that
2516 could be rewritten in a simpler form using rshift32, only optimized JSVALUE32
2517 on x86-64, which uses JSVALUE64!)
2519 * assembler/MacroAssembler.h:
2520 * assembler/MacroAssemblerARM.h:
2521 (JSC::MacroAssemblerARM::lshift32):
2522 (JSC::MacroAssemblerARM::rshift32):
2523 * assembler/MacroAssemblerARMv7.h:
2524 (JSC::MacroAssemblerARMv7::lshift32):
2525 (JSC::MacroAssemblerARMv7::rshift32):
2526 * assembler/MacroAssemblerX86_64.h:
2527 * jit/JITArithmetic.cpp:
2528 (JSC::JIT::emit_op_lshift):
2529 (JSC::JIT::emit_op_rshift):
2531 2009-11-05 Gavin Barraclough <barraclough@apple.com>
2533 Rubber Stamped by Oliver Hunt.
2535 Remove a magic number (1) from the JIT, instead compute the value with OBJECT_OFFSET.
2537 * jit/JITInlineMethods.h:
2538 (JSC::JIT::emitPutJITStubArg):
2539 (JSC::JIT::emitPutJITStubArgConstant):
2540 (JSC::JIT::emitGetJITStubArg):
2541 (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
2542 * jit/JITStubCall.h:
2543 (JSC::JITStubCall::JITStubCall):
2544 (JSC::JITStubCall::getArgument):
2547 2009-11-05 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
2549 Reviewed by Gavin Barraclough.
2551 https://bugs.webkit.org/show_bug.cgi?id=31159
2552 Fix branchDouble behaviour on ARM THUMB2 JIT.
2554 The x86 branchDouble behaviour is reworked, and all JIT
2555 ports should follow the x86 port. See bug 31104 and 31151
2557 This patch contains a fix for the traditional ARM port
2559 * assembler/ARMAssembler.h:
2560 (JSC::ARMAssembler::):
2561 (JSC::ARMAssembler::fmrs_r):
2562 (JSC::ARMAssembler::ftosid_r):
2563 * assembler/MacroAssemblerARM.h:
2564 (JSC::MacroAssemblerARM::):
2565 (JSC::MacroAssemblerARM::branchDouble):
2566 (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
2568 2009-11-05 Chris Jerdonek <chris.jerdonek@gmail.com>
2570 Reviewed by Eric Seidel.
2572 Removed the "this is part of the KDE project" comments from
2573 all *.h, *.cpp, *.idl, and *.pm files.
2575 https://bugs.webkit.org/show_bug.cgi?id=31167
2577 The maintenance and architecture page in the project wiki lists
2580 This change includes no changes or additions to test cases
2581 since the change affects only comments.
2583 * wtf/wince/FastMallocWince.h:
2585 2009-11-05 Gabor Loki <loki@inf.u-szeged.hu>
2587 Reviewed by Gavin Barraclough.
2589 Use ARMv7 specific encoding for immediate constants on ARMv7 target
2590 https://bugs.webkit.org/show_bug.cgi?id=31060
2592 * assembler/ARMAssembler.cpp:
2593 (JSC::ARMAssembler::getOp2): Use INVALID_IMM
2594 (JSC::ARMAssembler::getImm): Use encodeComplexImm for complex immediate
2595 (JSC::ARMAssembler::moveImm): Ditto.
2596 (JSC::ARMAssembler::encodeComplexImm): Encode a constant by one or two
2597 instructions or a PC relative load.
2598 * assembler/ARMAssembler.h: Use INVALID_IMM if a constant cannot be
2599 encoded as an immediate constant.
2600 (JSC::ARMAssembler::):
2601 (JSC::ARMAssembler::movw_r): 16-bit immediate load
2602 (JSC::ARMAssembler::movt_r): High halfword 16-bit immediate load
2603 (JSC::ARMAssembler::getImm16Op2): Encode immediate constant for
2606 2009-11-04 Mark Mentovai <mark@chromium.org>
2608 Reviewed by Mark Rowe.
2610 Provide TARGETING_TIGER and TARGETING_LEOPARD as analogues to
2611 BUILDING_ON_TIGER and BUILDING_ON_LEOPARD. The TARGETING_ macros
2612 consider the deployment target; the BUILDING_ON_ macros consider the
2613 headers being built against.
2617 2009-11-04 Gavin Barraclough <barraclough@apple.com>
2619 Reviewed by Oliver Hunt.
2621 https://bugs.webkit.org/show_bug.cgi?id=31151
2622 Fix branchDouble behaviour on ARM THUMB2 JIT.
2624 The ARMv7 JIT is currently using ARMv7Assembler::ConditionEQ to branch
2625 for DoubleEqualOrUnordered, however this is incorrect – ConditionEQ won't
2626 branch on unordered operands. Similarly, DoubleLessThanOrUnordered &
2627 DoubleLessThanOrEqualOrUnordered use ARMv7Assembler::ConditionLO &
2628 ARMv7Assembler::ConditionLS, whereas they should be using
2629 ARMv7Assembler::ConditionLT & ARMv7Assembler::ConditionLE.
2631 Fix these, and fill out the missing DoubleConditions.
2633 * assembler/MacroAssemblerARMv7.h:
2634 (JSC::MacroAssemblerARMv7::):
2635 (JSC::MacroAssemblerARMv7::branchDouble):
2637 2009-11-04 Gavin Barraclough <barraclough@apple.com>
2639 Rubber Stamped by Oliver Hunt.
2641 Enable native call optimizations on ARMv7. (Existing ARM_TRADITIONAL
2642 implementation was generic, worked perfectly, just needed turning on).
2644 * jit/JITOpcodes.cpp:
2647 2009-11-04 Gavin Barraclough <barraclough@apple.com>
2649 Rubber Stamped by Mark Rowe, Oliver Hunt, and Sam Weinig.
2651 Add a missing assert to the ARMv7 JIT.
2653 * assembler/ARMv7Assembler.h:
2654 (JSC::ARMThumbImmediate::ARMThumbImmediate):
2656 2009-11-04 Mark Rowe <mrowe@apple.com>
2658 Rubber-stamped by Oliver Hunt.
2660 Remove bogus op_ prefix on dumped version of three opcodes.
2662 * bytecode/CodeBlock.cpp:
2663 (JSC::CodeBlock::dump):
2665 2009-11-04 Mark Rowe <mrowe@apple.com>
2667 Reviewed by Sam Weinig.
2669 Fix dumping of constants in bytecode so that they aren't printed as large positive register numbers.
2671 We do this by having the registerName function return information about the constant if the register
2672 number corresponds to a constant. This requires that registerName, and several functions that call it,
2673 be converted to member functions of CodeBlock so that the constant value can be retrieved. The
2674 ExecState also needs to be threaded down through these functions so that it can be passed on to
2675 constantName when needed.
2677 * bytecode/CodeBlock.cpp:
2678 (JSC::constantName):
2679 (JSC::CodeBlock::registerName):
2680 (JSC::CodeBlock::printUnaryOp):
2681 (JSC::CodeBlock::printBinaryOp):
2682 (JSC::CodeBlock::printConditionalJump):
2683 (JSC::CodeBlock::printGetByIdOp):
2684 (JSC::CodeBlock::printPutByIdOp):
2685 (JSC::CodeBlock::dump):
2686 * bytecode/CodeBlock.h:
2687 (JSC::CodeBlock::isConstantRegisterIndex):
2689 2009-11-04 Pavel Heimlich <tropikhajma@gmail.com>
2691 Reviewed by Alexey Proskuryakov.
2693 https://bugs.webkit.org/show_bug.cgi?id=30647
2694 Solaris build failure due to strnstr.
2696 * wtf/StringExtras.h: Enable strnstr on Solaris, too.
2698 2009-11-04 Gavin Barraclough <barraclough@apple.com>
2700 Reviewed by Oliver Hunt.
2702 https://bugs.webkit.org/show_bug.cgi?id=31104
2703 Refactor x86-specific behaviour out of the JIT.
2705 - Add explicit double branch conditions for ordered and unordered comparisons (presently the brehaviour is a mix).
2706 - Refactor double to int conversion out into the MacroAssembler.
2707 - Remove broken double to int conversion for !JSVALUE32_64 builds - this code was broken and slowing us down, fixing it showed it not to be an improvement.
2708 - Remove exclusion of double to int conversion from (1 % X) cases in JSVALUE32_64 builds - if this was of benefit this is no longer the case; simplify.
2710 * assembler/MacroAssemblerARM.h:
2711 (JSC::MacroAssemblerARM::):
2712 * assembler/MacroAssemblerARMv7.h:
2713 (JSC::MacroAssemblerARMv7::):
2714 * assembler/MacroAssemblerX86Common.h:
2715 (JSC::MacroAssemblerX86Common::):
2716 (JSC::MacroAssemblerX86Common::convertInt32ToDouble):
2717 (JSC::MacroAssemblerX86Common::branchDouble):
2718 (JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32):
2719 * jit/JITArithmetic.cpp:
2720 (JSC::JIT::emitBinaryDoubleOp):
2721 (JSC::JIT::emit_op_div):
2722 (JSC::JIT::emitSlow_op_jnless):
2723 (JSC::JIT::emitSlow_op_jnlesseq):
2724 * jit/JITOpcodes.cpp:
2725 (JSC::JIT::emit_op_jfalse):
2727 2009-11-04 Mark Mentovai <mark@chromium.org>
2729 Reviewed by Eric Seidel.
2731 Remove BUILDING_ON_LEOPARD from JavaScriptCore.gyp. This is supposed
2732 to be set as needed only in wtf/Platform.h.
2734 * JavaScriptCore.gyp/JavaScriptCore.gyp:
2736 2009-11-02 Oliver Hunt <oliver@apple.com>
2738 Reviewed by Gavin Barraclough.
2740 REGRESSION (r48573): JSC may incorrectly cache chain lookups with a dictionary at the head of the chain
2741 https://bugs.webkit.org/show_bug.cgi?id=31045
2743 Add guards to prevent caching of prototype chain lookups with dictionaries at the
2744 head of the chain. Also add a few tighter assertions to cached prototype lookups
2745 to catch this in future.
2747 * interpreter/Interpreter.cpp:
2748 (JSC::Interpreter::tryCacheGetByID):
2749 (JSC::Interpreter::privateExecute):
2751 (JSC::JITThunks::tryCacheGetByID):
2753 2009-11-02 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2755 Reviewed by Darin Adler.
2757 PLATFORM(CF) should be set when building for Qt on Darwin
2758 https://bugs.webkit.org/show_bug.cgi?id=23671
2760 * wtf/Platform.h: Turn on CF support if both QT and DARWIN
2761 platforms are defined.
2763 2009-11-02 Dmitry Titov <dimich@chromium.org>
2765 Reviewed by David Levin.
2767 Remove threadsafe refcounting from tasks used with WTF::MessageQueue.
2768 https://bugs.webkit.org/show_bug.cgi?id=30612
2770 * wtf/MessageQueue.h:
2771 (WTF::MessageQueue::alwaysTruePredicate):
2772 (WTF::MessageQueue::~MessageQueue):
2773 (WTF::MessageQueue::append):
2774 (WTF::MessageQueue::appendAndCheckEmpty):
2775 (WTF::MessageQueue::prepend):
2776 (WTF::MessageQueue::waitForMessage):
2777 (WTF::MessageQueue::waitForMessageFilteredWithTimeout):
2778 (WTF::MessageQueue::tryGetMessage):
2779 (WTF::MessageQueue::removeIf):
2780 The MessageQueue is changed to act as a queue of OwnPtr<DataType>. It takes ownership
2781 of posted tasks and passes it to the new owner (in another thread) when the task is fetched.
2782 All methods have arguments of type PassOwnPtr<DataType> and return the same type.
2784 * wtf/Threading.cpp:
2785 (WTF::createThread):
2786 Superficial change to trigger rebuild of JSC project on Windows,
2787 workaround for https://bugs.webkit.org/show_bug.cgi?id=30890
2789 2009-10-30 Geoffrey Garen <ggaren@apple.com>
2791 Reviewed by Oliver Hunt.
2793 Fixed failing layout test: restore a special case I accidentally deleted.
2795 * runtime/DatePrototype.cpp:
2796 (JSC::setNewValueFromDateArgs): In the case of applying a change to a date
2797 that is NaN, reset the date to 0 *and* then apply the change; don't just
2798 reset the date to 0.
2800 2009-10-30 Geoffrey Garen <ggaren@apple.com>
2802 Windows build fix: update for object-to-pointer change.
2804 * runtime/DatePrototype.cpp:
2805 (JSC::formatLocaleDate):
2807 2009-10-29 Geoffrey Garen <ggaren@apple.com>
2809 Reviewed by Darin Adler.
2811 https://bugs.webkit.org/show_bug.cgi?id=30942
2812 Use pointers instead of copies to pass GregorianDateTime objects around.
2814 SunSpider reports a shocking 4.5% speedup on date-format-xparb, and 1.3%
2815 speedup on date-format-tofte.
2817 * runtime/DateInstance.cpp:
2818 (JSC::DateInstance::gregorianDateTime):
2819 * runtime/DateInstance.h:
2820 * runtime/DatePrototype.cpp:
2821 (JSC::formatLocaleDate):
2822 (JSC::dateProtoFuncToString):
2823 (JSC::dateProtoFuncToUTCString):
2824 (JSC::dateProtoFuncToISOString):
2825 (JSC::dateProtoFuncToDateString):
2826 (JSC::dateProtoFuncToTimeString):
2827 (JSC::dateProtoFuncGetFullYear):
2828 (JSC::dateProtoFuncGetUTCFullYear):
2829 (JSC::dateProtoFuncToGMTString):
2830 (JSC::dateProtoFuncGetMonth):
2831 (JSC::dateProtoFuncGetUTCMonth):
2832 (JSC::dateProtoFuncGetDate):
2833 (JSC::dateProtoFuncGetUTCDate):
2834 (JSC::dateProtoFuncGetDay):
2835 (JSC::dateProtoFuncGetUTCDay):
2836 (JSC::dateProtoFuncGetHours):
2837 (JSC::dateProtoFuncGetUTCHours):
2838 (JSC::dateProtoFuncGetMinutes):
2839 (JSC::dateProtoFuncGetUTCMinutes):
2840 (JSC::dateProtoFuncGetSeconds):
2841 (JSC::dateProtoFuncGetUTCSeconds):
2842 (JSC::dateProtoFuncGetTimezoneOffset):
2843 (JSC::setNewValueFromTimeArgs):
2844 (JSC::setNewValueFromDateArgs):
2845 (JSC::dateProtoFuncSetYear):
2846 (JSC::dateProtoFuncGetYear): Renamed getGregorianDateTime to gregorianDateTime,
2847 since it no longer has an out parameter. Uses 0 to indicate invalid dates.
2849 2009-10-30 Zoltan Horvath <zoltan@webkit.org>
2851 Reviewed by Darin Adler.
2853 Allow custom memory allocation control for JavaScriptCore's ListHashSet
2854 https://bugs.webkit.org/show_bug.cgi?id=30853
2856 Inherits ListHashSet class from FastAllocBase because it is
2857 instantiated by 'new' in WebCore/rendering/RenderBlock.cpp:1813.
2859 * wtf/ListHashSet.h:
2861 2009-10-30 Oliver Hunt <oliver@apple.com>
2863 Reviewed by Gavin Barraclough.
2865 Regression: crash enumerating properties of an object with getters or setters
2866 https://bugs.webkit.org/show_bug.cgi?id=30948
2868 Add a guard to prevent us trying to cache property enumeration on
2869 objects with getters or setters.
2871 * runtime/JSPropertyNameIterator.cpp:
2872 (JSC::JSPropertyNameIterator::create):
2874 2009-10-30 Roland Steiner <rolandsteiner@chromium.org>
2876 Reviewed by Eric Seidel.
2878 Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak.
2880 Bug 28420 - Implement HTML5 <ruby> rendering
2881 (https://bugs.webkit.org/show_bug.cgi?id=28420)
2883 No new tests (no functional change).
2885 * Configurations/FeatureDefines.xcconfig:
2887 2009-10-29 Oliver Hunt <oliver@apple.com>
2889 Reviewed by Maciej Stachowiak.
2891 REGRESSION (r50218-r50262): E*TRADE accounts page is missing content
2892 https://bugs.webkit.org/show_bug.cgi?id=30947
2893 <rdar://problem/7348833>
2895 The logic for flagging that a structure has non-enumerable properties
2896 was in addPropertyWithoutTransition, rather than in the core Structure::put
2897 method. Despite this I was unable to produce a testcase that caused
2898 the failure that etrade was experiencing, but the new assertion in
2899 getEnumerablePropertyNames triggers on numerous layout tests without
2900 the fix, so in effecti all for..in enumeration in any test ends up
2901 doing the required consistency check.
2903 * runtime/Structure.cpp:
2904 (JSC::Structure::addPropertyWithoutTransition):
2905 (JSC::Structure::put):
2906 (JSC::Structure::getEnumerablePropertyNames):
2907 (JSC::Structure::checkConsistency):
2909 2009-10-29 Gabor Loki <loki@inf.u-szeged.hu>
2911 Reviewed by Gavin Barraclough.
2913 Add cacheFlush support for Thumb-2 on Linux
2914 https://bugs.webkit.org/show_bug.cgi?id=30865
2916 * jit/ExecutableAllocator.h:
2917 (JSC::ExecutableAllocator::cacheFlush):
2919 2009-10-28 Gavin Barraclough <barraclough@apple.com>
2921 Reviewed by Oliver Hunt.
2923 JSC JIT on ARMv7 cannot link jumps >16Mb range
2924 https://bugs.webkit.org/show_bug.cgi?id=30891
2926 Start planing all relative jumps as move-32-bit-immediate-to-register-BX.
2927 In the cases where the jump would fall within a relative jump range, use a relative jump.
2929 * JavaScriptCore.xcodeproj/project.pbxproj:
2930 * assembler/ARMv7Assembler.h:
2931 (JSC::ARMv7Assembler::~ARMv7Assembler):
2932 (JSC::ARMv7Assembler::LinkRecord::LinkRecord):
2933 (JSC::ARMv7Assembler::):
2934 (JSC::ARMv7Assembler::executableCopy):
2935 (JSC::ARMv7Assembler::linkJump):
2936 (JSC::ARMv7Assembler::relinkJump):
2937 (JSC::ARMv7Assembler::setInt32):
2938 (JSC::ARMv7Assembler::isB):
2939 (JSC::ARMv7Assembler::isBX):
2940 (JSC::ARMv7Assembler::isMOV_imm_T3):
2941 (JSC::ARMv7Assembler::isMOVT):
2942 (JSC::ARMv7Assembler::isNOP_T1):
2943 (JSC::ARMv7Assembler::isNOP_T2):
2944 (JSC::ARMv7Assembler::linkJumpAbsolute):
2945 (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmFirst):
2946 (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmSecond):
2947 (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp5i6Imm4Reg4EncodedImm):
2948 * assembler/MacroAssemblerARMv7.h:
2949 (JSC::MacroAssemblerARMv7::makeJump):
2950 (JSC::MacroAssemblerARMv7::makeBranch):
2954 2009-10-28 Oliver Hunt <oliver@apple.com>
2956 Reviewed by Geoff Garen.
2958 Improve for..in enumeration performance
2959 https://bugs.webkit.org/show_bug.cgi?id=30887
2961 Improve indexing of an object with a for..in iterator by
2962 identifying cases where get_by_val is being used with a iterator
2963 as the subscript and replace it with a new get_by_pname
2964 bytecode. get_by_pname then optimizes lookups that directly access
2967 * bytecode/CodeBlock.cpp:
2968 (JSC::CodeBlock::dump):
2969 * bytecode/Opcode.h:
2970 * bytecompiler/BytecodeGenerator.cpp:
2971 (JSC::BytecodeGenerator::emitGetByVal):
2972 * bytecompiler/BytecodeGenerator.h:
2973 (JSC::BytecodeGenerator::pushOptimisedForIn):
2974 (JSC::BytecodeGenerator::popOptimisedForIn):
2975 * interpreter/Interpreter.cpp:
2976 (JSC::Interpreter::privateExecute):
2978 (JSC::JIT::privateCompileMainPass):
2979 (JSC::JIT::privateCompileSlowCases):
2981 * jit/JITPropertyAccess.cpp:
2982 (JSC::JIT::compileGetDirectOffset):
2983 (JSC::JIT::emit_op_get_by_pname):
2984 (JSC::JIT::emitSlow_op_get_by_pname):
2986 (JSC::ForInNode::emitBytecode):
2987 * runtime/JSObject.h:
2988 * runtime/JSPropertyNameIterator.cpp:
2989 (JSC::JSPropertyNameIterator::create):
2990 * runtime/JSPropertyNameIterator.h:
2991 (JSC::JSPropertyNameIterator::getOffset):
2992 (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
2993 * runtime/JSValue.h:
2995 * runtime/Structure.cpp:
2996 (JSC::Structure::addPropertyTransition):
2997 (JSC::Structure::changePrototypeTransition):
2998 (JSC::Structure::despecifyFunctionTransition):
2999 (JSC::Structure::addAnonymousSlotsTransition):
3000 (JSC::Structure::getterSetterTransition):
3001 (JSC::Structure::toDictionaryTransition):
3002 (JSC::Structure::addPropertyWithoutTransition):
3003 Track the existence (or not) of non-enumerable properties.
3004 * runtime/Structure.h:
3005 (JSC::Structure::propertyStorageCapacity):
3006 (JSC::Structure::propertyStorageSize):
3007 (JSC::Structure::hasNonEnumerableProperties):
3008 (JSC::Structure::hasAnonymousSlots):
3010 2009-10-28 Dmitry Titov <dimich@chromium.org>
3012 Not reviewed, attemp to fix Windows build.
3014 Touch the cpp file to cause recompile.
3016 * wtf/Threading.cpp:
3017 (WTF::threadEntryPoint):
3019 2009-10-28 Dmitry Titov <dimich@chromium.org>
3021 Reviewed by David Levin.
3023 https://bugs.webkit.org/show_bug.cgi?id=30805
3024 Add MessageQueue::removeIf(Predicate&) to remove certain tasks without pulling them from the queue.
3025 Existing Database tests cover this since Database removes tasks when it is stopped.
3027 * wtf/MessageQueue.h:
3030 2009-10-28 Afonso R. Costa Jr. <afonso.costa@openbossa.org>
3032 Reviewed by Oliver Hunt.
3034 [Qt] Enable YARR when YARR_JIT is enabled
3035 https://bugs.webkit.org/show_bug.cgi?id=30730
3037 When enabling or disabling JIT using JAVASCRIPTCORE_JIT, the ENABLE_YARR should
3040 * JavaScriptCore.pri:
3042 2009-10-24 Martin Robinson <martin.james.robinson@gmail.com>
3044 Reviewed by Oliver Hunt.
3046 Fix strict aliasing warning by switching reinterpret_cast to bitwise_cast.
3048 strict-aliasing warnings in JSFunction.h
3049 https://bugs.webkit.org/show_bug.cgi?id=27869
3051 * runtime/JSFunction.h:
3052 (JSC::JSFunction::nativeFunction):
3053 (JSC::JSFunction::scopeChain):
3054 (JSC::JSFunction::setScopeChain):
3055 (JSC::JSFunction::setNativeFunction):
3057 2009-10-28 Jan-Arve Sæther <jan-arve.saether@nokia.com>
3059 Reviewed by Tor Arne Vestbø.
3061 Build-fix for 64-bit Windows
3063 * wtf/Platform.h: Make sure to use WTF_USE_JSVALUE64
3065 2009-10-28 Gavin Barraclough <barraclough@apple.com>
3067 Reviewed by NOBODY (build fix!).
3071 2009-10-26 Holger Hans Peter Freyther <zecke@selfish.org>
3073 Rubber-stamped by Darin Adler.
3075 Export fastMalloc, fastCalloc, fastRealloc and fastFree on GCC/Unix
3076 https://bugs.webkit.org/show_bug.cgi?id=30769
3078 When using -fvisibility=hidden to hide all internal symbols by default
3079 the malloc symbols will be hidden as well. For memory instrumentation
3080 it is needed to provide an instrumented version of these symbols and
3081 override the normal routines and by changing the visibility back to
3082 default this becomes possible.
3084 The only other solution would be to use system malloc instead of the
3085 TCmalloc implementation but this will not allow to analyze memory
3086 behavior with the default allocator.
3088 * wtf/FastMalloc.h: Define WTF_FAST_MALLOC_EXPORT for GCC and !darwin
3090 2009-10-27 Gavin Barraclough <barraclough@apple.com>
3092 Rubber Stamped by Samuel Q. Weinig.
3094 Make the asserts protecting the offsets in the JIT more descriptive.
3098 (JSC::JIT::compileOpCall):
3099 * jit/JITPropertyAccess.cpp:
3100 (JSC::JIT::emit_op_method_check):
3101 (JSC::JIT::compileGetByIdHotPath):
3102 (JSC::JIT::compileGetByIdSlowCase):
3103 (JSC::JIT::emit_op_put_by_id):
3105 2009-10-27 Geoffrey Garen <ggaren@apple.com>
3107 Reviewed by Sam Weinig.
3109 A little bit of refactoring in the date code.
3111 * JavaScriptCore.exp: Don't export this unused symbol.
3113 * runtime/DateConstructor.cpp:
3114 (JSC::constructDate):
3116 * runtime/DateInstance.cpp:
3117 (JSC::DateInstance::DateInstance):
3118 * runtime/DateInstance.h: Removed some unused functions. Changed the default
3119 constructor to ensure that a DateInstance is always initialized.
3121 * runtime/DatePrototype.cpp:
3122 (JSC::DatePrototype::DatePrototype): Pass an initializer to our constructor,
3123 since it now requires one.
3126 (WTF::msToGregorianDateTime): Only compute our offset from UTC if our
3127 output will require it. Otherwise, our offset is 0.
3129 2009-10-27 Geoffrey Garen <ggaren@apple.com>
3131 Build fix: Mark DateInstaceCache.h private, so other frameworks can see it.
3133 * JavaScriptCore.xcodeproj/project.pbxproj:
3135 2009-10-27 Geoffrey Garen <ggaren@apple.com>
3137 Build fix: re-readded this file.
3139 * runtime/DateInstanceCache.h: Added.
3140 (JSC::DateInstanceData::create):
3141 (JSC::DateInstanceData::DateInstanceData):
3142 (JSC::DateInstanceCache::DateInstanceCache):
3143 (JSC::DateInstanceCache::add):
3144 (JSC::DateInstanceCache::lookup):
3146 2009-10-27 Geoffrey Garen <ggaren@apple.com>
3148 Reviewed by Darin Adler and Oliver Hunt.
3150 https://bugs.webkit.org/show_bug.cgi?id=30800
3151 Cache recently computed date data.
3153 SunSpider reports a ~0.5% speedup, mostly from date-format-tofte.js.
3156 * JavaScriptCore.gypi:
3157 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3158 * JavaScriptCore.xcodeproj/project.pbxproj: Added new file.
3160 * runtime/DateInstance.cpp:
3161 (JSC::DateInstance::DateInstance):
3162 (JSC::DateInstance::getGregorianDateTime): Use the shared cache.
3164 * runtime/DateInstance.h: Renamed m_cache to m_data, to avoid the confusion
3167 * runtime/DatePrototype.cpp:
3168 (JSC::formatLocaleDate):
3169 (JSC::dateProtoFuncToString):
3170 (JSC::dateProtoFuncToUTCString):
3171 (JSC::dateProtoFuncToISOString):
3172 (JSC::dateProtoFuncToDateString):
3173 (JSC::dateProtoFuncToTimeString):
3174 (JSC::dateProtoFuncGetFullYear):
3175 (JSC::dateProtoFuncGetUTCFullYear):
3176 (JSC::dateProtoFuncToGMTString):
3177 (JSC::dateProtoFuncGetMonth):
3178 (JSC::dateProtoFuncGetUTCMonth):
3179 (JSC::dateProtoFuncGetDate):
3180 (JSC::dateProtoFuncGetUTCDate):
3181 (JSC::dateProtoFuncGetDay):
3182 (JSC::dateProtoFuncGetUTCDay):
3183 (JSC::dateProtoFuncGetHours):
3184 (JSC::dateProtoFuncGetUTCHours):
3185 (JSC::dateProtoFuncGetMinutes):
3186 (JSC::dateProtoFuncGetUTCMinutes):
3187 (JSC::dateProtoFuncGetSeconds):
3188 (JSC::dateProtoFuncGetUTCSeconds):
3189 (JSC::dateProtoFuncGetTimezoneOffset):
3190 (JSC::setNewValueFromTimeArgs):
3191 (JSC::setNewValueFromDateArgs):
3192 (JSC::dateProtoFuncSetYear):
3193 (JSC::dateProtoFuncGetYear): Pass an ExecState to these functions, so they
3194 can access the DateInstanceCache.
3196 * runtime/JSGlobalData.h: Keep a DateInstanceCache.
3198 2009-10-27 James Robinson <jamesr@chromium.org>
3200 Reviewed by Darin Fisher.
3202 Ensures that JavaScriptCore/wtf/CurrentTime.cpp is not built in PLATFORM(CHROMIUM) builds.
3204 Chromium uses a different method to calculate the current time than is used in
3205 JavaScriptCore/wtf/CurrentTime.cpp. This can lead to time skew when calls to currentTime() and Chromium's time
3206 function are mixed. In particular, timers can get scheduled in the past which leads to 100% CPU use.
3207 See http://code.google.com/p/chromium/issues/detail?id=25892 for an example.
3209 https://bugs.webkit.org/show_bug.cgi?id=30833
3211 * JavaScriptCore.gyp/JavaScriptCore.gyp:
3212 * wtf/CurrentTime.cpp:
3214 2009-10-27 Peter Varga <pvarga@inf.u-szeged.hu>
3216 Rubber-stamped by Tor Arne Vestbø.
3218 Fix typo in RegexInterpreter.cpp and RegexJIT.cpp alterantive to
3221 * yarr/RegexInterpreter.cpp:
3222 (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
3223 (JSC::Yarr::ByteCompiler::alternativeDisjunction):
3224 (JSC::Yarr::ByteCompiler::emitDisjunction):
3225 * yarr/RegexJIT.cpp:
3226 (JSC::Yarr::RegexGenerator::generateDisjunction):
3228 2009-10-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3230 Reviewed by Darin Adler.
3232 Make .rc files compile on Windows without depending on MFC headers
3233 https://bugs.webkit.org/show_bug.cgi?id=30750
3235 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Use
3236 winresrc.h because it exists even when MFC is not installed, and is
3237 all that's needed here.
3239 2009-10-26 Gabor Loki <loki@inf.u-szeged.hu>
3241 Reviewed by Gavin Barraclough.
3243 The thunkReturnAddress is on JITStackFrame on ARM JIT as well
3244 https://bugs.webkit.org/show_bug.cgi?id=30782
3246 Move the thunkReturnAddress from top of the stack into the JITStackFrame
3247 structure. This is a requirement for JSValue32_64 support on ARM.
3249 * assembler/MacroAssemblerARM.h:
3250 (JSC::MacroAssemblerARM::ret): Return with link register
3251 (JSC::MacroAssemblerARM::prepareCall): Store the return address in link register
3252 * jit/JIT.h: Remove unused ctiReturnRegister
3253 * jit/JITInlineMethods.h: Same as ARMv7
3254 (JSC::JIT::restoreArgumentReference): Ditto.
3255 (JSC::JIT::restoreArgumentReferenceForTrampoline): Ditto.
3256 * jit/JITOpcodes.cpp: Remove ctiReturnRegister related instruction
3257 * jit/JITStubs.cpp: Store thunkReturnAddress on JITStackFrame. Use
3258 small trampoline functions which handle return addresses for each
3260 * jit/JITStubs.h: Store thunkReturnAddress on JITStackFrame
3261 (JSC::JITStackFrame::returnAddressSlot): Return with the address of thunkReturnAddress
3262 * yarr/RegexJIT.cpp:
3263 (JSC::Yarr::RegexGenerator::generateEnter): Remove the unnecessary instruction
3265 2009-10-26 Steve Block <steveblock@google.com>
3267 Reviewed by Darin Adler.
3269 Adds ability to disable ReadWriteLock on platforms (eg Android) that use pthreads but do not support pthread_rwlock.
3270 https://bugs.webkit.org/show_bug.cgi?id=30713
3272 * wtf/Platform.h: Modified. Defines HAVE_PTHREAD_RWLOCK for all platforms currently using pthreads.
3273 * wtf/Threading.h: Modified. Use pthread_rwlock_t only when HAVE_PTHREAD_RWLOCK is defined.
3274 * wtf/ThreadingPthreads.cpp: Modified. Build ReadWriteLock methods only when HAVE_PTHREAD_RWLOCK is defined.
3276 2009-10-24 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3278 Reviewed by Holger Freyther.
3280 [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian
3281 https://bugs.webkit.org/show_bug.cgi?id=30476
3283 Assign ReadUserData WriteUserData NetworkServices Symbian capabilities
3288 2009-10-23 Steve Block <steveblock@google.com>
3290 Reviewed by Dmitry Titov.
3292 Fixes a leak in createThreadInternal on Android.
3293 https://bugs.webkit.org/show_bug.cgi?id=30698
3295 * wtf/ThreadingPthreads.cpp: Modified.
3296 (WTF::createThreadInternal): Avoid leaking a ThreadData object on failure.
3298 2009-10-22 Geoffrey Garen <ggaren@apple.com>
3300 Reviewed by Alexey Proskuryakov.
3302 Fixed ASSERT when opening Safari's Caches window while the Web Inspector
3305 * runtime/Collector.cpp:
3306 (JSC::typeName): Added two new types to the type name list in the Collector.
3307 These types have been around for a while, but nobody remembered to consider them here.
3310 (JSC::JSCell::isPropertyNameIterator):
3311 * runtime/JSPropertyNameIterator.h:
3312 (JSC::JSPropertyNameIterator::isPropertyNameIterator): Give the Collector
3313 a way to tell if a cell is a JSPropertyNameIterator.
3315 2009-10-22 Steve Falkenburg <sfalken@apple.com>
3317 Reviewed by Jon Honeycutt.
3319 https://bugs.webkit.org/show_bug.cgi?id=30686
3320 Remove debug-specific def file.
3321 Only Debug_All target uses JavaScriptCore_debug.dll naming, and since
3322 that target is only used internally, maintaining two files just to
3323 suppress a single link warning isn't worthwhile.
3325 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
3326 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Removed.
3328 2009-10-21 Jon Honeycutt <jhoneycutt@apple.com>
3330 <rdar://problem/7270320> Screenshots of off-screen plug-ins are blank
3331 <rdar://problem/7270314> After halting a transparent PluginView on
3332 Windows, the transparency is applied twice
3334 Reviewed by Dan Bernstein.
3336 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3337 Export WTF::deleteOwnedPtr(HDC).
3339 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3342 2009-10-20 Geoffrey Garen <ggaren@apple.com>
3344 Windows build fix: updated variable name.
3346 * runtime/DatePrototype.cpp:
3347 (JSC::formatLocaleDate):
3349 2009-10-20 Geoffrey Garen <ggaren@apple.com>
3351 Reviewed by Mark Rowe.
3353 * jit/JITOpcodes.cpp:
3354 (JSC::JIT::emit_op_next_pname): Slightly tweaked this #ifdef to match the
3355 size of a JSValue because m_jsStrings is an array of JSValues.
3357 2009-10-20 Geoffrey Garen <ggaren@apple.com>
3359 Reviewed by Mark Rowe.
3361 Fixed a 64-bit regression caused by the fix for
3362 https://bugs.webkit.org/show_bug.cgi?id=30570.
3364 * jit/JITOpcodes.cpp:
3365 (JSC::JIT::emit_op_next_pname): Use TimesEight stepping on 64-bit, since
3366 64-bit pointers are eight bytes long.
3368 2009-10-20 Geoffrey Garen <ggaren@apple.com>
3370 Reviewed by Sam Weinig.
3372 Refactored DateInstance::msToGregorianDateTime so that a DateInstance's
3373 caller doesn't need to supply the DateInstance's own internal value to
3376 * runtime/DateInstance.cpp:
3377 (JSC::DateInstance::getGregorianDateTime): Renamed from "msToGregorianDateTime".
3379 * runtime/DateInstance.h:
3380 * runtime/DatePrototype.cpp:
3381 (JSC::formatLocaleDate):
3382 (JSC::dateProtoFuncToString):
3383 (JSC::dateProtoFuncToUTCString):
3384 (JSC::dateProtoFuncToISOString):
3385 (JSC::dateProtoFuncToDateString):
3386 (JSC::dateProtoFuncToTimeString):
3387 (JSC::dateProtoFuncToLocaleString):
3388 (JSC::dateProtoFuncToLocaleDateString):
3389 (JSC::dateProtoFuncToLocaleTimeString):
3390 (JSC::dateProtoFuncGetTime):
3391 (JSC::dateProtoFuncGetFullYear):
3392 (JSC::dateProtoFuncGetUTCFullYear):
3393 (JSC::dateProtoFuncToGMTString):
3394 (JSC::dateProtoFuncGetMonth):
3395 (JSC::dateProtoFuncGetUTCMonth):
3396 (JSC::dateProtoFuncGetDate):
3397 (JSC::dateProtoFuncGetUTCDate):
3398 (JSC::dateProtoFuncGetDay):
3399 (JSC::dateProtoFuncGetUTCDay):
3400 (JSC::dateProtoFuncGetHours):
3401 (JSC::dateProtoFuncGetUTCHours):
3402 (JSC::dateProtoFuncGetMinutes):
3403 (JSC::dateProtoFuncGetUTCMinutes):
3404 (JSC::dateProtoFuncGetSeconds):
3405 (JSC::dateProtoFuncGetUTCSeconds):
3406 (JSC::dateProtoFuncGetTimezoneOffset):
3407 (JSC::setNewValueFromTimeArgs):
3408 (JSC::setNewValueFromDateArgs):
3409 (JSC::dateProtoFuncSetYear):
3410 (JSC::dateProtoFuncGetYear): Also renamed "utc" to "outputIsUTC", for clarity.
3412 2009-10-20 Gabor Loki <loki@inf.u-szeged.hu>
3414 Reviewed by Geoffrey Garen.
3416 The op_next_pname should use 4 bytes addressing mode in case of JSValue32
3417 https://bugs.webkit.org/show_bug.cgi?id=30570
3419 * jit/JITOpcodes.cpp:
3420 (JSC::JIT::emit_op_next_pname):
3422 2009-10-20 Gabor Loki <loki@inf.u-szeged.hu>
3424 Reviewed by Oliver Hunt.
3426 Move OverridesMarkChildren flag from DatePrototype to its parent class
3427 https://bugs.webkit.org/show_bug.cgi?id=30372
3429 * runtime/DateInstance.h:
3430 (JSC::DateInstance::createStructure):
3431 * runtime/DatePrototype.h:
3433 2009-10-19 Geoffrey Garen <ggaren@apple.com>
3435 Reviewed by Oliver Hunt.
3437 Tightened up some put_by_id_transition code generation.
3438 https://bugs.webkit.org/show_bug.cgi?id=30539
3441 * jit/JITPropertyAccess.cpp:
3442 (JSC::JIT::testPrototype):
3443 (JSC::JIT::privateCompilePutByIdTransition): No need to do object type
3444 checks or read Structures and prototypes from objects: they're all known
3445 constants at compile time.
3447 2009-10-19 Geoffrey Garen <ggaren@apple.com>
3449 Reviewed by Sam Weinig.
3451 Added a private API for getting a global context from a context, for
3452 clients who want to preserve a context for a later callback.
3455 (toGlobalRef): Added an ASSERT, since this function is used more often
3458 * API/JSContextRef.cpp:
3459 * API/JSContextRefPrivate.h: Added. The new API.
3461 * API/tests/testapi.c:
3462 (print_callAsFunction):
3463 (main): Test the new API.
3465 * JavaScriptCore.exp:
3466 * JavaScriptCore.xcodeproj/project.pbxproj: Build and export the new API.
3468 2009-10-17 Geoffrey Garen <ggaren@apple.com>
3470 Reviewed by Oliver Hunt.
3472 Tightened up some instanceof code generation.
3473 https://bugs.webkit.org/show_bug.cgi?id=30488
3475 * jit/JITOpcodes.cpp:
3476 (JSC::JIT::emit_op_instanceof):
3477 (JSC::JIT::emitSlow_op_instanceof): No need to do object type checks -
3478 cell type checks and ImplementsDefaultHasIntance checks implicitly
3479 supersede object type checks.
3481 2009-10-18 Kwang Yul Seo <skyul@company100.net>
3483 Reviewed by Darin Adler.
3485 Use _stricmp and _strnicmp instead of deprecated stricmp and strnicmp.
3486 https://bugs.webkit.org/show_bug.cgi?id=30474
3488 stricmp and strnicmp are deprecated beginning in Visual
3489 C++ 2005. Use _stricmp and _strnicmp instead in StringExtras.h.
3491 * wtf/StringExtras.h:
3495 2009-10-16 Geoffrey Garen <ggaren@apple.com>
3497 Build fix: apparently we shouldn't export those symbols?
3499 * JavaScriptCore.exp:
3501 2009-10-16 Geoffrey Garen <ggaren@apple.com>
3503 Build fix: export some symbols.
3505 * JavaScriptCore.exp:
3507 2009-10-16 Oliver Hunt <oliver@apple.com>
3509 Reviewed by Gavin Barraclough.
3511 structure typeinfo flags should be inherited.
3512 https://bugs.webkit.org/show_bug.cgi?id=30468
3514 Add StructureFlag constant to the various JSC classes and use
3515 it for the TypeInfo construction. This allows us to simply
3516 accumulate flags by basing each classes StructureInfo on its parents.
3518 * API/JSCallbackConstructor.h:
3519 (JSC::JSCallbackConstructor::createStructure):
3520 * API/JSCallbackFunction.h:
3521 (JSC::JSCallbackFunction::createStructure):
3522 * API/JSCallbackObject.h:
3523 (JSC::JSCallbackObject::createStructure):
3524 * debugger/DebuggerActivation.h:
3525 (JSC::DebuggerActivation::createStructure):
3526 * runtime/Arguments.h:
3527 (JSC::Arguments::createStructure):
3528 * runtime/BooleanObject.h:
3529 (JSC::BooleanObject::createStructure):
3530 * runtime/DatePrototype.h:
3531 (JSC::DatePrototype::createStructure):
3532 * runtime/FunctionPrototype.h:
3533 (JSC::FunctionPrototype::createStructure):
3534 * runtime/GlobalEvalFunction.h:
3535 (JSC::GlobalEvalFunction::createStructure):
3536 * runtime/InternalFunction.h:
3537 (JSC::InternalFunction::createStructure):
3538 * runtime/JSActivation.h:
3539 (JSC::JSActivation::createStructure):
3540 * runtime/JSArray.h:
3541 (JSC::JSArray::createStructure):
3542 * runtime/JSByteArray.cpp:
3543 (JSC::JSByteArray::createStructure):
3544 * runtime/JSByteArray.h:
3545 * runtime/JSFunction.h:
3546 (JSC::JSFunction::createStructure):
3547 * runtime/JSGlobalObject.h:
3548 (JSC::JSGlobalObject::createStructure):
3549 * runtime/JSNotAnObject.h:
3550 (JSC::JSNotAnObject::createStructure):
3551 * runtime/JSONObject.h:
3552 (JSC::JSONObject::createStructure):
3553 * runtime/JSObject.h:
3554 (JSC::JSObject::createStructure):
3555 * runtime/JSStaticScopeObject.h:
3556 (JSC::JSStaticScopeObject::createStructure):
3557 * runtime/JSVariableObject.h:
3558 (JSC::JSVariableObject::createStructure):
3559 * runtime/JSWrapperObject.h:
3560 (JSC::JSWrapperObject::createStructure):
3561 * runtime/MathObject.h:
3562 (JSC::MathObject::createStructure):
3563 * runtime/NumberConstructor.h:
3564 (JSC::NumberConstructor::createStructure):
3565 * runtime/NumberObject.h:
3566 (JSC::NumberObject::createStructure):
3567 * runtime/RegExpConstructor.h:
3568 (JSC::RegExpConstructor::createStructure):
3569 * runtime/RegExpObject.h:
3570 (JSC::RegExpObject::createStructure):
3571 * runtime/StringObject.h:
3572 (JSC::StringObject::createStructure):
3573 * runtime/StringObjectThatMasqueradesAsUndefined.h:
3574 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
3576 2009-10-16 Geoffrey Garen <ggaren@apple.com>
3578 Reviewed by Oliver Hunt.
3580 Fast for-in enumeration: Cache JSPropertyNameIterator; cache JSStrings
3581 in JSPropertyNameIterator; inline more code.
3583 1.024x as fast on SunSpider (fasta: 1.43x as fast).
3585 * bytecode/CodeBlock.cpp:
3586 (JSC::CodeBlock::dump):
3587 * bytecode/Opcode.h:
3588 * bytecompiler/BytecodeGenerator.cpp:
3589 (JSC::BytecodeGenerator::emitGetPropertyNames):
3590 (JSC::BytecodeGenerator::emitNextPropertyName):
3591 * bytecompiler/BytecodeGenerator.h: Added a few extra operands to
3592 op_get_pnames and op_next_pname so that we can track iteration state
3593 in the register file instead of in the JSPropertyNameIterator. (To be
3594 cacheable, the JSPropertyNameIterator must be stateless.)
3596 * interpreter/Interpreter.cpp:
3597 (JSC::Interpreter::tryCachePutByID):
3598 (JSC::Interpreter::tryCacheGetByID): Updated for rename to
3599 "normalizePrototypeChain" and removal of "isCacheable".
3601 (JSC::Interpreter::privateExecute): Updated for in-RegisterFile
3602 iteration state tracking.
3605 (JSC::JIT::privateCompileMainPass):
3607 * jit/JITOpcodes.cpp:
3608 (JSC::JIT::emit_op_get_pnames): Updated for in-RegisterFile
3609 iteration state tracking.
3611 (JSC::JIT::emit_op_next_pname): Inlined code generation for op_next_pname.
3614 (JSC::JITThunks::tryCachePutByID):
3615 (JSC::JITThunks::tryCacheGetByID): Updated for rename to
3616 "normalizePrototypeChain" and removal of "isCacheable".
3618 (JSC::DEFINE_STUB_FUNCTION):
3620 (JSC::): Added has_property and to_object stubs. Removed op_next_pname
3621 stub, since has_property is all we need anymore.
3624 (JSC::ForInNode::emitBytecode): Updated for in-RegisterFile
3625 iteration state tracking.
3628 * runtime/JSObject.cpp:
3629 (JSC::JSObject::getPropertyNames): Don't do caching at this layer
3630 anymore, since we don't create a JSPropertyNameIterator at this layer.
3632 * runtime/JSPropertyNameIterator.cpp:
3633 (JSC::JSPropertyNameIterator::create): Do do caching at this layer.
3634 (JSC::JSPropertyNameIterator::get): Updated for in-RegisterFile
3635 iteration state tracking.
3636 (JSC::JSPropertyNameIterator::markChildren): Mark our JSStrings.
3638 * runtime/JSPropertyNameIterator.h:
3639 (JSC::JSPropertyNameIterator::size):
3640 (JSC::JSPropertyNameIterator::setCachedStructure):
3641 (JSC::JSPropertyNameIterator::cachedStructure):
3642 (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
3643 (JSC::JSPropertyNameIterator::cachedPrototypeChain):
3644 (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
3645 (JSC::Structure::setEnumerationCache): Don't store iteration state in
3646 a JSPropertyNameIterator. Do cache a JSPropertyNameIterator in a
3649 * runtime/JSValue.h:
3651 * runtime/MarkStack.h: Make those mischievous #include gods happy.
3653 * runtime/ObjectConstructor.cpp:
3655 * runtime/Operations.h:
3656 (JSC::normalizePrototypeChain): Renamed countPrototypeChainEntriesAndCheckForProxies
3657 to normalizePrototypeChain, since it changes dictionary prototypes to
3658 non-dictionary objects.
3660 * runtime/PropertyNameArray.cpp:
3661 (JSC::PropertyNameArray::add):
3662 * runtime/PropertyNameArray.h:
3663 (JSC::PropertyNameArrayData::PropertyNameArrayData):
3664 (JSC::PropertyNameArray::data):
3665 (JSC::PropertyNameArray::size):
3666 (JSC::PropertyNameArray::begin):
3667 (JSC::PropertyNameArray::end): Simplified some code here to help with
3668 current and future refactoring.
3670 * runtime/Protect.h:
3671 * runtime/Structure.cpp:
3672 (JSC::Structure::~Structure):
3673 (JSC::Structure::addPropertyWithoutTransition):
3674 (JSC::Structure::removePropertyWithoutTransition): No need to clear
3675 the enumeration cache with adding / removing properties without
3676 transition. It is an error to add / remove properties without transition
3677 once an object has been observed, and we can ASSERT to catch that.
3679 * runtime/Structure.h:
3680 (JSC::Structure::enumerationCache): Changed the enumeration cache to
3681 hold a JSPropertyNameIterator.
3683 * runtime/StructureChain.cpp:
3684 * runtime/StructureChain.h:
3685 (JSC::StructureChain::head): Removed StructureChain::isCacheable because
3686 it was wrong-headed in two ways: (1) It gave up when a prototype was a
3687 dictionary, but instead we want un-dictionary heavily accessed
3688 prototypes; (2) It folded a test for hasDefaultGetPropertyNames() into
3689 a generic test for "cacheable-ness", but hasDefaultGetPropertyNames()
3690 is only releavant to for-in caching.
3692 2009-10-16 Steve Falkenburg <sfalken@apple.com>
3694 Reviewed by Adam Roben.
3696 Add a Debug_All configuration to build entire stack as debug.
3697 Change Debug_Internal to:
3698 - stop using _debug suffix for all WebKit/Safari binaries
3699 - not use _debug as a DLL naming suffix
3700 - use non-debug C runtime lib.
3702 * JavaScriptCore.vcproj/JavaScriptCore.make: Debug build in makefile should build Debug_All.
3703 * JavaScriptCore.vcproj/JavaScriptCore.sln: Add Debug_All configuration.
3704 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add Debug_All configuration.
3705 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Renamed single configuration from "Release" to "all".
3706 * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Add Debug_All configuration.
3707 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add Debug_All configuration.
3708 * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_All configuration.
3709 * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_All configuration.
3711 2009-10-16 Oliver Hunt <oliver@apple.com>
3713 Reviewed by Gavin Barraclough.
3715 Make typeinfo flags default to false
3716 https://bugs.webkit.org/show_bug.cgi?id=30372
3718 Last part -- replace HasDefaultGetPropertyNames with OverridesGetPropertyNames
3721 * API/JSCallbackConstructor.h:
3722 (JSC::JSCallbackConstructor::createStructure):
3723 * API/JSCallbackObject.h:
3724 (JSC::JSCallbackObject::createStructure):
3725 * debugger/DebuggerActivation.h:
3726 (JSC::DebuggerActivation::createStructure):
3727 * runtime/Arguments.h:
3728 (JSC::Arguments::createStructure):
3729 * runtime/BooleanObject.h:
3730 (JSC::BooleanObject::createStructure):
3731 * runtime/DatePrototype.h:
3732 (JSC::DatePrototype::createStructure):
3733 * runtime/FunctionPrototype.h:
3734 (JSC::FunctionPrototype::createStructure):
3735 * runtime/GlobalEvalFunction.h:
3736 (JSC::GlobalEvalFunction::createStructure):
3737 * runtime/JSAPIValueWrapper.h:
3738 (JSC::JSAPIValueWrapper::createStructure):
3739 * runtime/JSActivation.h:
3740 (JSC::JSActivation::createStructure):
3741 * runtime/JSArray.h:
3742 (JSC::JSArray::createStructure):
3743 * runtime/JSByteArray.cpp:
3744 (JSC::JSByteArray::createStructure):
3745 * runtime/JSFunction.h:
3746 (JSC::JSFunction::createStructure):
3747 * runtime/JSGlobalObject.h:
3748 (JSC::JSGlobalObject::createStructure):
3749 * runtime/JSNotAnObject.h:
3750 (JSC::JSNotAnObject::createStructure):
3751 * runtime/JSONObject.h:
3752 (JSC::JSONObject::createStructure):
3753 * runtime/JSObject.cpp:
3754 (JSC::JSObject::getPropertyNames):
3755 * runtime/JSObject.h:
3756 (JSC::JSObject::createStructure):
3757 * runtime/JSStaticScopeObject.h:
3758 (JSC::JSStaticScopeObject::createStructure):
3759 * runtime/JSTypeInfo.h:
3760 (JSC::TypeInfo::overridesGetPropertyNames):
3761 * runtime/JSVariableObject.h:
3762 (JSC::JSVariableObject::createStructure):
3763 * runtime/JSWrapperObject.h:
3764 (JSC::JSWrapperObject::createStructure):
3765 * runtime/MathObject.h:
3766 (JSC::MathObject::createStructure):
3767 * runtime/NumberConstructor.h:
3768 (JSC::NumberConstructor::createStructure):
3769 * runtime/NumberObject.h:
3770 (JSC::NumberObject::createStructure):
3771 * runtime/RegExpConstructor.h:
3772 (JSC::RegExpConstructor::createStructure):
3773 * runtime/RegExpObject.h:
3774 (JSC::RegExpObject::createStructure):
3775 * runtime/StringObject.h:
3776 (JSC::StringObject::createStructure):
3777 * runtime/StringObjectThatMasqueradesAsUndefined.h:
3778 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
3779 * runtime/StructureChain.cpp:
3780 (JSC::StructureChain::isCacheable):
3782 2009-10-16 Kevin Ollivier <kevino@theolliviers.com>
3784 wxMSW build fix, we can't use the simple hash there because the PlatformModuleVersion
3789 2009-10-16 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3791 Reviewed by Simon Hausmann.
3793 [Qt] Implement ExecutableAllocator for Symbian
3794 https://bugs.webkit.org/show_bug.cgi?id=29946
3796 Tested with YARR JIT enabled for Symbian;
3797 This patch does not (yet) enable YARR JIT by default.
3799 * JavaScriptCore.pri:
3800 * jit/ExecutableAllocator.h:
3801 * jit/ExecutableAllocatorSymbian.cpp: Added.
3802 (JSC::ExecutableAllocator::intializePageSize):
3803 (JSC::ExecutablePool::systemAlloc):
3804 (JSC::ExecutablePool::systemRelease):
3806 2009-10-15 Oliver Hunt <oliver@apple.com>
3808 Reviewed by Darin Adler.
3810 Make typeinfo flags default to false
3811 https://bugs.webkit.org/show_bug.cgi?id=30372
3813 Part 2 -- Reverse the TypeInfo HasDefaultMark flag to OverridesMarkChildren, etc
3815 * API/JSCallbackConstructor.h:
3816 (JSC::JSCallbackConstructor::createStructure):
3817 * API/JSCallbackFunction.h:
3818 (JSC::JSCallbackFunction::createStructure):
3819 * API/JSCallbackObject.h:
3820 (JSC::JSCallbackObject::createStructure):
3821 * debugger/DebuggerActivation.h:
3822 (JSC::DebuggerActivation::createStructure):
3823 * runtime/Arguments.h:
3824 (JSC::Arguments::createStructure):
3825 * runtime/BooleanObject.h:
3826 (JSC::BooleanObject::createStructure):
3827 * runtime/DatePrototype.h:
3828 (JSC::DatePrototype::createStructure):
3829 * runtime/FunctionPrototype.h:
3830 (JSC::FunctionPrototype::createStructure):
3831 * runtime/GetterSetter.h:
3832 (JSC::GetterSetter::createStructure):
3833 * runtime/GlobalEvalFunction.h:
3834 (JSC::GlobalEvalFunction::createStructure):
3835 * runtime/InternalFunction.h:
3836 (JSC::InternalFunction::createStructure):
3837 * runtime/JSAPIValueWrapper.h:
3838 (JSC::JSAPIValueWrapper::createStructure):
3839 * runtime/JSActivation.h:
3840 (JSC::JSActivation::createStructure):
3841 * runtime/JSArray.h:
3842 (JSC::JSArray::createStructure):
3843 (JSC::MarkStack::markChildren):
3844 * runtime/JSByteArray.cpp:
3845 (JSC::JSByteArray::createStructure):
3846 * runtime/JSFunction.h:
3847 (JSC::JSFunction::createStructure):
3848 * runtime/JSGlobalObject.h:
3849 (JSC::JSGlobalObject::createStructure):
3850 * runtime/JSNotAnObject.h:
3851 (JSC::JSNotAnObject::createStructure):
3852 * runtime/JSNumberCell.h:
3853 (JSC::JSNumberCell::createStructure):
3854 * runtime/JSONObject.h:
3855 (JSC::JSONObject::createStructure):
3856 * runtime/JSObject.h:
3857 (JSC::JSObject::createStructure):
3858 * runtime/JSPropertyNameIterator.h:
3859 (JSC::JSPropertyNameIterator::createStructure):
3860 * runtime/JSStaticScopeObject.h:
3861 (JSC::JSStaticScopeObject::createStructure):
3862 * runtime/JSString.h:
3863 (JSC::JSString::createStructure):
3864 * runtime/JSTypeInfo.h:
3865 (JSC::TypeInfo::overridesMarkChildren):
3866 * runtime/JSVariableObject.h:
3867 (JSC::JSVariableObject::createStructure):
3868 * runtime/JSWrapperObject.h:
3869 (JSC::JSWrapperObject::createStructure):
3870 * runtime/MathObject.h:
3871 (JSC::MathObject::createStructure):
3872 * runtime/NumberConstructor.h:
3873 (JSC::NumberConstructor::createStructure):
3874 * runtime/NumberObject.h:
3875 (JSC::NumberObject::createStructure):
3876 * runtime/RegExpConstructor.h:
3877 (JSC::RegExpConstructor::createStructure):
3878 * runtime/RegExpObject.h:
3879 (JSC::RegExpObject::createStructure):
3880 * runtime/StringObject.h:
3881 (JSC::StringObject::createStructure):
3882 * runtime/StringObjectThatMasqueradesAsUndefined.h:
3883 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
3885 2009-10-14 Oliver Hunt <oliver@apple.com>
3887 Reviewed by Geoff Garen.
3889 Make typeinfo flags default to false
3890 https://bugs.webkit.org/show_bug.cgi?id=30372
3892 Part 1. Reverse the HasStandardGetOwnPropertySlot flag.
3894 * API/JSCallbackConstructor.h:
3895 (JSC::JSCallbackConstructor::createStructure):
3896 * API/JSCallbackFunction.h:
3897 (JSC::JSCallbackFunction::createStructure):
3898 * API/JSCallbackObject.h:
3899 (JSC::JSCallbackObject::createStructure):
3900 * debugger/DebuggerActivation.h:
3901 (JSC::DebuggerActivation::createStructure):
3903 (JSC::DEFINE_STUB_FUNCTION):
3904 * runtime/Arguments.h:
3905 (JSC::Arguments::createStructure):
3906 * runtime/BooleanObject.h:
3907 (JSC::BooleanObject::createStructure):
3908 * runtime/DatePrototype.h:
3909 (JSC::DatePrototype::createStructure):
3910 * runtime/FunctionPrototype.h:
3911 (JSC::FunctionPrototype::createStructure):
3912 * runtime/GlobalEvalFunction.h:
3913 (JSC::GlobalEvalFunction::createStructure):
3914 * runtime/InternalFunction.h:
3915 (JSC::InternalFunction::createStructure):
3916 * runtime/JSActivation.h:
3917 (JSC::JSActivation::createStructure):
3918 * runtime/JSArray.h:
3919 (JSC::JSArray::createStructure):
3920 * runtime/JSByteArray.cpp:
3921 (JSC::JSByteArray::createStructure):
3922 * runtime/JSFunction.h:
3923 (JSC::JSFunction::createStructure):
3924 * runtime/JSGlobalObject.h:
3925 (JSC::JSGlobalObject::createStructure):
3926 * runtime/JSNumberCell.h:
3927 (JSC::JSNumberCell::createStructure):
3928 * runtime/JSONObject.h:
3929 (JSC::JSONObject::createStructure):
3930 * runtime/JSObject.h:
3931 (JSC::JSObject::createStructure):
3932 (JSC::JSCell::fastGetOwnPropertySlot):
3933 * runtime/JSStaticScopeObject.h:
3934 (JSC::JSStaticScopeObject::createStructure):
3935 * runtime/JSString.h:
3936 (JSC::JSString::createStructure):
3937 * runtime/JSTypeInfo.h:
3938 (JSC::TypeInfo::overridesGetOwnPropertySlot):
3939 * runtime/JSVariableObject.h:
3940 (JSC::JSVariableObject::createStructure):
3941 * runtime/JSWrapperObject.h:
3942 (JSC::JSWrapperObject::createStructure):
3943 * runtime/MathObject.h:
3944 (JSC::MathObject::createStructure):
3945 * runtime/NumberConstructor.h:
3946 (JSC::NumberConstructor::createStructure):
3947 * runtime/NumberObject.h:
3948 (JSC::NumberObject::createStructure):
3949 * runtime/RegExpConstructor.h:
3950 (JSC::RegExpConstructor::createStructure):
3951 * runtime/RegExpObject.h:
3952 (JSC::RegExpObject::createStructure):
3953 * runtime/StringObject.h:
3954 (JSC::StringObject::createStructure):
3955 * runtime/StringObjectThatMasqueradesAsUndefined.h:
3956 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
3958 2009-10-14 Kevin Ollivier <kevino@theolliviers.com>
3959 2009-10-14 Darin Adler <darin@apple.com>
3961 Additions so fix for https://bugs.webkit.org/show_bug.cgi?id=18994
3962 can build on Windows.
3964 * wtf/MathExtras.h: Added llround and llroundf for Windows.
3966 2009-10-14 Kevin Ollivier <kevino@theolliviers.com>
3968 wx build fix. Set ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH for plugins while we're still building stubs.
3972 2009-10-13 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3974 Reviewed by Simon Hausmann.
3976 Refactor ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
3977 https://bugs.webkit.org/show_bug.cgi?id=30278
3979 Move the definition of ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
3980 from the make system into common code.
3984 2009-10-13 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3986 Reviewed by Darin Adler.
3988 ARM compiler does not understand reinterpret_cast<void*>
3989 https://bugs.webkit.org/show_bug.cgi?id=29034
3991 Change reinterpret_cast<void*> to regular C style (void*) cast
3992 for the ARM RVCT compiler.
3994 * assembler/MacroAssemblerCodeRef.h:
3995 (JSC::FunctionPtr::FunctionPtr):
3996 * jit/JITOpcodes.cpp: Cast to FunctionPtr first
3997 instead of directly casting to reinterpret_cast
3998 * jit/JITStubCall.h: Ditto + change the type of m_stub
3999 from void* to FunctionPtr.
4000 (JSC::JITStubCall::JITStubCall):
4001 (JSC::JITStubCall::call):
4002 * jit/JITStubs.cpp: Ditto.
4003 (JSC::DEFINE_STUB_FUNCTION(EncodedJSValue, op_throw)):
4005 2009-10-11 Oliver Hunt <oliver@apple.com>
4011 2009-10-10 Oliver Hunt <oliver@apple.com>
4013 Reviewed by Maciej Stachowiak.
4015 Support for String.trim(), String.trimLeft() and String.trimRight() methods
4016 https://bugs.webkit.org/show_bug.cgi?id=26590
4018 Implement trim, trimLeft, and trimRight
4020 * runtime/StringPrototype.cpp:
4021 (JSC::isTrimWhitespace):
4022 Our normal string whitespace function does not include U+200B which
4023 is needed for compatibility with mozilla's implementation of trim.
4024 U+200B does not appear to be expected according to spec, however I am
4025 choosing to be lax, and match mozilla behavior so have added this
4029 2009-10-09 Geoffrey Garen <ggaren@apple.com>
4031 Reviewed by Oliver Hunt.
4033 Eliminated some legacy bytecode weirdness.
4035 Use vPC[x] subscripting instead of ++vPC to access instruction operands.
4036 This is simpler, and often more efficient.
4038 To support this, and to remove use of hard-coded offsets in bytecode and
4039 JIT code generation and dumping, calculate jump offsets from the beginning
4040 of an instruction, rather than the middle or end.
4042 Also, use OPCODE_LENGTH instead of hard-coded constants for the sizes of
4045 SunSpider reports no change in JIT mode, and a 1.01x speedup in Interpreter
4048 * bytecode/CodeBlock.cpp:
4049 (JSC::printConditionalJump):
4050 (JSC::CodeBlock::dump):
4051 * bytecompiler/BytecodeGenerator.cpp:
4052 (JSC::BytecodeGenerator::emitJump):
4053 (JSC::BytecodeGenerator::emitJumpIfTrue):
4054 (JSC::BytecodeGenerator::emitJumpIfFalse):
4055 (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
4056 (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
4057 (JSC::BytecodeGenerator::emitComplexJumpScopes):
4058 (JSC::BytecodeGenerator::emitJumpScopes):
4059 (JSC::BytecodeGenerator::emitNextPropertyName):
4060 (JSC::BytecodeGenerator::emitCatch):
4061 (JSC::BytecodeGenerator::emitJumpSubroutine):
4062 (JSC::prepareJumpTableForImmediateSwitch):
4063 (JSC::prepareJumpTableForCharacterSwitch):
4064 (JSC::prepareJumpTableForStringSwitch):
4065 (JSC::BytecodeGenerator::endSwitch):
4066 * bytecompiler/Label.h:
4067 (JSC::Label::setLocation):
4069 * interpreter/Interpreter.cpp:
4070 (JSC::Interpreter::resolve):
4071 (JSC::Interpreter::resolveSkip):
4072 (JSC::Interpreter::resolveGlobal):
4073 (JSC::Interpreter::resolveBase):
4074 (JSC::Interpreter::resolveBaseAndProperty):
4075 (JSC::Interpreter::createExceptionScope):
4076 (JSC::Interpreter::privateExecute):
4077 * interpreter/Interpreter.h:
4079 (JSC::JIT::privateCompile):
4080 * jit/JITArithmetic.cpp:
4081 (JSC::JIT::emit_op_jnless):
4082 (JSC::JIT::emitSlow_op_jnless):
4083 (JSC::JIT::emit_op_jnlesseq):
4084 (JSC::JIT::emitSlow_op_jnlesseq):
4085 (JSC::JIT::emitBinaryDoubleOp):
4086 * jit/JITOpcodes.cpp:
4087 (JSC::JIT::emit_op_jmp):
4088 (JSC::JIT::emit_op_loop):
4089 (JSC::JIT::emit_op_loop_if_less):
4090 (JSC::JIT::emitSlow_op_loop_if_less):
4091 (JSC::JIT::emit_op_loop_if_lesseq):
4092 (JSC::JIT::emitSlow_op_loop_if_lesseq):
4093 (JSC::JIT::emit_op_loop_if_true):
4094 (JSC::JIT::emitSlow_op_loop_if_true):
4095 (JSC::JIT::emit_op_jfalse):
4096 (JSC::JIT::emitSlow_op_jfalse):
4097 (JSC::JIT::emit_op_jtrue):
4098 (JSC::JIT::emitSlow_op_jtrue):
4099 (JSC::JIT::emit_op_jeq_null):
4100 (JSC::JIT::emit_op_jneq_null):
4101 (JSC::JIT::emit_op_jneq_ptr):
4102 (JSC::JIT::emit_op_jsr):
4103 (JSC::JIT::emit_op_next_pname):
4104 (JSC::JIT::emit_op_jmp_scopes):
4106 2009-10-09 Geoffrey Garen <ggaren@apple.com>
4108 Reviewed by Sam Weinig.
4110 Migrated some code that didn't belong out of Structure.
4112 SunSpider says maybe 1.03x faster.
4114 * runtime/JSCell.h: Nixed Structure::markAggregate, and made marking of
4115 a Structure's prototype the direct responsility of the object using it.
4116 (Giving Structure a mark function was misleading because it implied that
4117 all live structures get marked during GC, when they don't.)
4119 * runtime/JSGlobalObject.cpp:
4120 (JSC::markIfNeeded):
4121 (JSC::JSGlobalObject::markChildren): Added code to mark prototypes stored
4122 on the global object. Maybe this wasn't necessary, but now we don't have
4125 * runtime/JSObject.cpp:
4126 (JSC::JSObject::getPropertyNames):
4127 (JSC::JSObject::getOwnPropertyNames):
4128 (JSC::JSObject::getEnumerableNamesFromClassInfoTable):
4129 * runtime/JSObject.h:
4130 (JSC::JSObject::markChildrenDirect):
4131 * runtime/PropertyNameArray.h:
4132 * runtime/Structure.cpp:
4133 * runtime/Structure.h:
4134 (JSC::Structure::setEnumerationCache):
4135 (JSC::Structure::enumerationCache): Moved property name gathering code
4136 from Structure to JSObject because having a Structure iterate its JSObject
4137 was a layering violation. A JSObject is implemented using a Structure; not
4138 the other way around.
4140 2009-10-09 Mark Rowe <mrowe@apple.com>
4142 Attempt to fix the GTK release build.
4144 * GNUmakefile.am: Include Grammar.cpp in release builds now that
4145 AllInOneFile.cpp is gone.
4147 2009-10-09 Gabor Loki <loki@inf.u-szeged.hu>
4149 Rubber-stamped by Eric Seidel.
4151 Add ARM JIT support for Gtk port (disabled by default)
4152 https://bugs.webkit.org/show_bug.cgi?id=30228
4156 2009-10-08 Geoffrey Garen <ggaren@apple.com>
4158 Tiger build fix: added a few more variable initializations.
4160 * runtime/StringPrototype.cpp:
4161 (JSC::stringProtoFuncReplace):
4162 (JSC::stringProtoFuncSearch):
4164 2009-10-08 Geoffrey Garen <ggaren@apple.com>
4166 Qt build fix: added missing #include.
4170 2009-10-08 Geoffrey Garen <ggaren@apple.com>
4172 Tiger build fix: initialize variable whose initialization the compiler
4173 can't otherwise figure out.
4175 * runtime/RegExpObject.cpp:
4176 (JSC::RegExpObject::match):
4178 2009-10-08 Geoffrey Garen <ggaren@apple.com>
4180 Windows build fix: updated exports.
4182 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4183 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4185 2009-10-08 Geoffrey Garen <ggaren@apple.com>
4187 Tiger build fix: fixed file name case.
4189 * JavaScriptCore.xcodeproj/project.pbxproj:
4191 2009-10-08 Geoffrey Garen <ggaren@apple.com>
4193 Reviewed by Maciej Stachowiak.
4195 At long last, I pronounce the death of AllInOneFile.cpp.
4197 SunSpider reports a 1.01x speedup.
4199 * AllInOneFile.cpp: Removed.
4201 * JavaScriptCore.exp:
4202 * JavaScriptCore.gypi:
4203 * JavaScriptCore.xcodeproj/project.pbxproj: Added missing project files
4204 to compilation stages.
4210 * runtime/ArrayConstructor.cpp:
4211 (JSC::constructArrayWithSizeQuirk):
4212 * runtime/Collector.h:
4213 * runtime/JSCell.cpp:
4214 (JSC::JSCell::operator new):
4216 (JSC::JSCell::operator new):
4217 * runtime/JSGlobalObject.cpp:
4218 (JSC::JSGlobalObject::operator new):
4219 * runtime/JSNumberCell.h:
4220 (JSC::JSNumberCell::operator new):
4221 * runtime/JSString.cpp:
4222 * runtime/JSString.h:
4225 (JSC::jsOwnedString):
4226 * runtime/RegExpConstructor.cpp:
4227 * runtime/RegExpConstructor.h:
4228 (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
4229 (JSC::RegExpConstructorPrivate::lastOvector):
4230 (JSC::RegExpConstructorPrivate::tempOvector):
4231 (JSC::RegExpConstructorPrivate::changeLastOvector):
4232 (JSC::RegExpConstructor::performMatch):
4233 * runtime/StringPrototype.cpp:
4234 (JSC::stringProtoFuncMatch):
4235 * yarr/RegexJIT.cpp:
4237 (JSC::Yarr::executeRegex): Inlined a few things that Shark said
4238 were hot, on the presumption that AllInOneFile.cpp used to inline them
4241 2009-10-08 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
4243 Reviewed by Gavin Barraclough.
4245 Fix for JIT'ed op_call instructions (evals, constructs, etc.)
4246 when !ENABLE(JIT_OPTIMIZE_CALL) && USE(JSVALUE32_64)
4248 https://bugs.webkit.org/show_bug.cgi?id=30201
4251 (JSC::JIT::compileOpCall):
4253 2009-10-07 Geoffrey Garen <ggaren@apple.com>
4255 Windows build fix: removed no longer exported symbol.
4257 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4258 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4260 2009-10-07 Geoffrey Garen <ggaren@apple.com>
4262 Reviewed by Oliver Hunt.
4264 Fixed <rdar://problem/5751979> Database code takes JSLock on secondary
4265 thread, permanently slowing down JavaScript
4267 Removed the optional lock from Heap::protect, Heap::unprotect, and friends,
4268 since WebCore no longer uses it.
4270 * JavaScriptCore.exp:
4271 * runtime/Collector.cpp:
4272 (JSC::Heap::protect):
4273 (JSC::Heap::unprotect):
4274 (JSC::Heap::markProtectedObjects):
4275 (JSC::Heap::protectedGlobalObjectCount):
4276 (JSC::Heap::protectedObjectCount):
4277 (JSC::Heap::protectedObjectTypeCounts):
4278 * runtime/Collector.h:
4280 2009-10-07 Zoltan Horvath <zoltan@webkit.org>
4282 Reviewed by Darin Adler.
4284 Allow custom memory allocation control for JavaScriptCore's IdentifierArena
4285 https://bugs.webkit.org/show_bug.cgi?id=30158
4287 Inherits IdentifierArena class from FastAllocBase because it has been
4288 instantiated by 'new' in JavaScriptCore/parser/ParserArena.cpp:36.
4290 * parser/ParserArena.h:
4292 2009-10-07 Adam Roben <aroben@apple.com>
4294 Export DateInstance::info in a way that works on Windows
4296 Fixes <http://webkit.org/b/30171>
4297 fast/dom/Window/window-postmessage-clone.html fails on Windows
4299 Reviewed by Anders Carlsson.
4301 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4302 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4303 Removed the export of DateInstance::info from here.
4305 * runtime/DateInstance.h: Use JS_EXPORTDATA to export
4306 DateInstance::info, which is the required way of exporting data on
4309 2009-10-07 Jørgen Lind <jorgen.lind@nokia.com>
4311 Reviewed by Simon Hausmann.
4313 When enabling or disabling the JIT through .qmake.cache, make sure
4314 to also toggle ENABLE_YARR_JIT.
4316 * JavaScriptCore.pri:
4318 2009-10-06 Priit Laes <plaes@plaes.org>
4320 Reviewed by Gavin Barraclough.
4322 Linking fails with "relocation R_X86_64_PC32 against symbol
4324 https://bugs.webkit.org/show_bug.cgi?id=28422
4327 Mark cti_vm_throw symbol as PLT-indirect symbol, so it doesn't end up
4328 in text segment causing relocation errors on amd64 architecture.
4329 Introduced new define SYMBOL_STRING_RELOCATION for such symbols.
4331 2009-10-06 Oliver Hunt <oliver@apple.com>
4335 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4336 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4338 2009-10-06 Oliver Hunt <oliver@apple.com>
4340 Reviewed by NOBODY (build fix).
4344 * runtime/DateInstance.cpp:
4346 2009-10-05 Oliver Hunt <oliver@apple.com>
4348 Reviewed by Gavin Barraclough.
4350 It should be possible to post (clone) built-in JS objects to Workers
4351 https://bugs.webkit.org/show_bug.cgi?id=22878
4353 Expose helpers to throw correct exceptions during object graph walk
4354 used for cloning and add a helper function to create Date instances
4355 without going through the JS Date constructor function.
4357 * JavaScriptCore.exp:
4358 * JavaScriptCore.xcodeproj/project.pbxproj:
4359 * runtime/DateInstance.cpp:
4360 (JSC::DateInstance::DateInstance):
4361 * runtime/DateInstance.h:
4362 * runtime/ExceptionHelpers.cpp:
4363 (JSC::createTypeError):
4364 * runtime/ExceptionHelpers.h:
4366 2009-10-06 David Levin <levin@chromium.org>
4368 Reviewed by Oliver Hunt.
4370 StringImpl needs a method to get an instance for another thread which doesn't copy the underlying buffer.
4371 https://bugs.webkit.org/show_bug.cgi?id=30095
4373 * wtf/CrossThreadRefCounted.h:
4374 Removed an unused function and assert improvement.
4375 (WTF::CrossThreadRefCounted::isOwnedByCurrentThread): Moved out common code from asserts.
4376 (WTF::CrossThreadRefCounted::ref): Changed assert to use the common method.
4377 (WTF::CrossThreadRefCounted::deref): Changed assert to use the common method.
4378 (WTF::CrossThreadRefCounted::crossThreadCopy): Since this includes a potentially
4379 non-threadsafe operation, add an assert that the class is owned by the current thread.
4381 2009-10-05 Kevin Ollivier <kevino@theolliviers.com>
4383 wx build fix. Add Symbian files to the list of excludes.
4387 2009-10-05 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
4389 Reviewed by Simon Hausmann.
4391 [Qt] Remove precompiled header from JavaScriptCore compilation to
4392 prevent qmake warning during autonomous compilation.
4393 https://bugs.webkit.org/show_bug.cgi?id=30069
4395 * JavaScriptCore.pro:
4397 2009-10-02 Geoffrey Garen <ggaren@apple.com>
4399 Reviewed by Sam Weinig.
4401 Removed the concept of a "fast access cutoff" in arrays, because it
4402 punished some patterns of array access too much, and made things too
4403 complex for inlining in some cases.
4405 1.3% speedup on SunSpider.
4407 * jit/JITOpcodes.cpp:
4408 (JSC::JIT::emitSlow_op_get_by_val):
4409 (JSC::JIT::emitSlow_op_put_by_val):
4410 * jit/JITPropertyAccess.cpp:
4411 (JSC::JIT::emit_op_get_by_val):
4412 (JSC::JIT::emitSlow_op_get_by_val):
4413 (JSC::JIT::emit_op_put_by_val):
4414 (JSC::JIT::emitSlow_op_put_by_val):
4417 (JSC::): Check m_vectorLength instead of m_fastAccessCutoff when
4418 getting / putting from / to an array. Inline putting past the end of
4421 * runtime/JSArray.cpp:
4422 (JSC::JSArray::JSArray):
4423 (JSC::JSArray::getOwnPropertySlot):
4424 (JSC::JSArray::getOwnPropertyDescriptor):
4425 (JSC::JSArray::put):
4426 (JSC::JSArray::putSlowCase):
4427 (JSC::JSArray::deleteProperty):
4428 (JSC::JSArray::getOwnPropertyNames):
4429 (JSC::JSArray::increaseVectorLength):
4430 (JSC::JSArray::setLength):
4431 (JSC::JSArray::pop):
4432 (JSC::JSArray::push):
4433 (JSC::JSArray::sort):
4434 (JSC::JSArray::fillArgList):
4435 (JSC::JSArray::copyToRegisters):
4436 (JSC::JSArray::compactForSorting):
4437 (JSC::JSArray::checkConsistency):
4438 * runtime/JSArray.h:
4439 (JSC::JSArray::canGetIndex):
4440 (JSC::JSArray::canSetIndex):
4441 (JSC::JSArray::setIndex):
4442 (JSC::JSArray::markChildrenDirect): Removed m_fastAccessCutoff, and
4443 replaced with checks for JSValue() to detect reads and writes from / to
4444 uninitialized parts of the array.
4446 2009-10-02 Jonni Rainisto <jonni.rainisto@nokia.com>
4448 Reviewed by Darin Adler.
4450 Math.random() gives too low values on Win32 when _CRT_RAND_S is not defined
4451 https://bugs.webkit.org/show_bug.cgi?id=29956
4453 * wtf/RandomNumber.cpp:
4454 (WTF::randomNumber): Added PLATFORM(WIN_OS) to handle 15bit rand()
4456 2009-10-02 Geoffrey Garen <ggaren@apple.com>
4458 Reviewed by Sam Weinig.
4460 Take one branch instead of two to test for JSValue().
4462 1.1% SunSpider speedup.
4465 (JSC::JIT::compileOpCall):
4466 * jit/JITOpcodes.cpp:
4467 (JSC::JIT::emit_op_to_jsnumber):
4468 (JSC::JIT::emit_op_create_arguments):
4469 * jit/JITPropertyAccess.cpp:
4470 (JSC::JIT::emitSlow_op_get_by_val):
4471 (JSC::JIT::emit_op_put_by_val): Test for the empty value tag, instead
4472 of testing for the cell tag with a 0 payload.
4474 * runtime/JSValue.cpp:
4475 (JSC::JSValue::description): Added support for dumping the new empty value,
4476 and deleted values, in debug builds.
4478 * runtime/JSValue.h:
4479 (JSC::JSValue::JSValue()): Construct JSValue() with the empty value tag.
4481 (JSC::JSValue::JSValue(JSCell*)): Convert null pointer to the empty value
4482 tag, to avoid having two different c++ versions of null / empty.
4484 (JSC::JSValue::operator bool): Test for the empty value tag, instead
4485 of testing for the cell tag with a 0 payload.
4487 2009-10-02 Steve Falkenburg <sfalken@apple.com>
4489 Reviewed by Mark Rowe.
4491 <https://bugs.webkit.org/show_bug.cgi?id=29989>
4492 Safari version number shouldn't be exposed in WebKit code
4494 For a WebKit version of 532.3.4:
4495 Product version is: 5.32.3.4 (was 4.0.3.0)
4496 File version is: 5.32.3.4 (was 4.532.3.4)
4498 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
4500 2009-10-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
4502 Rubber-stamped by Simon Hausmann.
4504 Fix the Qt on Mac OS X build.
4506 * wtf/FastMalloc.cpp:
4508 2009-10-02 Jørgen Lind <jorgen.lind@nokia.com>
4510 Reviewed by Simon Hausmann.
4512 Allow enabling and disabling of the JIT through a qmake variable.
4514 Qt's configure may set this variable through .qmake.cache if a
4515 commandline option is given and/or the compile test for hwcap.h
4518 * JavaScriptCore.pri:
4520 2009-10-01 Mark Rowe <mrowe@apple.com>
4522 Fix the Tiger build. Don't unconditionally enable 3D canvas as it is not supported on Tiger.
4524 * Configurations/FeatureDefines.xcconfig:
4526 2009-10-01 Yongjun Zhang <yongjun.zhang@nokia.com>
4528 Reviewed by Darin Adler.
4530 https://bugs.webkit.org/show_bug.cgi?id=29187
4532 Don't inline ~ListRefPtr() to work around winscw compiler forward declaration
4533 bug regarding templated classes.
4535 The compiler bug is reported at:
4536 https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812
4538 The change will be reverted when the above bug is fixed in winscw compiler.
4541 (WTF::::~ListRefPtr):
4543 2009-10-01 Zoltan Horvath <zoltan@webkit.org>
4545 Reviewed by Simon Hausmann.
4547 [Qt] Allow custom memory allocation control for the whole JavaScriptCore
4548 https://bugs.webkit.org/show_bug.cgi?id=27029
4550 Since in JavaScriptCore almost every class which has been instantiated by operator new is
4551 inherited from FastAllocBase (bug #20422), we disable customizing global operator new for the Qt-port
4552 when USE_SYSTEM_MALLOC=0.
4554 Add #include <unistd.h> to FastMalloc.cpp because it's used by TCMalloc_PageHeap::scavengerThread().
4555 (It's needed for the functionality of TCmalloc.)
4557 Add TCSystemAlloc.cpp to JavaScriptCore.pri if USE_SYSTEM_MALLOC is disabled.
4559 * JavaScriptCore.pri:
4560 * wtf/FastMalloc.cpp:
4564 2009-09-30 Gabor Loki <loki@inf.u-szeged.hu>
4566 Reviewed by George Staikos.
4568 Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
4569 https://bugs.webkit.org/show_bug.cgi?id=29122
4571 Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
4572 macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
4573 when Thumb-2 instruction set is the required target. The
4574 PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
4575 case where the code is common the PLATFORM(ARM) have to be used.
4577 Modified by George Wright <gwright@rim.com> to correctly work
4578 with the RVCT-defined __TARGET_ARCH_ARM and __TARGET_ARCH_THUMB
4579 compiler macros, as well as adding readability changes.
4583 2009-09-30 Oliver Hunt <oliver@apple.com>
4585 Reviewed by Geoff Garen.
4587 Devirtualise array toString conversion
4589 Tweak the implementation of Array.prototype.toString to have a fast path
4590 when acting on a true JSArray.
4592 * runtime/ArrayPrototype.cpp:
4593 (JSC::arrayProtoFuncToString):
4595 2009-09-30 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
4597 Reviewed by Geoffrey Garen.
4599 Buildfix for platforms using JSVALUE32.
4600 https://bugs.webkit.org/show_bug.cgi?id=29915
4602 After http://trac.webkit.org/changeset/48905 the build broke in JSVALUE32 case.
4603 Also removed unreachable code.
4605 * jit/JITArithmetic.cpp:
4606 (JSC::JIT::emit_op_add):
4607 - Declaration of "OperandTypes types" moved before first use.
4608 - Typos fixed: dst modified to result, regT2 added.
4609 - Unreachable code removed.
4610 (JSC::JIT::emitSlow_op_add):
4611 - Missing declaration of "OperandTypes types" added.
4613 2009-09-30 Janne Koskinen <janne.p.koskinen@digia.com>
4615 Reviewed by Simon Hausmann.
4617 Reduce heap size on Symbian from 64MB to 8MB.
4619 This is not a perfect fix, it requires more fine tuning.
4620 But this makes it possible again to debug in the emulator,
4621 which is more important in order to be able to fix other
4624 * runtime/Collector.h:
4626 2009-09-30 Janne Koskinen <janne.p.koskinen@digia.com>
4628 Reviewed by Simon Hausmann.
4630 Fix CRASH() macro for Symbian build.
4632 * wtf/Assertions.h: Added missing }
4634 2009-09-29 Geoffrey Garen <ggaren@apple.com>
4636 Reviewed by Gavin Barraclough.
4638 Inlined a few math operations.
4640 ~1% SunSpider speedup.
4643 * jit/JITArithmetic.cpp:
4644 (JSC::JIT::compileBinaryArithOpSlowCase):
4645 (JSC::JIT::emitSlow_op_add):
4646 (JSC::JIT::emitSlow_op_mul):
4647 (JSC::JIT::emit_op_sub):
4648 (JSC::JIT::emitSlow_op_sub): Don't take a stub call when operating on
4649 a constant int and a double.
4651 2009-09-28 Oliver Hunt <oliver@apple.com>
4653 Reviewed by Gavin Barraclough.
4655 Tidy up codeblock sampler
4656 https://bugs.webkit.org/show_bug.cgi?id=29836
4658 Some rather simple refactoring of codeblock sampler so that
4659 it's easier for us to use it to find problems in non-jsc
4662 * JavaScriptCore.exp:
4663 * bytecode/SamplingTool.h:
4664 * debugger/Debugger.cpp:
4665 (JSC::evaluateInGlobalCallFrame):
4666 * debugger/DebuggerCallFrame.cpp:
4667 (JSC::DebuggerCallFrame::evaluate):
4668 * interpreter/Interpreter.cpp:
4669 (JSC::Interpreter::Interpreter):
4670 (JSC::Interpreter::execute):
4671 (JSC::Interpreter::privateExecute):
4672 (JSC::Interpreter::enableSampler):
4673 (JSC::Interpreter::dumpSampleData):
4674 (JSC::Interpreter::startSampling):
4675 (JSC::Interpreter::stopSampling):
4676 * interpreter/Interpreter.h:
4677 (JSC::Interpreter::sampler):
4681 * runtime/Completion.cpp:
4684 * runtime/Executable.h:
4685 (JSC::EvalExecutable::EvalExecutable):
4686 (JSC::ProgramExecutable::create):
4687 (JSC::ProgramExecutable::ProgramExecutable):
4688 * runtime/JSGlobalData.cpp:
4689 (JSC::JSGlobalData::startSampling):
4690 (JSC::JSGlobalData::stopSampling):
4691 (JSC::JSGlobalData::dumpSampleData):
4692 * runtime/JSGlobalData.h:
4693 * runtime/JSGlobalObjectFunctions.cpp:
4694 (JSC::globalFuncEval):
4696 2009-09-29 Jeremy Orlow <jorlow@chromium.org>
4698 Reviewed by Dimitri Glazkov.
4700 Add GYP generated files to svn:ignore
4701 https://bugs.webkit.org/show_bug.cgi?id=29895
4703 The following files are generated by JavaScriptCore's GYP file and should be ignored:
4713 * JavaScriptCore.gyp: Changed property svn:ignore.
4715 2009-09-29 Geoffrey Garen <ggaren@apple.com>
4717 Reviewed by Sam Weinig.
4719 Standardized an optimization for adding non-numbers.
4721 SunSpider says maybe a tiny speedup.
4723 * jit/JITArithmetic.cpp:
4724 (JSC::JIT::emit_op_add):
4725 (JSC::JIT::emitSlow_op_add):
4727 2009-09-29 Geoffrey Garen <ggaren@apple.com>
4729 Windows build fix: export a new symbol.
4731 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4732 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4734 2009-09-28 Geoffrey Garen <ggaren@apple.com>
4736 Reviewed by Sam Weinig.
4738 Removed virtual destructor from JSGlobalObjectData to eliminate pointer
4739 fix-ups when accessing JSGlobalObject::d.
4741 Replaced with an explicit destructor function pointer.
4743 6% speedup on bench-alloc-nonretained.js.
4745 * JavaScriptCore.exp:
4746 * runtime/JSGlobalObject.cpp:
4747 (JSC::JSGlobalObject::~JSGlobalObject):
4748 (JSC::JSGlobalObject::destroyJSGlobalObjectData):
4749 * runtime/JSGlobalObject.h:
4750 (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
4751 (JSC::JSGlobalObject::JSGlobalObject):
4753 2009-09-29 Janne Koskinen <janne.p.koskinen@digia.com>
4755 Reviewed by David Kilzer.
4757 [Qt] Assert messages prints visible in Symbian
4758 https://bugs.webkit.org/show_bug.cgi?id=29808
4760 Asserts use vprintf to print the messages to stderr.
4761 In Symbian Open C it is not possible to see stderr so
4762 I routed the messages to stdout instead.
4764 * wtf/Assertions.cpp:
4766 2009-09-29 Janne Koskinen <janne.p.koskinen@digia.com>
4768 Reviewed by Darin Adler.
4770 [Qt] Symbian CRASH macro implementation
4772 Added Symbian specific crash macro that
4773 stops to crash line if JIT debugging is used.
4774 Additional differentiation of access violation
4775 (KERN-EXEC 3) and CRASH panic.
4779 2009-09-28 Mark Rowe <mrowe@apple.com>
4781 Fix the PowerPC build.
4783 * JavaScriptCore.exp:
4785 2009-09-28 Mark Rowe <mrowe@apple.com>
4787 Reviewed by Gavin Barraclough.
4789 <rdar://problem/7195704> JavaScriptCore fails to mark registers when built for x86_64 using LLVM GCC.
4791 * runtime/Collector.cpp:
4792 (JSC::Heap::markCurrentThreadConservatively): Force jmp_buf to use the appropriate alignment for a pointer
4793 to ensure that we correctly interpret the contents of registers during marking.
4795 2009-09-28 Geoffrey Garen <ggaren@apple.com>
4797 Windows build fix: added new exports.
4799 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4800 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4802 2009-09-28 Geoffrey Garen <ggaren@apple.com>
4804 Windows build fix: removed exports that no longer exist.
4806 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4807 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4809 2009-09-28 Geoffrey Garen <ggaren@apple.com>
4811 Reviewed by Darin Adler.
4813 NotNullPassRefPtr: smart pointer optimized for passing references that are not null
4814 https://bugs.webkit.org/show_bug.cgi?id=29822
4816 Added NotNullPassRefPtr, and deployed it in all places that initialize
4819 2.2% speedup on bench-allocate-nonretained.js.
4821 * API/JSCallbackConstructor.cpp:
4822 (JSC::JSCallbackConstructor::JSCallbackConstructor):
4823 * API/JSCallbackConstructor.h:
4824 * API/JSCallbackObject.h:
4825 * API/JSCallbackObjectFunctions.h:
4826 (JSC::JSCallbackObject::JSCallbackObject):
4827 * JavaScriptCore.exp:
4828 * bytecode/CodeBlock.h:
4829 (JSC::CodeBlock::addFunctionDecl):
4830 (JSC::CodeBlock::addFunctionExpr):
4831 * runtime/ArrayConstructor.cpp:
4832 (JSC::ArrayConstructor::ArrayConstructor):
4833 * runtime/ArrayConstructor.h:
4834 * runtime/ArrayPrototype.cpp:
4835 (JSC::ArrayPrototype::ArrayPrototype):
4836 * runtime/ArrayPrototype.h:
4837 * runtime/BooleanConstructor.cpp:
4838 (JSC::BooleanConstructor::BooleanConstructor):
4839 * runtime/BooleanConstructor.h:
4840 * runtime/BooleanObject.cpp:
4841 (JSC::BooleanObject::BooleanObject):
4842 * runtime/BooleanObject.h:
4843 * runtime/BooleanPrototype.cpp:
4844 (JSC::BooleanPrototype::BooleanPrototype):
4845 * runtime/BooleanPrototype.h:
4846 * runtime/DateConstructor.cpp:
4847 (JSC::DateConstructor::DateConstructor):
4848 * runtime/DateConstructor.h:
4849 * runtime/DateInstance.cpp:
4850 (JSC::DateInstance::DateInstance):
4851 * runtime/DateInstance.h:
4852 * runtime/DatePrototype.cpp:
4853 (JSC::DatePrototype::DatePrototype):
4854 * runtime/DatePrototype.h:
4855 * runtime/ErrorConstructor.cpp:
4856 (JSC::ErrorConstructor::ErrorConstructor):
4857 * runtime/ErrorConstructor.h:
4858 * runtime/ErrorInstance.cpp:
4859 (JSC::ErrorInstance::ErrorInstance):
4860 * runtime/ErrorInstance.h:
4861 * runtime/ErrorPrototype.cpp:
4862 (JSC::ErrorPrototype::ErrorPrototype):
4863 * runtime/ErrorPrototype.h:
4864 * runtime/FunctionConstructor.cpp:
4865 (JSC::FunctionConstructor::FunctionConstructor):
4866 * runtime/FunctionConstructor.h:
4867 * runtime/FunctionPrototype.cpp:
4868 (JSC::FunctionPrototype::FunctionPrototype):
4869 * runtime/FunctionPrototype.h:
4870 * runtime/GlobalEvalFunction.cpp:
4871 (JSC::GlobalEvalFunction::GlobalEvalFunction):
4872 * runtime/GlobalEvalFunction.h:
4873 * runtime/InternalFunction.cpp:
4874 (JSC::InternalFunction::InternalFunction):
4875 * runtime/InternalFunction.h:
4876 (JSC::InternalFunction::InternalFunction):
4877 * runtime/JSActivation.cpp:
4878 (JSC::JSActivation::JSActivation):
4879 * runtime/JSActivation.h:
4880 (JSC::JSActivation::JSActivationData::JSActivationData):
4881 * runtime/JSArray.cpp:
4882 (JSC::JSArray::JSArray):
4883 * runtime/JSArray.h:
4884 * runtime/JSByteArray.cpp:
4885 (JSC::JSByteArray::JSByteArray):
4886 * runtime/JSByteArray.h:
4887 * runtime/JSFunction.cpp:
4888 (JSC::JSFunction::JSFunction):
4889 * runtime/JSFunction.h:
4890 * runtime/JSGlobalObject.h:
4891 (JSC::JSGlobalObject::JSGlobalObject):
4892 * runtime/JSONObject.h:
4893 (JSC::JSONObject::JSONObject):
4894 * runtime/JSObject.h:
4895 (JSC::JSObject::JSObject):
4896 (JSC::JSObject::setStructure):
4897 * runtime/JSVariableObject.h:
4898 (JSC::JSVariableObject::JSVariableObject):
4899 * runtime/JSWrapperObject.h:
4900 (JSC::JSWrapperObject::JSWrapperObject):
4901 * runtime/MathObject.cpp:
4902 (JSC::MathObject::MathObject):
4903 * runtime/MathObject.h:
4904 * runtime/NativeErrorConstructor.cpp:
4905 (JSC::NativeErrorConstructor::NativeErrorConstructor):
4906 * runtime/NativeErrorConstructor.h:
4907 * runtime/NativeErrorPrototype.cpp:
4908 (JSC::NativeErrorPrototype::NativeErrorPrototype):
4909 * runtime/NativeErrorPrototype.h:
4910 * runtime/NumberConstructor.cpp:
4911 (JSC::NumberConstructor::NumberConstructor):
4912 * runtime/NumberConstructor.h:
4913 * runtime/NumberObject.cpp:
4914 (JSC::NumberObject::NumberObject):
4915 * runtime/NumberObject.h:
4916 * runtime/NumberPrototype.cpp:
4917 (JSC::NumberPrototype::NumberPrototype):
4918 * runtime/NumberPrototype.h:
4919 * runtime/ObjectConstructor.cpp:
4920 (JSC::ObjectConstructor::ObjectConstructor):
4921 * runtime/ObjectConstructor.h:
4922 * runtime/ObjectPrototype.cpp:
4923 (JSC::ObjectPrototype::ObjectPrototype):
4924 * runtime/ObjectPrototype.h:
4925 * runtime/PropertyNameArray.h:
4926 (JSC::PropertyNameArrayData::setCachedPrototypeChain):
4927 * runtime/PrototypeFunction.cpp:
4928 (JSC::PrototypeFunction::PrototypeFunction):
4929 * runtime/PrototypeFunction.h:
4930 * runtime/RegExpConstructor.cpp:
4931 (JSC::RegExpConstructor::RegExpConstructor):
4932 * runtime/RegExpConstructor.h:
4933 * runtime/RegExpObject.cpp:
4934 (JSC::RegExpObject::RegExpObject):
4935 * runtime/RegExpObject.h:
4936 (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
4937 * runtime/RegExpPrototype.cpp:
4938 (JSC::RegExpPrototype::RegExpPrototype):
4939 * runtime/RegExpPrototype.h:
4940 * runtime/StringConstructor.cpp:
4941 (JSC::StringConstructor::StringConstructor):
4942 * runtime/StringConstructor.h:
4943 * runtime/StringObject.cpp:
4944 (JSC::StringObject::StringObject):
4945 * runtime/StringObject.h:
4946 * runtime/StringObjectThatMasqueradesAsUndefined.h:
4947 (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
4948 * runtime/StringPrototype.cpp:
4949 (JSC::StringPrototype::StringPrototype):
4950 * runtime/StringPrototype.h:
4952 (WTF::NotNullPassRefPtr::NotNullPassRefPtr):
4953 (WTF::NotNullPassRefPtr::~NotNullPassRefPtr):
4954 (WTF::NotNullPassRefPtr::get):
4955 (WTF::NotNullPassRefPtr::clear):
4956 (WTF::NotNullPassRefPtr::releaseRef):
4957 (WTF::NotNullPassRefPtr::operator*):
4958 (WTF::NotNullPassRefPtr::operator->):
4959 (WTF::NotNullPassRefPtr::operator!):
4960 (WTF::NotNullPassRefPtr::operator UnspecifiedBoolType):
4962 (WTF::RefPtr::RefPtr):
4965 2009-09-28 Oliver Hunt <oliver@apple.com>
4967 Reviewed by Geoff Garen.
4969 Hard dependency on SSE2 instruction set with JIT
4970 https://bugs.webkit.org/show_bug.cgi?id=29779
4972 Add floating point support checks to op_jfalse and op_jtrue, and
4973 fix the logic for the slow case of op_add
4975 * jit/JITArithmetic.cpp:
4976 (JSC::JIT::emitSlow_op_add):
4977 * jit/JITOpcodes.cpp:
4978 (JSC::JIT::emit_op_jfalse):
4979 (JSC::JIT::emit_op_jtrue):
4981 2009-09-28 Yaar Schnitman <yaar@chromium.org>
4983 Reviewed by Dimitri Glazkov.
4985 Chromium port - recognize we are being built independently
4986 of chromium and look for dependencies under webkit/chromium rather
4989 https://bugs.webkit.org/show_bug.cgi?id=29722
4991 * JavaScriptCore.gyp/JavaScriptCore.gyp:
4993 2009-09-28 Jakub Wieczorek <faw217@gmail.com>
4995 Reviewed by Simon Hausmann.
4997 [Qt] Implement XSLT support with QtXmlPatterns.
4998 https://bugs.webkit.org/show_bug.cgi?id=28303
5000 * wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define.
5002 2009-09-28 Gabor Loki <loki@inf.u-szeged.hu>
5004 Reviewed by Simon Hausmann.
5006 Remove __clear_cache which is an internal function of GCC
5007 https://bugs.webkit.org/show_bug.cgi?id=28886
5009 Although __clear_cache is exported from GCC, this is an internal
5010 function. GCC makes no promises about it.
5012 * jit/ExecutableAllocator.h:
5013 (JSC::ExecutableAllocator::cacheFlush):
5015 2009-09-28 Sam Weinig <sam@webkit.org>
5017 Reviewed by Oliver Hunt.
5019 Fix an absolute path to somewhere in Oliver's machine to a relative path
5020 for derived JSONObject.lut.h.
5022 * JavaScriptCore.xcodeproj/project.pbxproj:
5024 2009-09-28 Joerg Bornemann <joerg.bornemann@nokia.com>
5026 Reviewed by Simon Hausmann.
5028 Add ARM version detection for Windows CE.
5032 2009-09-26 Yongjun Zhang <yongjun.zhang@nokia.com>
5034 Reviewed by Simon Hausmann.
5036 Add MarkStackSymbian.cpp to build JavascriptCore for Symbian.
5038 Re-use Windows shrinkAllocation implementation because Symbian doesn't
5039 support releasing part of memory region.
5041 Use fastMalloc and fastFree to implement allocateStack and releaseStack
5044 * JavaScriptCore.pri:
5045 * runtime/MarkStack.h:
5046 (JSC::MarkStack::MarkStackArray::shrinkAllocation):
5047 * runtime/MarkStackSymbian.cpp: Added.
5048 (JSC::MarkStack::initializePagesize):
5049 (JSC::MarkStack::allocateStack):
5050 (JSC::MarkStack::releaseStack):
5052 2009-09-25 Gabor Loki <loki@inf.u-szeged.hu>
5054 Reviewed by Gavin Barraclough.
5056 Fix unaligned data access in YARR_JIT on ARMv5 and below.
5057 https://bugs.webkit.org/show_bug.cgi?id=29695
5059 On ARMv5 and below all data access should be naturally aligned.
5060 In the YARR_JIT there is a case when character pairs are
5061 loaded from the input string, but this data access is not
5062 naturally aligned. This fix introduces load32WithUnalignedHalfWords
5063 and branch32WithUnalignedHalfWords functions which contain
5064 naturally aligned memory loads - half word loads - on ARMv5 and below.
5066 * assembler/MacroAssemblerARM.cpp:
5067 (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
5068 * assembler/MacroAssemblerARM.h:
5069 (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
5070 (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
5071 * assembler/MacroAssemblerARMv7.h:
5072 (JSC::MacroAssemblerARMv7::load32WithUnalignedHalfWords):
5073 (JSC::MacroAssemblerARMv7::branch32):
5074 (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
5075 * assembler/MacroAssemblerX86Common.h:
5076 (JSC::MacroAssemblerX86Common::load32WithUnalignedHalfWords):
5077 (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
5079 * yarr/RegexJIT.cpp:
5080 (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
5082 2009-09-25 Jeremy Orlow <jorlow@chromium.org>
5084 This is breaking Chromium try bots, so I'm counting this as a build fix.
5086 Add more svn:ignore exceptions. On different platforms, these files are
5087 generated with different case for JavaScriptCore. Also there are some
5088 wtf project files that get built apparently.
5090 * JavaScriptCore.gyp: Changed property svn:ignore.
5092 2009-09-25 Ada Chan <adachan@apple.com>
5096 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5097 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
5099 2009-09-25 Geoffrey Garen <ggaren@apple.com>
5101 Reviewed by Darin Adler.
5103 Inlined some object creation code, including lexicalGlobalObject access
5104 https://bugs.webkit.org/show_bug.cgi?id=29750
5106 SunSpider says 0.5% faster.
5108 0.8% speedup on bench-alloc-nonretained.js.
5109 2.5% speedup on v8-splay.js.
5111 * interpreter/CachedCall.h:
5112 (JSC::CachedCall::CachedCall):
5113 * interpreter/CallFrame.h:
5114 (JSC::ExecState::lexicalGlobalObject):
5115 (JSC::ExecState::globalThisValue):
5116 * interpreter/Interpreter.cpp:
5117 (JSC::Interpreter::dumpRegisters):
5118 (JSC::Interpreter::execute):
5119 (JSC::Interpreter::privateExecute):
5121 (JSC::DEFINE_STUB_FUNCTION):
5122 * runtime/FunctionConstructor.cpp:
5123 (JSC::constructFunction):
5124 * runtime/ScopeChain.cpp:
5125 (JSC::ScopeChainNode::print):
5126 * runtime/ScopeChain.h:
5127 (JSC::ScopeChainNode::ScopeChainNode):
5128 (JSC::ScopeChainNode::~ScopeChainNode):
5129 (JSC::ScopeChainNode::push):
5130 (JSC::ScopeChain::ScopeChain):
5131 (JSC::ScopeChain::globalObject): Added a globalObject data member to ScopeChainNode.
5132 Replaced accessor function for globalObject() with data member. Replaced
5133 globalThisObject() accessor with direct access to globalThis, to match.
5135 * runtime/JSGlobalObject.cpp:
5136 (JSC::JSGlobalObject::init):
5137 * runtime/JSGlobalObject.h: Inlined array and object construction.
5139 2009-09-25 Laszlo Gombos <laszlo.1.gombos@nokia.com>
5141 Reviewed by Gavin Barraclough.
5143 Add ARM version detection rules for Symbian
5144 https://bugs.webkit.org/show_bug.cgi?id=29715
5148 2009-09-24 Xan Lopez <xlopez@igalia.com>
5150 Reviewed by Mark "Do It!" Rowe.
5152 Some GCC versions don't like C++-style comments in preprocessor
5153 directives, change to C-style to shut them up.
5157 2009-09-24 Oliver Hunt <oliver@apple.com>
5159 Reviewed by Gavin Barraclough.
5161 Division is needlessly slow in 64-bit
5162 https://bugs.webkit.org/show_bug.cgi?id=29723
5164 Add codegen for op_div on x86-64
5167 (JSC::JIT::privateCompileMainPass):
5168 (JSC::JIT::privateCompileSlowCases):
5170 * jit/JITArithmetic.cpp:
5171 (JSC::JIT::compileBinaryArithOpSlowCase):
5172 (JSC::JIT::emit_op_div):
5173 (JSC::JIT::emitSlow_op_div):
5174 * jit/JITInlineMethods.h:
5175 (JSC::JIT::isOperandConstantImmediateDouble):
5176 (JSC::JIT::addressFor):
5177 (JSC::JIT::emitLoadDouble):
5178 (JSC::JIT::emitLoadInt32ToDouble):
5179 (JSC::JIT::emitJumpSlowCaseIfNotImmediateNumber):
5181 2009-09-24 Jeremy Orlow <jorlow@chromium.org>
5183 Reviewed by Dimitri Glazkov.
5185 Add GYP generated files to svn:ignore
5186 https://bugs.webkit.org/show_bug.cgi?id=29724
5188 Adding the following files to the svn:ignore list (all in the
5189 JavaScriptCore/JavaScriptCore.gyp directory)
5191 JavaScriptCore.xcodeproj
5193 JavaScriptCore.vcproj
5194 JavaScriptCore_Debug.rules
5195 JavaScriptCore_Release.rules
5196 JavaScriptCore_Release - no tcmalloc.rules
5197 JavaScriptCore_Purify.rules
5199 JavaScriptCore_Debug_rules.mk
5200 JavaScriptCore_Release_rules.mk
5201 JavaScriptCore_Release - no tcmalloc_rules.mk
5202 JavaScriptCore_Purify_rules.mk
5203 JavaScriptCore.scons
5204 JavaScriptCore_main.scons
5206 * JavaScriptCore.gyp: Changed property svn:ignore.
5208 2009-09-24 Yong Li <yong.li@torchmobile.com>
5210 Reviewed by Adam Barth.
5212 Replace platform-dependent code with WTF::currentTime()
5213 https://bugs.webkit.org/show_bug.cgi?id=29148
5218 (StopWatch::getElapsedMS):
5219 * runtime/TimeoutChecker.cpp:
5222 2009-09-24 Mark Rowe <mrowe@apple.com>
5224 Reviewed by Sam Weinig.
5226 <rdar://problem/7215058> FastMalloc scavenging thread should be named
5228 * wtf/FastMalloc.cpp:
5229 (WTF::TCMalloc_PageHeap::scavengerThread): Set the thread name.
5230 * wtf/Platform.h: Move the knowledge of whether pthread_setname_np exists to here as HAVE(PTHREAD_SETNAME_NP).
5231 * wtf/ThreadingPthreads.cpp:
5232 (WTF::setThreadNameInternal): Use HAVE(PTHREAD_SETNAME_NP).
5234 2009-09-24 Geoffrey Garen <ggaren@apple.com>
5236 Reviewed by Sam Weinig.
5238 Renamed clear to removeAll, as suggested by Darin Adler.
5240 * wtf/HashCountedSet.h:
5243 2009-09-24 Mark Rowe <mrowe@apple.com>
5245 Reviewed by Gavin Barraclough.
5247 Fix FastMalloc to build with assertions enabled.
5249 * wtf/FastMalloc.cpp:
5250 (WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
5252 (TCMalloc_SpinLock::IsHeld):
5254 2009-09-24 Geoffrey Garen <ggaren@apple.com>
5256 Suggested by Darin Adler.
5258 Removed some unnecessary parameter names.
5260 * wtf/HashCountedSet.h:
5262 2009-09-24 Janne Koskinen <janne.p.koskinen@digia.com>
5264 Reviewed by Simon Hausmann.
5266 On Windows JSChar is typedef'ed to wchar_t.
5268 When building with WINSCW for Symbian we need to do the
5271 * API/JSStringRef.h:
5273 2009-09-23 Geoffrey Garen <ggaren@apple.com>
5275 A piece of my last patch that I forgot.
5277 * wtf/HashCountedSet.h:
5278 (WTF::::clear): Added HashCountedSet::clear.
5280 2009-09-24 Gabor Loki <loki@inf.u-szeged.hu>
5282 Reviewed by Gavin Barraclough.
5284 Avoid __clear_cache built-in function if DISABLE_BUILTIN_CLEAR_CACHE define is set
5285 https://bugs.webkit.org/show_bug.cgi?id=28886
5287 There are some GCC packages (for example GCC-2006q3 from CodeSourcery)
5288 which contain __clear_cache built-in function only for C while the C++
5289 version of __clear_cache is missing on ARM architectures.
5291 Fixed a small bug in the inline assembly of cacheFlush function on
5294 * jit/ExecutableAllocator.h:
5295 (JSC::ExecutableAllocator::cacheFlush):
5297 2009-09-23 Geoffrey Garen <ggaren@apple.com>
5299 Reviewed by Sam Weinig.
5301 Added the ability to swap vectors with inline capacities, so you can
5302 store a vector with inline capacity in a hash table.
5306 (WTF::VectorBuffer::swap):
5308 2009-09-23 David Kilzer <ddkilzer@apple.com>
5310 Move definition of USE(PLUGIN_HOST_PROCESS) from WebKitPrefix.h to Platform.h
5312 Reviewed by Mark Rowe.
5314 * wtf/Platform.h: Define WTF_USE_PLUGIN_HOST_PROCESS to 1 when
5315 building on 64-bit SnowLeopard. Define to 0 elsewhere.
5317 2009-09-22 Oliver Hunt <oliver@apple.com>
5319 Reviewed by Geoff Garen.
5321 Code sampling builds are broken.
5322 https://bugs.webkit.org/show_bug.cgi?id=29662
5326 * bytecode/EvalCodeCache.h:
5327 (JSC::EvalCodeCache::get):
5328 * bytecode/SamplingTool.cpp:
5329 (JSC::ScriptSampleRecord::sample):
5330 (JSC::SamplingTool::doRun):
5331 (JSC::SamplingTool::notifyOfScope):
5332 (JSC::compareScriptSampleRecords):
5333 (JSC::SamplingTool::dump):
5334 * bytecode/SamplingTool.h:
5335 (JSC::ScriptSampleRecord::ScriptSampleRecord):
5336 (JSC::ScriptSampleRecord::~ScriptSampleRecord):
5337 (JSC::SamplingTool::SamplingTool):
5338 * bytecompiler/BytecodeGenerator.cpp:
5339 (JSC::BytecodeGenerator::BytecodeGenerator):
5340 (JSC::BytecodeGenerator::emitNewFunction):
5341 (JSC::BytecodeGenerator::emitNewFunctionExpression):
5342 * bytecompiler/BytecodeGenerator.h:
5343 (JSC::BytecodeGenerator::makeFunction):
5344 * debugger/Debugger.cpp:
5345 (JSC::evaluateInGlobalCallFrame):
5346 * debugger/DebuggerCallFrame.cpp:
5347 (JSC::DebuggerCallFrame::evaluate):
5349 (JSC::ScopeNode::ScopeNode):
5350 * runtime/Completion.cpp:
5353 * runtime/Executable.cpp:
5354 (JSC::FunctionExecutable::fromGlobalCode):
5355 * runtime/Executable.h:
5356 (JSC::ScriptExecutable::ScriptExecutable):
5357 (JSC::EvalExecutable::EvalExecutable):
5358 (JSC::EvalExecutable::create):
5359 (JSC::ProgramExecutable::ProgramExecutable):
5360 (JSC::FunctionExecutable::create):
5361 (JSC::FunctionExecutable::FunctionExecutable):
5362 * runtime/JSGlobalObjectFunctions.cpp:
5363 (JSC::globalFuncEval):
5365 2009-09-22 Darin Adler <darin@apple.com>
5367 Reviewed by Sam Weinig.
5369 * wtf/Forward.h: Added PassOwnPtr.
5371 2009-09-22 Yaar Schnitman <yaar@chromium.org>
5373 Reviewed by David Levin.
5375 Ported chromium.org's javascriptcore.gyp for the webkit chromium port.
5377 https://bugs.webkit.org/show_bug.cgi?id=29617
5379 * JavaScriptCore.gyp/JavaScriptCore.gyp: Added.
5381 2009-09-22 Thiago Macieira <thiago.macieira@nokia.com>
5383 Reviewed by Simon Hausmann.
5385 Fix compilation with WINSCW: no varargs macros
5387 Disable variadic arguments for WINSCW just like we do
5392 2009-09-22 Kent Hansen <khansen@trolltech.com>
5394 Reviewed by Simon Hausmann.
5396 Disable variadic macros on MSVC7.
5398 This was originally added in r26589 but not extended
5399 when LOG_DISABLED/ASSERT_DISABLED was introduced.
5403 2009-09-22 Simon Hausmann <simon.hausmann@nokia.com>
5405 Unreviewed build fix for Windows CE < 5
5407 Define WINCEBASIC to disable the IsDebuggerPresent() code in
5410 * JavaScriptCore.pri:
5412 2009-09-22 Joerg Bornemann <joerg.bornemann@nokia.com>
5414 Reviewed by Simon Hausmann.
5416 Fix major memory leak in JavaScriptCore RegisterFile on Windows CE
5418 https://bugs.webkit.org/show_bug.cgi?id=29367
5420 On Widows CE we must decommit all committed pages before we release
5421 them. See VirtualFree documentation.
5422 Desktop Windows behaves much smoother in this situation.
5424 * interpreter/RegisterFile.cpp:
5425 (JSC::RegisterFile::~RegisterFile):
5427 2009-09-21 Greg Bolsinga <bolsinga@apple.com>
5429 Reviewed by Simon Fraser & Sam Weinig.
5431 Add ENABLE(ORIENTATION_EVENTS)
5432 https://bugs.webkit.org/show_bug.cgi?id=29508
5434 * wtf/Platform.h: Also sort PLATFORM(IPHONE) #defines.
5436 2009-09-21 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
5438 Reviewed by Eric Seidel.
5440 [Fix] SourceCode's uninitialized member
5442 Potential source of crashes and bugs was fixed. Default constructor
5443 didn't initialized m_provider member.
5445 https://bugs.webkit.org/show_bug.cgi?id=29364
5447 * parser/SourceCode.h:
5448 (JSC::SourceCode::SourceCode):
5450 2009-09-21 Oliver Hunt <oliver@apple.com>
5452 Reviewed by Geoff Garen.
5454 REGRESSION (r48582): Crash in StructureStubInfo::initPutByIdTransition when reloading trac.webkit.org
5455 https://bugs.webkit.org/show_bug.cgi?id=29599
5457 It is unsafe to attempt to cache new property transitions on
5458 dictionaries of any type.
5460 * interpreter/Interpreter.cpp:
5461 (JSC::Interpreter::tryCachePutByID):
5463 (JSC::JITThunks::tryCachePutByID):
5465 2009-09-21 Oliver Hunt <oliver@apple.com>
5467 RS=Maciej Stachowiak.
5469 Re-land SNES fix with corrected assertion.
5471 * interpreter/Interpreter.cpp:
5472 (JSC::Interpreter::resolveGlobal):
5473 (JSC::Interpreter::tryCachePutByID):
5474 (JSC::Interpreter::tryCacheGetByID):
5476 (JSC::JITThunks::tryCachePutByID):
5477 (JSC::JITThunks::tryCacheGetByID):
5478 (JSC::DEFINE_STUB_FUNCTION):
5479 * runtime/BatchedTransitionOptimizer.h:
5480 (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
5481 * runtime/JSObject.cpp:
5482 (JSC::JSObject::removeDirect):
5483 * runtime/Structure.cpp:
5484 (JSC::Structure::Structure):
5485 (JSC::Structure::getEnumerablePropertyNames):
5486 (JSC::Structure::despecifyDictionaryFunction):
5487 (JSC::Structure::addPropertyTransitionToExistingStructure):
5488 (JSC::Structure::addPropertyTransition):
5489 (JSC::Structure::removePropertyTransition):
5490 (JSC::Structure::toDictionaryTransition):
5491 (JSC::Structure::toCacheableDictionaryTransition):
5492 (JSC::Structure::toUncacheableDictionaryTransition):
5493 (JSC::Structure::fromDictionaryTransition):
5494 (JSC::Structure::removePropertyWithoutTransition):
5495 * runtime/Structure.h:
5496 (JSC::Structure::isDictionary):
5497 (JSC::Structure::isUncacheableDictionary):
5499 * runtime/StructureChain.cpp:
5500 (JSC::StructureChain::isCacheable):
5502 2009-09-21 Adam Roben <aroben@apple.com>
5504 Revert r48573, as it caused many assertion failures
5506 * interpreter/Interpreter.cpp:
5508 * runtime/BatchedTransitionOptimizer.h:
5509 * runtime/JSObject.cpp:
5510 * runtime/Structure.cpp:
5511 * runtime/Structure.h:
5512 * runtime/StructureChain.cpp:
5514 2009-09-21 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
5516 Unreviewed make dist build fix. Missing files.
5520 2009-09-19 Gavin Barraclough <barraclough@apple.com>
5522 Reviewed by Sam 'Cabin Boy' Weinig.
5524 Fix stack alignment with ARM THUMB2 JIT.
5525 https://bugs.webkit.org/show_bug.cgi?id=29526
5527 Stack is currently being decremented by 0x3c, bump this to 0x40 to make this a
5528 multiple of 16 bytes.
5531 (JSC::JITThunks::JITThunks):
5534 2009-09-20 Oliver Hunt <oliver@apple.com>
5536 Reviewed by Maciej Stachowiak.
5539 https://bugs.webkit.org/show_bug.cgi?id=29534
5541 The problem was that the emulator used multiple classes with
5542 more properties than our dictionary cutoff allowed, this resulted
5543 in more or less all critical logic inside the emulator requiring
5544 uncached property access.
5546 Rather than simply bumping the dictionary cutoff, this patch
5547 recognises that there are two ways to create a "dictionary"
5548 structure. Either by adding a large number of properties, or
5549 by removing a property. In the case of adding properties we
5550 know all the existing properties will maintain their existing
5551 offsets, so we could cache access to those properties, if we
5552 know they won't be removed.
5554 To make this possible, this patch adds the logic required to
5555 distinguish a dictionary created by addition from one created
5556 by removal. With this logic in place we can now cache access
5557 to objects with large numbers of properties.
5559 SNES performance improved by more than 6x.
5561 * interpreter/Interpreter.cpp:
5562 (JSC::Interpreter::resolveGlobal):
5563 (JSC::Interpreter::tryCachePutByID):
5564 (JSC::Interpreter::tryCacheGetByID):
5566 (JSC::JITThunks::tryCachePutByID):
5567 (JSC::JITThunks::tryCacheGetByID):
5568 (JSC::DEFINE_STUB_FUNCTION):
5569 * runtime/BatchedTransitionOptimizer.h:
5570 (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
5571 * runtime/JSObject.cpp:
5572 (JSC::JSObject::removeDirect):
5573 * runtime/Structure.cpp:
5574 (JSC::Structure::Structure):
5575 (JSC::Structure::getEnumerablePropertyNames):
5576 (JSC::Structure::despecifyDictionaryFunction):
5577 (JSC::Structure::addPropertyTransitionToExistingStructure):
5578 (JSC::Structure::addPropertyTransition):
5579 (JSC::Structure::removePropertyTransition):
5580 (JSC::Structure::toDictionaryTransition):
5581 (JSC::Structure::toCacheableDictionaryTransition):
5582 (JSC::Structure::toUncacheableDictionaryTransition):
5583 (JSC::Structure::fromDictionaryTransition):
5584 (JSC::Structure::removePropertyWithoutTransition):
5585 * runtime/Structure.h:
5586 (JSC::Structure::isDictionary):
5587 (JSC::Structure::isUncacheableDictionary):
5589 * runtime/StructureChain.cpp:
5590 (JSC::StructureChain::isCacheable):
5592 2009-09-19 Oliver Hunt <oliver@apple.com>
5594 Reviewed by Maciej Stachowiak.
5596 Implement ES5 Object.create function
5597 https://bugs.webkit.org/show_bug.cgi?id=29524
5599 Implement Object.create. Very simple patch, effectively Object.defineProperties
5600 only creating the target object itself.
5602 * runtime/CommonIdentifiers.h:
5603 * runtime/ObjectConstructor.cpp:
5604 (JSC::ObjectConstructor::ObjectConstructor):
5605 (JSC::objectConstructorCreate):
5607 2009-09-19 Dan Bernstein <mitz@apple.com>
5609 Fix clean debug builds.
5611 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
5613 2009-09-19 Joerg Bornemann <joerg.bornemann@nokia.com>
5615 Reviewed by George Staikos.
5617 QtWebKit Windows CE compile fix
5619 https://bugs.webkit.org/show_bug.cgi?id=29379
5621 There is no _aligned_alloc or _aligned_free on Windows CE.
5622 We just use the Windows code that was there before and use VirtualAlloc.
5623 But that also means that the BLOCK_SIZE must be 64K as this function
5624 allocates on 64K boundaries.
5626 * runtime/Collector.cpp:
5627 (JSC::Heap::allocateBlock):
5628 (JSC::Heap::freeBlock):
5629 * runtime/Collector.h:
5631 2009-09-19 Oliver Hunt <oliver@apple.com>
5633 Reviewed by Sam Weinig.
5635 Implement ES5 Object.defineProperties function
5636 https://bugs.webkit.org/show_bug.cgi?id=29522
5638 Implement Object.defineProperties. Fairly simple patch, simply makes use of
5639 existing functionality used for defineProperty.
5641 * runtime/CommonIdentifiers.h:
5642 * runtime/ObjectConstructor.cpp:
5643 (JSC::ObjectConstructor::ObjectConstructor):
5644 (JSC::defineProperties):
5645 (JSC::objectConstructorDefineProperties):
5647 2009-09-19 Oliver Hunt <oliver@apple.com>
5649 Reviewed by NOBODY (Build fix).
5651 Windows build fix part2
5653 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5654 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
5656 2009-09-19 Oliver Hunt <oliver@apple.com>
5658 Reviewed by NOBODY (Buildfix).
5660 Windows build fix part 1.
5662 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5663 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
5665 2009-09-18 Oliver Hunt <oliver@apple.com>
5667 Reviewed by Geoff Garen.
5669 Implement ES5 Object.defineProperty function
5670 https://bugs.webkit.org/show_bug.cgi?id=29503
5672 Implement Object.defineProperty. This requires adding the API to
5673 ObjectConstructor, along with a helper function that implements the
5674 ES5 internal [[ToPropertyDescriptor]] function. It then adds
5675 JSObject::defineOwnProperty that implements the appropriate ES5 semantics.
5676 Currently defineOwnProperty uses a delete followed by a put to redefine
5677 attributes of a property, clearly this is less efficient than it could be
5678 but we can improve this if it needs to be possible in future.
5680 * JavaScriptCore.exp:
5681 * debugger/DebuggerActivation.cpp:
5682 (JSC::DebuggerActivation::defineGetter):
5683 (JSC::DebuggerActivation::defineSetter):
5684 * debugger/DebuggerActivation.h:
5685 * interpreter/Interpreter.cpp:
5686 (JSC::Interpreter::privateExecute):
5688 Update defineGetter/Setter calls
5689 * runtime/CommonIdentifiers.h:
5690 * runtime/JSArray.cpp:
5691 (JSC::JSArray::getOwnPropertySlot):
5692 * runtime/JSGlobalObject.cpp:
5693 (JSC::JSGlobalObject::defineGetter):
5694 (JSC::JSGlobalObject::defineSetter):
5695 * runtime/JSGlobalObject.h:
5696 * runtime/JSObject.cpp:
5697 (JSC::JSObject::defineGetter):
5698 (JSC::JSObject::defineSetter):
5699 (JSC::putDescriptor):
5700 (JSC::JSObject::defineOwnProperty):
5701 * runtime/JSObject.h:
5702 * runtime/ObjectConstructor.cpp:
5703 (JSC::ObjectConstructor::ObjectConstructor):
5704 (JSC::objectConstructorGetOwnPropertyDescriptor):
5705 (JSC::toPropertyDescriptor):
5706 (JSC::objectConstructorDefineProperty):
5707 * runtime/ObjectPrototype.cpp:
5708 (JSC::objectProtoFuncDefineGetter):
5709 (JSC::objectProtoFuncDefineSetter):
5710 * runtime/PropertyDescriptor.cpp:
5711 (JSC::PropertyDescriptor::writable):
5712 (JSC::PropertyDescriptor::enumerable):
5713 (JSC::PropertyDescriptor::configurable):
5714 (JSC::PropertyDescriptor::isDataDescriptor):
5715 (JSC::PropertyDescriptor::isGenericDescriptor):
5716 (JSC::PropertyDescriptor::isAccessorDescriptor):
5717 (JSC::PropertyDescriptor::getter):
5718 (JSC::PropertyDescriptor::setter):
5719 (JSC::PropertyDescriptor::setDescriptor):
5720 (JSC::PropertyDescriptor::setAccessorDescriptor):
5721 (JSC::PropertyDescriptor::setWritable):
5722 (JSC::PropertyDescriptor::setEnumerable):
5723 (JSC::PropertyDescriptor::setConfigurable):
5724 (JSC::PropertyDescriptor::setSetter):
5725 (JSC::PropertyDescriptor::setGetter):
5726 (JSC::PropertyDescriptor::equalTo):
5727 (JSC::PropertyDescriptor::attributesEqual):
5728 (JSC::PropertyDescriptor::attributesWithOverride):
5729 * runtime/PropertyDescriptor.h:
5730 (JSC::PropertyDescriptor::PropertyDescriptor):
5731 (JSC::PropertyDescriptor::value):
5732 (JSC::PropertyDescriptor::setValue):
5733 (JSC::PropertyDescriptor::isEmpty):
5734 (JSC::PropertyDescriptor::writablePresent):
5735 (JSC::PropertyDescriptor::enumerablePresent):
5736 (JSC::PropertyDescriptor::configurablePresent):
5737 (JSC::PropertyDescriptor::setterPresent):
5738 (JSC::PropertyDescriptor::getterPresent):
5739 (JSC::PropertyDescriptor::operator==):
5740 (JSC::PropertyDescriptor::):
5742 2009-09-18 Gabor Loki <loki@inf.u-szeged.hu>
5744 Reviewed by Gavin Barraclough.
5746 Build fix to enable ARM_THUMB2 on Linux
5747 https://bugs.webkit.org/show_bug.cgi?id=
5749 * jit/ExecutableAllocator.h:
5750 (JSC::ExecutableAllocator::cacheFlush):
5754 2009-09-18 Gabor Loki <loki@inf.u-szeged.hu>
5756 Reviewed by Gavin Barraclough.
5758 Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
5759 https://bugs.webkit.org/show_bug.cgi?id=29122
5761 Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
5762 macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
5763 when Thumb-2 instruction set is the required target. The
5764 PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
5765 case where the code is common the PLATFORM(ARM) have to be used.
5767 * assembler/ARMAssembler.cpp:
5768 * assembler/ARMAssembler.h:
5769 * assembler/ARMv7Assembler.h:
5770 * assembler/MacroAssembler.h:
5771 * assembler/MacroAssemblerARM.cpp:
5772 * assembler/MacroAssemblerARM.h:
5773 * assembler/MacroAssemblerCodeRef.h:
5774 (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
5775 * jit/ExecutableAllocator.h:
5777 * jit/JITInlineMethods.h:
5778 (JSC::JIT::beginUninterruptedSequence):
5779 (JSC::JIT::preserveReturnAddressAfterCall):
5780 (JSC::JIT::restoreReturnAddressBeforeReturn):
5781 (JSC::JIT::restoreArgumentReference):
5782 (JSC::JIT::restoreArgumentReferenceForTrampoline):
5783 * jit/JITOpcodes.cpp:
5785 (JSC::JITThunks::JITThunks):
5788 * yarr/RegexJIT.cpp:
5789 (JSC::Yarr::RegexGenerator::generateEnter):
5791 2009-09-18 Joerg Bornemann <joerg.bornemann@nokia.com>
5793 Reviewed by Simon Hausmann.
5795 Fix the Qt/Windows CE build.
5797 * JavaScriptCore.pri: Build the ce_time.cpp functions from
5798 within Qt externally.
5799 * wtf/DateMath.cpp: Removed unnecessary Qt #ifdef, for the
5800 Qt build these functions are no external, too.
5802 2009-09-17 Janne Koskinen <janne.p.koskinen@digia.com>
5804 Reviewed by Simon Hausmann.
5806 Symbian/WINSCW build fox.
5808 Repeat Q_OS_WIN wchar_t hack for WINSCW, similar to
5811 WINSCW defines wchar_t, thus UChar has to be wchar_t
5813 * wtf/unicode/qt4/UnicodeQt4.h:
5815 2009-09-17 Janne Koskinen <janne.p.koskinen@digia.com>
5817 Reviewed by Simon Hausmann.
5819 Symbian/WINSCW build fix.
5821 https://bugs.webkit.org/show_bug.cgi?id=29186
5823 WINSCW Template specialisation name in declaration must the be the same as in implementation.
5825 * runtime/LiteralParser.h:
5827 2009-09-15 Norbert Leser <norbert.leser@nokia.com>
5829 Reviewed by Darin Adler.
5831 https://bugs.webkit.org/show_bug.cgi?id=27060
5833 Symbian compiler for emulator target (WINSCW) fails with
5834 "illegal operand" for m_attributesInPrevious in structure.ccp
5835 (when calling make_pair functions).
5836 This error is apparently due to the compiler not properly
5837 resolving the unsigned type of the declared bitfield.
5839 Initial patch explicitly casted m_attributesInPrevious
5840 to unsigned, but since bitfield optimization is not critical for
5841 the emulator target, this conditional change in header file
5842 appears to be least intrusive.
5844 * runtime/Structure.h:
5846 2009-09-16 Gabor Loki <loki@inf.u-szeged.hu>
5848 Reviewed by Darin Adler.
5850 Fix GCC warnings on ARM_THUMB2 platform
5852 * assembler/ARMv7Assembler.h:
5853 (JSC::ARMThumbImmediate::countLeadingZerosPartial):
5854 * assembler/MacroAssemblerARMv7.h:
5855 (JSC::MacroAssemblerARMv7::branchTruncateDoubleToInt32):
5856 (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding):
5858 2009-09-16 Greg Bolsinga <bolsinga@apple.com>
5860 Add ENABLE(INSPECTOR)
5861 https://bugs.webkit.org/show_bug.cgi?id=29260
5863 Reviewed by David Kilzer.
5867 2009-09-16 Greg Bolsinga <bolsinga@apple.com>
5869 Add ENABLE(CONTEXT_MENUS)
5870 https://bugs.webkit.org/show_bug.cgi?id=29225
5872 Reviewed by David Kilzer.
5876 2009-09-16 Benjamin C Meyer <benjamin.meyer@torchmobile.com>
5878 Reviewed by Eric Seidel.
5880 The webkit stdint and stdbool headers exists because
5881 the compiler MSVC doesn't include them. The check
5882 should not check for PLATFORM(WIN_OS) but for MSVC.
5884 * os-win32/stdbool.h:
5885 * os-win32/stdint.h:
5887 2009-09-16 Greg Bolsinga <bolsinga@apple.com>
5889 Add ENABLE(DRAG_SUPPORT)
5890 https://bugs.webkit.org/show_bug.cgi?id=29233
5892 Reviewed by David Kilzer.
5896 2009-09-16 Kevin Ollivier <kevino@theolliviers.com>
5898 waf build fix after flag was moved to correct place.
5902 2009-09-16 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
5904 Reviewed by Simon Hausmann.
5906 [Qt] Build fix for 64-bit Qt on Mac OS X
5908 * wtf/Platform.h: Use JSVALUE64 on DARWIN, not only on MAC
5910 2009-09-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
5912 Reviewed by Simon Hausmann.
5914 [Qt] Fix wtf/ThreadSpecific.h under Qt to free thread local objects.
5915 https://bugs.webkit.org/show_bug.cgi?id=29295
5917 This is an important fix when JavaScript workers are in use, since
5918 unfreed ThreadGlobalDatas leak a big amount of memory (50-100k each).
5919 QThreadStorage calls the destructor of a given object, which is the
5920 ThreadSpecific::Data. Unlike pthread, Qt is object oriented, and does
5921 not support the calling of a static utility function when the thread
5922 is about to close. In this patch we call the ThreadSpecific::destroy()
5923 utility function from the destructor of ThreadSpecific::Data. Moreover,
5924 since Qt resets all thread local values to 0 before the calling of the
5925 appropriate destructors, we set back the pointer to its original value.
5926 This is necessary because the get() method of the ThreadSpecific
5927 object may be called during the exuction of the destructor.
5929 * wtf/ThreadSpecific.h:
5930 (WTF::ThreadSpecific::Data::~Data):
5931 (WTF::::~ThreadSpecific):
5935 2009-09-10 Oliver Hunt <oliver@apple.com>
5937 Reviewed by Geoff Garen.
5939 Allow anonymous storage inside JSObject
5940 https://bugs.webkit.org/show_bug.cgi?id=29168
5942 Add the concept of anonymous slots to Structures so that it is
5943 possible to store references to values that need marking in the
5944 standard JSObject storage buffer. This allows us to reduce the
5945 malloc overhead of some objects (by allowing them to store JS
5946 values in the inline storage of the object) and reduce the
5947 dependence of custom mark functions (if all an objects children
5948 are in the standard object property storage there's no need to
5949 mark them manually).
5951 * JavaScriptCore.exp:
5952 * runtime/JSObject.h:
5953 (JSC::JSObject::putAnonymousValue):
5954 (JSC::JSObject::getAnonymousValue):
5955 (JSC::JSObject::addAnonymousSlots):
5956 * runtime/JSWrapperObject.h:
5957 (JSC::JSWrapperObject::createStructure):
5958 (JSC::JSWrapperObject::JSWrapperObject):
5959 (JSC::JSWrapperObject::setInternalValue):
5960 * runtime/PropertyMapHashTable.h:
5961 * runtime/Structure.cpp:
5962 (JSC::Structure::~Structure):
5963 (JSC::Structure::materializePropertyMap):
5964 (JSC::Structure::addAnonymousSlotsTransition):
5965 (JSC::Structure::copyPropertyTable):
5966 (JSC::Structure::put):
5967 (JSC::Structure::rehashPropertyMapHashTable):
5968 * runtime/Structure.h:
5969 (JSC::Structure::propertyStorageSize):
5970 (JSC::StructureTransitionTable::reifySingleTransition):
5971 * runtime/StructureTransitionTable.h:
5972 (JSC::StructureTransitionTable::TransitionTable::addSlotTransition):
5973 (JSC::StructureTransitionTable::TransitionTable::removeSlotTransition):
5974 (JSC::StructureTransitionTable::TransitionTable::getSlotTransition):
5975 (JSC::StructureTransitionTable::getAnonymousSlotTransition):
5976 (JSC::StructureTransitionTable::addAnonymousSlotTransition):
5977 (JSC::StructureTransitionTable::removeAnonymousSlotTransition):
5979 2009-09-15 Alex Milowski <alex@milowski.com>
5981 Reviewed by Tor Arne Vestbø.
5983 Added the ENABLE_MATHML define to the features
5985 * Configurations/FeatureDefines.xcconfig:
5987 2009-09-15 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
5989 Reviewed by Tor Arne Vestbø.
5991 [Qt] Build fix for windows.
5993 After http://trac.webkit.org/changeset/47795 the MinGW build broke,
5994 because MinGW has __mingw_aligned_malloc instead of _aligned_malloc.
5996 * runtime/Collector.cpp:
5997 (JSC::Heap::allocateBlock): MinGW case added.
5998 (JSC::Heap::freeBlock): MinGW case added.
6000 2009-09-15 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
6002 Reviewed by Tor Arne Vestbø.
6004 [Qt] Build fix for Windows/MinGW
6006 https://bugs.webkit.org/show_bug.cgi?id=29268
6008 * wtf/Platform.h: JSVALUE32_64 temporarily disabled on PLATFORM(WIN_OS) with COMPILER(MINGW)
6010 2009-09-14 Gabor Loki <loki@inf.u-szeged.hu>
6012 Reviewed by Gavin Barraclough.
6014 Detect VFP at runtime in generic ARM port on Linux platform.
6015 https://bugs.webkit.org/show_bug.cgi?id=29076
6017 * JavaScriptCore.pri:
6018 * assembler/MacroAssemblerARM.cpp: Added.
6019 (JSC::isVFPPresent):
6020 * assembler/MacroAssemblerARM.h:
6021 (JSC::MacroAssemblerARM::supportsFloatingPoint):
6023 2009-09-14 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
6025 Reviewed by Tor Arne Vestbø.
6027 [Qt] Build fix for windows build.
6029 * JavaScriptCore.pri: Correct a logic error.
6030 * pcre/dftables: Add missing paranthesis for tmpdir function.
6032 2009-09-12 Oliver Hunt <oliver@apple.com>
6034 Reviewed by NOBODY (Build fix).
6036 Build fix for windows exports (again).
6038 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6039 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
6041 2009-09-12 Oliver Hunt <oliver@apple.com>
6043 Reviewed by NOBODY (Build fix).
6045 Build fix for windows exports.
6047 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6048 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
6050 2009-09-12 Oliver Hunt <oliver@apple.com>
6052 Reviewed by NOBODY (Build fix).
6054 Correct fix for non-allinonefile builds
6056 * runtime/ObjectConstructor.cpp:
6058 2009-09-12 Oliver Hunt <oliver@apple.com>
6060 Reviewed by NOBODY (Build fix).
6062 Fix non-allinonefile builds
6064 * runtime/ObjectConstructor.cpp:
6066 2009-09-12 Oliver Hunt <oliver@apple.com>
6068 Reviewed by Maciej Stachowiak.
6070 [ES5] Implement Object.keys
6071 https://bugs.webkit.org/show_bug.cgi?id=29170
6073 This patch basically requires two separate steps, the first is to split getPropertyNames
6074 into two functions -- getOwnPropertyNames and getPropertyNames, basically making them behave
6075 in the same way as getOwnPropertySlot and getPropertySlot. In essence getOwnPropertyNames
6076 produces the list of properties on an object excluding its prototype chain and getPropertyNames
6077 just iterates the the object and its prototype chain calling getOwnPropertyNames at each level.
6079 * API/JSCallbackObject.h:
6080 * API/JSCallbackObjectFunctions.h:
6081 (JSC::::getOwnPropertyNames):
6082 * JavaScriptCore.exp:
6083 * debugger/DebuggerActivation.cpp:
6084 (JSC::DebuggerActivation::getOwnPropertyNames):
6085 * debugger/DebuggerActivation.h:
6086 * runtime/CommonIdentifiers.h:
6087 * runtime/JSArray.cpp:
6088 (JSC::JSArray::getOwnPropertyNames):
6089 * runtime/JSArray.h:
6090 * runtime/JSByteArray.cpp:
6091 (JSC::JSByteArray::getOwnPropertyNames):
6092 * runtime/JSByteArray.h:
6093 * runtime/JSNotAnObject.cpp:
6094 (JSC::JSNotAnObject::getOwnPropertyNames):
6095 * runtime/JSNotAnObject.h:
6096 * runtime/JSObject.cpp:
6097 (JSC::JSObject::getOwnPropertyNames):
6098 * runtime/JSObject.h:
6099 * runtime/JSVariableObject.cpp:
6100 (JSC::JSVariableObject::getOwnPropertyNames):
6101 * runtime/JSVariableObject.h:
6102 * runtime/ObjectConstructor.cpp:
6103 (JSC::ObjectConstructor::ObjectConstructor):
6104 (JSC::objectConstructorKeys):
6105 * runtime/RegExpMatchesArray.h:
6106 (JSC::RegExpMatchesArray::getOwnPropertyNames):
6107 * runtime/StringObject.cpp:
6108 (JSC::StringObject::getOwnPropertyNames):
6109 * runtime/StringObject.h:
6110 * runtime/Structure.cpp:
6111 (JSC::Structure::getOwnEnumerablePropertyNames):
6112 (JSC::Structure::getEnumerablePropertyNames):
6113 * runtime/Structure.h:
6115 2009-09-11 Oliver Hunt <oliver@apple.com>
6117 Reviewed by Sam Weinig.
6119 getPropertyNames caching is invalid when the prototype chain contains objects with custom getPropertyNames
6120 https://bugs.webkit.org/show_bug.cgi?id=29214
6122 Add a flag to TypeInfo to indicate whether a type overrides getPropertyNames.
6123 This flag is used to make sure that caching of the property name data is safe.
6125 * API/JSCallbackConstructor.h:
6126 (JSC::JSCallbackConstructor::createStructure):
6127 * debugger/DebuggerActivation.h:
6128 (JSC::DebuggerActivation::createStructure):
6129 * runtime/BooleanObject.h:
6130 (JSC::BooleanObject::createStructure):
6131 * runtime/DatePrototype.h:
6132 (JSC::DatePrototype::createStructure):
6133 * runtime/FunctionPrototype.h:
6134 (JSC::FunctionPrototype::createStructure):
6135 * runtime/JSONObject.h:
6136 (JSC::JSONObject::createStructure):
6137 * runtime/JSObject.h:
6138 (JSC::JSObject::createStructure):
6139 * runtime/JSTypeInfo.h:
6140 (JSC::TypeInfo::hasDefaultGetPropertyNames):
6141 * runtime/JSVariableObject.h:
6142 (JSC::JSVariableObject::createStructure):
6143 * runtime/JSWrapperObject.h:
6144 (JSC::JSWrapperObject::createStructure):
6145 * runtime/MathObject.h:
6146 (JSC::MathObject::createStructure):
6147 * runtime/NumberConstructor.h:
6148 (JSC::NumberConstructor::createStructure):
6149 * runtime/NumberObject.h:
6150 (JSC::NumberObject::createStructure):
6151 * runtime/RegExpConstructor.h:
6152 (JSC::RegExpConstructor::createStructure):
6153 * runtime/RegExpObject.h:
6154 (JSC::RegExpObject::createStructure):
6155 * runtime/StructureChain.cpp:
6156 (JSC::StructureChain::isCacheable):
6158 2009-09-11 Alexey Proskuryakov <ap@webkit.org>
6160 Reviewed by Geoff Garen.
6162 https://bugs.webkit.org/show_bug.cgi?id=29207
6163 Add checks for using WebCore JS context on secondary threads
6165 * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData):
6166 * runtime/JSGlobalData.h:
6167 Added a new mainThreadOnly flag that WebCore would set.
6169 * runtime/Collector.cpp: (JSC::Heap::registerThread): JSC API methods always call this,
6170 so this is a good place to check that the API isn't used form a wrong thread.
6172 2009-09-11 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
6174 Reviewed by Simon Hausmann.
6176 Compiling JavaScriptCore on sparc 64 with gcc fails.
6178 ThreadSafeShared uses the atomic __gnu_cxx::__exchange_and_add with an int,
6179 however on sparc 64 the _Atomic_word argument is typedefed to long (8 bytes).
6181 The patch disables WTF_USE_LOCKFREE_THREADSAFESHARED in ThreadSafeShared to use
6182 a mutex instead when compiling for sparc 64 with gcc.
6184 https://bugs.webkit.org/show_bug.cgi?id=29175
6187 __sparc64__ is not defined on all OS.
6188 Uses instead: __sparc__ && __arch64__ || __sparcv9
6191 2009-09-11 Prasanth Ullattil <prasanth.ullattil@nokia.com>
6193 Reviewed by Simon Hausmann.
6195 Fix compile error on Windows7(64Bit) with latest SDK.
6197 Added the missing include file.
6199 * runtime/UString.cpp:
6201 2009-09-11 Joerg Bornemann <joerg.bornemann@trolltech.com>
6203 Reviewed by Simon Hausmann.
6205 Qt/Windows CE compile fix, include the executable allocator and
6206 markstack implementation in the windows build.
6208 * JavaScriptCore.pri:
6210 2009-09-08 John Abd-El-Malek <jam@chromium.org>
6212 Reviewed by Dimitri Glazkov.
6214 Remove unneeded define for ActiveX.
6215 https://bugs.webkit.org/show_bug.cgi?id=29054
6219 2009-09-10 Mark Rowe <mrowe@apple.com>
6221 Rubber-stamped by Sam Weinig.
6223 Update JavaScriptCore and WebKit's FeatureDefines.xcconfig so that they are in sync with WebCore as they need to be.
6225 * Configurations/FeatureDefines.xcconfig:
6227 2009-09-10 Fumitoshi Ukai <ukai@chromium.org>
6229 Reviewed by Alexey Proskuryakov.
6231 Export WTF::tryFastMalloc used in WebSocketChannel.
6232 https://bugs.webkit.org/show_bug.cgi?id=28038
6234 * JavaScriptCore.exp:
6235 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6236 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
6238 2009-09-10 Oliver Hunt <oliver@apple.com>
6240 Reviewed by NOBODY (Build fix).
6242 Make StructureTransitionTable use an enum for the PtrAndFlags member
6243 used for the single transition slot optimisation.
6245 * runtime/StructureTransitionTable.h:
6246 (JSC::StructureTransitionTable::StructureTransitionTable):
6247 (JSC::StructureTransitionTable::usingSingleTransitionSlot):
6248 (JSC::StructureTransitionTable::):
6250 2009-09-10 Oliver Hunt <oliver@apple.com>
6252 Reviewed by Geoff Garen.
6254 Refactor StructureTransitionTable and Structure to unify handling of the single slot optimization
6255 https://bugs.webkit.org/show_bug.cgi?id=29141
6257 Make StructureTransitionTable encapsulate the single transition slot optimization.
6259 * runtime/Structure.cpp:
6260 (JSC::Structure::Structure):
6261 (JSC::Structure::~Structure):
6262 (JSC::Structure::addPropertyTransitionToExistingStructure):
6263 (JSC::Structure::addPropertyTransition):
6264 (JSC::Structure::addPropertyWithoutTransition):
6265 (JSC::Structure::removePropertyWithoutTransition):
6266 (JSC::Structure::hasTransition):
6267 * runtime/Structure.h:
6268 (JSC::StructureTransitionTable::contains):
6269 (JSC::StructureTransitionTable::get):
6270 (JSC::StructureTransitionTable::hasTransition):
6271 (JSC::StructureTransitionTable::reifySingleTransition):
6272 * runtime/StructureTransitionTable.h:
6273 (JSC::StructureTransitionTable::StructureTransitionTable):
6274 (JSC::StructureTransitionTable::~StructureTransitionTable):
6275 (JSC::StructureTransitionTable::remove):
6276 (JSC::StructureTransitionTable::add):
6277 (JSC::StructureTransitionTable::table):
6278 (JSC::StructureTransitionTable::singleTransition):
6279 (JSC::StructureTransitionTable::usingSingleTransitionSlot):
6280 (JSC::StructureTransitionTable::setSingleTransition):
6281 (JSC::StructureTransitionTable::setTransitionTable):
6282 (JSC::StructureTransitionTable::):
6283 * wtf/PtrAndFlags.h:
6284 (WTF::PtrAndFlags::PtrAndFlags):
6286 2009-09-10 Zoltan Horvath <zoltan@webkit.org>
6288 Reviewed by Darin Adler.
6290 Implement fastDeleteSkippingDestructor for FastAllocBase and fastDeleteAllValues for HashSet
6291 https://bugs.webkit.org/show_bug.cgi?id=25930
6293 FastAllocBase has been extended with fastDeleteSkippingDestructor function which
6294 releases memory without destructor call. fastDeleteAllValues has been implemented
6295 similar as deleteAllValues but it uses fastDelete function to release memory.
6297 * wtf/FastAllocBase.h:
6298 (WTF::fastDeleteSkippingDestructor):
6300 (WTF::fastDeleteAllValues):
6302 2009-09-10 Laszlo Gombos <laszlo.1.gombos@nokia.com>
6304 Reviewed by Darin Adler.
6306 ARM compiler does not understand GCC visibility attribute
6307 https://bugs.webkit.org/show_bug.cgi?id=29079
6309 * API/JSBase.h: Make the test more specific to hit only
6312 2009-09-10 Adam Barth <abarth@webkit.org>
6314 Unreviewed revert of the previous change. It broke the tests.
6319 2009-09-10 Ben Laurie <benl@google.com>
6321 Reviewed by Adam Barth.
6323 <https://bugs.webkit.org/show_bug.cgi?id=26836>
6325 If dtoa was given a small buffer and the number was either infinite or
6326 NaN, then the buffer would be overflowed.
6330 2009-09-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
6332 Reviewed by Darin Adler.
6334 Change reinterpret_cast to static_cast in r48212.
6336 * jit/ExecutableAllocator.h:
6337 (JSC::ExecutableAllocator::cacheFlush):
6339 2009-09-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
6341 Reviewed by Darin Adler.
6343 Remove WTF_PLATFORM_FORCE_PACK as it is no longer used
6344 https://bugs.webkit.org/show_bug.cgi?id=29066
6348 2009-09-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
6350 Reviewed by Ariya Hidayat.
6352 Implement flushing the instruction cache for Symbian
6353 https://bugs.webkit.org/show_bug.cgi?id=29075
6355 * jit/ExecutableAllocator.h:
6356 (JSC::ExecutableAllocator::cacheFlush): Call IMB_Range to flush
6357 the instruction cache on Symbian
6359 2009-09-09 Kent Hansen <khansen@trolltech.com>
6361 Reviewed by Darin Adler.
6363 https://bugs.webkit.org/show_bug.cgi?id=29024
6364 Make JavaScriptCore compile on platforms with case-insensitive file systems and typeinfo.h in STL
6366 These platforms include Microsoft Visual Studio 2003, and Symbian with Metrowerks compiler.
6368 * JavaScriptCore.gypi:
6369 * JavaScriptCore.xcodeproj/project.pbxproj:
6370 * runtime/JSTypeInfo.h: Copied from JavaScriptCore/runtime/TypeInfo.h.
6371 * runtime/Structure.h:
6372 * runtime/TypeInfo.h: Removed.
6374 2009-09-08 Oliver Hunt <oliver@apple.com>
6376 Reviewed by Maciej Stachowiak.
6378 JSON.stringify(Date) loses the milliseconds information
6379 https://bugs.webkit.org/show_bug.cgi?id=29063
6381 Make sure we include milliseconds in the output of toISOString.
6383 * runtime/DatePrototype.cpp:
6384 (JSC::dateProtoFuncToISOString):
6386 2009-09-08 Kevin Ollivier <kevino@theolliviers.com>
6388 wx build fix, generate derived sources earlier in order to make sure
6389 they're found by the build system when generating the list of sources to build.
6393 2009-09-08 Laszlo Gombos <laszlo.1.gombos@nokia.com>
6395 Reviewed by Simon Hausmann.
6397 Build fix when USE(LOCKFREE_THREADSAFESHARED) is not defined
6398 https://bugs.webkit.org/show_bug.cgi?id=29011
6400 * wtf/Threading.h: Use LOCKFREE_THREADSAFESHARED guard for
6401 atomicIncrement and atomicDecrement
6403 2009-09-07 Zoltan Horvath <zoltan@webkit.org>
6405 Reviewed by Darin Adler.
6407 Allow custom memory allocation control in Yarr's RegexInterpreter
6408 https://bugs.webkit.org/show_bug.cgi?id=29025
6410 Inherits RegexInterpreter classes from FastAllocBase (bug #20422), which has
6411 been instantiated by 'new':
6413 class ByteDisjunction
6414 -> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1462
6416 struct BytecodePattern
6417 -> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1279
6419 * yarr/RegexInterpreter.h:
6421 2009-09-07 Drew Wilson <atwilson@google.com>
6423 Reverting r48121 to fix Windows build errors.
6425 * JavaScriptCore.exp:
6427 2009-09-07 Drew Wilson <atwilson@google.com>
6429 Reviewed by David Levin.
6431 Enable SHARED_WORKERS by default
6432 https://bugs.webkit.org/show_bug.cgi?id=28959
6434 * Configurations/FeatureDefines.xcconfig:
6436 2009-09-07 Fumitoshi Ukai <ukai@chromium.org>
6438 Reviewed by Alexey Proskuryakov.
6440 Export WTF::tryFastMalloc used in WebSocketChannel.
6441 https://bugs.webkit.org/show_bug.cgi?id=28038
6443 * JavaScriptCore.exp:
6445 2009-09-04 Oliver Hunt <oliver@apple.com>
6447 Reviewed by NOBODY (Build fix).
6449 Fix windows export files
6451 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6452 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
6454 2009-09-04 Oliver Hunt <oliver@apple.com>
6456 Reviewed by Gavin Barraclough.
6458 [[ToString]] conversion should use the actual toString function for String objects.
6460 Remove incorrect specialisations of toString conversions on StringObject.
6462 * JavaScriptCore.exp:
6463 * runtime/StringObject.cpp:
6464 * runtime/StringObject.h:
6466 2009-09-04 Steve Falkenburg <sfalken@apple.com>
6470 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Add new export.
6471 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Add new export.
6473 2009-09-04 Steve Falkenburg <sfalken@apple.com>
6477 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove unneeded export.
6478 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Remove unneeded export.
6480 2009-09-04 Darin Adler <darin@apple.com>
6482 Reviewed by Geoff Garen.
6484 DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32)
6485 https://bugs.webkit.org/show_bug.cgi?id=28909
6489 Make some improvements to garbage collection code:
6491 1) Create a runtime assertion that catches any classes that
6492 override markChildren but have the HasDefaultMark bit set.
6493 2) Remove checks of the mark bit outside the MarkStack::append
6494 function; they are redundant.
6495 3) Improve the efficiency of the asObject and asArray functions
6496 when called on JSCell* to avoid a round trip to JSValue.
6497 4) Make more callers use the checked asCell and asObject
6498 casting functions rather than unchecked casts.
6499 5) Removed the JSCell::marked function and other GC-related
6500 functions because these operations are no longer things that
6501 code other than the core GC code needs to do directly. Fixed
6502 callers that were calling them.
6504 * runtime/Collector.cpp:
6505 (JSC::Heap::markConservatively): Removed unneeded call to MarkStack::drain.
6506 (JSC::Heap::markProtectedObjects): Removed unneeded check of the mark
6507 bit and call to MarkStack::drain.
6508 (JSC::Heap::collect): Removed unneeded checks of the mark bit and also
6509 changed call to SmallStrings::mark to call markChildren instead to match
6510 the rest of the objects.
6511 (JSC::typeName): Removed unneeded cast to JSObject*.
6513 * runtime/JSArray.h:
6514 (JSC::asArray): Added an overload for JSCell* and changed the JSValue
6515 version to call it. Removed some unneeded casts.
6516 (JSC::JSArray::markChildrenDirect): Marked this function inline. It's in
6517 a header, and if not marked inline this could lead to linking problems.
6518 (JSC::MarkStack::markChildren): Added. This helper function is used by
6519 the drain function to avoid repating code. Also added the code here to
6520 check fro default mark violations in debug code. If a markChildren
6521 function adds something to the mark stack, but the type info claimed
6522 hasDefaultMark was true, then we will get an assertion now. Also fixed
6523 the assertion about the mark bit to use the Heap function directly
6524 because we don't have a JSCell::marked function any more.
6525 (JSC::MarkStack::drain): Changed a local variable from "v" to "value",
6526 and from "currentCell" to "cell". Changed to call markChildren in two
6527 places instead of repeating a chain of if statements twice. Changed
6528 code that reads and writes the mark bit to use Heap::isCellMarked and
6529 Heap::markCell so we can eliminate the JSCell::marked and
6530 JSCell::markCellDirect functions.
6532 * runtime/JSCell.h: Removed JSCell's markCellDirect and marked member
6533 functions. Added a comment explaining that asCell should be deprecated
6534 in favor of the JSValue asCell member function.
6535 (JSC::MarkStack::append): Added the assertion that catches callers
6536 that have set the HasDefaultMark bit incorrectly. Changed
6537 code that reads and writes the mark bit to use Heap::isCellMarked and
6538 Heap::markCell so we can eliminate the JSCell::marked and
6539 JSCell::markCellDirect functions. Moved the overload of
6540 MarkStack::append for JSValue here so it can call through to the cell
6541 version. The old version had a copy of all the code instead, but that
6542 repeated the conversion from JSValue to JSCell* and the check for
6543 whether a value is a cell multiple times.
6544 (JSC::Structure::markAggregate): Moved this function here to avoid
6545 dependencies for Structure.h, since this calls MarkStack::append.
6547 * runtime/JSObject.cpp:
6548 (JSC::JSObject::markChildren): Added code to clear
6549 m_isCheckingForDefaultMarkViolation so the marking done by JSObject
6550 doesn't trigger the assertion.
6552 * runtime/JSValue.h: Moved some stray includes that were outside the
6553 header guard inside it. Not sure how that happened! Removed the
6554 GC-related member functions markChildren, hasChildren, marked, and
6557 * runtime/JSWrapperObject.h: Made markChildren private.
6558 (JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the
6559 HasDefaultMark bit was set.
6561 * runtime/MarkStack.h: Added m_isCheckingForDefaultMarkViolation and
6562 initialized it to false. Moved the append function body from here to
6563 JSCell.h. Added a declaration of a private markChildren function used
6564 inside the drain function.
6566 * runtime/SmallStrings.cpp:
6567 (JSC::SmallStrings::markChildren): Changed the name and style of this
6568 function to match other functions. This allows us to share the normal
6569 mark stack code path.
6571 * runtime/SmallStrings.h: Changed the name and interface of mark to
6572 the more-normal markChildren style.
6574 * runtime/Structure.h: Moved the body of markAggregate into the
6575 JSCell.h to avoid a circular dependency with JSCell.h.
6577 2009-09-04 Darin Adler <darin@apple.com>
6579 Reviewed by Geoff Garen.
6581 DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32)
6582 https://bugs.webkit.org/show_bug.cgi?id=28909
6586 Make some improvements to garbage collection code:
6588 1) Fix the two classes that had the default mark bit set but
6590 2) Remove checks of the mark bit outside the MarkStack::append
6591 function; they are redundant.
6592 3) Make more callers use the checked asCell and asObject
6593 casting functions rather than unchecked casts.
6594 4) Removed some GC-related functions because these operations are
6595 no longer things that code other than the core GC code needs
6596 to do directly. Fixed callers that were calling them.
6598 * bytecode/CodeBlock.cpp:
6599 (JSC::CodeBlock::markAggregate): Removed unneeded check of the mark
6600 bit before calling MarkStack::append.
6602 * interpreter/Register.h: Removed unneeded marked and markChildren
6606 (op_eq): Removed unneeded assertions, instead using checked casting
6607 functions such as asObject.
6609 * runtime/ArgList.h: Added now-needed forward declaration of MarkStack.
6611 * runtime/GetterSetter.cpp:
6612 (JSC::GetterSetter::markChildren): Remmoved unneeded check of the mark bit.
6614 * runtime/GlobalEvalFunction.h:
6615 (JSC::GlobalEvalFunction::createStructure): Added. Fixes a bug where the
6616 HasDefaultMark bit was set.
6618 * runtime/JSCell.cpp:
6619 (JSC::JSCell::getObject): Use asObject to avoid a direct static_cast.
6621 * runtime/JSObject.h:
6622 (JSC::asObject): Added an overload for JSCell* and changed the JSValue
6624 (JSC::JSValue::get): Use asObject to avoid a direct static_cast.
6626 * runtime/JSWrapperObject.h: Made markChildren private.
6627 (JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the
6628 HasDefaultMark bit was set. Later we may want to optimize this for
6629 wrapper types that never have cells in their internal values, but there
6630 is no measured performance regression in SunSpider or V8 doing this
6633 * runtime/MarkStack.cpp: Tweaked formatting.
6635 2009-09-04 Kevin Ollivier <kevino@theolliviers.com>
6637 wx build fix. Switch USE_ defines over to the compiler so that they can be
6638 checked by files not including config.h (like WebCorePrefix.h).
6642 2009-09-03 Yong Li <yong.li@torchmobile.com>
6644 Reviewed by David Levin.
6646 Remove unnecessary dependency on unistd.h
6647 https://bugs.webkit.org/show_bug.cgi?id=28962
6649 * runtime/Completion.cpp:
6651 2009-09-03 Fumitoshi Ukai <ukai@chromium.org>
6653 Reviewed by Eric Seidel.
6655 Add strnstr for Linux and Windows in StringExtras.h
6656 https://bugs.webkit.org/show_bug.cgi?id=28901
6658 * wtf/StringExtras.h:
6661 2009-09-03 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
6663 Reviewed by Darin Adler.
6665 Allow custom memory allocation control for JavaScriptCore's HashEntry class
6666 https://bugs.webkit.org/show_bug.cgi?id=27830
6668 Inherits HashEntry class from FastAllocBase because it has been
6669 instantiated by 'new' JavaScriptCore/runtime/Lookup.cpp:32.
6673 2009-09-02 Gavin Barraclough <barraclough@apple.com>
6675 Should crash if JIT code buffer allocation fails.
6677 https://bugs.webkit.org/show_bug.cgi?id=28926
6678 <rdar://problem/7031922>
6680 * jit/ExecutableAllocatorPosix.cpp:
6681 (JSC::ExecutablePool::systemAlloc):
6682 * jit/ExecutableAllocatorWin.cpp:
6683 (JSC::ExecutablePool::systemAlloc):
6685 2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
6687 waf build fixes for Windows/MSVC.
6691 2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
6693 Build fix for building on Windows.
6695 * wtf/ThreadingPthreads.cpp:
6697 2009-09-02 Norbert Leser <norbert.leser@nokia.com>
6699 Reviewed by Eric Seidel.
6701 Use fastMalloc when neither MMAP nor VIRTUALALLOC are enabled
6703 RegisterFile constructor currently throws #error when both
6704 MMAP and VIRTUALALLOC conditions fail.
6705 On any platform that does not provide these features
6706 (for instance, Symbian),
6707 the fallback should be regular malloc (or fastMalloc).
6708 It is functionally equivalent in this case, even though it may
6709 have certain drawbacks such as lack of dynamic pre-allocation.
6711 * interpreter/RegisterFile.cpp:
6712 (JSC::RegisterFile::~RegisterFile):
6713 * interpreter/RegisterFile.h:
6714 (JSC::RegisterFile::RegisterFile):
6716 2009-08-31 Robert Agoston <Agoston.Robert@stud.u-szeged.hu>
6718 Reviewed by Gavin Barraclough.
6721 https://bugs.webkit.org/show_bug.cgi?id=28691
6724 (JSC::Parser::parse):
6726 2009-08-27 Oliver Hunt <oliver@apple.com>
6728 Reviewed by Maciej Stachowiak.
6730 JSON Stringifier does not follow ES5 spec for handling of Number, String and Boolean objects
6731 https://bugs.webkit.org/show_bug.cgi?id=28797
6733 Fixed unwrapBoxedPrimitive to do the right thing, which necessitated a couple of new exception
6734 checks, and corrected the logic in gap to correctly convert Number and String objects.
6736 * runtime/JSONObject.cpp:
6737 (JSC::unwrapBoxedPrimitive):
6739 (JSC::Stringifier::Stringifier):
6740 (JSC::Stringifier::appendStringifiedValue):
6742 2009-08-27 Oliver Hunt <oliver@apple.com>
6744 Reviewed by Adam Roben.
6746 JSON.stringify replacer array does not accept values that are not string primitives.
6747 https://bugs.webkit.org/show_bug.cgi?id=28788
6749 Update the JSON stringifier to initialise its replacer array according to the most
6750 recent version of the spec.
6752 * runtime/Identifier.h:
6753 (JSC::Identifier::from):
6754 * runtime/JSONObject.cpp:
6755 (JSC::Stringifier::Stringifier):
6757 2009-08-27 Alexey Proskuryakov <ap@apple.com>
6759 Reviewed by Oliver Hunt.
6761 https://bugs.webkit.org/show_bug.cgi?id=28753
6762 <rdar://problem/7173448> Excessive number of threads (and a crash)
6764 * wtf/Threading.h: (WTF::atomicIncrement): Changed atomicIncrement to match decrement
6765 and return the new value. Also added using directives for these functions, to match
6768 2009-08-27 Brent Fulgham <bfulgham@webkit.org>
6770 Reviewed by Adam Roben.
6772 Link the testapi against CFLite when building the WinCairo port.
6774 * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add new Release_CFLite
6775 target. Update all targets to inherit from either the
6776 JavaScriptCF.vsprops (Apple target) or the JavaScriptCFLite.vsprops
6777 file (WinCairo target).
6778 * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Remove
6779 input file CoreFoundation.lib. This is provided by either the
6780 JavaScriptCF.vsprops or JavaScriptCFLite.vsprops file.
6782 2009-08-27 Steve Falkenburg <sfalken@apple.com>
6784 Reviewed by Geoff Garen.
6786 Fix Windows-specific crash due to missing memory clearing call.
6788 * runtime/Collector.cpp:
6789 (JSC::Heap::allocateBlock):
6791 2009-08-27 Brent Fulgham <bfulgham@webkit.org>
6793 Build fix: JavaScriptCore_debug.def missing some exports. Apple
6794 Windows build does not use this file, so it was not noticed previously.
6796 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
6798 2009-08-27 Gavin Barraclough <barraclough@apple.com>
6800 Reviewed by Oliver Hunt.
6802 x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates.
6803 https://bugs.webkit.org/show_bug.cgi?id=28317
6805 Missed one, fix part II.
6807 * assembler/MacroAssemblerX86Common.h:
6808 (JSC::MacroAssemblerX86Common::move):
6809 * assembler/X86Assembler.h:
6810 (JSC::CAN_SIGN_EXTEND_8_32):
6812 2009-08-27 Oliver Hunt <oliver@apple.com>
6814 Reviewed by Adam Roben.
6816 JSON.stringify replacer array does not accept values that are not string primitives.
6817 https://bugs.webkit.org/show_bug.cgi?id=28788
6819 Update the JSON stringifier to initialise its replacer array according to the most
6820 recent version of the spec.
6822 * runtime/Identifier.h:
6823 (JSC::Identifier::from):
6824 * runtime/JSONObject.cpp:
6825 (JSC::Stringifier::Stringifier):
6827 2009-08-27 Oliver Hunt <oliver@apple.com>
6829 Reviewed by Alexey Proskuryakov.
6831 JSON parser accepts trailing comma in array literals
6832 https://bugs.webkit.org/show_bug.cgi?id=28779
6834 Update parser to correctly fail if there's a trailing comma.
6836 * runtime/LiteralParser.cpp:
6837 (JSC::LiteralParser::parse):
6839 2009-08-26 Oliver Hunt <oliver@apple.com>
6841 Reviewed by Gavin Barraclough.
6843 'this' in JSON.parse reviver is the global object
6844 https://bugs.webkit.org/show_bug.cgi?id=28752
6846 This is a technically simple change, we merely update the code for calling
6847 the reviver function to pass the correct this object. Doing so however
6848 exposes the holder to arbitrary mutation by the reviver function so it is
6849 necessary for us to now guard all property accesses against the possibility
6852 * runtime/JSArray.h:
6853 JSON needs to delete a property from the array, so we friend its
6854 Walker class so that we can make a non-virtual call to the arrays
6855 delete and getOwnPropertySlot methods.
6856 * runtime/JSONObject.cpp:
6857 (JSC::Walker::callReviver):
6858 We need to pass the correct this object
6859 (JSC::Walker::walk):
6860 Update calls to callReviver, and update property logic logic
6861 to correctly handle the holder being mutated by the reviver
6864 2009-08-26 Alice Liu <alice.liu@apple.com>
6866 Windows build fix: added some exported symbols
6868 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6869 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
6871 2009-08-26 Geoffrey Garen <ggaren@apple.com>
6873 Windows build fix: Removed some exported symbols that no longer exist.
6875 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6876 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
6878 2009-08-26 Gavin Barraclough <barraclough@apple.com>
6880 Reviewed by Olliejver Hunt.
6882 x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates.
6883 https://bugs.webkit.org/show_bug.cgi?id=28317
6885 We rely on a slightly OS X specific behaviour, that x86-64 applications have a 4Gb zero page,
6886 so pointers are never representable as a 32-bit integer, and always have to be represented by
6887 a separate immediate load instruction, rather than within the immediate field of an arithmetic
6888 or memory operation.
6890 We explicitly check for a couple of cases where a value might be representable in 32-bit, but
6891 these probably never kick in on Mac OS, and only kick in to hose GTK. Deleting these does not
6892 show a performance degradation on SunSpider. Remove.
6894 * assembler/MacroAssemblerX86_64.h:
6895 (JSC::MacroAssemblerX86_64::storePtr):
6896 (JSC::MacroAssemblerX86_64::branchPtr):
6898 2009-08-26 Geoffrey Garen <ggaren@apple.com>
6900 Reviewed by Oliver Hunt.
6902 A bit of Collector refatoring.
6904 SunSpider says no change. v8 says 1.003x faster (1.02x faster on splay).
6906 * JavaScriptCore.exp:
6908 * runtime/JSCell.cpp:
6909 (JSC::JSCell::toPrimitive):
6910 (JSC::JSCell::getPrimitiveNumber):
6911 (JSC::JSCell::toBoolean):
6912 (JSC::JSCell::toNumber):
6913 (JSC::JSCell::toString):
6914 (JSC::JSCell::toObject): Removed pure virtual functions from
6915 JSCell, so the collector can construct one. This allowed
6916 me to remove a bunch of ASSERT_NOT_REACHED throughout the
6920 (JSC::JSCell::JSCell): ditto
6921 (JSC::Heap::heap): Inlined this function because it's trivial.
6923 * JavaScriptCore.exp:
6925 * runtime/Collector.cpp:
6926 (JSC::Heap::destroy):
6927 (JSC::Heap::allocateBlock):
6928 (JSC::Heap::freeBlock):
6929 (JSC::Heap::freeBlocks): Renamed freeHeap to freeBlocks, since
6930 it doesn't actually free the Heap object.
6931 (JSC::Heap::heapAllocate):
6933 * runtime/Collector.h: Refactored block allocation and destruction
6934 into helper functions.
6936 * runtime/GetterSetter.cpp:
6937 * runtime/JSAPIValueWrapper.cpp:
6938 * runtime/JSPropertyNameIterator.cpp: Removed dummy implementations
6939 of pure virtual functions. (See above.)
6941 === End re-roll-in of r47738:47740 with Windows crash fixed ===
6943 2009-08-26 Geoffrey Garen <ggaren@apple.com>
6945 Build fix: start out with a 32-bit value to avoid a shortening warning.
6947 * runtime/Collector.cpp:
6950 2009-08-24 Geoffrey Garen <ggaren@apple.com>
6952 Reviewed by Oliver Hunt.
6954 Substantially reduced VM thrash in the GC heap.
6956 1.08x faster on v8 (1.60x faster on v8-splay).
6958 1.40x faster on bench-alloc-nonretained.
6960 1.90x faster on bench-alloc-retained.
6962 SunSpider says no change.
6964 * runtime/Collector.cpp:
6965 (JSC::Heap::heapAllocate): Fixed a long-standing bug: update a few local
6966 variables unconditionally after calling collect(), since they may be used
6967 even if we don't "goto scan". (In the bug I saw, usedBlocks got out of
6968 sync with heap.usedBlocks).
6969 (JSC::Heap::sweep): Keep enough free heap space to accomodate
6970 the number of objects we'll allocate before the next GC, plus 25%, for
6972 * runtime/Collector.h: Bumped the block size to 256k. This seems to give
6973 the best cache performance, and it prevents us from initiating lots of
6974 VM traffic to recover very small chunks of memory.
6976 === Begin re-roll-in of r47738:47740 with Windows crash fixed ===
6978 2009-08-25 Drew Wilson <atwilson@google.com>
6980 Reviewed by David Levin.
6982 postMessage() spec now supports sending arrays of ports
6983 https://bugs.webkit.org/show_bug.cgi?id=26902
6985 Added OwnPtr to VectorTraits so we can store OwnPtrs in Vectors.
6987 * wtf/VectorTraits.h:
6989 2009-08-26 Xan Lopez <xlopez@igalia.com>
6991 Rubber-stamped by Gustavo Noronha.
6993 Remove duplicated files from file list.
6997 2009-08-26 Oliver Hunt <oliver@apple.com>
6999 Reviewed by NOBODY (Build fix).
7003 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7004 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
7006 2009-08-26 Oliver Hunt <oliver@apple.com>
7008 Reviewed by NOBODY (Build fix).
7010 Hopefully fix all the exports from JSC on windows
7012 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7013 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
7015 2009-08-26 Oliver Hunt <oliver@apple.com>
7017 Reviewed by NOBODY (Build fixes).
7019 Forgot I added files to JavaScriptCore.
7022 * JavaScriptCore.gypi:
7023 * JavaScriptCore.pri:
7024 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
7025 * JavaScriptCoreSources.bkl:
7027 2009-08-25 Oliver Hunt <oliver@apple.com>
7029 Reviewed by Gavin Barraclough.
7031 [ES5] Implement getOwnPropertyDescriptor
7032 https://bugs.webkit.org/show_bug.cgi?id=28724
7034 Implement the core runtime support for getOwnPropertyDescriptor.
7035 This adds a virtual getOwnPropertyDescriptor method to every class
7036 that implements getOwnPropertySlot that shadows the behaviour of
7037 getOwnPropertySlot. The alternative would be to make getOwnPropertySlot
7038 (or PropertySlots in general) provide property attribute information,
7039 but quick testing showed this to be a regression.
7041 * JavaScriptCore.exp:
7042 * JavaScriptCore.xcodeproj/project.pbxproj:
7043 * runtime/Arguments.cpp:
7044 (JSC::Arguments::getOwnPropertyDescriptor):
7045 * runtime/Arguments.h:
7046 * runtime/ArrayPrototype.cpp:
7047 (JSC::ArrayPrototype::getOwnPropertyDescriptor):
7048 * runtime/ArrayPrototype.h:
7049 * runtime/CommonIdentifiers.h:
7050 * runtime/DatePrototype.cpp:
7051 (JSC::DatePrototype::getOwnPropertyDescriptor):
7052 * runtime/DatePrototype.h:
7053 * runtime/JSArray.cpp:
7054 (JSC::JSArray::getOwnPropertyDescriptor):
7055 * runtime/JSArray.h:
7056 * runtime/JSByteArray.cpp:
7057 (JSC::JSByteArray::getOwnPropertyDescriptor):
7058 * runtime/JSByteArray.h:
7059 * runtime/JSFunction.cpp:
7060 (JSC::JSFunction::getOwnPropertyDescriptor):
7061 * runtime/JSFunction.h:
7062 * runtime/JSGlobalObject.h:
7063 (JSC::JSGlobalObject::getOwnPropertyDescriptor):
7064 * runtime/JSNotAnObject.cpp:
7065 (JSC::JSNotAnObject::getOwnPropertyDescriptor):
7066 * runtime/JSNotAnObject.h:
7067 * runtime/JSONObject.cpp:
7068 (JSC::JSONObject::getOwnPropertySlot):
7069 (JSC::JSONObject::getOwnPropertyDescriptor):
7070 * runtime/JSONObject.h:
7071 * runtime/JSObject.cpp:
7072 (JSC::JSObject::getOwnPropertyDescriptor):
7073 (JSC::JSObject::getPropertyDescriptor):
7074 * runtime/JSObject.h:
7075 * runtime/JSString.cpp:
7076 (JSC::JSString::getStringPropertyDescriptor):
7077 (JSC::JSString::getOwnPropertyDescriptor):
7078 * runtime/JSString.h:
7079 * runtime/JSVariableObject.cpp:
7080 (JSC::JSVariableObject::symbolTableGet):
7081 * runtime/JSVariableObject.h:
7083 (JSC::getStaticPropertyDescriptor):
7084 (JSC::getStaticFunctionDescriptor):
7085 (JSC::getStaticValueDescriptor):
7086 Add property descriptor equivalents of the lookup
7087 table access functions
7089 * runtime/MathObject.cpp:
7090 (JSC::MathObject::getOwnPropertySlot):
7091 (JSC::MathObject::getOwnPropertyDescriptor):
7092 * runtime/MathObject.h:
7093 * runtime/NumberConstructor.cpp:
7094 (JSC::NumberConstructor::getOwnPropertyDescriptor):
7095 * runtime/NumberConstructor.h:
7096 * runtime/ObjectConstructor.cpp:
7097 (JSC::ObjectConstructor::ObjectConstructor):
7098 (JSC::objectConstructorGetOwnPropertyDescriptor):
7099 * runtime/PropertyDescriptor.cpp: Added.
7100 (JSC::PropertyDescriptor::writable):
7101 (JSC::PropertyDescriptor::enumerable):
7102 (JSC::PropertyDescriptor::configurable):
7103 (JSC::PropertyDescriptor::hasAccessors):
7104 (JSC::PropertyDescriptor::setUndefined):
7105 (JSC::PropertyDescriptor::getter):
7106 (JSC::PropertyDescriptor::setter):
7107 (JSC::PropertyDescriptor::setDescriptor):
7108 (JSC::PropertyDescriptor::setAccessorDescriptor):
7109 * runtime/PropertyDescriptor.h: Added.
7110 (JSC::PropertyDescriptor::PropertyDescriptor):
7111 (JSC::PropertyDescriptor::attributes):
7112 (JSC::PropertyDescriptor::isValid):
7113 (JSC::PropertyDescriptor::value):
7114 * runtime/RegExpConstructor.cpp:
7115 (JSC::RegExpConstructor::getOwnPropertyDescriptor):
7116 * runtime/RegExpConstructor.h:
7117 * runtime/RegExpMatchesArray.h:
7118 (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
7119 * runtime/RegExpObject.cpp:
7120 (JSC::RegExpObject::getOwnPropertyDescriptor):
7121 * runtime/RegExpObject.h:
7122 * runtime/StringObject.cpp:
7123 (JSC::StringObject::getOwnPropertyDescriptor):
7124 * runtime/StringObject.h:
7125 * runtime/StringPrototype.cpp:
7126 (JSC::StringPrototype::getOwnPropertyDescriptor):
7127 * runtime/StringPrototype.h:
7129 2009-08-24 Gavin Barraclough <barraclough@apple.com>
7131 Reviewed by Darin Adler.
7133 How many copies of the parameters do you need?
7134 https://bugs.webkit.org/show_bug.cgi?id=28701
7136 The function parameters in JSC get copied a lot - and unnecessarily so.
7138 Originally this happened due to duplicating FunctionBodyNodes on recompilation,
7139 though the problem has been exacerbated by copying the parameters from the
7140 original function body onto the executable, then back onto the real body that
7141 will be generated (this happens on every function). And this is all made worse
7142 since the data structures in question are a little ugly - C style arrays of C++
7143 objects containing ref counts, so they need a full copy-construct (rather than
7146 This can all be greatly simplified by just punting the parameters off into
7147 their own ref-counted object, and forgoing all the copying.
7149 ~no performance change, possible slight progression.
7151 * bytecompiler/BytecodeGenerator.cpp:
7152 (JSC::BytecodeGenerator::BytecodeGenerator):
7153 * bytecompiler/BytecodeGenerator.h:
7154 (JSC::BytecodeGenerator::makeFunction):
7156 (JSC::FunctionParameters::FunctionParameters):
7157 (JSC::FunctionBodyNode::FunctionBodyNode):
7158 (JSC::FunctionBodyNode::finishParsing):
7160 (JSC::FunctionBodyNode::parameters):
7161 (JSC::FunctionBodyNode::parameterCount):
7162 * runtime/Executable.cpp:
7163 (JSC::FunctionExecutable::~FunctionExecutable):
7164 (JSC::FunctionExecutable::compile):
7165 (JSC::FunctionExecutable::reparseExceptionInfo):
7166 (JSC::FunctionExecutable::fromGlobalCode):
7167 (JSC::FunctionExecutable::paramString):
7168 * runtime/Executable.h:
7169 (JSC::FunctionExecutable::FunctionExecutable):
7170 (JSC::FunctionExecutable::parameterCount):
7172 2009-08-25 Brent Fulgham <bfulgham@webkit.org>
7174 Reviewed by NOBODY (Buildfix).
7176 * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_CFLite target
7177 that inherits from the debug_wincairo property sheet and therefore
7178 links to the proper debug library.
7179 * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_CFLite target
7180 that inherits from the debug_wincairo property sheet and therefore
7181 links to the proper debug library.
7183 2009-08-25 Chris Marrin <cmarrin@apple.com>
7185 Reviewed by Simon Fraser.
7187 Export tryFastMalloc for Canvas3D work
7188 https://bugs.webkit.org/show_bug.cgi?id=28018
7190 * JavaScriptCore.exp:
7192 2009-08-25 David Levin <levin@chromium.org>
7194 Reviewed by Adam Roben.
7196 PLATFORM(CFNETWORK) should be USE(CFNETWORK).
7197 https://bugs.webkit.org/show_bug.cgi?id=28713
7199 * wtf/Platform.h: Added a #define to catch this issue in the
7200 future. The define would generate an error on gcc without the
7201 space in the expansion, but Visual C++ needs the space to cause an error.
7203 2009-08-24 Brent Fulgham <bfulgham@webkit.org>
7205 Reviewed by Steve Falkenburg.
7207 Revise CFLite Debug build to emit DLL's with _debug label.
7208 https://bugs.webkit.org/show_bug.cgi?id=28695.
7210 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modify
7211 Cairo debug build to inherit from new debug_cairo property sheet.
7212 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops:
7213 Modify to look for debug CFLite when in debug build.
7215 2009-08-24 Gavin Barraclough <barraclough@apple.com>
7217 Reviewed by Oliver Adler & Darin Hunt.
7219 https://bugs.webkit.org/show_bug.cgi?id=28691
7220 Do not retain ScopeNodes outside of parsing
7222 There is now no need for these to exist outside of parsing - their use in the runtime is replaced by Executable types.
7224 * bytecode/EvalCodeCache.h:
7225 (JSC::EvalCodeCache::get):
7226 * bytecompiler/BytecodeGenerator.cpp:
7227 (JSC::BytecodeGenerator::BytecodeGenerator):
7228 (JSC::BytecodeGenerator::emitNewFunction):
7229 (JSC::BytecodeGenerator::emitNewFunctionExpression):
7230 * bytecompiler/BytecodeGenerator.h:
7231 (JSC::BytecodeGenerator::makeFunction):
7232 * debugger/Debugger.cpp:
7233 (JSC::Debugger::recompileAllJSFunctions):
7234 (JSC::evaluateInGlobalCallFrame):
7235 * debugger/DebuggerCallFrame.cpp:
7236 (JSC::DebuggerCallFrame::evaluate):
7237 * interpreter/Interpreter.cpp:
7238 (JSC::Interpreter::execute):
7239 (JSC::Interpreter::prepareForRepeatCall):
7240 (JSC::Interpreter::privateExecute):
7242 (JSC::DEFINE_STUB_FUNCTION):
7244 (JSC::ScopeNodeData::ScopeNodeData):
7245 (JSC::ProgramNode::create):
7246 (JSC::EvalNode::create):
7247 (JSC::FunctionBodyNode::create):
7249 (JSC::ScopeNode::adoptData):
7250 (JSC::FunctionBodyNode::parameterCount):
7251 * parser/Parser.cpp:
7253 (JSC::Parser::arena):
7254 (JSC::Parser::Parser):
7255 (JSC::Parser::parse):
7256 * runtime/ArrayPrototype.cpp:
7257 (JSC::isNumericCompareFunction):
7258 (JSC::arrayProtoFuncSort):
7259 * runtime/Completion.cpp:
7262 * runtime/Executable.cpp:
7263 (JSC::FunctionExecutable::~FunctionExecutable):
7264 (JSC::EvalExecutable::compile):
7265 (JSC::ProgramExecutable::checkSyntax):
7266 (JSC::ProgramExecutable::compile):
7267 (JSC::FunctionExecutable::compile):
7268 (JSC::EvalExecutable::generateJITCode):
7269 (JSC::ProgramExecutable::generateJITCode):
7270 (JSC::FunctionExecutable::generateJITCode):
7271 (JSC::FunctionExecutable::reparseExceptionInfo):
7272 (JSC::EvalExecutable::reparseExceptionInfo):
7273 (JSC::FunctionExecutable::recompile):
7274 (JSC::FunctionExecutable::fromGlobalCode):
7275 (JSC::FunctionExecutable::copyParameters):
7276 (JSC::FunctionExecutable::paramString):
7277 * runtime/Executable.h:
7278 (JSC::ScriptExecutable::ScriptExecutable):
7279 (JSC::ScriptExecutable::sourceID):
7280 (JSC::ScriptExecutable::sourceURL):
7281 (JSC::ScriptExecutable::lineNo):
7282 (JSC::ScriptExecutable::lastLine):
7283 (JSC::ScriptExecutable::usesEval):
7284 (JSC::ScriptExecutable::usesArguments):
7285 (JSC::ScriptExecutable::needsActivation):
7286 (JSC::ScriptExecutable::recordParse):
7287 (JSC::EvalExecutable::bytecode):
7288 (JSC::EvalExecutable::jitCode):
7289 (JSC::ProgramExecutable::bytecode):
7290 (JSC::ProgramExecutable::reparseExceptionInfo):
7291 (JSC::ProgramExecutable::jitCode):
7292 (JSC::FunctionExecutable::FunctionExecutable):
7293 (JSC::FunctionExecutable::make):
7294 (JSC::FunctionExecutable::bytecode):
7295 (JSC::FunctionExecutable::isGenerated):
7296 (JSC::FunctionExecutable::name):
7297 (JSC::FunctionExecutable::parameterCount):
7298 (JSC::FunctionExecutable::jitCode):
7299 * runtime/FunctionConstructor.cpp:
7300 (JSC::constructFunction):
7301 * runtime/JSGlobalData.cpp:
7302 (JSC::JSGlobalData::numericCompareFunction):
7303 * runtime/JSGlobalObjectFunctions.cpp:
7304 (JSC::globalFuncEval):
7306 2009-08-24 Darin Adler <darin@apple.com>
7308 * runtime/ObjectPrototype.cpp:
7309 (JSC::ObjectPrototype::put): Landed revised version I had tested but forgot
7310 to land. Leave out the branch, since we don't need one.
7312 2009-08-24 Darin Adler <darin@apple.com>
7314 Reviewed by Geoff Garen.
7316 Array index miss case creates a string every time
7317 https://bugs.webkit.org/show_bug.cgi?id=28664
7319 SunSpider test results I saw:
7322 1% faster on crypto-aes
7323 20% faster on crypto-md5
7324 13% faster on crypto-sha1
7326 * runtime/ObjectPrototype.cpp:
7327 (JSC::ObjectPrototype::ObjectPrototype): Initialize m_hasNoPropertiesWithUInt32Names
7329 (JSC::ObjectPrototype::put): Clearly m_hasNoPropertiesWithUInt32Names if the new
7330 property has a name that is the string form of a UInt32.
7331 (JSC::ObjectPrototype::getOwnPropertySlot): Don't call JSObject::getOwnPropertySlot
7332 if m_hasNoPropertiesWithUInt32Names is true, and it is highly likely to be true.
7334 * runtime/ObjectPrototype.h: Added declarations for the above.
7336 2009-08-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
7338 Unreviewed. Fix a typo in my distcheck build fix.
7342 2009-08-23 Gustavo Noronha Silva <gns@gnome.org>
7344 Unreviewed build fix for make distcheck.
7346 * GNUmakefile.am: Added files required for the build.
7348 2009-08-22 Maciej Stachowiak <mjs@apple.com>
7350 Reviewed by Mark Rowe.
7352 REGRESSION(r47639-r47660): Webkit crashes on launch on PowerPC
7353 https://bugs.webkit.org/show_bug.cgi?id=28655
7355 * runtime/JSFunction.cpp:
7356 (JSC::JSFunction::JSFunction): Initialize properly with a VPtrHackExecutable.
7359 2009-08-22 Darin Adler <darin@apple.com>
7361 Fix storage leak from syntax tree arena allocation patch.
7363 * parser/Nodes.h: CommaNode needs to inherit from ParserArenaDeletable
7364 because it has a vector.
7366 2009-08-21 Darin Adler <darin@apple.com>
7371 (JSC::ScopeNodeData::ScopeNodeData): Made non-inline again.
7372 This is used outside Nodes.cpp so can't be inline unless
7373 it is in the header.
7375 2009-08-21 Darin Adler <darin@apple.com>
7377 Two loose ends from the last commit.
7379 * JavaScriptCore.xcodeproj/project.pbxproj: Made ParserArena.h
7380 and create_hash_table project-internal instead of "private".
7381 * runtime/Executable.h: Removed accidentally-added constructor.
7383 2009-08-21 Darin Adler <darin@apple.com>
7385 Reviewed by Gavin Barraclough.
7387 Syntax tree nodes should use arena allocation
7388 https://bugs.webkit.org/show_bug.cgi?id=25674
7390 Use an actual arena now. 0.6% speedup on SunSpider.
7392 New and improved with 100% less leaking of the universe.
7394 * JavaScriptCore.exp:
7395 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7396 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
7397 Removed all exports involving the class FunctionBodyNode, which no
7398 longer needs to be used outside JavaScriptCore.
7400 * JavaScriptCore.xcodeproj/project.pbxproj: Made Nodes.h and
7401 Executable.h project-internal instead of "private".
7403 * bytecompiler/BytecodeGenerator.cpp:
7404 (JSC::BytecodeGenerator::BytecodeGenerator): Updated since VarStack
7405 contains const Identifier* now.
7407 * parser/Grammar.y: Made identifiers from the lexer be const
7408 Identifier* and updated since VarStack contains const Identifier* now.
7411 (JSC::Lexer::setCode): Pass in ParserArena, used for identifiers.
7412 (JSC::Lexer::makeIdentifier): Changed return type to const Identifier*
7413 and changed to call ParserArena.
7414 (JSC::Lexer::clear): Removed the code to manage m_identifiers and
7415 added code to set m_arena to 0.
7416 * parser/Lexer.h: Updated for changes above.
7418 * parser/NodeConstructors.h:
7419 (JSC::ParserArenaFreeable::operator new): Added. Calls allocateFreeable
7421 (JSC::ParserArenaDeletable::operator new): Changed to call the
7422 allocateDeletable function on the arena instead of deleteWithArena.
7423 (JSC::PropertyNode::PropertyNode): Added new constructor that makes
7424 numeric identifiers. Some day we might want to optimize this for
7425 integers so it doesn't create a string for each one.
7426 (JSC::ContinueNode::ContinueNode): Initialize m_ident to nullIdentifier
7427 since it's now a const Identifier& so it can't be left uninitialized.
7428 (JSC::BreakNode::BreakNode): Ditto.
7429 (JSC::CaseClauseNode::CaseClauseNode): Updated to use SourceElements*
7430 to keep track of the statements rather than a separate statement vector.
7431 (JSC::BlockNode::BlockNode): Ditto.
7432 (JSC::ForInNode::ForInNode): Initialize m_ident to nullIdentifier.
7434 * parser/Nodes.cpp: Moved the comment explaining emitBytecode in here.
7435 It seemed strangely out of place in the header.
7436 (JSC::ThrowableExpressionData::emitThrowError): Added an overload for
7437 UString as well as Identifier.
7438 (JSC::SourceElements::singleStatement): Added.
7439 (JSC::SourceElements::lastStatement): Added.
7440 (JSC::RegExpNode::emitBytecode): Changed the throwError code to use
7441 the substitution mechanism instead of doing a string append.
7442 (JSC::SourceElements::emitBytecode): Added. Replaces the old
7443 statementListEmitCode function, since we now keep the SourceElements
7445 (JSC::BlockNode::lastStatement): Added.
7446 (JSC::BlockNode::emitBytecode): Changed to use emitBytecode instead of
7447 statementListEmitCode.
7448 (JSC::CaseClauseNode::emitBytecode): Added.
7449 (JSC::CaseBlockNode::emitBytecodeForBlock): Changed to use emitBytecode
7450 instead of statementListEmitCode.
7451 (JSC::ScopeNodeData::ScopeNodeData): Changed to store the
7452 SourceElements* instead of using releaseContentsIntoVector.
7453 (JSC::ScopeNode::emitStatementsBytecode): Added.
7454 (JSC::ScopeNode::singleStatement): Added.
7455 (JSC::ProgramNode::emitBytecode): Call emitStatementsBytecode instead
7456 of statementListEmitCode.
7457 (JSC::EvalNode::emitBytecode): Ditto.
7458 (JSC::FunctionBodyNode::emitBytecode): Call emitStatementsBytecode
7459 insetad of statementListEmitCode and check for the return node using
7462 * parser/Nodes.h: Changed VarStack to store const Identifier* instead
7463 of Identifier and rely on the arena to control lifetime. Added a new
7464 ParserArenaFreeable class. Made ParserArenaDeletable inherit from
7465 FastAllocBase instead of having its own operator new. Base the Node
7466 class on ParserArenaFreeable. Changed the various Node classes
7467 to use const Identifier& instead of Identifier to avoid the need to
7468 call their destructors and allow them to function as "freeable" in the
7469 arena. Removed extraneous JSC_FAST_CALL on definitions of inline functions.
7470 Changed ElementNode, PropertyNode, ArgumentsNode, ParameterNode,
7471 CaseClauseNode, ClauseListNode, and CaseBlockNode to use ParserArenaFreeable
7472 as a base class since they do not descend from Node. Eliminated the
7473 StatementVector type and instead have various classes use SourceElements*
7474 instead of StatementVector. This prevents those classes from having to
7475 use ParserArenaDeletable to make sure the vector destructor is called.
7477 * parser/Parser.cpp:
7478 (JSC::Parser::parse): Pass the arena to the lexer.
7480 * parser/Parser.h: Added an include of ParserArena.h, which is no longer
7481 included by Nodes.h.
7482 (JSC::Parser::parseFunctionFromGlobalCode): Changed to use the
7483 singleStatement function, since there is no longer any children function.
7484 Removed some unneeded use of RefPtr.
7486 * parser/ParserArena.cpp:
7487 (JSC::ParserArena::ParserArena): Added. Initializes the new members,
7488 m_freeableMemory, m_freeablePoolEnd, and m_identifiers.
7489 (JSC::ParserArena::freeablePool): Added. Computes the pool pointer,
7490 since we store only the current pointer and the end of pool pointer.
7491 (JSC::ParserArena::deallocateObjects): Added. Contains the common
7492 memory-deallocation logic used by both the destructor and the
7494 (JSC::ParserArena::~ParserArena): Changed to call deallocateObjects.
7495 (JSC::ParserArena::reset): Ditto. Also added code to zero out the
7496 new structures, and switched to use clear() instead of shrink(0) since
7497 we don't really reuse arenas.
7498 (JSC::ParserArena::makeNumericIdentifier): Added.
7499 (JSC::ParserArena::allocateFreeablePool): Added. Used when the pool
7501 (JSC::ParserArena::isEmpty): Added. No longer inline, which is fine
7502 since this is used only for assertions at the moment.
7503 (JSC::ParserArena::derefWithArena): Make non-inline.
7505 * parser/ParserArena.h: Added an actual arena of "freeable" objects,
7506 ones that don't need destructors to be called. Also added a separate
7507 IdentifierArena object, a segmented vector of identifiers that used
7510 * runtime/Executable.h: Moved the definition of the
7511 FunctionExecutable::make function here. It can't go in JSFunction.h
7512 since that header has to be used outside JavaScriptCore and so can't
7513 include this, which includes Nodes.h. The function could be moved
7514 elswhere if we don't want to include JSFunction.h in this header, but
7515 for now this seems to be the best place.
7517 * runtime/JSFunction.h: Removed the include of Executable.h and
7518 definition of the FunctionExecutable::make function.
7520 * wtf/FastMalloc.cpp: Fixed an incorrect comment.
7522 2009-08-21 Mark Rowe <mrowe@apple.com>
7524 Fix the non-JIT build.
7526 * runtime/Executable.cpp:
7527 * runtime/Executable.h:
7529 2009-08-21 Gavin Barraclough <barraclough@apple.com>
7531 Speculative QuickTime build fix.
7533 * runtime/JSArray.cpp:
7535 2009-08-21 Gavin Barraclough <barraclough@apple.com>
7537 Speculative QT build fix.
7539 * runtime/StringPrototype.cpp:
7541 2009-08-21 Gavin Barraclough <barraclough@apple.com>
7543 Reviewed by Oliver Hunt.
7545 Restructure Executable types so that host functions do not hold a FunctionExecutable.
7546 https://bugs.webkit.org/show_bug.cgi?id=28621
7548 All JSFunction objects have a pointer to an Executable*. This is currently always a
7549 FunctionExecutable, however this has a couple of drawbacks. Host functions do not
7550 store a range of information that the FunctionExecutable provides (source, name,
7551 CodeBlock & information presently held on the FunctionBodyNode).
7553 [ * nearly all... see below! ]
7555 Instead, make JSFunctions hold a pointer to an ExecutableBase, move fields specific
7556 to JS sourced executable types (source, node) into a new subclass (ScriptExecutable),
7557 and create a new NativeExecutable type. We now provide a new method in JSFunction
7558 to access & downcast to FunctionExecutable, but in doing so we can make an early
7559 check (with an ASSERT) to ensure that the Executable read from a function will only
7560 be treated as a FunctionExecutable (and thus the JS sepcific fields will only be
7561 accessed) if the JSFunction is not a host function.
7563 There is one JSFunction that currently does not have an Executable, which is the
7564 object created to allow us to read out the vtable pointer. By making this change
7565 we can also add a new Executable type fror this object (VPtrHackExecutable).
7566 Since this means that really all JSFunctions have an Executable we no longer have
7567 to null-check m_executable before us it - particularly in isHostFunction().
7569 This patch removes CacheableEvalExecutable, since all subclasses of ExecutableBase
7570 can now be ref-counted - since both JSFunction holds (and ref-counts) an ExecutableBase
7571 that might be a FunctionExecutable or a NativeExecutable. This does now mean that all
7572 ProgramExecutables and EvalExecutables (unnecessarily) provide an interface to be
7573 ref-counted, however this seems less-bad than host functions unnecessarily providing
7574 interface to access non-host specific information.
7576 The class hierarcy has changed from this:
7581 - CacheableEvalExecutable (also RefCounted by multiple-inheritance)
7582 - FunctionExecutable (also RefCounted by multiple-inheritance, 'special' FunctionExecutable also used for host functions)
7589 - VPtrHackExecutable
7593 - FunctionExecutable
7595 This patch speeds up sunspidey by a couple of ms (presumably due to the changes to isHostFunction()).
7597 * bytecode/CodeBlock.cpp:
7598 (JSC::CodeBlock::CodeBlock):
7599 * bytecode/CodeBlock.h:
7600 (JSC::CodeBlock::ownerExecutable):
7601 (JSC::GlobalCodeBlock::GlobalCodeBlock):
7602 * bytecode/EvalCodeCache.h:
7603 (JSC::EvalCodeCache::get):
7604 * debugger/Debugger.cpp:
7605 (JSC::Debugger::recompileAllJSFunctions):
7606 * interpreter/CachedCall.h:
7607 (JSC::CachedCall::CachedCall):
7608 * interpreter/Interpreter.cpp:
7609 (JSC::Interpreter::callEval):
7610 (JSC::Interpreter::privateExecute):
7612 (JSC::DEFINE_STUB_FUNCTION):
7613 * profiler/Profiler.cpp:
7614 (JSC::createCallIdentifierFromFunctionImp):
7615 * runtime/Arguments.h:
7616 (JSC::Arguments::getArgumentsData):
7617 (JSC::Arguments::Arguments):
7618 * runtime/Executable.cpp:
7619 (JSC::NativeExecutable::~NativeExecutable):
7620 (JSC::VPtrHackExecutable::~VPtrHackExecutable):
7621 * runtime/Executable.h:
7622 (JSC::ExecutableBase::ExecutableBase):
7623 (JSC::ExecutableBase::~ExecutableBase):
7624 (JSC::ExecutableBase::isHostFunction):
7625 (JSC::NativeExecutable::NativeExecutable):
7626 (JSC::VPtrHackExecutable::VPtrHackExecutable):
7627 (JSC::ScriptExecutable::ScriptExecutable):
7628 (JSC::ScriptExecutable::source):
7629 (JSC::ScriptExecutable::sourceID):
7630 (JSC::ScriptExecutable::sourceURL):
7631 (JSC::ScriptExecutable::lineNo):
7632 (JSC::ScriptExecutable::lastLine):
7633 (JSC::ScriptExecutable::usesEval):
7634 (JSC::ScriptExecutable::usesArguments):
7635 (JSC::ScriptExecutable::needsActivation):
7636 (JSC::EvalExecutable::EvalExecutable):
7637 (JSC::EvalExecutable::create):
7638 (JSC::ProgramExecutable::ProgramExecutable):
7639 (JSC::FunctionExecutable::FunctionExecutable):
7640 * runtime/FunctionPrototype.cpp:
7641 (JSC::functionProtoFuncToString):
7642 * runtime/JSFunction.cpp:
7643 (JSC::JSFunction::JSFunction):
7644 (JSC::JSFunction::~JSFunction):
7645 (JSC::JSFunction::markChildren):
7646 (JSC::JSFunction::getCallData):
7647 (JSC::JSFunction::call):
7648 (JSC::JSFunction::lengthGetter):
7649 (JSC::JSFunction::getConstructData):
7650 (JSC::JSFunction::construct):
7651 * runtime/JSFunction.h:
7652 (JSC::JSFunction::executable):
7653 (JSC::JSFunction::jsExecutable):
7654 (JSC::JSFunction::isHostFunction):
7656 2009-08-20 Oliver Hunt <oliver@apple.com>
7658 Reviewed by Maciej Stachowiak.
7660 Browser hangs on opening Web Inspector.
7661 https://bugs.webkit.org/show_bug.cgi?id=28438
7663 Code generation needs to be able to walk the entire scopechain in some
7664 cases, however the symbol table used by activations was a member of the
7665 codeblock. Following recompilation this may no longer exist, leading
7666 to a crash or hang on lookup.
7668 We fix this by introducing a refcounted SymbolTable subclass, SharedSymbolTable,
7669 for the CodeBlocks used by function code. This allows activations to
7670 maintain ownership of a copy of the symbol table even after recompilation so
7671 they can continue to work.
7673 * bytecode/CodeBlock.cpp:
7674 (JSC::CodeBlock::CodeBlock):
7675 * bytecode/CodeBlock.h:
7676 (JSC::CodeBlock::symbolTable):
7677 (JSC::CodeBlock::sharedSymbolTable):
7678 (JSC::GlobalCodeBlock::GlobalCodeBlock):
7679 (JSC::FunctionCodeBlock::FunctionCodeBlock):
7680 (JSC::FunctionCodeBlock::~FunctionCodeBlock):
7681 * interpreter/Interpreter.cpp:
7682 (JSC::Interpreter::retrieveArguments):
7683 * runtime/Executable.cpp:
7684 (JSC::EvalExecutable::generateBytecode):
7685 (JSC::FunctionExecutable::generateBytecode):
7686 (JSC::FunctionExecutable::reparseExceptionInfo):
7687 (JSC::EvalExecutable::reparseExceptionInfo):
7688 * runtime/JSActivation.h:
7689 (JSC::JSActivation::JSActivationData::JSActivationData):
7690 (JSC::JSActivation::JSActivationData::~JSActivationData):
7691 * runtime/SymbolTable.h:
7693 2009-08-20 Xan Lopez <xlopez@igalia.com>
7695 Add new file to GTK+ build.
7699 2009-08-20 Geoffrey Garen <ggaren@apple.com>
7701 Reviewed by Maciej Stachowiak.
7703 Added a number => string cache.
7705 1.07x faster on v8 (1.7x faster on v8-splay).
7706 1.004x faster on SunSpider.
7708 * runtime/JSCell.h: Moved JSValue::toString to JSString.h.
7709 * runtime/JSGlobalData.h: Holds the cache.
7710 * runtime/JSNumberCell.cpp:
7711 (JSC::JSNumberCell::toString):
7712 (JSC::JSNumberCell::toThisString): Removed -0 special case.
7713 UString handles this now, since too many clients were
7716 * runtime/JSString.h:
7717 (JSC::JSValue::toString): Use the cache when converting
7718 an int or double to string.
7720 * runtime/Operations.h:
7721 (JSC::concatenateStrings): Call toString to take advantage
7724 * runtime/SmallStrings.h:
7725 (JSC::NumericStrings::add):
7726 (JSC::NumericStrings::lookup): The cache.
7728 * runtime/UString.cpp:
7729 (JSC::UString::from): Added -0 special case mentioned above.
7730 Removed appendNumeric because it's mutually exclusive with the
7733 2009-08-20 Oliver Hunt <oliver@apple.com>
7735 Reviewed by Gavin Barraclough.
7737 REGRESSION: fast/profiler/call.html is crashing occasionally
7738 https://bugs.webkit.org/show_bug.cgi?id=28476
7740 Using the codeblock for information about how many parameters and
7741 locals a function has is unsafe in certain circumstances. The
7742 basic scenario is all function code being cleared in response to
7743 the debugger or profiler being enabled, and then an activation is
7744 marked before its associated function is re-executed.
7746 To deal with this scenario we store the variable count of a function
7747 directly in the FunctionExecutable, and then use that information.
7749 * runtime/Arguments.h:
7750 (JSC::Arguments::getArgumentsData):
7751 * runtime/Executable.cpp:
7752 (JSC::FunctionExecutable::generateBytecode):
7753 * runtime/Executable.h:
7754 (JSC::FunctionExecutable::FunctionExecutable):
7755 (JSC::FunctionExecutable::variableCount):
7756 * runtime/JSActivation.cpp:
7757 (JSC::JSActivation::markChildren):
7759 2009-08-20 Gavin Barraclough <barraclough@apple.com>
7761 Reviewed by Oliver Hunt.
7763 Numbering of arguments to emitGetJITStubArg/emitPutJITStubArg incorrect
7764 <bug lost in the great bug disasteroony of 08/20/09!>
7766 The argumentNumber argument to emitGetJITStubArg/emitPutJITStubArg should match
7767 the argument number used within the stub functions in JITStubs.cpp, but it doesn't.
7769 Firstly, all the numbers changed when we added a void* 'reserved' as the first slot
7770 (rather than leaving argument 0 unused), and secondly in 32_64 builds the index to
7771 peek/poke needs to be multiplies by 2 (since the argument to peek/poke is a number
7772 of machine words, and on 32_64 build the argument slots to stub functions are two
7777 (JSC::JIT::compileOpCallSetupArgs):
7778 (JSC::JIT::compileOpConstructSetupArgs):
7779 (JSC::JIT::compileOpCallVarargsSetupArgs):
7780 (JSC::JIT::compileOpCall):
7781 * jit/JITInlineMethods.h:
7782 (JSC::JIT::emitPutJITStubArg):
7783 (JSC::JIT::emitPutJITStubArgConstant):
7784 (JSC::JIT::emitGetJITStubArg):
7785 (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
7786 * jit/JITOpcodes.cpp:
7787 (JSC::JIT::privateCompileCTIMachineTrampolines):
7788 * jit/JITPropertyAccess.cpp:
7789 (JSC::JIT::privateCompilePutByIdTransition):
7791 2009-08-20 Oliver Hunt <oliver@apple.com>
7793 Reviewed by Geoff Garen.
7795 REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest
7796 https://bugs.webkit.org/show_bug.cgi?id=28332
7798 Follow up style fixes that were missed in review.
7800 * runtime/Structure.cpp:
7801 (JSC::Structure::hasTransition):
7802 * runtime/Structure.h:
7803 (JSC::Structure::get):
7804 (JSC::StructureTransitionTable::contains):
7805 * runtime/StructureTransitionTable.h:
7806 (JSC::StructureTransitionTable::add):
7808 2009-08-20 Oliver Hunt <oliver@apple.com>
7810 Add new exports to windows jsc build
7812 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7813 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
7815 2009-08-20 Oliver Hunt <oliver@apple.com>
7817 Reviewed by Gavin Barraclough.
7819 REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest
7820 https://bugs.webkit.org/show_bug.cgi?id=28332
7822 The method check optimisation made transitions aware of the value being
7823 assigned when a transition was assigning a function. This had the side
7824 effect of making every assignment of a function expression result in a
7825 new transition, and thus a new Structure. The net result of this is that
7826 the common JS idiom of
7828 function MyObject() {
7829 this.myFunction = function(...){...};
7833 Will produce a unique structure on every iteration, meaning that all
7834 caching is defeated and there is a significant amount of structure churn.
7836 The fix is to return the transition to its original form where it is
7837 keyed off a property name + attributes tuple, but have each transition
7838 support an optional transition on a specific value.
7840 * JavaScriptCore.exp:
7841 * runtime/JSObject.h:
7842 (JSC::JSObject::putDirectInternal):
7843 * runtime/Structure.cpp:
7844 (JSC::Structure::~Structure):
7845 (JSC::Structure::addPropertyTransitionToExistingStructure):
7846 (JSC::Structure::addPropertyTransition):
7847 (JSC::Structure::hasTransition):
7848 * runtime/Structure.h:
7849 (JSC::Structure::transitionedFor):
7850 (JSC::Structure::hasTransition):
7852 (JSC::StructureTransitionTable::contains):
7853 (JSC::StructureTransitionTable::get):
7854 * runtime/StructureTransitionTable.h:
7855 (JSC::StructureTransitionTableHashTraits::emptyValue):
7856 (JSC::StructureTransitionTable::hasTransition):
7857 (JSC::StructureTransitionTable::remove):
7858 (JSC::StructureTransitionTable::add):
7860 2009-08-20 Gavin Barraclough <barraclough@apple.com>
7862 Reviewed by Oliver Hunt.
7864 Remove FunctionCodeBlock.
7865 https://bugs.webkit.org/show_bug.cgi?id=28502
7867 These only exist to allow JIT code to dereference properties off the
7868 CodeBlock for any callee, regardless of whether it is a host function.
7870 Instead just use the FunctionExecutable. Copy the m_parameters field
7871 from the CodeBlock into the Executable, and use this to distinguish
7872 between host functions, functions that have been bytecompiled, and
7873 functions that have not.
7875 m_parameters is moved to ExecutableBase rather than FunctionExecutable
7876 so that (as a separate change) we can move make a separate class of
7877 executable for host code, which is not devived from FunctionExecutable
7878 (host code does not feature any of the properties that normal executable
7879 do and will provide, such as source, attributes, and a parsed name).
7881 1% win on v8 tests, 0.5% on sunspider.
7883 * bytecode/CodeBlock.cpp:
7884 (JSC::CodeBlock::derefStructures):
7885 (JSC::CodeBlock::refStructures):
7886 (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
7887 (JSC::CodeBlock::handlerForBytecodeOffset):
7888 (JSC::CodeBlock::lineNumberForBytecodeOffset):
7889 (JSC::CodeBlock::expressionRangeForBytecodeOffset):
7890 (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
7891 (JSC::CodeBlock::functionRegisterForBytecodeOffset):
7892 (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
7893 (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
7894 * bytecode/CodeBlock.h:
7896 (JSC::CodeBlock::source):
7897 (JSC::CodeBlock::sourceOffset):
7898 (JSC::CodeBlock::evalCodeCache):
7899 (JSC::CodeBlock::createRareDataIfNecessary):
7901 remove NativeCodeBlocks and the NativeCode code type.
7904 (JSC::JIT::linkCall):
7906 Revert to previous behaviour (as currently still commented!) that Hhost functions have a null codeblock.
7909 (JSC::JIT::compileOpCallInitializeCallFrame):
7910 (JSC::JIT::compileOpCallSetupArgs):
7911 (JSC::JIT::compileOpCallVarargsSetupArgs):
7912 (JSC::JIT::compileOpConstructSetupArgs):
7913 (JSC::JIT::compileOpCallVarargs):
7914 (JSC::JIT::compileOpCall):
7915 (JSC::JIT::compileOpCallSlowCase):
7917 Bring the 32_64 & non-32_64 JITs into line with each other, callee in regT0.
7919 * jit/JITOpcodes.cpp:
7920 (JSC::JIT::privateCompileCTIMachineTrampolines):
7922 Rewrite call trampolines to not use the CodeBlock.
7925 (JSC::DEFINE_STUB_FUNCTION):
7927 Make call_JSFunction & call_arityCheck return the callee, don't expect to be passed the CodeBlock.
7929 * runtime/Executable.cpp:
7930 (JSC::FunctionExecutable::generateBytecode):
7931 (JSC::FunctionExecutable::recompile):
7932 (JSC::FunctionExecutable::FunctionExecutable):
7933 * runtime/Executable.h:
7934 (JSC::ExecutableBase::):
7935 (JSC::ExecutableBase::ExecutableBase):
7936 (JSC::FunctionExecutable::isHostFunction):
7938 Add m_numParameters.
7940 * runtime/JSFunction.cpp:
7941 (JSC::JSFunction::~JSFunction):
7943 Only call generatedBytecode() on JSFunctions non-host FunctionExecutables.
7945 2009-08-20 Yongjun Zhang <yongjun.zhang@nokia.com>
7947 Reviewed by Eric Seidel.
7949 https://bugs.webkit.org/show_bug.cgi?id=28054
7951 Use a helper function to work around winscw compiler forward declaration bug
7952 regarding templated classes.
7954 Add parenthesis around (PassRefPtr::*UnspecifiedBoolType) to make winscw compiler
7955 work with the default UnSpecifiedBoolType() operator, which removes the winscw
7956 specific bool cast hack.
7959 (WTF::derefIfNotNull):
7960 (WTF::PassRefPtr::~PassRefPtr):
7962 2009-08-19 Yong Li <yong.li@torchmobile.com>
7964 Reviewed by Gavin Barraclough.
7966 Change namespace ARM to ARMRegisters
7967 X86 to X86Registers to avoid conflict with macros
7968 https://bugs.webkit.org/show_bug.cgi?id=28428
7970 * assembler/ARMAssembler.cpp:
7971 * assembler/ARMAssembler.h:
7972 * assembler/ARMv7Assembler.h:
7973 * assembler/MacroAssemblerARM.h:
7974 * assembler/MacroAssemblerARMv7.h:
7975 * assembler/MacroAssemblerX86Common.h:
7976 * assembler/MacroAssemblerX86_64.h:
7977 * assembler/X86Assembler.h:
7979 * jit/JITArithmetic.cpp:
7980 * jit/JITInlineMethods.h:
7981 * jit/JITOpcodes.cpp:
7982 * wrec/WRECGenerator.cpp:
7983 * wrec/WRECGenerator.h:
7984 * yarr/RegexJIT.cpp:
7986 2009-08-19 Oliver Hunt <oliver@apple.com>
7988 Reviewed by Gavin Barraclough.
7990 Devirtualise marking
7991 https://bugs.webkit.org/show_bug.cgi?id=28294
7993 We actually need to mark the value in a number object if we're using the
7994 32bit number representation.
7996 * runtime/NumberObject.h:
7997 (JSC::NumberObject::createStructure):
7999 2009-08-19 Gavin Barraclough <barraclough@apple.com>
8001 Reviewed by Darin Adler.
8003 We probably shouldn't be keeping the AST for eval nodes around forevar.
8004 https://bugs.webkit.org/show_bug.cgi?id=28469
8006 EvalNodes don't destroyData() (delete their parser data) since they need to hold onto
8007 their varStack. Copy a list of variable onto EvalCodeBlock, and this can go away.
8009 * bytecode/CodeBlock.h:
8010 (JSC::EvalCodeBlock::variable):
8011 (JSC::EvalCodeBlock::numVariables):
8012 (JSC::EvalCodeBlock::adoptVariables):
8013 * bytecompiler/BytecodeGenerator.cpp:
8014 (JSC::BytecodeGenerator::BytecodeGenerator):
8015 * interpreter/Interpreter.cpp:
8016 (JSC::Interpreter::execute):
8018 * runtime/Executable.cpp:
8019 (JSC::EvalExecutable::generateBytecode):
8020 * runtime/Executable.h:
8022 2009-08-19 Jungshik Shin <jshin@chromium.org>
8024 Reviewed by Darin Adler.
8026 http://bugs.webkit.org/show_bug.cgi?id=28441
8028 Fix a build issue with ICU 4.2 or later on Windows with Visual C++.
8029 Instead of defining all isXXX and toupper/tolower as
8030 WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h,
8031 #define them to be different by prepending 'WTF_...ASCIIType_h' with
8032 the originial names like 'toupper_WTF_...ASCIIType_h'.
8034 * wtf/DisallowCType.h:
8036 2009-08-18 Oliver Hunt <oliver@apple.com>
8038 Reviewed by Gavin Barraclough.
8040 Assigning a function to an object should always use the existing transition, even if the transition is not specialized
8041 https://bugs.webkit.org/show_bug.cgi?id=28442
8043 Check for an unspecialized transition as an alternative to always failing if specialisation does not match.
8045 * runtime/Structure.cpp:
8046 (JSC::Structure::addPropertyTransitionToExistingStructure):
8048 2009-08-18 Dirk Schulze <krit@webkit.org>
8050 Reviewed by Oliver Hunt.
8052 Added additional getter to ByteArray with an unsigned char as return.
8053 ByteArray can take unsigned char directly now.
8056 (WTF::ByteArray::set):
8057 (WTF::ByteArray::get):
8059 2009-08-18 Peter Kasting <pkasting@google.com>
8061 Reviewed by Eric Seidel.
8063 https://bugs.webkit.org/show_bug.cgi?id=28415
8064 Set svn:eol-style CRLF on all .sln and .vcproj files that don't already
8067 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
8068 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
8070 2009-08-18 Xan Lopez <xlopez@igalia.com>
8072 Try to fix the GTK+ build.
8076 2009-08-17 Gavin Barraclough <barraclough@apple.com>
8078 Reviewed by Sam Weinig.
8080 No, silly runtime, AST nodes are not for you.
8082 We still use AST nodes (ScopeNodes, particularly FunctionBodyNodes) within
8083 the runtime, which means that these nodes must be persisted outside of the
8084 arena, contain both parser & runtime data, etc. This is all a bit of a mess.
8086 Move functionality into a new FunctionExecutable class.
8088 * API/JSCallbackFunction.cpp:
8089 * API/JSObjectRef.cpp:
8090 * JavaScriptCore.exp:
8091 * JavaScriptCore.xcodeproj/project.pbxproj:
8092 * bytecode/CodeBlock.cpp:
8093 (JSC::CodeBlock::CodeBlock):
8094 (JSC::CodeBlock::markAggregate):
8095 (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
8096 (JSC::CodeBlock::lineNumberForBytecodeOffset):
8097 (JSC::CodeBlock::shrinkToFit):
8098 * bytecode/CodeBlock.h:
8099 (JSC::CodeBlock::getBytecodeIndex):
8100 (JSC::CodeBlock::discardBytecode):
8101 (JSC::CodeBlock::instructionCount):
8102 (JSC::CodeBlock::getJITCode):
8103 (JSC::CodeBlock::executablePool):
8104 (JSC::CodeBlock::ownerExecutable):
8105 (JSC::CodeBlock::extractExceptionInfo):
8106 (JSC::CodeBlock::addFunctionDecl):
8107 (JSC::CodeBlock::functionDecl):
8108 (JSC::CodeBlock::numberOfFunctionDecls):
8109 (JSC::CodeBlock::addFunctionExpr):
8110 (JSC::CodeBlock::functionExpr):
8111 (JSC::GlobalCodeBlock::GlobalCodeBlock):
8112 (JSC::ProgramCodeBlock::ProgramCodeBlock):
8113 (JSC::EvalCodeBlock::EvalCodeBlock):
8114 (JSC::FunctionCodeBlock::FunctionCodeBlock):
8115 (JSC::NativeCodeBlock::NativeCodeBlock):
8116 * bytecode/EvalCodeCache.h:
8117 * bytecode/SamplingTool.cpp:
8118 (JSC::SamplingTool::doRun):
8119 * bytecompiler/BytecodeGenerator.cpp:
8120 (JSC::BytecodeGenerator::BytecodeGenerator):
8121 (JSC::BytecodeGenerator::emitNewFunction):
8122 (JSC::BytecodeGenerator::emitNewFunctionExpression):
8123 * bytecompiler/BytecodeGenerator.h:
8124 * debugger/Debugger.cpp:
8125 (JSC::Debugger::recompileAllJSFunctions):
8126 * interpreter/CachedCall.h:
8127 (JSC::CachedCall::CachedCall):
8128 * interpreter/CallFrameClosure.h:
8129 * interpreter/Interpreter.cpp:
8130 (JSC::Interpreter::unwindCallFrame):
8131 (JSC::Interpreter::throwException):
8132 (JSC::Interpreter::execute):
8133 (JSC::Interpreter::prepareForRepeatCall):
8134 (JSC::Interpreter::debug):
8135 (JSC::Interpreter::privateExecute):
8136 (JSC::Interpreter::retrieveLastCaller):
8137 * interpreter/Interpreter.h:
8139 (JSC::JIT::privateCompile):
8141 (JSC::JIT::compile):
8142 * jit/JITOpcodes.cpp:
8143 (JSC::JIT::privateCompileCTIMachineTrampolines):
8144 (JSC::JIT::emit_op_new_func):
8145 (JSC::JIT::emit_op_new_func_exp):
8147 (JSC::DEFINE_STUB_FUNCTION):
8151 (JSC::FunctionBodyNode::reparseDataIfNecessary):
8153 (JSC::EvalNode::partialDestroyData):
8155 * profiler/ProfileGenerator.cpp:
8156 * profiler/Profiler.cpp:
8157 (JSC::Profiler::createCallIdentifier):
8158 (JSC::createCallIdentifierFromFunctionImp):
8159 * runtime/Arguments.h:
8160 (JSC::Arguments::getArgumentsData):
8161 (JSC::Arguments::Arguments):
8162 (JSC::JSActivation::copyRegisters):
8163 * runtime/ArrayPrototype.cpp:
8164 (JSC::isNumericCompareFunction):
8165 * runtime/CallData.h:
8167 * runtime/Collector.cpp:
8168 (JSC::Heap::collect):
8169 * runtime/ConstructData.h:
8171 * runtime/ExceptionHelpers.cpp:
8172 (JSC::createUndefinedVariableError):
8173 (JSC::createInvalidParamError):
8174 (JSC::createNotAConstructorError):
8175 (JSC::createNotAFunctionError):
8176 (JSC::createNotAnObjectError):
8177 * runtime/Executable.cpp: Added.
8178 (JSC::EvalExecutable::generateBytecode):
8179 (JSC::ProgramExecutable::generateBytecode):
8180 (JSC::FunctionExecutable::generateBytecode):
8181 (JSC::EvalExecutable::generateJITCode):
8182 (JSC::ProgramExecutable::generateJITCode):
8183 (JSC::FunctionExecutable::generateJITCode):
8184 (JSC::FunctionExecutable::isHostFunction):
8185 (JSC::FunctionExecutable::markAggregate):
8186 (JSC::FunctionExecutable::reparseExceptionInfo):
8187 (JSC::EvalExecutable::reparseExceptionInfo):
8188 (JSC::FunctionExecutable::recompile):
8189 (JSC::FunctionExecutable::FunctionExecutable):
8190 * runtime/Executable.h:
8191 (JSC::ExecutableBase::~ExecutableBase):
8192 (JSC::ExecutableBase::ExecutableBase):
8193 (JSC::ExecutableBase::source):
8194 (JSC::ExecutableBase::sourceID):
8195 (JSC::ExecutableBase::lastLine):
8196 (JSC::ExecutableBase::usesEval):
8197 (JSC::ExecutableBase::usesArguments):
8198 (JSC::ExecutableBase::needsActivation):
8199 (JSC::ExecutableBase::astNode):
8200 (JSC::ExecutableBase::generatedJITCode):
8201 (JSC::ExecutableBase::getExecutablePool):
8202 (JSC::EvalExecutable::EvalExecutable):
8203 (JSC::EvalExecutable::bytecode):
8204 (JSC::EvalExecutable::varStack):
8205 (JSC::EvalExecutable::evalNode):
8206 (JSC::EvalExecutable::jitCode):
8207 (JSC::ProgramExecutable::ProgramExecutable):
8208 (JSC::ProgramExecutable::reparseExceptionInfo):
8209 (JSC::ProgramExecutable::bytecode):
8210 (JSC::ProgramExecutable::programNode):
8211 (JSC::ProgramExecutable::jitCode):
8212 (JSC::FunctionExecutable::FunctionExecutable):
8213 (JSC::FunctionExecutable::name):
8214 (JSC::FunctionExecutable::bytecode):
8215 (JSC::FunctionExecutable::generatedBytecode):
8216 (JSC::FunctionExecutable::usesEval):
8217 (JSC::FunctionExecutable::usesArguments):
8218 (JSC::FunctionExecutable::parameterCount):
8219 (JSC::FunctionExecutable::paramString):
8220 (JSC::FunctionExecutable::isGenerated):
8221 (JSC::FunctionExecutable::body):
8222 (JSC::FunctionExecutable::jitCode):
8223 (JSC::FunctionExecutable::createNativeThunk):
8224 * runtime/FunctionConstructor.cpp:
8225 (JSC::constructFunction):
8226 * runtime/FunctionPrototype.cpp:
8227 (JSC::functionProtoFuncToString):
8228 * runtime/JSActivation.cpp:
8229 (JSC::JSActivation::JSActivation):
8230 (JSC::JSActivation::markChildren):
8231 (JSC::JSActivation::isDynamicScope):
8232 (JSC::JSActivation::argumentsGetter):
8233 * runtime/JSActivation.h:
8234 (JSC::JSActivation::JSActivationData::JSActivationData):
8235 * runtime/JSFunction.cpp:
8236 (JSC::JSFunction::isHostFunction):
8237 (JSC::JSFunction::JSFunction):
8238 (JSC::JSFunction::~JSFunction):
8239 (JSC::JSFunction::markChildren):
8240 (JSC::JSFunction::getCallData):
8241 (JSC::JSFunction::call):
8242 (JSC::JSFunction::lengthGetter):
8243 (JSC::JSFunction::getConstructData):
8244 (JSC::JSFunction::construct):
8245 * runtime/JSFunction.h:
8246 (JSC::JSFunction::executable):
8247 (JSC::FunctionExecutable::make):
8248 * runtime/JSGlobalData.cpp:
8249 (JSC::JSGlobalData::JSGlobalData):
8250 (JSC::JSGlobalData::numericCompareFunction):
8251 * runtime/JSGlobalData.h:
8253 2009-08-17 Mark Rowe <mrowe@apple.com>
8255 Reviewed by Darin Adler.
8257 Fix 300,000+ leaks seen during the regression tests.
8259 EvalCodeCache::get was heap-allocating an EvalExecutable instance without adopting the initial reference.
8260 While fixing this we noticed that EvalExecutable was a RefCounted type that was sometimes stack allocated.
8261 To make this cleaner and to prevent clients from attempting to ref a stack-allocated instance, we move the
8262 refcounting down to a new CacheableEvalExecutable class that derives from EvalExecutable. EvalCodeCache::get
8263 now uses CacheableEvalExecutable::create and avoids the leak.
8265 * bytecode/EvalCodeCache.h:
8266 (JSC::EvalCodeCache::get):
8267 * interpreter/Interpreter.cpp:
8268 (JSC::Interpreter::callEval):
8269 * runtime/Executable.h:
8270 (JSC::CacheableEvalExecutable::create):
8271 (JSC::CacheableEvalExecutable::CacheableEvalExecutable):
8273 2009-08-17 Oliver Hunt <oliver@apple.com>
8277 REGRESSION (r47292): Prototype.js is broken by ES5 Arguments changes
8278 https://bugs.webkit.org/show_bug.cgi?id=28341
8279 <rdar://problem/7145615>
8281 Reverting r47292. Alas Prototype.js breaks with Arguments inheriting
8282 from Array as ES5 attempted. Prototype.js defines $A in terms of a
8283 function it places on (among other global objects) the Array prototype,
8284 thus breaking $A for arrays.
8286 * runtime/Arguments.h:
8287 (JSC::Arguments::Arguments):
8288 * runtime/JSGlobalObject.cpp:
8289 (JSC::JSGlobalObject::reset):
8290 (JSC::JSGlobalObject::markChildren):
8291 * runtime/JSGlobalObject.h:
8292 (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
8293 * runtime/ObjectPrototype.cpp:
8294 (JSC::ObjectPrototype::ObjectPrototype):
8295 * runtime/ObjectPrototype.h:
8296 * tests/mozilla/ecma_3/Function/arguments-001.js:
8298 2009-08-17 Peter Kasting <pkasting@google.com>
8300 Reviewed by Steve Falkenburg.
8302 https://bugs.webkit.org/show_bug.cgi?id=27323
8303 Only add Cygwin to the path when it isn't already there. This avoids
8304 causing problems for people who purposefully have non-Cygwin versions of
8305 executables like svn in front of the Cygwin ones in their paths.
8307 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
8308 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
8309 * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
8310 * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
8311 * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
8313 2009-08-17 Xan Lopez <xlopez@igalia.com>
8315 Reviewed by Mark Rowe.
8317 Fix build with FAST_MALLOC_MATCH_VALIDATION enabled.
8319 * wtf/FastMalloc.cpp:
8324 2009-08-16 Holger Hans Peter Freyther <zecke@selfish.org>
8326 Reviewed by Mark Rowe.
8328 Fix crash on ./ecma_2/RegExp/exec-002.js.
8329 https://bugs.webkit.org/show_bug.cgi?id=28353
8331 Change the order of freeParenthesesDisjunctionContext and
8332 popParenthesesDisjunctionContext on all call sites as the pop
8333 method is accessing backTrack->lastContext which is the context
8334 that is about to be freed.
8336 * yarr/RegexInterpreter.cpp:
8337 (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
8338 (JSC::Yarr::Interpreter::backtrackParentheses):
8340 2009-08-16 Holger Hans Peter Freyther <zecke@selfish.org>
8342 Reviewed by Mark Rowe.
8344 https://bugs.webkit.org/show_bug.cgi?id=28352
8346 Fix coding style violations. Use m_ for C++ class members. Remove
8347 trailing whitespace on empty lines.
8349 * yarr/RegexInterpreter.cpp:
8350 (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext):
8351 (JSC::Yarr::Interpreter::tryConsumeCharacter):
8352 (JSC::Yarr::Interpreter::tryConsumeBackReference):
8353 (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
8354 (JSC::Yarr::Interpreter::backtrackParentheses):
8355 (JSC::Yarr::ByteCompiler::ByteCompiler):
8356 (JSC::Yarr::ByteCompiler::compile):
8357 (JSC::Yarr::ByteCompiler::checkInput):
8358 (JSC::Yarr::ByteCompiler::assertionBOL):
8359 (JSC::Yarr::ByteCompiler::assertionEOL):
8360 (JSC::Yarr::ByteCompiler::assertionWordBoundary):
8361 (JSC::Yarr::ByteCompiler::atomPatternCharacter):
8362 (JSC::Yarr::ByteCompiler::atomCharacterClass):
8363 (JSC::Yarr::ByteCompiler::atomBackReference):
8364 (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
8365 (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
8366 (JSC::Yarr::ByteCompiler::popParenthesesStack):
8367 (JSC::Yarr::ByteCompiler::closeAlternative):
8368 (JSC::Yarr::ByteCompiler::closeBodyAlternative):
8369 (JSC::Yarr::ByteCompiler::atomParenthesesEnd):
8370 (JSC::Yarr::ByteCompiler::regexBegin):
8371 (JSC::Yarr::ByteCompiler::alterantiveBodyDisjunction):
8372 (JSC::Yarr::ByteCompiler::alterantiveDisjunction):
8373 (JSC::Yarr::ByteCompiler::emitDisjunction):
8375 2009-08-15 Mark Rowe <mrowe@apple.com>
8377 Fix the build with JIT disabled.
8379 * runtime/Arguments.h: Only compile the jitCode method when the JIT is enabled.
8380 * runtime/Executable.h: Include PrototypeFunction.h so the compiler knows what
8381 NativeFunctionWrapper is when the JIT is disabled.
8383 2009-08-15 Adam Bergkvist <adam.bergkvist@ericsson.com>
8385 Reviewed by Sam Weinig.
8387 Added ENABLE_EVENTSOURCE flag.
8388 https://bugs.webkit.org/show_bug.cgi?id=14997
8390 * Configurations/FeatureDefines.xcconfig:
8392 2009-08-14 Gavin Barraclough <barraclough@apple.com>
8395 (JSC::EvalExecutable::parse):
8396 (JSC::ProgramExecutable::parse):
8397 * runtime/Executable.h:
8399 2009-08-14 Gavin Barraclough <barraclough@apple.com>
8401 Reviewed by Oliver Hunt.
8403 Remove AST nodes from use within the Runtime (outside of parsing), stage 1
8404 https://bugs.webkit.org/show_bug.cgi?id=28330
8406 Remove the EvalNode and ProgramNode from use in the runtime. They still exist
8407 after this patch, but are hidden behind EvalExecutable and FunctionExecutable,
8408 and are also still reachable behind CodeBlock::m_ownerNode.
8410 The next step will be to beat back FunctionBodyNode in the same fashion.
8411 Then remove the usage via CodeBlock, then only construct these nodes only on
8412 demand during bytecode generation.
8414 * JavaScriptCore.xcodeproj/project.pbxproj:
8415 * bytecode/CodeBlock.h:
8416 (JSC::GlobalCodeBlock::GlobalCodeBlock):
8417 (JSC::GlobalCodeBlock::~GlobalCodeBlock):
8418 (JSC::ProgramCodeBlock::ProgramCodeBlock):
8419 (JSC::EvalCodeBlock::EvalCodeBlock):
8420 (JSC::FunctionCodeBlock::FunctionCodeBlock):
8421 (JSC::NativeCodeBlock::NativeCodeBlock):
8422 * bytecode/EvalCodeCache.h:
8423 (JSC::EvalCodeCache::get):
8424 * debugger/Debugger.cpp:
8425 (JSC::evaluateInGlobalCallFrame):
8426 * debugger/DebuggerCallFrame.cpp:
8427 (JSC::DebuggerCallFrame::evaluate):
8428 * interpreter/Interpreter.cpp:
8429 (JSC::Interpreter::callEval):
8430 (JSC::Interpreter::execute):
8431 * interpreter/Interpreter.h:
8433 (JSC::FunctionBodyNode::createNativeThunk):
8434 (JSC::FunctionBodyNode::generateBytecode):
8435 (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse):
8437 (JSC::Parser::parse):
8438 (JSC::Parser::reparse):
8439 (JSC::Parser::parseFunctionFromGlobalCode):
8441 * runtime/Completion.cpp:
8444 * runtime/Error.cpp:
8447 * runtime/Executable.h: Added.
8448 (JSC::TemplateExecutable::TemplateExecutable):
8449 (JSC::TemplateExecutable::markAggregate):
8450 (JSC::TemplateExecutable::sourceURL):
8451 (JSC::TemplateExecutable::lineNo):
8452 (JSC::TemplateExecutable::bytecode):
8453 (JSC::TemplateExecutable::jitCode):
8454 (JSC::EvalExecutable::EvalExecutable):
8455 (JSC::ProgramExecutable::ProgramExecutable):
8456 * runtime/FunctionConstructor.cpp:
8457 (JSC::constructFunction):
8458 * runtime/FunctionConstructor.h:
8459 * runtime/JSGlobalData.cpp:
8460 (JSC::JSGlobalData::numericCompareFunction):
8461 * runtime/JSGlobalObject.cpp:
8462 (JSC::JSGlobalObject::~JSGlobalObject):
8463 (JSC::JSGlobalObject::markChildren):
8464 * runtime/JSGlobalObject.h:
8465 (JSC::JSGlobalObject::codeBlocks):
8466 * runtime/JSGlobalObjectFunctions.cpp:
8467 (JSC::globalFuncEval):
8469 2009-08-14 Darin Adler <darin@apple.com>
8471 Reviewed by Sam Weinig.
8473 Rename the confusing isObject(<class>) to inherits(<class>).
8474 It still works on non-objects, returning false.
8476 * runtime/ArrayConstructor.cpp:
8477 (JSC::arrayConstructorIsArray): Removed unneeded isObject call
8478 and updated remaining isObject call to new name, inherits.
8480 * runtime/JSCell.h: Renamed isObject(<class>) to inherits(<class>)
8481 but more importantly, made it non-virtual (it was already inline)
8482 so it is now as fast as JSObject::inherits was.
8484 * runtime/JSObject.h: Removed inherits function since the one
8485 in the base class is fine as-is. Also made various JSCell functions
8486 that should not be called on JSObject uncallable by making them
8487 both private and not implemented.
8488 (JSC::JSCell::inherits): Updated name.
8489 (JSC::JSValue::inherits): Ditto.
8491 * debugger/Debugger.cpp:
8492 (JSC::Debugger::recompileAllJSFunctions):
8493 * interpreter/Interpreter.cpp:
8494 (JSC::Interpreter::unwindCallFrame):
8495 * runtime/ArrayPrototype.cpp:
8496 (JSC::arrayProtoFuncToString):
8497 (JSC::arrayProtoFuncToLocaleString):
8498 (JSC::arrayProtoFuncConcat):
8499 * runtime/BooleanPrototype.cpp:
8500 (JSC::booleanProtoFuncToString):
8501 (JSC::booleanProtoFuncValueOf):
8502 * runtime/DateConstructor.cpp:
8503 (JSC::constructDate):
8504 * runtime/DatePrototype.cpp:
8505 (JSC::dateProtoFuncToString):
8506 (JSC::dateProtoFuncToUTCString):
8507 (JSC::dateProtoFuncToISOString):
8508 (JSC::dateProtoFuncToDateString):
8509 (JSC::dateProtoFuncToTimeString):
8510 (JSC::dateProtoFuncToLocaleString):
8511 (JSC::dateProtoFuncToLocaleDateString):
8512 (JSC::dateProtoFuncToLocaleTimeString):
8513 (JSC::dateProtoFuncGetTime):
8514 (JSC::dateProtoFuncGetFullYear):
8515 (JSC::dateProtoFuncGetUTCFullYear):
8516 (JSC::dateProtoFuncToGMTString):
8517 (JSC::dateProtoFuncGetMonth):
8518 (JSC::dateProtoFuncGetUTCMonth):
8519 (JSC::dateProtoFuncGetDate):
8520 (JSC::dateProtoFuncGetUTCDate):
8521 (JSC::dateProtoFuncGetDay):
8522 (JSC::dateProtoFuncGetUTCDay):
8523 (JSC::dateProtoFuncGetHours):
8524 (JSC::dateProtoFuncGetUTCHours):
8525 (JSC::dateProtoFuncGetMinutes):
8526 (JSC::dateProtoFuncGetUTCMinutes):
8527 (JSC::dateProtoFuncGetSeconds):
8528 (JSC::dateProtoFuncGetUTCSeconds):
8529 (JSC::dateProtoFuncGetMilliSeconds):
8530 (JSC::dateProtoFuncGetUTCMilliseconds):
8531 (JSC::dateProtoFuncGetTimezoneOffset):
8532 (JSC::dateProtoFuncSetTime):
8533 (JSC::setNewValueFromTimeArgs):
8534 (JSC::setNewValueFromDateArgs):
8535 (JSC::dateProtoFuncSetYear):
8536 (JSC::dateProtoFuncGetYear):
8537 * runtime/FunctionPrototype.cpp:
8538 (JSC::functionProtoFuncToString):
8539 * runtime/JSActivation.cpp:
8540 (JSC::JSActivation::argumentsGetter):
8541 * runtime/JSValue.h:
8542 * runtime/RegExpConstructor.cpp:
8543 (JSC::constructRegExp):
8544 * runtime/RegExpPrototype.cpp:
8545 (JSC::regExpProtoFuncTest):
8546 (JSC::regExpProtoFuncExec):
8547 (JSC::regExpProtoFuncCompile):
8548 (JSC::regExpProtoFuncToString):
8549 * runtime/ScopeChain.cpp:
8550 (JSC::ScopeChain::localDepth):
8551 * runtime/StringPrototype.cpp:
8552 (JSC::stringProtoFuncReplace):
8553 (JSC::stringProtoFuncToString):
8554 (JSC::stringProtoFuncMatch):
8555 (JSC::stringProtoFuncSearch):
8556 (JSC::stringProtoFuncSplit):
8557 Updated to new name, inherits, from old name, isObject.
8559 2009-07-31 Harald Fernengel <harald.fernengel@nokia.com>
8561 Reviewed by Simon Hausmann.
8563 Adding QNX as a platform. Currently only tested with Qt.
8565 https://bugs.webkit.org/show_bug.cgi?id=27885
8567 * JavaScriptCore/runtime/Collector.cpp: Added retrieving of stack base
8568 since QNX doesn't have the pthread _nt functions
8569 * JavaScriptCore/wtf/Platform.h: Added WTF_PLATFORM_QNX and corresponding
8571 * WebCore/bridge/npapi.h: Build fix for missing typedefs on QNX
8573 2009-08-14 Gabor Loki <loki@inf.u-szeged.hu>
8575 Reviewed by Simon Hausmann.
8577 Currently generic ARM and ARMv7 platforms work only with JSVALUE32
8578 https://bugs.webkit.org/show_bug.cgi?id=28300
8582 2009-08-14 Gabor Loki <loki@inf.u-szeged.hu>
8584 Reviewed by Simon Hausmann.
8586 Enable JIT on ARM for QT by default
8587 https://bugs.webkit.org/show_bug.cgi?id=28259
8591 2009-08-14 Gabor Loki <loki@inf.u-szeged.hu>
8593 Reviewed by Simon Hausmann.
8595 Enable YARR_JIT on ARM for QT by default
8596 https://bugs.webkit.org/show_bug.cgi?id=28259
8600 2009-08-14 Oliver Hunt <oliver@apple.com>
8602 Reviewed by Gavin Barraclough.
8604 [ES5] Arguments object should inherit from Array
8605 https://bugs.webkit.org/show_bug.cgi?id=28298
8607 Make the Arguments object conform to the behaviour specified in ES5.
8608 The simple portion of this is to make Arguments use Array.prototype
8609 as its prototype rather than Object.prototype.
8611 The spec then requires us to set instance.constructor to the pristine
8612 Object constructor, and instance.toString and instance.toLocaleString
8613 to the pristine versions from Object.prototype. To do this we now
8614 make the ObjectPrototype constructor return its toString and
8615 toLocaleString functions (similar to the call and apply functions
8616 from FunctionPrototype).
8618 Oddly enough this reports itself as a slight win, but given the code
8619 isn't hit in the tests that claim to have improved I put this down to
8622 * runtime/Arguments.h:
8623 (JSC::Arguments::Arguments):
8624 (JSC::Arguments::initializeStandardProperties):
8625 * runtime/JSGlobalObject.cpp:
8626 (JSC::JSGlobalObject::reset):
8627 (JSC::JSGlobalObject::markChildren):
8628 * runtime/JSGlobalObject.h:
8629 (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
8630 (JSC::JSGlobalObject::objectConstructor):
8631 (JSC::JSGlobalObject::objectToStringFunction):
8632 (JSC::JSGlobalObject::objectToLocaleStringFunction):
8633 * runtime/ObjectPrototype.cpp:
8634 (JSC::ObjectPrototype::ObjectPrototype):
8635 * runtime/ObjectPrototype.h:
8636 * tests/mozilla/ecma_3/Function/arguments-001.js:
8637 Update test to new es5 behaviour
8639 2009-08-14 Oliver Hunt <oliver@apple.com>
8641 Remove MarkStack::drain from the JSC exports file
8643 MarkStack::drain is now marked inline, the including it in the exports file
8644 produces an ld warning
8646 * JavaScriptCore.exp:
8648 2009-08-13 Sam Weinig <sam@webkit.org>
8650 Reviewed by Oliver Hunt.
8652 Remove accidentally left in debugging statement.
8654 * runtime/JSArray.h:
8655 (JSC::MarkStack::drain):
8657 2009-08-13 Oliver Hunt <oliver@apple.com>
8659 Reviewed by Maciej Stachowiak.
8661 [ES5] Implement Array.isArray
8662 https://bugs.webkit.org/show_bug.cgi?id=28296
8664 Add support for Array.isArray to the Array constructor
8666 * runtime/ArrayConstructor.cpp:
8667 (JSC::ArrayConstructor::ArrayConstructor):
8668 (JSC::arrayConstructorIsArray):
8669 * runtime/ArrayConstructor.h:
8670 * runtime/CommonIdentifiers.h:
8671 * runtime/JSArray.h:
8672 (JSC::MarkStack::drain):
8673 * runtime/JSGlobalObject.cpp:
8674 (JSC::JSGlobalObject::reset):
8676 2009-08-13 Oliver Hunt <oliver@apple.com>
8678 Reviewed by NOBODY (Buildfix).
8680 Attempt to fix windows build
8682 * runtime/Collector.cpp:
8684 2009-08-13 Oliver Hunt <oliver@apple.com>
8686 Reviewed by Maciej Stachowiak.
8688 Devirtualise marking
8689 https://bugs.webkit.org/show_bug.cgi?id=28294
8691 Add a bit to TypeInfo to indicate that an object uses the standard
8692 JSObject::markChildren method. This allows us to devirtualise marking
8693 of most objects (though a branch is still needed). We also add a branch
8694 to identify arrays thus devirtualising marking in that case as well.
8696 In order to make the best use of this devirtualisation I've also reworked
8697 the MarkStack::drain() logic to make the iteration more efficient.
8699 * API/JSCallbackConstructor.h:
8700 (JSC::JSCallbackConstructor::createStructure):
8701 * API/JSCallbackFunction.h:
8702 (JSC::JSCallbackFunction::createStructure):
8703 * JavaScriptCore.exp:
8704 * runtime/BooleanObject.h:
8705 (JSC::BooleanObject::createStructure):
8706 * runtime/FunctionPrototype.h:
8707 (JSC::FunctionPrototype::createStructure):
8708 * runtime/InternalFunction.h:
8709 (JSC::InternalFunction::createStructure):
8710 * runtime/JSAPIValueWrapper.h:
8711 (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
8712 * runtime/JSArray.cpp:
8713 (JSC::JSArray::markChildren):
8714 * runtime/JSArray.h:
8715 (JSC::JSArray::markChildrenDirect):
8716 (JSC::MarkStack::drain):
8717 * runtime/JSByteArray.cpp:
8718 (JSC::JSByteArray::createStructure):
8720 (JSC::MarkStack::append):
8721 * runtime/JSGlobalData.cpp:
8722 (JSC::JSGlobalData::JSGlobalData):
8723 * runtime/JSNumberCell.h:
8724 (JSC::JSNumberCell::createStructure):
8725 * runtime/JSONObject.h:
8726 (JSC::JSONObject::createStructure):
8727 * runtime/JSObject.cpp:
8728 (JSC::JSObject::markChildren):
8729 * runtime/JSObject.h:
8730 (JSC::JSObject::markChildrenDirect):
8731 (JSC::JSObject::createStructure):
8732 * runtime/JSString.h:
8733 (JSC::JSString::createStructure):
8736 * runtime/MarkStack.h:
8737 (JSC::MarkStack::MarkStack):
8738 (JSC::MarkStack::MarkSet::MarkSet):
8739 (JSC::MarkStack::MarkStackArray::last):
8740 * runtime/MathObject.h:
8741 (JSC::MathObject::createStructure):
8742 * runtime/NumberConstructor.h:
8743 (JSC::NumberConstructor::createStructure):
8744 * runtime/NumberObject.h:
8745 (JSC::NumberObject::createStructure):
8746 * runtime/RegExpConstructor.h:
8747 (JSC::RegExpConstructor::createStructure):
8748 * runtime/RegExpObject.h:
8749 (JSC::RegExpObject::createStructure):
8750 * runtime/StringObjectThatMasqueradesAsUndefined.h:
8751 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
8752 * runtime/TypeInfo.h:
8753 (JSC::TypeInfo::hasDefaultMark):
8755 2009-08-13 Darin Adler <darin@apple.com>
8757 Reviewed by Mark Rowe.
8759 Some small bits of housekeeping.
8761 * JavaScriptCore.xcodeproj/project.pbxproj: Make Parser.h
8762 project instead of private. Remove JSONObject.lut.h.
8764 * assembler/ARMAssembler.h: Remove unneeded WTF prefix.
8765 * assembler/AssemblerBufferWithConstantPool.h: Ditto.
8766 * bytecompiler/BytecodeGenerator.h: Ditto.
8768 * wtf/SegmentedVector.h: Add a "using" statement as we do
8769 with the other WTF headers.
8771 2009-08-13 Darin Adler <darin@apple.com>
8775 * parser/Grammar.y: Use a template function so we can compile
8776 setStatementLocation even if it comes before YYLTYPE is defined.
8778 2009-08-13 Darin Adler <darin@apple.com>
8780 Reviewed by George Staikos.
8782 Too much use of void* in Grammar.y
8783 https://bugs.webkit.org/show_bug.cgi?id=28287
8785 * parser/Grammar.y: Changed all the helper functions to
8786 take a JSGlobalData* instead of a void*. A couple formatting
8787 tweaks that I missed when breaking this into pieces.
8789 2009-08-13 Darin Adler <darin@apple.com>
8791 Reviewed by George Staikos.
8793 Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
8795 * parser/Grammar.y: Reduced and sorted includes. Tweaked comment
8796 format. Marked a few more functions inline.
8798 2009-08-13 Darin Adler <darin@apple.com>
8800 Reviewed by George Staikos.
8802 Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
8804 * parser/Grammar.y: Pass the number to the PropertyNode instead of
8805 first turning it into an Identifier.
8807 * parser/NodeConstructors.h:
8808 (JSC::PropertyNode::PropertyNode): Add an overload that takes a double
8809 so the code to convert to a string can be here instead of Grammar.y.
8810 * parser/Nodes.h: Ditto.
8812 2009-08-13 Darin Adler <darin@apple.com>
8814 Reviewed by George Staikos.
8816 Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
8818 * parser/Grammar.y: Eliminate the DBG macro.
8820 2009-08-13 Darin Adler <darin@apple.com>
8822 Reviewed by George Staikos.
8824 Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
8826 * parser/Grammar.y: Eliminate the SET_EXCEPTION_LOCATION macro.
8828 2009-08-13 Darin Adler <darin@apple.com>
8830 Reviewed by George Staikos.
8832 George asked me to break the patch from
8833 https://bugs.webkit.org/show_bug.cgi?id=28287
8834 into smaller pieces and land it in stages.
8836 * parser/Grammar.y: Eliminate the LEXER macro.
8838 2009-08-13 Mark Rowe <mrowe@apple.com>
8840 Try some more to fix the Windows build.
8842 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a new symbol.
8843 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Ditto.
8845 2009-08-13 Mark Rowe <mrowe@apple.com>
8847 Try and fix the Windows build.
8849 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a new symbol.
8850 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Ditto.
8852 2009-08-13 Darin Adler <darin@apple.com>
8854 Reviewed by David Levin.
8856 JavaScriptCore tweaks to get ready for the parser arena
8857 https://bugs.webkit.org/show_bug.cgi?id=28243
8859 Eliminate dependencies on Nodes.h outside JavaScriptCore,
8860 and cut down on them inside JavaScriptCore.
8862 Change regular expression parsing to use identifiers as
8863 with other strings we parse.
8865 Fix a couple things that are needed to use const Identifier
8866 more, which will be part of the parser arena work.
8868 * JavaScriptCore.exp: Resorted and updated.
8870 * JavaScriptCore.xcodeproj/project.pbxproj: Changed
8871 CollectorHeapIterator.h to be project-internal.
8873 * bytecompiler/BytecodeGenerator.cpp:
8874 (JSC::BytecodeGenerator::emitPushNewScope): Added const.
8875 * bytecompiler/BytecodeGenerator.h: Ditto.
8877 * debugger/Debugger.cpp:
8878 (JSC::Debugger::recompileAllJSFunctions): Moved this function
8879 here from WebCore. Here is better since it uses so many internals.
8880 Removed unimportant optimization for the no listener case.
8881 * debugger/Debugger.h: Ditto. Also removed unneeded include
8882 and tweaked formatting and comments.
8884 * debugger/DebuggerCallFrame.cpp:
8885 (JSC::DebuggerCallFrame::functionName): Call asFunction instead
8886 of doing the unchecked static_cast.
8887 (JSC::DebuggerCallFrame::calculatedFunctionName): Ditto.
8890 (JSC::op_call_JSFunction): Call isHostFunction on the body rather
8891 than on the JSFunction.
8892 (JSC::vm_lazyLinkCall): Ditto.
8893 (JSC::op_construct_JSConstruct): Ditto.
8895 * parser/Grammar.y: Changed callers to use new scanRegExp with
8896 out arguments instead of relying on state in the Lexer. And
8897 callers that just want to skip a regular expression to use
8901 (JSC::Lexer::scanRegExp): Changed to use out arguments, and to
8902 add a prefix argument so we can add in the "=" character as needed.
8903 Also rewrote to streamline the logic a bit inspired by suggestions
8905 (JSC::Lexer::skipRegExp): Added. Version of the function above that
8906 does not actually put the regular expression into a string.
8907 (JSC::Lexer::clear): Removed code to clear m_pattern and m_flags.
8908 * parser/Lexer.h: Changed scanRegExp to have out arguments. Added
8909 skipRegExp. Eliminated pattern, flags, m_pattern, and m_flags.
8911 * parser/NodeConstructors.h:
8912 (JSC::RegExpNode::RegExpNode): Changed to take const Identifier&.
8914 (JSC::RegExpNode::emitBytecode): Changed since m_pattern and
8915 m_flags are now Identifier instead of UString.
8916 (JSC::FunctionBodyNode::make): Moved this function here instead
8917 of putting it in the JSFunction.h header.
8918 * parser/Nodes.h: Changed RegExpNode to use Identifier.
8920 * profiler/Profiler.cpp:
8921 (JSC::Profiler::createCallIdentifier): Changed to use isHostFunction
8922 on the body instead of on the JSFunction object.
8923 * runtime/FunctionPrototype.cpp:
8924 (JSC::functionProtoFuncToString): Ditto.
8926 * runtime/JSFunction.cpp:
8927 (JSC::JSFunction::isHostFunction): Moved here from header.
8928 (JSC::JSFunction::isHostFunctionNonInline): Added.
8929 (JSC::JSFunction::JSFunction): Removed unneeded initialization of
8931 (JSC::JSFunction::setBody): Moved here from header.
8933 * runtime/JSFunction.h: Removed unneeded includes. Moved private
8934 constructor down to the private section. Made virtual functions
8935 private. Removed unneeded overload of setBody and moved the body
8936 of the function into the .cpp file. Changed assertions to use
8937 the non-inline version of isHostFunction.
8939 * runtime/PropertySlot.cpp:
8940 (JSC::PropertySlot::functionGetter): Use asFunction instead
8941 of doing the unchecked static_cast.
8943 * wtf/SegmentedVector.h:
8944 (WTF::SegmentedVector::isEmpty): Added.
8946 2009-08-13 Mark Rowe <mrowe@apple.com>
8948 Rubber-stamped by Darin Adler.
8950 Use the version of operator new that takes a JSGlobalData when allocating FuncDeclNode and FuncExprNode
8951 from within the grammar to prevent these nodes from being leaked.
8955 2009-08-13 Simon Hausmann <simon.hausmann@nokia.com>
8957 Reviewed by Ariya Hidayat.
8959 Remove the special-case for Qt wrt JSVALUE_32 introduced in
8960 r46709. It must've been a dependency issue on the bot, as
8961 after a manual build all the tests pass on amd64 and ia32.
8965 2009-08-12 Gabor Loki <loki@inf.u-szeged.hu>
8967 Reviewed by Gavin Barraclough.
8969 Add optimize call and property access support for ARM JIT.
8970 https://bugs.webkit.org/show_bug.cgi?id=24986
8972 For tightly coupled sequences the BEGIN_UNINTERRUPTED_SEQUENCE and
8973 END_UNINTERRUPTED_SEQUENCE macros have been introduced which ensure
8974 space for instructions and constants of the named sequence. This
8975 method is vital for those architecture which are using constant pool.
8977 The 'latePatch' method - which was linked to JmpSrc - is replaced with
8978 a port specific solution (each calls are marked to place their address
8979 on the constant pool).
8981 * assembler/ARMAssembler.cpp:
8982 (JSC::ARMAssembler::linkBranch):
8983 (JSC::ARMAssembler::executableCopy): Add extra align for constant pool.
8984 * assembler/ARMAssembler.h:
8985 (JSC::ARMAssembler::JmpSrc::JmpSrc):
8986 (JSC::ARMAssembler::sizeOfConstantPool):
8987 (JSC::ARMAssembler::jmp):
8988 (JSC::ARMAssembler::linkCall):
8989 * assembler/ARMv7Assembler.h:
8990 * assembler/AbstractMacroAssembler.h:
8991 * assembler/AssemblerBufferWithConstantPool.h:
8992 (JSC::AssemblerBufferWithConstantPool::flushIfNoSpaceFor): Fix the
8993 computation of the remaining space.
8994 * assembler/MacroAssemblerARM.h:
8995 (JSC::MacroAssemblerARM::branch32):
8996 (JSC::MacroAssemblerARM::nearCall):
8997 (JSC::MacroAssemblerARM::call):
8998 (JSC::MacroAssemblerARM::branchPtrWithPatch):
8999 (JSC::MacroAssemblerARM::ensureSpace):
9000 (JSC::MacroAssemblerARM::sizeOfConstantPool):
9001 (JSC::MacroAssemblerARM::prepareCall):
9002 * assembler/X86Assembler.h:
9005 (JSC::JIT::compileOpCall):
9006 * jit/JITInlineMethods.h:
9007 (JSC::JIT::beginUninterruptedSequence):
9008 (JSC::JIT::endUninterruptedSequence):
9009 * jit/JITPropertyAccess.cpp:
9010 (JSC::JIT::emit_op_method_check):
9011 (JSC::JIT::compileGetByIdHotPath):
9012 (JSC::JIT::compileGetByIdSlowCase):
9013 (JSC::JIT::emit_op_put_by_id):
9015 2009-08-12 Gavin Barraclough <barraclough@apple.com>
9017 Rubber Stamped by Dave Kilzer.
9019 Disable WTF_USE_JSVALUE32_64 on iPhone for now (support not yet added for ARMv7).
9023 2009-08-12 Gavin Barraclough <barraclough@apple.com>
9025 Reviewed by Maciej Stachoviak.
9027 Ooops - moved code that had been accidentally added to op_new_func instead of
9028 op_new_func_exp, to where it shoulds be.
9030 * interpreter/Interpreter.cpp:
9031 (JSC::Interpreter::privateExecute):
9034 2009-08-12 Ada Chan <adachan@apple.com>
9036 Added workaround for the limitation that VirtualFree with MEM_RELEASE
9037 can only accept the base address returned by VirtualAlloc when the region
9038 was reserved and it can only free the entire region, and not a part of it.
9040 Reviewed by Oliver Hunt.
9042 * runtime/MarkStack.h:
9043 (JSC::MarkStack::MarkStackArray::shrinkAllocation):
9044 * runtime/MarkStackWin.cpp:
9045 (JSC::MarkStack::releaseStack):
9047 2009-08-12 Balazs Kelemen <kelemen.balazs.3@stud.u-szeged.hu>
9049 Reviewed by Ariya Hidayat.
9051 Build fix: use std::numeric_limits<long long>::min() instead of LLONG_MIN
9052 since LLONG_MIN is not defined in standard c++.
9054 * runtime/UString.cpp:
9055 (JSC::UString::from):
9057 2009-08-12 Benjamin Otte <otte@gnome.org>
9059 Reviewed by Jan Alonzo.
9061 Buildfix for Gtk platforms debug builds.
9063 * GNUmakefile.am: Choose MarkStackPosix.cpp or MarkStackWin.cpp
9064 depending on platform.
9066 2009-08-12 Simon Hausmann <simon.hausmann@nokia.com>
9068 Prospective build fix for Mac and 32-bit Windows.
9070 * runtime/UString.cpp: Include wtf/StringExtras.h for snprintf.
9071 (JSC::UString::from): Use %lld instead of %I64d for snprintf
9072 on non-windows platforms.
9074 2009-08-12 Prasanth Ullattil <prasanth.ullattil@nokia.com>
9076 Reviewed by Simon Hausmann.
9078 Fix compile error on 64Bit Windows, when UString::from
9079 is called with an intptr_t.
9081 Added new UString::From overload with long long parameter.
9083 Thanks to Holger for the long long idea.
9085 * runtime/UString.cpp:
9086 (JSC::UString::from):
9087 * runtime/UString.h:
9089 2009-08-11 Oliver Hunt <oliver@apple.com>
9091 Reviewed by Mark Rowe.
9095 * runtime/UString.h:
9096 (JSC::UString::Rep::createEmptyBuffer):
9098 (WTF::TryMallocReturnValue::getValue):
9100 2009-08-11 Oliver Hunt <oliver@apple.com>
9102 Reviewed by Gavin Barraclough.
9104 Make it harder to misuse try* allocation routines
9105 https://bugs.webkit.org/show_bug.cgi?id=27469
9107 Jump through a few hoops to make it much harder to accidentally
9108 miss null-checking of values returned by the try-* allocation
9111 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
9112 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
9113 * JavaScriptCore.xcodeproj/project.pbxproj:
9114 * runtime/JSArray.cpp:
9115 (JSC::JSArray::putSlowCase):
9116 (JSC::JSArray::increaseVectorLength):
9117 * runtime/StringPrototype.cpp:
9118 (JSC::stringProtoFuncFontsize):
9119 (JSC::stringProtoFuncLink):
9120 * runtime/UString.cpp:
9122 (JSC::reallocChars):
9123 (JSC::expandCapacity):
9124 (JSC::UString::Rep::reserveCapacity):
9125 (JSC::UString::expandPreCapacity):
9128 (JSC::UString::spliceSubstringsWithSeparators):
9129 (JSC::UString::replaceRange):
9130 (JSC::UString::append):
9131 (JSC::UString::operator=):
9132 * runtime/UString.h:
9133 (JSC::UString::Rep::createEmptyBuffer):
9134 * wtf/FastMalloc.cpp:
9135 (WTF::tryFastZeroedMalloc):
9136 (WTF::tryFastMalloc):
9137 (WTF::tryFastCalloc):
9138 (WTF::tryFastRealloc):
9139 (WTF::TCMallocStats::tryFastMalloc):
9140 (WTF::TCMallocStats::tryFastCalloc):
9141 (WTF::TCMallocStats::tryFastRealloc):
9143 (WTF::TryMallocReturnValue::TryMallocReturnValue):
9144 (WTF::TryMallocReturnValue::~TryMallocReturnValue):
9145 (WTF::TryMallocReturnValue::operator PossiblyNull<T>):
9146 (WTF::TryMallocReturnValue::getValue):
9148 * wtf/PossiblyNull.h: Added.
9149 (WTF::PossiblyNull::PossiblyNull):
9150 (WTF::PossiblyNull::~PossiblyNull):
9153 2009-08-11 Gavin Barraclough <barraclough@apple.com>
9155 Reviewed by NOBODY (build fix part deux).
9157 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
9158 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
9160 2009-08-11 Gavin Barraclough <barraclough@apple.com>
9162 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
9163 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
9165 2009-08-11 Gavin Barraclough <barraclough@apple.com>
9167 Reviewed by Oliver Hunt.
9169 Restrict use of FuncDeclNode & FuncExprNode to the parser.
9170 https://bugs.webkit.org/show_bug.cgi?id=28209
9172 These objects were also being referenced from the CodeBlock. By changing this
9173 to just retain pointers to FunctionBodyNodes these classes can be restricted to
9176 No performance impact (or sub-percent progression).
9178 * JavaScriptCore.exp:
9181 * bytecode/CodeBlock.cpp:
9182 (JSC::CodeBlock::mark):
9183 (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
9184 (JSC::CodeBlock::shrinkToFit):
9185 * bytecode/CodeBlock.h:
9186 (JSC::CodeBlock::addFunction):
9187 (JSC::CodeBlock::function):
9188 Unify m_functions & m_functionExpressions into a single Vector<RefPtr<FuncExprNode> >.
9190 * bytecompiler/BytecodeGenerator.cpp:
9191 (JSC::BytecodeGenerator::BytecodeGenerator):
9192 (JSC::BytecodeGenerator::addConstant):
9193 (JSC::BytecodeGenerator::emitNewFunction):
9194 (JSC::BytecodeGenerator::emitNewFunctionExpression):
9195 * bytecompiler/BytecodeGenerator.h:
9196 FunctionStacks now contain FunctionBodyNodes not FuncDeclNodes.
9198 * interpreter/Interpreter.cpp:
9199 (JSC::Interpreter::execute):
9200 (JSC::Interpreter::privateExecute):
9201 Update to reflect chnages in CodeBlock.
9203 * jit/JITOpcodes.cpp:
9204 (JSC::JIT::emit_op_new_func_exp):
9206 (JSC::DEFINE_STUB_FUNCTION):
9209 Update to reflect chnages in CodeBlock.
9212 FunctionStacks now contain FunctionBodyNodes not FuncDeclNodes.
9214 * parser/NodeConstructors.h:
9215 (JSC::FuncExprNode::FuncExprNode):
9216 (JSC::FuncDeclNode::FuncDeclNode):
9218 (JSC::ScopeNodeData::mark):
9219 (JSC::FunctionBodyNode::finishParsing):
9221 (JSC::FunctionBodyNode::ident):
9222 Move m_ident & make methods from FuncDeclNode & FuncExprNode to FunctionBodyNode.
9224 * runtime/JSFunction.h:
9225 (JSC::FunctionBodyNode::make):
9226 Make this method inline (was FuncDeclNode::makeFunction).
9228 2009-08-11 Oliver Hunt <oliver@apple.com>
9230 Reviewed by Gavin Barraclough.
9232 Native JSON.stringify does not omit functions
9233 https://bugs.webkit.org/show_bug.cgi?id=28117
9235 Objects that are callable should be treated as undefined when
9236 serialising to JSON.
9238 * runtime/JSONObject.cpp:
9239 (JSC::Stringifier::appendStringifiedValue):
9241 2009-08-11 Oliver Hunt <oliver@apple.com>
9243 Reviewed by Geoff Garen.
9245 REGRESSION: Hang/crash in BytecodeGenerator::constRegisterFor loading simple page
9246 https://bugs.webkit.org/show_bug.cgi?id=28169
9248 Handle the case where someone has attempted to shadow a property
9249 on the global object with a constant.
9251 * bytecompiler/BytecodeGenerator.cpp:
9252 (JSC::BytecodeGenerator::constRegisterFor):
9254 (JSC::ConstDeclNode::emitCodeSingle):
9256 2009-08-11 John Gregg <johnnyg@google.com>
9258 Reviewed by Maciej Stachowiak.
9260 Desktop Notifications API
9261 https://bugs.webkit.org/show_bug.cgi?id=25463
9263 Adds ENABLE_NOTIFICATION flag.
9265 * Configurations/FeatureDefines.xcconfig:
9268 2009-08-11 Maxime Simon <simon.maxime@gmail.com>
9270 Reviewed by Eric Seidel.
9272 Modifications on JavaScriptCore to allow Haiku port.
9273 https://bugs.webkit.org/show_bug.cgi?id=28121
9275 * runtime/Collector.cpp: Haiku doesn't have sys/mman.h, using OS.h instead.
9276 (JSC::currentThreadStackBase): Haiku uses its own threading system.
9277 * wtf/Platform.h: Defining all Haiku platform values.
9278 * wtf/haiku/MainThreadHaiku.cpp: Adding a missing header (NotImplemented.h).
9280 2009-08-11 Jessie Berlin <jberlin@apple.com>
9282 Reviewed by Adam Roben.
9286 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
9288 2009-08-11 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
9290 Reviewed by Tor Arne Vestbø.
9292 Buildfix for Qt-win platforms.
9294 * JavaScriptCore.pri: Choose MarkStackPosix.cpp or MarkStackWin.cpp depend on platform.
9296 2009-08-10 Oliver Hunt <oliver@apple.com>
9298 Reviewed by NOBODY (And another build fix).
9300 Add new exports for MSVC
9302 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
9303 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
9304 * JavaScriptCore.xcodeproj/project.pbxproj:
9306 2009-08-10 Oliver Hunt <oliver@apple.com>
9308 Reviewed by NOBODY (yet another build fix).
9310 Remove obsolete entries from MSVC exports file
9312 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
9313 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
9315 2009-08-10 Oliver Hunt <oliver@apple.com>
9317 Add includes needed for non-allinonefile builds
9319 * runtime/GetterSetter.h:
9320 * runtime/ScopeChain.h:
9322 2009-08-10 Oliver Hunt <oliver@apple.com>
9324 Fix export file for last build fix
9326 * JavaScriptCore.exp:
9328 2009-08-10 Oliver Hunt <oliver@apple.com>
9330 Hoist page size initialization into platform specific code.
9332 * jit/ExecutableAllocatorPosix.cpp:
9333 * jit/ExecutableAllocatorWin.cpp:
9334 * runtime/MarkStack.h:
9335 (JSC::MarkStack::pageSize):
9336 * runtime/MarkStackPosix.cpp:
9337 (JSC::MarkStack::initializePagesize):
9338 * runtime/MarkStackWin.cpp:
9339 (JSC::MarkStack::initializePagesize):
9341 2009-08-07 Oliver Hunt <oliver@apple.com>
9343 Reviewed by Gavin Barraclough.
9345 Stack overflow crash in JavaScript garbage collector mark pass
9346 https://bugs.webkit.org/show_bug.cgi?id=12216
9348 Make the GC mark phase iterative by using an explicit mark stack.
9349 To do this marking any single object is performed in multiple stages
9350 * The object is appended to the MarkStack, this sets the marked
9351 bit for the object using the new markDirect() function, and then
9353 * When the MarkStack is drain()ed the object is popped off the stack
9354 and markChildren(MarkStack&) is called on the object to collect
9355 all of its children. drain() then repeats until the stack is empty.
9357 Additionally I renamed a number of methods from 'mark' to 'markAggregate'
9358 in order to make it more clear that marking of those object was not
9359 going to result in an actual recursive mark.
9362 * JavaScriptCore.exp:
9363 * JavaScriptCore.gypi:
9364 * JavaScriptCore.pri:
9365 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
9366 * JavaScriptCore.xcodeproj/project.pbxproj:
9367 * bytecode/CodeBlock.cpp:
9368 (JSC::CodeBlock::markAggregate):
9369 * bytecode/CodeBlock.h:
9370 * bytecode/EvalCodeCache.h:
9371 (JSC::EvalCodeCache::markAggregate):
9372 * debugger/DebuggerActivation.cpp:
9373 (JSC::DebuggerActivation::markChildren):
9374 * debugger/DebuggerActivation.h:
9375 * interpreter/Register.h:
9376 * interpreter/RegisterFile.h:
9377 (JSC::RegisterFile::markGlobals):
9378 (JSC::RegisterFile::markCallFrames):
9380 (JSC::ScopeNodeData::markAggregate):
9381 (JSC::EvalNode::markAggregate):
9382 (JSC::FunctionBodyNode::markAggregate):
9384 (JSC::ScopeNode::markAggregate):
9385 * runtime/ArgList.cpp:
9386 (JSC::MarkedArgumentBuffer::markLists):
9387 * runtime/ArgList.h:
9388 * runtime/Arguments.cpp:
9389 (JSC::Arguments::markChildren):
9390 * runtime/Arguments.h:
9391 * runtime/Collector.cpp:
9392 (JSC::Heap::markConservatively):
9393 (JSC::Heap::markCurrentThreadConservativelyInternal):
9394 (JSC::Heap::markCurrentThreadConservatively):
9395 (JSC::Heap::markOtherThreadConservatively):
9396 (JSC::Heap::markStackObjectsConservatively):
9397 (JSC::Heap::markProtectedObjects):
9398 (JSC::Heap::collect):
9399 * runtime/Collector.h:
9400 * runtime/GetterSetter.cpp:
9401 (JSC::GetterSetter::markChildren):
9402 * runtime/GetterSetter.h:
9403 (JSC::GetterSetter::GetterSetter):
9404 (JSC::GetterSetter::createStructure):
9405 * runtime/GlobalEvalFunction.cpp:
9406 (JSC::GlobalEvalFunction::markChildren):
9407 * runtime/GlobalEvalFunction.h:
9408 * runtime/JSActivation.cpp:
9409 (JSC::JSActivation::markChildren):
9410 * runtime/JSActivation.h:
9411 * runtime/JSArray.cpp:
9412 (JSC::JSArray::markChildren):
9413 * runtime/JSArray.h:
9415 (JSC::JSCell::markCellDirect):
9416 (JSC::JSCell::markChildren):
9417 (JSC::JSValue::markDirect):
9418 (JSC::JSValue::markChildren):
9419 (JSC::JSValue::hasChildren):
9420 (JSC::MarkStack::append):
9421 (JSC::MarkStack::drain):
9422 * runtime/JSFunction.cpp:
9423 (JSC::JSFunction::markChildren):
9424 * runtime/JSFunction.h:
9425 * runtime/JSGlobalData.cpp:
9426 (JSC::JSGlobalData::JSGlobalData):
9427 * runtime/JSGlobalData.h:
9428 * runtime/JSGlobalObject.cpp:
9429 (JSC::markIfNeeded):
9430 (JSC::JSGlobalObject::markChildren):
9431 * runtime/JSGlobalObject.h:
9432 * runtime/JSNotAnObject.cpp:
9433 (JSC::JSNotAnObject::markChildren):
9434 * runtime/JSNotAnObject.h:
9435 * runtime/JSONObject.cpp:
9436 (JSC::Stringifier::markAggregate):
9437 (JSC::JSONObject::markStringifiers):
9438 * runtime/JSONObject.h:
9439 * runtime/JSObject.cpp:
9440 (JSC::JSObject::markChildren):
9441 (JSC::JSObject::defineGetter):
9442 (JSC::JSObject::defineSetter):
9443 * runtime/JSObject.h:
9444 * runtime/JSPropertyNameIterator.cpp:
9445 (JSC::JSPropertyNameIterator::markChildren):
9446 * runtime/JSPropertyNameIterator.h:
9447 (JSC::JSPropertyNameIterator::createStructure):
9448 (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
9449 (JSC::JSPropertyNameIterator::create):
9450 * runtime/JSStaticScopeObject.cpp:
9451 (JSC::JSStaticScopeObject::markChildren):
9452 * runtime/JSStaticScopeObject.h:
9455 * runtime/JSValue.h:
9456 * runtime/JSWrapperObject.cpp:
9457 (JSC::JSWrapperObject::markChildren):
9458 * runtime/JSWrapperObject.h:
9459 * runtime/MarkStack.cpp: Added.
9460 (JSC::MarkStack::compact):
9461 * runtime/MarkStack.h: Added.
9463 (JSC::MarkStack::MarkStack):
9464 (JSC::MarkStack::append):
9465 (JSC::MarkStack::appendValues):
9466 (JSC::MarkStack::~MarkStack):
9467 (JSC::MarkStack::MarkSet::MarkSet):
9468 (JSC::MarkStack::pageSize):
9470 MarkStackArray is a non-shrinking, mmap-based vector type
9471 used for storing objects to be marked.
9472 (JSC::MarkStack::MarkStackArray::MarkStackArray):
9473 (JSC::MarkStack::MarkStackArray::~MarkStackArray):
9474 (JSC::MarkStack::MarkStackArray::expand):
9475 (JSC::MarkStack::MarkStackArray::append):
9476 (JSC::MarkStack::MarkStackArray::removeLast):
9477 (JSC::MarkStack::MarkStackArray::isEmpty):
9478 (JSC::MarkStack::MarkStackArray::size):
9479 (JSC::MarkStack::MarkStackArray::shrinkAllocation):
9480 * runtime/MarkStackPosix.cpp: Added.
9481 (JSC::MarkStack::allocateStack):
9482 (JSC::MarkStack::releaseStack):
9483 * runtime/MarkStackWin.cpp: Added.
9484 (JSC::MarkStack::allocateStack):
9485 (JSC::MarkStack::releaseStack):
9487 * runtime/ScopeChain.h:
9488 * runtime/ScopeChainMark.h:
9489 (JSC::ScopeChain::markAggregate):
9490 * runtime/SmallStrings.cpp:
9491 (JSC::SmallStrings::mark):
9492 * runtime/Structure.h:
9493 (JSC::Structure::markAggregate):
9495 2009-08-10 Mark Rowe <mrowe@apple.com>
9497 Reviewed by Darin Adler.
9499 Fix hundreds of "pointer being freed was not allocated" errors seen on the build bot.
9501 * wtf/FastMalloc.h: Implement nothrow variants of the delete and delete[] operators since
9502 we implement the nothrow variants of new and new[]. The nothrow variant of delete is called
9503 explicitly in the implementation of std::sort which was resulting in FastMalloc-allocated
9504 memory being passed to the system allocator to free.
9506 2009-08-10 Jan Michael Alonzo <jmalonzo@webkit.org>
9508 [Gtk] Unreviewed build fix. Move JSAPIValueWrapper.cpp/.h in the debug
9509 section. This file is already part of AllInOneFile in Release builds.
9513 2009-08-10 Darin Adler <darin@apple.com>
9515 * wtf/FastMalloc.h: Fix build.
9517 2009-08-10 Darin Adler <darin@apple.com>
9519 Reviewed by Mark Rowe.
9521 FastMalloc.h has cross-platform code but marked as WinCE-only
9522 https://bugs.webkit.org/show_bug.cgi?id=28160
9524 1) The support for nothrow was inside #if PLATFORM(WINCE) even though it is
9525 not platform-specific.
9526 2) The code tried to override operator delete nothrow, which does not exist.
9527 3) The code in the header checks the value of USE_SYSTEM_MALLOC, but the code
9528 in FastMalloc.cpp checks only if the macro is defined.
9530 * wtf/FastMalloc.h: See above.
9531 * wtf/FastMalloc.cpp: Ditto.
9533 2009-08-10 Sam Weinig <sam@webkit.org>
9535 Reviewed by Anders Carlsson.
9537 Fix an annoying indentation issue.
9539 * runtime/DateConstructor.cpp:
9540 (JSC::constructDate):
9542 2009-08-10 Xan Lopez <xlopez@igalia.com>
9544 Unreviewed build fix.
9546 Add new files to makefile.
9550 2009-08-10 Simon Hausmann <simon.hausmann@nokia.com>
9552 Fix compilation with the interpreter instead of the JIT by including
9553 PrototypeFunction.h as forward-declared through NativeFunctionWrapper.h.
9555 * runtime/ObjectConstructor.cpp:
9557 2009-08-09 Oliver Hunt <oliver@apple.com>
9559 Reviewed by George Staikos.
9561 JSON.stringify replacer returning undefined does not omit object properties
9562 https://bugs.webkit.org/show_bug.cgi?id=28118
9564 Correct behaviour of stringify when using a replacer function that returns
9565 undefined. This is a simple change to move the undefined value check to
9566 after the replacer function is called. This means that the replacer function
9567 is now called for properties with the value undefined, however i've confirmed
9568 that this behaviour is correct.
9570 In addition I've made the cyclic object exception have a more useful error
9573 * runtime/JSONObject.cpp:
9574 (JSC::Stringifier::appendStringifiedValue):
9576 2009-08-08 Oliver Hunt <oliver@apple.com>
9578 Reviewed by Eric Seidel and Sam Weinig.
9580 [ES5] Implement Object.getPrototypeOf
9581 https://bugs.webkit.org/show_bug.cgi?id=28114
9583 Implement getPrototypeOf
9585 * runtime/CommonIdentifiers.h:
9586 * runtime/JSGlobalObject.cpp:
9587 (JSC::JSGlobalObject::reset):
9588 * runtime/ObjectConstructor.cpp:
9589 (JSC::ObjectConstructor::ObjectConstructor):
9590 (JSC::objectConsGetPrototypeOf):
9591 * runtime/ObjectConstructor.h:
9593 2009-08-07 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9595 Reviewed by Eric Seidel.
9597 Allow custom memory allocation control for Noncopyable class
9598 https://bugs.webkit.org/show_bug.cgi?id=27879
9600 Several classes which are inherited from Noncopyable are instantiated by
9601 operator new, so Noncopyable class has been inherited from FastAllocBase.
9603 * wtf/Noncopyable.h:
9605 2009-08-07 George Staikos <george.staikos@torchmobile.com>
9607 Reviewed by Eric Seidel.
9609 https://bugs.webkit.org/show_bug.cgi?id=27305
9610 Implement WinCE-specific unicode layer.
9611 Written by George Staikos <george.staikos@torchmobile.com>
9612 with bug fixes by Yong Li <yong.li@torchmobile.com>
9613 refactored by Joe Mason <joe.mason@torchmobile.com>
9616 * wtf/unicode/Unicode.h:
9617 * wtf/unicode/wince/UnicodeWince.cpp: Added.
9618 (WTF::Unicode::toLower):
9619 (WTF::Unicode::toUpper):
9620 (WTF::Unicode::foldCase):
9621 (WTF::Unicode::isPrintableChar):
9622 (WTF::Unicode::isSpace):
9623 (WTF::Unicode::isLetter):
9624 (WTF::Unicode::isUpper):
9625 (WTF::Unicode::isLower):
9626 (WTF::Unicode::isDigit):
9627 (WTF::Unicode::isPunct):
9628 (WTF::Unicode::toTitleCase):
9629 (WTF::Unicode::direction):
9630 (WTF::Unicode::category):
9631 (WTF::Unicode::decompositionType):
9632 (WTF::Unicode::combiningClass):
9633 (WTF::Unicode::mirroredChar):
9634 (WTF::Unicode::digitValue):
9635 * wtf/unicode/wince/UnicodeWince.h: Added.
9637 (WTF::Unicode::isSeparatorSpace):
9638 (WTF::Unicode::isHighSurrogate):
9639 (WTF::Unicode::isLowSurrogate):
9640 (WTF::Unicode::isArabicChar):
9641 (WTF::Unicode::hasLineBreakingPropertyComplexContext):
9642 (WTF::Unicode::umemcasecmp):
9643 (WTF::Unicode::surrogateToUcs4):
9645 2009-08-07 Yongjun Zhang <yongjun.zhang@nokia.com>
9647 Reviewed by Eric Seidel.
9649 https://bugs.webkit.org/show_bug.cgi?id=28069
9651 Add inline to help winscw compiler resolve specialized argument in
9652 templated functions.
9654 * runtime/LiteralParser.cpp:
9655 (JSC::LiteralParser::Lexer::lexString):
9657 2009-08-07 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9659 Reviewed by Eric Seidel.
9661 Allow custom memory allocation control for RegExpObjectData struct
9662 http://bugs.webkit.org/show_bug.cgi?id=26750
9664 Inherits RegExpObjectData struct from FastAllocBase because
9665 it has been instantiated by 'new' in JavaScriptCore/runtime/RegExpObject.cpp:62
9667 * runtime/RegExpObject.h:
9669 2009-08-06 Norbert Leser <norbert.leser@nokia.com>
9671 Reviewed by Darin Adler.
9673 Updated patch for bug #27059:
9674 Symbian platform always uses little endian encoding,
9675 regardless of compiler.
9676 We need to make sure that we correctly detect EABI architecture
9677 for armv5 targets on Symbian,
9678 where __EABI__ is set but not __ARM_EABI__
9682 2009-08-06 Adam Barth <abarth@webkit.org>
9686 http://bugs.webkit.org/show_bug.cgi?id=27879
9688 Revert 46877 because it broke GTK.
9690 * wtf/Noncopyable.h:
9692 2009-08-06 Gavin Barraclough <barraclough@apple.com>
9694 Reviewed by Oliver Hunt.
9696 Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification.
9697 ( https://bugs.webkit.org/show_bug.cgi?id=27635 )
9699 This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%.
9700 (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled).
9702 * bytecode/CodeBlock.cpp:
9703 (JSC::printStructureStubInfo):
9704 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
9706 * bytecode/CodeBlock.h:
9708 (JSC::CallLinkInfo::seenOnce):
9709 (JSC::CallLinkInfo::setSeen):
9710 (JSC::MethodCallLinkInfo::seenOnce):
9711 (JSC::MethodCallLinkInfo::setSeen):
9712 - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once.
9714 * bytecode/StructureStubInfo.cpp:
9715 (JSC::StructureStubInfo::deref):
9716 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
9718 * bytecode/StructureStubInfo.h:
9719 (JSC::StructureStubInfo::StructureStubInfo):
9720 (JSC::StructureStubInfo::initGetByIdSelf):
9721 (JSC::StructureStubInfo::initGetByIdProto):
9722 (JSC::StructureStubInfo::initGetByIdChain):
9723 (JSC::StructureStubInfo::initGetByIdSelfList):
9724 (JSC::StructureStubInfo::initGetByIdProtoList):
9725 (JSC::StructureStubInfo::initPutByIdTransition):
9726 (JSC::StructureStubInfo::initPutByIdReplace):
9727 (JSC::StructureStubInfo::seenOnce):
9728 (JSC::StructureStubInfo::setSeen):
9729 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once.
9731 * bytecompiler/BytecodeGenerator.cpp:
9732 (JSC::BytecodeGenerator::emitGetById):
9733 (JSC::BytecodeGenerator::emitPutById):
9734 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
9737 (JSC::JIT::privateCompileCTIMachineTrampolines):
9738 (JSC::JIT::unlinkCall):
9739 - Remove the "don't lazy link" stage of calls.
9742 (JSC::JIT::compileCTIMachineTrampolines):
9743 - Remove the "don't lazy link" stage of calls.
9746 (JSC::JIT::compileOpCallSlowCase):
9747 - Remove the "don't lazy link" stage of calls.
9750 (JSC::JITThunks::JITThunks):
9751 (JSC::JITThunks::tryCachePutByID):
9752 (JSC::JITThunks::tryCacheGetByID):
9753 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
9754 (JSC::JITStubs::getPolymorphicAccessStructureListSlot):
9755 - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
9758 (JSC::JITThunks::ctiStringLengthTrampoline):
9760 - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
9762 * wtf/PtrAndFlags.h:
9763 (WTF::PtrAndFlags::PtrAndFlags):
9764 (WTF::PtrAndFlags::operator!):
9765 (WTF::PtrAndFlags::operator->):
9766 - Add ! and -> operators, add constuctor with pointer argument.
9768 2009-08-06 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9770 Reviewed by Adam Barth.
9772 Allow custom memory allocation control for Noncopyable class
9773 https://bugs.webkit.org/show_bug.cgi?id=27879
9775 Several classes which inherited from Noncopyable are instantiated by
9776 operator new, so Noncopyable class has been inherited from FastAllocBase.
9778 * wtf/Noncopyable.h:
9780 2009-08-06 Mark Rowe <mrowe@apple.com>
9782 Rubber-stamped by Sam Weinig.
9784 Add explicit dependencies for our build verification scripts to ensure that they always run after linking has completed.
9786 * JavaScriptCore.xcodeproj/project.pbxproj:
9788 2009-08-06 Mark Rowe <mrowe@apple.com>
9790 Bring a little order to our otherwise out of control lives.
9792 * JavaScriptCore.xcodeproj/project.pbxproj:
9794 2009-08-06 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9796 Reviewed by Darin Adler.
9798 Allow custom memory allocation control for JavaScriptCore's PolymorphicAccessStructureList struct
9799 https://bugs.webkit.org/show_bug.cgi?id=27877
9801 Inherits PolymorphicAccessStructureList struct from FastAllocBase because it has been instantiated by
9802 'new' in JavaScriptCore/jit/JITStubs.cpp:1229.
9804 * bytecode/Instruction.h:
9806 2009-08-05 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9808 Reviewed by Darin Adler.
9810 Allow custom memory allocation control for JavaScriptCore's ScopeNodeData struct
9811 https://bugs.webkit.org/show_bug.cgi?id=27875
9813 Inherits ScopeNodeData struct from FastAllocBase because it has been instantiated by
9814 'new' in JavaScriptCore/parser/Nodes.cpp:1848.
9818 2009-08-05 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
9820 Reviewed by Gavin Barraclough.
9822 Add floating point support for generic ARM port.
9823 https://bugs.webkit.org/show_bug.cgi?id=24986
9825 * assembler/ARMAssembler.cpp:
9826 (JSC::ARMAssembler::doubleTransfer):
9827 * assembler/ARMAssembler.h:
9829 (JSC::ARMAssembler::):
9830 (JSC::ARMAssembler::faddd_r):
9831 (JSC::ARMAssembler::fsubd_r):
9832 (JSC::ARMAssembler::fmuld_r):
9833 (JSC::ARMAssembler::fcmpd_r):
9834 (JSC::ARMAssembler::fdtr_u):
9835 (JSC::ARMAssembler::fdtr_d):
9836 (JSC::ARMAssembler::fmsr_r):
9837 (JSC::ARMAssembler::fsitod_r):
9838 (JSC::ARMAssembler::fmstat):
9839 * assembler/MacroAssemblerARM.h:
9840 (JSC::MacroAssemblerARM::):
9841 (JSC::MacroAssemblerARM::supportsFloatingPoint):
9842 (JSC::MacroAssemblerARM::loadDouble):
9843 (JSC::MacroAssemblerARM::storeDouble):
9844 (JSC::MacroAssemblerARM::addDouble):
9845 (JSC::MacroAssemblerARM::subDouble):
9846 (JSC::MacroAssemblerARM::mulDouble):
9847 (JSC::MacroAssemblerARM::convertInt32ToDouble):
9848 (JSC::MacroAssemblerARM::branchDouble):
9851 2009-08-05 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
9853 Reviewed by Gavin Barraclough.
9855 Add JIT support for generic ARM port without optimizations.
9856 https://bugs.webkit.org/show_bug.cgi?id=24986
9858 All JIT optimizations are disabled.
9860 Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
9861 Signed off by Gabor Loki <loki@inf.u-szeged.hu>
9863 * assembler/ARMAssembler.cpp:
9864 (JSC::ARMAssembler::baseIndexTransfer32):
9865 * assembler/AbstractMacroAssembler.h:
9866 (JSC::AbstractMacroAssembler::Imm32::Imm32):
9867 * assembler/MacroAssemblerARM.h:
9868 (JSC::MacroAssemblerARM::store32):
9869 (JSC::MacroAssemblerARM::move):
9870 (JSC::MacroAssemblerARM::branch32):
9871 (JSC::MacroAssemblerARM::add32):
9872 (JSC::MacroAssemblerARM::sub32):
9873 (JSC::MacroAssemblerARM::load32):
9874 * bytecode/CodeBlock.h:
9875 (JSC::CodeBlock::getBytecodeIndex):
9877 * jit/JITInlineMethods.h:
9878 (JSC::JIT::restoreArgumentReference):
9879 * jit/JITOpcodes.cpp:
9882 (JSC::JITStackFrame::returnAddressSlot):
9885 2009-08-04 Gavin Barraclough <barraclough@apple.com>
9887 Rubber Stamped by Oiver Hunt.
9889 Revert r46643 since this breaks the Yarr::Interpreter running the v8 tests.
9890 https://bugs.webkit.org/show_bug.cgi?id=27874
9892 * yarr/RegexInterpreter.cpp:
9893 (JSC::Yarr::Interpreter::allocDisjunctionContext):
9894 (JSC::Yarr::Interpreter::freeDisjunctionContext):
9895 (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
9896 (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
9898 2009-08-04 Oliver Hunt <oliver@apple.com>
9904 2009-08-04 Benjamin C Meyer <benjamin.meyer@torchmobile.com>
9906 Reviewed by Adam Treat
9908 Explicitly include limits.h header when using INT_MAX and INT_MIN
9910 * interpreter/Interpreter.cpp
9912 2009-08-03 Harald Fernengel <harald.fernengel@nokia.com>
9914 Reviewed by Darin Adler.
9916 Fix compile error for ambigous call to abs()
9917 https://bugs.webkit.org/show_bug.cgi?id=27873
9919 Fix ambiguity in abs(long int) call by calling labs() instead
9921 * wtf/DateMath.cpp: replace call to abs() with labs()
9923 2009-08-03 Laszlo Gombos <laszlo.1.gombos@nokia.com>
9925 Reviewed by Eric Seidel.
9927 [Qt] Consolidate common gcc flags to WebKit.pri
9928 https://bugs.webkit.org/show_bug.cgi?id=27934
9930 * JavaScriptCore.pro:
9932 2009-08-03 Ada Chan <adachan@apple.com>
9934 Fixed the Tiger build.
9936 * wtf/FastMalloc.cpp:
9938 2009-08-03 Ada Chan <adachan@apple.com>
9940 Reviewed by Darin Adler.
9942 Don't use background thread to scavenge memory on Tiger until we figure out why it causes a crash.
9943 https://bugs.webkit.org/show_bug.cgi?id=27900
9945 * wtf/FastMalloc.cpp:
9947 2009-08-03 Fumitoshi Ukai <ukai@chromium.org>
9949 Reviewed by Jan Alonzo.
9951 Fix build break on Gtk/x86_64.
9952 https://bugs.webkit.org/show_bug.cgi?id=27936
9954 Use JSVALUE64 for X86_64 LINUX, except Qt.
9958 2009-08-02 Xan Lopez <xlopez@igalia.com>
9964 2009-08-02 Geoffrey Garen <ggaren@apple.com>
9966 Reviewed by Sam Weinig.
9968 Disabled JSVALUE32_64 on Qt builds, since all layout tests mysteriously
9969 crash with it enabled.
9973 2009-08-02 Geoffrey Garen <ggaren@apple.com>
9977 Added JSAPIValueWrapper.cpp to the build.
9979 * JavaScriptCore.pri:
9981 2009-08-02 Geoffrey Garen <ggaren@apple.com>
9985 Exported symbols for JSAPIValueWrapper.
9987 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
9988 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
9990 2009-08-02 Geoffrey Garen <ggaren@apple.com>
9994 * jit/JITStubs.cpp: #include <stdarg.h>, for a definition of va_start.
9996 2009-08-02 Geoffrey Garen <ggaren@apple.com>
10000 * runtime/Collector.cpp: #include <limits.h>, for a definition of ULONG_MAX.
10002 2009-08-02 Geoffrey Garen <ggaren@apple.com>
10004 Windows build fix: Nixed JSImmediate::prototype, JSImmediate::toObject,
10005 and JSImmediate::toThisObject, and removed their exported symbols.
10007 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10008 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
10009 * runtime/JSImmediate.cpp:
10010 * runtime/JSImmediate.h:
10012 2009-08-02 Geoffrey Garen <ggaren@apple.com>
10014 Reviewed by Mark Rowe.
10016 Enabled JSVALUE32_64 by default on all platforms other than x86_64 (which uses JSVALUE64).
10020 2009-08-02 Kevin Ollivier <kevino@theolliviers.com>
10022 Reviewed by Jan Alonzo.
10024 Script for building the JavaScriptCore library for wx.
10025 https://bugs.webkit.org/show_bug.cgi?id=27619
10029 2009-08-02 Yong Li <yong.li@torchmobile.com>
10031 Reviewed by George Staikos.
10033 DateMath depends on strftime and localtime, which need to be imported manually on WinCE
10034 https://bugs.webkit.org/show_bug.cgi?id=26558
10036 * wtf/DateMath.cpp:
10038 2009-08-01 David Kilzer <ddkilzer@apple.com>
10040 wtf/Threading.h: added include of Platform.h
10042 Reviewed by Mark Rowe.
10044 * wtf/Threading.h: Added #include "Platform.h" since this header
10045 uses PLATFORM() and other macros.
10047 2009-08-01 Mark Rowe <mrowe@apple.com>
10049 Rubber-stamped by Oliver Hunt.
10051 Roll out r46668 as it was misinformed. ScopeChain is only used with placement new.
10053 * runtime/ScopeChain.h:
10055 2009-08-01 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
10057 Allow custom memory allocation control for JavaScriptCore's HashMap class
10058 http://bugs.webkit.org/show_bug.cgi?id=27871
10060 Inherits HashMap class from FastAllocBase because it has been
10061 instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:148.
10063 * wtf/RefPtrHashMap.h:
10066 2009-08-01 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
10068 Allow custom memory allocation control for JavaScriptCore's ScopeChain class
10069 https://bugs.webkit.org/show_bug.cgi?id=27834
10071 Inherits ScopeChain class from FastAllocBase because it has been
10072 instantiated by 'new' in JavaScriptCore/runtime/JSFunction.h:109.
10074 * runtime/ScopeChain.h:
10076 2009-08-01 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
10078 Reviewed by Darin Adler.
10080 Allow custom memory allocation control for JavaScriptCore's RegExpConstructorPrivate struct
10081 https://bugs.webkit.org/show_bug.cgi?id=27833
10083 Inherits RegExpConstructorPrivate class from FastAllocBase because it has been
10084 instantiated by 'new' in JavaScriptCore/runtime/RegExpConstructor.cpp:152.
10086 * runtime/RegExpConstructor.cpp:
10088 2009-07-31 Yong Li <yong.li@torchmobile.com>
10090 Reviewed by George Staikos.
10092 Resurrect the old GetTickCount implementation of currentTime, controlled by WTF_USE_QUERY_PERFORMANCE_COUNTER
10093 currentSystemTime taken from older WebKit; currentTime written by Yong Li <yong.li@torchmobile.com>; cleanup by Joe Mason <joe.mason@torchmobile.com>
10094 https://bugs.webkit.org/show_bug.cgi?id=27848
10096 * wtf/CurrentTime.cpp:
10097 (WTF::currentSystemTime): get current time with GetCurrentFT
10098 (WTF::currentTime): track msec elapsed since first currentSystemTime call using GetTickCount
10101 2009-07-31 Ada Chan <adachan@apple.com>
10103 Fixes the Windows release-PGO build.
10105 Reviewed by Jon Honeycutt.
10107 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Suppresses the warning about unreachable code that we get by adding "return 0" to WTF::TCMalloc_PageHeap::runScavengerThread().
10108 * wtf/FastMalloc.cpp:
10109 (WTF::TCMalloc_PageHeap::runScavengerThread): Fixes the error about the method not returning a value in the release-PGO build.
10111 2009-07-31 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
10113 Change malloc to fastMalloc and free to fastFree in Yarr's RegexInterpreter.cpp
10114 https://bugs.webkit.org/show_bug.cgi?id=27874
10116 Use fastMalloc and fastFree instead of malloc and free in RegexInterpreter.cpp's methods.
10118 * yarr/RegexInterpreter.cpp:
10119 (JSC::Yarr::Interpreter::allocDisjunctionContext):
10120 (JSC::Yarr::Interpreter::freeDisjunctionContext):
10121 (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
10122 (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
10124 2009-07-30 Xan Lopez <xlopez@igalia.com>
10126 Reviewed by Jan Alonzo.
10128 Fix compiler warning.
10130 GCC does not like C++-style comments in preprocessor directives.
10134 2009-07-30 John McCall <rjmccall@apple.com>
10136 Reviewed by Gavin Barraclough.
10138 Optimize the X86_64 trampolines: avoid the need for filler arguments
10139 and move the stub-args area closer to the stack pointer.
10141 * jit/JIT.h: adjust patch offsets because of slight code-size change
10143 (JSC::JITCode::execute): don't pass filler args
10144 * jit/JITStubs.cpp:
10145 (ctiTrampoline): (X86_64): push args onto stack, use args directly
10146 (ctiVMThrowTrampoline): (X86_64): adjust %rsp by correct displacement
10147 (ctiOpThrowNotCaught): (X86_64): adjust %rsp by correct displacement
10149 (JITStackFrame): (X86_64): move args area earlier
10150 (ctiTrampoline): remove filler args from prototype
10152 2009-07-30 Gavin Barraclough <barraclough@apple.com>
10154 Temporarily revert r46618 since this is b0rking on Linux.
10156 2009-07-23 Gavin Barraclough <barraclough@apple.com>
10158 Reviewed by Oliver Hunt.
10160 Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification.
10161 ( https://bugs.webkit.org/show_bug.cgi?id=27635 )
10163 This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%.
10164 (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled).
10166 * bytecode/CodeBlock.cpp:
10167 (JSC::printStructureStubInfo):
10168 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
10170 * bytecode/CodeBlock.h:
10172 (JSC::CallLinkInfo::seenOnce):
10173 (JSC::CallLinkInfo::setSeen):
10174 (JSC::MethodCallLinkInfo::seenOnce):
10175 (JSC::MethodCallLinkInfo::setSeen):
10176 - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once.
10178 * bytecode/StructureStubInfo.cpp:
10179 (JSC::StructureStubInfo::deref):
10180 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
10182 * bytecode/StructureStubInfo.h:
10183 (JSC::StructureStubInfo::StructureStubInfo):
10184 (JSC::StructureStubInfo::initGetByIdSelf):
10185 (JSC::StructureStubInfo::initGetByIdProto):
10186 (JSC::StructureStubInfo::initGetByIdChain):
10187 (JSC::StructureStubInfo::initGetByIdSelfList):
10188 (JSC::StructureStubInfo::initGetByIdProtoList):
10189 (JSC::StructureStubInfo::initPutByIdTransition):
10190 (JSC::StructureStubInfo::initPutByIdReplace):
10191 (JSC::StructureStubInfo::seenOnce):
10192 (JSC::StructureStubInfo::setSeen):
10193 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once.
10195 * bytecompiler/BytecodeGenerator.cpp:
10196 (JSC::BytecodeGenerator::emitGetById):
10197 (JSC::BytecodeGenerator::emitPutById):
10198 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
10201 (JSC::JIT::privateCompileCTIMachineTrampolines):
10202 (JSC::JIT::unlinkCall):
10203 - Remove the "don't lazy link" stage of calls.
10206 (JSC::JIT::compileCTIMachineTrampolines):
10207 - Remove the "don't lazy link" stage of calls.
10210 (JSC::JIT::compileOpCallSlowCase):
10211 - Remove the "don't lazy link" stage of calls.
10213 * jit/JITStubs.cpp:
10214 (JSC::JITThunks::JITThunks):
10215 (JSC::JITThunks::tryCachePutByID):
10216 (JSC::JITThunks::tryCacheGetByID):
10217 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
10218 (JSC::JITStubs::getPolymorphicAccessStructureListSlot):
10219 - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
10222 (JSC::JITThunks::ctiStringLengthTrampoline):
10224 - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
10226 * wtf/PtrAndFlags.h:
10227 (WTF::PtrAndFlags::PtrAndFlags):
10228 (WTF::PtrAndFlags::operator!):
10229 (WTF::PtrAndFlags::operator->):
10230 - Add ! and -> operators, add constuctor with pointer argument.
10232 2009-07-30 Geoffrey Garen <ggaren@apple.com>
10234 Reviewed by Gavin Barraclough.
10236 Fixed failing tests seen on Windows buildbot.
10238 * jit/JITStubs.cpp:
10239 (JSC::DEFINE_STUB_FUNCTION):
10241 (JSC::): Use "int" instead of "bool" to guarantee a 32-bit result,
10242 regardless of compiler. gcc on mac uses 32-bit values for bool,
10243 but gcc on linux and MSVC on Windows use 8-bit values.
10245 2009-07-30 Geoffrey Garen <ggaren@apple.com>
10247 Windows build fix: added missing symbols on Windows.
10249 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10250 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
10252 2009-07-30 Geoffrey Garen <ggaren@apple.com>
10254 Windows build fix: removed stale symbols on Windows.
10256 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10257 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
10259 === End merge of nitro-extreme branch 2009-07-30 ===
10261 2009-07-20 Geoffrey Garen <ggaren@apple.com>
10263 Fixed a post-review typo in r46066 that caused tons of test failures.
10265 SunSpider reports no change.
10267 * runtime/JSArray.cpp:
10268 (JSC::JSArray::JSArray): Initialize the full vector capacity, to avoid
10269 uninitialized members at the end.
10271 2009-07-20 Geoffrey Garen <ggaren@apple.com>
10273 Windows WebKit build fix: Added some missing exports.
10275 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10276 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
10278 2009-07-17 Geoffrey Garen <ggaren@apple.com>
10280 Reviewed by Sam Weinig.
10282 Get the branch working on windows.
10283 https://bugs.webkit.org/show_bug.cgi?id=27391
10285 SunSpider says 0.3% faster.
10287 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10288 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Updated
10289 MSVC export lists to fix linker errors.
10291 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added / removed
10292 new / old project files.
10295 (JSC::JIT::privateCompileCTIMachineTrampolines): Used #pragma pack to tell
10296 MSVC that these structures represent actual memory layout, and should not be
10297 automatically aligned. Changed the return value load to load a 64bit quantity
10298 into the canonical registers.
10300 * jit/JIT.h: Moved OBJECT_OFFSETOF definition to StdLibExtras.h because
10301 it's needed by more than just the JIT, and it supplements a standard library
10305 (JSC::JIT::compileOpCallInitializeCallFrame): Fixed an incorrectly signed
10306 cast to resolve an MSVC warning.
10308 * jit/JITStubs.h: Used #pragma pack to tell MSVC that these structures
10309 represent actual memory layout, and should not be automatically aligned.
10311 * runtime/JSArray.cpp:
10312 (JSC::JSArray::JSArray): Replaced memset_pattern8 with a for loop, since
10313 memset_pattern8 is not portable. (I verified that this version of the loop
10314 gives the best performance / generated code in GCC.)
10316 * runtime/JSObject.h:
10317 (JSC::JSObject::JSObject): Removed accidental usage of FIELD_OFFSET --
10318 OBJECT_OFFSETOF is our new macro name. (FIELD_OFFSET conflicts with a
10319 definition in winnt.h.)
10321 * runtime/JSValue.cpp: Added some headers needed by non-all-in-one builds.
10323 * runtime/JSValue.h:
10324 (JSC::JSValue::): Made the tag signed, to match MSVC's signed enum values.
10325 (GCC doesn't seem to care one way or the other.)
10327 * wtf/MainThread.cpp: Moved the StdLibExtras.h #include -- I did this a
10328 while ago to resolve a conflict with winnt.h. I can't remember if it's truly
10329 still needed, but what the heck.
10331 * wtf/StdLibExtras.h: Moved OBJECT_OFFSETOF definition here.
10333 2009-07-06 Geoffrey Garen <ggaren@apple.com>
10335 Reviewed by Sam Weinig (?).
10337 Fixed an assertion seen during the stress test.
10339 Don't assume that, if op1 is constant, op2 is not, and vice versa. Sadly,
10340 not all constants get folded.
10342 * jit/JITArithmetic.cpp:
10343 (JSC::JIT::emit_op_jnless):
10344 (JSC::JIT::emitSlow_op_jnless):
10345 (JSC::JIT::emit_op_jnlesseq):
10346 (JSC::JIT::emitSlow_op_jnlesseq):
10348 2009-07-06 Geoffrey Garen <ggaren@apple.com>
10350 Reviewed by Sam Weinig.
10352 Include op_convert_this in result caching.
10354 No change on SunSpider or v8.
10356 * jit/JITOpcodes.cpp:
10357 (JSC::JIT::emit_op_convert_this):
10359 * jit/JITStubs.cpp:
10360 (JSC::DEFINE_STUB_FUNCTION):
10362 (JSC::): Made the op_convert_this JIT stub return an EncodedJSValue, so
10363 to maintain the result caching contract that { tag, payload } can be
10364 found in { regT1, regT0 }.
10366 2009-07-06 Geoffrey Garen <ggaren@apple.com>
10368 Reviewed by Sam Weinig.
10370 Implemented result chaining.
10372 1% faster on SunSpider. 4%-5% faster on v8.
10374 * assembler/MacroAssemblerX86Common.h:
10375 (JSC::MacroAssemblerX86Common::move):
10376 * assembler/X86Assembler.h:
10377 (JSC::X86Assembler::movl_rr): Added an optimization to eliminate
10378 no-op mov instructions, to simplify chaining.
10382 * jit/JIT.h: Added data members and helper functions for recording
10383 chained results. We record both a mapping from virtual to machine register
10384 and the opcode for which the mapping is valid, to help ensure that the
10385 mapping isn't used after the mapped register has been stomped by other
10389 (JSC::JIT::compileOpCallVarargs):
10390 (JSC::JIT::compileOpCallVarargsSlowCase):
10391 (JSC::JIT::emit_op_ret):
10392 (JSC::JIT::emit_op_construct_verify):
10393 (JSC::JIT::compileOpCall):
10394 (JSC::JIT::compileOpCallSlowCase): Chain function call results.
10396 * jit/JITInlineMethods.h:
10397 (JSC::JIT::emitLoadTag):
10398 (JSC::JIT::emitLoadPayload):
10399 (JSC::JIT::emitLoad):
10400 (JSC::JIT::emitLoad2):
10401 (JSC::JIT::isLabeled):
10404 (JSC::JIT::isMapped):
10405 (JSC::JIT::getMappedPayload):
10406 (JSC::JIT::getMappedTag): Use helper functions when loading virtual
10407 registers into machine registers, in case the loads can be eliminated
10410 * jit/JITOpcodes.cpp:
10411 (JSC::JIT::emit_op_mov):
10412 (JSC::JIT::emit_op_end):
10413 (JSC::JIT::emit_op_instanceof):
10414 (JSC::JIT::emit_op_get_global_var):
10415 (JSC::JIT::emit_op_put_global_var):
10416 (JSC::JIT::emit_op_get_scoped_var):
10417 (JSC::JIT::emit_op_put_scoped_var):
10418 (JSC::JIT::emit_op_to_primitive):
10419 (JSC::JIT::emit_op_resolve_global):
10420 (JSC::JIT::emit_op_jneq_ptr):
10421 (JSC::JIT::emit_op_next_pname):
10422 (JSC::JIT::emit_op_to_jsnumber):
10423 (JSC::JIT::emit_op_catch): Chain results from these opcodes.
10425 (JSC::JIT::emit_op_profile_will_call):
10426 (JSC::JIT::emit_op_profile_did_call): Load the profiler into regT2 to
10427 avoid stomping a chained result.
10429 * jit/JITPropertyAccess.cpp:
10430 (JSC::JIT::emit_op_method_check):
10431 (JSC::JIT::emit_op_get_by_val):
10432 (JSC::JIT::emit_op_get_by_id): Chain results from these opcodes.
10434 * jit/JITStubCall.h:
10435 (JSC::JITStubCall::addArgument): Always use { regT1, regT0 }, to facilitate
10438 (JSC::JITStubCall::call): Unmap all mapped registers, since our callee
10439 stub might stomp them.
10441 2009-07-01 Sam Weinig <sam@webkit.org>
10443 Reviewed by Gavin Barraclough.
10445 Don't reload values in emitBinaryDoubleOp.
10447 SunSpider reports a 0.6% progression.
10450 * jit/JITArithmetic.cpp:
10451 (JSC::JIT::emit_op_jnless):
10452 (JSC::JIT::emit_op_jnlesseq):
10453 (JSC::JIT::emitBinaryDoubleOp):
10455 2009-07-01 Sam Weinig <sam@webkit.org>
10457 Reviewed by Geoffrey Garen.
10459 Convert op_div to load op1 and op2 up front.
10461 * jit/JITArithmetic.cpp:
10462 (JSC::JIT::emit_op_div):
10464 2009-07-01 Sam Weinig <sam@webkit.org>
10466 Reviewed by Geoffrey Garen.
10468 Don't emit code in emitBinaryDoubleOp if code is unreachable, observable
10469 via an empty (unlinked) jumplist passed in. This only effects op_jnless
10470 and op_jnlesseq at present.
10472 * jit/JITArithmetic.cpp:
10473 (JSC::JIT::emitSlow_op_jnless):
10474 (JSC::JIT::emitSlow_op_jnlesseq):
10475 (JSC::JIT::emitBinaryDoubleOp):
10477 2009-07-01 Geoffrey Garen <ggaren@apple.com>
10479 Reviewed by Sam Weinig.
10481 Converted op_mod to put { tag, payload } in { regT1, regT0 }, and
10482 tidied up its constant case.
10484 SunSpider reports a 0.2% regression, but a micro-benchmark of op_mod
10485 shows a 12% speedup, and the SunSpider test that uses op_mod most should
10486 benefit a lot from result caching in the end, since it almost always
10487 performs (expression) % constant.
10489 * jit/JITArithmetic.cpp:
10490 (JSC::JIT::emit_op_mod):
10491 (JSC::JIT::emitSlow_op_mod):
10493 2009-06-30 Sam Weinig <sam@webkit.org>
10495 Reviewed by Geoffrey Garen.
10497 Converted some more arithmetic ops to put { tag, payload } in
10500 * jit/JITArithmetic.cpp:
10501 (JSC::JIT::emit_op_mul):
10502 (JSC::JIT::emitSlow_op_mul):
10504 2009-06-30 Geoffrey Garen <ggaren@apple.com>
10506 Reviewed by Sam Weinig.
10508 Converted some more arithmetic ops to put { tag, payload } in
10509 { regT1, regT0 }, and added a case for subtract constant.
10511 SunSpider says no change. v8 says 0.3% slower.
10514 * jit/JITArithmetic.cpp:
10515 (JSC::JIT::emit_op_add):
10516 (JSC::JIT::emitAdd32Constant):
10517 (JSC::JIT::emitSlow_op_add):
10518 (JSC::JIT::emit_op_sub):
10519 (JSC::JIT::emitSub32Constant):
10520 (JSC::JIT::emitSlow_op_sub):
10522 2009-06-30 Gavin Barraclough <barraclough@apple.com>
10524 Reviewed by Sam Weinig.
10526 Remove more uses of addressFor(), load double constants directly from
10527 the constantpool in the CodeBlock, rather than from the register file.
10529 * jit/JITArithmetic.cpp:
10530 (JSC::JIT::emitAdd32Constant):
10531 (JSC::JIT::emitBinaryDoubleOp):
10533 2009-06-30 Geoffrey Garen <ggaren@apple.com>
10535 Reviewed by Sam Weinig.
10537 Fixed a bug in postfix ops, where we would treat x = x++ and x = x--
10538 as a no-op, even if x were not an int, and the ++/-- could have side-effects.
10540 * jit/JITArithmetic.cpp:
10541 (JSC::JIT::emit_op_post_inc):
10542 (JSC::JIT::emitSlow_op_post_inc):
10543 (JSC::JIT::emit_op_post_dec):
10544 (JSC::JIT::emitSlow_op_post_dec):
10546 2009-06-30 Geoffrey Garen <ggaren@apple.com>
10548 Reviewed by Sam Weinig.
10550 Converted some arithmetic ops to put { tag, payload } in
10553 SunSpider says 0.7% faster. v8 says no change.
10556 * jit/JITArithmetic.cpp:
10557 (JSC::JIT::emit_op_jnless):
10558 (JSC::JIT::emit_op_jnlesseq):
10559 (JSC::JIT::emit_op_lshift):
10560 (JSC::JIT::emit_op_rshift):
10561 (JSC::JIT::emit_op_bitand):
10562 (JSC::JIT::emit_op_bitor):
10563 (JSC::JIT::emit_op_bitxor):
10564 * jit/JITInlineMethods.h:
10565 (JSC::JIT::isOperandConstantImmediateInt):
10566 (JSC::JIT::getOperandConstantImmediateInt):
10568 2009-06-30 Gavin Barraclough <barraclough@apple.com>
10570 Reviewed by Sam Weinig.
10572 Start removing cases of addressFor().
10575 * jit/JITArithmetic.cpp:
10576 (JSC::JIT::emitAdd32Constant):
10577 (JSC::JIT::emitBinaryDoubleOp):
10578 (JSC::JIT::emit_op_div):
10579 * jit/JITInlineMethods.h:
10580 (JSC::JIT::emitLoadDouble):
10581 (JSC::JIT::emitLoadInt32ToDouble):
10582 (JSC::JIT::emitStoreDouble):
10583 * jit/JITOpcodes.cpp:
10584 (JSC::JIT::emit_op_jfalse):
10585 (JSC::JIT::emit_op_jtrue):
10587 2009-06-30 Geoffrey Garen <ggaren@apple.com>
10589 Rolled back in my last patch with regression fixed.
10592 (JSC::JIT::privateCompileSlowCases):
10594 * jit/JITOpcodes.cpp:
10595 (JSC::JIT::emit_op_loop_if_less):
10596 (JSC::JIT::emit_op_loop_if_lesseq):
10597 (JSC::JIT::emit_op_resolve_global):
10598 (JSC::JIT::emitSlow_op_resolve_global):
10599 (JSC::JIT::emit_op_eq):
10600 (JSC::JIT::emitSlow_op_eq):
10601 (JSC::JIT::emit_op_neq):
10602 (JSC::JIT::emitSlow_op_neq):
10604 2009-06-30 Geoffrey Garen <ggaren@apple.com>
10606 Rolled out my last patch because it was a 2% SunSpider regression.
10609 (JSC::JIT::privateCompileSlowCases):
10611 * jit/JITOpcodes.cpp:
10612 (JSC::JIT::emit_op_loop_if_less):
10613 (JSC::JIT::emit_op_loop_if_lesseq):
10614 (JSC::JIT::emit_op_resolve_global):
10615 (JSC::JIT::emit_op_eq):
10616 (JSC::JIT::emitSlow_op_eq):
10617 (JSC::JIT::emit_op_neq):
10618 (JSC::JIT::emitSlow_op_neq):
10620 2009-06-30 Geoffrey Garen <ggaren@apple.com>
10622 Reviewed by Gavin "Sam Weinig" Barraclough.
10624 Standardized the rest of our opcodes to put { tag, payload } in
10625 { regT1, regT0 } where possible.
10628 (JSC::JIT::privateCompileSlowCases):
10630 * jit/JITOpcodes.cpp:
10631 (JSC::JIT::emit_op_loop_if_less):
10632 (JSC::JIT::emit_op_loop_if_lesseq):
10633 (JSC::JIT::emit_op_resolve_global):
10634 (JSC::JIT::emitSlow_op_resolve_global):
10635 (JSC::JIT::emit_op_eq):
10636 (JSC::JIT::emitSlow_op_eq):
10637 (JSC::JIT::emit_op_neq):
10638 (JSC::JIT::emitSlow_op_neq):
10640 2009-06-30 Gavin Barraclough <barraclough@apple.com>
10642 Reviewed by Geoffrey Garen.
10644 Replace calls to store32(tagFor()) and store32(payloadFor())
10645 with emitStoreInt32(), emitStoreBool(), and emitStoreCell().
10648 * jit/JITArithmetic.cpp:
10649 (JSC::JIT::emit_op_negate):
10650 (JSC::JIT::emit_op_lshift):
10651 (JSC::JIT::emit_op_rshift):
10652 (JSC::JIT::emit_op_bitand):
10653 (JSC::JIT::emitBitAnd32Constant):
10654 (JSC::JIT::emit_op_bitor):
10655 (JSC::JIT::emitBitOr32Constant):
10656 (JSC::JIT::emit_op_bitxor):
10657 (JSC::JIT::emitBitXor32Constant):
10658 (JSC::JIT::emit_op_bitnot):
10659 (JSC::JIT::emit_op_post_inc):
10660 (JSC::JIT::emit_op_post_dec):
10661 (JSC::JIT::emit_op_pre_inc):
10662 (JSC::JIT::emit_op_pre_dec):
10663 (JSC::JIT::emit_op_add):
10664 (JSC::JIT::emitAdd32Constant):
10665 (JSC::JIT::emit_op_sub):
10666 (JSC::JIT::emitSub32ConstantLeft):
10667 (JSC::JIT::emitSub32ConstantRight):
10668 (JSC::JIT::emit_op_mul):
10669 (JSC::JIT::emitSlow_op_mul):
10670 (JSC::JIT::emit_op_div):
10671 (JSC::JIT::emit_op_mod):
10673 (JSC::JIT::emit_op_load_varargs):
10674 * jit/JITInlineMethods.h:
10675 (JSC::JIT::emitStoreInt32):
10676 (JSC::JIT::emitStoreCell):
10677 (JSC::JIT::emitStoreBool):
10678 (JSC::JIT::emitStore):
10679 * jit/JITOpcodes.cpp:
10680 (JSC::JIT::emit_op_instanceof):
10681 (JSC::JIT::emit_op_not):
10682 (JSC::JIT::emit_op_eq):
10683 (JSC::JIT::emitSlow_op_eq):
10684 (JSC::JIT::emit_op_neq):
10685 (JSC::JIT::emitSlow_op_neq):
10686 (JSC::JIT::compileOpStrictEq):
10687 (JSC::JIT::emit_op_eq_null):
10688 (JSC::JIT::emit_op_neq_null):
10689 * jit/JITStubCall.h:
10690 (JSC::JITStubCall::call):
10692 2009-06-30 Geoffrey Garen <ggaren@apple.com>
10694 Reviewed by Sam Weinig.
10696 Standardized the rest of the property access instructions to put { tag,
10697 payload } in { regT1, regT0 }.
10699 Small v8 speedup, 0.2% SunSpider slowdown.
10702 * jit/JITInlineMethods.h:
10703 (JSC::JIT::emitLoad):
10704 (JSC::JIT::emitLoad2):
10705 * jit/JITPropertyAccess.cpp:
10706 (JSC::JIT::emit_op_get_by_val):
10707 (JSC::JIT::emitSlow_op_get_by_val):
10708 (JSC::JIT::emit_op_put_by_val):
10709 (JSC::JIT::emitSlow_op_put_by_val):
10710 (JSC::JIT::emit_op_put_by_id):
10711 (JSC::JIT::emitSlow_op_put_by_id):
10712 (JSC::JIT::patchPutByIdReplace):
10714 2009-06-29 Sam Weinig <sam@webkit.org>
10716 Reviewed by Gavin Barraclough.
10719 - Use fpRegT* instead of X86::xmm*.
10720 - Use a switch statement in emitBinaryDoubleOp instead of a bunch of
10723 * jit/JITArithmetic.cpp:
10724 (JSC::JIT::emitAdd32Constant):
10725 (JSC::JIT::emitBinaryDoubleOp):
10726 (JSC::JIT::emit_op_div):
10728 2009-06-29 Sam Weinig <sam@webkit.org>
10730 Reviewed by Geoffrey Garen.
10732 Add inline code dealing with doubles for op_jfalse and op_jtrue.
10734 * assembler/MacroAssemblerX86Common.h:
10735 (JSC::MacroAssemblerX86Common::):
10736 (JSC::MacroAssemblerX86Common::zeroDouble):
10737 * jit/JITOpcodes.cpp:
10738 (JSC::JIT::emit_op_jfalse):
10739 (JSC::JIT::emit_op_jtrue):
10741 2009-06-28 Geoffrey Garen <ggaren@apple.com>
10743 Reviewed by Sam Weinig.
10745 Standardized op_get_by_id to put { tag, payload } in { regT1, regT0 }.
10747 SunSpider and v8 report maybe 0.2%-0.4% regressions, but the optimization
10748 this enables will win much more than that back.
10751 (JSC::JIT::privateCompileCTIMachineTrampolines):
10753 * jit/JITPropertyAccess.cpp:
10754 (JSC::JIT::emit_op_method_check):
10755 (JSC::JIT::emit_op_get_by_id):
10756 (JSC::JIT::compileGetByIdHotPath):
10757 (JSC::JIT::compileGetByIdSlowCase):
10758 (JSC::JIT::patchGetByIdSelf):
10759 (JSC::JIT::privateCompilePatchGetArrayLength):
10760 (JSC::JIT::privateCompileGetByIdProto):
10761 (JSC::JIT::privateCompileGetByIdSelfList):
10762 (JSC::JIT::privateCompileGetByIdProtoList):
10763 (JSC::JIT::privateCompileGetByIdChainList):
10764 (JSC::JIT::privateCompileGetByIdChain):
10766 2009-06-26 Geoffrey Garen <ggaren@apple.com>
10768 Reviewed by Maciej Stachowiak.
10770 Standardized op_call to put { tag, payload } in { regT1, regT0 }.
10772 SunSpider and v8 report no change.
10775 (JSC::JIT::privateCompileCTIMachineTrampolines):
10777 (JSC::JIT::compileOpCallInitializeCallFrame):
10778 (JSC::JIT::compileOpCallSetupArgs):
10779 (JSC::JIT::compileOpConstructSetupArgs):
10780 (JSC::JIT::compileOpCallVarargsSetupArgs):
10781 (JSC::JIT::compileOpCallVarargs):
10782 (JSC::JIT::compileOpCall):
10783 (JSC::JIT::compileOpCallSlowCase):
10785 2009-06-26 Sam Weinig <sam@webkit.org>
10787 Reviewed by Geoffrey Garen.
10789 Handle multiplying by zero a little better by
10790 inlining the case that both operands are non-negative
10793 * assembler/MacroAssemblerX86Common.h:
10794 (JSC::MacroAssemblerX86Common::branchOr32):
10795 * jit/JITArithmetic.cpp:
10796 (JSC::JIT::emit_op_mul):
10797 (JSC::JIT::emitSlow_op_mul):
10799 2009-06-25 Geoffrey Garen <ggaren@apple.com>
10801 Reviewed by Sam Weinig.
10803 Optimize x++ to ++x inside for loops.
10805 Sadly, no measurable speedup, but this should help with result chaining.
10807 * parser/Nodes.cpp:
10808 (JSC::ForNode::emitBytecode):
10810 2009-06-25 Geoffrey Garen <ggaren@apple.com>
10812 Reviewed by Sam Weinig.
10814 Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
10816 * jit/JITArithmetic.cpp:
10817 (JSC::JIT::emitSlow_op_bitnot):
10818 (JSC::JIT::emit_op_post_inc):
10820 2009-06-25 Geoffrey Garen <ggaren@apple.com>
10822 Reviewed by Sam Weinig.
10824 Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
10826 * jit/JITArithmetic.cpp:
10827 (JSC::JIT::emit_op_bitnot):
10828 (JSC::JIT::emit_op_post_dec):
10829 (JSC::JIT::emit_op_pre_inc):
10830 (JSC::JIT::emitSlow_op_pre_inc):
10831 (JSC::JIT::emit_op_pre_dec):
10832 (JSC::JIT::emitSlow_op_pre_dec):
10834 2009-06-25 Geoffrey Garen <ggaren@apple.com>
10836 Reviewed by Sam Weinig.
10838 Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
10840 * jit/JITArithmetic.cpp:
10841 (JSC::JIT::emit_op_negate):
10842 (JSC::JIT::emitSlow_op_negate):
10844 (JSC::JIT::emit_op_construct_verify):
10845 (JSC::JIT::emitSlow_op_construct_verify):
10847 2009-06-25 Geoffrey Garen <ggaren@apple.com>
10849 Reviewed by Sam Weinig.
10851 Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
10853 * jit/JITOpcodes.cpp:
10854 (JSC::JIT::emit_op_loop_if_true):
10855 (JSC::JIT::emit_op_jfalse):
10856 (JSC::JIT::emit_op_jtrue):
10857 (JSC::JIT::emit_op_jeq_null):
10858 (JSC::JIT::emit_op_jneq_null):
10859 (JSC::JIT::emit_op_eq_null):
10860 (JSC::JIT::emit_op_neq_null):
10862 2009-06-25 Geoffrey Garen <ggaren@apple.com>
10864 Reviewed by Sam Weinig (sort of, maybe).
10866 Fixed some ASSERTs in http/tests/security.
10868 These ASSERTs were introduced by http://trac.webkit.org/changeset/45057,
10869 but the underlying problem was actually older. http://trac.webkit.org/changeset/45057
10870 just exposed the problem by enabling optimization in more cases.
10872 The ASSERTs fired because we tested PropertySlot::slotBase() for validity,
10873 but slotBase() ASSERTs if it's invalid, so we would ASSERT before
10874 the test could happen. Solution: Remove the ASSERT. Maybe it was valid
10875 once, but it clearly goes against a pattern we've deployed of late.
10877 The underlying problem was that WebCore would re-use a PropertySlot in
10878 the case of a forwarding access, and the second use would not completely
10879 overwrite the first use. Solution: Make sure to overwrite m_offset when
10880 setting a value on a PropertySlot. (Other values already get implicitly
10881 overwritten during reuse.)
10883 * runtime/PropertySlot.h:
10884 (JSC::PropertySlot::PropertySlot):
10885 (JSC::PropertySlot::setValueSlot):
10886 (JSC::PropertySlot::setValue):
10887 (JSC::PropertySlot::setRegisterSlot):
10888 (JSC::PropertySlot::setUndefined):
10889 (JSC::PropertySlot::slotBase):
10890 (JSC::PropertySlot::clearOffset):
10892 2009-06-24 Gavin Barraclough <barraclough@apple.com>
10894 Reviewed by Geoff Garen.
10896 Enable JIT_OPTIMIZE_METHOD_CALLS on the branch, implementation matches current implemenatation in ToT.
10899 * jit/JITPropertyAccess.cpp:
10900 (JSC::JIT::emit_op_method_check):
10901 (JSC::JIT::emitSlow_op_method_check):
10902 (JSC::JIT::emit_op_get_by_id):
10903 (JSC::JIT::compileGetByIdHotPath):
10904 (JSC::JIT::emitSlow_op_get_by_id):
10905 (JSC::JIT::compileGetByIdSlowCase):
10907 2009-06-23 Geoffrey Garen <ggaren@apple.com>
10909 Reviewed by Sam Weinig.
10911 Bit off a tiny bit more of standardizing opcode behavior to help with result
10914 SunSpider reports no change, v8 maybe a tiny speedup.
10916 * jit/JITOpcodes.cpp:
10917 (JSC::JIT::emit_op_to_jsnumber):
10918 (JSC::JIT::emitSlow_op_to_jsnumber):
10919 (JSC::JIT::emit_op_convert_this):
10920 (JSC::JIT::emitSlow_op_convert_this):
10922 2009-06-23 Geoffrey Garen <ggaren@apple.com>
10924 Reviewed by Sam Weinig.
10926 Bit off a tiny bit more of standardizing opcode behavior to help with result
10927 caching -- including removing my old enemy, op_resolve_function, because
10928 it was non-standard, and removing it felt better than helping it limp along.
10930 SunSpider reports no change, v8 maybe a tiny speedup.
10932 * bytecode/CodeBlock.cpp:
10933 (JSC::CodeBlock::dump):
10934 * bytecode/Opcode.h:
10935 * bytecompiler/BytecodeGenerator.cpp:
10936 * bytecompiler/BytecodeGenerator.h:
10937 * interpreter/Interpreter.cpp:
10938 (JSC::Interpreter::privateExecute):
10940 (JSC::JIT::privateCompileMainPass):
10942 * jit/JITOpcodes.cpp:
10943 (JSC::JIT::emit_op_get_scoped_var):
10944 (JSC::JIT::emit_op_put_scoped_var):
10945 (JSC::JIT::emit_op_to_primitive):
10946 (JSC::JIT::emitSlow_op_to_primitive):
10947 * jit/JITStubs.cpp:
10949 * parser/Nodes.cpp:
10950 (JSC::FunctionCallResolveNode::emitBytecode):
10952 2009-06-23 Geoffrey Garen <ggaren@apple.com>
10954 Reviewed by Sam Weinig.
10956 Bit off a tiny bit of standardizing opcode behavior to help with result
10959 0.6% SunSpider speedup. 0.3% v8 speedup.
10961 * jit/JITInlineMethods.h:
10962 (JSC::JIT::emitLoad): Accomodate a base register that overlaps with payload
10963 by loading tag before payload, to avoid stomping base/payload.
10965 * jit/JITOpcodes.cpp:
10966 (JSC::JIT::emit_op_mov): Abide by the standard "tag in regT1, payload in
10969 (JSC::JIT::emit_op_get_global_var):
10970 (JSC::JIT::emit_op_put_global_var): Ditto. Also, removed some irrelevent
10971 loads while I was at it. The global object's "d" pointer never changes
10972 after construction.
10974 2009-06-23 Gavin Barraclough <barraclough@apple.com>
10976 Reviewed by Sam Weinig.
10978 Remove 'arguments' field from Register union (again).
10979 This time do so without breaking tests (radical, I know).
10981 * interpreter/CallFrame.h:
10982 (JSC::ExecState::optionalCalleeArguments):
10983 (JSC::ExecState::setArgumentCount):
10984 (JSC::ExecState::init):
10985 * interpreter/Interpreter.cpp:
10986 (JSC::Interpreter::dumpRegisters):
10987 (JSC::Interpreter::unwindCallFrame):
10988 (JSC::Interpreter::privateExecute):
10989 (JSC::Interpreter::retrieveArguments):
10990 * interpreter/Register.h:
10991 (JSC::Register::withInt):
10993 (JSC::Register::Register):
10994 (JSC::Register::i):
10995 * jit/JITStubs.cpp:
10996 (JSC::JITStubs::cti_op_tear_off_arguments):
10997 * runtime/Arguments.h:
10998 (JSC::JSActivation::copyRegisters):
10999 (JSC::Register::arguments):
11000 * runtime/JSActivation.cpp:
11001 (JSC::JSActivation::argumentsGetter):
11002 * runtime/JSActivation.h:
11004 2009-06-23 Geoffrey Garen <ggaren@apple.com>
11006 Reviewed by Sam Weinig.
11008 Removed some result register tracking cruft in preparation for a new
11009 result tracking mechanism.
11011 SunSpider reports no change.
11013 * assembler/AbstractMacroAssembler.h:
11014 * assembler/X86Assembler.h:
11015 (JSC::X86Assembler::JmpDst::JmpDst): No need to track jump targets in
11016 machine code; we already do this in bytecode.
11020 (JSC::JIT::emitTimeoutCheck): Make sure to save and restore the result
11021 registers, so an opcode with a timeout check can still benefit from result
11024 (JSC::JIT::privateCompileMainPass):
11025 (JSC::JIT::privateCompileSlowCases): Removed calls to killLastResultRegister()
11026 in preparation for something new.
11029 * jit/JITArithmetic.cpp:
11030 (JSC::JIT::emit_op_jnless):
11031 (JSC::JIT::emit_op_jnlesseq):
11032 * jit/JITInlineMethods.h:
11033 (JSC::JIT::emitGetFromCallFrameHeaderPtr):
11034 (JSC::JIT::emitGetFromCallFrameHeader32):
11035 * jit/JITOpcodes.cpp:
11036 (JSC::JIT::emit_op_jmp):
11037 (JSC::JIT::emit_op_jfalse):
11038 (JSC::JIT::emit_op_jtrue):
11039 (JSC::JIT::emit_op_jeq_null):
11040 (JSC::JIT::emit_op_jneq_null):
11041 (JSC::JIT::emit_op_jneq_ptr):
11042 (JSC::JIT::emit_op_jsr):
11043 (JSC::JIT::emit_op_sret):
11044 (JSC::JIT::emit_op_jmp_scopes): ditto
11046 * jit/JITStubCall.h:
11047 (JSC::JITStubCall::JITStubCall):
11048 (JSC::JITStubCall::getArgument): added a mechanism for reloading an argument
11049 you passed to a JIT stub, for use in emitTimeoutCheck.
11051 2009-06-23 Sam Weinig <sam@webkit.org>
11053 Reviewed by Geoffrey Garen.
11055 Remove now-useless inplace variants of binary ops.
11058 * jit/JITArithmetic.cpp:
11059 (JSC::JIT::emit_op_bitand):
11060 (JSC::JIT::emit_op_bitor):
11061 (JSC::JIT::emit_op_bitxor):
11062 (JSC::JIT::emit_op_add):
11063 (JSC::JIT::emit_op_sub):
11064 (JSC::JIT::emit_op_mul):
11066 2009-06-23 Sam Weinig <sam@webkit.org>
11068 Reviewed by Geoffrey Garen.
11070 Move off memory operands to aid in re-enabling result caching.
11072 - No regression measured.
11075 * jit/JITArithmetic.cpp:
11076 (JSC::JIT::emit_op_negate):
11077 (JSC::JIT::emit_op_jnless):
11078 (JSC::JIT::emit_op_jnlesseq):
11079 (JSC::JIT::emit_op_lshift):
11080 (JSC::JIT::emit_op_rshift):
11081 (JSC::JIT::emit_op_bitand):
11082 (JSC::JIT::emitBitAnd32Constant):
11083 (JSC::JIT::emitBitAnd32InPlace):
11084 (JSC::JIT::emit_op_bitor):
11085 (JSC::JIT::emitBitOr32Constant):
11086 (JSC::JIT::emitBitOr32InPlace):
11087 (JSC::JIT::emit_op_bitxor):
11088 (JSC::JIT::emitBitXor32Constant):
11089 (JSC::JIT::emitBitXor32InPlace):
11090 (JSC::JIT::emit_op_bitnot):
11091 (JSC::JIT::emit_op_post_inc):
11092 (JSC::JIT::emit_op_post_dec):
11093 (JSC::JIT::emit_op_pre_inc):
11094 (JSC::JIT::emitSlow_op_pre_inc):
11095 (JSC::JIT::emit_op_pre_dec):
11096 (JSC::JIT::emitSlow_op_pre_dec):
11097 (JSC::JIT::emit_op_add):
11098 (JSC::JIT::emitAdd32Constant):
11099 (JSC::JIT::emitAdd32InPlace):
11100 (JSC::JIT::emitSlow_op_add):
11101 (JSC::JIT::emitSlowAdd32Constant):
11102 (JSC::JIT::emit_op_sub):
11103 (JSC::JIT::emitSlow_op_sub):
11104 (JSC::JIT::emitSub32ConstantLeft):
11105 (JSC::JIT::emitSub32ConstantRight):
11106 (JSC::JIT::emitSub32InPlaceLeft):
11107 (JSC::JIT::emitSub32InPlaceRight):
11108 (JSC::JIT::emitBinaryDoubleOp):
11109 (JSC::JIT::emit_op_mul):
11110 (JSC::JIT::emitMul32InPlace):
11111 (JSC::JIT::emit_op_div):
11112 (JSC::JIT::emit_op_mod):
11114 (JSC::JIT::compileOpCallVarargs):
11115 * jit/JITOpcodes.cpp:
11116 (JSC::JIT::emit_op_loop_if_less):
11117 (JSC::JIT::emit_op_loop_if_lesseq):
11118 (JSC::JIT::emit_op_instanceof):
11119 (JSC::JIT::emit_op_to_primitive):
11120 (JSC::JIT::emit_op_not):
11121 (JSC::JIT::emit_op_jneq_ptr):
11122 (JSC::JIT::emit_op_eq):
11123 (JSC::JIT::emit_op_neq):
11124 (JSC::JIT::emit_op_to_jsnumber):
11125 * jit/JITPropertyAccess.cpp:
11126 (JSC::JIT::emit_op_get_by_val):
11127 (JSC::JIT::emit_op_put_by_val):
11129 2009-06-23 Geoffrey Garen <ggaren@apple.com>
11131 Reviewed by Sam Weinig.
11133 Fixed some missing and/or misplaced labels in bytecode generation, so
11134 we don't have to work around them in JIT code generation.
11136 * bytecompiler/BytecodeGenerator.cpp:
11137 (JSC::BytecodeGenerator::emitJumpSubroutine):
11138 * parser/Nodes.cpp:
11139 (JSC::TryNode::emitBytecode):
11141 2009-06-22 Geoffrey Garen <ggaren@apple.com>
11143 Reviewed by Sam Weinig.
11145 For member function calls, emit "this" directly into the "this" slot
11146 for the function call, instead of moving it there later. This reduces
11147 time spent in op_mov during certain calls, like "a.b.c()".
11149 1%-2% speedup on v8, mostly richards and delta-blue.
11151 * parser/Nodes.cpp:
11152 (JSC::FunctionCallDotNode::emitBytecode):
11154 2009-06-22 Gavin Barraclough <barraclough@apple.com>
11156 Reviewed by Sam Weinig.
11158 Remove 'arguments' field from Register union. Having JSCell derived types in the union is
11159 dangerous since it opens the possibility for the field to be written as a raw pointer but
11160 then read as a JSValue. This will lead to statle data being read for the tag, which may
11161 be dangerous. Having removed Arguments* types form Register, all arguments objects must
11162 always explicitly be stored in the register file as JSValues.
11164 * interpreter/CallFrame.h:
11165 (JSC::ExecState::optionalCalleeArguments):
11166 * interpreter/Interpreter.cpp:
11167 (JSC::Interpreter::unwindCallFrame):
11168 (JSC::Interpreter::privateExecute):
11169 (JSC::Interpreter::retrieveArguments):
11170 * interpreter/Register.h:
11172 * jit/JITStubs.cpp:
11173 (JSC::JITStubs::cti_op_tear_off_arguments):
11174 * runtime/Arguments.h:
11175 (JSC::JSActivation::copyRegisters):
11176 * runtime/JSActivation.cpp:
11177 (JSC::JSActivation::argumentsGetter):
11178 * runtime/JSActivation.h:
11180 2009-06-03 Sam Weinig <sam@webkit.org>
11182 Reviewed by Geoffrey Garen.
11184 Add back known this value optimization by abstracting
11185 slow case if not JSCell jumps.
11189 (JSC::JIT::compileOpCallVarargs):
11190 (JSC::JIT::compileOpCallVarargsSlowCase):
11191 (JSC::JIT::compileOpCall):
11192 (JSC::JIT::compileOpCallSlowCase):
11193 * jit/JITInlineMethods.h:
11194 (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
11195 (JSC::JIT::linkSlowCaseIfNotJSCell):
11196 * jit/JITOpcodes.cpp:
11197 (JSC::JIT::emit_op_instanceof):
11198 (JSC::JIT::emitSlow_op_instanceof):
11199 * jit/JITPropertyAccess.cpp:
11200 (JSC::JIT::emit_op_get_by_val):
11201 (JSC::JIT::emitSlow_op_get_by_val):
11202 (JSC::JIT::emit_op_put_by_val):
11203 (JSC::JIT::emitSlow_op_put_by_val):
11204 (JSC::JIT::emit_op_get_by_id):
11205 (JSC::JIT::emitSlow_op_get_by_id):
11206 (JSC::JIT::emit_op_put_by_id):
11207 (JSC::JIT::emitSlow_op_put_by_id):
11209 2009-06-01 Geoffrey Garen <ggaren@apple.com>
11211 Reviewed by Sam Weinig.
11213 Fixed some of the regression in crypto-aes.js. (8.5% speedup in
11216 SunSpider reports no change overall.
11218 Division was producing double results, which took the slow path through
11221 Strangely, all my attempts at versions of this patch that modified array
11222 access code to accept ints encoded as doubles along the fast or slow paths
11223 were regressions. So I did this instead.
11225 * jit/JITArithmetic.cpp:
11226 (JSC::JIT::emit_op_div): When dividing an int by an int, go ahead and try
11227 to turn the result into an int. Don't just do int division, though, because
11228 testing shows it to be slower than SSE double division, and the corner
11229 cases are pretty complicated / lengthy on top of that. Also, don't try
11230 to canonicalize division of known tiny numerators into ints, since that's a
11233 2009-05-26 Geoffrey Garen <ggaren@apple.com>
11235 Reviewed by Oliver Hunt.
11237 Fixed a regression caused by my recent fix for NaN.
11239 * jit/JITArithmetic.cpp:
11240 (JSC::JIT::emitBinaryDoubleOp): Actually do the comparison in reverse
11241 order, like the ChangeLog said we would, bokay?
11243 2009-05-26 Geoffrey Garen <ggaren@apple.com>
11245 Reviewed by Sam Weinig and Oliver Hunt.
11247 Fixed two edge cases in %:
11249 - Don't do -2147483648 % x as a fast case, since you might do -2147483648 % -1,
11250 which will signal a hardware exception due to overflow.
11252 - In the case of a zero remainder, be sure to store negative zero if the
11255 SunSpider reports no change.
11257 * jit/JITArithmetic.cpp:
11258 (JSC::JIT::emit_op_mod):
11259 (JSC::JIT::emitSlow_op_mod):
11261 2009-05-25 Geoffrey Garen <ggaren@apple.com>
11263 Reviewed by Maciej Stachowiak.
11265 Fixed a regression when comparing to NaN.
11267 * jit/JITArithmetic.cpp:
11268 (JSC::JIT::emitBinaryDoubleOp): For op_jnless and op_jnless_eq, do the
11269 comparison in reverse order, and jump if the result is below or
11270 below-or-equal. This ensures that we do jump in the case of NaN.
11272 2009-05-25 Geoffrey Garen <ggaren@apple.com>
11274 Reviewed by Oliver Hunt.
11276 SunSpider says no change.
11278 Fixed regressions in fast/js/var-declarations-shadowing.html and
11279 fast/js/equality.html, caused by recent == and != optimizations.
11281 * jit/JITStubs.cpp:
11282 (JSC::JITStubs::cti_op_eq): Don't treat "compare to string" as always
11283 numeric or string comparison. If the second operand is an object, you
11284 need to ToPrimitive it, and start all over again. Also, I wrote out each
11285 of the possible cases explicitly, to cut down on redundant branching.
11287 2009-05-25 Sam Weinig <sam@webkit.org>
11289 Reviewed by Mark Rowe.
11291 Fix bug in fast/js/constant-folding.html where we were not negating
11294 * jit/JITArithmetic.cpp:
11295 (JSC::JIT::emit_op_negate):
11297 2009-05-23 Geoffrey Garen <ggaren@apple.com>
11299 Reviewed by Oliver Hunt.
11301 Refactored new slow case codegen for == and !=.
11303 SunSpider reports no change, maybe a tiny speedup.
11305 * jit/JITOpcodes.cpp:
11306 (JSC::JIT::emitSlow_op_eq):
11307 (JSC::JIT::emitSlow_op_neq): Made a vptr comparison a *Ptr operation,
11308 instead of *32, to make it portable to 64bit. Reorganized the string
11309 and generic cases to make their control flow a little clearer.
11311 2009-05-23 Geoffrey Garen <ggaren@apple.com>
11313 Reviewed by Maciej Stachowiak.
11315 Optimized == and != for our new value representation -- especially for strings.
11317 14% speedup on date-format-tofte.
11319 * jit/JITOpcodes.cpp:
11320 (JSC::JIT::emit_op_eq):
11321 (JSC::JIT::emitSlow_op_eq):
11322 (JSC::JIT::emit_op_neq):
11323 (JSC::JIT::emitSlow_op_neq):
11324 * jit/JITStubCall.h:
11325 (JSC::JITStubCall::JITStubCall):
11326 * jit/JITStubs.cpp:
11327 (JSC::JITStubs::cti_op_eq):
11328 (JSC::JITStubs::cti_op_eq_strings):
11329 (JSC::JITStubs::cti_op_call_eval):
11332 * runtime/JSValue.h:
11334 2009-05-22 Sam Weinig <sam@webkit.org>
11336 Reviewed by Gavin Barraclough.
11338 Fix non-SSE enabled builds.
11340 * jit/JITArithmetic.cpp:
11341 (JSC::JIT::emitSlow_op_add): Don't early return here, we still need to call the JIT stub.
11342 (JSC::JIT::emitSlow_op_sub): Ditto.
11344 2009-05-22 Geoffrey Garen <ggaren@apple.com>
11346 Reviewed by Sam Weinig.
11348 Here's a thought: let's not take a jit stub call just to multiply by 1,
11351 imul doesn't set the zero flag, so to test for a zero result, we need
11352 an explicit instruction. (Luckily, it does set the overflow flag, so
11353 we can still use that.)
11356 * jit/JITArithmetic.cpp:
11357 (JSC::JIT::emit_op_mul):
11358 (JSC::JIT::emitSlow_op_mul):
11359 (JSC::JIT::emitMul32InPlace):
11361 2009-05-22 Sam Weinig <sam@webkit.org>
11363 Reviewed by Geoffrey "Premature Commit" Garen.
11365 Add back constant integer cases for op_add.
11368 * jit/JITArithmetic.cpp:
11369 (JSC::JIT::emit_op_add):
11370 (JSC::JIT::emitAdd32Constant):
11371 (JSC::JIT::emitSlow_op_add):
11372 (JSC::JIT::emitSlowAdd32Constant):
11373 * jit/JITInlineMethods.h:
11374 (JSC::JIT::getConstantOperandImmediateDouble):
11375 (JSC::JIT::isOperandConstantImmediateDouble):
11377 2009-05-22 Geoffrey Garen <ggaren@apple.com>
11379 Reviewed by Sam Weinig.
11381 Added fast double cases for op_jnless and op_jnlesseq.
11383 * assembler/AbstractMacroAssembler.h:
11384 (JSC::AbstractMacroAssembler::JumpList::jumps): New accesor, used by
11387 * assembler/X86Assembler.h:
11388 (JSC::X86Assembler::ucomisd_rm): New method for comparing register to
11392 * jit/JITArithmetic.cpp:
11393 (JSC::JIT::emit_op_jnless):
11394 (JSC::JIT::emitSlow_op_jnless):
11395 (JSC::JIT::emit_op_jnlesseq):
11396 (JSC::JIT::emitSlow_op_jnlesseq):
11397 (JSC::JIT::emit_op_add):
11398 (JSC::JIT::emit_op_sub):
11399 (JSC::JIT::emitBinaryDoubleOp):
11400 (JSC::JIT::emit_op_mul):
11401 (JSC::JIT::emit_op_div): Modified emitBinaryDoubleOp to accept comparison/jump
11402 operations in addition to operations with explicit result registers.
11404 * jit/JITInlineMethods.h:
11405 (JSC::JIT::addSlowCase): Added an "addSlowCase" for JumpLists, so clients
11406 can track multiple jumps to the same slow case condition together.
11408 2009-05-21 Sam Weinig <sam@webkit.org>
11410 Reviewed by Gavin Barraclough.
11412 Implement op_negate inline fast cases.
11414 * assembler/MacroAssemblerX86Common.h:
11415 (JSC::MacroAssemblerX86Common::neg32):
11416 * assembler/X86Assembler.h:
11417 (JSC::X86Assembler::):
11418 (JSC::X86Assembler::negl_m):
11419 (JSC::X86Assembler::xorpd_rr):
11421 (JSC::JIT::privateCompileMainPass):
11422 (JSC::JIT::privateCompileSlowCases):
11424 * jit/JITArithmetic.cpp:
11425 (JSC::JIT::emit_op_negate):
11426 (JSC::JIT::emitSlow_op_negate):
11428 2009-05-20 Sam Weinig <sam@webkit.org>
11430 Reviewed by Gavin Barraclough.
11432 Update the patchOffsetGetByIdSlowCaseCall constant for the
11433 case that OPCODE_SAMPLING is enabled.
11437 2009-05-20 Geoffrey Garen <ggaren@apple.com>
11439 Reviewed by Sam Weinig.
11441 Added support for inline subtraction of doubles.
11443 * jit/JITArithmetic.cpp:
11444 (JSC::JIT::emit_op_sub):
11445 (JSC::JIT::emitSlow_op_sub):
11446 (JSC::JIT::emitSlowSub32InPlaceLeft):
11447 (JSC::JIT::emitBinaryDoubleOp):
11449 2009-05-20 Sam Weinig <sam@webkit.org>
11451 Reviewed by Geoffrey Garen.
11453 Added support for inline division.
11455 * assembler/X86Assembler.h:
11456 (JSC::X86Assembler::):
11457 (JSC::X86Assembler::divsd_rr):
11458 (JSC::X86Assembler::divsd_mr):
11459 * bytecode/CodeBlock.cpp:
11460 (JSC::CodeBlock::dump):
11461 * bytecode/Opcode.h:
11462 * bytecompiler/BytecodeGenerator.cpp:
11463 (JSC::BytecodeGenerator::emitBinaryOp):
11464 * interpreter/Interpreter.cpp:
11465 (JSC::Interpreter::privateExecute):
11467 (JSC::JIT::privateCompileMainPass):
11468 (JSC::JIT::privateCompileSlowCases):
11470 * jit/JITArithmetic.cpp:
11471 (JSC::JIT::emitBinaryDoubleOp):
11472 (JSC::JIT::emit_op_div):
11473 (JSC::JIT::emitSlow_op_div):
11475 2009-05-20 Geoffrey Garen <ggaren@apple.com>
11477 Reviewed by Sam Weinig.
11479 Added support for inline addition of doubles.
11481 * jit/JITArithmetic.cpp:
11482 (JSC::JIT::emit_op_add):
11483 (JSC::JIT::emitSlow_op_add):
11484 (JSC::JIT::emitSlowAdd32InPlace):
11485 (JSC::JIT::emitBinaryDoubleOp):
11486 (JSC::JIT::emit_op_mul):
11487 (JSC::JIT::emitSlow_op_mul):
11489 2009-05-20 Geoffrey Garen <ggaren@apple.com>
11491 Reviewed by Sam Weinig.
11493 Factored inline double operations into a helper function, so that we
11494 can reuse this code for other math operations.
11497 * jit/JITArithmetic.cpp:
11498 (JSC::JIT::emitBinaryDoubleOp):
11499 (JSC::JIT::emit_op_mul):
11501 (JSC::JIT::compileOpCallInitializeCallFrame):
11503 2009-05-20 Geoffrey Garen <ggaren@apple.com>
11505 Reviewed by Sam Weinig.
11507 Added support for inline multiplication of doubles.
11509 * assembler/X86Assembler.h:
11510 (JSC::X86Assembler::cvtsi2sd_mr): New function, useful for loading an
11511 int32 into a double register.
11513 * jit/JITArithmetic.cpp:
11514 (JSC::JIT::emit_op_mul):
11515 (JSC::JIT::emitSlow_op_mul): Filled out these cases for double arithmetic.
11518 * jit/JITInlineMethods.h:
11519 (JSC::JIT::addressFor): New function, useful for addressing a JSValue's
11520 full 64bits as a double.
11522 2009-05-19 Sam Weinig <sam@webkit.org>
11524 Reviewed by Geoffrey Garen.
11526 Implement and enable optimized calls.
11529 (JSC::JIT::privateCompileCTIMachineTrampolines): Add ENABLE(JIT_OPTIMIZE_CALL) guards
11530 around the the optimize call only trampolines (virtualCallPreLink and virtualCallLink).
11531 Update the trampolines to account for the new JSValue representation.
11532 (JSC::JIT::unlinkCall): Use NULL instead of JSValue noValue.
11535 (JSC::JIT::compileOpCall): Update to account for the new JSValue representation
11536 (JSC::JIT::compileOpCallSlowCase): Ditto.
11538 * jit/JITStubs.h: Remove incorrect !ENABLE(JIT_OPTIMIZE_CALL) guard.
11540 * wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_CALL.
11542 2009-05-19 Sam Weinig <sam@webkit.org>
11544 Reviewed by Geoffrey Garen.
11546 Implement and enable optimized property access.
11548 * assembler/AbstractMacroAssembler.h: Fix comment.
11550 (JSC::JIT::privateCompileCTIMachineTrampolines): Remove array length trampoline
11551 and implement the string length trampoline.
11552 * jit/JIT.h: Add new constants for patch offsets.
11553 * jit/JITInlineMethods.h: Remove FIELD_OFFSET which is now in StdLibExtras.h.
11554 * jit/JITPropertyAccess.cpp:
11555 (JSC::JIT::emit_op_get_by_id):
11556 (JSC::JIT::emitSlow_op_get_by_id):
11557 (JSC::JIT::emit_op_put_by_id):
11558 (JSC::JIT::emitSlow_op_put_by_id):
11559 (JSC::JIT::compilePutDirectOffset):
11560 (JSC::JIT::compileGetDirectOffset):
11561 (JSC::JIT::privateCompilePutByIdTransition):
11562 (JSC::JIT::patchGetByIdSelf):
11563 (JSC::JIT::patchPutByIdReplace):
11564 (JSC::JIT::privateCompilePatchGetArrayLength):
11565 (JSC::JIT::privateCompileGetByIdProto):
11566 (JSC::JIT::privateCompileGetByIdSelfList):
11567 (JSC::JIT::privateCompileGetByIdProtoList):
11568 (JSC::JIT::privateCompileGetByIdChainList):
11569 (JSC::JIT::privateCompileGetByIdChain):
11570 * jit/JITStubCall.h:
11571 (JSC::JITStubCall::addArgument): Add version of addArgument that takes
11572 two registers for the tag and payload.
11573 * jit/JITStubs.cpp:
11574 (JSC::JITStubs::JITStubs): Remove array length trampoline pointer.
11575 (JSC::JITStubs::cti_op_get_by_id_self_fail):
11577 * runtime/JSObject.h:
11578 (JSC::JSObject::JSObject): Move m_inheritorID below the property storage
11579 to align it to a 16 byte boundary.
11580 * wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS
11581 * wtf/StdLibExtras.h: Move FIELD_OFFSET here.
11583 2009-05-17 Sam Weinig <sam@webkit.org>
11585 Reviewed by Geoffrey Garen.
11587 Remove unneeded ExecState parameter from the number JSValue constructors.
11589 * runtime/JSValue.h:
11592 (JSC::JSValue::JSValue):
11594 2009-05-15 Sam Weinig <sam@webkit.org>
11596 Reviewed by Geoffrey Garen.
11598 Implemented fast path for op_put_by_val when putting to arrays.
11600 * jit/JITPropertyAccess.cpp:
11601 (JSC::JIT::emit_op_put_by_val):
11602 (JSC::JIT::emitSlow_op_put_by_val):
11604 2009-05-15 Geoffrey Garen <ggaren@apple.com> (Mostly by Sam)
11606 Reviewed by Sam Weinig.
11608 Implemented fast path for op_get_by_val when accessing array.
11611 * jit/JITPropertyAccess.cpp:
11612 (JSC::JIT::emit_op_get_by_val):
11613 (JSC::JIT::emitSlow_op_get_by_val):
11615 2009-05-14 Geoffrey Garen <ggaren@apple.com>
11617 Reviewed by Sam Weinig.
11619 Fixed a failure in fast/js/math-transforms.html caused by failing to
11620 preserve -0 in multiplication.
11622 * assembler/X86Assembler.h:
11623 (JSC::X86Assembler::jz):
11624 * jit/JITArithmetic.cpp:
11625 (JSC::JIT::emit_op_mul):
11626 (JSC::JIT::emitSlow_op_mul):
11627 (JSC::JIT::emitMul32Constant):
11628 (JSC::JIT::emitMul32InPlace): Check both for overflow and for zero when
11629 doing multiplication. Use a slow case to get these right.
11631 2009-05-14 Geoffrey Garen <ggaren@apple.com>
11633 Reviewed by Sam Weinig.
11635 Fixed a bug in the varargs calling convention.
11638 (JSC::JIT::compileOpCallVarargs): Move the argument count into regT1,
11639 since that's where ctiVirtualCall expects it to be.
11641 2009-05-14 Geoffrey Garen <ggaren@apple.com>
11643 Reviewed by Sam Weinig.
11645 Fixed a small bug in instanceof's looping code.
11647 * jit/JITOpcodes.cpp:
11648 (JSC::JIT::emit_op_instanceof): NULL means the object has no prototype,
11649 so only loop when *not* equal to NULL.
11651 2009-05-14 Geoffrey Garen <ggaren@apple.com>
11653 Reviewed by Sam Weinig.
11655 Fixed a small bug in instanceof's result writing code.
11657 * jit/JITOpcodes.cpp:
11658 (JSC::JIT::emit_op_instanceof): Make sure to fill out the payload bits
11661 2009-05-14 Sam Weinig <sam@webkit.org>
11663 Reviewed by Geoffrey Garen.
11665 Removed an invalid assertion in cti_op_urshift which
11666 depended on a fast path for op_urshift which has
11669 * jit/JITStubs.cpp:
11670 (JSC::JITStubs::cti_op_urshift):
11672 2009-05-14 Geoffrey Garen <ggaren@apple.com>
11674 Reviewed by Sam Weinig.
11676 Fixed loop_if_true, which had the same reversed test that jtrue had.
11678 * jit/JITOpcodes.cpp:
11679 (JSC::JIT::emit_op_loop_if_true):
11681 2009-05-14 Sam Weinig <sam@webkit.org>
11683 Reviewed by Geoffrey Garen.
11685 In op_neq, we apparently want to check that one value
11686 does *not* equal another. Go figure.
11688 * jit/JITOpcodes.cpp:
11689 (JSC::JIT::emit_op_neq):
11691 2009-05-14 Sam Weinig <sam@webkit.org>
11693 Reviewed by Geoffrey Garen.
11695 The slow case of op_mod should call op_mod's jit stub,
11696 not op_mul. That would be dumb.
11698 * jit/JITArithmetic.cpp:
11699 (JSC::JIT::emitSlow_op_mod):
11701 2009-05-14 Geoffrey Garen <ggaren@apple.com>
11703 Reviewed by Sam Weinig.
11705 Fixed problems when using 'arguments' due to a half-initialized register.
11707 * interpreter/CallFrame.h:
11708 (JSC::ExecState::setCalleeArguments):
11709 (JSC::ExecState::init): Require a full JSValue when setting up the
11710 'arguments' virtual register, since this register is accessible from JIT
11711 code and bytecode, and needs to be a true JSValue.
11713 * interpreter/CallFrameClosure.h:
11714 (JSC::CallFrameClosure::resetCallFrame): ditto
11716 * interpreter/Interpreter.cpp:
11717 (JSC::Interpreter::privateExecute): ditto
11719 * interpreter/Register.h: Removed the constructor that allowed assignment
11720 of a JSArguments* to a register. That is not safe. See above.
11722 * jit/JITStubs.cpp:
11723 (JSC::JITStubs::cti_op_create_arguments):
11724 (JSC::JITStubs::cti_op_create_arguments_no_params): ditto
11726 2009-05-14 Sam Weinig <sam@webkit.org>
11728 Reviewed by Geoffrey Garen.
11730 We really want to go to the slow case in op_jfalse and
11731 op_jtrue if the value is *not* boolean.
11733 * jit/JITOpcodes.cpp:
11734 (JSC::JIT::emit_op_jfalse):
11735 (JSC::JIT::emit_op_jtrue):
11737 2009-05-14 Sam Weinig <sam@webkit.org>
11739 Reviewed by Geoffrey Garen.
11741 Flipped the condition when emitting a an op_loop_if_less or op_loop_if_lesseq
11742 if the first operand is a constant.
11744 * jit/JITOpcodes.cpp:
11745 (JSC::JIT::emit_op_loop_if_less):
11746 (JSC::JIT::emit_op_loop_if_lesseq):
11748 2009-05-14 Sam Weinig <sam@webkit.org>
11750 Reviewed by Geoffrey Garen.
11752 Added missing return in op_jnless and op_jnlesseq.
11754 * jit/JITArithmetic.cpp:
11755 (JSC::JIT::emit_op_jnless):
11756 (JSC::JIT::emit_op_jnlesseq):
11758 2009-05-14 Sam Weinig <sam@webkit.org>
11760 Reviewed by Geoffrey Garen.
11762 Load constants into the the register file as a temporary measure to
11763 aid bring up. This allows us to use to treat constants like any
11764 other virtual register.
11766 * jit/JITOpcodes.cpp:
11767 (JSC::JIT::emit_op_enter):
11768 (JSC::JIT::emit_op_enter_with_activation):
11770 2009-05-14 Geoffrey Garen <ggaren@apple.com>
11772 Reviewed by Sam Weinig.
11774 Implemented op_strict_eq. Original patch by Snowy, by way of Sam and Gavin.
11776 * assembler/MacroAssemblerX86Common.h:
11777 (JSC::MacroAssemblerX86Common::set8): Added set8, since it's slightly
11778 faster than set32, and the new value representation usually doesn't
11783 * jit/JITInlineMethods.h:
11784 (JSC::JIT::emitLoadTag):
11785 (JSC::JIT::emitLoadPayload): Added helper functions for dealing with
11786 constants. Eventually, we should write special cases for all constants,
11787 but these are helpful in the short term.
11789 * jit/JITOpcodes.cpp:
11790 (JSC::JIT::compileOpStrictEq):
11791 (JSC::JIT::emitSlow_op_stricteq):
11792 (JSC::JIT::emitSlow_op_nstricteq): teh opcodez.
11794 * runtime/JSValue.h:
11796 (JSC::JSValue::isDouble): Added a LowestTag for clarity.
11798 2009-05-13 Geoffrey Garen <ggaren@apple.com>
11800 Reviewed by Sam Weinig.
11802 Fixed some bugs in host function calls.
11804 testapi now passes!
11806 * jit/JIT.cpp: Changed some registers around to avoid overwriting edx:eax,
11807 which is how JSValues are now returned. Also changed the code that
11808 passes thisValue to pass the full 64bits of the value. Also added
11809 an #error compiler directive to other platform builds, since the JSValue
11810 return signature probably won't return in edx:eax on those platforms,
11811 and we'll have to investigate a solution.
11813 2009-05-13 Geoffrey Garen <ggaren@apple.com>
11815 Reviewed by Sam Weinig.
11817 Removed parameters from functions that are intended never to use their
11820 * jit/JITPropertyAccess.cpp:
11821 (JSC::JIT::emitSlow_op_get_by_val):
11822 (JSC::JIT::emitSlow_op_put_by_val):
11824 2009-05-13 Geoffrey Garen <ggaren@apple.com>
11826 Reviewed by Sam Weinig.
11828 Ported op_instance_of from TOT. It's basically the same, but some register
11829 stuff changed to memory stuff.
11831 * jit/JITInlineMethods.h:
11832 (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
11833 (JSC::JIT::emitStore): Changed to use helper functions.
11835 * jit/JITOpcodes.cpp:
11836 (JSC::JIT::emit_op_instanceof):
11837 (JSC::JIT::emitSlow_op_instanceof): Ported from TOT.
11839 2009-05-13 Geoffrey Garen <ggaren@apple.com>
11841 Reviewed by Gavin Barraclough.
11843 Added a comment to explain an exception-handling subtelty that we found
11844 hard to remember when reviewing my last patch.
11846 * jit/JITOpcodes.cpp:
11847 (JSC::JIT::emit_op_catch):
11849 2009-05-13 Geoffrey Garen <ggaren@apple.com>
11851 Reviewed by Sam Weinig.
11853 Implemented try/catch.
11855 * jit/JITOpcodes.cpp:
11856 (JSC::JIT::emit_op_throw): Updated to use JITStackFrame abstraction.
11857 (JSC::JIT::emit_op_catch): Filled out.
11859 2009-05-13 Sam Weinig <sam@webkit.org>
11861 Reviewed by Geoffrey Garen.
11863 Implemented op_loop_if_true, op_jfalse, op_jtrue, op_jeq_null and op_jneq_null
11865 * jit/JITOpcodes.cpp:
11866 (JSC::JIT::emitSlow_op_instanceof): Moved from below to be next to its
11869 (JSC::JIT::emit_op_loop_if_true): Similar to the old version
11870 in that it tries to do the integer case first and reduce the
11871 number of jumps you might need to take.
11872 (JSC::JIT::emitSlow_op_loop_if_true):
11874 (JSC::JIT::emit_op_jfalse): Very similar to op_loop_if_true, only
11875 the inverse and without a timeout check.
11876 (JSC::JIT::emitSlow_op_jfalse):
11878 (JSC::JIT::emit_op_jtrue): Very similar to op_loop_if_true except
11879 without the timeout check.
11880 (JSC::JIT::emitSlow_op_jtrue):
11882 (JSC::JIT::emit_op_jeq_null): Very similar to the implementation
11883 of op_eq, except it takes jumps instead of copying the condition
11885 (JSC::JIT::emit_op_jneq_null): Ditto but for op_neq.
11887 2009-05-13 Geoffrey Garen <ggaren@apple.com>
11889 Reviewed by Sam Weinig.
11891 Implemented op_call_varargs.
11894 (JSC::JIT::compileOpCallVarargsSetupArgs):
11895 (JSC::JIT::compileOpCallVarargs):
11896 (JSC::JIT::emit_op_call):
11897 (JSC::JIT::emit_op_call_eval):
11898 (JSC::JIT::emit_op_load_varargs):
11899 (JSC::JIT::emit_op_call_varargs):
11900 (JSC::JIT::emit_op_construct):
11901 * jit/JITOpcodes.cpp:
11902 (JSC::JIT::emit_op_jneq_ptr):
11904 2009-05-13 Geoffrey Garen <ggaren@apple.com>
11906 Reviewed by Sam Weinig.
11908 Implemented op_call_eval.
11911 (JSC::JIT::compileOpCallVarargsSetupArgs):
11912 (JSC::JIT::compileOpCall):
11913 * jit/JITStubCall.h:
11914 (JSC::CallEvalJITStub::CallEvalJITStub):
11916 2009-05-13 Sam Weinig <sam@webkit.org>
11918 Reviewed by Gavin Barraclough.
11920 Implemented op_not. (Gavin did most of the work!)
11922 * jit/JITOpcodes.cpp:
11923 (JSC::JIT::emit_op_not):
11924 (JSC::JIT::emitSlow_op_not):
11926 2009-05-13 Geoffrey Garen <ggaren@apple.com>
11928 Reviewed by Sam Weinig.
11930 Implemented op_global_resolve.
11932 * jit/JITOpcodes.cpp:
11933 (JSC::JIT::emit_op_loop_if_less):
11934 (JSC::JIT::emit_op_loop_if_lesseq): Added back accidentally removed
11937 (JSC::JIT::emit_op_resolve_global):
11938 * jit/JITStubs.cpp:
11939 (JSC::JITStubs::cti_op_resolve_global): Pretty similar to the old code,
11940 but we need two reads and a TimesEight step in order to account for the
11944 (JSC::): Slightly tweaked this code to specialize for a JSGlobalObject*,
11945 to avoid having to pass an irrelevant tag pointer to the stub.
11947 2009-05-13 Sam Weinig <sam@webkit.org>
11949 Reviewed by Geoffrey Garen.
11951 Implemented op_to_jsnumber.
11953 * jit/JITOpcodes.cpp:
11954 (JSC::JIT::emit_op_to_jsnumber):
11955 (JSC::JIT::emitSlow_op_to_jsnumber):
11957 2009-05-13 Sam Weinig <sam@webkit.org>
11959 Reviewed by Geoffrey Garen.
11961 Implemented op_convert_this.
11963 * jit/JITOpcodes.cpp:
11964 (JSC::JIT::emit_op_convert_this):
11965 (JSC::JIT::emitSlow_op_convert_this):
11967 2009-05-13 Geoffrey Garen <ggaren@apple.com>
11969 Reviewed by Sam Weinig.
11971 Got basic JS function and constructor calls working.
11974 (JSC::JIT::privateCompileCTIMachineTrampolines):
11977 (JSC::JIT::compileOpCallSetupArgs):
11978 (JSC::JIT::compileOpCallVarargsSetupArgs):
11979 (JSC::JIT::compileOpConstructSetupArgs):
11980 (JSC::JIT::emit_op_ret):
11981 (JSC::JIT::emit_op_construct_verify):
11982 (JSC::JIT::emitSlow_op_construct_verify):
11983 (JSC::JIT::emitSlow_op_call):
11984 (JSC::JIT::emitSlow_op_call_eval):
11985 (JSC::JIT::emitSlow_op_call_varargs):
11986 (JSC::JIT::emitSlow_op_construct):
11987 (JSC::JIT::compileOpCall): Filled out these cases, with call_eval #if'd out.
11989 * jit/JITInlineMethods.h:
11990 (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
11991 (JSC::JIT::emitLoad): Restored some legacy "*CTIArg*" functions,
11992 since I wanted to avoid the complexity of revamping the API here while
11993 trying to bring it up. Eventually, we should re-remove all of these functions.
11995 (JSC::JIT::recordJumpTarget): Removed unnecessary macro cruft. You will
11996 not silence me, Sam Weinig! The world will know that you are a crufty,
11997 crufty, crufty programmer!!!
11999 * jit/JITOpcodes.cpp:
12000 * jit/JITStubs.cpp:
12002 * jit/JITStubs.h: Changed up some offsets in the JITStackFrame class, since
12003 and off-by-one error was causing stack misalignment.
12005 2009-05-13 Sam Weinig <sam@webkit.org>
12007 Reviewed by Geoffrey Garen.
12009 Implement op_eq_null and op_neq_null.
12011 * assembler/MacroAssemblerX86Common.h:
12012 (JSC::MacroAssemblerX86Common::set8):
12013 (JSC::MacroAssemblerX86Common::setTest8):
12014 * jit/JITOpcodes.cpp:
12015 (JSC::JIT::emit_op_stricteq):
12016 (JSC::JIT::emitSlow_op_stricteq):
12017 (JSC::JIT::emit_op_nstricteq):
12018 (JSC::JIT::emitSlow_op_nstricteq):
12019 (JSC::JIT::emit_op_eq_null):
12020 (JSC::JIT::emit_op_neq_null):
12023 2009-05-12 Sam Weinig <sam@webkit.org>
12025 Reviewed by Geoffrey Garen.
12027 Implement op_new_error.
12029 * jit/JITOpcodes.cpp:
12030 (JSC::JIT::emit_op_new_error):
12031 * jit/JITStubCall.h:
12032 (JSC::JITStubCall::addArgument): Add a version of addArgument
12033 that takes a constant JSValue.
12035 2009-05-12 Sam Weinig <sam@webkit.org>
12037 Reviewed by Geoffrey Garen.
12039 Remove now unused emitGetVariableObjectRegister and emitPutVariableObjectRegister.
12044 2009-05-12 Sam Weinig <sam@webkit.org>
12046 Reviewed by Geoffrey Garen.
12048 Implement op_to_primitive and op_next_pname.
12050 * jit/JITOpcodes.cpp:
12051 (JSC::JIT::emitSlow_op_construct_verify):
12052 (JSC::JIT::emit_op_to_primitive):
12053 (JSC::JIT::emitSlow_op_to_primitive):
12054 (JSC::JIT::emitSlow_op_loop_if_true):
12055 (JSC::JIT::emit_op_jtrue):
12056 (JSC::JIT::emit_op_next_pname):
12058 2009-05-12 Sam Weinig <sam@webkit.org>
12060 Reviewed by Geoffrey Garen.
12062 Add op_get_global_var, op_put_global_var, emit_op_get_scoped_var, emit_op_put_scoped_var and
12063 op_unexpected_load.
12066 * jit/JITInlineMethods.h:
12067 (JSC::JIT::tagFor):
12068 (JSC::JIT::payloadFor):
12069 (JSC::JIT::emitLoad):
12070 (JSC::JIT::emitStore):
12071 (JSC::JIT::emitLoadReturnValue):
12072 * jit/JITOpcodes.cpp:
12073 (JSC::JIT::emit_op_get_global_var):
12074 (JSC::JIT::emit_op_put_global_var):
12075 (JSC::JIT::emit_op_get_scoped_var):
12076 (JSC::JIT::emit_op_put_scoped_var):
12077 (JSC::JIT::emit_op_unexpected_load):
12079 2009-05-12 Geoffrey Garen <ggaren@apple.com>
12081 Reviewed by Sam Weinig.
12083 Added overflow handling to op_sub.
12086 * jit/JITArithmetic.cpp:
12087 (JSC::JIT::emitSlow_op_sub):
12088 (JSC::JIT::emitSlowSub32InPlaceLeft):
12090 2009-05-12 Sam Weinig <sam@webkit.org>
12092 Reviewed by Geoffrey Garen.
12094 Remove a function call by folding op_get_by_id and op_put_by_id into
12095 their respective compile functions.
12098 * jit/JITPropertyAccess.cpp:
12099 (JSC::JIT::emit_op_get_by_id):
12100 (JSC::JIT::emitSlow_op_get_by_id):
12101 (JSC::JIT::emit_op_put_by_id):
12102 (JSC::JIT::emitSlow_op_put_by_id):
12104 2009-05-12 Sam Weinig <sam@webkit.org>
12106 Reviewed by Geoffrey Garen.
12108 Make JITStubCall work in 64bit by making the stack index
12109 step dependent on the size of void*.
12111 * jit/JITStubCall.h:
12112 (JSC::JITStubCall::JITStubCall):
12113 (JSC::JITStubCall::addArgument):
12115 2009-05-12 Sam Weinig <sam@webkit.org>
12117 Reviewed by Geoffrey Garen.
12119 Implement simple version of property access opcodes
12120 which just call a stub functions.
12122 * jit/JITOpcodes.cpp:
12123 * jit/JITPropertyAccess.cpp:
12124 (JSC::JIT::emitSlow_op_put_by_id):
12125 (JSC::JIT::emitSlow_op_get_by_id):
12126 (JSC::JIT::emit_op_get_by_val):
12127 (JSC::JIT::emitSlow_op_get_by_val):
12128 (JSC::JIT::emit_op_put_by_val):
12129 (JSC::JIT::emitSlow_op_put_by_val):
12130 (JSC::JIT::emit_op_put_by_index):
12131 (JSC::JIT::emit_op_put_getter):
12132 (JSC::JIT::emit_op_put_setter):
12133 (JSC::JIT::emit_op_del_by_id):
12134 (JSC::JIT::compileGetByIdHotPath):
12135 (JSC::JIT::compilePutByIdHotPath):
12136 * jit/JITStubCall.h:
12137 (JSC::JITStubCall::addArgument):
12140 2009-05-12 Geoffrey Garen <ggaren@apple.com>
12142 Reviewed by Sam Weinig.
12144 Added work-around for XCode debugging echo problem.
12149 2009-05-12 Geoffrey Garen <ggaren@apple.com>
12151 Reviewed by Sam Weinig.
12153 Added overflow handling to op_add.
12156 * jit/JITArithmetic.cpp:
12157 (JSC::JIT::emitSlow_op_add):
12158 (JSC::JIT::emitSlowAdd32InPlace):
12160 2009-05-12 Sam Weinig <sam@webkit.org>
12162 Reviewed by Geoffrey Garen.
12164 Add slow cases for op_jnless or emit_op_jnlesseq.
12166 * jit/JITArithmetic.cpp:
12167 (JSC::JIT::emitSlow_op_jnless):
12168 (JSC::JIT::emitSlow_op_jnlesseq):
12170 2009-05-12 Sam Weinig <sam@webkit.org>
12172 Reviewed by Geoffrey Garen.
12174 Add implementations for op_jnless, emit_op_jnlesseq, op_loop_if_less and op_loop_if_lesseq.
12175 No slow cases for op_jnless or emit_op_jnlesseq yet.
12177 * jit/JITArithmetic.cpp:
12178 (JSC::JIT::emit_op_jnless):
12179 (JSC::JIT::emitSlow_op_jnless):
12180 (JSC::JIT::emit_op_jnlesseq):
12181 (JSC::JIT::emitSlow_op_jnlesseq):
12182 * jit/JITOpcodes.cpp:
12183 (JSC::JIT::emit_op_loop_if_less):
12184 (JSC::JIT::emitSlow_op_loop_if_less):
12185 (JSC::JIT::emit_op_loop_if_lesseq):
12186 (JSC::JIT::emitSlow_op_loop_if_lesseq):
12188 2009-05-12 Sam Weinig <sam@webkit.org>
12190 Reviewed by Geoffrey Garen.
12192 Turn the RECORD_JUMP_TARGET macro into an inline function.
12195 * jit/JITInlineMethods.h:
12196 (JSC::JIT::recordJumpTarget):
12197 * jit/JITOpcodes.cpp:
12198 (JSC::JIT::emit_op_jmp):
12199 (JSC::JIT::emit_op_jsr):
12200 (JSC::JIT::emit_op_jmp_scopes):
12202 2009-05-12 Sam Weinig <sam@webkit.org>
12204 Add MacroAssemblerX86Common::set8 to fix the build.
12206 * assembler/MacroAssemblerX86Common.h:
12207 (JSC::MacroAssemblerX86Common::set8):
12209 2009-05-12 Geoffrey Garen <ggaren@apple.com>
12211 Reviewed by Sam Weinig.
12213 Added overflow recovery for pre_inc and pre_dec.
12215 Turned some short-circuit code into early returns, as is the WebKit style.
12217 * jit/JITArithmetic.cpp:
12218 (JSC::JIT::emit_op_post_inc):
12219 (JSC::JIT::emitSlow_op_post_inc):
12220 (JSC::JIT::emit_op_post_dec):
12221 (JSC::JIT::emitSlow_op_post_dec):
12222 (JSC::JIT::emitSlow_op_pre_inc):
12223 (JSC::JIT::emitSlow_op_pre_dec):
12225 2009-05-12 Sam Weinig <sam@webkit.org>
12227 Reviewed by Geoffrey Garen.
12229 Implement op_jmp, op_loop, op_eq and op_neq.
12231 * jit/JITOpcodes.cpp:
12232 (JSC::JIT::emit_op_jmp):
12233 (JSC::JIT::emit_op_loop):
12234 (JSC::JIT::emit_op_eq):
12235 (JSC::JIT::emitSlow_op_eq):
12236 (JSC::JIT::emit_op_neq):
12237 (JSC::JIT::emitSlow_op_neq):
12238 (JSC::JIT::emit_op_enter):
12239 (JSC::JIT::emit_op_enter_with_activation):
12241 2009-05-12 Sam Weinig <sam@webkit.org>
12243 Reviewed by Geoffrey Garen.
12245 Implement the slow cases for arithmetic opcodes.
12247 * jit/JITArithmetic.cpp:
12248 (JSC::JIT::emitSlow_op_lshift):
12249 (JSC::JIT::emitSlow_op_rshift):
12250 (JSC::JIT::emitSlow_op_bitand):
12251 (JSC::JIT::emitSlow_op_bitor):
12252 (JSC::JIT::emitSlow_op_bitxor):
12253 (JSC::JIT::emitSlow_op_bitnot):
12254 (JSC::JIT::emitSlow_op_sub):
12255 (JSC::JIT::emitSlow_op_mul):
12256 (JSC::JIT::emitSlow_op_mod):
12257 (JSC::JIT::emit_op_mod):
12259 2009-05-12 Sam Weinig <sam@webkit.org>
12261 Reviewed by Geoffrey Garen.
12263 Implement op_bitnot.
12265 * assembler/MacroAssemblerX86Common.h:
12266 (JSC::MacroAssemblerX86Common::not32):
12267 * assembler/X86Assembler.h:
12268 (JSC::X86Assembler::notl_m):
12269 * jit/JITArithmetic.cpp:
12270 (JSC::JIT::emit_op_bitnot):
12272 2009-05-12 Sam Weinig <sam@webkit.org>
12274 Reviewed by Geoffrey Garen.
12276 Add arithmetic opcode implementations from the old nitro-extreme branch.
12279 * jit/JITArithmetic.cpp:
12280 (JSC::JIT::emit_op_jnless):
12281 (JSC::JIT::emitSlow_op_jnless):
12282 (JSC::JIT::emit_op_jnlesseq):
12283 (JSC::JIT::emitSlow_op_jnlesseq):
12284 (JSC::JIT::emit_op_lshift):
12285 (JSC::JIT::emitSlow_op_lshift):
12286 (JSC::JIT::emit_op_rshift):
12287 (JSC::JIT::emitSlow_op_rshift):
12288 (JSC::JIT::emit_op_bitand):
12289 (JSC::JIT::emitBitAnd32Constant):
12290 (JSC::JIT::emitBitAnd32InPlace):
12291 (JSC::JIT::emit_op_bitor):
12292 (JSC::JIT::emitSlow_op_bitor):
12293 (JSC::JIT::emitBitOr32Constant):
12294 (JSC::JIT::emitBitOr32InPlace):
12295 (JSC::JIT::emit_op_bitxor):
12296 (JSC::JIT::emitSlow_op_bitxor):
12297 (JSC::JIT::emitBitXor32Constant):
12298 (JSC::JIT::emitBitXor32InPlace):
12299 (JSC::JIT::emit_op_bitnot):
12300 (JSC::JIT::emitSlow_op_bitnot):
12301 (JSC::JIT::emit_op_post_inc):
12302 (JSC::JIT::emitSlow_op_post_inc):
12303 (JSC::JIT::emit_op_post_dec):
12304 (JSC::JIT::emitSlow_op_post_dec):
12305 (JSC::JIT::emit_op_pre_inc):
12306 (JSC::JIT::emitSlow_op_pre_inc):
12307 (JSC::JIT::emit_op_pre_dec):
12308 (JSC::JIT::emitSlow_op_pre_dec):
12309 (JSC::JIT::emit_op_add):
12310 (JSC::JIT::emitAdd32Constant):
12311 (JSC::JIT::emitAdd32InPlace):
12312 (JSC::JIT::emitSlow_op_add):
12313 (JSC::JIT::emit_op_sub):
12314 (JSC::JIT::emitSlow_op_sub):
12315 (JSC::JIT::emitSub32ConstantLeft):
12316 (JSC::JIT::emitSub32ConstantRight):
12317 (JSC::JIT::emitSub32InPlaceLeft):
12318 (JSC::JIT::emitSub32InPlaceRight):
12319 (JSC::JIT::emit_op_mul):
12320 (JSC::JIT::emitSlow_op_mul):
12321 (JSC::JIT::emitMul32Constant):
12322 (JSC::JIT::emitMul32InPlace):
12323 (JSC::JIT::emit_op_mod):
12324 (JSC::JIT::emitSlow_op_mod):
12325 * jit/JITOpcodes.cpp:
12327 2009-05-12 Geoffrey Garen <ggaren@apple.com>
12329 Removed JIT_OPTIMIZE_ARITHMETIC setting, since it was all about 32bit
12330 value representations.
12332 Added JSAPIValueWrapper to the repository.
12335 * jit/JITArithmetic.cpp:
12336 * runtime/JSAPIValueWrapper.cpp: Added.
12337 (JSC::JSAPIValueWrapper::toPrimitive):
12338 (JSC::JSAPIValueWrapper::getPrimitiveNumber):
12339 (JSC::JSAPIValueWrapper::toBoolean):
12340 (JSC::JSAPIValueWrapper::toNumber):
12341 (JSC::JSAPIValueWrapper::toString):
12342 (JSC::JSAPIValueWrapper::toObject):
12343 * runtime/JSAPIValueWrapper.h: Added.
12344 (JSC::JSAPIValueWrapper::value):
12345 (JSC::JSAPIValueWrapper::isAPIValueWrapper):
12346 (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
12347 (JSC::jsAPIValueWrapper):
12350 2009-05-12 Geoffrey Garen <ggaren@apple.com>
12352 Turned on the JIT and got it building and running the most trivial of
12355 All configurable optimizations are turned off, and a few opcodes are ad
12358 So far, I've only merged op_mov and op_end, but some stub-reliant
12359 opcodes work as-is from TOT.
12361 * bytecode/CodeBlock.cpp:
12362 (JSC::CodeBlock::~CodeBlock):
12363 * bytecode/CodeBlock.h:
12365 (JSC::JIT::compileOpStrictEq):
12367 * jit/JITArithmetic.cpp:
12368 (JSC::JIT::emit_op_lshift):
12369 (JSC::JIT::emitSlow_op_lshift):
12370 (JSC::JIT::emit_op_rshift):
12371 (JSC::JIT::emitSlow_op_rshift):
12372 (JSC::JIT::emit_op_jnless):
12373 (JSC::JIT::emitSlow_op_jnless):
12374 (JSC::JIT::emit_op_jnlesseq):
12375 (JSC::JIT::emitSlow_op_jnlesseq):
12376 (JSC::JIT::emit_op_bitand):
12377 (JSC::JIT::emitSlow_op_bitand):
12378 (JSC::JIT::emit_op_post_inc):
12379 (JSC::JIT::emitSlow_op_post_inc):
12380 (JSC::JIT::emit_op_post_dec):
12381 (JSC::JIT::emitSlow_op_post_dec):
12382 (JSC::JIT::emit_op_pre_inc):
12383 (JSC::JIT::emitSlow_op_pre_inc):
12384 (JSC::JIT::emit_op_pre_dec):
12385 (JSC::JIT::emitSlow_op_pre_dec):
12386 (JSC::JIT::emit_op_mod):
12387 (JSC::JIT::emitSlow_op_mod):
12388 (JSC::JIT::emit_op_add):
12389 (JSC::JIT::emit_op_mul):
12390 (JSC::JIT::emit_op_sub):
12391 (JSC::JIT::compileBinaryArithOpSlowCase):
12392 (JSC::JIT::emitSlow_op_add):
12393 (JSC::JIT::emitSlow_op_mul):
12395 (JSC::JIT::compileOpCallInitializeCallFrame):
12396 (JSC::JIT::compileOpConstructSetupArgs):
12397 (JSC::JIT::compileOpCallVarargs):
12398 (JSC::JIT::compileOpCall):
12399 (JSC::JIT::compileOpCallSlowCase):
12400 * jit/JITInlineMethods.h:
12401 (JSC::JIT::getConstantOperandImmediateInt):
12402 (JSC::JIT::isOperandConstantImmediateInt):
12403 (JSC::JIT::emitInitRegister):
12404 (JSC::JIT::addSlowCase):
12405 (JSC::JIT::addJump):
12406 (JSC::JIT::emitJumpSlowToHot):
12407 (JSC::JIT::tagFor):
12408 (JSC::JIT::payloadFor):
12409 (JSC::JIT::emitLoad):
12410 (JSC::JIT::emitLoadReturnValue):
12411 (JSC::JIT::emitStore):
12412 (JSC::JIT::emitStoreReturnValue):
12413 * jit/JITOpcodes.cpp:
12414 (JSC::JIT::emit_op_mov):
12415 (JSC::JIT::emit_op_end):
12416 (JSC::JIT::emit_op_jmp):
12417 (JSC::JIT::emit_op_loop):
12418 (JSC::JIT::emit_op_loop_if_less):
12419 (JSC::JIT::emit_op_loop_if_lesseq):
12420 (JSC::JIT::emit_op_instanceof):
12421 (JSC::JIT::emit_op_get_global_var):
12422 (JSC::JIT::emit_op_put_global_var):
12423 (JSC::JIT::emit_op_get_scoped_var):
12424 (JSC::JIT::emit_op_put_scoped_var):
12425 (JSC::JIT::emit_op_tear_off_activation):
12426 (JSC::JIT::emit_op_ret):
12427 (JSC::JIT::emit_op_construct_verify):
12428 (JSC::JIT::emit_op_to_primitive):
12429 (JSC::JIT::emit_op_loop_if_true):
12430 (JSC::JIT::emit_op_resolve_global):
12431 (JSC::JIT::emit_op_not):
12432 (JSC::JIT::emit_op_jfalse):
12433 (JSC::JIT::emit_op_jeq_null):
12434 (JSC::JIT::emit_op_jneq_null):
12435 (JSC::JIT::emit_op_jneq_ptr):
12436 (JSC::JIT::emit_op_unexpected_load):
12437 (JSC::JIT::emit_op_eq):
12438 (JSC::JIT::emit_op_bitnot):
12439 (JSC::JIT::emit_op_jtrue):
12440 (JSC::JIT::emit_op_neq):
12441 (JSC::JIT::emit_op_bitxor):
12442 (JSC::JIT::emit_op_bitor):
12443 (JSC::JIT::emit_op_throw):
12444 (JSC::JIT::emit_op_next_pname):
12445 (JSC::JIT::emit_op_push_scope):
12446 (JSC::JIT::emit_op_to_jsnumber):
12447 (JSC::JIT::emit_op_push_new_scope):
12448 (JSC::JIT::emit_op_catch):
12449 (JSC::JIT::emit_op_switch_imm):
12450 (JSC::JIT::emit_op_switch_char):
12451 (JSC::JIT::emit_op_switch_string):
12452 (JSC::JIT::emit_op_new_error):
12453 (JSC::JIT::emit_op_eq_null):
12454 (JSC::JIT::emit_op_neq_null):
12455 (JSC::JIT::emit_op_convert_this):
12456 (JSC::JIT::emit_op_profile_will_call):
12457 (JSC::JIT::emit_op_profile_did_call):
12458 (JSC::JIT::emitSlow_op_construct_verify):
12459 (JSC::JIT::emitSlow_op_get_by_val):
12460 (JSC::JIT::emitSlow_op_loop_if_less):
12461 (JSC::JIT::emitSlow_op_loop_if_lesseq):
12462 (JSC::JIT::emitSlow_op_put_by_val):
12463 (JSC::JIT::emitSlow_op_not):
12464 (JSC::JIT::emitSlow_op_instanceof):
12465 * jit/JITPropertyAccess.cpp:
12466 (JSC::JIT::emit_op_get_by_val):
12467 (JSC::JIT::emit_op_put_by_val):
12468 (JSC::JIT::emit_op_put_by_index):
12469 (JSC::JIT::emit_op_put_getter):
12470 (JSC::JIT::emit_op_put_setter):
12471 (JSC::JIT::emit_op_del_by_id):
12472 (JSC::JIT::compileGetByIdHotPath):
12473 (JSC::JIT::compilePutByIdHotPath):
12474 * jit/JITStubCall.h:
12475 (JSC::JITStubCall::JITStubCall):
12476 (JSC::JITStubCall::addArgument):
12477 (JSC::JITStubCall::call):
12478 (JSC::JITStubCall::):
12479 (JSC::CallEvalJITStub::CallEvalJITStub):
12480 * jit/JITStubs.cpp:
12482 (JSC::JITStubs::cti_op_add):
12483 (JSC::JITStubs::cti_op_pre_inc):
12484 (JSC::JITStubs::cti_op_mul):
12485 (JSC::JITStubs::cti_op_get_by_val):
12486 (JSC::JITStubs::cti_op_get_by_val_string):
12487 (JSC::JITStubs::cti_op_get_by_val_byte_array):
12488 (JSC::JITStubs::cti_op_sub):
12489 (JSC::JITStubs::cti_op_put_by_val):
12490 (JSC::JITStubs::cti_op_put_by_val_array):
12491 (JSC::JITStubs::cti_op_put_by_val_byte_array):
12492 (JSC::JITStubs::cti_op_negate):
12493 (JSC::JITStubs::cti_op_div):
12494 (JSC::JITStubs::cti_op_pre_dec):
12495 (JSC::JITStubs::cti_op_post_inc):
12496 (JSC::JITStubs::cti_op_eq):
12497 (JSC::JITStubs::cti_op_lshift):
12498 (JSC::JITStubs::cti_op_bitand):
12499 (JSC::JITStubs::cti_op_rshift):
12500 (JSC::JITStubs::cti_op_bitnot):
12501 (JSC::JITStubs::cti_op_mod):
12502 (JSC::JITStubs::cti_op_neq):
12503 (JSC::JITStubs::cti_op_post_dec):
12504 (JSC::JITStubs::cti_op_urshift):
12505 (JSC::JITStubs::cti_op_bitxor):
12506 (JSC::JITStubs::cti_op_bitor):
12507 (JSC::JITStubs::cti_op_switch_imm):
12509 * runtime/JSArray.cpp:
12510 (JSC::JSArray::JSArray):
12511 * runtime/JSFunction.cpp:
12512 (JSC::JSFunction::~JSFunction):
12513 * runtime/JSValue.h:
12514 (JSC::JSValue::payload):
12517 2009-05-07 Sam Weinig <sam@webkit.org>
12519 Reviewed by Geoffrey Garen.
12521 Add some new MacroAssembler and assembler functions that will be needed shortly.
12523 * assembler/MacroAssemblerX86Common.h:
12524 (JSC::MacroAssemblerX86Common::add32):
12525 (JSC::MacroAssemblerX86Common::and32):
12526 (JSC::MacroAssemblerX86Common::mul32):
12527 (JSC::MacroAssemblerX86Common::neg32):
12528 (JSC::MacroAssemblerX86Common::or32):
12529 (JSC::MacroAssemblerX86Common::sub32):
12530 (JSC::MacroAssemblerX86Common::xor32):
12531 (JSC::MacroAssemblerX86Common::branchAdd32):
12532 (JSC::MacroAssemblerX86Common::branchMul32):
12533 (JSC::MacroAssemblerX86Common::branchSub32):
12534 * assembler/X86Assembler.h:
12535 (JSC::X86Assembler::):
12536 (JSC::X86Assembler::addl_rm):
12537 (JSC::X86Assembler::andl_mr):
12538 (JSC::X86Assembler::andl_rm):
12539 (JSC::X86Assembler::andl_im):
12540 (JSC::X86Assembler::negl_r):
12541 (JSC::X86Assembler::notl_r):
12542 (JSC::X86Assembler::orl_rm):
12543 (JSC::X86Assembler::orl_im):
12544 (JSC::X86Assembler::subl_rm):
12545 (JSC::X86Assembler::xorl_mr):
12546 (JSC::X86Assembler::xorl_rm):
12547 (JSC::X86Assembler::xorl_im):
12548 (JSC::X86Assembler::imull_mr):
12550 2009-05-11 Sam Weinig <sam@webkit.org>
12552 Reviewed by Cameron Zwarich.
12554 Remove the NumberHeap.
12556 * JavaScriptCore.exp:
12557 * runtime/Collector.cpp:
12559 (JSC::Heap::destroy):
12560 (JSC::Heap::recordExtraCost):
12561 (JSC::Heap::heapAllocate):
12562 (JSC::Heap::markConservatively):
12563 (JSC::Heap::sweep):
12564 (JSC::Heap::collect):
12565 (JSC::Heap::objectCount):
12566 (JSC::Heap::statistics):
12568 (JSC::Heap::isBusy):
12569 * runtime/Collector.h:
12570 (JSC::Heap::globalData):
12571 * runtime/JSCell.h:
12573 2009-05-11 Geoffrey Garen <ggaren@apple.com>
12575 Reviewed by Sam Weinig.
12577 Land initial commit of new number representation for 32 bit platforms,
12583 * API/JSCallbackObjectFunctions.h:
12584 (JSC::::hasInstance):
12587 * API/tests/testapi.c:
12588 (EvilExceptionObject_convertToType):
12589 * AllInOneFile.cpp:
12590 * JavaScriptCore.exp:
12591 * JavaScriptCore.xcodeproj/project.pbxproj:
12592 * bytecode/CodeBlock.cpp:
12593 (JSC::valueToSourceString):
12594 * bytecompiler/BytecodeGenerator.cpp:
12595 (JSC::BytecodeGenerator::emitLoad):
12596 (JSC::BytecodeGenerator::emitUnexpectedLoad):
12597 (JSC::keyForImmediateSwitch):
12598 * bytecompiler/BytecodeGenerator.h:
12599 * interpreter/Interpreter.cpp:
12600 (JSC::Interpreter::dumpRegisters):
12601 (JSC::Interpreter::privateExecute):
12602 * parser/Nodes.cpp:
12603 (JSC::ArrayNode::emitBytecode):
12604 (JSC::processClauseList):
12605 * runtime/ArgList.h:
12606 * runtime/Collector.h:
12608 * runtime/DateMath.cpp:
12609 * runtime/ExceptionHelpers.h:
12610 * runtime/InitializeThreading.cpp:
12611 * runtime/JSArray.cpp:
12612 (JSC::JSArray::JSArray):
12613 * runtime/JSCell.cpp:
12614 * runtime/JSCell.h:
12615 (JSC::JSCell::isAPIValueWrapper):
12616 (JSC::JSValue::isString):
12617 (JSC::JSValue::isGetterSetter):
12618 (JSC::JSValue::isObject):
12619 (JSC::JSValue::getString):
12620 (JSC::JSValue::getObject):
12621 (JSC::JSValue::getCallData):
12622 (JSC::JSValue::getConstructData):
12623 (JSC::JSValue::getUInt32):
12624 (JSC::JSValue::marked):
12625 (JSC::JSValue::toPrimitive):
12626 (JSC::JSValue::getPrimitiveNumber):
12627 (JSC::JSValue::toBoolean):
12628 (JSC::JSValue::toNumber):
12629 (JSC::JSValue::toString):
12630 (JSC::JSValue::needsThisConversion):
12631 (JSC::JSValue::toThisString):
12632 (JSC::JSValue::getJSNumber):
12633 (JSC::JSValue::toObject):
12634 (JSC::JSValue::toThisObject):
12635 * runtime/JSGlobalData.cpp:
12636 (JSC::JSGlobalData::JSGlobalData):
12637 * runtime/JSGlobalData.h:
12638 * runtime/JSGlobalObject.h:
12639 (JSC::Structure::prototypeForLookup):
12640 * runtime/JSGlobalObjectFunctions.cpp:
12641 (JSC::globalFuncParseInt):
12642 * runtime/JSImmediate.h:
12643 * runtime/JSNumberCell.cpp: Removed.
12644 * runtime/JSNumberCell.h: Removed.
12645 * runtime/JSObject.h:
12646 (JSC::JSValue::get):
12647 (JSC::JSValue::put):
12648 * runtime/JSString.h:
12649 (JSC::JSValue::toThisJSString):
12650 * runtime/JSValue.cpp:
12651 (JSC::JSValue::toInteger):
12652 (JSC::JSValue::toIntegerPreserveNaN):
12653 (JSC::JSValue::toObjectSlowCase):
12654 (JSC::JSValue::toThisObjectSlowCase):
12655 (JSC::JSValue::synthesizeObject):
12656 (JSC::JSValue::synthesizePrototype):
12657 (JSC::JSValue::description):
12658 (JSC::nonInlineNaN):
12659 * runtime/JSValue.h:
12661 (JSC::EncodedJSValueHashTraits::emptyValue):
12667 (JSC::JSValue::encode):
12668 (JSC::JSValue::decode):
12669 (JSC::JSValue::JSValue):
12670 (JSC::JSValue::operator bool):
12671 (JSC::JSValue::operator==):
12672 (JSC::JSValue::operator!=):
12673 (JSC::JSValue::isUndefined):
12674 (JSC::JSValue::isNull):
12675 (JSC::JSValue::isUndefinedOrNull):
12676 (JSC::JSValue::isCell):
12677 (JSC::JSValue::isInt32):
12678 (JSC::JSValue::isUInt32):
12679 (JSC::JSValue::isDouble):
12680 (JSC::JSValue::isTrue):
12681 (JSC::JSValue::isFalse):
12682 (JSC::JSValue::tag):
12683 (JSC::JSValue::asInt32):
12684 (JSC::JSValue::asUInt32):
12685 (JSC::JSValue::asDouble):
12686 (JSC::JSValue::asCell):
12687 (JSC::JSValue::isNumber):
12688 (JSC::JSValue::isBoolean):
12689 (JSC::JSValue::getBoolean):
12690 (JSC::JSValue::uncheckedGetNumber):
12691 (JSC::JSValue::toJSNumber):
12692 (JSC::JSValue::getNumber):
12693 (JSC::JSValue::toInt32):
12694 (JSC::JSValue::toUInt32):
12695 * runtime/Operations.h:
12696 (JSC::JSValue::equal):
12697 (JSC::JSValue::equalSlowCaseInline):
12698 (JSC::JSValue::strictEqual):
12699 (JSC::JSValue::strictEqualSlowCaseInline):
12703 * runtime/PropertySlot.h:
12704 * runtime/StringPrototype.cpp:
12705 (JSC::stringProtoFuncCharAt):
12706 (JSC::stringProtoFuncCharCodeAt):
12707 (JSC::stringProtoFuncIndexOf):
12710 === Start merge of nitro-extreme branch 2009-07-30 ===
12712 2009-07-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
12714 Reviewed by George Staikos.
12716 Resolve class/struct mixup in forward declarations
12717 https://bugs.webkit.org/show_bug.cgi?id=27708
12719 * API/JSClassRef.h:
12720 * bytecode/SamplingTool.h:
12721 * interpreter/Interpreter.h:
12723 * profiler/ProfileGenerator.h:
12724 * profiler/Profiler.h:
12725 * runtime/ClassInfo.h:
12726 * runtime/ExceptionHelpers.h:
12727 * runtime/JSByteArray.h:
12728 * runtime/JSCell.h:
12729 * runtime/JSFunction.h:
12730 * runtime/JSGlobalData.h:
12731 * runtime/JSObject.h:
12732 * runtime/JSString.h:
12734 2009-07-28 Ada Chan <adachan@apple.com>
12736 Reviewed by Darin Adler.
12738 https://bugs.webkit.org/show_bug.cgi?id=27236
12739 - Implement TCMalloc_SystemRelease and TCMalloc_SystemCommit for Windows.
12740 - Use a background thread to periodically scavenge memory to release back to the system.
12742 * wtf/FastMalloc.cpp:
12743 (WTF::TCMalloc_PageHeap::init):
12744 (WTF::TCMalloc_PageHeap::runScavengerThread):
12745 (WTF::TCMalloc_PageHeap::scavenge):
12746 (WTF::TCMalloc_PageHeap::shouldContinueScavenging):
12747 (WTF::TCMalloc_PageHeap::New):
12748 (WTF::TCMalloc_PageHeap::AllocLarge):
12749 (WTF::TCMalloc_PageHeap::Delete):
12750 (WTF::TCMalloc_PageHeap::GrowHeap):
12752 (WTF::TCMalloc_PageHeap::scavengerThread):
12753 * wtf/TCSystemAlloc.cpp:
12754 (TCMalloc_SystemRelease):
12755 (TCMalloc_SystemCommit):
12756 * wtf/TCSystemAlloc.h:
12758 2009-07-28 Xan Lopez <xlopez@igalia.com>
12760 Add new files, fixes distcheck.
12764 2009-07-28 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
12766 Reviewed by Simon Hausmann.
12768 [Qt] Determining whether to use JIT or interpreter
12769 moved from JavaScriptCore.pri to Platform.h
12771 * JavaScriptCore.pri:
12774 2009-07-27 Brian Weinstein <bweinstein@apple.com>
12776 Fix of misuse of sort command.
12778 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
12779 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
12781 2009-07-27 Brian Weinstein <bweinstein@apple.com>
12783 Build fix for Windows.
12785 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
12786 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
12788 2009-07-27 Gavin Barraclough <barraclough@apple.com>
12790 Rubber stamped by Oliver Hunt.
12792 Fix tyop in JIT, renamed preverveReturnAddressAfterCall -> preserveReturnAddressAfterCall.
12795 (JSC::JIT::privateCompile):
12796 (JSC::JIT::privateCompileCTIMachineTrampolines):
12798 * jit/JITInlineMethods.h:
12799 (JSC::JIT::preserveReturnAddressAfterCall):
12800 * jit/JITPropertyAccess.cpp:
12801 (JSC::JIT::privateCompilePutByIdTransition):
12803 2009-07-27 Alexey Proskuryakov <ap@webkit.org>
12807 * runtime/JSLock.cpp: (JSC::JSLock::JSLock): Fix "no threading" case.
12809 2009-07-27 Alexey Proskuryakov <ap@webkit.org>
12813 * runtime/JSLock.h: (JSC::JSLock::~JSLock):
12815 2009-07-27 Alexey Proskuryakov <ap@webkit.org>
12817 Reviewed by Darin Adler.
12819 https://bugs.webkit.org/show_bug.cgi?id=27735
12820 Give a helpful name to JSLock constructor argument
12823 (JSGarbageCollect):
12824 * API/JSContextRef.cpp:
12825 * API/JSObjectRef.cpp:
12826 (JSPropertyNameArrayRelease):
12827 (JSPropertyNameAccumulatorAddName):
12828 * JavaScriptCore.exp:
12831 (cleanupGlobalData):
12833 * runtime/Collector.cpp:
12834 (JSC::Heap::destroy):
12835 * runtime/JSLock.cpp:
12836 (JSC::JSLock::JSLock):
12837 (JSC::JSLock::lock):
12838 (JSC::JSLock::unlock):
12839 (JSC::JSLock::DropAllLocks::DropAllLocks):
12840 (JSC::JSLock::DropAllLocks::~DropAllLocks):
12841 * runtime/JSLock.h:
12843 (JSC::JSLock::JSLock):
12844 (JSC::JSLock::~JSLock):
12846 2009-07-25 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
12848 Reviewed by Eric Seidel.
12850 Allow custom memory allocation control for OpaqueJSPropertyNameArray struct
12851 https://bugs.webkit.org/show_bug.cgi?id=27342
12853 Inherits OpaqueJSPropertyNameArray struct from FastAllocBase because it has been
12854 instantiated by 'new' JavaScriptCore/API/JSObjectRef.cpp:473.
12856 * API/JSObjectRef.cpp:
12858 2009-07-24 Ada Chan <adachan@apple.com>
12860 In preparation for https://bugs.webkit.org/show_bug.cgi?id=27236:
12861 Remove TCMALLOC_TRACK_DECOMMITED_SPANS. We'll always track decommitted spans.
12862 We have tested this and show it has little impact on performance.
12864 Reviewed by Mark Rowe.
12866 * wtf/FastMalloc.cpp:
12867 (WTF::TCMalloc_PageHeap::New):
12868 (WTF::TCMalloc_PageHeap::AllocLarge):
12869 (WTF::propagateDecommittedState):
12870 (WTF::mergeDecommittedStates):
12871 (WTF::TCMalloc_PageHeap::Delete):
12872 (WTF::TCMalloc_PageHeap::IncrementalScavenge):
12874 2009-07-24 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
12876 Reviewed by Darin Adler and Adam Barth.
12878 Build fix for x86 platforms.
12879 https://bugs.webkit.org/show_bug.cgi?id=27602
12883 2009-07-23 Kevin Ollivier <kevino@theolliviers.com>
12885 wx build fix, adding missing header.
12889 2009-07-22 Yong Li <yong.li@torchmobile.com>
12891 Reviewed by George Staikos.
12893 Add wince specific memory files into wtf/wince
12894 https://bugs.webkit.org/show_bug.cgi?id=27550
12896 * wtf/wince/FastMallocWince.h: Added.
12897 * wtf/wince/MemoryManager.cpp: Added.
12898 * wtf/wince/MemoryManager.h: Added.
12900 2009-07-23 Norbert Leser <norbert.leser@nokia.com>
12902 Reviewed by Simon Hausmann.
12904 Fix for missing mmap features in Symbian
12905 https://bugs.webkit.org/show_bug.cgi?id=24540
12907 Fix, conditionally for PLATFORM(SYMBIAN), as an alternative
12908 to missing support for the MAP_ANON property flag in mmap.
12909 It utilizes Symbian specific memory allocation features.
12911 * runtime/Collector.cpp
12913 2009-07-22 Gavin Barraclough <barraclough@apple.com>
12915 Reviewed by Sam Weinig.
12917 With ENABLE(ASSEMBLER_WX_EXCLUSIVE), only change permissions once per repatch event.
12918 ( https://bugs.webkit.org/show_bug.cgi?id=27564 )
12920 Currently we change permissions forwards and backwards for each instruction modified,
12921 instead we should only change permissions once per complete repatching event.
12923 2.5% progression running with ENABLE(ASSEMBLER_WX_EXCLUSIVE) enabled,
12924 which recoups 1/3 of the penalty of running with this mode enabled.
12926 * assembler/ARMAssembler.cpp:
12927 (JSC::ARMAssembler::linkBranch):
12928 - Replace usage of MakeWritable with cacheFlush.
12930 * assembler/ARMAssembler.h:
12931 (JSC::ARMAssembler::patchPointerInternal):
12932 (JSC::ARMAssembler::repatchLoadPtrToLEA):
12933 - Replace usage of MakeWritable with cacheFlush.
12935 * assembler/ARMv7Assembler.h:
12936 (JSC::ARMv7Assembler::relinkJump):
12937 (JSC::ARMv7Assembler::relinkCall):
12938 (JSC::ARMv7Assembler::repatchInt32):
12939 (JSC::ARMv7Assembler::repatchPointer):
12940 (JSC::ARMv7Assembler::repatchLoadPtrToLEA):
12941 (JSC::ARMv7Assembler::setInt32):
12942 - Replace usage of MakeWritable with cacheFlush.
12944 * assembler/LinkBuffer.h:
12945 (JSC::LinkBuffer::performFinalization):
12946 - Make explicit call to cacheFlush.
12948 * assembler/MacroAssemblerCodeRef.h:
12949 (JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef):
12950 - Make size always available.
12952 * assembler/RepatchBuffer.h:
12953 (JSC::RepatchBuffer::RepatchBuffer):
12954 (JSC::RepatchBuffer::~RepatchBuffer):
12955 - Add calls to MakeWritable & makeExecutable.
12957 * assembler/X86Assembler.h:
12958 (JSC::X86Assembler::relinkJump):
12959 (JSC::X86Assembler::relinkCall):
12960 (JSC::X86Assembler::repatchInt32):
12961 (JSC::X86Assembler::repatchPointer):
12962 (JSC::X86Assembler::repatchLoadPtrToLEA):
12963 - Remove usage of MakeWritable.
12965 * bytecode/CodeBlock.h:
12966 (JSC::CodeBlock::getJITCode):
12967 - Provide access to CodeBlock's JITCode.
12969 * jit/ExecutableAllocator.h:
12970 (JSC::ExecutableAllocator::makeExecutable):
12971 (JSC::ExecutableAllocator::cacheFlush):
12972 - Remove MakeWritable, make cacheFlush public.
12975 (JSC::ctiPatchNearCallByReturnAddress):
12976 (JSC::ctiPatchCallByReturnAddress):
12977 (JSC::JIT::privateCompile):
12978 (JSC::JIT::unlinkCall):
12979 (JSC::JIT::linkCall):
12980 - Add CodeBlock argument to RepatchBuffer.
12983 - Pass CodeBlock argument for use by RepatchBuffer.
12986 (JSC::JITCode::start):
12987 (JSC::JITCode::size):
12988 - Provide access to code start & size.
12990 * jit/JITPropertyAccess.cpp:
12991 (JSC::JIT::privateCompilePutByIdTransition):
12992 (JSC::JIT::patchGetByIdSelf):
12993 (JSC::JIT::patchMethodCallProto):
12994 (JSC::JIT::patchPutByIdReplace):
12995 (JSC::JIT::privateCompilePatchGetArrayLength):
12996 (JSC::JIT::privateCompileGetByIdProto):
12997 (JSC::JIT::privateCompileGetByIdSelfList):
12998 (JSC::JIT::privateCompileGetByIdProtoList):
12999 (JSC::JIT::privateCompileGetByIdChainList):
13000 (JSC::JIT::privateCompileGetByIdChain):
13001 - Add CodeBlock argument to RepatchBuffer.
13003 * jit/JITStubs.cpp:
13004 (JSC::JITThunks::tryCachePutByID):
13005 (JSC::JITThunks::tryCacheGetByID):
13006 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
13007 - Pass CodeBlock argument for use by RepatchBuffer.
13009 2009-07-21 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
13011 Reviewed by Gavin Barraclough.
13013 Cache not only the structure of the method, but the
13014 structure of its prototype as well.
13015 https://bugs.webkit.org/show_bug.cgi?id=27077
13017 * bytecode/CodeBlock.cpp:
13018 (JSC::CodeBlock::~CodeBlock):
13019 * bytecode/CodeBlock.h:
13020 (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
13021 * jit/JITPropertyAccess.cpp:
13022 (JSC::JIT::patchMethodCallProto):
13024 2009-07-21 Gavin Barraclough <barraclough@apple.com>
13026 Reviewed by Sam Weinig.
13028 Move call linking / repatching down from AbstractMacroAssembler into MacroAssemblerARCH classes.
13029 ( https://bugs.webkit.org/show_bug.cgi?id=27527 )
13031 This allows the implementation to be defined per architecture. Specifically this addresses the
13032 fact that x86-64 MacroAssembler implements far calls as a load to register, followed by a call
13033 to register. Patching the call actually requires the pointer load to be patched, rather than
13034 the call to be patched. This is implementation detail specific to MacroAssemblerX86_64, and as
13035 such is best handled there.
13037 * assembler/AbstractMacroAssembler.h:
13038 * assembler/MacroAssemblerARM.h:
13039 (JSC::MacroAssemblerARM::linkCall):
13040 (JSC::MacroAssemblerARM::repatchCall):
13041 * assembler/MacroAssemblerARMv7.h:
13042 (JSC::MacroAssemblerARMv7::linkCall):
13043 (JSC::MacroAssemblerARMv7::repatchCall):
13044 * assembler/MacroAssemblerX86.h:
13045 (JSC::MacroAssemblerX86::linkCall):
13046 (JSC::MacroAssemblerX86::repatchCall):
13047 * assembler/MacroAssemblerX86_64.h:
13048 (JSC::MacroAssemblerX86_64::linkCall):
13049 (JSC::MacroAssemblerX86_64::repatchCall):
13051 2009-07-21 Adam Treat <adam.treat@torchmobile.com>
13053 Reviewed by George Staikos.
13055 Every wtf file includes other wtf files with <> style includes
13056 except this one. Fix the exception.
13060 2009-07-21 Gavin Barraclough <barraclough@apple.com>
13062 Reviewed by Oliver Hunt.
13064 Move LinkBuffer/RepatchBuffer out of AbstractMacroAssembler.
13065 ( https://bugs.webkit.org/show_bug.cgi?id=27485 )
13067 This change is the first step in a process to move code that should be in
13068 the architecture-specific MacroAssembler classes up out of Assmbler and
13069 AbstractMacroAssembler.
13071 * JavaScriptCore.xcodeproj/project.pbxproj:
13074 * assembler/ARMAssembler.h:
13075 (JSC::ARMAssembler::linkPointer):
13076 - rename patchPointer to bring it in line with the current link/repatch naming scheme
13078 * assembler/ARMv7Assembler.h:
13079 (JSC::ARMv7Assembler::linkCall):
13080 (JSC::ARMv7Assembler::linkPointer):
13081 (JSC::ARMv7Assembler::relinkCall):
13082 (JSC::ARMv7Assembler::repatchInt32):
13083 (JSC::ARMv7Assembler::repatchPointer):
13084 (JSC::ARMv7Assembler::setInt32):
13085 (JSC::ARMv7Assembler::setPointer):
13086 - rename patchPointer to bring it in line with the current link/repatch naming scheme
13088 * assembler/AbstractMacroAssembler.h:
13089 (JSC::AbstractMacroAssembler::linkJump):
13090 (JSC::AbstractMacroAssembler::linkCall):
13091 (JSC::AbstractMacroAssembler::linkPointer):
13092 (JSC::AbstractMacroAssembler::getLinkerAddress):
13093 (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset):
13094 (JSC::AbstractMacroAssembler::repatchJump):
13095 (JSC::AbstractMacroAssembler::repatchCall):
13096 (JSC::AbstractMacroAssembler::repatchNearCall):
13097 (JSC::AbstractMacroAssembler::repatchInt32):
13098 (JSC::AbstractMacroAssembler::repatchPointer):
13099 (JSC::AbstractMacroAssembler::repatchLoadPtrToLEA):
13100 - remove the LinkBuffer/RepatchBuffer classes, but leave a set of (private, friended) methods to interface to the Assembler
13102 * assembler/LinkBuffer.h: Added.
13103 (JSC::LinkBuffer::LinkBuffer):
13104 (JSC::LinkBuffer::~LinkBuffer):
13105 (JSC::LinkBuffer::link):
13106 (JSC::LinkBuffer::patch):
13107 (JSC::LinkBuffer::locationOf):
13108 (JSC::LinkBuffer::locationOfNearCall):
13109 (JSC::LinkBuffer::returnAddressOffset):
13110 (JSC::LinkBuffer::finalizeCode):
13111 (JSC::LinkBuffer::finalizeCodeAddendum):
13112 (JSC::LinkBuffer::code):
13113 (JSC::LinkBuffer::performFinalization):
13114 - new file containing the LinkBuffer class, previously a member of AbstractMacroAssembler
13116 * assembler/RepatchBuffer.h: Added.
13117 (JSC::RepatchBuffer::RepatchBuffer):
13118 (JSC::RepatchBuffer::relink):
13119 (JSC::RepatchBuffer::repatch):
13120 (JSC::RepatchBuffer::repatchLoadPtrToLEA):
13121 (JSC::RepatchBuffer::relinkCallerToTrampoline):
13122 (JSC::RepatchBuffer::relinkCallerToFunction):
13123 (JSC::RepatchBuffer::relinkNearCallerToTrampoline):
13124 - new file containing the RepatchBuffer class, previously a member of AbstractMacroAssembler
13126 * assembler/X86Assembler.h:
13127 (JSC::X86Assembler::linkJump):
13128 (JSC::X86Assembler::linkCall):
13129 (JSC::X86Assembler::linkPointerForCall):
13130 (JSC::X86Assembler::linkPointer):
13131 (JSC::X86Assembler::relinkJump):
13132 (JSC::X86Assembler::relinkCall):
13133 (JSC::X86Assembler::repatchInt32):
13134 (JSC::X86Assembler::repatchPointer):
13135 (JSC::X86Assembler::setPointer):
13136 (JSC::X86Assembler::setInt32):
13137 (JSC::X86Assembler::setRel32):
13138 - rename patchPointer to bring it in line with the current link/repatch naming scheme
13141 (JSC::ctiPatchNearCallByReturnAddress):
13142 (JSC::ctiPatchCallByReturnAddress):
13143 - include new headers
13144 - remove MacroAssembler:: specification from RepatchBuffer usage
13146 * jit/JITPropertyAccess.cpp:
13147 * yarr/RegexJIT.cpp:
13148 - include new headers
13150 2009-07-21 Robert Agoston <Agoston.Robert@stud.u-szeged.hu>
13152 Reviewed by David Levin.
13155 https://bugs.webkit.org/show_bug.cgi?id=27506
13157 * bytecode/Opcode.h:
13159 2009-07-21 Adam Roben <aroben@apple.com>
13161 Roll out r46153, r46154, and r46155
13163 These changes were causing build failures and assertion failures on
13166 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
13167 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
13168 * JavaScriptCore.xcodeproj/project.pbxproj:
13169 * runtime/JSArray.cpp:
13170 * runtime/StringPrototype.cpp:
13171 * runtime/UString.cpp:
13172 * runtime/UString.h:
13173 * wtf/FastMalloc.cpp:
13174 * wtf/FastMalloc.h:
13176 * wtf/PossiblyNull.h: Removed.
13178 2009-07-21 Roland Steiner <rolandsteiner@google.com>
13180 Reviewed by David Levin.
13182 Add ENABLE_RUBY to list of build options
13183 https://bugs.webkit.org/show_bug.cgi?id=27324
13185 * Configurations/FeatureDefines.xcconfig: Added flag ENABLE_RUBY.
13187 2009-07-20 Oliver Hunt <oliver@apple.com>
13189 Build fix attempt #2
13191 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
13192 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
13194 2009-07-20 Oliver Hunt <oliver@apple.com>
13196 Build fix attempt #1
13198 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
13199 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
13201 2009-07-20 Oliver Hunt <oliver@apple.com>
13203 Reviewed by Gavin Barraclough.
13205 Make it harder to misuse try* allocation routines
13206 https://bugs.webkit.org/show_bug.cgi?id=27469
13208 Jump through a few hoops to make it much harder to accidentally
13209 miss null-checking of values returned by the try-* allocation
13212 * JavaScriptCore.xcodeproj/project.pbxproj:
13213 * runtime/JSArray.cpp:
13214 (JSC::JSArray::putSlowCase):
13215 (JSC::JSArray::increaseVectorLength):
13216 * runtime/StringPrototype.cpp:
13217 (JSC::stringProtoFuncFontsize):
13218 (JSC::stringProtoFuncLink):
13219 * runtime/UString.cpp:
13221 (JSC::reallocChars):
13222 (JSC::expandCapacity):
13223 (JSC::UString::Rep::reserveCapacity):
13224 (JSC::UString::expandPreCapacity):
13226 (JSC::concatenate):
13227 (JSC::UString::spliceSubstringsWithSeparators):
13228 (JSC::UString::replaceRange):
13229 (JSC::UString::append):
13230 (JSC::UString::operator=):
13231 * runtime/UString.h:
13232 (JSC::UString::Rep::createEmptyBuffer):
13233 * wtf/FastMalloc.cpp:
13234 (WTF::tryFastZeroedMalloc):
13235 (WTF::tryFastMalloc):
13236 (WTF::tryFastCalloc):
13237 (WTF::tryFastRealloc):
13238 (WTF::TCMallocStats::tryFastMalloc):
13239 (WTF::TCMallocStats::tryFastCalloc):
13240 (WTF::TCMallocStats::tryFastRealloc):
13241 * wtf/FastMalloc.h:
13242 (WTF::TryMallocReturnValue::TryMallocReturnValue):
13243 (WTF::TryMallocReturnValue::~TryMallocReturnValue):
13244 (WTF::TryMallocReturnValue::operator Maybe<T>):
13245 (WTF::TryMallocReturnValue::getValue):
13246 * wtf/PossiblyNull.h:
13247 (WTF::PossiblyNull::PossiblyNull):
13248 (WTF::PossiblyNull::~PossiblyNull):
13249 (WTF::PossiblyNull::getValue):
13252 2009-07-20 Gavin Barraclough <barraclough@apple.com>
13256 Add ARM assembler files to xcodeproj, for convenience editing.
13258 * JavaScriptCore.xcodeproj/project.pbxproj:
13260 2009-07-20 Jessie Berlin <jberlin@apple.com>
13262 Reviewed by David Levin.
13264 Fix an incorrect assertion in Vector::remove.
13266 https://bugs.webkit.org/show_bug.cgi?id=27477
13270 Assert that the position at which to start removing elements + the
13271 length (the number of elements to remove) is less than or equal to the
13272 size of the entire Vector.
13274 2009-07-20 Peter Kasting <pkasting@google.com>
13276 Reviewed by Mark Rowe.
13278 https://bugs.webkit.org/show_bug.cgi?id=27468
13279 Back out r46060, which caused problems for some Apple developers.
13281 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
13282 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
13283 * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
13284 * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
13285 * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
13287 2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
13289 Reviewed by Oliver Hunt.
13291 Allow custom memory allocation control in NewThreadContext
13292 https://bugs.webkit.org/show_bug.cgi?id=27338
13294 Inherits NewThreadContext struct from FastAllocBase because it
13295 has been instantiated by 'new' JavaScriptCore/wtf/Threading.cpp:76.
13297 * wtf/Threading.cpp:
13299 2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
13301 Reviewed by Oliver Hunt.
13303 Allow custom memory allocation control in JavaScriptCore's JSClassRef.h
13304 https://bugs.webkit.org/show_bug.cgi?id=27340
13306 Inherit StaticValueEntry and StaticFunctionEntry struct from FastAllocBase because these
13307 have been instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:153
13308 and in JavaScriptCore/API/JSClassRef.cpp:166.
13310 * API/JSClassRef.h:
13312 2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
13314 Reviewed by Darin Adler.
13316 Allow custom memory allocation control in JavaScriptCore's RegexPattern.h
13317 https://bugs.webkit.org/show_bug.cgi?id=27343
13319 Inherits RegexPattern.h's structs (which have been instantiated by operator new) from FastAllocBase:
13321 CharacterClass (new call: JavaScriptCore/yarr/RegexCompiler.cpp:144)
13322 PatternAlternative (new call: JavaScriptCore/yarr/RegexPattern.h:221)
13323 PatternDisjunction (new call: JavaScriptCore/yarr/RegexCompiler.cpp:446)
13325 * yarr/RegexPattern.h:
13327 2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
13329 Reviewed by Darin Adler.
13331 Allow custom memory allocation control for JavaScriptCore's MatchFrame struct
13332 https://bugs.webkit.org/show_bug.cgi?id=27344
13334 Inherits MatchFrame struct from FastAllocBase because it has
13335 been instantiated by 'new' JavaScriptCore/pcre/pcre_exec.cpp:359.
13337 * pcre/pcre_exec.cpp:
13339 2009-07-20 Laszlo Gombos <laszlo.1.gombos@nokia.com>
13341 Reviewed by Holger Freyther.
13343 Remove some outdated S60 platform specific code
13344 https://bugs.webkit.org/show_bug.cgi?id=27423
13348 2009-07-20 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
13350 Reviewed by Simon Hausmann.
13352 Qt build fix with MSVC and MinGW.
13354 * jsc.pro: Make sure jsc is a console application, and turn off
13355 exceptions and stl support to fix the build.
13357 2009-07-20 Xan Lopez <xlopez@igalia.com>
13359 Reviewed by Gustavo Noronha.
13361 Do not use C++-style comments in preprocessor directives.
13363 GCC does not like this in some configurations, using C-style
13368 2009-07-17 Peter Kasting <pkasting@google.com>
13370 Reviewed by Steve Falkenburg.
13372 https://bugs.webkit.org/show_bug.cgi?id=27323
13373 Only add Cygwin to the path when it isn't already there. This avoids
13374 causing problems for people who purposefully have non-Cygwin versions of
13375 executables like svn in front of the Cygwin ones in their paths.
13377 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
13378 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
13379 * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
13380 * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
13381 * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
13383 2009-07-17 Gabor Loki <loki@inf.u-szeged.hu>
13385 Reviewed by Gavin Barraclough.
13387 Add YARR support for generic ARM platforms (disabled by default).
13388 https://bugs.webkit.org/show_bug.cgi?id=24986
13390 Add generic ARM port for MacroAssembler. It supports the whole
13391 MacroAssembler functionality except floating point.
13393 The class JmpSrc is extended with a flag which enables to patch
13394 the jump destination offset during execution. This feature is
13395 required for generic ARM port.
13397 Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
13398 Signed off by Gabor Loki <loki@inf.u-szeged.hu>
13400 * JavaScriptCore.pri:
13401 * assembler/ARMAssembler.cpp: Added.
13402 (JSC::ARMAssembler::getLdrImmAddress):
13403 (JSC::ARMAssembler::linkBranch):
13404 (JSC::ARMAssembler::patchConstantPoolLoad):
13405 (JSC::ARMAssembler::getOp2):
13406 (JSC::ARMAssembler::genInt):
13407 (JSC::ARMAssembler::getImm):
13408 (JSC::ARMAssembler::moveImm):
13409 (JSC::ARMAssembler::dataTransfer32):
13410 (JSC::ARMAssembler::baseIndexTransfer32):
13411 (JSC::ARMAssembler::executableCopy):
13412 * assembler/ARMAssembler.h: Added.
13414 (JSC::ARMAssembler::ARMAssembler):
13415 (JSC::ARMAssembler::):
13416 (JSC::ARMAssembler::JmpSrc::JmpSrc):
13417 (JSC::ARMAssembler::JmpSrc::enableLatePatch):
13418 (JSC::ARMAssembler::JmpDst::JmpDst):
13419 (JSC::ARMAssembler::JmpDst::isUsed):
13420 (JSC::ARMAssembler::JmpDst::used):
13421 (JSC::ARMAssembler::emitInst):
13422 (JSC::ARMAssembler::and_r):
13423 (JSC::ARMAssembler::ands_r):
13424 (JSC::ARMAssembler::eor_r):
13425 (JSC::ARMAssembler::eors_r):
13426 (JSC::ARMAssembler::sub_r):
13427 (JSC::ARMAssembler::subs_r):
13428 (JSC::ARMAssembler::rsb_r):
13429 (JSC::ARMAssembler::rsbs_r):
13430 (JSC::ARMAssembler::add_r):
13431 (JSC::ARMAssembler::adds_r):
13432 (JSC::ARMAssembler::adc_r):
13433 (JSC::ARMAssembler::adcs_r):
13434 (JSC::ARMAssembler::sbc_r):
13435 (JSC::ARMAssembler::sbcs_r):
13436 (JSC::ARMAssembler::rsc_r):
13437 (JSC::ARMAssembler::rscs_r):
13438 (JSC::ARMAssembler::tst_r):
13439 (JSC::ARMAssembler::teq_r):
13440 (JSC::ARMAssembler::cmp_r):
13441 (JSC::ARMAssembler::orr_r):
13442 (JSC::ARMAssembler::orrs_r):
13443 (JSC::ARMAssembler::mov_r):
13444 (JSC::ARMAssembler::movs_r):
13445 (JSC::ARMAssembler::bic_r):
13446 (JSC::ARMAssembler::bics_r):
13447 (JSC::ARMAssembler::mvn_r):
13448 (JSC::ARMAssembler::mvns_r):
13449 (JSC::ARMAssembler::mul_r):
13450 (JSC::ARMAssembler::muls_r):
13451 (JSC::ARMAssembler::mull_r):
13452 (JSC::ARMAssembler::ldr_imm):
13453 (JSC::ARMAssembler::ldr_un_imm):
13454 (JSC::ARMAssembler::dtr_u):
13455 (JSC::ARMAssembler::dtr_ur):
13456 (JSC::ARMAssembler::dtr_d):
13457 (JSC::ARMAssembler::dtr_dr):
13458 (JSC::ARMAssembler::ldrh_r):
13459 (JSC::ARMAssembler::ldrh_d):
13460 (JSC::ARMAssembler::ldrh_u):
13461 (JSC::ARMAssembler::strh_r):
13462 (JSC::ARMAssembler::push_r):
13463 (JSC::ARMAssembler::pop_r):
13464 (JSC::ARMAssembler::poke_r):
13465 (JSC::ARMAssembler::peek_r):
13466 (JSC::ARMAssembler::clz_r):
13467 (JSC::ARMAssembler::bkpt):
13468 (JSC::ARMAssembler::lsl):
13469 (JSC::ARMAssembler::lsr):
13470 (JSC::ARMAssembler::asr):
13471 (JSC::ARMAssembler::lsl_r):
13472 (JSC::ARMAssembler::lsr_r):
13473 (JSC::ARMAssembler::asr_r):
13474 (JSC::ARMAssembler::size):
13475 (JSC::ARMAssembler::ensureSpace):
13476 (JSC::ARMAssembler::label):
13477 (JSC::ARMAssembler::align):
13478 (JSC::ARMAssembler::jmp):
13479 (JSC::ARMAssembler::patchPointerInternal):
13480 (JSC::ARMAssembler::patchConstantPoolLoad):
13481 (JSC::ARMAssembler::patchPointer):
13482 (JSC::ARMAssembler::repatchInt32):
13483 (JSC::ARMAssembler::repatchPointer):
13484 (JSC::ARMAssembler::repatchLoadPtrToLEA):
13485 (JSC::ARMAssembler::linkJump):
13486 (JSC::ARMAssembler::relinkJump):
13487 (JSC::ARMAssembler::linkCall):
13488 (JSC::ARMAssembler::relinkCall):
13489 (JSC::ARMAssembler::getRelocatedAddress):
13490 (JSC::ARMAssembler::getDifferenceBetweenLabels):
13491 (JSC::ARMAssembler::getCallReturnOffset):
13492 (JSC::ARMAssembler::getOp2Byte):
13493 (JSC::ARMAssembler::placeConstantPoolBarrier):
13494 (JSC::ARMAssembler::RM):
13495 (JSC::ARMAssembler::RS):
13496 (JSC::ARMAssembler::RD):
13497 (JSC::ARMAssembler::RN):
13498 (JSC::ARMAssembler::getConditionalField):
13499 * assembler/ARMv7Assembler.h:
13500 (JSC::ARMv7Assembler::JmpSrc::enableLatePatch):
13501 * assembler/AbstractMacroAssembler.h:
13502 (JSC::AbstractMacroAssembler::Call::enableLatePatch):
13503 (JSC::AbstractMacroAssembler::Jump::enableLatePatch):
13504 * assembler/MacroAssembler.h:
13505 * assembler/MacroAssemblerARM.h: Added.
13506 (JSC::MacroAssemblerARM::):
13507 (JSC::MacroAssemblerARM::add32):
13508 (JSC::MacroAssemblerARM::and32):
13509 (JSC::MacroAssemblerARM::lshift32):
13510 (JSC::MacroAssemblerARM::mul32):
13511 (JSC::MacroAssemblerARM::not32):
13512 (JSC::MacroAssemblerARM::or32):
13513 (JSC::MacroAssemblerARM::rshift32):
13514 (JSC::MacroAssemblerARM::sub32):
13515 (JSC::MacroAssemblerARM::xor32):
13516 (JSC::MacroAssemblerARM::load32):
13517 (JSC::MacroAssemblerARM::load32WithAddressOffsetPatch):
13518 (JSC::MacroAssemblerARM::loadPtrWithPatchToLEA):
13519 (JSC::MacroAssemblerARM::load16):
13520 (JSC::MacroAssemblerARM::store32WithAddressOffsetPatch):
13521 (JSC::MacroAssemblerARM::store32):
13522 (JSC::MacroAssemblerARM::pop):
13523 (JSC::MacroAssemblerARM::push):
13524 (JSC::MacroAssemblerARM::move):
13525 (JSC::MacroAssemblerARM::swap):
13526 (JSC::MacroAssemblerARM::signExtend32ToPtr):
13527 (JSC::MacroAssemblerARM::zeroExtend32ToPtr):
13528 (JSC::MacroAssemblerARM::branch32):
13529 (JSC::MacroAssemblerARM::branch16):
13530 (JSC::MacroAssemblerARM::branchTest32):
13531 (JSC::MacroAssemblerARM::jump):
13532 (JSC::MacroAssemblerARM::branchAdd32):
13533 (JSC::MacroAssemblerARM::mull32):
13534 (JSC::MacroAssemblerARM::branchMul32):
13535 (JSC::MacroAssemblerARM::branchSub32):
13536 (JSC::MacroAssemblerARM::breakpoint):
13537 (JSC::MacroAssemblerARM::nearCall):
13538 (JSC::MacroAssemblerARM::call):
13539 (JSC::MacroAssemblerARM::ret):
13540 (JSC::MacroAssemblerARM::set32):
13541 (JSC::MacroAssemblerARM::setTest32):
13542 (JSC::MacroAssemblerARM::tailRecursiveCall):
13543 (JSC::MacroAssemblerARM::makeTailRecursiveCall):
13544 (JSC::MacroAssemblerARM::moveWithPatch):
13545 (JSC::MacroAssemblerARM::branchPtrWithPatch):
13546 (JSC::MacroAssemblerARM::storePtrWithPatch):
13547 (JSC::MacroAssemblerARM::supportsFloatingPoint):
13548 (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
13549 (JSC::MacroAssemblerARM::loadDouble):
13550 (JSC::MacroAssemblerARM::storeDouble):
13551 (JSC::MacroAssemblerARM::addDouble):
13552 (JSC::MacroAssemblerARM::subDouble):
13553 (JSC::MacroAssemblerARM::mulDouble):
13554 (JSC::MacroAssemblerARM::convertInt32ToDouble):
13555 (JSC::MacroAssemblerARM::branchDouble):
13556 (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
13557 (JSC::MacroAssemblerARM::ARMCondition):
13558 (JSC::MacroAssemblerARM::prepareCall):
13559 (JSC::MacroAssemblerARM::call32):
13560 * assembler/X86Assembler.h:
13561 (JSC::X86Assembler::JmpSrc::enableLatePatch):
13562 * jit/ExecutableAllocator.h:
13563 (JSC::ExecutableAllocator::cacheFlush):
13565 * yarr/RegexJIT.cpp:
13566 (JSC::Yarr::RegexGenerator::generateEnter):
13567 (JSC::Yarr::RegexGenerator::generateReturn):
13569 2009-07-17 Gabor Loki <loki@inf.u-szeged.hu>
13571 Reviewed by Gavin Barraclough.
13573 Extend AssemblerBuffer with constant pool handling mechanism.
13574 https://bugs.webkit.org/show_bug.cgi?id=24986
13576 Add a platform independed constant pool framework.
13577 This pool can store 32 or 64 bits values which is enough to hold
13578 any integer, pointer or double constant.
13580 * assembler/AssemblerBuffer.h:
13581 (JSC::AssemblerBuffer::putIntUnchecked):
13582 (JSC::AssemblerBuffer::putInt64Unchecked):
13583 (JSC::AssemblerBuffer::append):
13584 (JSC::AssemblerBuffer::grow):
13585 * assembler/AssemblerBufferWithConstantPool.h: Added.
13588 2009-07-17 Eric Roman <eroman@chromium.org>
13590 Reviewed by Darin Adler.
13592 Build fix for non-Darwin.
13593 Add a guard for inclusion of RetainPtr.h which includes CoreFoundation.h
13595 https://bugs.webkit.org/show_bug.cgi?id=27382
13597 * wtf/unicode/icu/CollatorICU.cpp:
13599 2009-07-17 Alexey Proskuryakov <ap@webkit.org>
13601 Reviewed by John Sullivan.
13603 Get user default collation order via a CFLocale API when available.
13605 * wtf/unicode/icu/CollatorICU.cpp: (WTF::Collator::userDefault):
13607 2009-07-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
13609 Reviewed by Simon Hausmann.
13611 [Qt] Fix the include path for the Symbian port
13612 https://bugs.webkit.org/show_bug.cgi?id=27358
13614 * JavaScriptCore.pri:
13616 2009-07-17 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
13618 Reviewed by David Levin.
13620 Build fix on platforms don't have MMAP.
13621 https://bugs.webkit.org/show_bug.cgi?id=27365
13623 * interpreter/RegisterFile.h: Including stdio.h irrespectively of HAVE(MMAP)
13625 2009-07-16 Fumitoshi Ukai <ukai@chromium.org>
13627 Reviewed by David Levin.
13629 Add --web-sockets flag and ENABLE_WEB_SOCKETS define.
13630 https://bugs.webkit.org/show_bug.cgi?id=27206
13632 Add ENABLE_WEB_SOCKETS
13634 * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS
13636 2009-07-16 Maxime Simon <simon.maxime@gmail.com>
13638 Reviewed by Eric Seidel.
13640 Added Haiku-specific files for JavaScriptCore.
13641 https://bugs.webkit.org/show_bug.cgi?id=26620
13643 * wtf/haiku/MainThreadHaiku.cpp: Added.
13644 (WTF::initializeMainThreadPlatform):
13645 (WTF::scheduleDispatchFunctionsOnMainThread):
13647 2009-07-16 Gavin Barraclough <barraclough@apple.com>
13651 Revert r45969, this fix does not appear to be valid.
13652 https://bugs.webkit.org/show_bug.cgi?id=27077
13654 * bytecode/CodeBlock.cpp:
13655 (JSC::CodeBlock::~CodeBlock):
13656 (JSC::CodeBlock::unlinkCallers):
13660 2009-07-16 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
13662 Reviewed by Oliver Hunt.
13664 Allow custom memory allocation control in ExceptionInfo and RareData struct
13665 https://bugs.webkit.org/show_bug.cgi?id=27336
13667 Inherits ExceptionInfo and RareData struct from FastAllocBase because these
13668 have been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.cpp:1289 and
13669 in JavaScriptCore/bytecode/CodeBlock.h:453.
13671 Remove unnecessary WTF:: namespace from CodeBlock inheritance.
13673 * bytecode/CodeBlock.h:
13675 2009-07-16 Mark Rowe <mrowe@apple.com>
13677 Rubber-stamped by Geoff Garen.
13679 Fix FeatureDefines.xcconfig to not be out of sync with the rest of the world.
13681 * Configurations/FeatureDefines.xcconfig:
13683 2009-07-16 Yong Li <yong.li@torchmobile.com>
13685 Reviewed by George Staikos.
13687 https://bugs.webkit.org/show_bug.cgi?id=27320
13688 _countof is only included in CE6; for CE5 we need to define it ourself
13692 2009-07-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
13694 Reviewed by Oliver Hunt.
13696 Workers + garbage collector: weird crashes
13697 https://bugs.webkit.org/show_bug.cgi?id=27077
13699 We need to unlink cached method call sites when a function is destroyed.
13701 * JavaScriptCore.xcodeproj/project.pbxproj:
13702 * bytecode/CodeBlock.cpp:
13703 (JSC::CodeBlock::~CodeBlock):
13704 (JSC::CodeBlock::unlinkCallers):
13706 (JSC::JIT::unlinkMethodCall):
13709 2009-07-15 Steve Falkenburg <sfalken@apple.com>
13713 Visual Studio reset our intermediate directory on us.
13716 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
13717 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
13719 2009-07-15 Kwang Yul Seo <skyul@company100.net>
13721 Reviewed by Eric Seidel.
13723 https://bugs.webkit.org/show_bug.cgi?id=26794
13724 Make Yacc-generated parsers to use fastMalloc/fastFree.
13726 Define YYMALLOC and YYFREE to fastMalloc and fastFree
13729 * parser/Grammar.y:
13731 2009-07-15 Darin Adler <darin@apple.com>
13733 Fix a build for a particular Apple configuration.
13735 * wtf/FastAllocBase.h: Change include to use "" style for
13736 including another wtf header. This is the style we use for
13737 including other public headers in the same directory.
13739 2009-07-15 George Staikos <george.staikos@torchmobile.com>
13741 Reviewed by Adam Treat.
13743 https://bugs.webkit.org/show_bug.cgi?id=27303
13744 Implement createThreadInternal for WinCE.
13745 Contains changes by George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com>
13747 * wtf/ThreadingWin.cpp:
13748 (WTF::createThreadInternal):
13750 2009-07-15 Joe Mason <joe.mason@torchmobile.com>
13752 Reviewed by George Staikos.
13754 https://bugs.webkit.org/show_bug.cgi?id=27298
13755 Platform defines for WINCE.
13756 Contains changes by Yong Li <yong.li@torchmobile.com>,
13757 George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com>
13761 2009-07-15 Yong Li <yong.li@torchmobile.com>
13763 Reviewed by Adam Treat.
13765 https://bugs.webkit.org/show_bug.cgi?id=27306
13766 Use RegisterClass instead of RegisterClassEx on WinCE.
13768 * wtf/win/MainThreadWin.cpp:
13769 (WTF::initializeMainThreadPlatform):
13771 2009-07-15 Yong Li <yong.li@torchmobile.com>
13773 Reviewed by George Staikos.
13775 https://bugs.webkit.org/show_bug.cgi?id=27301
13776 Use OutputDebugStringW on WinCE since OutputDebugStringA is not supported
13777 Originally written by Yong Li <yong.li@torchmobile.com> and refactored by
13778 Joe Mason <joe.mason@torchmobile.com>
13780 * wtf/Assertions.cpp: vprintf_stderr_common
13782 2009-07-15 Yong Li <yong.li@torchmobile.com>
13784 Reviewed by George Staikos.
13786 https://bugs.webkit.org/show_bug.cgi?id=27020
13787 msToGregorianDateTime should set utcOffset to 0 when outputIsUTC is false
13789 * wtf/DateMath.cpp:
13790 (WTF::gregorianDateTimeToMS):
13792 2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com>
13794 Reviewed by Simon Hausmann.
13796 [Qt] Cleanup - Remove obsolete code from the make system
13797 https://bugs.webkit.org/show_bug.cgi?id=27299
13799 * JavaScriptCore.pro:
13802 2009-07-07 Norbert Leser <norbert.leser@nokia.com>
13804 Reviewed by Simon Hausmann.
13806 https://bugs.webkit.org/show_bug.cgi?id=27056
13808 Alternate bool operator for codewarrior compiler (WINSCW).
13809 Compiler (latest b482) reports error for UnspecifiedBoolType construct:
13810 "illegal explicit conversion from 'WTF::OwnArrayPtr<JSC::Register>' to 'bool'"
13812 Same fix as in r38391.
13814 * JavaScriptCore/wtf/OwnArrayPtr.h:
13816 2009-07-15 Norbert Leser <norbert.leser@nokia.com>
13818 Reviewed by Darin Adler.
13820 Qualify include path with wtf to fix compilation
13822 https://bugs.webkit.org/show_bug.cgi?id=27055
13824 * interpreter/Interpreter.h:
13826 2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com>
13828 Reviewed by Dave Kilzer.
13830 Turn off non-portable date manipulations for SYMBIAN
13831 https://bugs.webkit.org/show_bug.cgi?id=27064
13833 Introduce HAVE(TM_GMTOFF), HAVE(TM_ZONE) and HAVE(TIMEGM) guards
13834 and place the rules for controlling the guards in Platform.h.
13835 Turn off these newly introduced guards for SYMBIAN.
13837 * wtf/DateMath.cpp:
13838 (WTF::calculateUTCOffset):
13840 (WTF::GregorianDateTime::GregorianDateTime):
13841 (WTF::GregorianDateTime::operator tm):
13844 2009-07-15 Norbert Leser <norbert.leser@nokia.com>
13846 Reviewed by Simon Hausmann.
13848 Undef ASSERT on Symbian, to avoid excessive warnings
13849 https://bugs.webkit.org/show_bug.cgi?id=27052
13851 * wtf/Assertions.h:
13853 2009-07-15 Oliver Hunt <oliver@apple.com>
13855 Reviewed by Simon Hausmann.
13857 REGRESSION: fast/js/postfix-syntax.html fails with interpreter
13858 https://bugs.webkit.org/show_bug.cgi?id=27294
13860 When postfix operators operating on locals assign to the same local
13861 the order of operations has to be to store the incremented value, then
13862 store the unmodified number. Rather than implementing this subtle
13863 semantic in the interpreter I've just made the logic explicit in the
13864 bytecode generator, so x=x++ effectively becomes x=ToNumber(x) (for a
13867 * parser/Nodes.cpp:
13868 (JSC::emitPostIncOrDec):
13870 2009-07-15 Oliver Hunt <oliver@apple.com>
13872 Reviewed by Simon Hausmann.
13874 REGRESSION(43559): fast/js/kde/arguments-scope.html fails with interpreter
13875 https://bugs.webkit.org/show_bug.cgi?id=27259
13877 The interpreter was incorrectly basing its need to create the arguments object
13878 based on the presence of the callframe's argument reference rather than the local
13879 arguments reference. Based on this it then overrode the local variable reference.
13881 * interpreter/Interpreter.cpp:
13882 (JSC::Interpreter::privateExecute):
13884 2009-07-14 Steve Falkenburg <sfalken@apple.com>
13886 Reorganize JavaScriptCore headers into:
13887 API: include/JavaScriptCore/
13888 Private: include/private/JavaScriptCore/
13890 Reviewed by Darin Adler.
13892 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
13893 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
13894 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
13895 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
13896 * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
13898 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
13900 Reviewed by Darin Adler.
13902 Change JSCell's superclass to NoncopyableCustomAllocated
13903 https://bugs.webkit.org/show_bug.cgi?id=27248
13905 JSCell class customizes operator new, since Noncopyable will be
13906 inherited from FastAllocBase, NoncopyableCustomAllocated has
13909 * runtime/JSCell.h:
13911 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
13913 Reviewed by Darin Adler.
13915 Change all Noncopyable inheriting visibility to public.
13916 https://bugs.webkit.org/show_bug.cgi?id=27225
13918 Change all Noncopyable inheriting visibility to public because
13919 it is needed to the custom allocation framework (bug #20422).
13921 * bytecode/SamplingTool.h:
13922 * bytecompiler/RegisterID.h:
13923 * interpreter/CachedCall.h:
13924 * interpreter/RegisterFile.h:
13927 * runtime/ArgList.h:
13928 * runtime/BatchedTransitionOptimizer.h:
13929 * runtime/Collector.h:
13930 * runtime/CommonIdentifiers.h:
13931 * runtime/JSCell.h:
13932 * runtime/JSGlobalObject.h:
13933 * runtime/JSLock.h:
13934 * runtime/JSONObject.cpp:
13935 * runtime/SmallStrings.cpp:
13936 * runtime/SmallStrings.h:
13937 * wtf/CrossThreadRefCounted.h:
13940 * wtf/MessageQueue.h:
13941 * wtf/OwnArrayPtr.h:
13942 * wtf/OwnFastMallocPtr.h:
13944 * wtf/RefCounted.h:
13945 * wtf/ThreadSpecific.h:
13948 * wtf/unicode/Collator.h:
13950 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
13952 Reviewed by Darin Adler.
13954 Change ParserArenaRefCounted's superclass to RefCountedCustomAllocated
13955 https://bugs.webkit.org/show_bug.cgi?id=27249
13957 ParserArenaDeletable customizes operator new, to avoid double inheritance
13958 ParserArenaDeletable's superclass has been changed to RefCountedCustomAllocated.
13962 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
13964 Reviewed by Darin Adler.
13966 Add RefCountedCustomAllocated to RefCounted.h
13967 https://bugs.webkit.org/show_bug.cgi?id=27232
13969 Some class which are inherited from RefCounted customize
13970 operator new, but RefCounted is inherited from Noncopyable
13971 which will be inherited from FastAllocBase. To avoid
13972 conflicts Noncopyable inheriting was moved down to RefCounted
13973 and to avoid double inheritance this class has been added.
13975 * wtf/RefCounted.h:
13976 (WTF::RefCountedCustomAllocated::deref):
13977 (WTF::RefCountedCustomAllocated::~RefCountedCustomAllocated):
13979 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
13981 Reviewed by Darin Adler.
13983 Add NoncopyableCustomAllocated to Noncopyable.h.
13984 https://bugs.webkit.org/show_bug.cgi?id=27228
13986 Some classes which inherited from Noncopyable overrides operator new
13987 since Noncopyable'll be inherited from FastAllocBase, Noncopyable.h
13988 needs to be extended with this new class to support the overriding.
13990 * wtf/Noncopyable.h:
13991 (WTFNoncopyable::NoncopyableCustomAllocated::NoncopyableCustomAllocated):
13992 (WTFNoncopyable::NoncopyableCustomAllocated::~NoncopyableCustomAllocated):
13994 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
13996 Reviewed by Darin Adler.
13998 Allow custom memory allocation control for JavaScriptCore's IdentifierTable class
13999 https://bugs.webkit.org/show_bug.cgi?id=27260
14001 Inherits IdentifierTable class from FastAllocBase because it has been
14002 instantiated by 'new' in JavaScriptCore/runtime/Identifier.cpp:70.
14004 * runtime/Identifier.cpp:
14006 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
14008 Reviewed by Darin Adler.
14010 Allow custom memory allocation control for JavaScriptCore's Profiler class
14011 https://bugs.webkit.org/show_bug.cgi?id=27253
14013 Inherits Profiler class from FastAllocBase because it has been instantiated by
14014 'new' in JavaScriptCore/profiler/Profiler.cpp:56.
14016 * profiler/Profiler.h:
14018 2009-07-06 George Staikos <george.staikos@torchmobile.com>
14020 Reviewed by Adam Treat.
14022 Authors: George Staikos <george.staikos@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>, Makoto Matsumoto <matumoto@math.keio.ac.jp>, Takuji Nishimura
14024 https://bugs.webkit.org/show_bug.cgi?id=27030
14025 Implement custom RNG for WinCE using Mersenne Twister
14027 * wtf/RandomNumber.cpp:
14028 (WTF::randomNumber):
14029 * wtf/RandomNumberSeed.h:
14030 (WTF::initializeRandomNumberGenerator):
14031 * wtf/wince/mt19937ar.c: Added.
14041 2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
14043 Unreviewed make dist build fix.
14047 2009-07-13 Drew Wilson <atwilson@google.com>
14049 Reviewed by David Levin.
14051 Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
14052 https://bugs.webkit.org/show_bug.cgi?id=26932
14054 Added ENABLE(SHARED_WORKERS) flag (off by default).
14056 * Configurations/FeatureDefines.xcconfig:
14058 2009-07-07 Norbert Leser <norbert.leser@nokia.com>
14060 Reviewed by Maciej Stachoviak.
14062 https://bugs.webkit.org/show_bug.cgi?id=27058
14064 Removed superfluous parenthesis around single expression.
14065 Compilers on Symbian platform fail to properly parse and compile.
14067 * JavaScriptCore/wtf/Platform.h:
14069 2009-07-13 Norbert Leser <norbert.leser@nokia.com>
14071 Reviewed by Maciej Stachoviak.
14073 https://bugs.webkit.org/show_bug.cgi?id=27054
14075 Renamed Translator to HashTranslator
14077 Codewarrior compiler (WINSCW) latest b482 cannot resolve typename
14078 mismatch between template declaration and definition
14079 (HashTranslator / Translator)
14083 2009-07-13 Norbert Leser <norbert.leser@nokia.com>
14085 Reviewed by Eric Seidel.
14087 https://bugs.webkit.org/show_bug.cgi?id=27053
14089 Ambiguity in LabelScope initialization
14091 Codewarrior compiler (WINSCW) latest b482 on Symbian cannot resolve
14092 type of "0" unambiguously. Set expression explicitly to
14093 PassRefPtr<Label>::PassRefPtr()
14095 * bytecompiler/BytecodeGenerator.cpp
14097 2009-07-11 Simon Fraser <simon.fraser@apple.com>
14099 Enable support for accelerated compositing and 3d transforms on Leopard.
14100 <https://bugs.webkit.org/show_bug.cgi?id=20166>
14101 <rdar://problem/6120614>
14103 Reviewed by Oliver Hunt.
14105 * Configurations/FeatureDefines.xcconfig:
14108 2009-07-10 Mark Rowe <mrowe@apple.com>
14110 Second part of the "make Windows happier" dance.
14112 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
14113 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
14115 2009-07-10 Mark Rowe <mrowe@apple.com>
14117 Try and make the Windows build happy.
14119 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
14120 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
14122 2009-07-10 Kevin McCullough <kmccullough@apple.com>
14124 Reviewed by Geoffrey Garen.
14126 * debugger/Debugger.h: Made this function virtual for use in WebCore's
14129 2009-07-10 Kwang Yul Seo <skyul@company100.net>
14131 Reviewed by Darin Adler.
14133 ParserArenaDeletable should override delete
14134 https://bugs.webkit.org/show_bug.cgi?id=26790
14136 ParserArenaDeletable overrides new, but it does not override delete.
14137 ParserArenaDeletable must be freed by fastFree
14138 because it is allocated by fastMalloc.
14140 * parser/NodeConstructors.h:
14141 (JSC::ParserArenaDeletable::operator delete):
14144 2009-07-10 Adam Roben <aroben@apple.com>
14146 Sort all our Xcode projects
14148 Accomplished using sort-Xcode-project-file.
14150 Requested by Dave Kilzer.
14152 * JavaScriptCore.xcodeproj/project.pbxproj:
14154 2009-07-09 Maciej Stachowiak <mjs@apple.com>
14156 Not reviewed, build fix.
14158 Windows build fix for the last change.
14160 * wtf/dtoa.cpp: Forgot to include Vector.h
14162 2009-07-09 Maciej Stachowiak <mjs@apple.com>
14164 Reviewed by Darin Adler.
14166 REGRESSION: crash in edge cases of floating point parsing.
14167 https://bugs.webkit.org/show_bug.cgi?id=27110
14168 <rdar://problem/7044458>
14170 Tests: fast/css/number-parsing-crash.html
14171 fast/css/number-parsing-crash.html
14172 fast/js/number-parsing-crash.html
14175 (WTF::BigInt::BigInt): Converted this to more a proper class, using a Vector
14176 with inline capacity
14178 (WTF::lshift): Rearranged logic somewhat nontrivially to deal with the new way of sizing BigInts.
14179 Added an assertion to verify that invariants are maintained.
14181 All other functions are adapted fairly mechanically to the above changes.
14182 (WTF::BigInt::clear):
14183 (WTF::BigInt::size):
14184 (WTF::BigInt::resize):
14185 (WTF::BigInt::words):
14186 (WTF::BigInt::append):
14200 2009-07-09 Drew Wilson <atwilson@google.com>
14202 Reviewed by Alexey Proskuryakov.
14204 Turned on CHANNEL_MESSAGING by default because the MessageChannel API
14205 can now be implemented for Web Workers and is reasonably stable.
14207 * Configurations/FeatureDefines.xcconfig:
14209 2009-07-09 Oliver Hunt <oliver@apple.com>
14211 * interpreter/Interpreter.cpp:
14212 (JSC::Interpreter::privateExecute):
14214 2009-07-09 Oliver Hunt <oliver@apple.com>
14216 Reviewed by Darin Adler.
14218 Bug 27016 - Interpreter crashes due to invalid array indexes
14219 <https://bugs.webkit.org/show_bug.cgi?id=27016>
14221 Unsigned vs signed conversions results in incorrect behaviour in
14222 64bit interpreter builds.
14224 * interpreter/Interpreter.cpp:
14225 (JSC::Interpreter::privateExecute):
14227 2009-07-09 Dimitri Glazkov <dglazkov@chromium.org>
14229 Reviewed by Darin Fisher.
14231 [Chromium] Upstream JavaScriptCore.gypi, the project file for Chromium build.
14232 https://bugs.webkit.org/show_bug.cgi?id=27135
14234 * JavaScriptCore.gypi: Added.
14236 2009-07-09 Joe Mason <joe.mason@torchmobile.com>
14238 Reviewed by George Staikos.
14240 Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
14242 https://bugs.webkit.org/show_bug.cgi?id=27031
14243 Add an override for deleteOwnedPtr(HDC) on Windows
14245 * wtf/OwnPtrCommon.h:
14246 * wtf/OwnPtrWin.cpp:
14247 (WTF::deleteOwnedPtr):
14249 2009-07-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
14251 Reviewed by Darin Adler.
14253 Guard singal.h dependency with HAVE(SIGNAL_H) to enable building jsc
14256 https://bugs.webkit.org/show_bug.cgi?id=27026
14258 Based on Norbert Leser's work.
14261 (printUsageStatement):
14265 2009-07-07 Gavin Barraclough <barraclough@apple.com>
14267 Reviewed by Sam Weinig.
14269 Stop loading constants into the register file.
14271 Instead, use high register values (highest bit bar the sign bit set) to indicate
14272 constants in the instruction stream, and when we encounter such a value load it
14273 directly from the CodeBlock.
14275 Since constants are no longer copied into the register file, this patch renders
14276 the 'unexpected constant' mechanism redundant, and removes it.
14278 2% improvement, thanks to Sam Weinig.
14280 * bytecode/CodeBlock.cpp:
14281 (JSC::CodeBlock::dump):
14282 (JSC::CodeBlock::CodeBlock):
14283 (JSC::CodeBlock::mark):
14284 (JSC::CodeBlock::shrinkToFit):
14285 * bytecode/CodeBlock.h:
14286 (JSC::CodeBlock::isTemporaryRegisterIndex):
14287 (JSC::CodeBlock::constantRegister):
14288 (JSC::CodeBlock::isConstantRegisterIndex):
14289 (JSC::CodeBlock::getConstant):
14290 (JSC::ExecState::r):
14291 * bytecode/Opcode.h:
14292 * bytecompiler/BytecodeGenerator.cpp:
14293 (JSC::BytecodeGenerator::preserveLastVar):
14294 (JSC::BytecodeGenerator::BytecodeGenerator):
14295 (JSC::BytecodeGenerator::addConstantValue):
14296 (JSC::BytecodeGenerator::emitEqualityOp):
14297 (JSC::BytecodeGenerator::emitLoad):
14298 (JSC::BytecodeGenerator::emitResolveBase):
14299 (JSC::BytecodeGenerator::emitResolveWithBase):
14300 (JSC::BytecodeGenerator::emitNewError):
14301 * bytecompiler/BytecodeGenerator.h:
14302 (JSC::BytecodeGenerator::emitNode):
14303 * interpreter/CallFrame.h:
14304 (JSC::ExecState::noCaller):
14305 (JSC::ExecState::hasHostCallFrameFlag):
14306 (JSC::ExecState::addHostCallFrameFlag):
14307 (JSC::ExecState::removeHostCallFrameFlag):
14308 * interpreter/Interpreter.cpp:
14309 (JSC::Interpreter::resolve):
14310 (JSC::Interpreter::resolveSkip):
14311 (JSC::Interpreter::resolveGlobal):
14312 (JSC::Interpreter::resolveBase):
14313 (JSC::Interpreter::resolveBaseAndProperty):
14314 (JSC::Interpreter::resolveBaseAndFunc):
14315 (JSC::Interpreter::dumpRegisters):
14316 (JSC::Interpreter::throwException):
14317 (JSC::Interpreter::createExceptionScope):
14318 (JSC::Interpreter::privateExecute):
14319 (JSC::Interpreter::retrieveArguments):
14321 (JSC::JIT::privateCompileMainPass):
14322 * jit/JITInlineMethods.h:
14323 (JSC::JIT::emitLoadDouble):
14324 (JSC::JIT::emitLoadInt32ToDouble):
14325 * jit/JITOpcodes.cpp:
14326 (JSC::JIT::emit_op_new_error):
14327 (JSC::JIT::emit_op_enter):
14328 (JSC::JIT::emit_op_enter_with_activation):
14329 * parser/Nodes.cpp:
14330 (JSC::DeleteResolveNode::emitBytecode):
14331 (JSC::DeleteValueNode::emitBytecode):
14332 (JSC::PrefixResolveNode::emitBytecode):
14333 * runtime/JSActivation.cpp:
14334 (JSC::JSActivation::JSActivation):
14337 2009-07-07 Mark Rowe <mrowe@apple.com>
14339 Reviewed by Darin Adler.
14341 Fix <https://bugs.webkit.org/show_bug.cgi?id=27025> / <rdar://problem/7033448>.
14342 Bug 27025: Crashes and regression test failures related to regexps in 64-bit
14344 For x86_64 RegexGenerator uses rbx, a callee-save register, as a scratch register but
14345 neglects to save and restore it. The change in handling of the output vector in r45545
14346 altered code generation so that the RegExp::match was now storing important data in rbx,
14347 which caused crashes and bogus results when it was clobbered.
14349 * yarr/RegexJIT.cpp:
14350 (JSC::Yarr::RegexGenerator::generateEnter): Save rbx.
14351 (JSC::Yarr::RegexGenerator::generateReturn): Restore rbx.
14353 2009-07-06 Ada Chan <adachan@apple.com>
14355 Reviewed by Darin Adler and Mark Rowe.
14357 Decommitted spans are added to the list of normal spans rather than
14358 the returned spans in TCMalloc_PageHeap::Delete().
14359 https://bugs.webkit.org/show_bug.cgi?id=26998
14361 In TCMalloc_PageHeap::Delete(), the deleted span can be decommitted in
14362 the process of merging with neighboring spans that are also decommitted.
14363 The merged span needs to be placed in the list of returned spans (spans
14364 whose memory has been returned to the system). Right now it's always added
14365 to the list of the normal spans which can theoretically cause thrashing.
14367 * wtf/FastMalloc.cpp:
14368 (WTF::TCMalloc_PageHeap::Delete):
14370 2009-07-05 Lars Knoll <lars.knoll@nokia.com>
14372 Reviewed by Maciej Stachowiak.
14374 https://bugs.webkit.org/show_bug.cgi?id=26843
14376 Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
14378 The Metrowerks compiler on the Symbian platform moves the globally
14379 defined Hashtables into read-only memory, despite one of the members
14380 being mutable. This causes crashes at run-time due to write access to
14383 Avoid the use of const with this compiler by introducing the
14384 JSC_CONST_HASHTABLE macro.
14386 Based on idea by Norbert Leser.
14388 * runtime/Lookup.h: Define JSC_CONST_HASHTABLE as const for !WINSCW.
14389 * create_hash_table: Use JSC_CONST_HASHTABLE for hashtables.
14390 * runtime/JSGlobalData.cpp: Import various global hashtables via the macro.
14392 2009-07-04 Dan Bernstein <mitz@apple.com>
14396 * runtime/RegExpConstructor.cpp:
14397 (JSC::RegExpConstructor::getLastParen):
14399 2009-07-03 Yong Li <yong.li@torchmobile.com>
14401 Reviewed by Maciej Stachowiak (and revised slightly)
14403 RegExp::match to be optimized
14404 https://bugs.webkit.org/show_bug.cgi?id=26957
14406 Allow regexp matching to use Vectors with inline capacity instead of
14407 allocating a new ovector buffer every time.
14409 ~5% speedup on SunSpider string-unpack-code test, 0.3% on SunSpider overall.
14411 * runtime/RegExp.cpp:
14412 (JSC::RegExp::match):
14413 * runtime/RegExp.h:
14414 * runtime/RegExpConstructor.cpp:
14415 (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
14416 (JSC::RegExpConstructorPrivate::lastOvector):
14417 (JSC::RegExpConstructorPrivate::tempOvector):
14418 (JSC::RegExpConstructorPrivate::changeLastOvector):
14419 (JSC::RegExpConstructor::performMatch):
14420 (JSC::RegExpMatchesArray::RegExpMatchesArray):
14421 (JSC::RegExpMatchesArray::fillArrayInstance):
14422 (JSC::RegExpConstructor::getBackref):
14423 (JSC::RegExpConstructor::getLastParen):
14424 (JSC::RegExpConstructor::getLeftContext):
14425 (JSC::RegExpConstructor::getRightContext):
14426 * runtime/StringPrototype.cpp:
14427 (JSC::stringProtoFuncSplit):
14429 2009-06-30 Kwang Yul Seo <skyul@company100.net>
14431 Reviewed by Eric Seidel.
14433 Override operator new/delete with const std::nothrow_t& as the second
14435 https://bugs.webkit.org/show_bug.cgi?id=26792
14437 On Windows CE, operator new/delete, new[]/delete[] with const
14438 std::nothrow_t& must be overrided because some standard template
14439 libraries use these operators.
14441 The problem occurs when memory allocated by new(size_t s, const
14442 std::nothrow_t&) is freed by delete(void* p). This causes the umatched
14443 malloc/free problem.
14445 The patch overrides all new, delete, new[] and delete[] to use
14446 fastMaloc and fastFree consistently.
14448 * wtf/FastMalloc.h:
14451 2009-06-30 Gabor Loki <loki@inf.u-szeged.hu>
14453 Reviewed by Sam Weinig.
14455 <https://bugs.webkit.org/show_bug.cgi?id=24986>
14457 Remove unnecessary references to AssemblerBuffer.
14459 * interpreter/Interpreter.cpp:
14460 * interpreter/Interpreter.h:
14462 2009-06-29 David Levin <levin@chromium.org>
14464 Reviewed by Oliver Hunt.
14466 Still seeing occasional leaks from UString::sharedBuffer code
14467 https://bugs.webkit.org/show_bug.cgi?id=26420
14469 The problem is that the pointer to the memory allocation isn't visible
14470 by "leaks" due to the lower bits being used as flags. The fix is to
14471 make the pointer visible in memory (in debug only). The downside of
14472 this fix that the memory allocated by sharedBuffer will still look like
14473 a leak in non-debug builds when any flags are set.
14475 * wtf/PtrAndFlags.h:
14476 (WTF::PtrAndFlags::set):
14478 2009-06-29 Sam Weinig <sam@webkit.org>
14480 Reviewed by Mark Rowe.
14482 Remove more unused scons support.
14484 * SConstruct: Removed.
14486 2009-06-29 Oliver Hunt <oliver@apple.com>
14488 Reviewed by Gavin Barraclough.
14490 <rdar://problem/7016214> JSON.parse fails to parse valid JSON with most Unicode characters
14491 <https://bugs.webkit.org/show_bug.cgi?id=26802>
14493 In the original JSON.parse patch unicode was handled correctly, however in some last
14494 minute "clean up" I oversimplified isSafeStringCharacter. This patch corrects this bug.
14496 * runtime/LiteralParser.cpp:
14497 (JSC::isSafeStringCharacter):
14498 (JSC::LiteralParser::Lexer::lexString):
14500 2009-06-26 Oliver Hunt <oliver@apple.com>
14502 Reviewed by Dan Bernstein.
14504 <rdar://problem/7009684> REGRESSION(r45039): Crashes inside JSEvent::put on PowerPC (26746)
14505 <https://bugs.webkit.org/show_bug.cgi?id=26746>
14507 Fix for r45039 incorrectly uncached a get_by_id by converting it to put_by_id. Clearly this
14508 is less than correct. This patch corrects that error.
14510 * interpreter/Interpreter.cpp:
14511 (JSC::Interpreter::tryCacheGetByID):
14513 2009-06-26 Eric Seidel <eric@webkit.org>
14515 No review, only rolling out r45259.
14517 Roll out r45259 after crash appeared on the bots:
14518 plugins/undefined-property-crash.html
14519 ASSERTION FAILED: s <= HeapConstants<heapType>::cellSize
14520 (leopard-intel-debug-tests/build/JavaScriptCore/runtime/Collector.cpp:278
14521 void* JSC::Heap::heapAllocate(size_t) [with JSC::HeapType heapType = PrimaryHeap])
14523 * runtime/DateInstance.cpp:
14524 * runtime/Identifier.cpp:
14525 * runtime/Lookup.h:
14526 * runtime/RegExpConstructor.cpp:
14527 * runtime/RegExpObject.h:
14528 * runtime/ScopeChain.h:
14529 * runtime/UString.h:
14531 2009-06-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
14533 Reviewed by Simon Hausmann.
14535 Add support for QDataStream operators to Vector.
14541 2009-06-24 Sam Weinig <sam@webkit.org>
14543 Reviewed by Gavin Barraclough.
14545 Make the opcode sampler work once again.
14548 (JSC::JIT::compileGetByIdProto):
14549 (JSC::JIT::compileGetByIdSelfList):
14550 (JSC::JIT::compileGetByIdProtoList):
14551 (JSC::JIT::compileGetByIdChainList):
14552 (JSC::JIT::compileGetByIdChain):
14553 (JSC::JIT::compilePutByIdTransition):
14554 (JSC::JIT::compileCTIMachineTrampolines):
14555 (JSC::JIT::compilePatchGetArrayLength):
14556 * jit/JITStubCall.h:
14557 (JSC::JITStubCall::call):
14559 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
14561 Reviewed by Maciej Stachowiak.
14563 Extend FastAllocBase.h with 'using WTF::FastAllocBase' to avoid
14564 unnecessary WTF:: usings.
14565 Remove existing unnecessary WTF:: usings.
14567 * interpreter/Interpreter.h:
14568 * profiler/CallIdentifier.h:
14569 * runtime/ScopeChain.h:
14570 * wtf/FastAllocBase.h:
14572 2009-06-24 David Levin <levin@chromium.org>
14576 * bytecode/CodeBlock.h:
14577 * bytecompiler/BytecodeGenerator.h:
14578 * interpreter/Register.h:
14580 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
14582 Reviewed by Maciej Stachowiak.
14584 https://bugs.webkit.org/show_bug.cgi?id=26677
14586 Inherits CodeBlock class from FastAllocBase because it
14587 has been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.h:217.
14589 * bytecode/CodeBlock.h:
14591 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
14593 Reviewed by Maciej Stachowiak.
14595 https://bugs.webkit.org/show_bug.cgi?id=26676
14597 Inherits BytecodeGenerator class from FastAllocBase because it has been
14598 instantiated by 'new' in JavaScriptCore/parser/Nodes.cpp:1892.
14600 * bytecompiler/BytecodeGenerator.h:
14602 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
14604 Reviewed by Maciej Stachowiak.
14606 https://bugs.webkit.org/show_bug.cgi?id=26675
14608 Inherits Register class from FastAllocBase because it has been
14609 instantiated by 'new' in JavaScriptCore/runtime/JSVariableObject.h:149.
14611 * interpreter/Register.h:
14613 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
14615 Reviewed by Darin Adler.
14617 https://bugs.webkit.org/show_bug.cgi?id=26674
14619 Inherits HashMap class from FastAllocBase because it has been
14620 instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:458.
14624 2009-06-24 Oliver Hunt <oliver@apple.com>
14626 Reviewed by Darin Adler.
14628 <rdar://problem/6940519> REGRESSION (Safari 4 Public Beta - TOT): google.com/adplanner shows blank page instead of site details in "basic research'
14630 The problem was caused by the page returned with a function using a
14631 var declaration list containing around ~3000 variables. The solution
14632 to this is to flatten the comma expression representation and make
14633 codegen comma expressions and initializer lists iterative rather than
14636 * parser/Grammar.y:
14637 * parser/NodeConstructors.h:
14638 (JSC::CommaNode::CommaNode):
14639 * parser/Nodes.cpp:
14640 (JSC::CommaNode::emitBytecode):
14642 (JSC::ExpressionNode::isCommaNode):
14643 (JSC::CommaNode::isCommaNode):
14644 (JSC::CommaNode::append):
14646 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
14648 Reviewed by Maciej Stachowiak.
14650 https://bugs.webkit.org/show_bug.cgi?id=26645
14652 Inherits ScopeChainNode class from FastAllocBase because it has been
14653 instantiated by 'new' in JavaScriptCore/runtime/ScopeChain.h:95.
14657 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
14659 Reviewed by Darin Adler.
14661 https://bugs.webkit.org/show_bug.cgi?id=26648
14663 Inherits Deque class from FastAllocBase because it has been
14664 instantiated by 'new' with DEFINE_STATIC_LOCAL macro in
14665 JavaScriptCore/wtf/MainThread.cpp:62.
14669 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
14671 Reviewed by Darin Adler.
14673 https://bugs.webkit.org/show_bug.cgi?id=26644
14675 Inherits RefPtr class from FastAllocBase because it has been
14676 instantiated by 'new' in JavaScriptCore/runtime/StructureChain.cpp:41.
14680 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
14682 Reviewed by Darin Adler.
14684 Inherits HashSet class from FastAllocBase, because it has been
14685 instantiated by 'new' in JavaScriptCore/runtime/Collector.h:116.
14689 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
14691 Reviewed by Darin Adler.
14693 Inherits Vector class from FastAllocBase because it has been
14694 instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:633.
14698 2009-06-24 Norbert Leser <norbert.leser@nokia.com>
14700 Reviewed by Maciej Stachoviak.
14702 The BytecodeGenerator objects were instantiated on stack, which takes up ~38kB per instance
14703 (each instance includes copy of JSC::CodeBlock with large SymbolTable, etc.).
14704 Specifically, since there is nested invocation (e.g., GlobalCode --> FunctionCode),
14705 the stack overflows immediately on Symbian hardware (max. 80 kB).
14706 Proposed change allocates generator objects on heap.
14707 Performance impact (if any) should be negligible and change is proposed as general fix,
14708 rather than ifdef'd for SYMBIAN.
14710 * parser/Nodes.cpp:
14711 (JSC::ProgramNode::generateBytecode):
14712 (JSC::EvalNode::generateBytecode):
14713 (JSC::EvalNode::bytecodeForExceptionInfoReparse):
14714 (JSC::FunctionBodyNode::generateBytecode):
14715 (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse):
14717 2009-06-23 Oliver Hunt <oliver@apple.com>
14719 Reviewed by Gavin Barraclough.
14721 <rdar://problem/6992806> REGRESSION: Enumeration can skip new properties in cases of prototypes that have more than 64 (26593)
14722 <https://bugs.webkit.org/show_bug.cgi?id=26593>
14724 Do not attempt to cache structure chains if they contain a dictionary at any level.
14726 * interpreter/Interpreter.cpp:
14727 (JSC::Interpreter::tryCachePutByID):
14728 (JSC::Interpreter::tryCacheGetByID):
14729 * jit/JITStubs.cpp:
14730 (JSC::JITThunks::tryCachePutByID):
14731 * runtime/Structure.cpp:
14732 (JSC::Structure::getEnumerablePropertyNames):
14733 (JSC::Structure::addPropertyTransition):
14734 * runtime/StructureChain.cpp:
14735 (JSC::StructureChain::isCacheable):
14736 * runtime/StructureChain.h:
14738 2009-06-23 Yong Li <yong.li@torchmobile.com>
14740 Reviewed by George Staikos.
14742 https://bugs.webkit.org/show_bug.cgi?id=26654
14743 Add the proper export define for the JavaScriptCore API when building for WINCE.
14747 2009-06-23 Joe Mason <joe.mason@torchmobile.com>
14749 Reviewed by Adam Treat.
14751 Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
14753 https://bugs.webkit.org/show_bug.cgi?id=26611
14754 Implement currentThreadStackBase on WINCE by adding a global,
14755 g_stackBase, which must be set to the address of a local variable
14756 by the caller before calling any WebKit function that invokes JSC.
14758 * runtime/Collector.cpp:
14759 (JSC::isPageWritable):
14760 (JSC::getStackBase):
14761 Starts at the top of the stack and returns the entire range of
14762 consecutive writable pages as an estimate of the actual stack.
14763 This will be much bigger than the actual stack range, so some
14764 dead objects can't be collected, but it guarantees live objects
14765 aren't collected prematurely.
14767 (JSC::currentThreadStackBase):
14768 On WinCE, returns g_stackBase if set or call getStackBase as a
14771 2009-06-23 Oliver Hunt <oliver@apple.com>
14773 Reviewed by Alexey Proskuryakov.
14775 Fix stupid performance problem in the LiteralParser
14777 The LiteralParser was making a new UString in order to use
14778 toDouble, however UString's toDouble allows a much wider range
14779 of numberic strings than the LiteralParser accepts, and requires
14780 an additional heap allocation or two for the construciton of the
14781 UString. To rectify this we just call WTF::dtoa directly using
14782 a stack allocated buffer to hold the validated numeric literal.
14784 * runtime/LiteralParser.cpp:
14785 (JSC::LiteralParser::Lexer::lexNumber):
14786 (JSC::LiteralParser::parse):
14787 * runtime/LiteralParser.h:
14789 2009-06-22 Oliver Hunt <oliver@apple.com>
14791 Reviewed by Alexey Proskuryakov.
14793 Bug 26640: JSON.stringify needs to special case Boolean objects
14794 <https://bugs.webkit.org/show_bug.cgi?id=26640>
14796 Add special case handling of the Boolean object so we match current
14799 * runtime/JSONObject.cpp:
14800 (JSC::unwrapBoxedPrimitive): renamed from unwrapNumberOrString
14802 (JSC::Stringifier::appendStringifiedValue):
14804 2009-06-22 Oliver Hunt <oliver@apple.com>
14806 Reviewed by Darin Adler.
14808 Bug 26591: Support revivers in JSON.parse
14809 <https://bugs.webkit.org/show_bug.cgi?id=26591>
14811 Add reviver support to JSON.parse. This completes the JSON object.
14813 * runtime/JSONObject.cpp:
14814 (JSC::Walker::Walker):
14815 (JSC::Walker::callReviver):
14816 (JSC::Walker::walk):
14817 (JSC::JSONProtoFuncParse):
14819 2009-06-21 Oliver Hunt <oliver@apple.com>
14821 Reviewed by Darin Adler.
14823 Bug 26592: Support standard toJSON functions
14824 <https://bugs.webkit.org/show_bug.cgi?id=26592>
14826 Add support for the standard Date.toJSON function.
14828 * runtime/DatePrototype.cpp:
14829 (JSC::dateProtoFuncToJSON):
14831 2009-06-21 Oliver Hunt <oliver@apple.com>
14833 Reviewed by Sam Weinig.
14835 Bug 26594: JSC needs to support Date.toISOString
14836 <https://bugs.webkit.org/show_bug.cgi?id=26594>
14838 Add support for Date.toISOString.
14840 * runtime/DatePrototype.cpp:
14841 (JSC::dateProtoFuncToISOString):
14843 2009-06-21 Oliver Hunt <oliver@apple.com>
14847 * runtime/LiteralParser.cpp:
14848 (JSC::LiteralParser::parse):
14850 2009-06-21 Oliver Hunt <oliver@apple.com>
14852 Reviewed by Darin Adler and Cameron Zwarich.
14854 Bug 26587: Support JSON.parse
14855 <https://bugs.webkit.org/show_bug.cgi?id=26587>
14857 Extend the LiteralParser to support the full strict JSON
14858 grammar, fix a few places where the grammar was incorrectly
14859 lenient. Doesn't yet support the JSON.parse reviver function
14860 but that does not block the JSON.parse functionality itself.
14862 * interpreter/Interpreter.cpp:
14863 (JSC::Interpreter::callEval):
14864 * runtime/JSGlobalObjectFunctions.cpp:
14865 (JSC::globalFuncEval):
14866 * runtime/JSONObject.cpp:
14867 (JSC::JSONProtoFuncParse):
14868 * runtime/LiteralParser.cpp:
14869 (JSC::LiteralParser::Lexer::lex):
14870 (JSC::isSafeStringCharacter):
14871 (JSC::LiteralParser::Lexer::lexString):
14872 (JSC::LiteralParser::parse):
14873 * runtime/LiteralParser.h:
14874 (JSC::LiteralParser::LiteralParser):
14875 (JSC::LiteralParser::tryJSONParse):
14876 (JSC::LiteralParser::):
14877 (JSC::LiteralParser::Lexer::Lexer):
14879 2009-06-21 David Levin <levin@chromium.org>
14881 Reviewed by NOBODY (speculative build fix for windows).
14883 Simply removed some whitespace form this file to make windows build wtf and
14884 hopefully copy the new MessageQueque.h so that WebCore picks it up.
14886 * wtf/Assertions.cpp:
14888 2009-06-21 Drew Wilson <atwilson@google.com>
14890 Reviewed by David Levin.
14892 <https://bugs.webkit.org/show_bug.cgi?id=25043>
14893 Added support for multi-threaded MessagePorts.
14895 * wtf/MessageQueue.h:
14896 (WTF::::appendAndCheckEmpty):
14897 Added API to test whether the queue was empty before adding an element.
14899 2009-06-20 David D. Kilzer <ddkilzer@webkit.org>
14901 Fix namespace comment in SegmentedVector.h
14903 * wtf/SegmentedVector.h: Updated namespace comment to reflect
14904 new namespace after r44897.
14906 2009-06-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
14908 Bug 24986: ARM JIT port
14909 <https://bugs.webkit.org/show_bug.cgi?id=24986>
14911 Reviewed by Oliver Hunt.
14913 An Iterator added for SegmentedVector. Currently
14914 only the pre ++ operator is supported.
14916 * wtf/SegmentedVector.h:
14917 (WTF::SegmentedVectorIterator::~SegmentedVectorIterator):
14918 (WTF::SegmentedVectorIterator::operator*):
14919 (WTF::SegmentedVectorIterator::operator->):
14920 (WTF::SegmentedVectorIterator::operator++):
14921 (WTF::SegmentedVectorIterator::operator==):
14922 (WTF::SegmentedVectorIterator::operator!=):
14923 (WTF::SegmentedVectorIterator::operator=):
14924 (WTF::SegmentedVectorIterator::SegmentedVectorIterator):
14925 (WTF::SegmentedVector::alloc):
14926 (WTF::SegmentedVector::begin):
14927 (WTF::SegmentedVector::end):
14929 2009-06-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
14931 Bug 24986: ARM JIT port
14932 <https://bugs.webkit.org/show_bug.cgi?id=24986>
14934 Reviewed by Oliver Hunt.
14936 Move SegmentedVector to /wtf subdirectory
14937 and change "namespace JSC" to "namespace WTF"
14939 Additional build file updates by David Kilzer.
14941 * GNUmakefile.am: Updated path to SegmentedVector.h.
14942 * JavaScriptCore.order: Updated SegmentedVector namespace from
14943 JSC to WTF in mangled C++ method name.
14944 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
14945 Removed reference to bytecompiler\SegmentedVector.h.
14946 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added reference to
14947 wtf\SegmentedVector.h.
14948 * JavaScriptCore.xcodeproj/project.pbxproj: Moved
14949 SegmentedVector.h definition from bytecompiler subdirectory to
14951 * bytecompiler/BytecodeGenerator.h: Updated #include path to
14952 SegmentedVector.h and prepended WTF:: namespace to its use.
14953 * parser/Lexer.h: Ditto.
14954 * wtf/SegmentedVector.h: Renamed from JavaScriptCore/bytecompiler/SegmentedVector.h.
14955 (WTF::SegmentedVector::SegmentedVector):
14956 (WTF::SegmentedVector::~SegmentedVector):
14957 (WTF::SegmentedVector::size):
14958 (WTF::SegmentedVector::at):
14959 (WTF::SegmentedVector::operator[]):
14960 (WTF::SegmentedVector::last):
14961 (WTF::SegmentedVector::append):
14962 (WTF::SegmentedVector::removeLast):
14963 (WTF::SegmentedVector::grow):
14964 (WTF::SegmentedVector::clear):
14965 (WTF::SegmentedVector::deleteAllSegments):
14966 (WTF::SegmentedVector::segmentExistsFor):
14967 (WTF::SegmentedVector::segmentFor):
14968 (WTF::SegmentedVector::subscriptFor):
14969 (WTF::SegmentedVector::ensureSegmentsFor):
14970 (WTF::SegmentedVector::ensureSegment):
14972 2009-06-19 Gavin Barraclough <barraclough@apple.com>
14974 Reviewed by NOBODY (build fix take 2 - rename FIELD_OFFSET to something that doesn't conflict with winnt.h).
14977 (JSC::JIT::privateCompile):
14978 (JSC::JIT::privateCompileCTIMachineTrampolines):
14979 (JSC::JIT::emitGetVariableObjectRegister):
14980 (JSC::JIT::emitPutVariableObjectRegister):
14982 * jit/JITArithmetic.cpp:
14983 (JSC::JIT::emit_op_rshift):
14984 (JSC::JIT::emitSlow_op_jnless):
14985 (JSC::JIT::emitSlow_op_jnlesseq):
14986 (JSC::JIT::compileBinaryArithOp):
14988 (JSC::JIT::compileOpCallInitializeCallFrame):
14989 (JSC::JIT::compileOpCall):
14990 * jit/JITInlineMethods.h:
14991 (JSC::JIT::restoreArgumentReference):
14992 (JSC::JIT::checkStructure):
14993 * jit/JITOpcodes.cpp:
14994 (JSC::JIT::emit_op_instanceof):
14995 (JSC::JIT::emit_op_get_scoped_var):
14996 (JSC::JIT::emit_op_put_scoped_var):
14997 (JSC::JIT::emit_op_construct_verify):
14998 (JSC::JIT::emit_op_resolve_global):
14999 (JSC::JIT::emit_op_jeq_null):
15000 (JSC::JIT::emit_op_jneq_null):
15001 (JSC::JIT::emit_op_to_jsnumber):
15002 (JSC::JIT::emit_op_catch):
15003 (JSC::JIT::emit_op_eq_null):
15004 (JSC::JIT::emit_op_neq_null):
15005 (JSC::JIT::emit_op_convert_this):
15006 (JSC::JIT::emit_op_profile_will_call):
15007 (JSC::JIT::emit_op_profile_did_call):
15008 (JSC::JIT::emitSlow_op_get_by_val):
15009 * jit/JITPropertyAccess.cpp:
15010 (JSC::JIT::emit_op_get_by_val):
15011 (JSC::JIT::emit_op_put_by_val):
15012 (JSC::JIT::emit_op_method_check):
15013 (JSC::JIT::compileGetByIdHotPath):
15014 (JSC::JIT::emit_op_put_by_id):
15015 (JSC::JIT::compilePutDirectOffset):
15016 (JSC::JIT::compileGetDirectOffset):
15017 (JSC::JIT::privateCompilePutByIdTransition):
15018 (JSC::JIT::privateCompilePatchGetArrayLength):
15019 * jit/JITStubs.cpp:
15020 (JSC::JITThunks::JITThunks):
15022 2009-06-19 Gavin Barraclough <barraclough@apple.com>
15024 Reviewed by NOBODY (Windows build fix).
15027 * jit/JITInlineMethods.h:
15029 2009-06-19 Gabor Loki <loki@inf.u-szeged.hu>
15031 Reviewed by Gavin Barraclough.
15033 Reorganize ARM architecture specific macros.
15034 Use PLATFORM_ARM_ARCH(7) instead of PLATFORM(ARM_V7).
15036 Bug 24986: ARM JIT port
15037 <https://bugs.webkit.org/show_bug.cgi?id=24986>
15039 * assembler/ARMv7Assembler.h:
15040 * assembler/AbstractMacroAssembler.h:
15041 (JSC::AbstractMacroAssembler::Imm32::Imm32):
15042 * assembler/MacroAssembler.h:
15043 * assembler/MacroAssemblerCodeRef.h:
15044 (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
15045 * jit/ExecutableAllocator.h:
15046 (JSC::ExecutableAllocator::cacheFlush):
15048 * jit/JITInlineMethods.h:
15049 (JSC::JIT::restoreArgumentReferenceForTrampoline):
15050 * jit/JITStubs.cpp:
15053 * yarr/RegexJIT.cpp:
15054 (JSC::Yarr::RegexGenerator::generateEnter):
15055 (JSC::Yarr::RegexGenerator::generateReturn):
15057 2009-06-19 Gavin Barraclough <barraclough@apple.com>
15059 Reviewed by Oliver Hunt.
15061 Fix armv7 JIT build issues.
15063 Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it now contains non POD types),
15064 and the FIELD_OFFSET macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT macros.
15066 * Replace offsetofs with FIELD_OFFSETs (safe on C++ objects).
15067 * Move COMPILE_ASSERTs defending layout of JITStackFrame structure on armv7 into JITThunks constructor.
15071 * jit/JITInlineMethods.h:
15072 (JSC::JIT::restoreArgumentReference):
15073 * jit/JITOpcodes.cpp:
15074 (JSC::JIT::emit_op_catch):
15075 * jit/JITStubs.cpp:
15076 (JSC::JITThunks::JITThunks):
15078 2009-06-19 Adam Treat <adam.treat@torchmobile.com>
15080 Blind attempt at build fix.
15082 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15083 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
15085 2009-06-19 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
15087 Reviewed by Oliver Hunt.
15089 Inherits CallIdentifier struct from FastAllocBase because it has been
15090 instantiated by 'new' in JavaScriptCore/profiler/CallIdentifier.h:86.
15092 * wtf/HashCountedSet.h:
15094 2009-06-19 Adam Treat <adam.treat@torchmobile.com>
15096 Reviewed by Oliver Hunt.
15098 https://bugs.webkit.org/show_bug.cgi?id=26540
15099 Modify the test shell to add a new function 'checkSyntax' that will
15100 only parse the source instead of executing it. In this way we can test
15101 pure parsing performance against some of the larger scripts in the wild.
15104 (GlobalObject::GlobalObject):
15105 (functionCheckSyntax):
15107 2009-06-19 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
15109 Reviewed by Darin Adler.
15111 Inherits HashCountedSet class from FastAllocBase because it has been
15112 instantiated by 'new' in JavaScriptCore/runtime/Collector.cpp:1095.
15114 * wtf/HashCountedSet.h:
15116 2009-06-19 Yong Li <yong.li@torchmobile.com>
15118 Reviewed by George Staikos.
15120 https://bugs.webkit.org/show_bug.cgi?id=26558
15121 Declare these symbols extern for WINCE as they are provided by libce.
15123 * runtime/DateConstructor.cpp:
15124 * runtime/DatePrototype.cpp:
15125 (JSC::formatLocaleDate):
15127 2009-06-19 Oliver Hunt <oliver@apple.com>
15129 Reviewed by Maciej Stachowiak.
15131 <rdar://problem/6988973> ScopeChain leak in interpreter builds
15133 Move the Scopechain destruction code in JSFunction outside of the ENABLE(JIT)
15136 * runtime/JSFunction.cpp:
15137 (JSC::JSFunction::~JSFunction):
15140 2009-06-19 Yong Li <yong.li@torchmobile.com>
15142 Reviewed by George Staikos.
15144 https://bugs.webkit.org/show_bug.cgi?id=26543
15145 Windows CE uses 'GetLastError' instead of 'errno.'
15147 * interpreter/RegisterFile.h:
15148 (JSC::RegisterFile::RegisterFile):
15149 (JSC::RegisterFile::grow):
15151 2009-06-19 David Levin <levin@chromium.org>
15153 Reviewed by NOBODY (Windows build fix).
15155 Add export for Windows corresponding to OSX export done in r44844.
15156 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15157 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
15159 2009-06-18 Oliver Hunt <oliver@apple.com>
15161 Reviewed by Gavin "Viceroy of Venezuela" Barraclough.
15163 Bug 26532: Native functions do not correctly unlink from optimised callsites when they're collected
15164 <https://bugs.webkit.org/show_bug.cgi?id=26532> <rdar://problem/6625385>
15166 We need to make sure that each native function instance correctly unlinks any references to it
15167 when it is collected. Allowing this to happen required a few changes:
15168 * Every native function needs a codeblock to track the link information
15169 * To have this codeblock, every function now also needs its own functionbodynode
15170 so we no longer get to have a single shared instance.
15171 * Identifying a host function is now done by looking for CodeBlock::codeType() == NativeCode
15173 * JavaScriptCore.exp:
15174 * bytecode/CodeBlock.cpp:
15175 (JSC::CodeBlock::CodeBlock):
15176 Constructor for NativeCode CodeBlock
15177 (JSC::CodeBlock::derefStructures):
15178 (JSC::CodeBlock::refStructures):
15179 (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
15180 (JSC::CodeBlock::handlerForBytecodeOffset):
15181 (JSC::CodeBlock::lineNumberForBytecodeOffset):
15182 (JSC::CodeBlock::expressionRangeForBytecodeOffset):
15183 (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
15184 (JSC::CodeBlock::functionRegisterForBytecodeOffset):
15185 (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
15186 (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
15187 (JSC::CodeBlock::setJITCode):
15188 Add assertions to ensure we don't try and use NativeCode CodeBlocks as
15189 a normal codeblock.
15191 * bytecode/CodeBlock.h:
15193 (JSC::CodeBlock::source):
15194 (JSC::CodeBlock::sourceOffset):
15195 (JSC::CodeBlock::evalCodeCache):
15196 (JSC::CodeBlock::createRareDataIfNecessary):
15200 (JSC::JIT::privateCompileCTIMachineTrampolines):
15201 (JSC::JIT::linkCall):
15202 Update logic to allow native function caching
15204 * jit/JITStubs.cpp:
15205 * parser/Nodes.cpp:
15206 (JSC::FunctionBodyNode::createNativeThunk):
15207 (JSC::FunctionBodyNode::isHostFunction):
15209 * runtime/JSFunction.cpp:
15210 (JSC::JSFunction::JSFunction):
15211 (JSC::JSFunction::~JSFunction):
15212 (JSC::JSFunction::mark):
15213 * runtime/JSGlobalData.cpp:
15214 (JSC::JSGlobalData::~JSGlobalData):
15215 * runtime/JSGlobalData.h:
15217 2009-06-18 Gavin Barraclough <barraclough@apple.com>
15219 Reviewed by NOBODY (Windows build fix).
15221 * wtf/DateMath.cpp:
15222 (WTF::calculateUTCOffset):
15224 2009-06-18 Gavin Barraclough <barraclough@apple.com>
15226 Reviewed by Geoff Garen.
15228 Timezone calculation incorrect in Venezuela.
15230 https://bugs.webkit.org/show_bug.cgi?id=26531
15231 <rdar://problem/6646169> Time is incorrectly reported to JavaScript in both Safari 3 and Firefox 3
15233 The problem is that we're calculating the timezone relative to 01/01/2000,
15234 but the VET timezone changed from -4 hours to -4:30 hours on 12/09/2007.
15235 According to the spec, section 15.9.1.9 states "the time since the beginning
15236 of the year", presumably meaning the *current* year. Change the calculation
15237 to be based on whatever the current year is, rather than a canned date.
15239 No performance impact.
15241 * wtf/DateMath.cpp:
15242 (WTF::calculateUTCOffset):
15244 2009-06-18 Gavin Barraclough <barraclough@apple.com>
15246 Rubber Stamped by Mark Rowe (originally reviewed by Sam Weinig).
15248 (Reintroducing patch added in r44492, and reverted in r44796.)
15250 Change the implementation of op_throw so the stub function always modifies its
15251 return address - if it doesn't find a 'catch' it will switch to a trampoline
15252 to force a return from JIT execution. This saves memory, by avoiding the need
15253 for a unique return for every op_throw.
15255 * jit/JITOpcodes.cpp:
15256 (JSC::JIT::emit_op_throw):
15257 JITStubs::cti_op_throw now always changes its return address,
15258 remove return code generated after the stub call (this is now
15259 handled by ctiOpThrowNotCaught).
15260 * jit/JITStubs.cpp:
15262 Add ctiOpThrowNotCaught definitions.
15263 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
15264 Change cti_op_throw to always change its return address.
15266 Add ctiOpThrowNotCaught declaration.
15268 2009-06-18 Kevin McCullough <kmccullough@apple.com>
15270 Reviewed by Oliver Hunt.
15272 <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit
15274 - Exposed functions now needed by WebCore.
15276 * JavaScriptCore.exp:
15278 2009-06-17 Darin Adler <darin@apple.com>
15280 Reviewed by Oliver Hunt.
15282 Bug 26429: Make JSON.stringify non-recursive so it can handle objects
15283 of arbitrary complexity
15284 https://bugs.webkit.org/show_bug.cgi?id=26429
15286 For marking I decided not to use gcProtect, because this is inside the engine
15287 so it's easy enough to just do marking. And that darned gcProtect does locking!
15288 Oliver tried to convince me to used MarkedArgumentBuffer, but the constructor
15289 for that class says "FIXME: Remove all clients of this API, then remove this API."
15291 * runtime/Collector.cpp:
15292 (JSC::Heap::collect): Add a call to JSONObject::markStringifiers.
15294 * runtime/CommonIdentifiers.cpp:
15295 (JSC::CommonIdentifiers::CommonIdentifiers): Added emptyIdentifier.
15296 * runtime/CommonIdentifiers.h: Ditto.
15298 * runtime/JSGlobalData.cpp:
15299 (JSC::JSGlobalData::JSGlobalData): Initialize firstStringifierToMark to 0.
15300 * runtime/JSGlobalData.h: Added firstStringifierToMark.
15302 * runtime/JSONObject.cpp: Cut down the includes to the needed ones only.
15303 (JSC::unwrapNumberOrString): Added. Helper for unwrapping number and string
15304 objects to get their number and string values.
15305 (JSC::ReplacerPropertyName::ReplacerPropertyName): Added. The class is used
15306 to wrap an identifier or integer so we don't have to do any work unless we
15307 actually call a replacer.
15308 (JSC::ReplacerPropertyName::value): Added.
15309 (JSC::gap): Added. Helper function for the Stringifier constructor.
15310 (JSC::PropertyNameForFunctionCall::PropertyNameForFunctionCall): Added.
15311 The class is used to wrap an identifier or integer so we don't have to
15312 allocate a number or string until we actually call toJSON or a replacer.
15313 (JSC::PropertyNameForFunctionCall::asJSValue): Added.
15314 (JSC::Stringifier::Stringifier): Updated and moved out of the class
15315 definition. Added code to hook this into a singly linked list for marking.
15316 (JSC::Stringifier::~Stringifier): Remove from the singly linked list.
15317 (JSC::Stringifier::mark): Mark all the objects in the holder stacks.
15318 (JSC::Stringifier::stringify): Updated.
15319 (JSC::Stringifier::appendQuotedString): Tweaked and streamlined a bit.
15320 (JSC::Stringifier::toJSON): Renamed from toJSONValue.
15321 (JSC::Stringifier::appendStringifiedValue): Renamed from stringify.
15322 Added code to use the m_holderStack to do non-recursive stringify of
15323 objects and arrays. This code also uses the timeout checker since in
15324 pathological cases it could be slow even without calling into the
15325 JavaScript virtual machine.
15326 (JSC::Stringifier::willIndent): Added.
15327 (JSC::Stringifier::indent): Added.
15328 (JSC::Stringifier::unindent): Added.
15329 (JSC::Stringifier::startNewLine): Added.
15330 (JSC::Stringifier::Holder::Holder): Added.
15331 (JSC::Stringifier::Holder::appendNextProperty): Added. This is the
15332 function that handles the format of arrays and objects.
15333 (JSC::JSONObject::getOwnPropertySlot): Moved this down to the bottom
15334 of the file so the JSONObject class is not interleaved with the
15336 (JSC::JSONObject::markStringifiers): Added. Calls mark.
15337 (JSC::JSONProtoFuncStringify): Streamlined the code here. The code
15338 to compute the gap string is now a separate function.
15340 * runtime/JSONObject.h: Made everything private. Added markStringifiers.
15342 2009-06-17 Oliver Hunt <oliver@apple.com>
15344 Reviewed by Gavin Barraclough.
15346 <rdar://problem/6974140> REGRESSION(r43849): Crash in cti_op_call_NotJSFunction when getting directions on maps.google.com
15348 Roll out r43849 as it appears that we cannot rely on the address of
15349 an objects property storage being constant even if the structure is
15353 * jit/JITPropertyAccess.cpp:
15354 (JSC::JIT::compileGetDirectOffset):
15355 (JSC::JIT::privateCompileGetByIdProto):
15356 (JSC::JIT::privateCompileGetByIdProtoList):
15357 (JSC::JIT::privateCompileGetByIdChainList):
15358 (JSC::JIT::privateCompileGetByIdChain):
15360 2009-06-17 Gavin Barraclough <barraclough@apple.com>
15362 Rubber Stamped by Mark Rowe.
15364 Fully revert r44492 & r44748 while we fix a bug they cause on internal builds <rdar://problem/6955963>.
15366 * jit/JITOpcodes.cpp:
15367 (JSC::JIT::emit_op_throw):
15368 * jit/JITStubs.cpp:
15370 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
15373 2009-06-17 Gavin Barraclough <barraclough@apple.com>
15375 Reviewed by Mark Rowe.
15377 <rdar://problem/6947426> sunspider math-cordic.js exhibits different intermediate results running 32-bit vs. 64-bit
15379 On 64-bit, NaN-encoded values must be detagged before they can be used in rshift.
15381 No performance impact.
15383 * jit/JITArithmetic.cpp:
15384 (JSC::JIT::emit_op_rshift):
15386 2009-06-17 Adam Treat <adam.treat@torchmobile.com>
15388 Reviewed by George Staikos.
15390 https://bugs.webkit.org/show_bug.cgi?id=23155
15391 Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
15396 2009-06-17 George Staikos <george.staikos@torchmobile.com>
15398 Reviewed by Adam Treat.
15400 https://bugs.webkit.org/show_bug.cgi?id=23155
15401 Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
15405 * wtf/Assertions.cpp:
15406 * wtf/Assertions.h:
15407 * wtf/CurrentTime.cpp:
15408 (WTF::lowResUTCTime):
15409 * wtf/DateMath.cpp:
15410 (WTF::getLocalTime):
15411 * wtf/MathExtras.h:
15413 * wtf/StringExtras.h:
15415 * wtf/win/MainThreadWin.cpp:
15417 2009-06-17 Gavin Barraclough <barraclough@apple.com>
15419 Reviewed by Oliver Hunt.
15421 <rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com
15423 Remove PropertySlot::putValue - PropertySlots should only be used for getting,
15424 not putting. Rename JSGlobalObject::getOwnPropertySlot to hasOwnPropertyForWrite,
15425 which is what it really was being used to ask, and remove some other getOwnPropertySlot
15426 & getOwnPropertySlotForWrite methods, which were unused and likely to lead to confusion.
15428 * runtime/JSGlobalObject.h:
15429 (JSC::JSGlobalObject::hasOwnPropertyForWrite):
15430 * runtime/JSObject.h:
15431 * runtime/JSStaticScopeObject.cpp:
15432 * runtime/JSStaticScopeObject.h:
15433 * runtime/PropertySlot.h:
15435 2009-06-16 Gavin Barraclough <barraclough@apple.com>
15437 Reviewed by Oliver hunt.
15439 Temporarily partially disable r44492, since this is causing some problems on internal builds.
15441 * jit/JITOpcodes.cpp:
15442 (JSC::JIT::emit_op_throw):
15443 * jit/JITStubs.cpp:
15444 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
15446 2009-06-16 Sam Weinig <sam@webkit.org>
15453 2009-06-16 Sam Weinig <sam@webkit.org>
15455 Reviewed by Oliver Hunt.
15457 Initialize m_bytecodeIndex to -1 in JIT, and correctly initialize
15458 it for each type of stub using the return address to find the correct
15464 (JSC::JIT::compileGetByIdProto):
15465 (JSC::JIT::compileGetByIdSelfList):
15466 (JSC::JIT::compileGetByIdProtoList):
15467 (JSC::JIT::compileGetByIdChainList):
15468 (JSC::JIT::compileGetByIdChain):
15469 (JSC::JIT::compilePutByIdTransition):
15470 (JSC::JIT::compileCTIMachineTrampolines):
15471 (JSC::JIT::compilePatchGetArrayLength):
15472 * jit/JITStubCall.h:
15473 (JSC::JITStubCall::call):
15475 == Rolled over to ChangeLog-2009-06-16 ==