1 2012-01-26 Csaba Osztrogonác <ossy@webkit.org>
3 [Qt][Win] Speculative buildfix after r105970.
5 * JavaScriptCore.pri: Link lgdi for DeleteObject() and DeleteDC().
7 2012-01-26 Sheriff Bot <webkit.review.bot@gmail.com>
9 Unreviewed, rolling out r105982.
10 http://trac.webkit.org/changeset/105982
11 https://bugs.webkit.org/show_bug.cgi?id=77090
13 breaks the world (Requested by WildFox on #webkit).
18 * wtf/mac/MainThreadMac.mm:
20 (WTF::registerGCThread):
21 (WTF::isMainThreadOrGCThread):
23 2012-01-26 Roland Takacs <takacs.roland@stud.u-szeged.hu>
25 [Qt] GC should be parallel on Qt platform
26 https://bugs.webkit.org/show_bug.cgi?id=73309
28 Reviewed by Zoltan Herczeg.
30 These changes made the parallel gc feature available for Qt port.
31 The implementation of "registerGCThread" and "isMainThreadOrGCThread"
32 is moved from MainThreadMac.mm to the common MainThread.cpp to make
33 them available for other platforms.
36 V8 speed-up: 1.071x as fast [From: 746.1ms To: 696.4ms ]
37 WindScorpion speed-up: 1.082x as fast [From: 3490.4ms To: 3226.7ms]
38 V8 Splay speed-up: 1.158x as fast [From: 145.8ms To: 125.9ms ]
40 Tested on Intel(R) Core(TM) i5-2320 CPU @ 3.00GHz with 4-core.
44 (WTF::registerGCThread):
45 (WTF::isMainThreadOrGCThread):
47 * wtf/mac/MainThreadMac.mm:
49 2012-01-26 Andy Estes <aestes@apple.com>
51 REGRESSION (r105555): Incorrect use of OS() macro breaks OwnPtr when used with Win32 data types
52 https://bugs.webkit.org/show_bug.cgi?id=77073
54 Reviewed by Ryosuke Niwa.
56 r105555 changed PLATFORM(WIN) to OS(WIN), but WTF_OS_WIN isn't defined.
57 This should have been changed to OS(WINDOWS). This causes the
58 preprocessor to strip out Win32 data type overrides for deleteOwnedPtr,
59 causing allocations made by Win32 to be deleted by fastmalloc.
62 (WTF): Use OS(WINDOWS) instead of OS(WIN).
64 2012-01-25 Mark Rowe <mrowe@apple.com>
66 Attempted Mac build fix after r105939.
68 * runtime/DatePrototype.cpp: Don't #include unicode/udat.h on Mac or iOS.
69 It isn't used on these platforms and isn't available in the ICU headers
72 2012-01-25 Mark Rowe <mrowe@apple.com>
74 Build in to an alternate location when USE_STAGING_INSTALL_PATH is set.
76 <rdar://problem/10609417> Adopt USE_STAGING_INSTALL_PATH
78 Reviewed by David Kilzer.
80 * Configurations/Base.xcconfig: Define NORMAL_JAVASCRIPTCORE_FRAMEWORKS_DIR, which contains
81 the path where JavaScriptCore is normally installed. Update JAVASCRIPTCORE_FRAMEWORKS_DIR
82 to point to the staged frameworks directory when USE_STAGING_INSTALL_PATH is set.
83 * Configurations/JavaScriptCore.xcconfig: Always set the framework's install name based on
84 the normal framework location. This prevents an incorrect install name from being used when
85 installing in to the staged frameworks directory.
87 2012-01-25 Eli Fidler <efidler@rim.com>
89 Implement Date.toLocaleString() using ICU
90 https://bugs.webkit.org/show_bug.cgi?id=76714
92 Reviewed by Darin Adler.
94 * runtime/DatePrototype.cpp:
95 (JSC::formatLocaleDate):
97 2012-01-25 Hajime Morita <morrita@google.com>
99 ENABLE_SHADOW_DOM should be available via build-webkit --shadow-dom
100 https://bugs.webkit.org/show_bug.cgi?id=76863
102 Reviewed by Dimitri Glazkov.
104 Added a feature flag.
106 * Configurations/FeatureDefines.xcconfig:
108 2012-01-25 Yong Li <yoli@rim.com>
110 [BlackBerry] Implement OSAllocator::commit/decommit.
111 BlackBerry port should support virtual memory decommiting.
112 https://bugs.webkit.org/show_bug.cgi?id=77013
114 Reviewed by Rob Buis.
116 * wtf/OSAllocatorPosix.cpp:
117 (WTF::OSAllocator::reserveUncommitted):
118 (WTF::OSAllocator::commit):
119 (WTF::OSAllocator::decommit):
122 2012-01-24 Oliver Hunt <oliver@apple.com>
124 Make DFG update topCallFrame
125 https://bugs.webkit.org/show_bug.cgi?id=76969
127 Reviewed by Filip Pizlo.
129 Add NativeCallFrameTracer to manage topCallFrame assignment
130 in the DFG operations, and make use of it.
132 * dfg/DFGOperations.cpp:
133 (JSC::DFG::operationPutByValInternal):
135 * interpreter/Interpreter.h:
137 (NativeCallFrameTracer):
138 (JSC::NativeCallFrameTracer::NativeCallFrameTracer):
140 2012-01-24 Filip Pizlo <fpizlo@apple.com>
142 Inlining breaks call frame walking when the walking is done from outside the inlinee,
143 but inside a code block that had inlining
144 https://bugs.webkit.org/show_bug.cgi?id=76978
145 <rdar://problem/10720904>
147 Reviewed by Oliver Hunt.
149 * bytecode/CodeBlock.h:
150 (JSC::CodeBlock::codeOriginForReturn):
151 * interpreter/CallFrame.cpp:
152 (JSC::CallFrame::trueCallerFrame):
154 2012-01-24 Gavin Barraclough <barraclough@apple.com>
156 https://bugs.webkit.org/show_bug.cgi?id=76855
157 Implement a JIT-code aware sampling profiler for JSC
159 Reviewed by Oliver Hunt.
161 Add support to MetaAllocator.cpp to track all live handles in a map,
162 allowing lookup based on any address within the allocation.
164 * wtf/MetaAllocator.cpp:
165 (WTF::MetaAllocatorTracker::notify):
166 (WTF::MetaAllocatorTracker::release):
167 - Track live handle objects in a map.
168 (WTF::MetaAllocator::release):
169 - Removed support for handles with null m_allocator (no longer used).
170 - Notify the tracker of handles being released.
171 (WTF::MetaAllocatorHandle::~MetaAllocatorHandle):
172 - Moved functionality out into MetaAllocator::release.
173 (WTF::MetaAllocatorHandle::shrink):
174 - Removed support for handles with null m_allocator (no longer used).
175 (WTF::MetaAllocator::MetaAllocator):
176 - Initialize m_tracker.
177 (WTF::MetaAllocator::allocate):
178 - Notify the tracker of new allocations.
179 * wtf/MetaAllocator.h:
180 (WTF::MetaAllocatorTracker::find):
181 - Lookup a MetaAllocatorHandle based on an address inside the allocation.
182 (WTF::MetaAllocator::trackAllocations):
183 - Register a callback object to track allocation state.
184 * wtf/MetaAllocatorHandle.h:
185 - Remove unused createSelfManagedHandle/constructor.
186 (WTF::MetaAllocatorHandle::key):
187 - Added, for use in RedBlackTree.
189 2012-01-24 Mark Hahnenberg <mhahnenberg@apple.com>
191 Use copying collector for out-of-line JSObject property storage
192 https://bugs.webkit.org/show_bug.cgi?id=76665
194 Reviewed by Geoffrey Garen.
196 * runtime/JSObject.cpp:
197 (JSC::JSObject::visitChildren): Changed to use copyAndAppend whenever the property storage is out-of-line.
198 Also added a temporary variable to avoid warnings from GCC.
199 (JSC::JSObject::allocatePropertyStorage): Changed to use tryAllocateStorage/tryReallocateStorage as opposed to
200 operator new. Also added a temporary variable to avoid warnings from GCC.
201 * runtime/JSObject.h:
203 2012-01-24 Geoffrey Garen <ggaren@apple.com>
205 JSValue::toString() should return a JSString* instead of a UString
206 https://bugs.webkit.org/show_bug.cgi?id=76861
208 Fixed two failing layout tests after my last patch.
210 Reviewed by Gavin Barraclough.
212 * runtime/ArrayPrototype.cpp:
213 (JSC::arrayProtoFuncSort): Call value() after calling toString(), as
216 I missed this case because the JSString* type has a valid operator<,
217 so the compiler didn't complain.
219 2012-01-24 Kenichi Ishibashi <bashi@chromium.org>
221 [V8] Add Uint8ClampedArray support
222 https://bugs.webkit.org/show_bug.cgi?id=76803
224 Reviewed by Kenneth Russell.
226 * wtf/ArrayBufferView.h:
227 (WTF::ArrayBufferView::isUnsignedByteClampedArray): Added.
228 * wtf/Uint8ClampedArray.h:
229 (WTF::Uint8ClampedArray::isUnsignedByteClampedArray): Overridden to return true.
231 2012-01-23 Carlos Garcia Campos <cgarcia@igalia.com>
233 [GTK] Add WebKitDownload to WebKit2 GTK+ API
234 https://bugs.webkit.org/show_bug.cgi?id=72949
236 Reviewed by Martin Robinson.
238 * wtf/gobject/GOwnPtr.cpp:
239 (WTF::GTimer): Use g_timer_destroy() to free a GTimer.
240 * wtf/gobject/GOwnPtr.h: Add GTimer template.
241 * wtf/gobject/GTypedefs.h: Add GTimer forward declaration.
243 2012-01-24 Ilya Tikhonovsky <loislo@chromium.org>
245 Unreviewed build fix for Qt LinuxSH4 build after r105698.
247 * interpreter/Interpreter.cpp:
248 (JSC::Interpreter::privateExecute):
250 2012-01-23 Geoffrey Garen <ggaren@apple.com>
252 JSValue::toString() should return a JSString* instead of a UString
253 https://bugs.webkit.org/show_bug.cgi?id=76861
255 Reviewed by Gavin Barraclough.
257 This makes the common case -- toString() on a string -- faster and
258 inline-able. (Not a measureable speedup, but we can now remove a bunch
259 of duplicate hand-rolled code for this optimization.)
261 This also clarifies the boundary between "C++ strings" and "JS strings".
263 In all cases other than true, false, null, undefined, and multi-digit
264 numbers, the JS runtime was just retrieving a UString from a JSString,
265 so returning a JSString* is strictly better. In the other cases, we can
266 optimize to avoid creating a new JSString if we care to, but it doesn't
267 seem to be a big deal.
269 * JavaScriptCore.exp: Export!
276 (functionCheckSyntax):
279 * API/JSValueRef.cpp:
280 (JSValueToStringCopy):
281 * bytecode/CodeBlock.cpp:
282 (JSC::valueToSourceString): Call value() after calling toString(), to
283 convert from "JS string" (JSString*) to "C++ string" (UString), since
284 toString() no longer returns a "C++ string".
286 * dfg/DFGOperations.cpp:
287 (JSC::DFG::operationValueAddNotNumber):
289 (op_add): Updated for removal of toPrimitiveString():
290 all '+' operands can use toString(), except for object operands, which
291 need to take a slow path to call toPrimitive().
293 * runtime/ArrayPrototype.cpp:
294 (JSC::arrayProtoFuncToString):
295 (JSC::arrayProtoFuncToLocaleString):
296 (JSC::arrayProtoFuncJoin):
297 (JSC::arrayProtoFuncPush):
298 * runtime/CommonSlowPaths.h:
299 (JSC::CommonSlowPaths::opIn):
300 * runtime/DateConstructor.cpp:
302 * runtime/DatePrototype.cpp:
303 (JSC::formatLocaleDate): Call value() after calling toString(), as above.
305 * runtime/ErrorInstance.h:
306 (JSC::ErrorInstance::create): Simplified down to one canonical create()
307 function, to make string handling easier.
309 * runtime/ErrorPrototype.cpp:
310 (JSC::errorProtoFuncToString):
311 * runtime/ExceptionHelpers.cpp:
312 (JSC::createInvalidParamError):
313 (JSC::createNotAConstructorError):
314 (JSC::createNotAFunctionError):
315 (JSC::createNotAnObjectError):
316 * runtime/FunctionConstructor.cpp:
317 (JSC::constructFunctionSkippingEvalEnabledCheck):
318 * runtime/FunctionPrototype.cpp:
319 (JSC::functionProtoFuncBind):
320 * runtime/JSArray.cpp:
321 (JSC::JSArray::sort): Call value() after calling toString(), as above.
323 * runtime/JSCell.cpp:
324 * runtime/JSCell.h: Removed JSCell::toString() because JSValue does this
325 job now. Doing it in JSCell is slower (requires extra type checking), and
326 creates the misimpression that language-defined toString() behavior is
327 an implementation detail of JSCell.
329 * runtime/JSGlobalObjectFunctions.cpp:
332 (JSC::globalFuncEval):
333 (JSC::globalFuncParseInt):
334 (JSC::globalFuncParseFloat):
335 (JSC::globalFuncEscape):
336 (JSC::globalFuncUnescape): Call value() after calling toString(), as above.
338 * runtime/JSONObject.cpp:
339 (JSC::unwrapBoxedPrimitive):
340 (JSC::Stringifier::Stringifier):
341 (JSC::JSONProtoFuncParse): Removed some manual optimization that toString()
344 * runtime/JSObject.cpp:
345 (JSC::JSObject::toString):
346 * runtime/JSObject.h: Updated to return JSString*.
348 * runtime/JSString.cpp:
349 * runtime/JSString.h:
350 (JSC::JSValue::toString): Removed, since I removed JSCell::toString().
352 * runtime/JSValue.cpp:
353 (JSC::JSValue::toStringSlowCase): Removed toPrimitiveString(), and re-
354 spawned toStringSlowCase() from its zombie corpse, since toPrimitiveString()
355 basically did what we want all the time. (Note that the toPrimitive()
356 preference changes from NoPreference to PreferString, because that's
357 how ToString is defined in the language. op_add does not want this behavior.)
359 * runtime/NumberPrototype.cpp:
360 (JSC::numberProtoFuncToString):
361 (JSC::numberProtoFuncToLocaleString): A little simpler, now that toString()
364 * runtime/ObjectConstructor.cpp:
365 (JSC::objectConstructorGetOwnPropertyDescriptor):
366 (JSC::objectConstructorDefineProperty):
367 * runtime/ObjectPrototype.cpp:
368 (JSC::objectProtoFuncHasOwnProperty):
369 (JSC::objectProtoFuncDefineGetter):
370 (JSC::objectProtoFuncDefineSetter):
371 (JSC::objectProtoFuncLookupGetter):
372 (JSC::objectProtoFuncLookupSetter):
373 (JSC::objectProtoFuncPropertyIsEnumerable): More calls to value(), as above.
375 * runtime/Operations.cpp:
376 (JSC::jsAddSlowCase): Need to check for object before taking the toString()
377 fast path becuase adding an object to a string requires calling toPrimitive()
378 on the object, not toString(). (They differ in their preferred conversion
381 * runtime/Operations.h:
383 (JSC::jsStringFromArguments): This code gets simpler, now that toString()
384 does the right thing.
386 (JSC::jsAdd): Now checks for object, just like jsAddSlowCase().
388 * runtime/RegExpConstructor.cpp:
389 (JSC::setRegExpConstructorInput):
390 (JSC::constructRegExp):
391 * runtime/RegExpObject.cpp:
392 (JSC::RegExpObject::match):
393 * runtime/RegExpPrototype.cpp:
394 (JSC::regExpProtoFuncCompile):
395 (JSC::regExpProtoFuncToString): More calls to value(), as above.
397 * runtime/StringConstructor.cpp:
398 (JSC::constructWithStringConstructor):
399 (JSC::callStringConstructor): This code gets simpler, now that toString()
400 does the right thing.
402 * runtime/StringPrototype.cpp:
403 (JSC::replaceUsingRegExpSearch):
404 (JSC::replaceUsingStringSearch):
405 (JSC::stringProtoFuncReplace):
406 (JSC::stringProtoFuncCharAt):
407 (JSC::stringProtoFuncCharCodeAt):
408 (JSC::stringProtoFuncConcat):
409 (JSC::stringProtoFuncIndexOf):
410 (JSC::stringProtoFuncLastIndexOf):
411 (JSC::stringProtoFuncMatch):
412 (JSC::stringProtoFuncSearch):
413 (JSC::stringProtoFuncSlice):
414 (JSC::stringProtoFuncSplit):
415 (JSC::stringProtoFuncSubstr):
416 (JSC::stringProtoFuncSubstring):
417 (JSC::stringProtoFuncToLowerCase):
418 (JSC::stringProtoFuncToUpperCase):
419 (JSC::stringProtoFuncLocaleCompare):
420 (JSC::stringProtoFuncBig):
421 (JSC::stringProtoFuncSmall):
422 (JSC::stringProtoFuncBlink):
423 (JSC::stringProtoFuncBold):
424 (JSC::stringProtoFuncFixed):
425 (JSC::stringProtoFuncItalics):
426 (JSC::stringProtoFuncStrike):
427 (JSC::stringProtoFuncSub):
428 (JSC::stringProtoFuncSup):
429 (JSC::stringProtoFuncFontcolor):
430 (JSC::stringProtoFuncFontsize):
431 (JSC::stringProtoFuncAnchor):
432 (JSC::stringProtoFuncLink):
433 (JSC::trimString): Some of this code gets simpler, now that toString()
434 does the right thing. More calls to value(), as above.
436 2012-01-23 Luke Macpherson <macpherson@chromium.org>
438 Unreviewed, rolling out r105676.
439 http://trac.webkit.org/changeset/105676
440 https://bugs.webkit.org/show_bug.cgi?id=76665
442 Breaks build on max due to compile warnings.
444 * runtime/JSObject.cpp:
445 (JSC::JSObject::finalize):
446 (JSC::JSObject::visitChildren):
447 (JSC::JSObject::allocatePropertyStorage):
448 * runtime/JSObject.h:
450 2012-01-23 Mark Hahnenberg <mhahnenberg@apple.com>
452 Use copying collector for out-of-line JSObject property storage
453 https://bugs.webkit.org/show_bug.cgi?id=76665
455 Reviewed by Geoffrey Garen.
457 * runtime/JSObject.cpp:
458 (JSC::JSObject::visitChildren): Changed to use copyAndAppend whenever the property storage is out-of-line.
459 (JSC::JSObject::allocatePropertyStorage): Changed to use tryAllocateStorage/tryReallocateStorage as opposed to
461 * runtime/JSObject.h:
463 2012-01-23 Brian Weinstein <bweinstein@apple.com>
465 More build fixing after r105646.
467 * JavaScriptCore.exp:
469 2012-01-23 Gavin Barraclough <barraclough@apple.com>
471 https://bugs.webkit.org/show_bug.cgi?id=76855
472 Implement a JIT-code aware sampling profiler for JSC
474 Reviewed by Geoff Garen.
476 Step 2: generalize RedBlackTree. The profiler is going to want tio use
477 a RedBlackTree, allow this class to work with subclasses of
478 RedBlackTree::Node, Node should not need to know the names of the m_key
479 and m_value fields (the subclass can provide a key() accessor), and
480 RedBlackTree does not need to know anything about ValueType.
482 * JavaScriptCore.exp:
483 * wtf/MetaAllocator.cpp:
484 (WTF::MetaAllocator::findAndRemoveFreeSpace):
485 (WTF::MetaAllocator::debugFreeSpaceSize):
486 (WTF::MetaAllocator::addFreeSpace):
487 * wtf/MetaAllocator.h:
488 (WTF::MetaAllocator::FreeSpaceNode::FreeSpaceNode):
489 (WTF::MetaAllocator::FreeSpaceNode::key):
490 * wtf/MetaAllocatorHandle.h:
491 (WTF::MetaAllocatorHandle::key):
492 * wtf/RedBlackTree.h:
493 (WTF::RedBlackTree::Node::successor):
494 (WTF::RedBlackTree::Node::predecessor):
495 (WTF::RedBlackTree::Node::parent):
496 (WTF::RedBlackTree::Node::setParent):
497 (WTF::RedBlackTree::Node::left):
498 (WTF::RedBlackTree::Node::setLeft):
499 (WTF::RedBlackTree::Node::right):
500 (WTF::RedBlackTree::Node::setRight):
501 (WTF::RedBlackTree::insert):
502 (WTF::RedBlackTree::remove):
503 (WTF::RedBlackTree::findExact):
504 (WTF::RedBlackTree::findLeastGreaterThanOrEqual):
505 (WTF::RedBlackTree::findGreatestLessThanOrEqual):
506 (WTF::RedBlackTree::first):
507 (WTF::RedBlackTree::last):
508 (WTF::RedBlackTree::size):
509 (WTF::RedBlackTree::treeMinimum):
510 (WTF::RedBlackTree::treeMaximum):
511 (WTF::RedBlackTree::treeInsert):
512 (WTF::RedBlackTree::leftRotate):
513 (WTF::RedBlackTree::rightRotate):
514 (WTF::RedBlackTree::removeFixup):
516 2012-01-23 Andy Estes <aestes@apple.com>
518 Fix the build after r105635.
520 * JavaScriptCore.exp:
522 2012-01-23 Mark Hahnenberg <mhahnenberg@apple.com>
524 Remove StackBounds from JSGlobalData
525 https://bugs.webkit.org/show_bug.cgi?id=76310
527 Reviewed by Sam Weinig.
529 Removed StackBounds and the stack() function from JSGlobalData since it no
530 longer accessed any members of JSGlobalData.
532 * bytecompiler/BytecodeGenerator.cpp:
533 (JSC::BytecodeGenerator::BytecodeGenerator):
534 * heap/MachineStackMarker.cpp:
535 (JSC::MachineThreads::addCurrentThread):
536 (JSC::MachineThreads::gatherFromCurrentThread):
539 * runtime/JSGlobalData.cpp:
540 (JSC::JSGlobalData::JSGlobalData):
541 * runtime/JSGlobalData.h:
543 2012-01-23 Gavin Barraclough <barraclough@apple.com>
545 Implement a JIT-code aware sampling profiler for JSC
546 https://bugs.webkit.org/show_bug.cgi?id=76855
548 Rubber stanmped by Geoff Garen.
550 Mechanical change - pass CodeBlock through to the executable allocator,
551 such that we will be able to map ranges of JIT code back to their owner.
553 * assembler/ARMAssembler.cpp:
554 (JSC::ARMAssembler::executableCopy):
555 * assembler/ARMAssembler.h:
556 * assembler/AssemblerBuffer.h:
557 (JSC::AssemblerBuffer::executableCopy):
558 * assembler/AssemblerBufferWithConstantPool.h:
559 (JSC::AssemblerBufferWithConstantPool::executableCopy):
560 * assembler/LinkBuffer.h:
561 (JSC::LinkBuffer::LinkBuffer):
562 (JSC::LinkBuffer::linkCode):
563 * assembler/MIPSAssembler.h:
564 (JSC::MIPSAssembler::executableCopy):
565 * assembler/SH4Assembler.h:
566 (JSC::SH4Assembler::executableCopy):
567 * assembler/X86Assembler.h:
568 (JSC::X86Assembler::executableCopy):
569 (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
570 * dfg/DFGJITCompiler.cpp:
571 (JSC::DFG::JITCompiler::compile):
572 (JSC::DFG::JITCompiler::compileFunction):
573 * dfg/DFGOSRExitCompiler.cpp:
574 * dfg/DFGRepatch.cpp:
575 (JSC::DFG::generateProtoChainAccessStub):
576 (JSC::DFG::tryCacheGetByID):
577 (JSC::DFG::tryBuildGetByIDList):
578 (JSC::DFG::tryCachePutByID):
580 (JSC::DFG::osrExitGenerationThunkGenerator):
581 * jit/ExecutableAllocator.cpp:
582 (JSC::ExecutableAllocator::allocate):
583 * jit/ExecutableAllocator.h:
584 * jit/ExecutableAllocatorFixedVMPool.cpp:
585 (JSC::ExecutableAllocator::allocate):
587 (JSC::JIT::privateCompile):
588 * jit/JITOpcodes.cpp:
589 (JSC::JIT::privateCompileCTIMachineTrampolines):
590 * jit/JITOpcodes32_64.cpp:
591 (JSC::JIT::privateCompileCTIMachineTrampolines):
592 (JSC::JIT::privateCompileCTINativeCall):
593 * jit/JITPropertyAccess.cpp:
594 (JSC::JIT::stringGetByValStubGenerator):
595 (JSC::JIT::privateCompilePutByIdTransition):
596 (JSC::JIT::privateCompilePatchGetArrayLength):
597 (JSC::JIT::privateCompileGetByIdProto):
598 (JSC::JIT::privateCompileGetByIdSelfList):
599 (JSC::JIT::privateCompileGetByIdProtoList):
600 (JSC::JIT::privateCompileGetByIdChainList):
601 (JSC::JIT::privateCompileGetByIdChain):
602 * jit/JITPropertyAccess32_64.cpp:
603 (JSC::JIT::stringGetByValStubGenerator):
604 (JSC::JIT::privateCompilePutByIdTransition):
605 (JSC::JIT::privateCompilePatchGetArrayLength):
606 (JSC::JIT::privateCompileGetByIdProto):
607 (JSC::JIT::privateCompileGetByIdSelfList):
608 (JSC::JIT::privateCompileGetByIdProtoList):
609 (JSC::JIT::privateCompileGetByIdChainList):
610 (JSC::JIT::privateCompileGetByIdChain):
612 * jit/SpecializedThunkJIT.h:
613 (JSC::SpecializedThunkJIT::finalize):
615 (JSC::Yarr::YarrGenerator::compile):
617 2012-01-23 Xianzhu Wang <wangxianzhu@chromium.org>
619 Basic enhancements to StringBuilder
620 https://bugs.webkit.org/show_bug.cgi?id=67081
622 This change contains the following enhancements to StringBuilder,
623 for convenience, performance, testability, etc.:
624 - Change toStringPreserveCapacity() to const
625 - new public methods: capacity(), swap(), toAtomicString(), canShrink()
626 and append(const StringBuilder&)
627 - == and != opearators to compare StringBuilders and a StringBuilder/String
629 Unit tests: Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp
631 Reviewed by Darin Adler.
633 * JavaScriptCore.exp:
634 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
635 * wtf/text/AtomicString.cpp:
636 (WTF::SubstringTranslator::hash):
637 (WTF::SubstringTranslator::equal):
638 (WTF::SubstringTranslator::translate):
639 (WTF::AtomicString::add):
640 (WTF::AtomicString::addSlowCase):
641 * wtf/text/AtomicString.h:
642 (WTF::AtomicString::AtomicString):
643 (WTF::AtomicString::add):
644 * wtf/text/StringBuilder.cpp:
645 (WTF::StringBuilder::reifyString):
646 (WTF::StringBuilder::resize):
647 (WTF::StringBuilder::canShrink):
648 (WTF::StringBuilder::shrinkToFit):
649 * wtf/text/StringBuilder.h:
650 (WTF::StringBuilder::append):
651 (WTF::StringBuilder::toString):
652 (WTF::StringBuilder::toStringPreserveCapacity):
653 (WTF::StringBuilder::toAtomicString):
654 (WTF::StringBuilder::isEmpty):
655 (WTF::StringBuilder::capacity):
656 (WTF::StringBuilder::is8Bit):
657 (WTF::StringBuilder::swap):
661 * wtf/text/StringImpl.h:
663 2012-01-23 Carlos Garcia Campos <cgarcia@igalia.com>
665 Unreviewed. Fix make distcheck.
667 * GNUmakefile.list.am: Add missing files, remove deleted files and
670 2012-01-22 Filip Pizlo <fpizlo@apple.com>
672 Build fix for non-DFG platforms that error out on warn-unused-parameter.
674 * bytecode/CallLinkStatus.cpp:
675 (JSC::CallLinkStatus::computeFor):
676 * bytecode/GetByIdStatus.cpp:
677 (JSC::GetByIdStatus::computeFor):
678 * bytecode/MethodCallLinkStatus.cpp:
679 (JSC::MethodCallLinkStatus::computeFor):
680 * bytecode/PutByIdStatus.cpp:
681 (JSC::PutByIdStatus::computeFor):
683 2012-01-22 Filip Pizlo <fpizlo@apple.com>
685 Build fix for non-DFG platforms.
687 * bytecode/CallLinkStatus.cpp:
688 (JSC::CallLinkStatus::computeFor):
689 * bytecode/GetByIdStatus.cpp:
690 (JSC::GetByIdStatus::computeFor):
691 * bytecode/MethodCallLinkStatus.cpp:
692 (JSC::MethodCallLinkStatus::computeFor):
693 * bytecode/PutByIdStatus.cpp:
694 (JSC::PutByIdStatus::computeFor):
696 2012-01-20 Filip Pizlo <fpizlo@apple.com>
698 DFG should not have code that directly decodes the states of old JIT inline
699 cache data structures
700 https://bugs.webkit.org/show_bug.cgi?id=76768
702 Reviewed by Sam Weinig.
704 Introduced new classes (like GetByIdStatus) that encapsulate the set of things
705 that the DFG would like to know about property accesses and calls. Whereas it
706 previously got this information by directly decoding the data structures used
707 by the old JIT for inline caching, it now uses these classes, which do the work
708 for it. This should make it somewhat more straight forward to introduce new
709 ways of profiling the same information.
711 Also hoisted StructureSet into bytecode/ from dfg/, because it's now used by
714 Making this work right involved carefully ensuring that the heuristics for
715 choosing how to handle property accesses was at least as good as what we had
716 before, since I completely restructured that code. Currently the performance
717 looks neutral. Since I rewrote the code I did change some things that I never
718 liked before, like previously if a put_bu_id had executed exactly once then
719 we'd compile it as if it had taken slow-path. Executing once is special because
720 then the inline cache is not baked in, so there is no information about how the
721 DFG should optimize the code. Now this is rationalized: if the put_by_id does
722 not offer enough information to be optimized (i.e. had executed 0 or 1 times)
723 then we turn it into a forced OSR exit (i.e. a patch point). However, get_by_id
724 still has the old behavior; I left it that way because I didn't want to make
725 too many changes at once.
728 * GNUmakefile.list.am:
729 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
730 * JavaScriptCore.xcodeproj/project.pbxproj:
732 * bytecode/CallLinkStatus.cpp: Added.
733 (JSC::CallLinkStatus::computeFor):
734 * bytecode/CallLinkStatus.h: Added.
735 (JSC::CallLinkStatus::CallLinkStatus):
736 (JSC::CallLinkStatus::isSet):
737 (JSC::CallLinkStatus::operator!):
738 (JSC::CallLinkStatus::couldTakeSlowPath):
739 (JSC::CallLinkStatus::callTarget):
740 * bytecode/GetByIdStatus.cpp: Added.
741 (JSC::GetByIdStatus::computeFor):
742 * bytecode/GetByIdStatus.h: Added.
743 (JSC::GetByIdStatus::GetByIdStatus):
744 (JSC::GetByIdStatus::state):
745 (JSC::GetByIdStatus::isSet):
746 (JSC::GetByIdStatus::operator!):
747 (JSC::GetByIdStatus::isSimpleDirect):
748 (JSC::GetByIdStatus::takesSlowPath):
749 (JSC::GetByIdStatus::makesCalls):
750 (JSC::GetByIdStatus::structureSet):
751 (JSC::GetByIdStatus::offset):
752 * bytecode/MethodCallLinkStatus.cpp: Added.
753 (JSC::MethodCallLinkStatus::computeFor):
754 * bytecode/MethodCallLinkStatus.h: Added.
755 (JSC::MethodCallLinkStatus::MethodCallLinkStatus):
756 (JSC::MethodCallLinkStatus::isSet):
757 (JSC::MethodCallLinkStatus::operator!):
758 (JSC::MethodCallLinkStatus::needsPrototypeCheck):
759 (JSC::MethodCallLinkStatus::structure):
760 (JSC::MethodCallLinkStatus::prototypeStructure):
761 (JSC::MethodCallLinkStatus::function):
762 (JSC::MethodCallLinkStatus::prototype):
763 * bytecode/PutByIdStatus.cpp: Added.
764 (JSC::PutByIdStatus::computeFor):
765 * bytecode/PutByIdStatus.h: Added.
766 (JSC::PutByIdStatus::PutByIdStatus):
767 (JSC::PutByIdStatus::state):
768 (JSC::PutByIdStatus::isSet):
769 (JSC::PutByIdStatus::operator!):
770 (JSC::PutByIdStatus::isSimpleReplace):
771 (JSC::PutByIdStatus::isSimpleTransition):
772 (JSC::PutByIdStatus::takesSlowPath):
773 (JSC::PutByIdStatus::oldStructure):
774 (JSC::PutByIdStatus::newStructure):
775 (JSC::PutByIdStatus::structureChain):
776 (JSC::PutByIdStatus::offset):
777 * bytecode/StructureSet.h: Added.
778 (JSC::StructureSet::StructureSet):
779 (JSC::StructureSet::clear):
780 (JSC::StructureSet::add):
781 (JSC::StructureSet::addAll):
782 (JSC::StructureSet::remove):
783 (JSC::StructureSet::contains):
784 (JSC::StructureSet::isSubsetOf):
785 (JSC::StructureSet::isSupersetOf):
786 (JSC::StructureSet::size):
787 (JSC::StructureSet::at):
788 (JSC::StructureSet::operator[]):
789 (JSC::StructureSet::last):
790 (JSC::StructureSet::predictionFromStructures):
791 (JSC::StructureSet::operator==):
792 (JSC::StructureSet::dump):
793 * dfg/DFGAbstractValue.h:
794 * dfg/DFGByteCodeParser.cpp:
795 (JSC::DFG::ByteCodeParser::handleCall):
796 (JSC::DFG::ByteCodeParser::parseBlock):
797 * dfg/DFGStructureSet.h: Removed.
799 2012-01-20 Filip Pizlo <fpizlo@apple.com>
801 JIT compilation should not require ExecState
802 https://bugs.webkit.org/show_bug.cgi?id=76729
803 <rdar://problem/10731545>
805 Reviewed by Gavin Barraclough.
807 Changed the relevant JIT driver functions to take JSGlobalData& instead of
808 ExecState*, since really they just needed the global data.
812 (JSC::DFG::tryCompile):
813 (JSC::DFG::tryCompileFunction):
815 (JSC::DFG::tryCompile):
816 (JSC::DFG::tryCompileFunction):
818 (JSC::jitCompileIfAppropriate):
819 (JSC::jitCompileFunctionIfAppropriate):
820 * runtime/Executable.cpp:
821 (JSC::EvalExecutable::compileInternal):
822 (JSC::ProgramExecutable::compileInternal):
823 (JSC::FunctionExecutable::compileForCallInternal):
824 (JSC::FunctionExecutable::compileForConstructInternal):
826 2012-01-20 David Levin <levin@chromium.org>
828 Make OwnPtr<HDC> work for the Chromium Windows port.
829 https://bugs.webkit.org/show_bug.cgi?id=76738
833 * JavaScriptCore.gyp/JavaScriptCore.gyp: Added OwnPtrWin.cpp to the
834 Chromium Windows build.
835 * wtf/OwnPtrCommon.h: Changed from platform WIN to OS WIN for
836 OwnPtr<HDC> and similar constructs.
838 2012-01-19 Geoffrey Garen <ggaren@apple.com>
840 Removed some regexp entry boilerplate code
841 https://bugs.webkit.org/show_bug.cgi?id=76687
843 Reviewed by Darin Adler.
845 1% - 2% speedup on regexp tests, no change overall.
847 * runtime/RegExp.cpp:
848 (JSC::RegExp::match):
849 - ASSERT that our startIndex is non-negative, because anything less
850 would be uncivilized.
852 - ASSERT that our input is not the null string for the same reason.
854 - No need to test for startOffset being past the end of the string,
855 since the regular expression engine will do this test for us.
857 - No need to initialize the output vector, since the regular expression
858 engine will fill it in for us.
860 * yarr/YarrInterpreter.cpp:
861 (JSC::Yarr::Interpreter::interpret):
863 (JSC::Yarr::YarrGenerator::compile):
865 RegExp used to do these jobs for us, but now we do them for ourselves
866 because it's a better separation of concerns, and the JIT can do them
867 more efficiently than C++ code:
869 - Test for "past the end" before doing any matching -- otherwise
870 a* will match with zero length past the end of the string, which is wrong.
872 - Initialize the output vector before doing any matching.
874 2012-01-20 Filip Pizlo <fpizlo@apple.com>
876 Build fix for no-DFG configuration.
877 Needed for <rdar://problem/10727689>.
879 * bytecompiler/BytecodeGenerator.cpp:
880 (JSC::BytecodeGenerator::emitProfiledOpcode):
882 (JSC::JIT::emitValueProfilingSite):
884 2012-01-19 Filip Pizlo <fpizlo@apple.com>
886 Bytecode instructions that may have value profiling should have a direct inline
887 link to the ValueProfile instance
888 https://bugs.webkit.org/show_bug.cgi?id=76682
889 <rdar://problem/10727689>
891 Reviewed by Sam Weinig.
893 Each opcode that gets value profiled now has a link to its ValueProfile. This
894 required rationalizing the emission of value profiles for opcode combos, like
895 op_method_check/op_get_by_id and op_call/op_call_put_result. It only makes
896 sense for one of them to have a value profile link, and it makes most sense
897 for it to be the one that actually sets the result. The previous behavior was
898 to have op_method_check profile for op_get_by_id when they were used together,
899 but otherwise for op_get_by_id to have its own profiles. op_call already did
900 the right thing; all profiling was done by op_call_put_result.
902 But rationalizing this code required breaking some of the natural boundaries
903 that the code had; for instance the code in DFG that emits a GetById in place
904 of both op_method_check and op_get_by_id must now know that it's the latter of
905 those that has the value profile, while the first of those constitutes the OSR
906 target. Hence each CodeOrigin must now have two bytecode indices - one for
907 OSR exit and one for profiling.
909 Finally this change required some refiddling of our optimization heuristics,
910 because now all code blocks have "more instructions" due to the value profile
913 * bytecode/CodeBlock.cpp:
914 (JSC::CodeBlock::printGetByIdOp):
915 (JSC::CodeBlock::dump):
916 * bytecode/CodeBlock.h:
917 (JSC::CodeBlock::valueProfileForBytecodeOffset):
918 * bytecode/CodeOrigin.h:
919 (JSC::CodeOrigin::CodeOrigin):
920 (JSC::CodeOrigin::bytecodeIndexForValueProfile):
921 * bytecode/Instruction.h:
922 (JSC::Instruction::Instruction):
924 * bytecompiler/BytecodeGenerator.cpp:
925 (JSC::BytecodeGenerator::emitProfiledOpcode):
926 (JSC::BytecodeGenerator::emitResolve):
927 (JSC::BytecodeGenerator::emitGetScopedVar):
928 (JSC::BytecodeGenerator::emitResolveBase):
929 (JSC::BytecodeGenerator::emitResolveBaseForPut):
930 (JSC::BytecodeGenerator::emitResolveWithBase):
931 (JSC::BytecodeGenerator::emitResolveWithThis):
932 (JSC::BytecodeGenerator::emitGetById):
933 (JSC::BytecodeGenerator::emitGetByVal):
934 (JSC::BytecodeGenerator::emitCall):
935 (JSC::BytecodeGenerator::emitCallVarargs):
936 (JSC::BytecodeGenerator::emitConstruct):
937 * bytecompiler/BytecodeGenerator.h:
938 * dfg/DFGByteCodeParser.cpp:
939 (JSC::DFG::ByteCodeParser::ByteCodeParser):
940 (JSC::DFG::ByteCodeParser::currentCodeOrigin):
941 (JSC::DFG::ByteCodeParser::addCall):
942 (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
943 (JSC::DFG::ByteCodeParser::getPrediction):
944 (JSC::DFG::ByteCodeParser::handleCall):
945 (JSC::DFG::ByteCodeParser::handleInlining):
946 (JSC::DFG::ByteCodeParser::parseBlock):
947 (JSC::DFG::ByteCodeParser::parse):
949 (JSC::DFG::Graph::valueProfileFor):
951 (JSC::JIT::emitValueProfilingSite):
953 (JSC::JIT::emit_op_call_put_result):
954 * jit/JITCall32_64.cpp:
955 (JSC::JIT::emit_op_call_put_result):
956 * jit/JITInlineMethods.h:
957 (JSC::JIT::emitValueProfilingSite):
958 * jit/JITOpcodes.cpp:
959 (JSC::JIT::emit_op_resolve):
960 (JSC::JIT::emit_op_resolve_base):
961 (JSC::JIT::emit_op_resolve_skip):
962 (JSC::JIT::emit_op_resolve_global):
963 (JSC::JIT::emitSlow_op_resolve_global):
964 (JSC::JIT::emit_op_resolve_with_base):
965 (JSC::JIT::emit_op_resolve_with_this):
966 (JSC::JIT::emitSlow_op_resolve_global_dynamic):
967 * jit/JITOpcodes32_64.cpp:
968 (JSC::JIT::emit_op_resolve):
969 (JSC::JIT::emit_op_resolve_base):
970 (JSC::JIT::emit_op_resolve_skip):
971 (JSC::JIT::emit_op_resolve_global):
972 (JSC::JIT::emitSlow_op_resolve_global):
973 (JSC::JIT::emit_op_resolve_with_base):
974 (JSC::JIT::emit_op_resolve_with_this):
975 * jit/JITPropertyAccess.cpp:
976 (JSC::JIT::emit_op_get_by_val):
977 (JSC::JIT::emitSlow_op_get_by_val):
978 (JSC::JIT::emit_op_method_check):
979 (JSC::JIT::emitSlow_op_method_check):
980 (JSC::JIT::emit_op_get_by_id):
981 (JSC::JIT::emitSlow_op_get_by_id):
982 (JSC::JIT::emit_op_get_scoped_var):
983 (JSC::JIT::emit_op_get_global_var):
984 * jit/JITPropertyAccess32_64.cpp:
985 (JSC::JIT::emit_op_method_check):
986 (JSC::JIT::emitSlow_op_method_check):
987 (JSC::JIT::emit_op_get_by_val):
988 (JSC::JIT::emitSlow_op_get_by_val):
989 (JSC::JIT::emit_op_get_by_id):
990 (JSC::JIT::emitSlow_op_get_by_id):
991 (JSC::JIT::emit_op_get_scoped_var):
992 (JSC::JIT::emit_op_get_global_var):
994 (JSC::JITStubCall::callWithValueProfiling):
995 * runtime/Options.cpp:
996 (JSC::Options::initializeOptions):
998 2012-01-20 ChangSeok Oh <shivamidow@gmail.com>
1000 undefined reference to symbol eina_module_free
1001 https://bugs.webkit.org/show_bug.cgi?id=76681
1003 Reviewed by Martin Robinson.
1005 eina_module_free has been used without including eina libraries after r104936.
1007 * wtf/PlatformEfl.cmake: Add EINA_LIBRARIES.
1009 2012-01-19 Tony Chang <tony@chromium.org>
1011 [chromium] Remove an obsolete comment about features.gypi
1012 https://bugs.webkit.org/show_bug.cgi?id=76643
1014 There can be only one features.gypi.
1016 Reviewed by James Robinson.
1018 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1020 2012-01-19 Geoffrey Garen <ggaren@apple.com>
1022 Implicit creation of a regular expression should eagerly check for syntax errors
1023 https://bugs.webkit.org/show_bug.cgi?id=76642
1025 Reviewed by Oliver Hunt.
1027 This is a correctness fix and a slight optimization.
1029 * runtime/StringPrototype.cpp:
1030 (JSC::stringProtoFuncMatch):
1031 (JSC::stringProtoFuncSearch): Check for syntax errors because that's the
1034 * runtime/RegExp.cpp:
1035 (JSC::RegExp::match): ASSERT that we aren't a syntax error. (One line
1036 of code change, many lines of indentation change.)
1038 Since we have no clients that try to match a RegExp that is a syntax error,
1039 let's optimize out the check.
1041 2012-01-19 Mark Hahnenberg <mhahnenberg@apple.com>
1043 Implement a new allocator for backing stores
1044 https://bugs.webkit.org/show_bug.cgi?id=75181
1046 Reviewed by Filip Pizlo.
1048 We want to move away from using fastMalloc for the backing stores for
1049 some of our objects (e.g. JSArray, JSObject, JSString, etc). These backing
1050 stores have a nice property in that they only have a single owner (i.e. a
1051 single pointer to them at any one time). One way that we can take advantage
1052 of this property is to implement a simple bump allocator/copying collector,
1053 which will run alongside our normal mark/sweep collector, that only needs to
1054 update the single owner pointer rather than having to redirect an arbitrary
1055 number of pointers in from-space to to-space.
1057 This plan can give us a number of benefits. We can beat fastMalloc in terms
1058 of both performance and memory usage, we can track how much memory we're using
1059 far more accurately than our rough estimation now through the use of
1060 reportExtraMemoryCost, and we can allocate arbitrary size objects (as opposed
1061 to being limited to size classes like we have been historically). This is also
1062 another step toward moving away from lazy destruction, which will improve our memory footprint.
1064 We start by creating said allocator and moving the ArrayStorage for JSArray
1065 to use it rather than fastMalloc.
1067 The design of the collector is as follows:
1069 -The collector allocates 64KB chunks from the OS to use for object allocation.
1070 -Each chunk contains an offset, a flag indicating if the block has been pinned,
1071 and a payload, along with next and prev pointers so that they can be put in DoublyLinkedLists.
1072 -Any allocation greater than 64KB gets its own separate oversize block, which
1073 is managed separately from the rest.
1074 -If the allocator receives a request for more than the remaining amount in the
1075 current block, it grabs a fresh block.
1076 -Grabbing a fresh block means grabbing one off of the global free list (which is now
1077 shared between the mark/sweep allocator and the bump allocator) if there is one.
1078 If there isn't a new one we do one of two things: allocate a new block from the OS
1079 if we're not ready for a GC yet, or run a GC and then try again. If we still don't
1080 have enough space after the GC, we allocate a new block from the OS.
1083 -At the start of garbage collection during conservative stack scanning, if we encounter
1084 what appears to be a pointer to a bump-allocated block of memory, we pin that block so
1085 that it will not be copied for this round of collection.
1086 -We also pin any oversize blocks that we encounter, which effectively doubles as a
1087 "mark bit" for that block. Any oversize blocks that aren't pinned at the end of copying
1088 are given back to the OS.
1089 -Marking threads are now also responsible for copying bump-allocated objects to newSpace
1090 -Each marking thread has a private 64KB block into which it copies bump-allocated objects that it encounters.
1091 -When that block fills up, the marking thread gives it back to the allocator and requests a new one.
1092 -When all marking has concluded, each thread gives back its copy block, even if it isn't full.
1093 -At the conclusion of copying (which is done by the end of the marking phase), we un-pin
1094 any pinned blocks and give any blocks left in from-space to the global free list.
1097 * GNUmakefile.list.am:
1098 * JavaScriptCore.gypi:
1099 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1100 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1101 * JavaScriptCore.xcodeproj/project.pbxproj:
1103 * heap/AllocationSpace.cpp:
1104 (JSC::AllocationSpace::allocateSlowCase):
1105 (JSC::AllocationSpace::allocateBlock):
1106 (JSC::AllocationSpace::freeBlocks):
1107 * heap/AllocationSpace.h:
1108 (JSC::AllocationSpace::waterMark):
1109 * heap/BumpBlock.h: Added.
1110 (JSC::BumpBlock::BumpBlock):
1111 * heap/BumpSpace.cpp: Added.
1112 (JSC::BumpSpace::tryAllocateSlowCase):
1113 * heap/BumpSpace.h: Added.
1114 (JSC::BumpSpace::isInCopyPhase):
1115 (JSC::BumpSpace::totalMemoryAllocated):
1116 (JSC::BumpSpace::totalMemoryUtilized):
1117 * heap/BumpSpaceInlineMethods.h: Added.
1118 (JSC::BumpSpace::BumpSpace):
1119 (JSC::BumpSpace::init):
1120 (JSC::BumpSpace::contains):
1121 (JSC::BumpSpace::pin):
1122 (JSC::BumpSpace::startedCopying):
1123 (JSC::BumpSpace::doneCopying):
1124 (JSC::BumpSpace::doneFillingBlock):
1125 (JSC::BumpSpace::recycleBlock):
1126 (JSC::BumpSpace::getFreshBlock):
1127 (JSC::BumpSpace::borrowBlock):
1128 (JSC::BumpSpace::addNewBlock):
1129 (JSC::BumpSpace::allocateNewBlock):
1130 (JSC::BumpSpace::fitsInBlock):
1131 (JSC::BumpSpace::fitsInCurrentBlock):
1132 (JSC::BumpSpace::tryAllocate):
1133 (JSC::BumpSpace::tryAllocateOversize):
1134 (JSC::BumpSpace::allocateFromBlock):
1135 (JSC::BumpSpace::tryReallocate):
1136 (JSC::BumpSpace::tryReallocateOversize):
1137 (JSC::BumpSpace::isOversize):
1138 (JSC::BumpSpace::isPinned):
1139 (JSC::BumpSpace::oversizeBlockFor):
1140 (JSC::BumpSpace::blockFor):
1141 * heap/ConservativeRoots.cpp:
1142 (JSC::ConservativeRoots::ConservativeRoots):
1143 (JSC::ConservativeRoots::genericAddPointer):
1144 (JSC::ConservativeRoots::add):
1145 * heap/ConservativeRoots.h:
1148 (JSC::Heap::blockFreeingThreadMain):
1149 (JSC::Heap::reportExtraMemoryCostSlowCase):
1150 (JSC::Heap::getConservativeRegisterRoots):
1151 (JSC::Heap::markRoots):
1152 (JSC::Heap::collect):
1153 (JSC::Heap::releaseFreeBlocks):
1155 (JSC::Heap::waterMark):
1156 (JSC::Heap::highWaterMark):
1157 (JSC::Heap::setHighWaterMark):
1158 (JSC::Heap::tryAllocateStorage):
1159 (JSC::Heap::tryReallocateStorage):
1160 * heap/HeapBlock.h: Added.
1161 (JSC::HeapBlock::HeapBlock):
1162 * heap/MarkStack.cpp:
1163 (JSC::MarkStackThreadSharedData::MarkStackThreadSharedData):
1164 (JSC::SlotVisitor::drain):
1165 (JSC::SlotVisitor::drainFromShared):
1166 (JSC::SlotVisitor::startCopying):
1167 (JSC::SlotVisitor::allocateNewSpace):
1168 (JSC::SlotVisitor::copy):
1169 (JSC::SlotVisitor::copyAndAppend):
1170 (JSC::SlotVisitor::doneCopying):
1172 * heap/MarkedBlock.cpp:
1173 (JSC::MarkedBlock::recycle):
1174 (JSC::MarkedBlock::MarkedBlock):
1175 * heap/MarkedBlock.h:
1176 * heap/MarkedSpace.cpp:
1177 (JSC::MarkedSpace::MarkedSpace):
1178 * heap/MarkedSpace.h:
1179 (JSC::MarkedSpace::allocate):
1180 (JSC::MarkedSpace::forEachBlock):
1181 (JSC::MarkedSpace::SizeClass::resetAllocator):
1182 * heap/SlotVisitor.h:
1183 (JSC::SlotVisitor::SlotVisitor):
1184 * heap/TinyBloomFilter.h:
1185 (JSC::TinyBloomFilter::reset):
1186 * runtime/JSArray.cpp:
1187 (JSC::JSArray::JSArray):
1188 (JSC::JSArray::finishCreation):
1189 (JSC::JSArray::tryFinishCreationUninitialized):
1190 (JSC::JSArray::~JSArray):
1191 (JSC::JSArray::enterSparseMode):
1192 (JSC::JSArray::defineOwnNumericProperty):
1193 (JSC::JSArray::setLengthWritable):
1194 (JSC::JSArray::getOwnPropertySlotByIndex):
1195 (JSC::JSArray::getOwnPropertyDescriptor):
1196 (JSC::JSArray::putByIndexBeyondVectorLength):
1197 (JSC::JSArray::deletePropertyByIndex):
1198 (JSC::JSArray::getOwnPropertyNames):
1199 (JSC::JSArray::increaseVectorLength):
1200 (JSC::JSArray::unshiftCountSlowCase):
1201 (JSC::JSArray::setLength):
1202 (JSC::JSArray::pop):
1203 (JSC::JSArray::unshiftCount):
1204 (JSC::JSArray::visitChildren):
1205 (JSC::JSArray::sortNumeric):
1206 (JSC::JSArray::sort):
1207 (JSC::JSArray::compactForSorting):
1208 (JSC::JSArray::subclassData):
1209 (JSC::JSArray::setSubclassData):
1210 (JSC::JSArray::checkConsistency):
1211 * runtime/JSArray.h:
1212 (JSC::JSArray::inSparseMode):
1213 (JSC::JSArray::isLengthWritable):
1214 * wtf/CheckedBoolean.h: Added.
1215 (CheckedBoolean::CheckedBoolean):
1216 (CheckedBoolean::~CheckedBoolean):
1217 (CheckedBoolean::operator bool):
1218 * wtf/DoublyLinkedList.h:
1220 * wtf/StdLibExtras.h:
1221 (WTF::isPointerAligned):
1223 2012-01-19 Joi Sigurdsson <joi@chromium.org>
1225 Enable use of precompiled headers in Chromium port on Windows.
1227 Bug 76381 - Use precompiled headers in Chromium port on Windows
1228 https://bugs.webkit.org/show_bug.cgi?id=76381
1230 Reviewed by Tony Chang.
1232 * JavaScriptCore.gyp/JavaScriptCore.gyp: Include WinPrecompile.gypi.
1234 2012-01-18 Roland Takacs <takacs.roland@stud.u-szeged.hu>
1236 Cross-platform processor core counter fix
1237 https://bugs.webkit.org/show_bug.cgi?id=76540
1239 Reviewed by Zoltan Herczeg.
1241 I attached "OS(FREEBSD)" to "#if OS(DARWIN) || OS(OPENBSD) || OS(NETBSD)"
1242 and I removed the OS checking macros from ParallelJobsGeneric.cpp because
1243 the NumberOfCores.cpp contains them for counting CPU cores.
1244 The processor core counter patch located at
1245 https://bugs.webkit.org/show_bug.cgi?id=76530
1247 * wtf/NumberOfCores.cpp:
1248 * wtf/ParallelJobsGeneric.cpp:
1250 2012-01-18 Csaba Osztrogonác <ossy@webkit.org>
1252 Cross-platform processor core counter
1253 https://bugs.webkit.org/show_bug.cgi?id=76530
1255 Unreviewed cross-MinGW buildfix after r105270.
1257 * wtf/NumberOfCores.cpp: Use windows.h instead of Windows.h.
1259 2012-01-18 Roland Takacs <takacs.roland@stud.u-szeged.hu>
1261 Cross-platform processor core counter
1262 https://bugs.webkit.org/show_bug.cgi?id=76530
1264 Reviewed by Zoltan Herczeg.
1266 Two files have been created that include the processor core counter function.
1267 It used to be in ParallelJobsGeneric.h/cpp before.
1269 * GNUmakefile.list.am:
1270 * JavaScriptCore.gypi:
1271 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1272 * JavaScriptCore.xcodeproj/project.pbxproj:
1273 * runtime/Options.cpp:
1274 (JSC::Options::initializeOptions):
1275 * wtf/CMakeLists.txt:
1276 * wtf/NumberOfCores.cpp: Added.
1277 (WTF::numberOfProcessorCores):
1278 * wtf/NumberOfCores.h: Added.
1279 * wtf/ParallelJobsGeneric.cpp:
1280 (WTF::ParallelEnvironment::ParallelEnvironment):
1281 * wtf/ParallelJobsGeneric.h:
1283 2012-01-18 Balazs Kelemen <kbalazs@webkit.org>
1285 [Qt] Consolidate layout test crash logging
1286 https://bugs.webkit.org/show_bug.cgi?id=75088
1288 Reviewed by Simon Hausmann.
1290 Move backtrace generating logic into WTFReportBacktrace
1291 and add a way to deinstall signal handlers if we know
1292 that we have already printed the backtrace.
1294 * JavaScriptCore.exp:
1295 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1296 * wtf/Assertions.cpp:
1297 (WTFLogLocker::WTFReportBacktrace):
1298 (WTFLogLocker::WTFSetCrashHook):
1299 (WTFLogLocker::WTFInvokeCrashHook):
1302 2012-01-17 Geoffrey Garen <ggaren@apple.com>
1304 Factored out some code into a helper function.
1306 I think this might help getting rid of omit-frame-pointer.
1308 Reviewed by Sam Weinig.
1310 No benchmark change.
1312 * runtime/StringPrototype.cpp:
1313 (JSC::removeUsingRegExpSearch): Moved to here...
1314 (JSC::replaceUsingRegExpSearch): ...from here.
1316 2012-01-17 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
1318 Uint8ClampedArray support
1319 https://bugs.webkit.org/show_bug.cgi?id=74455
1321 Reviewed by Filip Pizlo.
1323 * GNUmakefile.list.am:
1324 * JavaScriptCore.xcodeproj/project.pbxproj:
1325 * bytecode/PredictedType.cpp:
1326 (JSC::predictionToString):
1327 (JSC::predictionFromClassInfo):
1328 * bytecode/PredictedType.h:
1329 (JSC::isUint8ClampedArrayPrediction):
1330 (JSC::isActionableMutableArrayPrediction):
1331 * dfg/DFGAbstractState.cpp:
1332 (JSC::DFG::AbstractState::initialize):
1333 (JSC::DFG::AbstractState::execute):
1335 (JSC::DFG::Node::shouldSpeculateUint8ClampedArray):
1336 * dfg/DFGPropagator.cpp:
1337 (JSC::DFG::Propagator::propagateNodePredictions):
1338 (JSC::DFG::Propagator::fixupNode):
1339 (JSC::DFG::Propagator::performNodeCSE):
1340 * dfg/DFGSpeculativeJIT.cpp:
1341 (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
1342 (JSC::DFG::clampDoubleToByte):
1343 (JSC::DFG::compileClampIntegerToByte):
1344 (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
1345 (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
1346 (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
1347 * dfg/DFGSpeculativeJIT.h:
1348 * dfg/DFGSpeculativeJIT32_64.cpp:
1349 (JSC::DFG::SpeculativeJIT::compile):
1350 * dfg/DFGSpeculativeJIT64.cpp:
1351 (JSC::DFG::SpeculativeJIT::compile):
1353 * runtime/JSGlobalData.h:
1356 * wtf/Uint8ClampedArray.h: Added.
1357 (WTF::Uint8ClampedArray::set):
1358 (WTF::Uint8ClampedArray::create):
1359 (WTF::Uint8ClampedArray::Uint8ClampedArray):
1360 (WTF::Uint8ClampedArray::subarray):
1362 2012-01-17 Sam Weinig <sam@webkit.org>
1364 Add helper macro for forward declaring objective-c classes
1365 https://bugs.webkit.org/show_bug.cgi?id=76485
1367 Reviewed by Anders Carlsson.
1370 Add OBJC_CLASS macro which helps reduce code when forward declaring an
1371 objective-c class in a header which can be included from both Objective-C
1372 and non-Objective-C files.
1374 2012-01-17 Filip Pizlo <fpizlo@apple.com>
1376 DFG should be able to do JS and custom getter caching
1377 https://bugs.webkit.org/show_bug.cgi?id=76361
1379 Reviewed by Csaba Osztrogonác.
1383 * dfg/DFGRepatch.cpp:
1384 (JSC::DFG::tryBuildGetByIDList):
1385 * dfg/DFGSpeculativeJIT32_64.cpp:
1386 (JSC::DFG::SpeculativeJIT::compile):
1388 2012-01-15 Filip Pizlo <fpizlo@apple.com>
1390 DFG should be able to do JS and custom getter caching
1391 https://bugs.webkit.org/show_bug.cgi?id=76361
1392 <rdar://problem/10698060>
1394 Reviewed by Geoff Garen.
1396 Added the ability to cache JS getter calls and custom getter calls in the DFG.
1397 Most of this is pretty mundane, since the old JIT supported this functionality
1398 as well. But a couple interesting things had to happen:
1400 - There are now two variants of GetById: GetById, which works as before, and
1401 GetByIdFlush, which flushes registers prior to doing the GetById. Only
1402 GetByIdFlush can be used for caching getters. We detect which GetById style
1403 to use by looking at the inline caches of the old JIT.
1405 - Exception handling for getter calls planted in stubs uses a separate lookup
1406 handler routine, which uses the CodeOrigin stored in the StructureStubInfo.
1408 This is a 40% speed-up in the Dromaeo DOM Traversal average. It removes all of
1409 the DFG regressions we saw in Dromaeo. This is neutral on SunSpider, V8, and
1412 * bytecode/StructureStubInfo.h:
1413 * dfg/DFGAbstractState.cpp:
1414 (JSC::DFG::AbstractState::execute):
1415 * dfg/DFGAssemblyHelpers.h:
1416 (JSC::DFG::AssemblyHelpers::emitExceptionCheck):
1417 * dfg/DFGByteCodeParser.cpp:
1418 (JSC::DFG::ByteCodeParser::willNeedFlush):
1419 (JSC::DFG::ByteCodeParser::parseBlock):
1420 * dfg/DFGCCallHelpers.h:
1421 (JSC::DFG::CCallHelpers::setupResults):
1422 * dfg/DFGJITCompiler.cpp:
1423 (JSC::DFG::JITCompiler::link):
1424 * dfg/DFGJITCompiler.h:
1425 (JSC::DFG::PropertyAccessRecord::PropertyAccessRecord):
1426 (JSC::DFG::JITCompiler::addExceptionCheck):
1428 (JSC::DFG::Node::hasIdentifier):
1429 (JSC::DFG::Node::hasHeapPrediction):
1430 * dfg/DFGOperations.cpp:
1431 * dfg/DFGOperations.h:
1432 * dfg/DFGPropagator.cpp:
1433 (JSC::DFG::Propagator::propagateNodePredictions):
1434 * dfg/DFGRepatch.cpp:
1435 (JSC::DFG::tryCacheGetByID):
1436 (JSC::DFG::tryBuildGetByIDList):
1437 * dfg/DFGSpeculativeJIT.h:
1438 (JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheckSetResult):
1439 * dfg/DFGSpeculativeJIT32_64.cpp:
1440 (JSC::DFG::SpeculativeJIT::cachedGetById):
1441 (JSC::DFG::SpeculativeJIT::compile):
1442 * dfg/DFGSpeculativeJIT64.cpp:
1443 (JSC::DFG::SpeculativeJIT::cachedGetById):
1444 (JSC::DFG::SpeculativeJIT::compile):
1446 2012-01-16 Jon Lee <jonlee@apple.com>
1448 Build fix for r105086.
1450 * Configurations/FeatureDefines.xcconfig:
1453 2012-01-16 Jon Lee <jonlee@apple.com>
1455 Remove HTML notifications support on Mac
1456 https://bugs.webkit.org/show_bug.cgi?id=76401
1457 <rdar://problem/10589881>
1459 Reviewed by Sam Weinig.
1461 * wtf/Platform.h: Define ENABLE_HTML_NOTIFICATIONS macro.
1463 2012-01-16 Zeno Albisser <zeno@webkit.org>
1465 [Qt] Fix QT_VERSION related warnings when building on Mac OS X
1466 https://bugs.webkit.org/show_bug.cgi?id=76340
1468 This bug was caused by r104826.
1469 As already mentioned for https://bugs.webkit.org/show_bug.cgi?id=57239
1470 we should not use "using namespace WebCore" in header files,
1471 because it might cause ambiguous references.
1472 This patch reverts the changes from r104826 and r104981
1473 and removes the "using namespace WebCore" statement from
1476 Reviewed by Tor Arne Vestbø.
1480 2012-01-16 Carlos Garcia Campos <cgarcia@igalia.com>
1482 Unreviewed. Fix make distcheck.
1484 * GNUmakefile.list.am: Fix typo.
1486 2012-01-16 Pavel Heimlich <tropikhajma@gmail.com>
1488 Solaris Studio supports alignment macros too
1489 https://bugs.webkit.org/show_bug.cgi?id=75453
1491 Reviewed by Hajime Morita.
1495 2012-01-16 Yuqiang Xian <yuqiang.xian@intel.com>
1497 Build fix on 32bit if verbose debug is enabled in DFG
1498 https://bugs.webkit.org/show_bug.cgi?id=76351
1500 Reviewed by Hajime Morita.
1502 Mostly change "%lu" to "%zu" to print a "size_t" variable.
1504 * dfg/DFGAbstractState.cpp:
1505 (JSC::DFG::AbstractState::endBasicBlock):
1506 * dfg/DFGByteCodeParser.cpp:
1507 (JSC::DFG::ByteCodeParser::handleCall):
1508 (JSC::DFG::ByteCodeParser::handleInlining):
1509 (JSC::DFG::ByteCodeParser::parseBlock):
1510 (JSC::DFG::ByteCodeParser::parseCodeBlock):
1512 (JSC::DFG::Graph::predictArgumentTypes):
1513 * dfg/DFGJITCompiler.cpp:
1514 (JSC::DFG::JITCompiler::link):
1515 * dfg/DFGOSREntry.cpp:
1516 (JSC::DFG::prepareOSREntry):
1518 2012-01-15 Filip Pizlo <fpizlo@apple.com>
1520 The C calling convention logic in DFG::SpeculativeJIT should be available even
1521 when not generating code for the DFG speculative path
1522 https://bugs.webkit.org/show_bug.cgi?id=76355
1524 Reviewed by Dan Bernstein.
1526 Moved all of the logic for placing C call arguments into the right place (stack
1527 or registers) into a new class, DFG::CCallHelpers. This class inherits from
1528 AssemblyHelpers, another DFG grab-bag of helper functions. I could have moved
1529 this code into AssemblyHelpers, but decided against it, because I wanted to
1530 limit the number of methods each class in the JIT has. Hence now we have a
1531 slightly odd organization of JIT classes in DFG: MacroAssembler (basic instruction
1532 emission) <= AssemblyHelpers (some additional JS smarts) <= CCallHelpers
1533 (understands calls to C functions) <= JITCompiler (can compile a graph to machine
1534 code). Each of these except for JITCompiler can be reused for stub compilation.
1536 * GNUmakefile.list.am:
1537 * JavaScriptCore.xcodeproj/project.pbxproj:
1538 * dfg/DFGCCallHelpers.h: Added.
1539 (JSC::DFG::CCallHelpers::CCallHelpers):
1540 (JSC::DFG::CCallHelpers::resetCallArguments):
1541 (JSC::DFG::CCallHelpers::addCallArgument):
1542 (JSC::DFG::CCallHelpers::setupArguments):
1543 (JSC::DFG::CCallHelpers::setupArgumentsExecState):
1544 (JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
1545 (JSC::DFG::CCallHelpers::setupTwoStubArgs):
1546 (JSC::DFG::CCallHelpers::setupStubArguments):
1547 * dfg/DFGJITCompiler.h:
1548 (JSC::DFG::JITCompiler::JITCompiler):
1549 * dfg/DFGSpeculativeJIT.h:
1550 (JSC::DFG::SpeculativeJIT::callOperation):
1552 2012-01-15 Pablo Flouret <pablof@motorola.com>
1554 Fix compilation errors on build-webkit --debug --no-video on mac.
1555 https://bugs.webkit.org/show_bug.cgi?id=75867
1557 Reviewed by Philippe Normand.
1559 Make ENABLE_VIDEO_TRACK conditional on ENABLE_VIDEO, video track feature
1560 doesn't build without video.
1564 2012-01-14 David Levin <levin@chromium.org>
1566 HWndDC should be in platform/win instead of wtf.
1567 https://bugs.webkit.org/show_bug.cgi?id=76314
1569 Reviewed by Sam Weinig.
1571 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1572 * JavaScriptCore.gypi:
1574 2012-01-13 David Levin <levin@chromium.org>
1576 check-webkit-style: should encourage the use of Own* classes for Windows DC.
1577 https://bugs.webkit.org/show_bug.cgi?id=76227
1579 Reviewed by Dirk Pranke.
1581 * wtf/win/HWndDCWin.h:
1582 (WTF::HwndDC::HwndDC): Add a way to do GetDCEx.
1583 There are no users, but I want to catch this in check-webkit-style
1584 and tell any users to use HwndDC to avoid leaks.
1586 2012-01-13 David Levin <levin@chromium.org>
1588 Header file is missing header guard.
1590 Reviewed by Dirk Pranke.
1592 * wtf/win/HWndDCWin.h: Added the guards.
1594 2012-01-13 Andy Wingo <wingo@igalia.com>
1596 Eval in strict mode does not need dynamic checks
1597 https://bugs.webkit.org/show_bug.cgi?id=76286
1599 Reviewed by Oliver Hunt.
1601 * runtime/JSActivation.cpp (JSC::JSActivation::JSActivation):
1602 Eval in strict mode cannot introduce variables, so it not impose
1603 the need for dynamic checks.
1605 2012-01-13 David Levin <levin@chromium.org>
1607 HWndDC is a better name than HwndDC.
1608 https://bugs.webkit.org/show_bug.cgi?id=76281
1610 Reviewed by Darin Adler.
1612 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1613 * JavaScriptCore.gypi:
1614 * wtf/win/HWndDCWin.h: Renamed from Source/JavaScriptCore/wtf/win/HwndDCWin.h.
1615 (WTF::HWndDC::HWndDC):
1616 (WTF::HWndDC::~HWndDC):
1617 (WTF::HWndDC::operator HDC):
1619 2012-01-13 YoungTaeck Song <youngtaeck.song@samsung.com>
1621 [EFL] Add OwnPtr specialization for Eina_Module.
1622 https://bugs.webkit.org/show_bug.cgi?id=76255
1624 Reviewed by Andreas Kling.
1626 Add an overload for deleteOwnedPtr(Eina_Module*) on EFL port.
1628 * wtf/OwnPtrCommon.h:
1629 * wtf/efl/OwnPtrEfl.cpp:
1630 (WTF::deleteOwnedPtr):
1632 2012-01-13 Yuqiang Xian <yuqiang.xian@intel.com>
1634 Unreviewed build fix after r104787 if JIT_VERBOSE_OSR is defined
1637 (JSC::DEFINE_STUB_FUNCTION):
1639 2012-01-12 Hajime Morrita <morrita@chromium.org>
1641 JavaScriptCore: Mark all exported symbols in the header file automatically.
1642 https://bugs.webkit.org/show_bug.cgi?id=72855
1644 Reviewed by Darin Adler.
1646 Added WTF_EXPORT_PRIVATE and JS_EXPORT_PRIVATE based on JavaScriptCore.exp files.
1647 The change is generated by a tool calledListExportables (https://github.com/omo/ListExportables)
1649 * API/OpaqueJSString.h:
1650 * bytecode/CodeBlock.h:
1651 * bytecode/SamplingTool.h:
1652 * debugger/Debugger.h:
1653 * debugger/DebuggerActivation.h:
1654 * debugger/DebuggerCallFrame.h:
1655 * heap/AllocationSpace.h:
1656 * heap/HandleHeap.h:
1658 * heap/MachineStackMarker.h:
1660 * heap/VTableSpectrum.h:
1661 * heap/WriteBarrierSupport.h:
1663 * parser/ParserArena.h:
1664 * profiler/Profile.h:
1665 * runtime/ArgList.h:
1666 * runtime/CallData.h:
1667 * runtime/Completion.h:
1668 * runtime/ConstructData.h:
1669 * runtime/DateInstance.h:
1671 * runtime/ExceptionHelpers.h:
1672 * runtime/FunctionConstructor.h:
1673 * runtime/Identifier.h:
1674 * runtime/InitializeThreading.h:
1675 * runtime/InternalFunction.h:
1676 * runtime/JSArray.h:
1677 * runtime/JSByteArray.h:
1679 * runtime/JSFunction.h:
1680 * runtime/JSGlobalData.cpp:
1681 * runtime/JSGlobalData.h:
1682 * runtime/JSGlobalObject.h:
1683 * runtime/JSGlobalThis.h:
1685 * runtime/JSObject.h:
1686 * runtime/JSString.h:
1687 * runtime/JSValue.h:
1688 * runtime/JSVariableObject.h:
1690 * runtime/MemoryStatistics.h:
1691 * runtime/ObjectPrototype.h:
1692 * runtime/Options.h:
1693 * runtime/PropertyDescriptor.h:
1694 * runtime/PropertyNameArray.h:
1695 * runtime/PropertySlot.h:
1697 * runtime/RegExpObject.h:
1698 * runtime/SamplingCounter.h:
1699 * runtime/SmallStrings.h:
1700 * runtime/StringObject.h:
1701 * runtime/Structure.h:
1702 * runtime/TimeoutChecker.h:
1703 * runtime/UString.h:
1704 * runtime/WriteBarrier.h:
1705 * wtf/ArrayBufferView.h:
1707 * wtf/CryptographicallyRandomNumber.h:
1708 * wtf/CurrentTime.h:
1710 * wtf/DecimalNumber.h:
1711 * wtf/FastMalloc.cpp:
1715 * wtf/MetaAllocator.h:
1716 * wtf/MetaAllocatorHandle.h:
1717 * wtf/OSAllocator.h:
1719 * wtf/RandomNumber.h:
1720 * wtf/RefCountedLeakCounter.h:
1722 * wtf/Threading.cpp:
1724 * wtf/ThreadingPrimitives.h:
1725 * wtf/WTFThreadData.h:
1727 * wtf/text/AtomicString.h:
1728 * wtf/text/CString.h:
1729 * wtf/text/StringBuilder.h:
1730 * wtf/text/StringImpl.h:
1731 * wtf/text/WTFString.h:
1732 * wtf/unicode/Collator.h:
1733 * wtf/unicode/UTF8.h:
1735 * yarr/YarrPattern.h:
1737 2012-01-12 MORITA Hajime <morrita@google.com>
1739 [Chromium] JSExportMacros.h should be visible.
1740 https://bugs.webkit.org/show_bug.cgi?id=76147
1742 Reviewed by Tony Chang.
1746 2012-01-12 David Levin <levin@chromium.org>
1748 HwndDC is a better name than OwnGetDC.
1749 https://bugs.webkit.org/show_bug.cgi?id=76235
1751 Reviewed by Dmitry Titov.
1753 This is a better name for two reasons:
1754 1. "Own" implies "delete". In this case, the final call is a release (ReleaseDC).
1755 2. "Ref" would be a better name due to the release but the RefPtr (and OwnPtr)
1756 classes always take something to hold on to. In this case, the object (the DC)
1757 is created by the class once it is given a Window to ensure that the HDC
1758 was actually created using GetDC.
1760 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1761 * JavaScriptCore.gypi:
1762 * wtf/win/HwndDCWin.h: Renamed from Source/JavaScriptCore/wtf/win/OwnGetDCWin.h.
1763 (WTF::HwndDC::HwndDC):
1764 (WTF::HwndDC::~HwndDC):
1765 (WTF::HwndDC::operator HDC):
1767 2012-01-12 Gavin Barraclough <barraclough@apple.com>
1769 Clean up putDirect (part 2)
1770 https://bugs.webkit.org/show_bug.cgi?id=76232
1772 Reviewed by Sam Weinig.
1774 Rename putWithAttributes to putDirectVirtual, to identify that this
1775 has the same unchecked-DefineOwnProperty behaviour, change putDirectInternal
1776 to be templated on an enum indicating which behaviour it is supposed to be
1777 implementing, and change clients that are defining properties to call
1778 putDirectInternal correctly.
1780 * API/JSObjectRef.cpp:
1781 (JSObjectSetProperty):
1782 * JavaScriptCore.exp:
1783 * debugger/DebuggerActivation.cpp:
1784 (JSC::DebuggerActivation::putDirectVirtual):
1785 * debugger/DebuggerActivation.h:
1786 * interpreter/Interpreter.cpp:
1787 (JSC::Interpreter::execute):
1788 * runtime/ClassInfo.h:
1789 * runtime/Error.cpp:
1790 (JSC::addErrorInfo):
1791 * runtime/JSActivation.cpp:
1792 (JSC::JSActivation::putDirectVirtual):
1793 * runtime/JSActivation.h:
1794 * runtime/JSCell.cpp:
1795 (JSC::JSCell::putDirectVirtual):
1797 * runtime/JSGlobalObject.cpp:
1798 (JSC::JSGlobalObject::putDirectVirtual):
1799 * runtime/JSGlobalObject.h:
1800 * runtime/JSObject.cpp:
1801 (JSC::JSObject::put):
1802 (JSC::JSObject::putDirectVirtual):
1803 (JSC::JSObject::defineGetter):
1804 (JSC::JSObject::initializeGetterSetterProperty):
1805 (JSC::JSObject::defineSetter):
1806 (JSC::putDescriptor):
1807 * runtime/JSObject.h:
1808 (JSC::JSObject::putDirectInternal):
1809 (JSC::JSObject::putOwnDataProperty):
1810 (JSC::JSObject::putDirect):
1811 * runtime/JSStaticScopeObject.cpp:
1812 (JSC::JSStaticScopeObject::putDirectVirtual):
1813 * runtime/JSStaticScopeObject.h:
1814 * runtime/JSVariableObject.cpp:
1815 (JSC::JSVariableObject::putDirectVirtual):
1816 * runtime/JSVariableObject.h:
1818 2012-01-12 Gavin Barraclough <barraclough@apple.com>
1820 Clean up putDirect (part 1)
1821 https://bugs.webkit.org/show_bug.cgi?id=76232
1823 Reviewed by Sam Weinig.
1825 putDirect has ambiguous semantics, clean these up a bit.
1827 putDirect generally behaves a bit like a fast defineOwnProperty, but one that
1828 always creates the property, with no checking to validate the put it permitted.
1830 It also encompasses two slightly different behaviors.
1831 (1) a fast form of put for JSActivation, which doesn't have to handle searching
1832 the prototype chain, getter/setter properties, or the magic __proto__ value.
1833 Break this out as a new method, 'putOwnDataProperty'.
1834 (2) the version of putDirect on JSValue will also check for overwriting ReadOnly
1835 values, in strict mode. This is, however, not so smart on a few level, since
1836 it is only called from op_put_by_id with direct set, which is only used with
1837 an object as the base, and is only used to put new properties onto objects.
1839 * dfg/DFGOperations.cpp:
1840 * interpreter/Interpreter.cpp:
1841 (JSC::Interpreter::privateExecute):
1843 (JSC::DEFINE_STUB_FUNCTION):
1844 * runtime/JSActivation.cpp:
1845 (JSC::JSActivation::put):
1846 * runtime/JSFunction.cpp:
1847 (JSC::JSFunction::getOwnPropertySlot):
1848 * runtime/JSObject.h:
1849 (JSC::JSObject::putOwnDataProperty):
1850 * runtime/JSValue.h:
1852 2012-01-12 Gavin Barraclough <barraclough@apple.com>
1854 https://bugs.webkit.org/show_bug.cgi?id=76141
1855 defineSetter/defineGetter may fail to update Accessor attribute
1857 Reviewed by Oliver Hunt.
1859 * runtime/JSObject.cpp:
1860 (JSC::JSObject::defineGetter):
1861 (JSC::JSObject::initializeGetterSetterProperty):
1862 (JSC::JSObject::defineSetter):
1863 * runtime/Structure.cpp:
1864 (JSC::Structure::attributeChangeTransition):
1865 * runtime/Structure.h:
1867 2012-01-12 David Levin <levin@chromium.org>
1869 [chromium] Fix DC leak in WebScreenInfoFactory.
1870 https://bugs.webkit.org/show_bug.cgi?id=76203
1872 Reviewed by Dmitry Titov.
1874 * JavaScriptCore.gyp/JavaScriptCore.gyp: Added OwnGetDCWin.h
1875 * JavaScriptCore.gypi: Added OwnGetDCWin.h
1876 * JavaScriptCore/wtf/win/OwnGetDCWin.h: Made an owner class for GetDC which needs ReleaseDC as opposed to DeleteDC.
1878 2012-01-11 Gavin Barraclough <barraclough@apple.com>
1880 Allow accessor get/set property to be set to undefined
1881 https://bugs.webkit.org/show_bug.cgi?id=76148
1883 Reviewed by Oliver Hunt.
1885 AccessorDescriptor properties may have their get & set properties defined to reference a function
1886 (Callable object) or be set to undefined. Valid PropertyDescriptors created by toPropertyDescriptor
1887 (defined from JS code via Object.defineProperty, etc) have get and set properties that are in one of
1888 three states (1) nonexistent, (2) set to undefined, or (3) a function (any Callable object).
1890 On the PropertyDescriptor object these three states are represneted by JSValue(), jsUndefined(), and
1891 any JSObject* (with a constraint that this must be callable).
1893 Logically the get/set property of an accessor descriptor on an object might be in any of the three
1894 states above, but in practice there is no way to distinguish between the first two states. As such
1895 we stor the get/set values in property storage in a JSObject* field, with 0 indicating absent or
1896 undefined. When unboxing to a PropertyDescriptor, map this back to a JS undefined value.
1898 * runtime/GetterSetter.h:
1899 (JSC::GetterSetter::setGetter):
1900 (JSC::GetterSetter::setSetter):
1901 - Allow the getter/setter to be cleared.
1902 * runtime/JSArray.cpp:
1903 (JSC::JSArray::putDescriptor):
1904 - Changed to call getterObject/setterObject.
1905 (JSC::JSArray::defineOwnNumericProperty):
1907 * runtime/JSObject.cpp:
1908 (JSC::putDescriptor):
1909 (JSC::JSObject::defineOwnProperty):
1910 - Changed to call getterObject/setterObject.
1911 * runtime/ObjectConstructor.cpp:
1912 (JSC::objectConstructorGetOwnPropertyDescriptor):
1913 - getter/setter values read from properties on object are never missing, they will now be set as undefined by 'setDescriptor'.
1914 (JSC::toPropertyDescriptor):
1915 - Do not translate undefined->empty, this loses an important distinction between a get/set property being absent, or being explicitly set to undefined.
1916 * runtime/PropertyDescriptor.cpp:
1917 (JSC::PropertyDescriptor::getterObject):
1918 (JSC::PropertyDescriptor::setterObject):
1919 - Accessors to convert the get/set property to an object pointer, converting undefined to 0.
1920 (JSC::PropertyDescriptor::setDescriptor):
1921 (JSC::PropertyDescriptor::setAccessorDescriptor):
1922 - Translate a getter/setter internally represented at 0 to undefined, indicating that it is present.
1923 * runtime/PropertyDescriptor.h:
1924 - Declare getterObject/setterObject.
1926 2012-01-12 Zeno Albisser <zeno@webkit.org>
1928 [Qt][WK2][Mac] Conflict of MacTypes.h defining a Fixed type after r104560.
1929 https://bugs.webkit.org/show_bug.cgi?id=76175
1931 Defining ENABLE_CSS_FILTERS leads to ambiguous references
1932 due to MacTypes.h being included.
1933 Defining CF_OPEN_SOURCE works around this problem.
1935 Reviewed by Simon Hausmann.
1939 2012-01-12 Simon Hausmann <simon.hausmann@nokia.com>
1941 Make the new WTF module build on Qt
1942 https://bugs.webkit.org/show_bug.cgi?id=76163
1944 Reviewed by Tor Arne Vestbø.
1946 * JavaScriptCore.pro: Removed wtf from the subdirs to build.
1948 2012-01-11 Filip Pizlo <fpizlo@apple.com>
1950 CodeBlock::m_executeCounter should be renamed to CodeBlock::m_jitExecuteCounter
1951 https://bugs.webkit.org/show_bug.cgi?id=76144
1952 <rdar://problem/10681711>
1954 Rubber stamped by Gavin Barraclough.
1956 * bytecode/CodeBlock.h:
1957 (JSC::CodeBlock::addressOfJITExecuteCounter):
1958 (JSC::CodeBlock::offsetOfJITExecuteCounter):
1959 (JSC::CodeBlock::jitExecuteCounter):
1960 (JSC::CodeBlock::optimizeNextInvocation):
1961 (JSC::CodeBlock::dontOptimizeAnytimeSoon):
1962 (JSC::CodeBlock::optimizeAfterWarmUp):
1963 (JSC::CodeBlock::optimizeAfterLongWarmUp):
1964 (JSC::CodeBlock::optimizeSoon):
1965 * dfg/DFGOSRExitCompiler32_64.cpp:
1966 (JSC::DFG::OSRExitCompiler::compileExit):
1967 * dfg/DFGOSRExitCompiler64.cpp:
1968 (JSC::DFG::OSRExitCompiler::compileExit):
1970 (JSC::JIT::emitOptimizationCheck):
1972 2012-01-11 Gavin Barraclough <barraclough@apple.com>
1974 Merge 'Getter'/'Setter' attributes into 'Accessor'
1975 https://bugs.webkit.org/show_bug.cgi?id=76141
1977 Reviewed by Filip Pizlo.
1979 These are currently ambiguous (and used inconsistently). It would logically appear
1980 that either being bit set implies that the corresponding type of accessor is present
1981 but (a) we don't correctly enforce this, and (b) this means the attributes would not
1982 be able to distinguish between a data descriptor and an accessor descriptor with
1983 neither a getter nor setter defined (which is a descriptor permissible under the spec).
1984 This ambiguity would lead to unsafe property caching behavior (though this does not
1985 represent an actual current bug, since we are currently unable to create descriptors
1986 that have neither a getter nor setter, it just prevents us from doing so).
1988 * runtime/Arguments.cpp:
1989 (JSC::Arguments::createStrictModeCallerIfNecessary):
1990 (JSC::Arguments::createStrictModeCalleeIfNecessary):
1991 * runtime/JSArray.cpp:
1992 (JSC::SparseArrayValueMap::put):
1993 (JSC::JSArray::putDescriptor):
1994 * runtime/JSBoundFunction.cpp:
1995 (JSC::JSBoundFunction::finishCreation):
1996 * runtime/JSFunction.cpp:
1997 (JSC::JSFunction::getOwnPropertySlot):
1998 (JSC::JSFunction::getOwnPropertyDescriptor):
1999 * runtime/JSObject.cpp:
2000 (JSC::JSObject::defineGetter):
2001 (JSC::JSObject::initializeGetterSetterProperty):
2002 (JSC::JSObject::defineSetter):
2003 (JSC::putDescriptor):
2004 (JSC::JSObject::defineOwnProperty):
2005 * runtime/JSObject.h:
2006 * runtime/ObjectConstructor.cpp:
2007 (JSC::objectConstructorDefineProperty):
2008 * runtime/PropertyDescriptor.cpp:
2009 (JSC::PropertyDescriptor::setDescriptor):
2010 (JSC::PropertyDescriptor::setAccessorDescriptor):
2011 (JSC::PropertyDescriptor::setSetter):
2012 (JSC::PropertyDescriptor::setGetter):
2013 (JSC::PropertyDescriptor::attributesOverridingCurrent):
2015 2012-01-11 Gavin Barraclough <barraclough@apple.com>
2017 Object.defineProperty([], 'length', {}) should not make length read-only
2018 https://bugs.webkit.org/show_bug.cgi?id=76097
2020 Reviewed by Oliver Hunt.
2022 * runtime/JSArray.cpp:
2023 (JSC::JSArray::defineOwnProperty):
2024 - We should be checking writablePresent().
2026 2012-01-11 Filip Pizlo <fpizlo@apple.com>
2028 Code duplication for invoking the JIT and DFG should be reduced
2029 https://bugs.webkit.org/show_bug.cgi?id=76117
2030 <rdar://problem/10680189>
2032 Rubber stamped by Geoff Garen.
2034 * GNUmakefile.list.am:
2035 * JavaScriptCore.xcodeproj/project.pbxproj:
2036 * jit/JITDriver.h: Added.
2037 (JSC::jitCompileIfAppropriate):
2038 (JSC::jitCompileFunctionIfAppropriate):
2039 * runtime/Executable.cpp:
2040 (JSC::EvalExecutable::compileInternal):
2041 (JSC::ProgramExecutable::compileInternal):
2042 (JSC::FunctionExecutable::compileForCallInternal):
2043 (JSC::FunctionExecutable::compileForConstructInternal):
2045 2012-01-11 Geoffrey Garen <ggaren@apple.com>
2047 Bytecode dumping is broken for call opcodes (due to two new operands)
2048 https://bugs.webkit.org/show_bug.cgi?id=75886
2050 Reviewed by Oliver Hunt.
2052 * bytecode/CodeBlock.cpp:
2053 (JSC::CodeBlock::printCallOp): Made a helper function, so I wouldn't have
2054 to fix this more than once. The helper function skips the extra two operands
2055 at the end of the opcode, used for optimization.
2057 (JSC::CodeBlock::dump): Used the helper function.
2059 * bytecode/CodeBlock.h: Declared the helper function.
2061 2012-01-09 Geoffrey Garen <ggaren@apple.com>
2063 REGRESSION: d3 Bullet Charts demo doesn't work (call with argument assignment is broken)
2064 https://bugs.webkit.org/show_bug.cgi?id=75911
2066 * bytecompiler/BytecodeGenerator.h:
2067 (JSC::BytecodeGenerator::emitNodeForLeftHandSide): Cleanup: No need to
2068 explicitly cast to our return type in C++.
2070 * bytecompiler/NodesCodegen.cpp:
2071 (JSC::FunctionCallResolveNode::emitBytecode):
2072 (JSC::ApplyFunctionCallDotNode::emitBytecode): Make sure to copy our function
2073 into a temporary register before evaluating our arguments, since argument
2074 evaluation might include function calls or assignments that overwrite our callee by name.
2076 2012-01-11 Michael Saboff <msaboff@apple.com>
2078 v8-regexp spends 35% of its time allocating and copying internal regexp results data
2079 https://bugs.webkit.org/show_bug.cgi?id=76079
2081 Reviewed by Geoffrey Garen.
2083 Added a new RegExpResults struct that has the input string, the number of
2084 subexpressions and the output vector. Changed RegExpConstructor to
2085 include a RegExpConstructorPrivate instead of having a reference to one.
2086 Changed RegExpMatchesArray to include a RegExpResults instead of a
2087 reference to a RegExpConstructorPrivate. Created an overloaded assignment
2088 operator to assign a RegExpConstructorPrivate to a RegExpResults.
2089 Collectively this change is worth 24% performance improvement to v8-regexp.
2091 * runtime/RegExpConstructor.cpp:
2092 (JSC::RegExpResult::operator=):
2093 (JSC::RegExpConstructor::RegExpConstructor):
2094 (JSC::RegExpMatchesArray::RegExpMatchesArray):
2095 (JSC::RegExpMatchesArray::finishCreation):
2096 (JSC::RegExpMatchesArray::~RegExpMatchesArray):
2097 (JSC::RegExpMatchesArray::fillArrayInstance):
2098 (JSC::RegExpConstructor::arrayOfMatches):
2099 (JSC::RegExpConstructor::getBackref):
2100 (JSC::RegExpConstructor::getLastParen):
2101 (JSC::RegExpConstructor::getLeftContext):
2102 (JSC::RegExpConstructor::getRightContext):
2103 (JSC::RegExpConstructor::setInput):
2104 (JSC::RegExpConstructor::input):
2105 (JSC::RegExpConstructor::setMultiline):
2106 (JSC::RegExpConstructor::multiline):
2107 * runtime/RegExpConstructor.h:
2108 (JSC::RegExpResult::RegExpResult):
2109 (JSC::RegExpConstructor::performMatch):
2110 * runtime/RegExpMatchesArray.h:
2111 (JSC::RegExpMatchesArray::create):
2112 (JSC::RegExpMatchesArray::getOwnPropertySlot):
2113 (JSC::RegExpMatchesArray::getOwnPropertySlotByIndex):
2114 (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
2115 (JSC::RegExpMatchesArray::put):
2116 (JSC::RegExpMatchesArray::putByIndex):
2117 (JSC::RegExpMatchesArray::deleteProperty):
2118 (JSC::RegExpMatchesArray::deletePropertyByIndex):
2119 (JSC::RegExpMatchesArray::getOwnPropertyNames):
2121 2012-01-11 Eugene Girard <girard@google.com>
2123 Typo in error message: Unexpected token 'defualt'
2124 https://bugs.webkit.org/show_bug.cgi?id=75105
2126 Reviewed by Simon Fraser.
2129 (JSC::Parser::getTokenName):
2131 2012-01-11 Anders Carlsson <andersca@apple.com>
2133 Assertion failure in JSC::allocateCell trying to allocate a JSString
2134 https://bugs.webkit.org/show_bug.cgi?id=76101
2136 Reviewed by Adam Roben.
2138 Remove the ExecutableBase::s_info and JSString::s_info static member variables from the .def file and
2139 export them explicitly using the JS_EXPORTDATA macro.
2141 member variables explicitly using
2142 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2143 * runtime/Executable.h:
2144 * runtime/JSString.h:
2146 2012-01-10 Mark Rowe <mrowe@apple.com>
2148 <rdar://problem/10673792> jsc should install directly in to versioned Resources subfolder
2150 This ensures that jsc ends up in a consistent location whether built in to the same DSTROOT
2151 as JavaScriptCore.framework or in to a different one.
2153 Rubber-stamped by Dan Bernstein.
2155 * Configurations/JSC.xcconfig: Update INSTALL_PATH.
2157 2012-01-10 Filip Pizlo <fpizlo@apple.com>
2159 DFG inlining block linking compares BlockIndex against bytecode index
2160 https://bugs.webkit.org/show_bug.cgi?id=76018
2161 <rdar://problem/10671979>
2163 Reviewed by Gavin Barraclough.
2165 * dfg/DFGByteCodeParser.cpp:
2166 (JSC::DFG::ByteCodeParser::parseCodeBlock):
2168 2012-01-10 Filip Pizlo <fpizlo@apple.com>
2170 CodeBlock.h declares too many things
2171 https://bugs.webkit.org/show_bug.cgi?id=76001
2173 Rubber stamped by Gavin Barraclough.
2175 Removed all non-CodeBlock type declarations from CodeBlock.h, and put them
2176 into separate header files. Also removed all non-CodeBlock method implementations
2177 from CodeBlock.cpp and put them into corresponding cpp files.
2180 * GNUmakefile.list.am:
2181 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2182 * JavaScriptCore.xcodeproj/project.pbxproj:
2184 * assembler/RepatchBuffer.h:
2185 * bytecode/CallLinkInfo.cpp: Added.
2186 (JSC::CallLinkInfo::unlink):
2187 * bytecode/CallLinkInfo.h: Added.
2188 (JSC::CallLinkInfo::callTypeFor):
2189 (JSC::CallLinkInfo::CallLinkInfo):
2190 (JSC::CallLinkInfo::~CallLinkInfo):
2191 (JSC::CallLinkInfo::isLinked):
2192 (JSC::CallLinkInfo::seenOnce):
2193 (JSC::CallLinkInfo::setSeen):
2194 (JSC::getCallLinkInfoReturnLocation):
2195 (JSC::getCallLinkInfoBytecodeIndex):
2196 * bytecode/CallReturnOffsetToBytecodeOffset.h: Added.
2197 (JSC::CallReturnOffsetToBytecodeOffset::CallReturnOffsetToBytecodeOffset):
2198 (JSC::getCallReturnOffset):
2199 * bytecode/CodeBlock.cpp:
2200 * bytecode/CodeBlock.h:
2201 * bytecode/CodeType.h: Added.
2202 * bytecode/ExpressionRangeInfo.h: Added.
2203 * bytecode/GlobalResolveInfo.h: Added.
2204 (JSC::GlobalResolveInfo::GlobalResolveInfo):
2205 * bytecode/HandlerInfo.h: Added.
2206 * bytecode/LineInfo.h: Added.
2207 * bytecode/MethodCallLinkInfo.cpp: Added.
2208 (JSC::MethodCallLinkInfo::reset):
2209 * bytecode/MethodCallLinkInfo.h: Added.
2210 (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
2211 (JSC::MethodCallLinkInfo::seenOnce):
2212 (JSC::MethodCallLinkInfo::setSeen):
2213 (JSC::getMethodCallLinkInfoReturnLocation):
2214 (JSC::getMethodCallLinkInfoBytecodeIndex):
2215 * bytecode/StructureStubInfo.h:
2216 (JSC::getStructureStubInfoReturnLocation):
2217 (JSC::getStructureStubInfoBytecodeIndex):
2219 2012-01-10 Anders Carlsson <andersca@apple.com>
2221 Hang opening movie that requires authentication
2222 https://bugs.webkit.org/show_bug.cgi?id=75989
2223 <rdar://problem/9601915>
2225 Reviewed by Sam Weinig.
2228 Add function wrapper for a function that takes three parameters.
2230 2012-01-10 Filip Pizlo <fpizlo@apple.com>
2232 CodeBlock::m_numParameters should be encapsulated
2233 https://bugs.webkit.org/show_bug.cgi?id=75985
2234 <rdar://problem/10671020>
2236 Reviewed by Oliver Hunt.
2238 Encapsulated CodeBlock::m_numParameters and hooked argument profile creation
2239 into it. This appears to be performance neutral.
2241 * bytecode/CodeBlock.cpp:
2242 (JSC::CodeBlock::CodeBlock):
2243 (JSC::CodeBlock::setNumParameters):
2244 (JSC::CodeBlock::addParameter):
2245 * bytecode/CodeBlock.h:
2246 (JSC::CodeBlock::numParameters):
2247 (JSC::CodeBlock::addressOfNumParameters):
2248 (JSC::CodeBlock::offsetOfNumParameters):
2249 (JSC::CodeBlock::numberOfArgumentValueProfiles):
2250 * bytecompiler/BytecodeGenerator.cpp:
2251 (JSC::BytecodeGenerator::BytecodeGenerator):
2252 (JSC::BytecodeGenerator::addParameter):
2253 (JSC::BytecodeGenerator::emitReturn):
2254 * dfg/DFGAbstractState.cpp:
2255 (JSC::DFG::AbstractState::AbstractState):
2256 * dfg/DFGByteCodeParser.cpp:
2257 (JSC::DFG::ByteCodeParser::ByteCodeParser):
2258 (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
2260 (JSC::DFG::Graph::predictArgumentTypes):
2261 * dfg/DFGJITCompiler.cpp:
2262 (JSC::DFG::JITCompiler::compileFunction):
2263 * dfg/DFGOperations.cpp:
2264 * dfg/DFGSpeculativeJIT.cpp:
2265 (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
2266 * dfg/DFGSpeculativeJIT.h:
2267 (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
2268 * interpreter/Interpreter.cpp:
2269 (JSC::Interpreter::slideRegisterWindowForCall):
2270 (JSC::Interpreter::dumpRegisters):
2271 (JSC::Interpreter::execute):
2272 (JSC::Interpreter::prepareForRepeatCall):
2274 (JSC::JIT::privateCompile):
2276 (JSC::arityCheckFor):
2278 * runtime/Executable.cpp:
2279 (JSC::FunctionExecutable::compileForCallInternal):
2280 (JSC::FunctionExecutable::compileForConstructInternal):
2282 2012-01-10 Gavin Barraclough <barraclough@apple.com>
2284 Build fix following https://bugs.webkit.org/show_bug.cgi?id=75935
2288 * runtime/JSArray.cpp:
2289 (JSC::JSArray::getOwnPropertyNames):
2290 (JSC::JSArray::setLength):
2292 2012-01-10 Gavin Barraclough <barraclough@apple.com>
2296 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2298 2012-01-10 Gavin Barraclough <barraclough@apple.com>
2300 Do not allow Array length to be set if it is non-configurable
2301 https://bugs.webkit.org/show_bug.cgi?id=75935
2303 Reviewed by Sam Weinig.
2305 Do not allow Array length to be set if it is non-configurable, and if the new
2306 length is less than the old length then intervening properties should removed
2307 in reverse order. Removal of properties should cease if an intervening indexed
2308 property being removed is non-configurable.
2310 * JavaScriptCore.exp:
2311 - Removed export for setLength.
2312 * runtime/ArrayPrototype.cpp:
2313 (JSC::arrayProtoFuncConcat):
2314 - JSArray::setLength now takes an ExecState*
2315 (JSC::arrayProtoFuncSlice):
2316 - JSArray::setLength now takes an ExecState*
2317 * runtime/JSArray.cpp:
2318 (JSC::JSArray::defineOwnProperty):
2319 - JSArray::setLength now takes an ExecState*
2320 (JSC::JSArray::put):
2321 - JSArray::setLength now takes an ExecState*
2322 (JSC::compareKeysForQSort):
2323 - Keys extracted from the map can be stored as unsigneds.
2324 (JSC::JSArray::getOwnPropertyNames):
2325 - Keys extracted from the map can be stored as unsigneds.
2326 (JSC::JSArray::setLength):
2327 - Check lengthIsReadOnly(), rather than copying the entire map to iterate
2328 over to determine which keys to remove, instead just copy the keys from
2329 the map to a Vector. When inSparseMode sort the keys in the Vector so
2330 that we can remove properties in reverse order.
2331 * runtime/JSArray.h:
2332 - JSArray::setLength now takes an ExecState*
2334 2012-01-10 Gavin Barraclough <barraclough@apple.com>
2336 Use SameValue to compare property descriptor values
2337 https://bugs.webkit.org/show_bug.cgi?id=75975
2339 Reviewed by Sam Weinig.
2341 Rather than strictEqual.
2343 * runtime/JSArray.cpp:
2344 (JSC::JSArray::defineOwnNumericProperty):
2345 - Missing configurablePresent() check.
2346 * runtime/JSObject.cpp:
2347 (JSC::JSObject::defineOwnProperty):
2349 * runtime/PropertyDescriptor.cpp:
2351 - Moved from JSArray.cpp, fix NaN comparison.
2352 (JSC::PropertyDescriptor::equalTo):
2354 * runtime/PropertyDescriptor.h:
2355 - Added declaration for sameValue.
2356 2012-01-09 Gavin Barraclough <barraclough@apple.com>
2358 Error handling : in ISO8601 timezone
2359 https://bugs.webkit.org/show_bug.cgi?id=75919
2361 Reviewed by Sam Weinig.
2364 (WTF::parseDateFromNullTerminatedCharacters):
2365 - need to increment the string position.
2367 2012-01-09 Mark Rowe <mrowe@apple.com>
2369 JavaScriptCore executable targets shouldn't explicitly depend on the JavaScriptCore framework target
2370 <http://webkit.org/b/75907> / <rdar://problem/10659862>
2372 We'd like for it to be possible to build jsc without building JavaScriptCore.framework and the explicit
2373 dependencies prevent this.
2375 Reviewed by Dan Bernstein.
2377 * JavaScriptCore.xcodeproj/project.pbxproj:
2379 2012-01-09 Adam Treat <atreat@rim.com>
2381 Log is a little to verbose for blackberry port
2382 https://bugs.webkit.org/show_bug.cgi?id=75728
2384 The BlackBerry::Platform::Log* functions take care of the call to vfprintf
2385 which is resulting in unintentional noise in our logs. Add a conditional
2388 Change to using BlackBerry::Platform::logStreamV which does not insert
2389 threading info and newlines unlike BlackBerry::Platform::log.
2391 Finally, add log locking and unlocking which the BlackBerry platform
2392 uses to ensure that N threads do not trample on each other's logs.
2394 Reviewed by Rob Buis.
2396 * wtf/Assertions.cpp:
2397 (WTFLogLocker::WTFReportAssertionFailure):
2398 (WTFLogLocker::WTFReportAssertionFailureWithMessage):
2399 (WTFLogLocker::WTFReportArgumentAssertionFailure):
2400 (WTFLogLocker::WTFReportFatalError):
2401 (WTFLogLocker::WTFReportError):
2402 (WTFLogLocker::WTFLog):
2403 (WTFLogLocker::WTFLogVerbose):
2405 2012-01-09 Gavin Barraclough <barraclough@apple.com>
2407 https://bugs.webkit.org/show_bug.cgi?id=75789
2408 defineOwnProperty not implemented for Array objects
2410 Reviewed by Sam Weinig.
2412 Implements support for getter/setter & non-default attribute properties on arrays,
2413 by forcing them into a dictionary-like 'SparseMode'. This fixes ~300 test-262
2416 * JavaScriptCore.exp:
2418 * dfg/DFGOperations.cpp:
2419 - JSArray::pop now requires an exec state.
2420 * runtime/ArrayPrototype.cpp:
2421 (JSC::arrayProtoFuncPop):
2422 - JSArray::pop now requires an exec state.
2423 * runtime/JSArray.cpp:
2424 (JSC::SparseArrayValueMap::add):
2425 - Add a potentially empty entry into the map.
2426 (JSC::SparseArrayValueMap::put):
2427 - Changed to call setter.
2428 (JSC::SparseArrayEntry::get):
2430 (JSC::SparseArrayEntry::getNonSparseMode):
2431 - does not call getters.
2432 (JSC::JSArray::enterSparseMode):
2433 - Convert into 'SparseMode' - removes the vectors, don't allow it to be recreated.
2434 (JSC::JSArray::putDescriptor):
2435 - Create a numeric property based on a descriptor.
2439 - Helper for the [[DefineOwnProperty]] algorithm.
2440 (JSC::JSArray::defineOwnNumericProperty):
2441 - Define an indexed property on an array object.
2442 (JSC::JSArray::setLengthWritable):
2443 - Marks the length read-only, enters SparseMode as necessary.
2444 (JSC::JSArray::defineOwnProperty):
2445 - Defines either an indexed property or 'length' on an array object.
2446 (JSC::JSArray::getOwnPropertySlotByIndex):
2447 - Updated to correctly handle accessor descriptors & attributes.
2448 (JSC::JSArray::getOwnPropertyDescriptor):
2449 - Updated to correctly handle accessor descriptors & attributes.
2450 (JSC::JSArray::put):
2451 - Pass strict mode flag to setLength.
2452 (JSC::JSArray::putByIndex):
2453 - putByIndexBeyondVectorLength requires an ExecState* rather than a JSGloablData&.
2454 (JSC::JSArray::putByIndexBeyondVectorLength):
2455 - Pass exec to SparseArrayValueMap::put.
2456 (JSC::JSArray::deletePropertyByIndex):
2457 - Do not allow deletion of non-configurable properties.
2458 (JSC::compareKeysForQSort):
2459 - used in implementation of getOwnPropertyNames.
2460 (JSC::JSArray::getOwnPropertyNames):
2461 - Properties in the sparse map should be iterated in order.
2462 (JSC::JSArray::setLength):
2463 - Updated to take a 'shouldThrow' flag, return a result indicating error.
2464 (JSC::JSArray::pop):
2465 - pop should throw an error if length is not writable, even if the array is empty.
2466 (JSC::JSArray::push):
2467 - putByIndexBeyondVectorLength requires an ExecState* rather than a JSGloablData&.
2468 (JSC::JSArray::sort):
2469 - Changed 'get' to 'getNonSparseMode' (can't be getters to call).
2470 (JSC::JSArray::compactForSorting):
2471 - Changed 'get' to 'getNonSparseMode' (can't be getters to call).
2472 * runtime/JSArray.h:
2473 (JSC::SparseArrayValueMap::lengthIsReadOnly):
2474 - Check if the length is read only.
2475 (JSC::SparseArrayValueMap::setLengthIsReadOnly):
2476 - Mark the length as read only.
2477 (JSC::SparseArrayValueMap::find):
2478 - Moved into header.
2479 (JSC::JSArray::isLengthWritable):
2480 - Wraps SparseArrayValueMap::lengthIsReadOnly.
2481 * runtime/JSObject.cpp:
2482 (JSC::JSObject::defineOwnProperty):
2483 - Should be returning the result of putDescriptor.
2484 * runtime/PropertyDescriptor.cpp:
2485 (JSC::PropertyDescriptor::attributesOverridingCurrent):
2486 - Added attributesOverridingCurrent - this should probably be merged with attributesWithOverride.
2487 * runtime/PropertyDescriptor.h:
2488 - Added attributesOverridingCurrent.
2490 2012-01-09 Pavel Heimlich <tropikhajma@gmail.com>
2492 There is no support for fastcall in Solaris Studio.
2493 Fixes build on Solaris.
2494 https://bugs.webkit.org/show_bug.cgi?id=75736
2496 Reviewed by Gavin Barraclough.
2500 2012-01-09 Pavel Heimlich <tropikhajma@gmail.com>
2502 Fix build failure on Solaris
2503 https://bugs.webkit.org/show_bug.cgi?id=75733
2505 Reviewed by Gavin Barraclough.
2509 2012-01-01 Raphael Kubo da Costa <kubo@profusion.mobi>
2511 [CMake] Clean up some cruft from WTF's CMakeLists.txt
2512 https://bugs.webkit.org/show_bug.cgi?id=75420
2514 Reviewed by Daniel Bates.
2516 * wtf/CMakeLists.txt: Remove the unused WTF_PORT_FLAGS variable; add
2517 all needed paths to WTF_INCLUDE_DIRECTORIES in a single place.
2519 2012-01-08 Xianzhu Wang <wangxianzhu@chromium.org>
2521 Fix compilation error about ListHashSetReverseIterator
2522 https://bugs.webkit.org/show_bug.cgi?id=75372
2524 Reviewed by Darin Adler.
2526 There is a typo in class ListHashSetReverseIterator:
2527 typedef ListHashSetConstIterator<ValueArg, inlineCapacity, HashArg> const_reverse_iterator;
2529 typedef ListHashSetConstReverseIterator<ValueArg, inlineCapacity, HashArg> const_reverse_iterator;
2531 * wtf/ListHashSet.h:
2533 2012-01-08 Ryosuke Niwa <rniwa@webkit.org>
2535 WinCE build fix after r104415.
2537 * jit/JITExceptions.cpp:
2538 * jit/JITExceptions.h:
2540 2012-01-08 Filip Pizlo <fpizlo@apple.com>
2542 The JIT's protocol for exception handling should be available to other parts of the system
2543 https://bugs.webkit.org/show_bug.cgi?id=75808
2544 <rdar://problem/10661025>
2546 Reviewed by Oliver Hunt.
2549 * GNUmakefile.list.am:
2550 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2551 * JavaScriptCore.xcodeproj/project.pbxproj:
2553 * jit/JITExceptions.cpp: Added.
2554 (JSC::genericThrow):
2556 * jit/JITExceptions.h: Added.
2558 * runtime/JSGlobalData.h:
2560 2012-01-06 Hajime Morrita <morrita@chromium.org>
2562 https://bugs.webkit.org/show_bug.cgi?id=75296
2563 JSString should not have JS_EXPORTCLASS annotation
2565 Reviewed by Kevin Ollivier.
2567 * runtime/JSString.h: Removed JS_EXPORTCLASS annotation.
2568 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2569 Added missing symbols which were hidden by JS_EXPORTCLASS.
2571 2012-01-06 Michael Saboff <msaboff@apple.com>
2573 JSArray::pop() should compare SparseArrayValueMap::find() to SparseArrayValueMap::notFound()
2574 https://bugs.webkit.org/show_bug.cgi?id=75757
2576 Reviewed by Gavin Barraclough.
2578 * runtime/JSArray.cpp:
2579 (JSC::JSArray::pop): Changed map->end() to map->notFound().
2581 2012-01-06 Filip Pizlo <fpizlo@apple.com>
2583 JIT stub slow paths that would be identical to that of an interpreter should be factored out
2584 https://bugs.webkit.org/show_bug.cgi?id=75743
2585 <rdar://problem/10657024>
2587 Reviewed by Geoff Garen.
2589 * GNUmakefile.list.am:
2590 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2591 * JavaScriptCore.xcodeproj/project.pbxproj:
2593 (JSC::DEFINE_STUB_FUNCTION):
2594 * runtime/CommonSlowPaths.h: Added.
2595 (JSC::CommonSlowPaths::opInstanceOfSlow):
2596 (JSC::CommonSlowPaths::opIn):
2597 (JSC::CommonSlowPaths::opResolve):
2598 (JSC::CommonSlowPaths::opResolveSkip):
2599 (JSC::CommonSlowPaths::opResolveWithBase):
2600 (JSC::CommonSlowPaths::opResolveWithThis):
2602 2012-01-06 Sam Weinig <sam@webkit.org>
2606 * wtf/TypeTraits.cpp:
2608 2012-01-05 Michael Saboff <msaboff@apple.com>
2610 Default HashTraits for Opcode don't work for Opcode = 0
2611 https://bugs.webkit.org/show_bug.cgi?id=75595
2613 Reviewed by Oliver Hunt.
2615 Removed the populating of the m_opcodeIDTable table in the
2616 case where the OpcodeID and Opcode are the same (m_enabled is false).
2617 Instead we just cast the one type to the other.
2619 * interpreter/Interpreter.cpp:
2620 (JSC::Interpreter::initialize):
2621 (JSC::Interpreter::isOpcode):
2622 * interpreter/Interpreter.h:
2623 (JSC::Interpreter::getOpcodeID):
2625 2012-01-06 Sam Weinig <sam@webkit.org>
2627 Add a DecayArray type trait as a first step towards merging OwnPtr and OwnArrayPtr
2628 https://bugs.webkit.org/show_bug.cgi?id=75737
2630 Reviewed by Anders Carlsson.
2632 * wtf/TypeTraits.cpp:
2634 Added a DecayArray trait, that can convert T[] and T[3] -> T*. DecayArray
2635 is composed of some helpers which are also exposed, Conditional<>, which
2636 can provide one type or another based on a boolean predicate, IsArray<>
2637 which can deduce array types, and RemoveExtent<>, which removes the extent
2640 2012-01-06 Oliver Hunt <oliver@apple.com>
2642 GetByteArrayLength is incorrect
2643 https://bugs.webkit.org/show_bug.cgi?id=75735
2645 Reviewed by Filip Pizlo.
2647 Load the byte array length from the correct location.
2648 This stops an existing test from hanging.
2650 * dfg/DFGSpeculativeJIT32_64.cpp:
2651 (JSC::DFG::SpeculativeJIT::compile):
2652 * dfg/DFGSpeculativeJIT64.cpp:
2653 (JSC::DFG::SpeculativeJIT::compile):
2655 2012-01-06 Filip Pizlo <fpizlo@apple.com>
2659 * JavaScriptCore.xcodeproj/project.pbxproj:
2661 2012-01-06 Oliver Hunt <oliver@apple.com>
2663 DFG no longer optimises CanvasPixelArray
2664 https://bugs.webkit.org/show_bug.cgi?id=75729
2666 Reviewed by Gavin Barraclough.
2668 Rename ByteArray (in its ClassInfo) to Uint8ClampedArray to match
2669 the future name when we switch over to the new typed-array based
2670 ImageData specification.
2672 * runtime/JSByteArray.cpp:
2674 2012-01-06 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
2676 Use HashMap<OwnPtr> for SourceProviderCache items
2677 https://bugs.webkit.org/show_bug.cgi?id=75346
2679 Reviewed by Daniel Bates.
2681 * parser/Parser.cpp:
2682 * parser/SourceProviderCache.cpp:
2683 (JSC::SourceProviderCache::clear):
2684 (JSC::SourceProviderCache::add):
2685 * parser/SourceProviderCache.h:
2687 2012-01-06 Sam Weinig <sam@webkit.org>
2689 Remove unused OwnFastMallocPtr class.
2690 https://bugs.webkit.org/show_bug.cgi?id=75722
2692 Reviewed by Geoffrey Garen.
2694 * GNUmakefile.list.am:
2695 * JavaScriptCore.gypi:
2696 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2697 * JavaScriptCore.xcodeproj/project.pbxproj:
2698 * wtf/CMakeLists.txt:
2699 * wtf/OwnFastMallocPtr.h: Removed.
2700 * wtf/text/StringImpl.h:
2703 2012-01-06 Benjamin Poulain <bpoulain@webkit.org>
2705 [Mac] Sort the resources of JavaScriptCore.xcodeproj and remove duplicates
2706 https://bugs.webkit.org/show_bug.cgi?id=75631
2708 Reviewed by Andreas Kling.
2710 * JavaScriptCore.xcodeproj/project.pbxproj:
2712 2012-01-06 Eric Seidel <eric@webkit.org> and Gustavo Noronha Silva <gustavo.noronha@collabora.com>
2714 Make the new WTF module build on Gtk
2715 https://bugs.webkit.org/show_bug.cgi?id=75669
2719 2012-01-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
2721 [Qt] Remove un-needed VPATHs from project includes
2723 Reviewed by Simon Hausmann.
2725 * JavaScriptCore.pri:
2728 2012-01-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
2730 [Qt] Move listing of include paths and libs to pri files in sources
2732 Includepaths are sometimes modified by non-Qt contributors so keeping
2733 them in files inside Sources makes it more likely that they are updated
2734 along with project files for the other ports.
2736 Using pri files instead of prf files for this also has the benefit that
2737 the include() from the main target file can be parsed and followed by
2738 Qt Creator -- something that does not work with load().
2740 Dependency from a target to a library through the WEBKIT variable are
2741 handled through forwarding-files in Tools/qmake/mkspecs/modules, which
2742 set the source root of the module and include the right pri file.
2744 Ideally we'd use the variant of include() that takes an optional
2745 namespace to read the variables into, or the fromfile() function,
2746 but both of these add an overhead of about 40% on the total qmake
2747 runtime, due to making a deep copy of all the variables in the
2748 project or re-reading all the prf files from scratch.
2750 Reviewed by Simon Hausmann.
2753 * JavaScriptCore.pri: Renamed from Tools/qmake/mkspecs/features/javascriptcore.prf.
2755 * wtf/wtf.pri: Renamed from Tools/qmake/mkspecs/features/wtf.prf.
2758 2012-01-06 Hajime Morrita <morrita@chromium.org>
2760 WTF::String: Inline method shouldn't have WTF_EXPORT_PRIVATE
2761 https://bugs.webkit.org/show_bug.cgi?id=75612
2763 Reviewed by Kevin Ollivier.
2765 * wtf/text/WTFString.h:
2766 (WTF::String::findIgnoringCase):
2767 (WTF::String::append):
2768 (WTF::String::fromUTF8):
2769 (WTF::String::fromUTF8WithLatin1Fallback):
2770 (WTF::String::isHashTableDeletedValue):
2772 2012-01-05 Dan Bernstein <mitz@apple.com>
2774 <rdar://problem/10633760> Update copyright strings
2776 Reviewed by Mark Rowe.
2780 2012-01-05 Gavin Barraclough <barraclough@apple.com>
2782 Date constructor handles infinite values incorrectly.
2783 https://bugs.webkit.org/show_bug.cgi?id=70998
2785 Reviewed by Filip Pizlo.
2787 * runtime/DateConstructor.cpp:
2788 (JSC::constructDate):
2789 - should be checking !finite rather then isnan.
2791 2012-01-05 Gavin Barraclough <barraclough@apple.com>
2793 date.toISOString produces incorrect results for dates with ms prior to 1970
2794 https://bugs.webkit.org/show_bug.cgi?id=75684
2796 Reviewed by Sam Weinig.
2798 * runtime/DatePrototype.cpp:
2799 (JSC::dateProtoFuncToISOString):
2801 2012-01-05 Gavin Barraclough <barraclough@apple.com>
2803 Array.prototype.lastIndexOf ignores undefined fromIndex.
2804 https://bugs.webkit.org/show_bug.cgi?id=75678
2806 Reviewed by Sam Weinig.
2808 array.lastIndexOf(x, undefined) is equivalent to array.lastIndexOf(x, 0), not array.lastIndexOf(x)
2810 * runtime/ArrayPrototype.cpp:
2811 (JSC::arrayProtoFuncLastIndexOf):
2812 - should check argumnet count, rather than checking agument value for undefined.
2814 2012-01-05 Gavin Barraclough <barraclough@apple.com>
2816 Date parsing is too restrictive.
2817 https://bugs.webkit.org/show_bug.cgi?id=75671
2819 Reviewed by Oliver Hunt.
2821 ES5 date parsing currently requires all fields to be present, which does not match the spec (ES5.1 15.9.1.15).
2822 The spec allow a date to be date only, or date + time.
2824 The date portion on the should match: (pseudocode!:)
2825 [(+|-)YY]YYYY[-MM[-DD]]
2826 though we are slightly more liberal (permitted by the spec), allowing:
2828 The time portion should match:
2829 THH:mm[:ss[.sss]][Z|(+|-)HH:mm]
2830 again we're slightly more liberal, allowing:
2831 THH:mm[:ss[.s+]][Z|(+|-)HH:mm]
2834 (WTF::parseES5DatePortion):
2835 - Month/day fields are optional, default to 01.
2836 (WTF::parseES5TimePortion):
2837 - Hours/Minutes are requires, seconds/timezone are optional.
2838 (WTF::parseES5DateFromNullTerminatedCharacters):
2839 - Dates may be date only, or date + time.
2841 2012-01-05 Bruno Dilly <bdilly@profusion.mobi>
2843 [EFL] Undefined references to ICU_I18N symbols on WTF
2844 https://bugs.webkit.org/show_bug.cgi?id=75642
2846 Unreviewed build fix.
2848 Add ${ICU_I18N_LIBRARIES} to WTF_LIBRARIES on wtf efl platform cmake.
2849 Some undefined references were ucol_setAttribute_44, ucol_close_44,
2850 ucol_getAttribute_44...
2852 * wtf/PlatformEfl.cmake:
2854 2012-01-05 Geoffrey Garen <ggaren@apple.com>
2856 Refined the fast path for StringImpl::hash()
2857 https://bugs.webkit.org/show_bug.cgi?id=75178
2859 Reviewed by Darin Adler.
2861 Moved the hash calculation code into an out-of-line function to clean up
2864 No measurable benchmark change, but this knocks some samples off in
2865 Instruments, and I think this is a step toward removing -fomit-frame-pointer.
2867 * wtf/text/StringImpl.cpp:
2868 (WTF::StringImpl::hashSlowCase):
2869 * wtf/text/StringImpl.h:
2870 (WTF::StringImpl::hash): The patch.
2872 * wtf/text/StringStatics.cpp:
2873 (WTF::StringImpl::hashSlowCase): Abide by the cockamamie Windows build
2874 scheme, which requires all out-of-line StringImpl functions used by
2875 WebCore be defined in this file instead of StringImpl.cpp. (See http://trac.webkit.org/changeset/59187.)
2877 2012-01-05 Gavin Barraclough <barraclough@apple.com>
2879 Literal tab in JSONString fails
2880 https://bugs.webkit.org/show_bug.cgi?id=71772
2882 Reviewed by Oliver Hunt.
2884 rfc4627 does not allow literal tab characters in JSON source.
2886 * runtime/LiteralParser.cpp:
2887 (JSC::isSafeStringCharacter):
2888 - do not allow literal tab in StrictJSON mode.
2890 2012-01-05 Gavin Barraclough <barraclough@apple.com>
2892 push/shift fifo may consume excessive memory
2893 https://bugs.webkit.org/show_bug.cgi?id=75610
2895 Reviewed by Sam Weinig.
2897 Array object commonly store data in a vector, consisting of a portion that is
2898 in use, a pre-capacity (m_indexBias) and a post-capacity (the delta between
2899 m_length and m_vectorLength). Calls to shift with grow the pre-capacity, and
2900 the current algorithm for increaseVectorLength (used by push, or [[Put]]) will
2901 never shrink the pre-capacity, so a push/shift fifo may consume an inordinate
2902 amount of memory, whilst having a relatively small active length.
2904 * runtime/JSArray.cpp:
2905 (JSC::JSArray::increaseVectorLength):
2906 - If m_indexBias is non-zero, decay it over time.
2908 2012-01-05 Csaba Osztrogonác <ossy@webkit.org>
2910 unshift/pop fifo may consume excessive memory
2911 https://bugs.webkit.org/show_bug.cgi?id=75588
2913 Reviewed by Zoltan Herczeg.
2915 Buildfix after r104120.
2917 * runtime/JSArray.cpp: Remove useless asserts, baecause unsigned expression >= 0 is always true
2918 (JSC::JSArray::unshiftCount):
2920 2012-01-05 Zoltan Herczeg <zherczeg@webkit.org>
2922 Unreviewed gardening after r104134.
2924 * wtf/Assertions.cpp:
2926 2012-01-05 Zoltan Herczeg <zherczeg@webkit.org>
2928 Unreviewed gardening after r75605.
2930 Rubber stamped by NOBODY Csaba Osztrogonác.
2932 * wtf/Assertions.cpp:
2934 2012-01-05 Benjamin Poulain <benjamin@webkit.org>
2936 Improve charactersAreAllASCII() to compare multiple characters at a time
2937 https://bugs.webkit.org/show_bug.cgi?id=74063
2939 Reviewed by Darin Adler.
2941 A new header ASCIIFastPath.h contains the functions related to
2942 the detection of ASCII by using machine words. Part of it comes from
2943 WebCore's TextCodecASCIIFastPath.h.
2945 The function charactersAreAllASCII() is moved to TextCodecASCIIFastPath.h
2946 and is implemented with computer word comparison.
2947 The gain over the previous implementation of charactersAreAllASCII() is of
2948 the order of how many comparison are avoided (4x, 8x, 16x depending on the
2949 format and the CPU type).
2951 * GNUmakefile.list.am:
2952 * JavaScriptCore.gypi:
2953 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2954 * JavaScriptCore.xcodeproj/project.pbxproj:
2955 * wtf/text/ASCIIFastPath.h: Added.
2956 (WTF::isAlignedToMachineWord):
2957 (WTF::alignToMachineWord):
2959 (WTF::charactersAreAllASCII):
2960 * wtf/text/WTFString.h:
2963 2012-01-05 Mark Rowe <mrowe@apple.com>
2965 <http://webkit.org/b/75606> [Mac] WTF logging functions should output to both stderr and ASL
2967 We should always log to both ASL and stderr on platforms where this won't result in launchd
2968 duplicating the messages.
2970 Reviewed by Dan Bernstein.
2972 * wtf/Assertions.cpp:
2973 (vprintf_stderr_common):
2975 2012-01-05 Mark Rowe <mrowe@apple.com>
2977 <http://webkit.org/b/75605> WTF logging functions should call vprintf_stderr_common only once per line
2979 Several of the WTF logging functions make multiple calls to vprintf_stderr_common to output a
2980 single line of text. This results in strangely formatted output if vprintf_stderr_common is
2981 retargeted to an output device that is message-oriented (such as ASL) rather than stream-oriented
2984 Reviewed by Dan Bernstein.
2986 * wtf/Assertions.cpp:
2987 (vprintf_stderr_with_prefix): Helper function to prepend a given prefix on to the given format
2988 string before handing it off to vprintf_stderr_common. This requires disabling warnings about
2989 calling a printf-like function with a non-literal format string for this piece of code. It's
2990 safe in this particular case as vprintf_stderr_with_prefix is only ever given a literal prefix.
2991 (vprintf_stderr_with_trailing_newline): Helper function to append a trailling newline on to the
2992 given format string if one does not already exist. It requires the same treatment with regards
2993 to the non-literal format string warning.
2994 (WTFReportAssertionFailureWithMessage): Switch to using vprintf_stderr_with_prefix.
2995 (WTFReportBacktrace): Switch from calling fprintf directly to using fprintf_stderr_common.
2996 (WTFReportFatalError): Switch to using vprintf_stderr_with_prefix.
2997 (WTFReportError): Ditto.
2998 (WTFLog): Switch to using vprintf_stderr_with_trailing_newline.
2999 (WTFLogVerbose): Ditto.
3001 2012-01-04 Gavin Barraclough <barraclough@apple.com>
3003 unshift/pop fifo may consume excessive memory
3004 https://bugs.webkit.org/show_bug.cgi?id=75588
3006 Reviewed by Sam Weinig.
3008 The Array object commonly store data in a vector, consisting of a portion that
3009 is in use, a pre-capacity (m_indexBias) and a post-capacity (the delta between
3010 m_length and m_vectorLength). Calls to pop with grow the post-capacity, and the
3011 current algorithm for increasePrefixVectorLength (used by unshift) will never
3012 stink the post-capacity, so a unshift/pop fifo may consume an inordinate amount
3013 of memory, whilst having a relatively small active length.
3015 * runtime/JSArray.cpp:
3017 - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>)
3018 (JSC::SparseArrayValueMap::put):
3019 - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>)
3020 (JSC::JSArray::increaseVectorLength):
3021 - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>)
3022 (JSC::JSArray::unshiftCountSlowCase):
3023 - renamed from increaseVectorPrefixLength (this was a bad name, since it
3024 also moved the ArrayStorage header), rewritten.
3025 (JSC::JSArray::shiftCount):
3026 - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>), count should be unsigned
3027 (JSC::JSArray::unshiftCount):
3028 - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>), count should be unsigned,
3029 increaseVectorPrefixLength renamed to unshiftCountSlowCase
3030 (JSC::JSArray::sortNumeric):
3031 * runtime/JSArray.h:
3032 - Updated function declarations, m_indexBias should be unsigned.
3034 2012-01-04 Mark Rowe <mrowe@apple.com>
3036 <http://webkit.org/b/75604> All instances of JSC::ArgumentsData appear to be leaked by JSC::Arguments
3038 Since JSC::Arguments has an OwnPtr for a member it needs to override destroy
3039 to ensure that the correct destructor is invoked. This is necessary because
3040 JSCell subclasses all intentionally have non-virtual destructors.
3042 Reviewed by Filip Pizlo.
3044 * runtime/Arguments.cpp:
3045 (JSC::Arguments::destroy):
3046 * runtime/Arguments.h:
3048 2012-01-04 Filip Pizlo <fpizlo@apple.com>
3050 Unreviewed, accidentally turned off the JIT in previous commit. Turning
3055 2012-01-04 Filip Pizlo <fpizlo@apple.com>
3057 Changed "return" to "break" in some macrology I introduced in
3058 http://trac.webkit.org/changeset/104086. This is a benign change, as
3059 "return" was technically correct for all uses of the macro.
3061 Reviewed by Oliver Hunt.
3066 2012-01-04 Michael Saboff <msaboff@apple.com>
3068 StructureStubInfo not reset when corresponding MethodCallLinkInfo is reset
3069 https://bugs.webkit.org/show_bug.cgi?id=75583
3071 Reviewed by Filip Pizlo.
3073 * bytecode/CodeBlock.cpp:
3074 (JSC::CodeBlock::finalizeUnconditionally): Find the corresponding
3075 StructureStubInfo and reset the appropriate JIT and
3076 the StructureStubInfo itself when reseting a MethodCallLinkInfo.
3078 2012-01-04 Michael Saboff <msaboff@apple.com>
3080 Invalid ASSERT() in DFGRepatch.cpp near line 385
3081 https://bugs.webkit.org/show_bug.cgi?id=75584
3083 Reviewed by Filip Pizlo.
3085 * dfg/DFGRepatch.cpp:
3086 (JSC::DFG::tryBuildGetByIDProtoList): Fixed ASSERT to use ==.
3088 2012-01-04 Filip Pizlo <fpizlo@apple.com>
3090 Incorrect use of DFG node reference counts when mutating the graph
3091 https://bugs.webkit.org/show_bug.cgi?id=75580
3092 <rdar://problem/10644607>
3094 Reviewed by Oliver Hunt.
3096 Made deref(node) follow the pattern of ref(node), which it should have
3100 (JSC::DFG::Graph::refChildren):
3101 (JSC::DFG::Graph::derefChildren):
3103 (JSC::DFG::Graph::deref):
3104 (JSC::DFG::Graph::clearAndDerefChild1):
3105 (JSC::DFG::Graph::clearAndDerefChild2):
3106 (JSC::DFG::Graph::clearAndDerefChild3):
3108 (JSC::DFG::Node::deref):
3109 * dfg/DFGPropagator.cpp:
3110 (JSC::DFG::Propagator::fixupNode):
3112 2012-01-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
3114 [Qt] Introduce new qmake variable 'WEBKIT' for signaling dependencies
3116 The custom qmake variable 'WEBKIT' is used for signaling that a
3117 target depends in some way on other subproject of the WebKit
3118 project. For now this is limited to the set of intermediate
3119 libraries: wtf, javascriptcore, webcore, and webkit2.
3121 This replaces the previous convension of using load(foo) for
3122 just include paths, and CONFIG += foo to also link against foo.
3124 Adding a dependency results in additional include paths being
3125 available, and potentially linking to the library. This is
3126 decided by the build system based on conditions such as what
3127 kind of target is being built and the general build config.
3129 An advantage to his approach is that it simplifies the individual
3130 foo.prf files, for example by allowing us to use INCLUDEPATH +=
3131 and LIBS += as normal instead of prepending.
3133 Reviewed by Simon Hausmann.
3139 2012-01-03 Filip Pizlo <fpizlo@apple.com>
3141 DFG: The assertion that a double-voted variable cannot become double-unvoted is wrong
3142 https://bugs.webkit.org/show_bug.cgi?id=75516
3143 <rdar://problem/10640266>
3145 Reviewed by Gavin Barraclough.
3147 Removed the offending assertion, since it was wrong. Also hardened the code to make
3148 this case less likely by first having the propagator fixpoint converge, and then doing
3149 double voting combined with a second fixpoint. This is neutral on benchmarks and
3150 fixes the assertion in a fairly low-risk way (i.e. we won't vote a variable double
3151 until we've converged to the conclusion that it really is double).
3153 * dfg/DFGPropagator.cpp:
3154 (JSC::DFG::Propagator::propagatePredictions):
3155 * dfg/DFGVariableAccessData.h:
3156 (JSC::DFG::VariableAccessData::tallyVotesForShouldUseDoubleFormat):
3158 2012-01-03 Filip Pizlo <fpizlo@apple.com>
3160 REGRESSION (r98196-98236): Incorrect layout of iGoogle with RSS feeds
3161 https://bugs.webkit.org/show_bug.cgi?id=75303
3162 <rdar://problem/10633533>
3164 Reviewed by Gavin Barraclough.
3166 The this argument was not being kept alive in some cases during inlining and intrinsic
3169 * dfg/DFGByteCodeParser.cpp:
3170 (JSC::DFG::ByteCodeParser::handleCall):
3171 (JSC::DFG::ByteCodeParser::emitFunctionCheck):
3172 (JSC::DFG::ByteCodeParser::handleInlining):
3174 2012-01-03 Gavin Barraclough <barraclough@apple.com>
3178 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3180 2012-01-03 Gavin Barraclough <barraclough@apple.com>
3184 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3186 2012-01-03 Gavin Barraclough <barraclough@apple.com>
3188 https://bugs.webkit.org/show_bug.cgi?id=75140
3190 Reviewed by Sam Weinig.
3192 Rewrite JSArray::putSlowCase to be much cleaner & simpler.
3194 This rewrite only significantly changes behaviour for sparse array, specifically
3195 in how sparse arrays are reified back to vector form. This does not affect arrays
3196 with less than 10000 entries (since these always use a vector). The more common
3197 cases of sparse array behavior (though large sparse arrays are rare) - arrays that
3198 always remain sparse, and arrays that are filled in reverse sequential order -
3199 should be just as fast or faster (since reification is simpler & no longer
3200 requires map lookups) after these changes.
3202 Simplifying this code allows all cases of putByIndex that need to grow the vector
3203 to do so via increaseVectorLength, which means that this method can encapsulate
3204 the policy of determining how the vector should be grown.
3206 No performance impact.
3208 * runtime/JSArray.cpp:
3209 (JSC::isDenseEnoughForVector):
3210 - any array of length <= MIN_SPARSE_ARRAY_INDEX is dense enough for a vector.
3211 (JSC::JSArray::putByIndex):
3212 - simplify & comment.
3213 (JSC::JSArray::putByIndexBeyondVectorLength):
3214 - Re-written to be much clearer & simpler.
3215 (JSC::JSArray::increaseVectorLength):
3216 (JSC::JSArray::increaseVectorPrefixLength):
3217 - add explicit checks against MAX_STORAGE_VECTOR_LENGTH, so clients do not need do so.
3218 (JSC::JSArray::push):
3219 - simplify & comment.
3220 * runtime/JSArray.h:
3221 - removed SparseArrayValueMap::take.
3223 2012-01-03 Gavin Barraclough <barraclough@apple.com>
3227 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3229 2012-01-03 Gavin Barraclough <barraclough@apple.com>
3231 https://bugs.webkit.org/show_bug.cgi?id=75140
3233 Reviewed by Sam Weinig.
3235 Simplify JSArray creation - remove ArgsList/JSValue* create methods
3236 (this functionality can be implemented in terms of tryCreateUninitialized).
3238 * JavaScriptCore.exp:
3239 * runtime/ArrayConstructor.cpp:
3240 - use constructArray/constructEmptyArray instead of calling JSArray::create directly
3241 (JSC::constructArrayWithSizeQuirk):
3242 * runtime/JSArray.cpp:
3243 * runtime/JSArray.h:
3244 - removed ArgsList/JSValue* create methods
3245 * runtime/JSGlobalObject.h:
3246 (JSC::constructEmptyArray):
3247 (JSC::constructArray):
3248 - changed to be implemented in terms of JSArray::tryCreateUninitialized
3250 2012-01-03 Gavin Barraclough <barraclough@apple.com>
3252 https://bugs.webkit.org/show_bug.cgi?id=75429
3253 ThrowTypeError should be a singleton object
3255 Reviewed by Sam Weinig.
3257 Per section 13.2.3 of the spec.
3258 We could change setAccessorDescriptor to be able to share the global
3259 GetterSetter object, rather than storing the accessor functions and
3260 creating a new GetterSetter in defineProperty - but this won't be a
3261 small change to PropertyDescriptors (and would probably mean making
3262 GetterSetter objects immutable?) - so I'll leave that for another
3265 * JavaScriptCore.exp:
3266 - don't export setAccessorDescriptor
3267 * runtime/Arguments.cpp:
3268 (JSC::Arguments::createStrictModeCallerIfNecessary):
3269 (JSC::Arguments::createStrictModeCalleeIfNecessary):
3270 - call throwTypeErrorGetterSetter instead of createTypeErrorFunction
3271 * runtime/Error.cpp:
3273 - remove createTypeErrorFunction
3274 * runtime/JSFunction.cpp:
3275 * runtime/JSFunction.h:
3276 - remove unused createDescriptorForThrowingProperty
3277 * runtime/JSGlobalObject.cpp:
3278 (JSC::JSGlobalObject::reset):
3279 (JSC::JSGlobalObject::visitChildren):
3280 - removed m_strictModeTypeErrorFunctionStructure.
3281 * runtime/JSGlobalObject.h:
3282 (JSC::JSGlobalObject::internalFunctionStructure):
3283 - removed m_strictModeTypeErrorFunctionStructure.
3284 * runtime/PropertyDescriptor.cpp:
3285 (JSC::PropertyDescriptor::setAccessorDescriptor):
3286 - changed to take a GetterSetter
3287 * runtime/PropertyDescriptor.h:
3288 - changed to take a GetterSetter
3290 2012-01-02 Gavin Barraclough <barraclough@apple.com>
3292 Check in fixes for jsc tests following bug #75455.
3294 * tests/mozilla/ecma/GlobalObject/15.1.2.2-1.js:
3295 * tests/mozilla/ecma/GlobalObject/15.1.2.2-2.js:
3297 2012-01-02 Gavin Barraclough <barraclough@apple.com>
3299 https://bugs.webkit.org/show_bug.cgi?id=75452
3300 If argument to Error is undefined, message is not set
3302 Reviewed by Sam Weinig.
3304 Per section 15.11.1.1 of the spec.
3306 * runtime/ErrorInstance.h:
3307 (JSC::ErrorInstance::create):
3308 (JSC::ErrorInstance::finishCreation):
3310 2012-01-02 Gavin Barraclough <barraclough@apple.com>
3312 ES5 prohibits parseInt from supporting octal
3313 https://bugs.webkit.org/show_bug.cgi?id=75455
3315 Reviewed by Sam Weinig.
3317 See sections 15.1.2.2 and annex E.
3319 * runtime/JSGlobalObjectFunctions.cpp:
3322 2012-01-02 Gavin Barraclough <barraclough@apple.com>
3324 https://bugs.webkit.org/show_bug.cgi?id=55343
3325 Global JSON should be configurable but isn't
3327 Reviewed by Sam Weinig.
3329 * runtime/JSGlobalObject.cpp:
3330 (JSC::JSGlobalObject::reset):
3331 - make JSON configurable
3333 2012-01-01 Filip Pizlo <fpizlo@apple.com>
3335 Call instructions should leave room for linking information
3336 https://bugs.webkit.org/show_bug.cgi?id=75422
3337 <rdar://problem/10633985>
3339 Reviewed by Oliver Hunt.
3341 * bytecode/Opcode.h:
3342 * bytecompiler/BytecodeGenerator.cpp:
3343 (JSC::BytecodeGenerator::emitCall):
3344 (JSC::BytecodeGenerator::emitConstruct):
3346 2011-12-31 Dan Bernstein <mitz@apple.com>
3348 Continue trying to fix the Windows build after r103823.
3350 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3352 2011-12-31 Dan Bernstein <mitz@apple.com>
3354 Start trying to fix the Windows build after r103823.
3356 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3358 2011-12-30 Anders Carlsson <andersca@apple.com>
3360 Add a ParamStorageTraits specialization for RetainPtr
3361 https://bugs.webkit.org/show_bug.cgi?id=75392
3363 Reviewed by Daniel Bates.
3366 Add a partial specialization of ParamStorageTraits for RetainPtr<T>.
3369 Bring in the retainPtr function template from WTF.
3371 2011-12-29 Sam Weinig <sam@webkit.org>
3373 It should be easier to iterate a Vector backwards
3374 https://bugs.webkit.org/show_bug.cgi?id=75359
3376 Reviewed by Anders Carlsson.
3378 Adds Vector::rbegin(), Vector::rend(), and Vector::reversed(),
3379 a new proxy driven way to access a vector backwards. One can use
3380 reversed() in a range-based for loop like so:
3382 for (auto val: myVector.reversed())
3386 (WTF::Vector::~Vector):
3389 (WTF::Vector::rbegin):
3390 (WTF::Vector::rend):
3391 Added using standard adaptor std::reverse_iterator.
3393 (WTF::Vector::reversed):
3394 (WTF::Vector::VectorReverseProxy::begin):
3395 (WTF::Vector::VectorReverseProxy::end):
3396 Add proxy similar to one used in HashMap for keys() and values()
3397 which allows access to a Vector backwards for use in range-based
3400 2011-12-29 Gavin Barraclough <barraclough@apple.com>
3402 https://bugs.webkit.org/show_bug.cgi?id=75140
3404 Reviewed by Oliver Hunt.
3406 Start cleaning up JSArray construction. JSArray has a set of create methods,
3407 one of which (currently) takes a 'creation mode' enum parameter. Based on that
3408 parameter, the constructor does one of two completely different things. If the
3409 parameter is 'CreateInitialized' it creates an array, setting the length, but
3410 does not eagerly allocate a storage vector of the specified length. A small
3411 (BASE_VECTOR_LEN sized) initial vector will be allocated, and cleared, property
3412 access to the vector will read the hole value (return undefined). The alternate
3413 usage of this method ('CreateCompact') does something very different. It tries
3414 to create an array of the requested length, and also allocates a storage vector
3415 large enough to hold all properties. It does not clear the storage vector,
3416 leaving the memory uninitialized and requiring the user to call a method
3417 'uncheckedSetIndex' to initialize values in the vector.
3419 This patch factors out these two behaviours, moving the 'CreateCompact' mode
3420 into its own method, 'tryCreateUninitialized' (matching the naming for this
3421 functionality in the string classes). 'tryCreateUninitialized' may return 0 if
3422 memory allocation fails during construction of the object. The construction
3423 pattern changes such that values added during initialization will be marked if