1 2012-01-26 Csaba Osztrogonác <ossy@webkit.org>
3 [Qt][Win] One more speculative buildfix after r105970.
7 2012-01-26 Csaba Osztrogonác <ossy@webkit.org>
9 [Qt][Win] Speculative buildfix after r105970.
11 * JavaScriptCore.pri: Link lgdi for DeleteObject() and DeleteDC().
13 2012-01-26 Sheriff Bot <webkit.review.bot@gmail.com>
15 Unreviewed, rolling out r105982.
16 http://trac.webkit.org/changeset/105982
17 https://bugs.webkit.org/show_bug.cgi?id=77090
19 breaks the world (Requested by WildFox on #webkit).
24 * wtf/mac/MainThreadMac.mm:
26 (WTF::registerGCThread):
27 (WTF::isMainThreadOrGCThread):
29 2012-01-26 Roland Takacs <takacs.roland@stud.u-szeged.hu>
31 [Qt] GC should be parallel on Qt platform
32 https://bugs.webkit.org/show_bug.cgi?id=73309
34 Reviewed by Zoltan Herczeg.
36 These changes made the parallel gc feature available for Qt port.
37 The implementation of "registerGCThread" and "isMainThreadOrGCThread"
38 is moved from MainThreadMac.mm to the common MainThread.cpp to make
39 them available for other platforms.
42 V8 speed-up: 1.071x as fast [From: 746.1ms To: 696.4ms ]
43 WindScorpion speed-up: 1.082x as fast [From: 3490.4ms To: 3226.7ms]
44 V8 Splay speed-up: 1.158x as fast [From: 145.8ms To: 125.9ms ]
46 Tested on Intel(R) Core(TM) i5-2320 CPU @ 3.00GHz with 4-core.
50 (WTF::registerGCThread):
51 (WTF::isMainThreadOrGCThread):
53 * wtf/mac/MainThreadMac.mm:
55 2012-01-26 Andy Estes <aestes@apple.com>
57 REGRESSION (r105555): Incorrect use of OS() macro breaks OwnPtr when used with Win32 data types
58 https://bugs.webkit.org/show_bug.cgi?id=77073
60 Reviewed by Ryosuke Niwa.
62 r105555 changed PLATFORM(WIN) to OS(WIN), but WTF_OS_WIN isn't defined.
63 This should have been changed to OS(WINDOWS). This causes the
64 preprocessor to strip out Win32 data type overrides for deleteOwnedPtr,
65 causing allocations made by Win32 to be deleted by fastmalloc.
68 (WTF): Use OS(WINDOWS) instead of OS(WIN).
70 2012-01-25 Mark Rowe <mrowe@apple.com>
72 Attempted Mac build fix after r105939.
74 * runtime/DatePrototype.cpp: Don't #include unicode/udat.h on Mac or iOS.
75 It isn't used on these platforms and isn't available in the ICU headers
78 2012-01-25 Mark Rowe <mrowe@apple.com>
80 Build in to an alternate location when USE_STAGING_INSTALL_PATH is set.
82 <rdar://problem/10609417> Adopt USE_STAGING_INSTALL_PATH
84 Reviewed by David Kilzer.
86 * Configurations/Base.xcconfig: Define NORMAL_JAVASCRIPTCORE_FRAMEWORKS_DIR, which contains
87 the path where JavaScriptCore is normally installed. Update JAVASCRIPTCORE_FRAMEWORKS_DIR
88 to point to the staged frameworks directory when USE_STAGING_INSTALL_PATH is set.
89 * Configurations/JavaScriptCore.xcconfig: Always set the framework's install name based on
90 the normal framework location. This prevents an incorrect install name from being used when
91 installing in to the staged frameworks directory.
93 2012-01-25 Eli Fidler <efidler@rim.com>
95 Implement Date.toLocaleString() using ICU
96 https://bugs.webkit.org/show_bug.cgi?id=76714
98 Reviewed by Darin Adler.
100 * runtime/DatePrototype.cpp:
101 (JSC::formatLocaleDate):
103 2012-01-25 Hajime Morita <morrita@google.com>
105 ENABLE_SHADOW_DOM should be available via build-webkit --shadow-dom
106 https://bugs.webkit.org/show_bug.cgi?id=76863
108 Reviewed by Dimitri Glazkov.
110 Added a feature flag.
112 * Configurations/FeatureDefines.xcconfig:
114 2012-01-25 Yong Li <yoli@rim.com>
116 [BlackBerry] Implement OSAllocator::commit/decommit.
117 BlackBerry port should support virtual memory decommiting.
118 https://bugs.webkit.org/show_bug.cgi?id=77013
120 Reviewed by Rob Buis.
122 * wtf/OSAllocatorPosix.cpp:
123 (WTF::OSAllocator::reserveUncommitted):
124 (WTF::OSAllocator::commit):
125 (WTF::OSAllocator::decommit):
128 2012-01-24 Oliver Hunt <oliver@apple.com>
130 Make DFG update topCallFrame
131 https://bugs.webkit.org/show_bug.cgi?id=76969
133 Reviewed by Filip Pizlo.
135 Add NativeCallFrameTracer to manage topCallFrame assignment
136 in the DFG operations, and make use of it.
138 * dfg/DFGOperations.cpp:
139 (JSC::DFG::operationPutByValInternal):
141 * interpreter/Interpreter.h:
143 (NativeCallFrameTracer):
144 (JSC::NativeCallFrameTracer::NativeCallFrameTracer):
146 2012-01-24 Filip Pizlo <fpizlo@apple.com>
148 Inlining breaks call frame walking when the walking is done from outside the inlinee,
149 but inside a code block that had inlining
150 https://bugs.webkit.org/show_bug.cgi?id=76978
151 <rdar://problem/10720904>
153 Reviewed by Oliver Hunt.
155 * bytecode/CodeBlock.h:
156 (JSC::CodeBlock::codeOriginForReturn):
157 * interpreter/CallFrame.cpp:
158 (JSC::CallFrame::trueCallerFrame):
160 2012-01-24 Gavin Barraclough <barraclough@apple.com>
162 https://bugs.webkit.org/show_bug.cgi?id=76855
163 Implement a JIT-code aware sampling profiler for JSC
165 Reviewed by Oliver Hunt.
167 Add support to MetaAllocator.cpp to track all live handles in a map,
168 allowing lookup based on any address within the allocation.
170 * wtf/MetaAllocator.cpp:
171 (WTF::MetaAllocatorTracker::notify):
172 (WTF::MetaAllocatorTracker::release):
173 - Track live handle objects in a map.
174 (WTF::MetaAllocator::release):
175 - Removed support for handles with null m_allocator (no longer used).
176 - Notify the tracker of handles being released.
177 (WTF::MetaAllocatorHandle::~MetaAllocatorHandle):
178 - Moved functionality out into MetaAllocator::release.
179 (WTF::MetaAllocatorHandle::shrink):
180 - Removed support for handles with null m_allocator (no longer used).
181 (WTF::MetaAllocator::MetaAllocator):
182 - Initialize m_tracker.
183 (WTF::MetaAllocator::allocate):
184 - Notify the tracker of new allocations.
185 * wtf/MetaAllocator.h:
186 (WTF::MetaAllocatorTracker::find):
187 - Lookup a MetaAllocatorHandle based on an address inside the allocation.
188 (WTF::MetaAllocator::trackAllocations):
189 - Register a callback object to track allocation state.
190 * wtf/MetaAllocatorHandle.h:
191 - Remove unused createSelfManagedHandle/constructor.
192 (WTF::MetaAllocatorHandle::key):
193 - Added, for use in RedBlackTree.
195 2012-01-24 Mark Hahnenberg <mhahnenberg@apple.com>
197 Use copying collector for out-of-line JSObject property storage
198 https://bugs.webkit.org/show_bug.cgi?id=76665
200 Reviewed by Geoffrey Garen.
202 * runtime/JSObject.cpp:
203 (JSC::JSObject::visitChildren): Changed to use copyAndAppend whenever the property storage is out-of-line.
204 Also added a temporary variable to avoid warnings from GCC.
205 (JSC::JSObject::allocatePropertyStorage): Changed to use tryAllocateStorage/tryReallocateStorage as opposed to
206 operator new. Also added a temporary variable to avoid warnings from GCC.
207 * runtime/JSObject.h:
209 2012-01-24 Geoffrey Garen <ggaren@apple.com>
211 JSValue::toString() should return a JSString* instead of a UString
212 https://bugs.webkit.org/show_bug.cgi?id=76861
214 Fixed two failing layout tests after my last patch.
216 Reviewed by Gavin Barraclough.
218 * runtime/ArrayPrototype.cpp:
219 (JSC::arrayProtoFuncSort): Call value() after calling toString(), as
222 I missed this case because the JSString* type has a valid operator<,
223 so the compiler didn't complain.
225 2012-01-24 Kenichi Ishibashi <bashi@chromium.org>
227 [V8] Add Uint8ClampedArray support
228 https://bugs.webkit.org/show_bug.cgi?id=76803
230 Reviewed by Kenneth Russell.
232 * wtf/ArrayBufferView.h:
233 (WTF::ArrayBufferView::isUnsignedByteClampedArray): Added.
234 * wtf/Uint8ClampedArray.h:
235 (WTF::Uint8ClampedArray::isUnsignedByteClampedArray): Overridden to return true.
237 2012-01-23 Carlos Garcia Campos <cgarcia@igalia.com>
239 [GTK] Add WebKitDownload to WebKit2 GTK+ API
240 https://bugs.webkit.org/show_bug.cgi?id=72949
242 Reviewed by Martin Robinson.
244 * wtf/gobject/GOwnPtr.cpp:
245 (WTF::GTimer): Use g_timer_destroy() to free a GTimer.
246 * wtf/gobject/GOwnPtr.h: Add GTimer template.
247 * wtf/gobject/GTypedefs.h: Add GTimer forward declaration.
249 2012-01-24 Ilya Tikhonovsky <loislo@chromium.org>
251 Unreviewed build fix for Qt LinuxSH4 build after r105698.
253 * interpreter/Interpreter.cpp:
254 (JSC::Interpreter::privateExecute):
256 2012-01-23 Geoffrey Garen <ggaren@apple.com>
258 JSValue::toString() should return a JSString* instead of a UString
259 https://bugs.webkit.org/show_bug.cgi?id=76861
261 Reviewed by Gavin Barraclough.
263 This makes the common case -- toString() on a string -- faster and
264 inline-able. (Not a measureable speedup, but we can now remove a bunch
265 of duplicate hand-rolled code for this optimization.)
267 This also clarifies the boundary between "C++ strings" and "JS strings".
269 In all cases other than true, false, null, undefined, and multi-digit
270 numbers, the JS runtime was just retrieving a UString from a JSString,
271 so returning a JSString* is strictly better. In the other cases, we can
272 optimize to avoid creating a new JSString if we care to, but it doesn't
273 seem to be a big deal.
275 * JavaScriptCore.exp: Export!
282 (functionCheckSyntax):
285 * API/JSValueRef.cpp:
286 (JSValueToStringCopy):
287 * bytecode/CodeBlock.cpp:
288 (JSC::valueToSourceString): Call value() after calling toString(), to
289 convert from "JS string" (JSString*) to "C++ string" (UString), since
290 toString() no longer returns a "C++ string".
292 * dfg/DFGOperations.cpp:
293 (JSC::DFG::operationValueAddNotNumber):
295 (op_add): Updated for removal of toPrimitiveString():
296 all '+' operands can use toString(), except for object operands, which
297 need to take a slow path to call toPrimitive().
299 * runtime/ArrayPrototype.cpp:
300 (JSC::arrayProtoFuncToString):
301 (JSC::arrayProtoFuncToLocaleString):
302 (JSC::arrayProtoFuncJoin):
303 (JSC::arrayProtoFuncPush):
304 * runtime/CommonSlowPaths.h:
305 (JSC::CommonSlowPaths::opIn):
306 * runtime/DateConstructor.cpp:
308 * runtime/DatePrototype.cpp:
309 (JSC::formatLocaleDate): Call value() after calling toString(), as above.
311 * runtime/ErrorInstance.h:
312 (JSC::ErrorInstance::create): Simplified down to one canonical create()
313 function, to make string handling easier.
315 * runtime/ErrorPrototype.cpp:
316 (JSC::errorProtoFuncToString):
317 * runtime/ExceptionHelpers.cpp:
318 (JSC::createInvalidParamError):
319 (JSC::createNotAConstructorError):
320 (JSC::createNotAFunctionError):
321 (JSC::createNotAnObjectError):
322 * runtime/FunctionConstructor.cpp:
323 (JSC::constructFunctionSkippingEvalEnabledCheck):
324 * runtime/FunctionPrototype.cpp:
325 (JSC::functionProtoFuncBind):
326 * runtime/JSArray.cpp:
327 (JSC::JSArray::sort): Call value() after calling toString(), as above.
329 * runtime/JSCell.cpp:
330 * runtime/JSCell.h: Removed JSCell::toString() because JSValue does this
331 job now. Doing it in JSCell is slower (requires extra type checking), and
332 creates the misimpression that language-defined toString() behavior is
333 an implementation detail of JSCell.
335 * runtime/JSGlobalObjectFunctions.cpp:
338 (JSC::globalFuncEval):
339 (JSC::globalFuncParseInt):
340 (JSC::globalFuncParseFloat):
341 (JSC::globalFuncEscape):
342 (JSC::globalFuncUnescape): Call value() after calling toString(), as above.
344 * runtime/JSONObject.cpp:
345 (JSC::unwrapBoxedPrimitive):
346 (JSC::Stringifier::Stringifier):
347 (JSC::JSONProtoFuncParse): Removed some manual optimization that toString()
350 * runtime/JSObject.cpp:
351 (JSC::JSObject::toString):
352 * runtime/JSObject.h: Updated to return JSString*.
354 * runtime/JSString.cpp:
355 * runtime/JSString.h:
356 (JSC::JSValue::toString): Removed, since I removed JSCell::toString().
358 * runtime/JSValue.cpp:
359 (JSC::JSValue::toStringSlowCase): Removed toPrimitiveString(), and re-
360 spawned toStringSlowCase() from its zombie corpse, since toPrimitiveString()
361 basically did what we want all the time. (Note that the toPrimitive()
362 preference changes from NoPreference to PreferString, because that's
363 how ToString is defined in the language. op_add does not want this behavior.)
365 * runtime/NumberPrototype.cpp:
366 (JSC::numberProtoFuncToString):
367 (JSC::numberProtoFuncToLocaleString): A little simpler, now that toString()
370 * runtime/ObjectConstructor.cpp:
371 (JSC::objectConstructorGetOwnPropertyDescriptor):
372 (JSC::objectConstructorDefineProperty):
373 * runtime/ObjectPrototype.cpp:
374 (JSC::objectProtoFuncHasOwnProperty):
375 (JSC::objectProtoFuncDefineGetter):
376 (JSC::objectProtoFuncDefineSetter):
377 (JSC::objectProtoFuncLookupGetter):
378 (JSC::objectProtoFuncLookupSetter):
379 (JSC::objectProtoFuncPropertyIsEnumerable): More calls to value(), as above.
381 * runtime/Operations.cpp:
382 (JSC::jsAddSlowCase): Need to check for object before taking the toString()
383 fast path becuase adding an object to a string requires calling toPrimitive()
384 on the object, not toString(). (They differ in their preferred conversion
387 * runtime/Operations.h:
389 (JSC::jsStringFromArguments): This code gets simpler, now that toString()
390 does the right thing.
392 (JSC::jsAdd): Now checks for object, just like jsAddSlowCase().
394 * runtime/RegExpConstructor.cpp:
395 (JSC::setRegExpConstructorInput):
396 (JSC::constructRegExp):
397 * runtime/RegExpObject.cpp:
398 (JSC::RegExpObject::match):
399 * runtime/RegExpPrototype.cpp:
400 (JSC::regExpProtoFuncCompile):
401 (JSC::regExpProtoFuncToString): More calls to value(), as above.
403 * runtime/StringConstructor.cpp:
404 (JSC::constructWithStringConstructor):
405 (JSC::callStringConstructor): This code gets simpler, now that toString()
406 does the right thing.
408 * runtime/StringPrototype.cpp:
409 (JSC::replaceUsingRegExpSearch):
410 (JSC::replaceUsingStringSearch):
411 (JSC::stringProtoFuncReplace):
412 (JSC::stringProtoFuncCharAt):
413 (JSC::stringProtoFuncCharCodeAt):
414 (JSC::stringProtoFuncConcat):
415 (JSC::stringProtoFuncIndexOf):
416 (JSC::stringProtoFuncLastIndexOf):
417 (JSC::stringProtoFuncMatch):
418 (JSC::stringProtoFuncSearch):
419 (JSC::stringProtoFuncSlice):
420 (JSC::stringProtoFuncSplit):
421 (JSC::stringProtoFuncSubstr):
422 (JSC::stringProtoFuncSubstring):
423 (JSC::stringProtoFuncToLowerCase):
424 (JSC::stringProtoFuncToUpperCase):
425 (JSC::stringProtoFuncLocaleCompare):
426 (JSC::stringProtoFuncBig):
427 (JSC::stringProtoFuncSmall):
428 (JSC::stringProtoFuncBlink):
429 (JSC::stringProtoFuncBold):
430 (JSC::stringProtoFuncFixed):
431 (JSC::stringProtoFuncItalics):
432 (JSC::stringProtoFuncStrike):
433 (JSC::stringProtoFuncSub):
434 (JSC::stringProtoFuncSup):
435 (JSC::stringProtoFuncFontcolor):
436 (JSC::stringProtoFuncFontsize):
437 (JSC::stringProtoFuncAnchor):
438 (JSC::stringProtoFuncLink):
439 (JSC::trimString): Some of this code gets simpler, now that toString()
440 does the right thing. More calls to value(), as above.
442 2012-01-23 Luke Macpherson <macpherson@chromium.org>
444 Unreviewed, rolling out r105676.
445 http://trac.webkit.org/changeset/105676
446 https://bugs.webkit.org/show_bug.cgi?id=76665
448 Breaks build on max due to compile warnings.
450 * runtime/JSObject.cpp:
451 (JSC::JSObject::finalize):
452 (JSC::JSObject::visitChildren):
453 (JSC::JSObject::allocatePropertyStorage):
454 * runtime/JSObject.h:
456 2012-01-23 Mark Hahnenberg <mhahnenberg@apple.com>
458 Use copying collector for out-of-line JSObject property storage
459 https://bugs.webkit.org/show_bug.cgi?id=76665
461 Reviewed by Geoffrey Garen.
463 * runtime/JSObject.cpp:
464 (JSC::JSObject::visitChildren): Changed to use copyAndAppend whenever the property storage is out-of-line.
465 (JSC::JSObject::allocatePropertyStorage): Changed to use tryAllocateStorage/tryReallocateStorage as opposed to
467 * runtime/JSObject.h:
469 2012-01-23 Brian Weinstein <bweinstein@apple.com>
471 More build fixing after r105646.
473 * JavaScriptCore.exp:
475 2012-01-23 Gavin Barraclough <barraclough@apple.com>
477 https://bugs.webkit.org/show_bug.cgi?id=76855
478 Implement a JIT-code aware sampling profiler for JSC
480 Reviewed by Geoff Garen.
482 Step 2: generalize RedBlackTree. The profiler is going to want tio use
483 a RedBlackTree, allow this class to work with subclasses of
484 RedBlackTree::Node, Node should not need to know the names of the m_key
485 and m_value fields (the subclass can provide a key() accessor), and
486 RedBlackTree does not need to know anything about ValueType.
488 * JavaScriptCore.exp:
489 * wtf/MetaAllocator.cpp:
490 (WTF::MetaAllocator::findAndRemoveFreeSpace):
491 (WTF::MetaAllocator::debugFreeSpaceSize):
492 (WTF::MetaAllocator::addFreeSpace):
493 * wtf/MetaAllocator.h:
494 (WTF::MetaAllocator::FreeSpaceNode::FreeSpaceNode):
495 (WTF::MetaAllocator::FreeSpaceNode::key):
496 * wtf/MetaAllocatorHandle.h:
497 (WTF::MetaAllocatorHandle::key):
498 * wtf/RedBlackTree.h:
499 (WTF::RedBlackTree::Node::successor):
500 (WTF::RedBlackTree::Node::predecessor):
501 (WTF::RedBlackTree::Node::parent):
502 (WTF::RedBlackTree::Node::setParent):
503 (WTF::RedBlackTree::Node::left):
504 (WTF::RedBlackTree::Node::setLeft):
505 (WTF::RedBlackTree::Node::right):
506 (WTF::RedBlackTree::Node::setRight):
507 (WTF::RedBlackTree::insert):
508 (WTF::RedBlackTree::remove):
509 (WTF::RedBlackTree::findExact):
510 (WTF::RedBlackTree::findLeastGreaterThanOrEqual):
511 (WTF::RedBlackTree::findGreatestLessThanOrEqual):
512 (WTF::RedBlackTree::first):
513 (WTF::RedBlackTree::last):
514 (WTF::RedBlackTree::size):
515 (WTF::RedBlackTree::treeMinimum):
516 (WTF::RedBlackTree::treeMaximum):
517 (WTF::RedBlackTree::treeInsert):
518 (WTF::RedBlackTree::leftRotate):
519 (WTF::RedBlackTree::rightRotate):
520 (WTF::RedBlackTree::removeFixup):
522 2012-01-23 Andy Estes <aestes@apple.com>
524 Fix the build after r105635.
526 * JavaScriptCore.exp:
528 2012-01-23 Mark Hahnenberg <mhahnenberg@apple.com>
530 Remove StackBounds from JSGlobalData
531 https://bugs.webkit.org/show_bug.cgi?id=76310
533 Reviewed by Sam Weinig.
535 Removed StackBounds and the stack() function from JSGlobalData since it no
536 longer accessed any members of JSGlobalData.
538 * bytecompiler/BytecodeGenerator.cpp:
539 (JSC::BytecodeGenerator::BytecodeGenerator):
540 * heap/MachineStackMarker.cpp:
541 (JSC::MachineThreads::addCurrentThread):
542 (JSC::MachineThreads::gatherFromCurrentThread):
545 * runtime/JSGlobalData.cpp:
546 (JSC::JSGlobalData::JSGlobalData):
547 * runtime/JSGlobalData.h:
549 2012-01-23 Gavin Barraclough <barraclough@apple.com>
551 Implement a JIT-code aware sampling profiler for JSC
552 https://bugs.webkit.org/show_bug.cgi?id=76855
554 Rubber stanmped by Geoff Garen.
556 Mechanical change - pass CodeBlock through to the executable allocator,
557 such that we will be able to map ranges of JIT code back to their owner.
559 * assembler/ARMAssembler.cpp:
560 (JSC::ARMAssembler::executableCopy):
561 * assembler/ARMAssembler.h:
562 * assembler/AssemblerBuffer.h:
563 (JSC::AssemblerBuffer::executableCopy):
564 * assembler/AssemblerBufferWithConstantPool.h:
565 (JSC::AssemblerBufferWithConstantPool::executableCopy):
566 * assembler/LinkBuffer.h:
567 (JSC::LinkBuffer::LinkBuffer):
568 (JSC::LinkBuffer::linkCode):
569 * assembler/MIPSAssembler.h:
570 (JSC::MIPSAssembler::executableCopy):
571 * assembler/SH4Assembler.h:
572 (JSC::SH4Assembler::executableCopy):
573 * assembler/X86Assembler.h:
574 (JSC::X86Assembler::executableCopy):
575 (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
576 * dfg/DFGJITCompiler.cpp:
577 (JSC::DFG::JITCompiler::compile):
578 (JSC::DFG::JITCompiler::compileFunction):
579 * dfg/DFGOSRExitCompiler.cpp:
580 * dfg/DFGRepatch.cpp:
581 (JSC::DFG::generateProtoChainAccessStub):
582 (JSC::DFG::tryCacheGetByID):
583 (JSC::DFG::tryBuildGetByIDList):
584 (JSC::DFG::tryCachePutByID):
586 (JSC::DFG::osrExitGenerationThunkGenerator):
587 * jit/ExecutableAllocator.cpp:
588 (JSC::ExecutableAllocator::allocate):
589 * jit/ExecutableAllocator.h:
590 * jit/ExecutableAllocatorFixedVMPool.cpp:
591 (JSC::ExecutableAllocator::allocate):
593 (JSC::JIT::privateCompile):
594 * jit/JITOpcodes.cpp:
595 (JSC::JIT::privateCompileCTIMachineTrampolines):
596 * jit/JITOpcodes32_64.cpp:
597 (JSC::JIT::privateCompileCTIMachineTrampolines):
598 (JSC::JIT::privateCompileCTINativeCall):
599 * jit/JITPropertyAccess.cpp:
600 (JSC::JIT::stringGetByValStubGenerator):
601 (JSC::JIT::privateCompilePutByIdTransition):
602 (JSC::JIT::privateCompilePatchGetArrayLength):
603 (JSC::JIT::privateCompileGetByIdProto):
604 (JSC::JIT::privateCompileGetByIdSelfList):
605 (JSC::JIT::privateCompileGetByIdProtoList):
606 (JSC::JIT::privateCompileGetByIdChainList):
607 (JSC::JIT::privateCompileGetByIdChain):
608 * jit/JITPropertyAccess32_64.cpp:
609 (JSC::JIT::stringGetByValStubGenerator):
610 (JSC::JIT::privateCompilePutByIdTransition):
611 (JSC::JIT::privateCompilePatchGetArrayLength):
612 (JSC::JIT::privateCompileGetByIdProto):
613 (JSC::JIT::privateCompileGetByIdSelfList):
614 (JSC::JIT::privateCompileGetByIdProtoList):
615 (JSC::JIT::privateCompileGetByIdChainList):
616 (JSC::JIT::privateCompileGetByIdChain):
618 * jit/SpecializedThunkJIT.h:
619 (JSC::SpecializedThunkJIT::finalize):
621 (JSC::Yarr::YarrGenerator::compile):
623 2012-01-23 Xianzhu Wang <wangxianzhu@chromium.org>
625 Basic enhancements to StringBuilder
626 https://bugs.webkit.org/show_bug.cgi?id=67081
628 This change contains the following enhancements to StringBuilder,
629 for convenience, performance, testability, etc.:
630 - Change toStringPreserveCapacity() to const
631 - new public methods: capacity(), swap(), toAtomicString(), canShrink()
632 and append(const StringBuilder&)
633 - == and != opearators to compare StringBuilders and a StringBuilder/String
635 Unit tests: Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp
637 Reviewed by Darin Adler.
639 * JavaScriptCore.exp:
640 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
641 * wtf/text/AtomicString.cpp:
642 (WTF::SubstringTranslator::hash):
643 (WTF::SubstringTranslator::equal):
644 (WTF::SubstringTranslator::translate):
645 (WTF::AtomicString::add):
646 (WTF::AtomicString::addSlowCase):
647 * wtf/text/AtomicString.h:
648 (WTF::AtomicString::AtomicString):
649 (WTF::AtomicString::add):
650 * wtf/text/StringBuilder.cpp:
651 (WTF::StringBuilder::reifyString):
652 (WTF::StringBuilder::resize):
653 (WTF::StringBuilder::canShrink):
654 (WTF::StringBuilder::shrinkToFit):
655 * wtf/text/StringBuilder.h:
656 (WTF::StringBuilder::append):
657 (WTF::StringBuilder::toString):
658 (WTF::StringBuilder::toStringPreserveCapacity):
659 (WTF::StringBuilder::toAtomicString):
660 (WTF::StringBuilder::isEmpty):
661 (WTF::StringBuilder::capacity):
662 (WTF::StringBuilder::is8Bit):
663 (WTF::StringBuilder::swap):
667 * wtf/text/StringImpl.h:
669 2012-01-23 Carlos Garcia Campos <cgarcia@igalia.com>
671 Unreviewed. Fix make distcheck.
673 * GNUmakefile.list.am: Add missing files, remove deleted files and
676 2012-01-22 Filip Pizlo <fpizlo@apple.com>
678 Build fix for non-DFG platforms that error out on warn-unused-parameter.
680 * bytecode/CallLinkStatus.cpp:
681 (JSC::CallLinkStatus::computeFor):
682 * bytecode/GetByIdStatus.cpp:
683 (JSC::GetByIdStatus::computeFor):
684 * bytecode/MethodCallLinkStatus.cpp:
685 (JSC::MethodCallLinkStatus::computeFor):
686 * bytecode/PutByIdStatus.cpp:
687 (JSC::PutByIdStatus::computeFor):
689 2012-01-22 Filip Pizlo <fpizlo@apple.com>
691 Build fix for non-DFG platforms.
693 * bytecode/CallLinkStatus.cpp:
694 (JSC::CallLinkStatus::computeFor):
695 * bytecode/GetByIdStatus.cpp:
696 (JSC::GetByIdStatus::computeFor):
697 * bytecode/MethodCallLinkStatus.cpp:
698 (JSC::MethodCallLinkStatus::computeFor):
699 * bytecode/PutByIdStatus.cpp:
700 (JSC::PutByIdStatus::computeFor):
702 2012-01-20 Filip Pizlo <fpizlo@apple.com>
704 DFG should not have code that directly decodes the states of old JIT inline
705 cache data structures
706 https://bugs.webkit.org/show_bug.cgi?id=76768
708 Reviewed by Sam Weinig.
710 Introduced new classes (like GetByIdStatus) that encapsulate the set of things
711 that the DFG would like to know about property accesses and calls. Whereas it
712 previously got this information by directly decoding the data structures used
713 by the old JIT for inline caching, it now uses these classes, which do the work
714 for it. This should make it somewhat more straight forward to introduce new
715 ways of profiling the same information.
717 Also hoisted StructureSet into bytecode/ from dfg/, because it's now used by
720 Making this work right involved carefully ensuring that the heuristics for
721 choosing how to handle property accesses was at least as good as what we had
722 before, since I completely restructured that code. Currently the performance
723 looks neutral. Since I rewrote the code I did change some things that I never
724 liked before, like previously if a put_bu_id had executed exactly once then
725 we'd compile it as if it had taken slow-path. Executing once is special because
726 then the inline cache is not baked in, so there is no information about how the
727 DFG should optimize the code. Now this is rationalized: if the put_by_id does
728 not offer enough information to be optimized (i.e. had executed 0 or 1 times)
729 then we turn it into a forced OSR exit (i.e. a patch point). However, get_by_id
730 still has the old behavior; I left it that way because I didn't want to make
731 too many changes at once.
734 * GNUmakefile.list.am:
735 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
736 * JavaScriptCore.xcodeproj/project.pbxproj:
738 * bytecode/CallLinkStatus.cpp: Added.
739 (JSC::CallLinkStatus::computeFor):
740 * bytecode/CallLinkStatus.h: Added.
741 (JSC::CallLinkStatus::CallLinkStatus):
742 (JSC::CallLinkStatus::isSet):
743 (JSC::CallLinkStatus::operator!):
744 (JSC::CallLinkStatus::couldTakeSlowPath):
745 (JSC::CallLinkStatus::callTarget):
746 * bytecode/GetByIdStatus.cpp: Added.
747 (JSC::GetByIdStatus::computeFor):
748 * bytecode/GetByIdStatus.h: Added.
749 (JSC::GetByIdStatus::GetByIdStatus):
750 (JSC::GetByIdStatus::state):
751 (JSC::GetByIdStatus::isSet):
752 (JSC::GetByIdStatus::operator!):
753 (JSC::GetByIdStatus::isSimpleDirect):
754 (JSC::GetByIdStatus::takesSlowPath):
755 (JSC::GetByIdStatus::makesCalls):
756 (JSC::GetByIdStatus::structureSet):
757 (JSC::GetByIdStatus::offset):
758 * bytecode/MethodCallLinkStatus.cpp: Added.
759 (JSC::MethodCallLinkStatus::computeFor):
760 * bytecode/MethodCallLinkStatus.h: Added.
761 (JSC::MethodCallLinkStatus::MethodCallLinkStatus):
762 (JSC::MethodCallLinkStatus::isSet):
763 (JSC::MethodCallLinkStatus::operator!):
764 (JSC::MethodCallLinkStatus::needsPrototypeCheck):
765 (JSC::MethodCallLinkStatus::structure):
766 (JSC::MethodCallLinkStatus::prototypeStructure):
767 (JSC::MethodCallLinkStatus::function):
768 (JSC::MethodCallLinkStatus::prototype):
769 * bytecode/PutByIdStatus.cpp: Added.
770 (JSC::PutByIdStatus::computeFor):
771 * bytecode/PutByIdStatus.h: Added.
772 (JSC::PutByIdStatus::PutByIdStatus):
773 (JSC::PutByIdStatus::state):
774 (JSC::PutByIdStatus::isSet):
775 (JSC::PutByIdStatus::operator!):
776 (JSC::PutByIdStatus::isSimpleReplace):
777 (JSC::PutByIdStatus::isSimpleTransition):
778 (JSC::PutByIdStatus::takesSlowPath):
779 (JSC::PutByIdStatus::oldStructure):
780 (JSC::PutByIdStatus::newStructure):
781 (JSC::PutByIdStatus::structureChain):
782 (JSC::PutByIdStatus::offset):
783 * bytecode/StructureSet.h: Added.
784 (JSC::StructureSet::StructureSet):
785 (JSC::StructureSet::clear):
786 (JSC::StructureSet::add):
787 (JSC::StructureSet::addAll):
788 (JSC::StructureSet::remove):
789 (JSC::StructureSet::contains):
790 (JSC::StructureSet::isSubsetOf):
791 (JSC::StructureSet::isSupersetOf):
792 (JSC::StructureSet::size):
793 (JSC::StructureSet::at):
794 (JSC::StructureSet::operator[]):
795 (JSC::StructureSet::last):
796 (JSC::StructureSet::predictionFromStructures):
797 (JSC::StructureSet::operator==):
798 (JSC::StructureSet::dump):
799 * dfg/DFGAbstractValue.h:
800 * dfg/DFGByteCodeParser.cpp:
801 (JSC::DFG::ByteCodeParser::handleCall):
802 (JSC::DFG::ByteCodeParser::parseBlock):
803 * dfg/DFGStructureSet.h: Removed.
805 2012-01-20 Filip Pizlo <fpizlo@apple.com>
807 JIT compilation should not require ExecState
808 https://bugs.webkit.org/show_bug.cgi?id=76729
809 <rdar://problem/10731545>
811 Reviewed by Gavin Barraclough.
813 Changed the relevant JIT driver functions to take JSGlobalData& instead of
814 ExecState*, since really they just needed the global data.
818 (JSC::DFG::tryCompile):
819 (JSC::DFG::tryCompileFunction):
821 (JSC::DFG::tryCompile):
822 (JSC::DFG::tryCompileFunction):
824 (JSC::jitCompileIfAppropriate):
825 (JSC::jitCompileFunctionIfAppropriate):
826 * runtime/Executable.cpp:
827 (JSC::EvalExecutable::compileInternal):
828 (JSC::ProgramExecutable::compileInternal):
829 (JSC::FunctionExecutable::compileForCallInternal):
830 (JSC::FunctionExecutable::compileForConstructInternal):
832 2012-01-20 David Levin <levin@chromium.org>
834 Make OwnPtr<HDC> work for the Chromium Windows port.
835 https://bugs.webkit.org/show_bug.cgi?id=76738
839 * JavaScriptCore.gyp/JavaScriptCore.gyp: Added OwnPtrWin.cpp to the
840 Chromium Windows build.
841 * wtf/OwnPtrCommon.h: Changed from platform WIN to OS WIN for
842 OwnPtr<HDC> and similar constructs.
844 2012-01-19 Geoffrey Garen <ggaren@apple.com>
846 Removed some regexp entry boilerplate code
847 https://bugs.webkit.org/show_bug.cgi?id=76687
849 Reviewed by Darin Adler.
851 1% - 2% speedup on regexp tests, no change overall.
853 * runtime/RegExp.cpp:
854 (JSC::RegExp::match):
855 - ASSERT that our startIndex is non-negative, because anything less
856 would be uncivilized.
858 - ASSERT that our input is not the null string for the same reason.
860 - No need to test for startOffset being past the end of the string,
861 since the regular expression engine will do this test for us.
863 - No need to initialize the output vector, since the regular expression
864 engine will fill it in for us.
866 * yarr/YarrInterpreter.cpp:
867 (JSC::Yarr::Interpreter::interpret):
869 (JSC::Yarr::YarrGenerator::compile):
871 RegExp used to do these jobs for us, but now we do them for ourselves
872 because it's a better separation of concerns, and the JIT can do them
873 more efficiently than C++ code:
875 - Test for "past the end" before doing any matching -- otherwise
876 a* will match with zero length past the end of the string, which is wrong.
878 - Initialize the output vector before doing any matching.
880 2012-01-20 Filip Pizlo <fpizlo@apple.com>
882 Build fix for no-DFG configuration.
883 Needed for <rdar://problem/10727689>.
885 * bytecompiler/BytecodeGenerator.cpp:
886 (JSC::BytecodeGenerator::emitProfiledOpcode):
888 (JSC::JIT::emitValueProfilingSite):
890 2012-01-19 Filip Pizlo <fpizlo@apple.com>
892 Bytecode instructions that may have value profiling should have a direct inline
893 link to the ValueProfile instance
894 https://bugs.webkit.org/show_bug.cgi?id=76682
895 <rdar://problem/10727689>
897 Reviewed by Sam Weinig.
899 Each opcode that gets value profiled now has a link to its ValueProfile. This
900 required rationalizing the emission of value profiles for opcode combos, like
901 op_method_check/op_get_by_id and op_call/op_call_put_result. It only makes
902 sense for one of them to have a value profile link, and it makes most sense
903 for it to be the one that actually sets the result. The previous behavior was
904 to have op_method_check profile for op_get_by_id when they were used together,
905 but otherwise for op_get_by_id to have its own profiles. op_call already did
906 the right thing; all profiling was done by op_call_put_result.
908 But rationalizing this code required breaking some of the natural boundaries
909 that the code had; for instance the code in DFG that emits a GetById in place
910 of both op_method_check and op_get_by_id must now know that it's the latter of
911 those that has the value profile, while the first of those constitutes the OSR
912 target. Hence each CodeOrigin must now have two bytecode indices - one for
913 OSR exit and one for profiling.
915 Finally this change required some refiddling of our optimization heuristics,
916 because now all code blocks have "more instructions" due to the value profile
919 * bytecode/CodeBlock.cpp:
920 (JSC::CodeBlock::printGetByIdOp):
921 (JSC::CodeBlock::dump):
922 * bytecode/CodeBlock.h:
923 (JSC::CodeBlock::valueProfileForBytecodeOffset):
924 * bytecode/CodeOrigin.h:
925 (JSC::CodeOrigin::CodeOrigin):
926 (JSC::CodeOrigin::bytecodeIndexForValueProfile):
927 * bytecode/Instruction.h:
928 (JSC::Instruction::Instruction):
930 * bytecompiler/BytecodeGenerator.cpp:
931 (JSC::BytecodeGenerator::emitProfiledOpcode):
932 (JSC::BytecodeGenerator::emitResolve):
933 (JSC::BytecodeGenerator::emitGetScopedVar):
934 (JSC::BytecodeGenerator::emitResolveBase):
935 (JSC::BytecodeGenerator::emitResolveBaseForPut):
936 (JSC::BytecodeGenerator::emitResolveWithBase):
937 (JSC::BytecodeGenerator::emitResolveWithThis):
938 (JSC::BytecodeGenerator::emitGetById):
939 (JSC::BytecodeGenerator::emitGetByVal):
940 (JSC::BytecodeGenerator::emitCall):
941 (JSC::BytecodeGenerator::emitCallVarargs):
942 (JSC::BytecodeGenerator::emitConstruct):
943 * bytecompiler/BytecodeGenerator.h:
944 * dfg/DFGByteCodeParser.cpp:
945 (JSC::DFG::ByteCodeParser::ByteCodeParser):
946 (JSC::DFG::ByteCodeParser::currentCodeOrigin):
947 (JSC::DFG::ByteCodeParser::addCall):
948 (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
949 (JSC::DFG::ByteCodeParser::getPrediction):
950 (JSC::DFG::ByteCodeParser::handleCall):
951 (JSC::DFG::ByteCodeParser::handleInlining):
952 (JSC::DFG::ByteCodeParser::parseBlock):
953 (JSC::DFG::ByteCodeParser::parse):
955 (JSC::DFG::Graph::valueProfileFor):
957 (JSC::JIT::emitValueProfilingSite):
959 (JSC::JIT::emit_op_call_put_result):
960 * jit/JITCall32_64.cpp:
961 (JSC::JIT::emit_op_call_put_result):
962 * jit/JITInlineMethods.h:
963 (JSC::JIT::emitValueProfilingSite):
964 * jit/JITOpcodes.cpp:
965 (JSC::JIT::emit_op_resolve):
966 (JSC::JIT::emit_op_resolve_base):
967 (JSC::JIT::emit_op_resolve_skip):
968 (JSC::JIT::emit_op_resolve_global):
969 (JSC::JIT::emitSlow_op_resolve_global):
970 (JSC::JIT::emit_op_resolve_with_base):
971 (JSC::JIT::emit_op_resolve_with_this):
972 (JSC::JIT::emitSlow_op_resolve_global_dynamic):
973 * jit/JITOpcodes32_64.cpp:
974 (JSC::JIT::emit_op_resolve):
975 (JSC::JIT::emit_op_resolve_base):
976 (JSC::JIT::emit_op_resolve_skip):
977 (JSC::JIT::emit_op_resolve_global):
978 (JSC::JIT::emitSlow_op_resolve_global):
979 (JSC::JIT::emit_op_resolve_with_base):
980 (JSC::JIT::emit_op_resolve_with_this):
981 * jit/JITPropertyAccess.cpp:
982 (JSC::JIT::emit_op_get_by_val):
983 (JSC::JIT::emitSlow_op_get_by_val):
984 (JSC::JIT::emit_op_method_check):
985 (JSC::JIT::emitSlow_op_method_check):
986 (JSC::JIT::emit_op_get_by_id):
987 (JSC::JIT::emitSlow_op_get_by_id):
988 (JSC::JIT::emit_op_get_scoped_var):
989 (JSC::JIT::emit_op_get_global_var):
990 * jit/JITPropertyAccess32_64.cpp:
991 (JSC::JIT::emit_op_method_check):
992 (JSC::JIT::emitSlow_op_method_check):
993 (JSC::JIT::emit_op_get_by_val):
994 (JSC::JIT::emitSlow_op_get_by_val):
995 (JSC::JIT::emit_op_get_by_id):
996 (JSC::JIT::emitSlow_op_get_by_id):
997 (JSC::JIT::emit_op_get_scoped_var):
998 (JSC::JIT::emit_op_get_global_var):
1000 (JSC::JITStubCall::callWithValueProfiling):
1001 * runtime/Options.cpp:
1002 (JSC::Options::initializeOptions):
1004 2012-01-20 ChangSeok Oh <shivamidow@gmail.com>
1006 undefined reference to symbol eina_module_free
1007 https://bugs.webkit.org/show_bug.cgi?id=76681
1009 Reviewed by Martin Robinson.
1011 eina_module_free has been used without including eina libraries after r104936.
1013 * wtf/PlatformEfl.cmake: Add EINA_LIBRARIES.
1015 2012-01-19 Tony Chang <tony@chromium.org>
1017 [chromium] Remove an obsolete comment about features.gypi
1018 https://bugs.webkit.org/show_bug.cgi?id=76643
1020 There can be only one features.gypi.
1022 Reviewed by James Robinson.
1024 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1026 2012-01-19 Geoffrey Garen <ggaren@apple.com>
1028 Implicit creation of a regular expression should eagerly check for syntax errors
1029 https://bugs.webkit.org/show_bug.cgi?id=76642
1031 Reviewed by Oliver Hunt.
1033 This is a correctness fix and a slight optimization.
1035 * runtime/StringPrototype.cpp:
1036 (JSC::stringProtoFuncMatch):
1037 (JSC::stringProtoFuncSearch): Check for syntax errors because that's the
1040 * runtime/RegExp.cpp:
1041 (JSC::RegExp::match): ASSERT that we aren't a syntax error. (One line
1042 of code change, many lines of indentation change.)
1044 Since we have no clients that try to match a RegExp that is a syntax error,
1045 let's optimize out the check.
1047 2012-01-19 Mark Hahnenberg <mhahnenberg@apple.com>
1049 Implement a new allocator for backing stores
1050 https://bugs.webkit.org/show_bug.cgi?id=75181
1052 Reviewed by Filip Pizlo.
1054 We want to move away from using fastMalloc for the backing stores for
1055 some of our objects (e.g. JSArray, JSObject, JSString, etc). These backing
1056 stores have a nice property in that they only have a single owner (i.e. a
1057 single pointer to them at any one time). One way that we can take advantage
1058 of this property is to implement a simple bump allocator/copying collector,
1059 which will run alongside our normal mark/sweep collector, that only needs to
1060 update the single owner pointer rather than having to redirect an arbitrary
1061 number of pointers in from-space to to-space.
1063 This plan can give us a number of benefits. We can beat fastMalloc in terms
1064 of both performance and memory usage, we can track how much memory we're using
1065 far more accurately than our rough estimation now through the use of
1066 reportExtraMemoryCost, and we can allocate arbitrary size objects (as opposed
1067 to being limited to size classes like we have been historically). This is also
1068 another step toward moving away from lazy destruction, which will improve our memory footprint.
1070 We start by creating said allocator and moving the ArrayStorage for JSArray
1071 to use it rather than fastMalloc.
1073 The design of the collector is as follows:
1075 -The collector allocates 64KB chunks from the OS to use for object allocation.
1076 -Each chunk contains an offset, a flag indicating if the block has been pinned,
1077 and a payload, along with next and prev pointers so that they can be put in DoublyLinkedLists.
1078 -Any allocation greater than 64KB gets its own separate oversize block, which
1079 is managed separately from the rest.
1080 -If the allocator receives a request for more than the remaining amount in the
1081 current block, it grabs a fresh block.
1082 -Grabbing a fresh block means grabbing one off of the global free list (which is now
1083 shared between the mark/sweep allocator and the bump allocator) if there is one.
1084 If there isn't a new one we do one of two things: allocate a new block from the OS
1085 if we're not ready for a GC yet, or run a GC and then try again. If we still don't
1086 have enough space after the GC, we allocate a new block from the OS.
1089 -At the start of garbage collection during conservative stack scanning, if we encounter
1090 what appears to be a pointer to a bump-allocated block of memory, we pin that block so
1091 that it will not be copied for this round of collection.
1092 -We also pin any oversize blocks that we encounter, which effectively doubles as a
1093 "mark bit" for that block. Any oversize blocks that aren't pinned at the end of copying
1094 are given back to the OS.
1095 -Marking threads are now also responsible for copying bump-allocated objects to newSpace
1096 -Each marking thread has a private 64KB block into which it copies bump-allocated objects that it encounters.
1097 -When that block fills up, the marking thread gives it back to the allocator and requests a new one.
1098 -When all marking has concluded, each thread gives back its copy block, even if it isn't full.
1099 -At the conclusion of copying (which is done by the end of the marking phase), we un-pin
1100 any pinned blocks and give any blocks left in from-space to the global free list.
1103 * GNUmakefile.list.am:
1104 * JavaScriptCore.gypi:
1105 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1106 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1107 * JavaScriptCore.xcodeproj/project.pbxproj:
1109 * heap/AllocationSpace.cpp:
1110 (JSC::AllocationSpace::allocateSlowCase):
1111 (JSC::AllocationSpace::allocateBlock):
1112 (JSC::AllocationSpace::freeBlocks):
1113 * heap/AllocationSpace.h:
1114 (JSC::AllocationSpace::waterMark):
1115 * heap/BumpBlock.h: Added.
1116 (JSC::BumpBlock::BumpBlock):
1117 * heap/BumpSpace.cpp: Added.
1118 (JSC::BumpSpace::tryAllocateSlowCase):
1119 * heap/BumpSpace.h: Added.
1120 (JSC::BumpSpace::isInCopyPhase):
1121 (JSC::BumpSpace::totalMemoryAllocated):
1122 (JSC::BumpSpace::totalMemoryUtilized):
1123 * heap/BumpSpaceInlineMethods.h: Added.
1124 (JSC::BumpSpace::BumpSpace):
1125 (JSC::BumpSpace::init):
1126 (JSC::BumpSpace::contains):
1127 (JSC::BumpSpace::pin):
1128 (JSC::BumpSpace::startedCopying):
1129 (JSC::BumpSpace::doneCopying):
1130 (JSC::BumpSpace::doneFillingBlock):
1131 (JSC::BumpSpace::recycleBlock):
1132 (JSC::BumpSpace::getFreshBlock):
1133 (JSC::BumpSpace::borrowBlock):
1134 (JSC::BumpSpace::addNewBlock):
1135 (JSC::BumpSpace::allocateNewBlock):
1136 (JSC::BumpSpace::fitsInBlock):
1137 (JSC::BumpSpace::fitsInCurrentBlock):
1138 (JSC::BumpSpace::tryAllocate):
1139 (JSC::BumpSpace::tryAllocateOversize):
1140 (JSC::BumpSpace::allocateFromBlock):
1141 (JSC::BumpSpace::tryReallocate):
1142 (JSC::BumpSpace::tryReallocateOversize):
1143 (JSC::BumpSpace::isOversize):
1144 (JSC::BumpSpace::isPinned):
1145 (JSC::BumpSpace::oversizeBlockFor):
1146 (JSC::BumpSpace::blockFor):
1147 * heap/ConservativeRoots.cpp:
1148 (JSC::ConservativeRoots::ConservativeRoots):
1149 (JSC::ConservativeRoots::genericAddPointer):
1150 (JSC::ConservativeRoots::add):
1151 * heap/ConservativeRoots.h:
1154 (JSC::Heap::blockFreeingThreadMain):
1155 (JSC::Heap::reportExtraMemoryCostSlowCase):
1156 (JSC::Heap::getConservativeRegisterRoots):
1157 (JSC::Heap::markRoots):
1158 (JSC::Heap::collect):
1159 (JSC::Heap::releaseFreeBlocks):
1161 (JSC::Heap::waterMark):
1162 (JSC::Heap::highWaterMark):
1163 (JSC::Heap::setHighWaterMark):
1164 (JSC::Heap::tryAllocateStorage):
1165 (JSC::Heap::tryReallocateStorage):
1166 * heap/HeapBlock.h: Added.
1167 (JSC::HeapBlock::HeapBlock):
1168 * heap/MarkStack.cpp:
1169 (JSC::MarkStackThreadSharedData::MarkStackThreadSharedData):
1170 (JSC::SlotVisitor::drain):
1171 (JSC::SlotVisitor::drainFromShared):
1172 (JSC::SlotVisitor::startCopying):
1173 (JSC::SlotVisitor::allocateNewSpace):
1174 (JSC::SlotVisitor::copy):
1175 (JSC::SlotVisitor::copyAndAppend):
1176 (JSC::SlotVisitor::doneCopying):
1178 * heap/MarkedBlock.cpp:
1179 (JSC::MarkedBlock::recycle):
1180 (JSC::MarkedBlock::MarkedBlock):
1181 * heap/MarkedBlock.h:
1182 * heap/MarkedSpace.cpp:
1183 (JSC::MarkedSpace::MarkedSpace):
1184 * heap/MarkedSpace.h:
1185 (JSC::MarkedSpace::allocate):
1186 (JSC::MarkedSpace::forEachBlock):
1187 (JSC::MarkedSpace::SizeClass::resetAllocator):
1188 * heap/SlotVisitor.h:
1189 (JSC::SlotVisitor::SlotVisitor):
1190 * heap/TinyBloomFilter.h:
1191 (JSC::TinyBloomFilter::reset):
1192 * runtime/JSArray.cpp:
1193 (JSC::JSArray::JSArray):
1194 (JSC::JSArray::finishCreation):
1195 (JSC::JSArray::tryFinishCreationUninitialized):
1196 (JSC::JSArray::~JSArray):
1197 (JSC::JSArray::enterSparseMode):
1198 (JSC::JSArray::defineOwnNumericProperty):
1199 (JSC::JSArray::setLengthWritable):
1200 (JSC::JSArray::getOwnPropertySlotByIndex):
1201 (JSC::JSArray::getOwnPropertyDescriptor):
1202 (JSC::JSArray::putByIndexBeyondVectorLength):
1203 (JSC::JSArray::deletePropertyByIndex):
1204 (JSC::JSArray::getOwnPropertyNames):
1205 (JSC::JSArray::increaseVectorLength):
1206 (JSC::JSArray::unshiftCountSlowCase):
1207 (JSC::JSArray::setLength):
1208 (JSC::JSArray::pop):
1209 (JSC::JSArray::unshiftCount):
1210 (JSC::JSArray::visitChildren):
1211 (JSC::JSArray::sortNumeric):
1212 (JSC::JSArray::sort):
1213 (JSC::JSArray::compactForSorting):
1214 (JSC::JSArray::subclassData):
1215 (JSC::JSArray::setSubclassData):
1216 (JSC::JSArray::checkConsistency):
1217 * runtime/JSArray.h:
1218 (JSC::JSArray::inSparseMode):
1219 (JSC::JSArray::isLengthWritable):
1220 * wtf/CheckedBoolean.h: Added.
1221 (CheckedBoolean::CheckedBoolean):
1222 (CheckedBoolean::~CheckedBoolean):
1223 (CheckedBoolean::operator bool):
1224 * wtf/DoublyLinkedList.h:
1226 * wtf/StdLibExtras.h:
1227 (WTF::isPointerAligned):
1229 2012-01-19 Joi Sigurdsson <joi@chromium.org>
1231 Enable use of precompiled headers in Chromium port on Windows.
1233 Bug 76381 - Use precompiled headers in Chromium port on Windows
1234 https://bugs.webkit.org/show_bug.cgi?id=76381
1236 Reviewed by Tony Chang.
1238 * JavaScriptCore.gyp/JavaScriptCore.gyp: Include WinPrecompile.gypi.
1240 2012-01-18 Roland Takacs <takacs.roland@stud.u-szeged.hu>
1242 Cross-platform processor core counter fix
1243 https://bugs.webkit.org/show_bug.cgi?id=76540
1245 Reviewed by Zoltan Herczeg.
1247 I attached "OS(FREEBSD)" to "#if OS(DARWIN) || OS(OPENBSD) || OS(NETBSD)"
1248 and I removed the OS checking macros from ParallelJobsGeneric.cpp because
1249 the NumberOfCores.cpp contains them for counting CPU cores.
1250 The processor core counter patch located at
1251 https://bugs.webkit.org/show_bug.cgi?id=76530
1253 * wtf/NumberOfCores.cpp:
1254 * wtf/ParallelJobsGeneric.cpp:
1256 2012-01-18 Csaba Osztrogonác <ossy@webkit.org>
1258 Cross-platform processor core counter
1259 https://bugs.webkit.org/show_bug.cgi?id=76530
1261 Unreviewed cross-MinGW buildfix after r105270.
1263 * wtf/NumberOfCores.cpp: Use windows.h instead of Windows.h.
1265 2012-01-18 Roland Takacs <takacs.roland@stud.u-szeged.hu>
1267 Cross-platform processor core counter
1268 https://bugs.webkit.org/show_bug.cgi?id=76530
1270 Reviewed by Zoltan Herczeg.
1272 Two files have been created that include the processor core counter function.
1273 It used to be in ParallelJobsGeneric.h/cpp before.
1275 * GNUmakefile.list.am:
1276 * JavaScriptCore.gypi:
1277 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1278 * JavaScriptCore.xcodeproj/project.pbxproj:
1279 * runtime/Options.cpp:
1280 (JSC::Options::initializeOptions):
1281 * wtf/CMakeLists.txt:
1282 * wtf/NumberOfCores.cpp: Added.
1283 (WTF::numberOfProcessorCores):
1284 * wtf/NumberOfCores.h: Added.
1285 * wtf/ParallelJobsGeneric.cpp:
1286 (WTF::ParallelEnvironment::ParallelEnvironment):
1287 * wtf/ParallelJobsGeneric.h:
1289 2012-01-18 Balazs Kelemen <kbalazs@webkit.org>
1291 [Qt] Consolidate layout test crash logging
1292 https://bugs.webkit.org/show_bug.cgi?id=75088
1294 Reviewed by Simon Hausmann.
1296 Move backtrace generating logic into WTFReportBacktrace
1297 and add a way to deinstall signal handlers if we know
1298 that we have already printed the backtrace.
1300 * JavaScriptCore.exp:
1301 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1302 * wtf/Assertions.cpp:
1303 (WTFLogLocker::WTFReportBacktrace):
1304 (WTFLogLocker::WTFSetCrashHook):
1305 (WTFLogLocker::WTFInvokeCrashHook):
1308 2012-01-17 Geoffrey Garen <ggaren@apple.com>
1310 Factored out some code into a helper function.
1312 I think this might help getting rid of omit-frame-pointer.
1314 Reviewed by Sam Weinig.
1316 No benchmark change.
1318 * runtime/StringPrototype.cpp:
1319 (JSC::removeUsingRegExpSearch): Moved to here...
1320 (JSC::replaceUsingRegExpSearch): ...from here.
1322 2012-01-17 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
1324 Uint8ClampedArray support
1325 https://bugs.webkit.org/show_bug.cgi?id=74455
1327 Reviewed by Filip Pizlo.
1329 * GNUmakefile.list.am:
1330 * JavaScriptCore.xcodeproj/project.pbxproj:
1331 * bytecode/PredictedType.cpp:
1332 (JSC::predictionToString):
1333 (JSC::predictionFromClassInfo):
1334 * bytecode/PredictedType.h:
1335 (JSC::isUint8ClampedArrayPrediction):
1336 (JSC::isActionableMutableArrayPrediction):
1337 * dfg/DFGAbstractState.cpp:
1338 (JSC::DFG::AbstractState::initialize):
1339 (JSC::DFG::AbstractState::execute):
1341 (JSC::DFG::Node::shouldSpeculateUint8ClampedArray):
1342 * dfg/DFGPropagator.cpp:
1343 (JSC::DFG::Propagator::propagateNodePredictions):
1344 (JSC::DFG::Propagator::fixupNode):
1345 (JSC::DFG::Propagator::performNodeCSE):
1346 * dfg/DFGSpeculativeJIT.cpp:
1347 (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
1348 (JSC::DFG::clampDoubleToByte):
1349 (JSC::DFG::compileClampIntegerToByte):
1350 (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
1351 (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
1352 (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
1353 * dfg/DFGSpeculativeJIT.h:
1354 * dfg/DFGSpeculativeJIT32_64.cpp:
1355 (JSC::DFG::SpeculativeJIT::compile):
1356 * dfg/DFGSpeculativeJIT64.cpp:
1357 (JSC::DFG::SpeculativeJIT::compile):
1359 * runtime/JSGlobalData.h:
1362 * wtf/Uint8ClampedArray.h: Added.
1363 (WTF::Uint8ClampedArray::set):
1364 (WTF::Uint8ClampedArray::create):
1365 (WTF::Uint8ClampedArray::Uint8ClampedArray):
1366 (WTF::Uint8ClampedArray::subarray):
1368 2012-01-17 Sam Weinig <sam@webkit.org>
1370 Add helper macro for forward declaring objective-c classes
1371 https://bugs.webkit.org/show_bug.cgi?id=76485
1373 Reviewed by Anders Carlsson.
1376 Add OBJC_CLASS macro which helps reduce code when forward declaring an
1377 objective-c class in a header which can be included from both Objective-C
1378 and non-Objective-C files.
1380 2012-01-17 Filip Pizlo <fpizlo@apple.com>
1382 DFG should be able to do JS and custom getter caching
1383 https://bugs.webkit.org/show_bug.cgi?id=76361
1385 Reviewed by Csaba Osztrogonác.
1389 * dfg/DFGRepatch.cpp:
1390 (JSC::DFG::tryBuildGetByIDList):
1391 * dfg/DFGSpeculativeJIT32_64.cpp:
1392 (JSC::DFG::SpeculativeJIT::compile):
1394 2012-01-15 Filip Pizlo <fpizlo@apple.com>
1396 DFG should be able to do JS and custom getter caching
1397 https://bugs.webkit.org/show_bug.cgi?id=76361
1398 <rdar://problem/10698060>
1400 Reviewed by Geoff Garen.
1402 Added the ability to cache JS getter calls and custom getter calls in the DFG.
1403 Most of this is pretty mundane, since the old JIT supported this functionality
1404 as well. But a couple interesting things had to happen:
1406 - There are now two variants of GetById: GetById, which works as before, and
1407 GetByIdFlush, which flushes registers prior to doing the GetById. Only
1408 GetByIdFlush can be used for caching getters. We detect which GetById style
1409 to use by looking at the inline caches of the old JIT.
1411 - Exception handling for getter calls planted in stubs uses a separate lookup
1412 handler routine, which uses the CodeOrigin stored in the StructureStubInfo.
1414 This is a 40% speed-up in the Dromaeo DOM Traversal average. It removes all of
1415 the DFG regressions we saw in Dromaeo. This is neutral on SunSpider, V8, and
1418 * bytecode/StructureStubInfo.h:
1419 * dfg/DFGAbstractState.cpp:
1420 (JSC::DFG::AbstractState::execute):
1421 * dfg/DFGAssemblyHelpers.h:
1422 (JSC::DFG::AssemblyHelpers::emitExceptionCheck):
1423 * dfg/DFGByteCodeParser.cpp:
1424 (JSC::DFG::ByteCodeParser::willNeedFlush):
1425 (JSC::DFG::ByteCodeParser::parseBlock):
1426 * dfg/DFGCCallHelpers.h:
1427 (JSC::DFG::CCallHelpers::setupResults):
1428 * dfg/DFGJITCompiler.cpp:
1429 (JSC::DFG::JITCompiler::link):
1430 * dfg/DFGJITCompiler.h:
1431 (JSC::DFG::PropertyAccessRecord::PropertyAccessRecord):
1432 (JSC::DFG::JITCompiler::addExceptionCheck):
1434 (JSC::DFG::Node::hasIdentifier):
1435 (JSC::DFG::Node::hasHeapPrediction):
1436 * dfg/DFGOperations.cpp:
1437 * dfg/DFGOperations.h:
1438 * dfg/DFGPropagator.cpp:
1439 (JSC::DFG::Propagator::propagateNodePredictions):
1440 * dfg/DFGRepatch.cpp:
1441 (JSC::DFG::tryCacheGetByID):
1442 (JSC::DFG::tryBuildGetByIDList):
1443 * dfg/DFGSpeculativeJIT.h:
1444 (JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheckSetResult):
1445 * dfg/DFGSpeculativeJIT32_64.cpp:
1446 (JSC::DFG::SpeculativeJIT::cachedGetById):
1447 (JSC::DFG::SpeculativeJIT::compile):
1448 * dfg/DFGSpeculativeJIT64.cpp:
1449 (JSC::DFG::SpeculativeJIT::cachedGetById):
1450 (JSC::DFG::SpeculativeJIT::compile):
1452 2012-01-16 Jon Lee <jonlee@apple.com>
1454 Build fix for r105086.
1456 * Configurations/FeatureDefines.xcconfig:
1459 2012-01-16 Jon Lee <jonlee@apple.com>
1461 Remove HTML notifications support on Mac
1462 https://bugs.webkit.org/show_bug.cgi?id=76401
1463 <rdar://problem/10589881>
1465 Reviewed by Sam Weinig.
1467 * wtf/Platform.h: Define ENABLE_HTML_NOTIFICATIONS macro.
1469 2012-01-16 Zeno Albisser <zeno@webkit.org>
1471 [Qt] Fix QT_VERSION related warnings when building on Mac OS X
1472 https://bugs.webkit.org/show_bug.cgi?id=76340
1474 This bug was caused by r104826.
1475 As already mentioned for https://bugs.webkit.org/show_bug.cgi?id=57239
1476 we should not use "using namespace WebCore" in header files,
1477 because it might cause ambiguous references.
1478 This patch reverts the changes from r104826 and r104981
1479 and removes the "using namespace WebCore" statement from
1482 Reviewed by Tor Arne Vestbø.
1486 2012-01-16 Carlos Garcia Campos <cgarcia@igalia.com>
1488 Unreviewed. Fix make distcheck.
1490 * GNUmakefile.list.am: Fix typo.
1492 2012-01-16 Pavel Heimlich <tropikhajma@gmail.com>
1494 Solaris Studio supports alignment macros too
1495 https://bugs.webkit.org/show_bug.cgi?id=75453
1497 Reviewed by Hajime Morita.
1501 2012-01-16 Yuqiang Xian <yuqiang.xian@intel.com>
1503 Build fix on 32bit if verbose debug is enabled in DFG
1504 https://bugs.webkit.org/show_bug.cgi?id=76351
1506 Reviewed by Hajime Morita.
1508 Mostly change "%lu" to "%zu" to print a "size_t" variable.
1510 * dfg/DFGAbstractState.cpp:
1511 (JSC::DFG::AbstractState::endBasicBlock):
1512 * dfg/DFGByteCodeParser.cpp:
1513 (JSC::DFG::ByteCodeParser::handleCall):
1514 (JSC::DFG::ByteCodeParser::handleInlining):
1515 (JSC::DFG::ByteCodeParser::parseBlock):
1516 (JSC::DFG::ByteCodeParser::parseCodeBlock):
1518 (JSC::DFG::Graph::predictArgumentTypes):
1519 * dfg/DFGJITCompiler.cpp:
1520 (JSC::DFG::JITCompiler::link):
1521 * dfg/DFGOSREntry.cpp:
1522 (JSC::DFG::prepareOSREntry):
1524 2012-01-15 Filip Pizlo <fpizlo@apple.com>
1526 The C calling convention logic in DFG::SpeculativeJIT should be available even
1527 when not generating code for the DFG speculative path
1528 https://bugs.webkit.org/show_bug.cgi?id=76355
1530 Reviewed by Dan Bernstein.
1532 Moved all of the logic for placing C call arguments into the right place (stack
1533 or registers) into a new class, DFG::CCallHelpers. This class inherits from
1534 AssemblyHelpers, another DFG grab-bag of helper functions. I could have moved
1535 this code into AssemblyHelpers, but decided against it, because I wanted to
1536 limit the number of methods each class in the JIT has. Hence now we have a
1537 slightly odd organization of JIT classes in DFG: MacroAssembler (basic instruction
1538 emission) <= AssemblyHelpers (some additional JS smarts) <= CCallHelpers
1539 (understands calls to C functions) <= JITCompiler (can compile a graph to machine
1540 code). Each of these except for JITCompiler can be reused for stub compilation.
1542 * GNUmakefile.list.am:
1543 * JavaScriptCore.xcodeproj/project.pbxproj:
1544 * dfg/DFGCCallHelpers.h: Added.
1545 (JSC::DFG::CCallHelpers::CCallHelpers):
1546 (JSC::DFG::CCallHelpers::resetCallArguments):
1547 (JSC::DFG::CCallHelpers::addCallArgument):
1548 (JSC::DFG::CCallHelpers::setupArguments):
1549 (JSC::DFG::CCallHelpers::setupArgumentsExecState):
1550 (JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
1551 (JSC::DFG::CCallHelpers::setupTwoStubArgs):
1552 (JSC::DFG::CCallHelpers::setupStubArguments):
1553 * dfg/DFGJITCompiler.h:
1554 (JSC::DFG::JITCompiler::JITCompiler):
1555 * dfg/DFGSpeculativeJIT.h:
1556 (JSC::DFG::SpeculativeJIT::callOperation):
1558 2012-01-15 Pablo Flouret <pablof@motorola.com>
1560 Fix compilation errors on build-webkit --debug --no-video on mac.
1561 https://bugs.webkit.org/show_bug.cgi?id=75867
1563 Reviewed by Philippe Normand.
1565 Make ENABLE_VIDEO_TRACK conditional on ENABLE_VIDEO, video track feature
1566 doesn't build without video.
1570 2012-01-14 David Levin <levin@chromium.org>
1572 HWndDC should be in platform/win instead of wtf.
1573 https://bugs.webkit.org/show_bug.cgi?id=76314
1575 Reviewed by Sam Weinig.
1577 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1578 * JavaScriptCore.gypi:
1580 2012-01-13 David Levin <levin@chromium.org>
1582 check-webkit-style: should encourage the use of Own* classes for Windows DC.
1583 https://bugs.webkit.org/show_bug.cgi?id=76227
1585 Reviewed by Dirk Pranke.
1587 * wtf/win/HWndDCWin.h:
1588 (WTF::HwndDC::HwndDC): Add a way to do GetDCEx.
1589 There are no users, but I want to catch this in check-webkit-style
1590 and tell any users to use HwndDC to avoid leaks.
1592 2012-01-13 David Levin <levin@chromium.org>
1594 Header file is missing header guard.
1596 Reviewed by Dirk Pranke.
1598 * wtf/win/HWndDCWin.h: Added the guards.
1600 2012-01-13 Andy Wingo <wingo@igalia.com>
1602 Eval in strict mode does not need dynamic checks
1603 https://bugs.webkit.org/show_bug.cgi?id=76286
1605 Reviewed by Oliver Hunt.
1607 * runtime/JSActivation.cpp (JSC::JSActivation::JSActivation):
1608 Eval in strict mode cannot introduce variables, so it not impose
1609 the need for dynamic checks.
1611 2012-01-13 David Levin <levin@chromium.org>
1613 HWndDC is a better name than HwndDC.
1614 https://bugs.webkit.org/show_bug.cgi?id=76281
1616 Reviewed by Darin Adler.
1618 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1619 * JavaScriptCore.gypi:
1620 * wtf/win/HWndDCWin.h: Renamed from Source/JavaScriptCore/wtf/win/HwndDCWin.h.
1621 (WTF::HWndDC::HWndDC):
1622 (WTF::HWndDC::~HWndDC):
1623 (WTF::HWndDC::operator HDC):
1625 2012-01-13 YoungTaeck Song <youngtaeck.song@samsung.com>
1627 [EFL] Add OwnPtr specialization for Eina_Module.
1628 https://bugs.webkit.org/show_bug.cgi?id=76255
1630 Reviewed by Andreas Kling.
1632 Add an overload for deleteOwnedPtr(Eina_Module*) on EFL port.
1634 * wtf/OwnPtrCommon.h:
1635 * wtf/efl/OwnPtrEfl.cpp:
1636 (WTF::deleteOwnedPtr):
1638 2012-01-13 Yuqiang Xian <yuqiang.xian@intel.com>
1640 Unreviewed build fix after r104787 if JIT_VERBOSE_OSR is defined
1643 (JSC::DEFINE_STUB_FUNCTION):
1645 2012-01-12 Hajime Morrita <morrita@chromium.org>
1647 JavaScriptCore: Mark all exported symbols in the header file automatically.
1648 https://bugs.webkit.org/show_bug.cgi?id=72855
1650 Reviewed by Darin Adler.
1652 Added WTF_EXPORT_PRIVATE and JS_EXPORT_PRIVATE based on JavaScriptCore.exp files.
1653 The change is generated by a tool calledListExportables (https://github.com/omo/ListExportables)
1655 * API/OpaqueJSString.h:
1656 * bytecode/CodeBlock.h:
1657 * bytecode/SamplingTool.h:
1658 * debugger/Debugger.h:
1659 * debugger/DebuggerActivation.h:
1660 * debugger/DebuggerCallFrame.h:
1661 * heap/AllocationSpace.h:
1662 * heap/HandleHeap.h:
1664 * heap/MachineStackMarker.h:
1666 * heap/VTableSpectrum.h:
1667 * heap/WriteBarrierSupport.h:
1669 * parser/ParserArena.h:
1670 * profiler/Profile.h:
1671 * runtime/ArgList.h:
1672 * runtime/CallData.h:
1673 * runtime/Completion.h:
1674 * runtime/ConstructData.h:
1675 * runtime/DateInstance.h:
1677 * runtime/ExceptionHelpers.h:
1678 * runtime/FunctionConstructor.h:
1679 * runtime/Identifier.h:
1680 * runtime/InitializeThreading.h:
1681 * runtime/InternalFunction.h:
1682 * runtime/JSArray.h:
1683 * runtime/JSByteArray.h:
1685 * runtime/JSFunction.h:
1686 * runtime/JSGlobalData.cpp:
1687 * runtime/JSGlobalData.h:
1688 * runtime/JSGlobalObject.h:
1689 * runtime/JSGlobalThis.h:
1691 * runtime/JSObject.h:
1692 * runtime/JSString.h:
1693 * runtime/JSValue.h:
1694 * runtime/JSVariableObject.h:
1696 * runtime/MemoryStatistics.h:
1697 * runtime/ObjectPrototype.h:
1698 * runtime/Options.h:
1699 * runtime/PropertyDescriptor.h:
1700 * runtime/PropertyNameArray.h:
1701 * runtime/PropertySlot.h:
1703 * runtime/RegExpObject.h:
1704 * runtime/SamplingCounter.h:
1705 * runtime/SmallStrings.h:
1706 * runtime/StringObject.h:
1707 * runtime/Structure.h:
1708 * runtime/TimeoutChecker.h:
1709 * runtime/UString.h:
1710 * runtime/WriteBarrier.h:
1711 * wtf/ArrayBufferView.h:
1713 * wtf/CryptographicallyRandomNumber.h:
1714 * wtf/CurrentTime.h:
1716 * wtf/DecimalNumber.h:
1717 * wtf/FastMalloc.cpp:
1721 * wtf/MetaAllocator.h:
1722 * wtf/MetaAllocatorHandle.h:
1723 * wtf/OSAllocator.h:
1725 * wtf/RandomNumber.h:
1726 * wtf/RefCountedLeakCounter.h:
1728 * wtf/Threading.cpp:
1730 * wtf/ThreadingPrimitives.h:
1731 * wtf/WTFThreadData.h:
1733 * wtf/text/AtomicString.h:
1734 * wtf/text/CString.h:
1735 * wtf/text/StringBuilder.h:
1736 * wtf/text/StringImpl.h:
1737 * wtf/text/WTFString.h:
1738 * wtf/unicode/Collator.h:
1739 * wtf/unicode/UTF8.h:
1741 * yarr/YarrPattern.h:
1743 2012-01-12 MORITA Hajime <morrita@google.com>
1745 [Chromium] JSExportMacros.h should be visible.
1746 https://bugs.webkit.org/show_bug.cgi?id=76147
1748 Reviewed by Tony Chang.
1752 2012-01-12 David Levin <levin@chromium.org>
1754 HwndDC is a better name than OwnGetDC.
1755 https://bugs.webkit.org/show_bug.cgi?id=76235
1757 Reviewed by Dmitry Titov.
1759 This is a better name for two reasons:
1760 1. "Own" implies "delete". In this case, the final call is a release (ReleaseDC).
1761 2. "Ref" would be a better name due to the release but the RefPtr (and OwnPtr)
1762 classes always take something to hold on to. In this case, the object (the DC)
1763 is created by the class once it is given a Window to ensure that the HDC
1764 was actually created using GetDC.
1766 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1767 * JavaScriptCore.gypi:
1768 * wtf/win/HwndDCWin.h: Renamed from Source/JavaScriptCore/wtf/win/OwnGetDCWin.h.
1769 (WTF::HwndDC::HwndDC):
1770 (WTF::HwndDC::~HwndDC):
1771 (WTF::HwndDC::operator HDC):
1773 2012-01-12 Gavin Barraclough <barraclough@apple.com>
1775 Clean up putDirect (part 2)
1776 https://bugs.webkit.org/show_bug.cgi?id=76232
1778 Reviewed by Sam Weinig.
1780 Rename putWithAttributes to putDirectVirtual, to identify that this
1781 has the same unchecked-DefineOwnProperty behaviour, change putDirectInternal
1782 to be templated on an enum indicating which behaviour it is supposed to be
1783 implementing, and change clients that are defining properties to call
1784 putDirectInternal correctly.
1786 * API/JSObjectRef.cpp:
1787 (JSObjectSetProperty):
1788 * JavaScriptCore.exp:
1789 * debugger/DebuggerActivation.cpp:
1790 (JSC::DebuggerActivation::putDirectVirtual):
1791 * debugger/DebuggerActivation.h:
1792 * interpreter/Interpreter.cpp:
1793 (JSC::Interpreter::execute):
1794 * runtime/ClassInfo.h:
1795 * runtime/Error.cpp:
1796 (JSC::addErrorInfo):
1797 * runtime/JSActivation.cpp:
1798 (JSC::JSActivation::putDirectVirtual):
1799 * runtime/JSActivation.h:
1800 * runtime/JSCell.cpp:
1801 (JSC::JSCell::putDirectVirtual):
1803 * runtime/JSGlobalObject.cpp:
1804 (JSC::JSGlobalObject::putDirectVirtual):
1805 * runtime/JSGlobalObject.h:
1806 * runtime/JSObject.cpp:
1807 (JSC::JSObject::put):
1808 (JSC::JSObject::putDirectVirtual):
1809 (JSC::JSObject::defineGetter):
1810 (JSC::JSObject::initializeGetterSetterProperty):
1811 (JSC::JSObject::defineSetter):
1812 (JSC::putDescriptor):
1813 * runtime/JSObject.h:
1814 (JSC::JSObject::putDirectInternal):
1815 (JSC::JSObject::putOwnDataProperty):
1816 (JSC::JSObject::putDirect):
1817 * runtime/JSStaticScopeObject.cpp:
1818 (JSC::JSStaticScopeObject::putDirectVirtual):
1819 * runtime/JSStaticScopeObject.h:
1820 * runtime/JSVariableObject.cpp:
1821 (JSC::JSVariableObject::putDirectVirtual):
1822 * runtime/JSVariableObject.h:
1824 2012-01-12 Gavin Barraclough <barraclough@apple.com>
1826 Clean up putDirect (part 1)
1827 https://bugs.webkit.org/show_bug.cgi?id=76232
1829 Reviewed by Sam Weinig.
1831 putDirect has ambiguous semantics, clean these up a bit.
1833 putDirect generally behaves a bit like a fast defineOwnProperty, but one that
1834 always creates the property, with no checking to validate the put it permitted.
1836 It also encompasses two slightly different behaviors.
1837 (1) a fast form of put for JSActivation, which doesn't have to handle searching
1838 the prototype chain, getter/setter properties, or the magic __proto__ value.
1839 Break this out as a new method, 'putOwnDataProperty'.
1840 (2) the version of putDirect on JSValue will also check for overwriting ReadOnly
1841 values, in strict mode. This is, however, not so smart on a few level, since
1842 it is only called from op_put_by_id with direct set, which is only used with
1843 an object as the base, and is only used to put new properties onto objects.
1845 * dfg/DFGOperations.cpp:
1846 * interpreter/Interpreter.cpp:
1847 (JSC::Interpreter::privateExecute):
1849 (JSC::DEFINE_STUB_FUNCTION):
1850 * runtime/JSActivation.cpp:
1851 (JSC::JSActivation::put):
1852 * runtime/JSFunction.cpp:
1853 (JSC::JSFunction::getOwnPropertySlot):
1854 * runtime/JSObject.h:
1855 (JSC::JSObject::putOwnDataProperty):
1856 * runtime/JSValue.h:
1858 2012-01-12 Gavin Barraclough <barraclough@apple.com>
1860 https://bugs.webkit.org/show_bug.cgi?id=76141
1861 defineSetter/defineGetter may fail to update Accessor attribute
1863 Reviewed by Oliver Hunt.
1865 * runtime/JSObject.cpp:
1866 (JSC::JSObject::defineGetter):
1867 (JSC::JSObject::initializeGetterSetterProperty):
1868 (JSC::JSObject::defineSetter):
1869 * runtime/Structure.cpp:
1870 (JSC::Structure::attributeChangeTransition):
1871 * runtime/Structure.h:
1873 2012-01-12 David Levin <levin@chromium.org>
1875 [chromium] Fix DC leak in WebScreenInfoFactory.
1876 https://bugs.webkit.org/show_bug.cgi?id=76203
1878 Reviewed by Dmitry Titov.
1880 * JavaScriptCore.gyp/JavaScriptCore.gyp: Added OwnGetDCWin.h
1881 * JavaScriptCore.gypi: Added OwnGetDCWin.h
1882 * JavaScriptCore/wtf/win/OwnGetDCWin.h: Made an owner class for GetDC which needs ReleaseDC as opposed to DeleteDC.
1884 2012-01-11 Gavin Barraclough <barraclough@apple.com>
1886 Allow accessor get/set property to be set to undefined
1887 https://bugs.webkit.org/show_bug.cgi?id=76148
1889 Reviewed by Oliver Hunt.
1891 AccessorDescriptor properties may have their get & set properties defined to reference a function
1892 (Callable object) or be set to undefined. Valid PropertyDescriptors created by toPropertyDescriptor
1893 (defined from JS code via Object.defineProperty, etc) have get and set properties that are in one of
1894 three states (1) nonexistent, (2) set to undefined, or (3) a function (any Callable object).
1896 On the PropertyDescriptor object these three states are represneted by JSValue(), jsUndefined(), and
1897 any JSObject* (with a constraint that this must be callable).
1899 Logically the get/set property of an accessor descriptor on an object might be in any of the three
1900 states above, but in practice there is no way to distinguish between the first two states. As such
1901 we stor the get/set values in property storage in a JSObject* field, with 0 indicating absent or
1902 undefined. When unboxing to a PropertyDescriptor, map this back to a JS undefined value.
1904 * runtime/GetterSetter.h:
1905 (JSC::GetterSetter::setGetter):
1906 (JSC::GetterSetter::setSetter):
1907 - Allow the getter/setter to be cleared.
1908 * runtime/JSArray.cpp:
1909 (JSC::JSArray::putDescriptor):
1910 - Changed to call getterObject/setterObject.
1911 (JSC::JSArray::defineOwnNumericProperty):
1913 * runtime/JSObject.cpp:
1914 (JSC::putDescriptor):
1915 (JSC::JSObject::defineOwnProperty):
1916 - Changed to call getterObject/setterObject.
1917 * runtime/ObjectConstructor.cpp:
1918 (JSC::objectConstructorGetOwnPropertyDescriptor):
1919 - getter/setter values read from properties on object are never missing, they will now be set as undefined by 'setDescriptor'.
1920 (JSC::toPropertyDescriptor):
1921 - Do not translate undefined->empty, this loses an important distinction between a get/set property being absent, or being explicitly set to undefined.
1922 * runtime/PropertyDescriptor.cpp:
1923 (JSC::PropertyDescriptor::getterObject):
1924 (JSC::PropertyDescriptor::setterObject):
1925 - Accessors to convert the get/set property to an object pointer, converting undefined to 0.
1926 (JSC::PropertyDescriptor::setDescriptor):
1927 (JSC::PropertyDescriptor::setAccessorDescriptor):
1928 - Translate a getter/setter internally represented at 0 to undefined, indicating that it is present.
1929 * runtime/PropertyDescriptor.h:
1930 - Declare getterObject/setterObject.
1932 2012-01-12 Zeno Albisser <zeno@webkit.org>
1934 [Qt][WK2][Mac] Conflict of MacTypes.h defining a Fixed type after r104560.
1935 https://bugs.webkit.org/show_bug.cgi?id=76175
1937 Defining ENABLE_CSS_FILTERS leads to ambiguous references
1938 due to MacTypes.h being included.
1939 Defining CF_OPEN_SOURCE works around this problem.
1941 Reviewed by Simon Hausmann.
1945 2012-01-12 Simon Hausmann <simon.hausmann@nokia.com>
1947 Make the new WTF module build on Qt
1948 https://bugs.webkit.org/show_bug.cgi?id=76163
1950 Reviewed by Tor Arne Vestbø.
1952 * JavaScriptCore.pro: Removed wtf from the subdirs to build.
1954 2012-01-11 Filip Pizlo <fpizlo@apple.com>
1956 CodeBlock::m_executeCounter should be renamed to CodeBlock::m_jitExecuteCounter
1957 https://bugs.webkit.org/show_bug.cgi?id=76144
1958 <rdar://problem/10681711>
1960 Rubber stamped by Gavin Barraclough.
1962 * bytecode/CodeBlock.h:
1963 (JSC::CodeBlock::addressOfJITExecuteCounter):
1964 (JSC::CodeBlock::offsetOfJITExecuteCounter):
1965 (JSC::CodeBlock::jitExecuteCounter):
1966 (JSC::CodeBlock::optimizeNextInvocation):
1967 (JSC::CodeBlock::dontOptimizeAnytimeSoon):
1968 (JSC::CodeBlock::optimizeAfterWarmUp):
1969 (JSC::CodeBlock::optimizeAfterLongWarmUp):
1970 (JSC::CodeBlock::optimizeSoon):
1971 * dfg/DFGOSRExitCompiler32_64.cpp:
1972 (JSC::DFG::OSRExitCompiler::compileExit):
1973 * dfg/DFGOSRExitCompiler64.cpp:
1974 (JSC::DFG::OSRExitCompiler::compileExit):
1976 (JSC::JIT::emitOptimizationCheck):
1978 2012-01-11 Gavin Barraclough <barraclough@apple.com>
1980 Merge 'Getter'/'Setter' attributes into 'Accessor'
1981 https://bugs.webkit.org/show_bug.cgi?id=76141
1983 Reviewed by Filip Pizlo.
1985 These are currently ambiguous (and used inconsistently). It would logically appear
1986 that either being bit set implies that the corresponding type of accessor is present
1987 but (a) we don't correctly enforce this, and (b) this means the attributes would not
1988 be able to distinguish between a data descriptor and an accessor descriptor with
1989 neither a getter nor setter defined (which is a descriptor permissible under the spec).
1990 This ambiguity would lead to unsafe property caching behavior (though this does not
1991 represent an actual current bug, since we are currently unable to create descriptors
1992 that have neither a getter nor setter, it just prevents us from doing so).
1994 * runtime/Arguments.cpp:
1995 (JSC::Arguments::createStrictModeCallerIfNecessary):
1996 (JSC::Arguments::createStrictModeCalleeIfNecessary):
1997 * runtime/JSArray.cpp:
1998 (JSC::SparseArrayValueMap::put):
1999 (JSC::JSArray::putDescriptor):
2000 * runtime/JSBoundFunction.cpp:
2001 (JSC::JSBoundFunction::finishCreation):
2002 * runtime/JSFunction.cpp:
2003 (JSC::JSFunction::getOwnPropertySlot):
2004 (JSC::JSFunction::getOwnPropertyDescriptor):
2005 * runtime/JSObject.cpp:
2006 (JSC::JSObject::defineGetter):
2007 (JSC::JSObject::initializeGetterSetterProperty):
2008 (JSC::JSObject::defineSetter):
2009 (JSC::putDescriptor):
2010 (JSC::JSObject::defineOwnProperty):
2011 * runtime/JSObject.h:
2012 * runtime/ObjectConstructor.cpp:
2013 (JSC::objectConstructorDefineProperty):
2014 * runtime/PropertyDescriptor.cpp:
2015 (JSC::PropertyDescriptor::setDescriptor):
2016 (JSC::PropertyDescriptor::setAccessorDescriptor):
2017 (JSC::PropertyDescriptor::setSetter):
2018 (JSC::PropertyDescriptor::setGetter):
2019 (JSC::PropertyDescriptor::attributesOverridingCurrent):
2021 2012-01-11 Gavin Barraclough <barraclough@apple.com>
2023 Object.defineProperty([], 'length', {}) should not make length read-only
2024 https://bugs.webkit.org/show_bug.cgi?id=76097
2026 Reviewed by Oliver Hunt.
2028 * runtime/JSArray.cpp:
2029 (JSC::JSArray::defineOwnProperty):
2030 - We should be checking writablePresent().
2032 2012-01-11 Filip Pizlo <fpizlo@apple.com>
2034 Code duplication for invoking the JIT and DFG should be reduced
2035 https://bugs.webkit.org/show_bug.cgi?id=76117
2036 <rdar://problem/10680189>
2038 Rubber stamped by Geoff Garen.
2040 * GNUmakefile.list.am:
2041 * JavaScriptCore.xcodeproj/project.pbxproj:
2042 * jit/JITDriver.h: Added.
2043 (JSC::jitCompileIfAppropriate):
2044 (JSC::jitCompileFunctionIfAppropriate):
2045 * runtime/Executable.cpp:
2046 (JSC::EvalExecutable::compileInternal):
2047 (JSC::ProgramExecutable::compileInternal):
2048 (JSC::FunctionExecutable::compileForCallInternal):
2049 (JSC::FunctionExecutable::compileForConstructInternal):
2051 2012-01-11 Geoffrey Garen <ggaren@apple.com>
2053 Bytecode dumping is broken for call opcodes (due to two new operands)
2054 https://bugs.webkit.org/show_bug.cgi?id=75886
2056 Reviewed by Oliver Hunt.
2058 * bytecode/CodeBlock.cpp:
2059 (JSC::CodeBlock::printCallOp): Made a helper function, so I wouldn't have
2060 to fix this more than once. The helper function skips the extra two operands
2061 at the end of the opcode, used for optimization.
2063 (JSC::CodeBlock::dump): Used the helper function.
2065 * bytecode/CodeBlock.h: Declared the helper function.
2067 2012-01-09 Geoffrey Garen <ggaren@apple.com>
2069 REGRESSION: d3 Bullet Charts demo doesn't work (call with argument assignment is broken)
2070 https://bugs.webkit.org/show_bug.cgi?id=75911
2072 * bytecompiler/BytecodeGenerator.h:
2073 (JSC::BytecodeGenerator::emitNodeForLeftHandSide): Cleanup: No need to
2074 explicitly cast to our return type in C++.
2076 * bytecompiler/NodesCodegen.cpp:
2077 (JSC::FunctionCallResolveNode::emitBytecode):
2078 (JSC::ApplyFunctionCallDotNode::emitBytecode): Make sure to copy our function
2079 into a temporary register before evaluating our arguments, since argument
2080 evaluation might include function calls or assignments that overwrite our callee by name.
2082 2012-01-11 Michael Saboff <msaboff@apple.com>
2084 v8-regexp spends 35% of its time allocating and copying internal regexp results data
2085 https://bugs.webkit.org/show_bug.cgi?id=76079
2087 Reviewed by Geoffrey Garen.
2089 Added a new RegExpResults struct that has the input string, the number of
2090 subexpressions and the output vector. Changed RegExpConstructor to
2091 include a RegExpConstructorPrivate instead of having a reference to one.
2092 Changed RegExpMatchesArray to include a RegExpResults instead of a
2093 reference to a RegExpConstructorPrivate. Created an overloaded assignment
2094 operator to assign a RegExpConstructorPrivate to a RegExpResults.
2095 Collectively this change is worth 24% performance improvement to v8-regexp.
2097 * runtime/RegExpConstructor.cpp:
2098 (JSC::RegExpResult::operator=):
2099 (JSC::RegExpConstructor::RegExpConstructor):
2100 (JSC::RegExpMatchesArray::RegExpMatchesArray):
2101 (JSC::RegExpMatchesArray::finishCreation):
2102 (JSC::RegExpMatchesArray::~RegExpMatchesArray):
2103 (JSC::RegExpMatchesArray::fillArrayInstance):
2104 (JSC::RegExpConstructor::arrayOfMatches):
2105 (JSC::RegExpConstructor::getBackref):
2106 (JSC::RegExpConstructor::getLastParen):
2107 (JSC::RegExpConstructor::getLeftContext):
2108 (JSC::RegExpConstructor::getRightContext):
2109 (JSC::RegExpConstructor::setInput):
2110 (JSC::RegExpConstructor::input):
2111 (JSC::RegExpConstructor::setMultiline):
2112 (JSC::RegExpConstructor::multiline):
2113 * runtime/RegExpConstructor.h:
2114 (JSC::RegExpResult::RegExpResult):
2115 (JSC::RegExpConstructor::performMatch):
2116 * runtime/RegExpMatchesArray.h:
2117 (JSC::RegExpMatchesArray::create):
2118 (JSC::RegExpMatchesArray::getOwnPropertySlot):
2119 (JSC::RegExpMatchesArray::getOwnPropertySlotByIndex):
2120 (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
2121 (JSC::RegExpMatchesArray::put):
2122 (JSC::RegExpMatchesArray::putByIndex):
2123 (JSC::RegExpMatchesArray::deleteProperty):
2124 (JSC::RegExpMatchesArray::deletePropertyByIndex):
2125 (JSC::RegExpMatchesArray::getOwnPropertyNames):
2127 2012-01-11 Eugene Girard <girard@google.com>
2129 Typo in error message: Unexpected token 'defualt'
2130 https://bugs.webkit.org/show_bug.cgi?id=75105
2132 Reviewed by Simon Fraser.
2135 (JSC::Parser::getTokenName):
2137 2012-01-11 Anders Carlsson <andersca@apple.com>
2139 Assertion failure in JSC::allocateCell trying to allocate a JSString
2140 https://bugs.webkit.org/show_bug.cgi?id=76101
2142 Reviewed by Adam Roben.
2144 Remove the ExecutableBase::s_info and JSString::s_info static member variables from the .def file and
2145 export them explicitly using the JS_EXPORTDATA macro.
2147 member variables explicitly using
2148 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2149 * runtime/Executable.h:
2150 * runtime/JSString.h:
2152 2012-01-10 Mark Rowe <mrowe@apple.com>
2154 <rdar://problem/10673792> jsc should install directly in to versioned Resources subfolder
2156 This ensures that jsc ends up in a consistent location whether built in to the same DSTROOT
2157 as JavaScriptCore.framework or in to a different one.
2159 Rubber-stamped by Dan Bernstein.
2161 * Configurations/JSC.xcconfig: Update INSTALL_PATH.
2163 2012-01-10 Filip Pizlo <fpizlo@apple.com>
2165 DFG inlining block linking compares BlockIndex against bytecode index
2166 https://bugs.webkit.org/show_bug.cgi?id=76018
2167 <rdar://problem/10671979>
2169 Reviewed by Gavin Barraclough.
2171 * dfg/DFGByteCodeParser.cpp:
2172 (JSC::DFG::ByteCodeParser::parseCodeBlock):
2174 2012-01-10 Filip Pizlo <fpizlo@apple.com>
2176 CodeBlock.h declares too many things
2177 https://bugs.webkit.org/show_bug.cgi?id=76001
2179 Rubber stamped by Gavin Barraclough.
2181 Removed all non-CodeBlock type declarations from CodeBlock.h, and put them
2182 into separate header files. Also removed all non-CodeBlock method implementations
2183 from CodeBlock.cpp and put them into corresponding cpp files.
2186 * GNUmakefile.list.am:
2187 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2188 * JavaScriptCore.xcodeproj/project.pbxproj:
2190 * assembler/RepatchBuffer.h:
2191 * bytecode/CallLinkInfo.cpp: Added.
2192 (JSC::CallLinkInfo::unlink):
2193 * bytecode/CallLinkInfo.h: Added.
2194 (JSC::CallLinkInfo::callTypeFor):
2195 (JSC::CallLinkInfo::CallLinkInfo):
2196 (JSC::CallLinkInfo::~CallLinkInfo):
2197 (JSC::CallLinkInfo::isLinked):
2198 (JSC::CallLinkInfo::seenOnce):
2199 (JSC::CallLinkInfo::setSeen):
2200 (JSC::getCallLinkInfoReturnLocation):
2201 (JSC::getCallLinkInfoBytecodeIndex):
2202 * bytecode/CallReturnOffsetToBytecodeOffset.h: Added.
2203 (JSC::CallReturnOffsetToBytecodeOffset::CallReturnOffsetToBytecodeOffset):
2204 (JSC::getCallReturnOffset):
2205 * bytecode/CodeBlock.cpp:
2206 * bytecode/CodeBlock.h:
2207 * bytecode/CodeType.h: Added.
2208 * bytecode/ExpressionRangeInfo.h: Added.
2209 * bytecode/GlobalResolveInfo.h: Added.
2210 (JSC::GlobalResolveInfo::GlobalResolveInfo):
2211 * bytecode/HandlerInfo.h: Added.
2212 * bytecode/LineInfo.h: Added.
2213 * bytecode/MethodCallLinkInfo.cpp: Added.
2214 (JSC::MethodCallLinkInfo::reset):
2215 * bytecode/MethodCallLinkInfo.h: Added.
2216 (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
2217 (JSC::MethodCallLinkInfo::seenOnce):
2218 (JSC::MethodCallLinkInfo::setSeen):
2219 (JSC::getMethodCallLinkInfoReturnLocation):
2220 (JSC::getMethodCallLinkInfoBytecodeIndex):
2221 * bytecode/StructureStubInfo.h:
2222 (JSC::getStructureStubInfoReturnLocation):
2223 (JSC::getStructureStubInfoBytecodeIndex):
2225 2012-01-10 Anders Carlsson <andersca@apple.com>
2227 Hang opening movie that requires authentication
2228 https://bugs.webkit.org/show_bug.cgi?id=75989
2229 <rdar://problem/9601915>
2231 Reviewed by Sam Weinig.
2234 Add function wrapper for a function that takes three parameters.
2236 2012-01-10 Filip Pizlo <fpizlo@apple.com>
2238 CodeBlock::m_numParameters should be encapsulated
2239 https://bugs.webkit.org/show_bug.cgi?id=75985
2240 <rdar://problem/10671020>
2242 Reviewed by Oliver Hunt.
2244 Encapsulated CodeBlock::m_numParameters and hooked argument profile creation
2245 into it. This appears to be performance neutral.
2247 * bytecode/CodeBlock.cpp:
2248 (JSC::CodeBlock::CodeBlock):
2249 (JSC::CodeBlock::setNumParameters):
2250 (JSC::CodeBlock::addParameter):
2251 * bytecode/CodeBlock.h:
2252 (JSC::CodeBlock::numParameters):
2253 (JSC::CodeBlock::addressOfNumParameters):
2254 (JSC::CodeBlock::offsetOfNumParameters):
2255 (JSC::CodeBlock::numberOfArgumentValueProfiles):
2256 * bytecompiler/BytecodeGenerator.cpp:
2257 (JSC::BytecodeGenerator::BytecodeGenerator):
2258 (JSC::BytecodeGenerator::addParameter):
2259 (JSC::BytecodeGenerator::emitReturn):
2260 * dfg/DFGAbstractState.cpp:
2261 (JSC::DFG::AbstractState::AbstractState):
2262 * dfg/DFGByteCodeParser.cpp:
2263 (JSC::DFG::ByteCodeParser::ByteCodeParser):
2264 (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
2266 (JSC::DFG::Graph::predictArgumentTypes):
2267 * dfg/DFGJITCompiler.cpp:
2268 (JSC::DFG::JITCompiler::compileFunction):
2269 * dfg/DFGOperations.cpp:
2270 * dfg/DFGSpeculativeJIT.cpp:
2271 (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
2272 * dfg/DFGSpeculativeJIT.h:
2273 (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
2274 * interpreter/Interpreter.cpp:
2275 (JSC::Interpreter::slideRegisterWindowForCall):
2276 (JSC::Interpreter::dumpRegisters):
2277 (JSC::Interpreter::execute):
2278 (JSC::Interpreter::prepareForRepeatCall):
2280 (JSC::JIT::privateCompile):
2282 (JSC::arityCheckFor):
2284 * runtime/Executable.cpp:
2285 (JSC::FunctionExecutable::compileForCallInternal):
2286 (JSC::FunctionExecutable::compileForConstructInternal):
2288 2012-01-10 Gavin Barraclough <barraclough@apple.com>
2290 Build fix following https://bugs.webkit.org/show_bug.cgi?id=75935
2294 * runtime/JSArray.cpp:
2295 (JSC::JSArray::getOwnPropertyNames):
2296 (JSC::JSArray::setLength):
2298 2012-01-10 Gavin Barraclough <barraclough@apple.com>
2302 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2304 2012-01-10 Gavin Barraclough <barraclough@apple.com>
2306 Do not allow Array length to be set if it is non-configurable
2307 https://bugs.webkit.org/show_bug.cgi?id=75935
2309 Reviewed by Sam Weinig.
2311 Do not allow Array length to be set if it is non-configurable, and if the new
2312 length is less than the old length then intervening properties should removed
2313 in reverse order. Removal of properties should cease if an intervening indexed
2314 property being removed is non-configurable.
2316 * JavaScriptCore.exp:
2317 - Removed export for setLength.
2318 * runtime/ArrayPrototype.cpp:
2319 (JSC::arrayProtoFuncConcat):
2320 - JSArray::setLength now takes an ExecState*
2321 (JSC::arrayProtoFuncSlice):
2322 - JSArray::setLength now takes an ExecState*
2323 * runtime/JSArray.cpp:
2324 (JSC::JSArray::defineOwnProperty):
2325 - JSArray::setLength now takes an ExecState*
2326 (JSC::JSArray::put):
2327 - JSArray::setLength now takes an ExecState*
2328 (JSC::compareKeysForQSort):
2329 - Keys extracted from the map can be stored as unsigneds.
2330 (JSC::JSArray::getOwnPropertyNames):
2331 - Keys extracted from the map can be stored as unsigneds.
2332 (JSC::JSArray::setLength):
2333 - Check lengthIsReadOnly(), rather than copying the entire map to iterate
2334 over to determine which keys to remove, instead just copy the keys from
2335 the map to a Vector. When inSparseMode sort the keys in the Vector so
2336 that we can remove properties in reverse order.
2337 * runtime/JSArray.h:
2338 - JSArray::setLength now takes an ExecState*
2340 2012-01-10 Gavin Barraclough <barraclough@apple.com>
2342 Use SameValue to compare property descriptor values
2343 https://bugs.webkit.org/show_bug.cgi?id=75975
2345 Reviewed by Sam Weinig.
2347 Rather than strictEqual.
2349 * runtime/JSArray.cpp:
2350 (JSC::JSArray::defineOwnNumericProperty):
2351 - Missing configurablePresent() check.
2352 * runtime/JSObject.cpp:
2353 (JSC::JSObject::defineOwnProperty):
2355 * runtime/PropertyDescriptor.cpp:
2357 - Moved from JSArray.cpp, fix NaN comparison.
2358 (JSC::PropertyDescriptor::equalTo):
2360 * runtime/PropertyDescriptor.h:
2361 - Added declaration for sameValue.
2362 2012-01-09 Gavin Barraclough <barraclough@apple.com>
2364 Error handling : in ISO8601 timezone
2365 https://bugs.webkit.org/show_bug.cgi?id=75919
2367 Reviewed by Sam Weinig.
2370 (WTF::parseDateFromNullTerminatedCharacters):
2371 - need to increment the string position.
2373 2012-01-09 Mark Rowe <mrowe@apple.com>
2375 JavaScriptCore executable targets shouldn't explicitly depend on the JavaScriptCore framework target
2376 <http://webkit.org/b/75907> / <rdar://problem/10659862>
2378 We'd like for it to be possible to build jsc without building JavaScriptCore.framework and the explicit
2379 dependencies prevent this.
2381 Reviewed by Dan Bernstein.
2383 * JavaScriptCore.xcodeproj/project.pbxproj:
2385 2012-01-09 Adam Treat <atreat@rim.com>
2387 Log is a little to verbose for blackberry port
2388 https://bugs.webkit.org/show_bug.cgi?id=75728
2390 The BlackBerry::Platform::Log* functions take care of the call to vfprintf
2391 which is resulting in unintentional noise in our logs. Add a conditional
2394 Change to using BlackBerry::Platform::logStreamV which does not insert
2395 threading info and newlines unlike BlackBerry::Platform::log.
2397 Finally, add log locking and unlocking which the BlackBerry platform
2398 uses to ensure that N threads do not trample on each other's logs.
2400 Reviewed by Rob Buis.
2402 * wtf/Assertions.cpp:
2403 (WTFLogLocker::WTFReportAssertionFailure):
2404 (WTFLogLocker::WTFReportAssertionFailureWithMessage):
2405 (WTFLogLocker::WTFReportArgumentAssertionFailure):
2406 (WTFLogLocker::WTFReportFatalError):
2407 (WTFLogLocker::WTFReportError):
2408 (WTFLogLocker::WTFLog):
2409 (WTFLogLocker::WTFLogVerbose):
2411 2012-01-09 Gavin Barraclough <barraclough@apple.com>
2413 https://bugs.webkit.org/show_bug.cgi?id=75789
2414 defineOwnProperty not implemented for Array objects
2416 Reviewed by Sam Weinig.
2418 Implements support for getter/setter & non-default attribute properties on arrays,
2419 by forcing them into a dictionary-like 'SparseMode'. This fixes ~300 test-262
2422 * JavaScriptCore.exp:
2424 * dfg/DFGOperations.cpp:
2425 - JSArray::pop now requires an exec state.
2426 * runtime/ArrayPrototype.cpp:
2427 (JSC::arrayProtoFuncPop):
2428 - JSArray::pop now requires an exec state.
2429 * runtime/JSArray.cpp:
2430 (JSC::SparseArrayValueMap::add):
2431 - Add a potentially empty entry into the map.
2432 (JSC::SparseArrayValueMap::put):
2433 - Changed to call setter.
2434 (JSC::SparseArrayEntry::get):
2436 (JSC::SparseArrayEntry::getNonSparseMode):
2437 - does not call getters.
2438 (JSC::JSArray::enterSparseMode):
2439 - Convert into 'SparseMode' - removes the vectors, don't allow it to be recreated.
2440 (JSC::JSArray::putDescriptor):
2441 - Create a numeric property based on a descriptor.
2445 - Helper for the [[DefineOwnProperty]] algorithm.
2446 (JSC::JSArray::defineOwnNumericProperty):
2447 - Define an indexed property on an array object.
2448 (JSC::JSArray::setLengthWritable):
2449 - Marks the length read-only, enters SparseMode as necessary.
2450 (JSC::JSArray::defineOwnProperty):
2451 - Defines either an indexed property or 'length' on an array object.
2452 (JSC::JSArray::getOwnPropertySlotByIndex):
2453 - Updated to correctly handle accessor descriptors & attributes.
2454 (JSC::JSArray::getOwnPropertyDescriptor):
2455 - Updated to correctly handle accessor descriptors & attributes.
2456 (JSC::JSArray::put):
2457 - Pass strict mode flag to setLength.
2458 (JSC::JSArray::putByIndex):
2459 - putByIndexBeyondVectorLength requires an ExecState* rather than a JSGloablData&.
2460 (JSC::JSArray::putByIndexBeyondVectorLength):
2461 - Pass exec to SparseArrayValueMap::put.
2462 (JSC::JSArray::deletePropertyByIndex):
2463 - Do not allow deletion of non-configurable properties.
2464 (JSC::compareKeysForQSort):
2465 - used in implementation of getOwnPropertyNames.
2466 (JSC::JSArray::getOwnPropertyNames):
2467 - Properties in the sparse map should be iterated in order.
2468 (JSC::JSArray::setLength):
2469 - Updated to take a 'shouldThrow' flag, return a result indicating error.
2470 (JSC::JSArray::pop):
2471 - pop should throw an error if length is not writable, even if the array is empty.
2472 (JSC::JSArray::push):
2473 - putByIndexBeyondVectorLength requires an ExecState* rather than a JSGloablData&.
2474 (JSC::JSArray::sort):
2475 - Changed 'get' to 'getNonSparseMode' (can't be getters to call).
2476 (JSC::JSArray::compactForSorting):
2477 - Changed 'get' to 'getNonSparseMode' (can't be getters to call).
2478 * runtime/JSArray.h:
2479 (JSC::SparseArrayValueMap::lengthIsReadOnly):
2480 - Check if the length is read only.
2481 (JSC::SparseArrayValueMap::setLengthIsReadOnly):
2482 - Mark the length as read only.
2483 (JSC::SparseArrayValueMap::find):
2484 - Moved into header.
2485 (JSC::JSArray::isLengthWritable):
2486 - Wraps SparseArrayValueMap::lengthIsReadOnly.
2487 * runtime/JSObject.cpp:
2488 (JSC::JSObject::defineOwnProperty):
2489 - Should be returning the result of putDescriptor.
2490 * runtime/PropertyDescriptor.cpp:
2491 (JSC::PropertyDescriptor::attributesOverridingCurrent):
2492 - Added attributesOverridingCurrent - this should probably be merged with attributesWithOverride.
2493 * runtime/PropertyDescriptor.h:
2494 - Added attributesOverridingCurrent.
2496 2012-01-09 Pavel Heimlich <tropikhajma@gmail.com>
2498 There is no support for fastcall in Solaris Studio.
2499 Fixes build on Solaris.
2500 https://bugs.webkit.org/show_bug.cgi?id=75736
2502 Reviewed by Gavin Barraclough.
2506 2012-01-09 Pavel Heimlich <tropikhajma@gmail.com>
2508 Fix build failure on Solaris
2509 https://bugs.webkit.org/show_bug.cgi?id=75733
2511 Reviewed by Gavin Barraclough.
2515 2012-01-01 Raphael Kubo da Costa <kubo@profusion.mobi>
2517 [CMake] Clean up some cruft from WTF's CMakeLists.txt
2518 https://bugs.webkit.org/show_bug.cgi?id=75420
2520 Reviewed by Daniel Bates.
2522 * wtf/CMakeLists.txt: Remove the unused WTF_PORT_FLAGS variable; add
2523 all needed paths to WTF_INCLUDE_DIRECTORIES in a single place.
2525 2012-01-08 Xianzhu Wang <wangxianzhu@chromium.org>
2527 Fix compilation error about ListHashSetReverseIterator
2528 https://bugs.webkit.org/show_bug.cgi?id=75372
2530 Reviewed by Darin Adler.
2532 There is a typo in class ListHashSetReverseIterator:
2533 typedef ListHashSetConstIterator<ValueArg, inlineCapacity, HashArg> const_reverse_iterator;
2535 typedef ListHashSetConstReverseIterator<ValueArg, inlineCapacity, HashArg> const_reverse_iterator;
2537 * wtf/ListHashSet.h:
2539 2012-01-08 Ryosuke Niwa <rniwa@webkit.org>
2541 WinCE build fix after r104415.
2543 * jit/JITExceptions.cpp:
2544 * jit/JITExceptions.h:
2546 2012-01-08 Filip Pizlo <fpizlo@apple.com>
2548 The JIT's protocol for exception handling should be available to other parts of the system
2549 https://bugs.webkit.org/show_bug.cgi?id=75808
2550 <rdar://problem/10661025>
2552 Reviewed by Oliver Hunt.
2555 * GNUmakefile.list.am:
2556 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2557 * JavaScriptCore.xcodeproj/project.pbxproj:
2559 * jit/JITExceptions.cpp: Added.
2560 (JSC::genericThrow):
2562 * jit/JITExceptions.h: Added.
2564 * runtime/JSGlobalData.h:
2566 2012-01-06 Hajime Morrita <morrita@chromium.org>
2568 https://bugs.webkit.org/show_bug.cgi?id=75296
2569 JSString should not have JS_EXPORTCLASS annotation
2571 Reviewed by Kevin Ollivier.
2573 * runtime/JSString.h: Removed JS_EXPORTCLASS annotation.
2574 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2575 Added missing symbols which were hidden by JS_EXPORTCLASS.
2577 2012-01-06 Michael Saboff <msaboff@apple.com>
2579 JSArray::pop() should compare SparseArrayValueMap::find() to SparseArrayValueMap::notFound()
2580 https://bugs.webkit.org/show_bug.cgi?id=75757
2582 Reviewed by Gavin Barraclough.
2584 * runtime/JSArray.cpp:
2585 (JSC::JSArray::pop): Changed map->end() to map->notFound().
2587 2012-01-06 Filip Pizlo <fpizlo@apple.com>
2589 JIT stub slow paths that would be identical to that of an interpreter should be factored out
2590 https://bugs.webkit.org/show_bug.cgi?id=75743
2591 <rdar://problem/10657024>
2593 Reviewed by Geoff Garen.
2595 * GNUmakefile.list.am:
2596 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2597 * JavaScriptCore.xcodeproj/project.pbxproj:
2599 (JSC::DEFINE_STUB_FUNCTION):
2600 * runtime/CommonSlowPaths.h: Added.
2601 (JSC::CommonSlowPaths::opInstanceOfSlow):
2602 (JSC::CommonSlowPaths::opIn):
2603 (JSC::CommonSlowPaths::opResolve):
2604 (JSC::CommonSlowPaths::opResolveSkip):
2605 (JSC::CommonSlowPaths::opResolveWithBase):
2606 (JSC::CommonSlowPaths::opResolveWithThis):
2608 2012-01-06 Sam Weinig <sam@webkit.org>
2612 * wtf/TypeTraits.cpp:
2614 2012-01-05 Michael Saboff <msaboff@apple.com>
2616 Default HashTraits for Opcode don't work for Opcode = 0
2617 https://bugs.webkit.org/show_bug.cgi?id=75595
2619 Reviewed by Oliver Hunt.
2621 Removed the populating of the m_opcodeIDTable table in the
2622 case where the OpcodeID and Opcode are the same (m_enabled is false).
2623 Instead we just cast the one type to the other.
2625 * interpreter/Interpreter.cpp:
2626 (JSC::Interpreter::initialize):
2627 (JSC::Interpreter::isOpcode):
2628 * interpreter/Interpreter.h:
2629 (JSC::Interpreter::getOpcodeID):
2631 2012-01-06 Sam Weinig <sam@webkit.org>
2633 Add a DecayArray type trait as a first step towards merging OwnPtr and OwnArrayPtr
2634 https://bugs.webkit.org/show_bug.cgi?id=75737
2636 Reviewed by Anders Carlsson.
2638 * wtf/TypeTraits.cpp:
2640 Added a DecayArray trait, that can convert T[] and T[3] -> T*. DecayArray
2641 is composed of some helpers which are also exposed, Conditional<>, which
2642 can provide one type or another based on a boolean predicate, IsArray<>
2643 which can deduce array types, and RemoveExtent<>, which removes the extent
2646 2012-01-06 Oliver Hunt <oliver@apple.com>
2648 GetByteArrayLength is incorrect
2649 https://bugs.webkit.org/show_bug.cgi?id=75735
2651 Reviewed by Filip Pizlo.
2653 Load the byte array length from the correct location.
2654 This stops an existing test from hanging.
2656 * dfg/DFGSpeculativeJIT32_64.cpp:
2657 (JSC::DFG::SpeculativeJIT::compile):
2658 * dfg/DFGSpeculativeJIT64.cpp:
2659 (JSC::DFG::SpeculativeJIT::compile):
2661 2012-01-06 Filip Pizlo <fpizlo@apple.com>
2665 * JavaScriptCore.xcodeproj/project.pbxproj:
2667 2012-01-06 Oliver Hunt <oliver@apple.com>
2669 DFG no longer optimises CanvasPixelArray
2670 https://bugs.webkit.org/show_bug.cgi?id=75729
2672 Reviewed by Gavin Barraclough.
2674 Rename ByteArray (in its ClassInfo) to Uint8ClampedArray to match
2675 the future name when we switch over to the new typed-array based
2676 ImageData specification.
2678 * runtime/JSByteArray.cpp:
2680 2012-01-06 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
2682 Use HashMap<OwnPtr> for SourceProviderCache items
2683 https://bugs.webkit.org/show_bug.cgi?id=75346
2685 Reviewed by Daniel Bates.
2687 * parser/Parser.cpp:
2688 * parser/SourceProviderCache.cpp:
2689 (JSC::SourceProviderCache::clear):
2690 (JSC::SourceProviderCache::add):
2691 * parser/SourceProviderCache.h:
2693 2012-01-06 Sam Weinig <sam@webkit.org>
2695 Remove unused OwnFastMallocPtr class.
2696 https://bugs.webkit.org/show_bug.cgi?id=75722
2698 Reviewed by Geoffrey Garen.
2700 * GNUmakefile.list.am:
2701 * JavaScriptCore.gypi:
2702 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2703 * JavaScriptCore.xcodeproj/project.pbxproj:
2704 * wtf/CMakeLists.txt:
2705 * wtf/OwnFastMallocPtr.h: Removed.
2706 * wtf/text/StringImpl.h:
2709 2012-01-06 Benjamin Poulain <bpoulain@webkit.org>
2711 [Mac] Sort the resources of JavaScriptCore.xcodeproj and remove duplicates
2712 https://bugs.webkit.org/show_bug.cgi?id=75631
2714 Reviewed by Andreas Kling.
2716 * JavaScriptCore.xcodeproj/project.pbxproj:
2718 2012-01-06 Eric Seidel <eric@webkit.org> and Gustavo Noronha Silva <gustavo.noronha@collabora.com>
2720 Make the new WTF module build on Gtk
2721 https://bugs.webkit.org/show_bug.cgi?id=75669
2725 2012-01-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
2727 [Qt] Remove un-needed VPATHs from project includes
2729 Reviewed by Simon Hausmann.
2731 * JavaScriptCore.pri:
2734 2012-01-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
2736 [Qt] Move listing of include paths and libs to pri files in sources
2738 Includepaths are sometimes modified by non-Qt contributors so keeping
2739 them in files inside Sources makes it more likely that they are updated
2740 along with project files for the other ports.
2742 Using pri files instead of prf files for this also has the benefit that
2743 the include() from the main target file can be parsed and followed by
2744 Qt Creator -- something that does not work with load().
2746 Dependency from a target to a library through the WEBKIT variable are
2747 handled through forwarding-files in Tools/qmake/mkspecs/modules, which
2748 set the source root of the module and include the right pri file.
2750 Ideally we'd use the variant of include() that takes an optional
2751 namespace to read the variables into, or the fromfile() function,
2752 but both of these add an overhead of about 40% on the total qmake
2753 runtime, due to making a deep copy of all the variables in the
2754 project or re-reading all the prf files from scratch.
2756 Reviewed by Simon Hausmann.
2759 * JavaScriptCore.pri: Renamed from Tools/qmake/mkspecs/features/javascriptcore.prf.
2761 * wtf/wtf.pri: Renamed from Tools/qmake/mkspecs/features/wtf.prf.
2764 2012-01-06 Hajime Morrita <morrita@chromium.org>
2766 WTF::String: Inline method shouldn't have WTF_EXPORT_PRIVATE
2767 https://bugs.webkit.org/show_bug.cgi?id=75612
2769 Reviewed by Kevin Ollivier.
2771 * wtf/text/WTFString.h:
2772 (WTF::String::findIgnoringCase):
2773 (WTF::String::append):
2774 (WTF::String::fromUTF8):
2775 (WTF::String::fromUTF8WithLatin1Fallback):
2776 (WTF::String::isHashTableDeletedValue):
2778 2012-01-05 Dan Bernstein <mitz@apple.com>
2780 <rdar://problem/10633760> Update copyright strings
2782 Reviewed by Mark Rowe.
2786 2012-01-05 Gavin Barraclough <barraclough@apple.com>
2788 Date constructor handles infinite values incorrectly.
2789 https://bugs.webkit.org/show_bug.cgi?id=70998
2791 Reviewed by Filip Pizlo.
2793 * runtime/DateConstructor.cpp:
2794 (JSC::constructDate):
2795 - should be checking !finite rather then isnan.
2797 2012-01-05 Gavin Barraclough <barraclough@apple.com>
2799 date.toISOString produces incorrect results for dates with ms prior to 1970
2800 https://bugs.webkit.org/show_bug.cgi?id=75684
2802 Reviewed by Sam Weinig.
2804 * runtime/DatePrototype.cpp:
2805 (JSC::dateProtoFuncToISOString):
2807 2012-01-05 Gavin Barraclough <barraclough@apple.com>
2809 Array.prototype.lastIndexOf ignores undefined fromIndex.
2810 https://bugs.webkit.org/show_bug.cgi?id=75678
2812 Reviewed by Sam Weinig.
2814 array.lastIndexOf(x, undefined) is equivalent to array.lastIndexOf(x, 0), not array.lastIndexOf(x)
2816 * runtime/ArrayPrototype.cpp:
2817 (JSC::arrayProtoFuncLastIndexOf):
2818 - should check argumnet count, rather than checking agument value for undefined.
2820 2012-01-05 Gavin Barraclough <barraclough@apple.com>
2822 Date parsing is too restrictive.
2823 https://bugs.webkit.org/show_bug.cgi?id=75671
2825 Reviewed by Oliver Hunt.
2827 ES5 date parsing currently requires all fields to be present, which does not match the spec (ES5.1 15.9.1.15).
2828 The spec allow a date to be date only, or date + time.
2830 The date portion on the should match: (pseudocode!:)
2831 [(+|-)YY]YYYY[-MM[-DD]]
2832 though we are slightly more liberal (permitted by the spec), allowing:
2834 The time portion should match:
2835 THH:mm[:ss[.sss]][Z|(+|-)HH:mm]
2836 again we're slightly more liberal, allowing:
2837 THH:mm[:ss[.s+]][Z|(+|-)HH:mm]
2840 (WTF::parseES5DatePortion):
2841 - Month/day fields are optional, default to 01.
2842 (WTF::parseES5TimePortion):
2843 - Hours/Minutes are requires, seconds/timezone are optional.
2844 (WTF::parseES5DateFromNullTerminatedCharacters):
2845 - Dates may be date only, or date + time.
2847 2012-01-05 Bruno Dilly <bdilly@profusion.mobi>
2849 [EFL] Undefined references to ICU_I18N symbols on WTF
2850 https://bugs.webkit.org/show_bug.cgi?id=75642
2852 Unreviewed build fix.
2854 Add ${ICU_I18N_LIBRARIES} to WTF_LIBRARIES on wtf efl platform cmake.
2855 Some undefined references were ucol_setAttribute_44, ucol_close_44,
2856 ucol_getAttribute_44...
2858 * wtf/PlatformEfl.cmake:
2860 2012-01-05 Geoffrey Garen <ggaren@apple.com>
2862 Refined the fast path for StringImpl::hash()
2863 https://bugs.webkit.org/show_bug.cgi?id=75178
2865 Reviewed by Darin Adler.
2867 Moved the hash calculation code into an out-of-line function to clean up
2870 No measurable benchmark change, but this knocks some samples off in
2871 Instruments, and I think this is a step toward removing -fomit-frame-pointer.
2873 * wtf/text/StringImpl.cpp:
2874 (WTF::StringImpl::hashSlowCase):
2875 * wtf/text/StringImpl.h:
2876 (WTF::StringImpl::hash): The patch.
2878 * wtf/text/StringStatics.cpp:
2879 (WTF::StringImpl::hashSlowCase): Abide by the cockamamie Windows build
2880 scheme, which requires all out-of-line StringImpl functions used by
2881 WebCore be defined in this file instead of StringImpl.cpp. (See http://trac.webkit.org/changeset/59187.)
2883 2012-01-05 Gavin Barraclough <barraclough@apple.com>
2885 Literal tab in JSONString fails
2886 https://bugs.webkit.org/show_bug.cgi?id=71772
2888 Reviewed by Oliver Hunt.
2890 rfc4627 does not allow literal tab characters in JSON source.
2892 * runtime/LiteralParser.cpp:
2893 (JSC::isSafeStringCharacter):
2894 - do not allow literal tab in StrictJSON mode.
2896 2012-01-05 Gavin Barraclough <barraclough@apple.com>
2898 push/shift fifo may consume excessive memory
2899 https://bugs.webkit.org/show_bug.cgi?id=75610
2901 Reviewed by Sam Weinig.
2903 Array object commonly store data in a vector, consisting of a portion that is
2904 in use, a pre-capacity (m_indexBias) and a post-capacity (the delta between
2905 m_length and m_vectorLength). Calls to shift with grow the pre-capacity, and
2906 the current algorithm for increaseVectorLength (used by push, or [[Put]]) will
2907 never shrink the pre-capacity, so a push/shift fifo may consume an inordinate
2908 amount of memory, whilst having a relatively small active length.
2910 * runtime/JSArray.cpp:
2911 (JSC::JSArray::increaseVectorLength):
2912 - If m_indexBias is non-zero, decay it over time.
2914 2012-01-05 Csaba Osztrogonác <ossy@webkit.org>
2916 unshift/pop fifo may consume excessive memory
2917 https://bugs.webkit.org/show_bug.cgi?id=75588
2919 Reviewed by Zoltan Herczeg.
2921 Buildfix after r104120.
2923 * runtime/JSArray.cpp: Remove useless asserts, baecause unsigned expression >= 0 is always true
2924 (JSC::JSArray::unshiftCount):
2926 2012-01-05 Zoltan Herczeg <zherczeg@webkit.org>
2928 Unreviewed gardening after r104134.
2930 * wtf/Assertions.cpp:
2932 2012-01-05 Zoltan Herczeg <zherczeg@webkit.org>
2934 Unreviewed gardening after r75605.
2936 Rubber stamped by NOBODY Csaba Osztrogonác.
2938 * wtf/Assertions.cpp:
2940 2012-01-05 Benjamin Poulain <benjamin@webkit.org>
2942 Improve charactersAreAllASCII() to compare multiple characters at a time
2943 https://bugs.webkit.org/show_bug.cgi?id=74063
2945 Reviewed by Darin Adler.
2947 A new header ASCIIFastPath.h contains the functions related to
2948 the detection of ASCII by using machine words. Part of it comes from
2949 WebCore's TextCodecASCIIFastPath.h.
2951 The function charactersAreAllASCII() is moved to TextCodecASCIIFastPath.h
2952 and is implemented with computer word comparison.
2953 The gain over the previous implementation of charactersAreAllASCII() is of
2954 the order of how many comparison are avoided (4x, 8x, 16x depending on the
2955 format and the CPU type).
2957 * GNUmakefile.list.am:
2958 * JavaScriptCore.gypi:
2959 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2960 * JavaScriptCore.xcodeproj/project.pbxproj:
2961 * wtf/text/ASCIIFastPath.h: Added.
2962 (WTF::isAlignedToMachineWord):
2963 (WTF::alignToMachineWord):
2965 (WTF::charactersAreAllASCII):
2966 * wtf/text/WTFString.h:
2969 2012-01-05 Mark Rowe <mrowe@apple.com>
2971 <http://webkit.org/b/75606> [Mac] WTF logging functions should output to both stderr and ASL
2973 We should always log to both ASL and stderr on platforms where this won't result in launchd
2974 duplicating the messages.
2976 Reviewed by Dan Bernstein.
2978 * wtf/Assertions.cpp:
2979 (vprintf_stderr_common):
2981 2012-01-05 Mark Rowe <mrowe@apple.com>
2983 <http://webkit.org/b/75605> WTF logging functions should call vprintf_stderr_common only once per line
2985 Several of the WTF logging functions make multiple calls to vprintf_stderr_common to output a
2986 single line of text. This results in strangely formatted output if vprintf_stderr_common is
2987 retargeted to an output device that is message-oriented (such as ASL) rather than stream-oriented
2990 Reviewed by Dan Bernstein.
2992 * wtf/Assertions.cpp:
2993 (vprintf_stderr_with_prefix): Helper function to prepend a given prefix on to the given format
2994 string before handing it off to vprintf_stderr_common. This requires disabling warnings about
2995 calling a printf-like function with a non-literal format string for this piece of code. It's
2996 safe in this particular case as vprintf_stderr_with_prefix is only ever given a literal prefix.
2997 (vprintf_stderr_with_trailing_newline): Helper function to append a trailling newline on to the
2998 given format string if one does not already exist. It requires the same treatment with regards
2999 to the non-literal format string warning.
3000 (WTFReportAssertionFailureWithMessage): Switch to using vprintf_stderr_with_prefix.
3001 (WTFReportBacktrace): Switch from calling fprintf directly to using fprintf_stderr_common.
3002 (WTFReportFatalError): Switch to using vprintf_stderr_with_prefix.
3003 (WTFReportError): Ditto.
3004 (WTFLog): Switch to using vprintf_stderr_with_trailing_newline.
3005 (WTFLogVerbose): Ditto.
3007 2012-01-04 Gavin Barraclough <barraclough@apple.com>
3009 unshift/pop fifo may consume excessive memory
3010 https://bugs.webkit.org/show_bug.cgi?id=75588
3012 Reviewed by Sam Weinig.
3014 The Array object commonly store data in a vector, consisting of a portion that
3015 is in use, a pre-capacity (m_indexBias) and a post-capacity (the delta between
3016 m_length and m_vectorLength). Calls to pop with grow the post-capacity, and the
3017 current algorithm for increasePrefixVectorLength (used by unshift) will never
3018 stink the post-capacity, so a unshift/pop fifo may consume an inordinate amount
3019 of memory, whilst having a relatively small active length.
3021 * runtime/JSArray.cpp:
3023 - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>)
3024 (JSC::SparseArrayValueMap::put):
3025 - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>)
3026 (JSC::JSArray::increaseVectorLength):
3027 - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>)
3028 (JSC::JSArray::unshiftCountSlowCase):
3029 - renamed from increaseVectorPrefixLength (this was a bad name, since it
3030 also moved the ArrayStorage header), rewritten.
3031 (JSC::JSArray::shiftCount):
3032 - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>), count should be unsigned
3033 (JSC::JSArray::unshiftCount):
3034 - sizeof(JSValue) should be sizeof(WriteBarrier<Unknown>), count should be unsigned,
3035 increaseVectorPrefixLength renamed to unshiftCountSlowCase
3036 (JSC::JSArray::sortNumeric):
3037 * runtime/JSArray.h:
3038 - Updated function declarations, m_indexBias should be unsigned.
3040 2012-01-04 Mark Rowe <mrowe@apple.com>
3042 <http://webkit.org/b/75604> All instances of JSC::ArgumentsData appear to be leaked by JSC::Arguments
3044 Since JSC::Arguments has an OwnPtr for a member it needs to override destroy
3045 to ensure that the correct destructor is invoked. This is necessary because
3046 JSCell subclasses all intentionally have non-virtual destructors.
3048 Reviewed by Filip Pizlo.
3050 * runtime/Arguments.cpp:
3051 (JSC::Arguments::destroy):
3052 * runtime/Arguments.h:
3054 2012-01-04 Filip Pizlo <fpizlo@apple.com>
3056 Unreviewed, accidentally turned off the JIT in previous commit. Turning
3061 2012-01-04 Filip Pizlo <fpizlo@apple.com>
3063 Changed "return" to "break" in some macrology I introduced in
3064 http://trac.webkit.org/changeset/104086. This is a benign change, as
3065 "return" was technically correct for all uses of the macro.
3067 Reviewed by Oliver Hunt.
3072 2012-01-04 Michael Saboff <msaboff@apple.com>
3074 StructureStubInfo not reset when corresponding MethodCallLinkInfo is reset
3075 https://bugs.webkit.org/show_bug.cgi?id=75583
3077 Reviewed by Filip Pizlo.
3079 * bytecode/CodeBlock.cpp:
3080 (JSC::CodeBlock::finalizeUnconditionally): Find the corresponding
3081 StructureStubInfo and reset the appropriate JIT and
3082 the StructureStubInfo itself when reseting a MethodCallLinkInfo.
3084 2012-01-04 Michael Saboff <msaboff@apple.com>
3086 Invalid ASSERT() in DFGRepatch.cpp near line 385
3087 https://bugs.webkit.org/show_bug.cgi?id=75584
3089 Reviewed by Filip Pizlo.
3091 * dfg/DFGRepatch.cpp:
3092 (JSC::DFG::tryBuildGetByIDProtoList): Fixed ASSERT to use ==.
3094 2012-01-04 Filip Pizlo <fpizlo@apple.com>
3096 Incorrect use of DFG node reference counts when mutating the graph
3097 https://bugs.webkit.org/show_bug.cgi?id=75580
3098 <rdar://problem/10644607>
3100 Reviewed by Oliver Hunt.
3102 Made deref(node) follow the pattern of ref(node), which it should have
3106 (JSC::DFG::Graph::refChildren):
3107 (JSC::DFG::Graph::derefChildren):
3109 (JSC::DFG::Graph::deref):
3110 (JSC::DFG::Graph::clearAndDerefChild1):
3111 (JSC::DFG::Graph::clearAndDerefChild2):
3112 (JSC::DFG::Graph::clearAndDerefChild3):
3114 (JSC::DFG::Node::deref):
3115 * dfg/DFGPropagator.cpp:
3116 (JSC::DFG::Propagator::fixupNode):
3118 2012-01-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
3120 [Qt] Introduce new qmake variable 'WEBKIT' for signaling dependencies
3122 The custom qmake variable 'WEBKIT' is used for signaling that a
3123 target depends in some way on other subproject of the WebKit
3124 project. For now this is limited to the set of intermediate
3125 libraries: wtf, javascriptcore, webcore, and webkit2.
3127 This replaces the previous convension of using load(foo) for
3128 just include paths, and CONFIG += foo to also link against foo.
3130 Adding a dependency results in additional include paths being
3131 available, and potentially linking to the library. This is
3132 decided by the build system based on conditions such as what
3133 kind of target is being built and the general build config.
3135 An advantage to his approach is that it simplifies the individual
3136 foo.prf files, for example by allowing us to use INCLUDEPATH +=
3137 and LIBS += as normal instead of prepending.
3139 Reviewed by Simon Hausmann.
3145 2012-01-03 Filip Pizlo <fpizlo@apple.com>
3147 DFG: The assertion that a double-voted variable cannot become double-unvoted is wrong
3148 https://bugs.webkit.org/show_bug.cgi?id=75516
3149 <rdar://problem/10640266>
3151 Reviewed by Gavin Barraclough.
3153 Removed the offending assertion, since it was wrong. Also hardened the code to make
3154 this case less likely by first having the propagator fixpoint converge, and then doing
3155 double voting combined with a second fixpoint. This is neutral on benchmarks and
3156 fixes the assertion in a fairly low-risk way (i.e. we won't vote a variable double
3157 until we've converged to the conclusion that it really is double).
3159 * dfg/DFGPropagator.cpp:
3160 (JSC::DFG::Propagator::propagatePredictions):
3161 * dfg/DFGVariableAccessData.h:
3162 (JSC::DFG::VariableAccessData::tallyVotesForShouldUseDoubleFormat):
3164 2012-01-03 Filip Pizlo <fpizlo@apple.com>
3166 REGRESSION (r98196-98236): Incorrect layout of iGoogle with RSS feeds
3167 https://bugs.webkit.org/show_bug.cgi?id=75303
3168 <rdar://problem/10633533>
3170 Reviewed by Gavin Barraclough.
3172 The this argument was not being kept alive in some cases during inlining and intrinsic
3175 * dfg/DFGByteCodeParser.cpp:
3176 (JSC::DFG::ByteCodeParser::handleCall):
3177 (JSC::DFG::ByteCodeParser::emitFunctionCheck):
3178 (JSC::DFG::ByteCodeParser::handleInlining):
3180 2012-01-03 Gavin Barraclough <barraclough@apple.com>
3184 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3186 2012-01-03 Gavin Barraclough <barraclough@apple.com>
3190 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3192 2012-01-03 Gavin Barraclough <barraclough@apple.com>
3194 https://bugs.webkit.org/show_bug.cgi?id=75140
3196 Reviewed by Sam Weinig.
3198 Rewrite JSArray::putSlowCase to be much cleaner & simpler.
3200 This rewrite only significantly changes behaviour for sparse array, specifically
3201 in how sparse arrays are reified back to vector form. This does not affect arrays
3202 with less than 10000 entries (since these always use a vector). The more common
3203 cases of sparse array behavior (though large sparse arrays are rare) - arrays that
3204 always remain sparse, and arrays that are filled in reverse sequential order -
3205 should be just as fast or faster (since reification is simpler & no longer
3206 requires map lookups) after these changes.
3208 Simplifying this code allows all cases of putByIndex that need to grow the vector
3209 to do so via increaseVectorLength, which means that this method can encapsulate
3210 the policy of determining how the vector should be grown.
3212 No performance impact.
3214 * runtime/JSArray.cpp:
3215 (JSC::isDenseEnoughForVector):
3216 - any array of length <= MIN_SPARSE_ARRAY_INDEX is dense enough for a vector.
3217 (JSC::JSArray::putByIndex):
3218 - simplify & comment.
3219 (JSC::JSArray::putByIndexBeyondVectorLength):
3220 - Re-written to be much clearer & simpler.
3221 (JSC::JSArray::increaseVectorLength):
3222 (JSC::JSArray::increaseVectorPrefixLength):
3223 - add explicit checks against MAX_STORAGE_VECTOR_LENGTH, so clients do not need do so.
3224 (JSC::JSArray::push):
3225 - simplify & comment.
3226 * runtime/JSArray.h:
3227 - removed SparseArrayValueMap::take.
3229 2012-01-03 Gavin Barraclough <barraclough@apple.com>
3233 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3235 2012-01-03 Gavin Barraclough <barraclough@apple.com>
3237 https://bugs.webkit.org/show_bug.cgi?id=75140
3239 Reviewed by Sam Weinig.
3241 Simplify JSArray creation - remove ArgsList/JSValue* create methods
3242 (this functionality can be implemented in terms of tryCreateUninitialized).
3244 * JavaScriptCore.exp:
3245 * runtime/ArrayConstructor.cpp:
3246 - use constructArray/constructEmptyArray instead of calling JSArray::create directly
3247 (JSC::constructArrayWithSizeQuirk):
3248 * runtime/JSArray.cpp:
3249 * runtime/JSArray.h:
3250 - removed ArgsList/JSValue* create methods
3251 * runtime/JSGlobalObject.h:
3252 (JSC::constructEmptyArray):
3253 (JSC::constructArray):
3254 - changed to be implemented in terms of JSArray::tryCreateUninitialized
3256 2012-01-03 Gavin Barraclough <barraclough@apple.com>
3258 https://bugs.webkit.org/show_bug.cgi?id=75429
3259 ThrowTypeError should be a singleton object
3261 Reviewed by Sam Weinig.
3263 Per section 13.2.3 of the spec.
3264 We could change setAccessorDescriptor to be able to share the global
3265 GetterSetter object, rather than storing the accessor functions and
3266 creating a new GetterSetter in defineProperty - but this won't be a
3267 small change to PropertyDescriptors (and would probably mean making
3268 GetterSetter objects immutable?) - so I'll leave that for another
3271 * JavaScriptCore.exp:
3272 - don't export setAccessorDescriptor
3273 * runtime/Arguments.cpp:
3274 (JSC::Arguments::createStrictModeCallerIfNecessary):
3275 (JSC::Arguments::createStrictModeCalleeIfNecessary):
3276 - call throwTypeErrorGetterSetter instead of createTypeErrorFunction
3277 * runtime/Error.cpp:
3279 - remove createTypeErrorFunction
3280 * runtime/JSFunction.cpp:
3281 * runtime/JSFunction.h:
3282 - remove unused createDescriptorForThrowingProperty
3283 * runtime/JSGlobalObject.cpp:
3284 (JSC::JSGlobalObject::reset):
3285 (JSC::JSGlobalObject::visitChildren):
3286 - removed m_strictModeTypeErrorFunctionStructure.
3287 * runtime/JSGlobalObject.h:
3288 (JSC::JSGlobalObject::internalFunctionStructure):
3289 - removed m_strictModeTypeErrorFunctionStructure.
3290 * runtime/PropertyDescriptor.cpp:
3291 (JSC::PropertyDescriptor::setAccessorDescriptor):
3292 - changed to take a GetterSetter
3293 * runtime/PropertyDescriptor.h:
3294 - changed to take a GetterSetter
3296 2012-01-02 Gavin Barraclough <barraclough@apple.com>
3298 Check in fixes for jsc tests following bug #75455.
3300 * tests/mozilla/ecma/GlobalObject/15.1.2.2-1.js:
3301 * tests/mozilla/ecma/GlobalObject/15.1.2.2-2.js:
3303 2012-01-02 Gavin Barraclough <barraclough@apple.com>
3305 https://bugs.webkit.org/show_bug.cgi?id=75452
3306 If argument to Error is undefined, message is not set
3308 Reviewed by Sam Weinig.
3310 Per section 15.11.1.1 of the spec.
3312 * runtime/ErrorInstance.h:
3313 (JSC::ErrorInstance::create):
3314 (JSC::ErrorInstance::finishCreation):
3316 2012-01-02 Gavin Barraclough <barraclough@apple.com>
3318 ES5 prohibits parseInt from supporting octal
3319 https://bugs.webkit.org/show_bug.cgi?id=75455
3321 Reviewed by Sam Weinig.
3323 See sections 15.1.2.2 and annex E.
3325 * runtime/JSGlobalObjectFunctions.cpp:
3328 2012-01-02 Gavin Barraclough <barraclough@apple.com>
3330 https://bugs.webkit.org/show_bug.cgi?id=55343
3331 Global JSON should be configurable but isn't
3333 Reviewed by Sam Weinig.
3335 * runtime/JSGlobalObject.cpp:
3336 (JSC::JSGlobalObject::reset):
3337 - make JSON configurable
3339 2012-01-01 Filip Pizlo <fpizlo@apple.com>
3341 Call instructions should leave room for linking information
3342 https://bugs.webkit.org/show_bug.cgi?id=75422
3343 <rdar://problem/10633985>
3345 Reviewed by Oliver Hunt.
3347 * bytecode/Opcode.h:
3348 * bytecompiler/BytecodeGenerator.cpp:
3349 (JSC::BytecodeGenerator::emitCall):
3350 (JSC::BytecodeGenerator::emitConstruct):
3352 2011-12-31 Dan Bernstein <mitz@apple.com>
3354 Continue trying to fix the Windows build after r103823.
3356 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3358 2011-12-31 Dan Bernstein <mitz@apple.com>
3360 Start trying to fix the Windows build after r103823.
3362 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3364 2011-12-30 Anders Carlsson <andersca@apple.com>
3366 Add a ParamStorageTraits specialization for RetainPtr
3367 https://bugs.webkit.org/show_bug.cgi?id=75392
3369 Reviewed by Daniel Bates.
3372 Add a partial specialization of ParamStorageTraits for RetainPtr<T>.
3375 Bring in the retainPtr function template from WTF.
3377 2011-12-29 Sam Weinig <sam@webkit.org>
3379 It should be easier to iterate a Vector backwards
3380 https://bugs.webkit.org/show_bug.cgi?id=75359
3382 Reviewed by Anders Carlsson.
3384 Adds Vector::rbegin(), Vector::rend(), and Vector::reversed(),
3385 a new proxy driven way to access a vector backwards. One can use
3386 reversed() in a range-based for loop like so:
3388 for (auto val: myVector.reversed())
3392 (WTF::Vector::~Vector):
3395 (WTF::Vector::rbegin):
3396 (WTF::Vector::rend):
3397 Added using standard adaptor std::reverse_iterator.
3399 (WTF::Vector::reversed):
3400 (WTF::Vector::VectorReverseProxy::begin):
3401 (WTF::Vector::VectorReverseProxy::end):
3402 Add proxy similar to one used in HashMap for keys() and values()
3403 which allows access to a Vector backwards for use in range-based
3406 2011-12-29 Gavin Barraclough <barraclough@apple.com>
3408 https://bugs.webkit.org/show_bug.cgi?id=75140
3410 Reviewed by Oliver Hunt.
3412 Start cleaning up JSArray construction. JSArray has a set of create methods,
3413 one of which (currently) takes a 'creation mode' enum parameter. Based on that
3414 parameter, the constructor does one of two completely different things. If the
3415 parameter is 'CreateInitialized' it creates an array, setting the length, but
3416 does not eagerly allocate a storage vector of the specified length. A small
3417 (BASE_VECTOR_LEN sized) initial vector will be allocated, and cleared, property
3418 access to the vector will read the hole value (return undefined). The alternate
3419 usage of this method ('CreateCompact') does something very different. It tries
3420 to create an array of the requested length, and also allocates a storage vector
3421 large enough to hold all properties. It does not clear the storage vector,
3422 leaving the memory uninitialized and requiring the user to call a method